using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Destructible; using EntityStates.FalseSon; using EntityStates.FalseSonBoss; using EntityStates.Geode; using EntityStates.GolemMonster; using EntityStates.Interactables.GoldBeacon; using EntityStates.MeridianEvent; using EntityStates.Missions.Goldshores; using EntityStates.Missions.MiniGeodeTracker; using EntityStates.PrimeMeridian; using EntityStates.TitanMonster; using IL.EntityStates.FalseSonBoss; using IL.EntityStates.Geode; using IL.RoR2; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On; using On.EntityStates; using On.EntityStates.Destructible; using On.EntityStates.FalseSon; using On.EntityStates.FalseSonBoss; using On.EntityStates.Geode; using On.EntityStates.Interactables.GoldBeacon; using On.EntityStates.MeridianEvent; using On.EntityStates.Missions.Goldshores; using On.EntityStates.PrimeMeridian; using On.EntityStates.TitanMonster; using On.RoR2; using On.RoR2.Projectile; using R2API; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.EntitlementManagement; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2BepInExPack.GameAssetPaths.Version_1_39_0; using StormboundFalseSon.Changes; using StormboundFalseSon.Modules; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyCompany("StormboundFalseSon")] [assembly: AssemblyProduct("StormboundFalseSon")] [assembly: AssemblyTitle("StormboundFalseSon")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [CompilerGenerated] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace StormboundFalseSon { internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [BepInPlugin("com.Bloonjitsu7.StormboundFalseSon", "StormboundFalseSon", "0.7.2")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class StormboundFalseSonPlugin : BaseUnityPlugin { private Main changes; public void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); new ContentPacks().Initialize(); changes = new Main(); changes.SetupConfig(((BaseUnityPlugin)this).Config); changes.Initialize(); } } } namespace StormboundFalseSon.Modules { public static class States { internal static List entityStates = new List(); internal static void RegisterStates() { entityStates.Add(typeof(DelayedState)); entityStates.Add(typeof(FireGoldLaser)); entityStates.Add(typeof(GeodeRegenerate)); } } public static class DamageTypes { public static ModdedDamageType stormboundLightning = DamageAPI.ReserveDamageType(); public static ModdedDamageType stormboundLunarRuin = DamageAPI.ReserveDamageType(); public static ModdedDamageType stormboundLaser = DamageAPI.ReserveDamageType(); public static ModdedDamageType aurelioniteLaser = DamageAPI.ReserveDamageType(); public static ModdedDamageType stormboundLaserTargeting = DamageAPI.ReserveDamageType(); public static ModdedDamageType stormboundLaserCrystal = DamageAPI.ReserveDamageType(); public static ModdedDamageType stormboundDevastatorCrystal = DamageAPI.ReserveDamageType(); } public static class Buffs { internal static List buffDefs = new List(); internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown, bool isHidden, bool ignoreNectar) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); ((Object)val).name = buffName; val.buffColor = buffColor; val.canStack = canStack; val.isDebuff = isDebuff; val.eliteDef = null; val.iconSprite = buffIcon; val.isCooldown = isCooldown; val.isHidden = isHidden; val.ignoreGrowthNectar = ignoreNectar; buffDefs.Add(val); return val; } } public static class Effects { public static List effectDefs = new List(); internal static void RegisterEffects() { FireGoldLaser.tracerEffectPrefab = CreateAurelioniteTracer(); CoreChanges.lightningWarningEffect = CreateLightningWarning(); } private static GameObject CreateHalcyoniteTether() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) return CloneObject("RoR2/DLC2/Elites/EliteBead/EliteBeadTether.prefab", "StormboundTetherEffect", new Color(1f, 1f, 0f, 1f), new Color(1f, 1f, 0f, 1f), 1f, 1000f); } private static GameObject CreateLightningWarning() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) return CloneObject("RoR2/DLC2/meridian/DisableSkillsLightning/LightningStrikePredictionEffect.prefab", "StormboundLightningPredictionEffect", new Color(1f, 0.4f, 0f, 0.5f), new Color(1f, 0.5f, 0f, 1f), 1f, 1000f, colorMesh: false); } private static GameObject CreateAurelioniteTracer() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneTracer("RoR2/Base/Huntress/TracerHuntressSnipe.prefab", "TracerStormboundAurelioniteLaser", Color.red, new Color(1f, 0.04f, 0.04f, 1f), 2f); Object.Destroy((Object)(object)((Component)val.transform.Find("TracerHead")).gameObject); return val; } private static GameObject CloneObject(string originalObjectName, string newObjectName, Color color1, Color color2, float scaleMult = 1f, float colorTemp = 0f, bool colorMesh = true, string soundName = "", bool parentToTransform = false) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_008b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)originalObjectName).WaitForCompletion(); if ((Object)(object)val == (Object)null) { Log.Warning(originalObjectName + " is null!"); return null; } GameObject val2 = PrefabAPI.InstantiateClone(val, newObjectName, false); if ((Object)(object)val2.GetComponent() == (Object)null) { val2.AddComponent(); } if ((Object)(object)val2.GetComponent() == (Object)null) { val2.AddComponent(); } val2.GetComponent().vfxPriority = (VFXPriority)2; val2.GetComponent().DoNotPool = true; val2.Recolor(color1, color2, scaleMult, colorTemp, colorMesh); CreateEffectFromObject(val2, soundName, parentToTransform); return val2; } private static GameObject CloneTracer(string originalTracerName, string newTracerName, Color color1, Color color2, float widthMult = 1f, float? speed = null, float? length = null) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)originalTracerName).WaitForCompletion(); if ((Object)(object)val == (Object)null) { Log.Warning(originalTracerName + " is null!"); return null; } GameObject val2 = PrefabAPI.InstantiateClone(val, newTracerName, false); if (!Object.op_Implicit((Object)(object)val2.GetComponent())) { val2.AddComponent(); } if (!Object.op_Implicit((Object)(object)val2.GetComponent())) { val2.AddComponent(); } val2.GetComponent().vfxPriority = (VFXPriority)2; val2.GetComponent().DoNotPool = true; if (!Object.op_Implicit((Object)(object)val2.GetComponent())) { val2.AddComponent(); } val2.GetComponent().speed = (speed.HasValue ? speed.Value : val2.GetComponent().speed); val2.GetComponent().length = (length.HasValue ? length.Value : val2.GetComponent().length); val2.Recolor(color1, color2, widthMult); CreateAndAddEffectDef(val2); return val2; } private static void Recolor(this GameObject thingToColor, Color color1, Color color2, float widthMult = 1f, float colorTemp = 0f, bool colorMesh = true) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) bool flag = true; LineRenderer[] componentsInChildren = thingToColor.GetComponentsInChildren(); foreach (LineRenderer val in componentsInChildren) { bool flag2 = true; val.startColor = color1; val.endColor = color2; if (widthMult != 1f) { val.widthMultiplier *= widthMult; } } ParticleSystem[] componentsInChildren2 = thingToColor.GetComponentsInChildren(); foreach (ParticleSystem val2 in componentsInChildren2) { MainModule main = val2.main; MinMaxCurve startSize = ((MainModule)(ref main)).startSize; ((MainModule)(ref main)).startSize = new MinMaxCurve(((MinMaxCurve)(ref startSize)).constant * widthMult); ((MainModule)(ref main)).startColor = new MinMaxGradient(color1); TrailModule trails = val2.trails; if (((TrailModule)(ref trails)).enabled) { Gradient val3 = new Gradient(); GradientColorKey[] array = (GradientColorKey[])(object)new GradientColorKey[2]; array[0].color = color1; array[0].time = 0f; array[1].color = color2; array[1].time = 1f; GradientAlphaKey[] array2 = (GradientAlphaKey[])(object)new GradientAlphaKey[2]; array2[0].alpha = color1.a; array2[0].time = 0f; array2[1].alpha = color2.a; array2[1].time = 1f; val3.SetKeys(array, array2); ((TrailModule)(ref trails)).colorOverLifetime = new MinMaxGradient(val3); } } Light[] componentsInChildren3 = thingToColor.GetComponentsInChildren(); foreach (Light val4 in componentsInChildren3) { if (colorTemp > 0f) { val4.colorTemperature = colorTemp; val4.useColorTemperature = true; } else { val4.useColorTemperature = false; } val4.color = color1; Transform transform = ((Component)val4).transform; transform.localScale *= widthMult; } ParticleSystemRenderer[] componentsInChildren4 = thingToColor.GetComponentsInChildren(); foreach (ParticleSystemRenderer val5 in componentsInChildren4) { ((Renderer)val5).material.SetColor("_MainColor", color1); ((Renderer)val5).material.SetColor("_Color", color1); ((Renderer)val5).material.SetColor("_TintColor", color2); } if (colorMesh) { MeshRenderer[] componentsInChildren5 = thingToColor.GetComponentsInChildren(); foreach (MeshRenderer val6 in componentsInChildren5) { ((Renderer)val6).material.SetColor("_MainColor", color1); ((Renderer)val6).material.SetColor("_Color", color1); ((Renderer)val6).material.SetColor("_TintColor", color2); } } } internal static void AddEffectDef(EffectDef effectDef) { effectDefs.Add(effectDef); } internal static EffectDef CreateAndAddEffectDef(GameObject effectPrefab, bool donotPool = false) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown if (donotPool) { VFXAttributes val = effectPrefab.GetComponent(); if ((Object)(object)val == (Object)null) { val = effectPrefab.AddComponent(); } val.DoNotPool = true; } EffectDef val2 = new EffectDef(effectPrefab); AddEffectDef(val2); return val2; } internal static void CreateEffectFromObject(GameObject newEffect, string soundName, bool parentToTransform) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) newEffect.AddComponent().duration = 6f; newEffect.AddComponent(); if (!Object.op_Implicit((Object)(object)newEffect.GetComponent())) { newEffect.AddComponent().vfxPriority = (VFXPriority)2; } EffectComponent component = newEffect.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { component = newEffect.AddComponent(); component.applyScale = true; component.effectIndex = (EffectIndex)(-1); component.parentToReferencedTransform = parentToTransform; component.positionAtReferencedTransform = true; component.soundName = soundName; } CreateAndAddEffectDef(newEffect); } } public static class EnemiesPlusUtils { public static void ReorderSkillDrivers(this GameObject master, AISkillDriver targetSkill, int targetIdx) { AISkillDriver[] components = master.GetComponents(); master.ReorderSkillDrivers(components, Array.IndexOf(components, targetSkill), targetIdx); } public static void ReorderSkillDrivers(this GameObject master, AISkillDriver[] skills, int currentIdx, int targetIdx) { if (currentIdx < 0 || currentIdx >= skills.Length) { Log.Error($"{currentIdx} index not found or out of range. Must be less than {skills.Length}"); return; } string targetName = skills[currentIdx].customName; if (targetIdx < 0 || targetIdx >= skills.Length) { Log.Error($"Unable to reorder skilldriver {targetName} into position {targetIdx}. target must be less than {skills.Length}"); } else { if (targetIdx == currentIdx) { return; } Dictionary dictionary = skills.Where((AISkillDriver s) => (Object)(object)s.nextHighPriorityOverride != (Object)null).ToDictionary((AISkillDriver s) => s.customName, (AISkillDriver s) => s.nextHighPriorityOverride.customName); if (targetIdx > currentIdx) { master.AddComponentCopy(skills[currentIdx]); Object.DestroyImmediate((Object)(object)skills[currentIdx]); } for (int num = targetIdx; num < skills.Length; num++) { if (num != currentIdx) { master.AddComponentCopy(skills[num]); Object.DestroyImmediate((Object)(object)skills[num]); } } skills = master.GetComponents(); AISkillDriver val = ((IEnumerable)skills).FirstOrDefault((Func)((AISkillDriver s) => s.customName == targetName)); if (!dictionary.Any()) { return; } foreach (AISkillDriver val2 in skills) { string target = ""; if (val2.customName != null) { target = val2.customName; } if (Object.op_Implicit((Object)(object)val2) && dictionary.TryGetValue(val2.customName, out target)) { AISkillDriver val3 = ((IEnumerable)skills).FirstOrDefault((Func)((AISkillDriver s) => s.customName == target)); if (!((Object)(object)val3 == (Object)null)) { val2.nextHighPriorityOverride = val3; } } } } } public static T GetCopyOf(this Component comp, T other) where T : Component { Type type = ((object)comp).GetType(); if (type != ((object)other).GetType()) { return default(T); } BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; PropertyInfo[] properties = type.GetProperties(bindingAttr); PropertyInfo[] array = properties; foreach (PropertyInfo propertyInfo in array) { if (propertyInfo.CanWrite) { try { propertyInfo.SetValue(comp, propertyInfo.GetValue(other, null), null); } catch { } } } FieldInfo[] fields = type.GetFields(bindingAttr); FieldInfo[] array2 = fields; foreach (FieldInfo fieldInfo in array2) { fieldInfo.SetValue(comp, fieldInfo.GetValue(other)); } return (T)(object)((comp is T) ? comp : null); } public static T AddComponentCopy(this GameObject go, T toAdd) where T : Component { return ((Component)(object)go.AddComponent()).GetCopyOf(toAdd); } } public static class Projectiles { internal static GameObject auriBeam; public static GameObject baseBeam = Addressables.LoadAssetAsync((object)RoR2_Base_Titan.TitanRockProjectile_prefab).WaitForCompletion(); public static int totalOrbCount = 6; internal static List fsOrbList = new List(); public static GameObject baseOrb = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSonBoss.PrimeDevastatorProjectile_prefab).WaitForCompletion(); internal static List projectilePrefabs = new List(); internal static void RegisterProjectiles() { CreateAurelioniteBeam(); projectilePrefabs.Add(auriBeam); CreateDevastatorProjectiles(); for (int i = 0; i < fsOrbList.Count; i++) { projectilePrefabs.Add(fsOrbList[i]); } } private static void CreateDevastatorProjectiles() { //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < totalOrbCount; i++) { string text = $"fsOrb{i + 1}"; GameObject val = PrefabAPI.InstantiateClone(baseOrb, text, true); if (fsOrbList.Count <= i) { fsOrbList.Add(val); } else { fsOrbList[i] = val; } ProjectileOwnerOrbiter val2 = fsOrbList[i].GetComponent(); if ((Object)(object)val2 == (Object)null) { val2 = fsOrbList[i].AddComponent(); } float num = 65f / (float)totalOrbCount; float num2 = (float)totalOrbCount / (float)(i + 1); val2.radius = num2 + num * (float)(i + 1); val2.offset.y = 2f; val2.initialDegreesFromOwnerForward = 340f; val2.degreesPerSecond = 90f; DestroyOnTimer val3 = fsOrbList[i].GetComponent(); if ((Object)(object)val3 == (Object)null) { val3 = fsOrbList[i].AddComponent(); } val3.duration = 12f; PrimeDevastatorProjectileController component = fsOrbList[i].GetComponent(); if ((Object)(object)component != (Object)null) { } ProjectileDamage val4 = fsOrbList[i].GetComponent(); if ((Object)(object)val4 == (Object)null) { val4 = fsOrbList[i].AddComponent(); } DamageTypeCombo damageType = val4.damageType; DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.stormboundDevastatorCrystal); val4.damageType = damageType; } if (totalOrbCount > fsOrbList.Count) { Log.Warning("Orb List size is " + fsOrbList.Count + ", intended size was " + totalOrbCount + ". Readjusting intended size."); totalOrbCount = fsOrbList.Count; } } private static void CreateAurelioniteBeam() { auriBeam = PrefabAPI.InstantiateClone(baseBeam, "auriBeam", true); Rigidbody val = auriBeam.GetComponent(); if (!Object.op_Implicit((Object)(object)val)) { val = auriBeam.AddComponent(); } ProjectileImpactExplosion val2 = default(ProjectileImpactExplosion); if (auriBeam.TryGetComponent(ref val2)) { ((ProjectileExplosion)val2).blastRadius = 1.5f; ((ProjectileExplosion)val2).explosionEffect = null; val2.lifetimeExpiredSound = null; val2.lifetime = 3f; } ProjectileDirectionalTargetFinder val3 = default(ProjectileDirectionalTargetFinder); if (auriBeam.TryGetComponent(ref val3)) { Object.DestroyImmediate((Object)(object)val3); } ProjectileSteerTowardTarget val4 = default(ProjectileSteerTowardTarget); if (auriBeam.TryGetComponent(ref val4)) { Object.DestroyImmediate((Object)(object)val4); } ProjectileController component = auriBeam.GetComponent(); component.rigidbody = val; component.rigidbody.useGravity = false; component.rigidbody.mass = 1f; component.procCoefficient = 0.8f; component.startSound = ""; component.shouldPlaySounds = false; } private static void InitializeImpactExplosion(ProjectileImpactExplosion projectileImpactExplosion) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) ((ProjectileExplosion)projectileImpactExplosion).blastDamageCoefficient = 1f; ((ProjectileExplosion)projectileImpactExplosion).blastProcCoefficient = 1f; ((ProjectileExplosion)projectileImpactExplosion).blastRadius = 1f; ((ProjectileExplosion)projectileImpactExplosion).bonusBlastForce = Vector3.zero; ((ProjectileExplosion)projectileImpactExplosion).childrenCount = 0; ((ProjectileExplosion)projectileImpactExplosion).childrenDamageCoefficient = 0f; ((ProjectileExplosion)projectileImpactExplosion).childrenProjectilePrefab = null; projectileImpactExplosion.destroyOnEnemy = true; projectileImpactExplosion.destroyOnWorld = true; projectileImpactExplosion.detonateOnEnemy = true; projectileImpactExplosion.impactOnWorld = true; ((ProjectileExplosion)projectileImpactExplosion).falloffModel = (FalloffModel)0; ((ProjectileExplosion)projectileImpactExplosion).fireChildren = false; projectileImpactExplosion.lifetime = 0f; projectileImpactExplosion.lifetimeAfterImpact = 0f; projectileImpactExplosion.lifetimeRandomOffset = 0f; projectileImpactExplosion.offsetForLifetimeExpiredSound = 0f; projectileImpactExplosion.timerAfterImpact = false; ((Component)projectileImpactExplosion).GetComponent().damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1); } } public class Skills { public class AISkillDriverData { public GameObject masterPrefab; public string customName; public SkillSlot skillSlot; public float minDistance = 0f; public float maxDistance = float.PositiveInfinity; public int desiredIndex = 0; public float moveInputScale = 1f; public MovementType movementType; public AimType aimType; public TargetType targetType; public bool ignoreNodeGraph = false; public float maxHealthFraction = float.PositiveInfinity; public float minHealthFraction = float.NegativeInfinity; public float maxTargetHealthFraction = float.PositiveInfinity; public float minTargetHealthFraction = float.NegativeInfinity; public bool requireReady = false; public SkillDef requiredSkillDef = null; public bool activationRequiresAimTargetLoS = false; public bool activationRequiresAimConfirmation = false; public bool activationRequiresTargetLoS = false; public bool selectionRequiresAimTarget = false; public bool selectionRequiresOnGround = false; public bool selectionRequiresTargetLoS = false; public bool selectionRequiresTargetNonFlier = false; public int maxTimesSelected = -1; public float driverUpdateTimerOverride = -1f; public bool noRepeat = false; public AISkillDriver nextHighPriorityOverride = null; public bool shouldSprint = false; public float aimVectorMaxSpeedOverride = -1f; public ButtonPressType buttonPressType = (ButtonPressType)0; } public static AISkillDriver CreateAISkillDriver(AISkillDriverData data) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) if (data == null || (Object)(object)data.masterPrefab == (Object)null) { Log.Error("Could not create AISkillDriver"); return null; } AISkillDriver val = data.masterPrefab.AddComponent(); val.customName = data.customName; val.skillSlot = data.skillSlot; val.minDistance = data.minDistance; val.maxDistance = data.maxDistance; val.moveInputScale = data.moveInputScale; val.movementType = data.movementType; val.aimType = data.aimType; val.moveTargetType = data.targetType; val.ignoreNodeGraph = data.ignoreNodeGraph; val.maxUserHealthFraction = data.maxHealthFraction; val.minUserHealthFraction = data.minHealthFraction; val.maxTargetHealthFraction = data.maxTargetHealthFraction; val.minTargetHealthFraction = data.minTargetHealthFraction; val.requireSkillReady = data.requireReady; val.requiredSkill = data.requiredSkillDef; val.activationRequiresAimConfirmation = data.activationRequiresAimConfirmation; val.activationRequiresAimTargetLoS = data.activationRequiresAimTargetLoS; val.activationRequiresTargetLoS = data.activationRequiresTargetLoS; val.selectionRequiresAimTarget = data.selectionRequiresAimTarget; val.selectionRequiresOnGround = data.selectionRequiresOnGround; val.selectionRequiresTargetLoS = data.selectionRequiresTargetLoS; val.selectionRequiresTargetNonFlier = data.selectionRequiresTargetNonFlier; val.maxTimesSelected = data.maxTimesSelected; val.driverUpdateTimerOverride = data.driverUpdateTimerOverride; val.noRepeat = data.noRepeat; val.nextHighPriorityOverride = data.nextHighPriorityOverride; val.shouldSprint = data.shouldSprint; val.aimVectorMaxSpeedOverride = data.aimVectorMaxSpeedOverride; val.buttonPressType = data.buttonPressType; data.masterPrefab.ReorderSkillDrivers(val, data.desiredIndex); return val; } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public string identifier => "com.Bloonjitsu7.BloonModpackBaseMod"; public void Initialize() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown Effects.RegisterEffects(); States.RegisterStates(); Projectiles.RegisterProjectiles(); ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; contentPack.effectDefs.Add(Effects.effectDefs.ToArray()); contentPack.entityStateTypes.Add(States.entityStates.ToArray()); contentPack.projectilePrefabs.Add(Projectiles.projectilePrefabs.ToArray()); contentPack.buffDefs.Add(Buffs.buffDefs.ToArray()); args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } } namespace StormboundFalseSon.Changes { public class Main { public static float baseStrikeSpeed = 1.2f; public static float strikeSpeed; public static int scalingLevel = 0; public static float scalingMult = 0.2f; public static int currentPhase = 0; private CoreChanges coreChanges; private FalseSonChanges falseSonChanges; private LaserChanges laserChanges; private GeodeChanges geodeChanges; private AurelioniteChanges aurelioniteChanges; private GildedCoastChanges gildedCoastChanges; private VoidFieldsChanges voidFieldsChanges; public List lightningPoints; public BullseyeSearch enemyFinder = new BullseyeSearch(); public static DotIndex devastatorDotIndex; private static GameObject laserPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Titan.LaserTitanGold_prefab).WaitForCompletion(); public static bool hardMode = false; private static GameObject fs1BodyPrefab = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSonBoss.FalseSonBossBody_prefab).WaitForCompletion(); private static GameObject fs2BodyPrefab = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSonBoss.FalseSonBossBodyLunarShard_prefab).WaitForCompletion(); private static GameObject fs3BodyPrefab = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSonBoss.FalseSonBossBodyBrokenLunarShard_prefab).WaitForCompletion(); private static GameObject fs1MasterPrefab = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSonBoss.FalseSonBossMaster_prefab).WaitForCompletion(); private static GameObject fs2MasterPrefab = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSonBoss.FalseSonBossLunarShardMaster_prefab).WaitForCompletion(); private static GameObject fs3MasterPrefab = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSonBoss.FalseSonBossLunarShardBrokenMaster_prefab).WaitForCompletion(); public AISkillDriver fs2pillarDriver; public static BuffDef StormboundDevastatorDebuff; public static BuffDef LaserTargetDebuff; public static BuffDef LaserGoldDebuff; public static BuffDef LaserCrystalDebuff; public static BuffDef DamageCapBuff; public static BuffDef AuriArmorBuff; public static BuffDef GeodeStatBuff; public static BuffDef GeodeStatBuffCooldown; private static Sprite crystalIcon = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSon.texEnergizedCoreBuffIcon_png).WaitForCompletion(); private static Sprite auriIcon = Addressables.LoadAssetAsync((object)RoR2_DLC2_Elites_EliteAurelionite.texBuffAurelioniteBlessingIcon_png).WaitForCompletion(); private static Sprite targetIcon = Addressables.LoadAssetAsync((object)RoR2_Base_Grandparent.texBuffOverheat_tif).WaitForCompletion(); private static Sprite oldIcon = Addressables.LoadAssetAsync((object)RoR2_Base_Merc.texBuffMercExposeIcon_tif).WaitForCompletion(); private static Sprite devastatorIcon = Addressables.LoadAssetAsync((object)RoR2_Base_ShockNearby.texBuffTeslaIcon_tif).WaitForCompletion(); private static Sprite geodeIcon = Addressables.LoadAssetAsync((object)RoR2_Base_Croco.texBuffRegenBoostIcon_tif).WaitForCompletion(); internal static bool HasHalcyonKnight => Chainloader.PluginInfos.ContainsKey("Onyx.HalcyonKnight"); public static ConfigEntry halcyonStages { get; set; } public static ConfigEntry laserEnable { get; set; } public static ConfigEntry geodeEnable { get; set; } public static ConfigEntry knightEnable { get; set; } public static ConfigEntry auriEnable { get; set; } public static ConfigEntry coastEnable { get; set; } public void SetupConfig(ConfigFile cfg) { halcyonStages = cfg.Bind("Halcyon Shrines", "Guaranteed Spawns", "village,habitat,helminthroost,hollowsummit_wormsworms,hollowsummitnight_wormsworms", "List of stages to get a guaranteed Halcyon Shrine. Does not allow for more than one Halcyon Shrine to spawn per stage, and still uses up scene director credits. Shattered Abodes, Treeborn Colony, Helminth Hatchery, Hollow Summit, and Frozen Summit are selected by default (Hollow/Frozen Summit mod is not required). Stages are separated by commas with no spaces inbetween."); laserEnable = cfg.Bind("False Son - Lunar Gaze (Phase 2/3 Utility)", "Enable Laser Changes", true, "Enables the changes to the lunar gaze laser."); geodeEnable = cfg.Bind("False Son - Geode Mechanics", "Enable Changes", true, "Enables the changes to the geode mechanics during the False Son fight."); knightEnable = cfg.Bind("False Son - Geode Mechanics", "HalcyonKnight Compatibility", true, "Significantly reduces the stat bonuses granted to Halcyonite during the False Son fight if HalcyonKnight is installed."); auriEnable = cfg.Bind("Aurelionite - General Changes", "Enable Changes", true, "Enables the changes to Aurelionite."); coastEnable = cfg.Bind("Aurelionite - Gilded Coast Mechanics", "Enable Changes", true, "Enables the changes to the Gilded Coast mechanics."); } public void Initialize() { //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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown CreateBuffs(); SetupAIFixes(); devastatorDotIndex = DotAPI.RegisterDotDef(1f, 0.1f, (DamageColorIndex)16, StormboundDevastatorDebuff, (CustomDotBehaviour)null, (CustomDotVisual)null); CharacterBody.UpdateAllTemporaryVisualEffects += new Manipulator(IL_UpdateVisualEffect); coreChanges = new CoreChanges(); coreChanges.Initialize(); falseSonChanges = new FalseSonChanges(); falseSonChanges.Initialize(); if (laserEnable.Value) { laserChanges = new LaserChanges(); laserChanges.Initialize(); } if (geodeEnable.Value) { geodeChanges = new GeodeChanges(); geodeChanges.Initialize(); } if (auriEnable.Value) { aurelioniteChanges = new AurelioniteChanges(); aurelioniteChanges.Initialize(); } if (coastEnable.Value) { gildedCoastChanges = new GildedCoastChanges(); gildedCoastChanges.Initialize(); } voidFieldsChanges = new VoidFieldsChanges(); voidFieldsChanges.Initialize(); } private void SetupAIFixes() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_06dd: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_06f5: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_07f0: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_0800: Unknown result type (might be due to invalid IL or missing references) //IL_077b: Unknown result type (might be due to invalid IL or missing references) //IL_0780: Unknown result type (might be due to invalid IL or missing references) //IL_0788: Unknown result type (might be due to invalid IL or missing references) //IL_078d: Unknown result type (might be due to invalid IL or missing references) //IL_0795: Unknown result type (might be due to invalid IL or missing references) //IL_079a: Unknown result type (might be due to invalid IL or missing references) Skills.AISkillDriverData data = new Skills.AISkillDriverData { masterPrefab = fs2MasterPrefab, customName = "moveAroundPillars", skillSlot = (SkillSlot)0, requireReady = false, maxDistance = 40f, targetType = (TargetType)3, movementType = (MovementType)0, aimType = (AimType)1, shouldSprint = true, desiredIndex = 7, driverUpdateTimerOverride = -1f }; Skills.CreateAISkillDriver(data); Skills.AISkillDriverData data2 = new Skills.AISkillDriverData { masterPrefab = fs3MasterPrefab, customName = "moveAroundPillars", skillSlot = (SkillSlot)0, requireReady = false, maxDistance = 40f, targetType = (TargetType)3, movementType = (MovementType)0, aimType = (AimType)1, shouldSprint = true, desiredIndex = 7, driverUpdateTimerOverride = -1f }; Skills.CreateAISkillDriver(data2); AISkillDriver val = null; AISkillDriver[] components = fs1MasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val2 in array) { string customName = val2.customName; Log.Debug("False Son p1 " + customName); if (customName == "FissureSlam") { val2.minDistance = 0f; val2.maxDistance = 30f; val2.ignoreNodeGraph = true; val2.activationRequiresTargetLoS = false; } if (customName == "TaintedOffering") { val2.minDistance = 30f; } if (customName == "Corrupted Paths (Step Brothers)") { val = val2; Log.Debug("maxDistance: " + val2.maxDistance); Log.Debug("minDistance: " + val2.minDistance); Log.Debug("movementType: " + ((object)Unsafe.As(ref val2.movementType)/*cast due to .constrained prefix*/).ToString()); Log.Debug("aimType: " + ((object)Unsafe.As(ref val2.aimType)/*cast due to .constrained prefix*/).ToString()); Log.Debug("moveTargetType: " + ((object)Unsafe.As(ref val2.moveTargetType)/*cast due to .constrained prefix*/).ToString()); Log.Debug("aimVectorMaxSpeedOverride: " + val2.aimVectorMaxSpeedOverride); Log.Debug("aimVectorDampTimeOverride: " + val2.aimVectorDampTimeOverride); } } AISkillDriver[] components2 = fs2MasterPrefab.GetComponents(); AISkillDriver[] array2 = components2; foreach (AISkillDriver val3 in array2) { string customName2 = val3.customName; Log.Debug("False Son p2 " + customName2); if (customName2 == "FissureSlam") { val3.minDistance = 0f; val3.maxDistance = 40f; val3.ignoreNodeGraph = true; val3.activationRequiresTargetLoS = false; val3.selectionRequiresTargetLoS = false; val3.movementType = (MovementType)1; val3.shouldSprint = true; } if (customName2 == "Follow Last Known Target") { Log.Debug("maxDistance: " + val3.maxDistance); Log.Debug("minDistance: " + val3.minDistance); Log.Debug("movementType: " + ((object)Unsafe.As(ref val3.movementType)/*cast due to .constrained prefix*/).ToString()); Log.Debug("aimType: " + ((object)Unsafe.As(ref val3.aimType)/*cast due to .constrained prefix*/).ToString()); Log.Debug("moveTargetType: " + ((object)Unsafe.As(ref val3.moveTargetType)/*cast due to .constrained prefix*/).ToString()); Log.Debug("aimVectorMaxSpeedOverride: " + val3.aimVectorMaxSpeedOverride); Log.Debug("aimVectorDampTimeOverride: " + val3.aimVectorDampTimeOverride); val3.moveTargetType = (TargetType)3; val3.aimType = (AimType)1; val3.shouldSprint = true; val3.movementType = (MovementType)1; val3.ignoreNodeGraph = true; val3.resetCurrentEnemyOnNextDriverSelection = false; val3.activationRequiresTargetLoS = false; } if (customName2 == "SwatAwayPlayers") { if ((Object)(object)val != (Object)null && hardMode) { val3.maxDistance = val.maxDistance; val3.minDistance = val.minDistance; val3.activationRequiresTargetLoS = val.activationRequiresTargetLoS; val3.activationRequiresAimTargetLoS = val.activationRequiresAimTargetLoS; val3.aimType = val.aimType; val3.movementType = val.movementType; val3.moveTargetType = val.moveTargetType; val3.aimVectorMaxSpeedOverride = val.aimVectorMaxSpeedOverride; val3.aimVectorDampTimeOverride = val.aimVectorDampTimeOverride; val3.selectionRequiresTargetLoS = false; } else { val3.maxDistance = 120f; val3.minDistance = 0f; val3.activationRequiresTargetLoS = false; val3.activationRequiresAimTargetLoS = false; val3.aimType = (AimType)2; val3.movementType = (MovementType)0; val3.moveTargetType = (TargetType)0; val3.selectionRequiresTargetLoS = false; } } if (customName2 == "Corrupted Paths (Step Brothers)") { val3.maxDistance = 0f; val3.minDistance = 0f; } } AISkillDriver[] components3 = fs3MasterPrefab.GetComponents(); AISkillDriver[] array3 = components3; foreach (AISkillDriver val4 in array3) { string customName3 = val4.customName; Log.Debug("False Son p3 " + customName3); if (customName3 == "FissureSlam") { val4.minDistance = 0f; val4.maxDistance = 40f; val4.ignoreNodeGraph = true; val4.activationRequiresTargetLoS = false; val4.selectionRequiresTargetLoS = false; val4.movementType = (MovementType)1; val4.shouldSprint = true; } if (customName3 == "Follow Last Known Target") { Log.Debug("maxDistance: " + val4.maxDistance); Log.Debug("minDistance: " + val4.minDistance); Log.Debug("movementType: " + ((object)Unsafe.As(ref val4.movementType)/*cast due to .constrained prefix*/).ToString()); Log.Debug("aimType: " + ((object)Unsafe.As(ref val4.aimType)/*cast due to .constrained prefix*/).ToString()); Log.Debug("moveTargetType: " + ((object)Unsafe.As(ref val4.moveTargetType)/*cast due to .constrained prefix*/).ToString()); Log.Debug("aimVectorMaxSpeedOverride: " + val4.aimVectorMaxSpeedOverride); Log.Debug("aimVectorDampTimeOverride: " + val4.aimVectorDampTimeOverride); val4.moveTargetType = (TargetType)3; val4.aimType = (AimType)1; val4.shouldSprint = true; val4.movementType = (MovementType)1; val4.ignoreNodeGraph = true; val4.resetCurrentEnemyOnNextDriverSelection = false; val4.activationRequiresTargetLoS = false; } if (customName3 == "SwatAwayPlayers") { if ((Object)(object)val != (Object)null && hardMode) { val4.maxDistance = val.maxDistance; val4.minDistance = val.minDistance; val4.activationRequiresTargetLoS = val.activationRequiresTargetLoS; val4.activationRequiresAimTargetLoS = val.activationRequiresAimTargetLoS; val4.aimType = val.aimType; val4.movementType = val.movementType; val4.moveTargetType = val.moveTargetType; val4.aimVectorMaxSpeedOverride = val.aimVectorMaxSpeedOverride; val4.aimVectorDampTimeOverride = val.aimVectorDampTimeOverride; val4.selectionRequiresTargetLoS = false; } else { val4.maxDistance = 120f; val4.minDistance = 0f; val4.activationRequiresTargetLoS = false; val4.activationRequiresAimTargetLoS = false; val4.aimType = (AimType)2; val4.movementType = (MovementType)0; val4.moveTargetType = (TargetType)0; val4.selectionRequiresTargetLoS = false; } } } fs1MasterPrefab.GetComponent().aimVectorMaxSpeed = 360f; fs1MasterPrefab.GetComponent().aimVectorMaxSpeed = 360f; } private void CreateBuffs() { //IL_001a: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) StormboundDevastatorDebuff = Buffs.AddNewBuff("BloonStormboundDevastatorDebuff", devastatorIcon, new Color(1f, 0.5f, 0f), canStack: false, isDebuff: true, isCooldown: false, isHidden: false, ignoreNectar: true); LaserTargetDebuff = Buffs.AddNewBuff("BloonLaserTargetDebuff", targetIcon, new Color(1f, 0.5f, 0f), canStack: true, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: true); LaserCrystalDebuff = Buffs.AddNewBuff("BloonLaserCrystalDebuff", crystalIcon, Color.white, canStack: true, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: true); LaserGoldDebuff = Buffs.AddNewBuff("BloonLaserGoldDebuff", Addressables.LoadAssetAsync((object)"RoR2/Base/CritOnUse/texBuffFullCritIcon.tif").WaitForCompletion(), Color.yellow, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreNectar: true); DamageCapBuff = Buffs.AddNewBuff("BloonDamageCapBuff", Addressables.LoadAssetAsync((object)"RoR2/Base/CritOnUse/texBuffFullCritIcon.tif").WaitForCompletion(), Color.yellow, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreNectar: true); AuriArmorBuff = Buffs.AddNewBuff("BloonAuriArmorBuff", auriIcon, Color.white, canStack: true, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: false); GeodeStatBuff = Buffs.AddNewBuff("BloonGeodeStatBuff", geodeIcon, Color.yellow, canStack: false, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: true); GeodeStatBuffCooldown = Buffs.AddNewBuff("BloonGeodeStatBuffCooldown", geodeIcon, Color.yellow, canStack: false, isDebuff: false, isCooldown: true, isHidden: true, ignoreNectar: true); } public void IL_UpdateVisualEffect(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "TeslaField"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "HasBuff") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((CharacterBody self) => self.HasBuff(StormboundDevastatorDebuff))); val.Emit(OpCodes.Or); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } if (val.TryGotoNext(val3, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "ShockDamageEnergized"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "HasBuff") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((CharacterBody self) => self.HasBuff(StormboundDevastatorDebuff))); val.Emit(OpCodes.Or); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } public static void SetAlpha(GameObject thingToColor, float alpha) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_0169: Unknown result type (might be due to invalid IL or missing references) LineRenderer[] componentsInChildren = thingToColor.GetComponentsInChildren(); foreach (LineRenderer val in componentsInChildren) { Color startColor = val.startColor; startColor.a = alpha; val.startColor = startColor; Color endColor = val.endColor; endColor.a = alpha; val.endColor = endColor; } ParticleSystem[] componentsInChildren2 = thingToColor.GetComponentsInChildren(); foreach (ParticleSystem val2 in componentsInChildren2) { MainModule main = val2.main; MinMaxGradient startColor2 = ((MainModule)(ref main)).startColor; Color colorMin = ((MinMaxGradient)(ref startColor2)).colorMin; colorMin.a = alpha; ((MainModule)(ref main)).startColor = new MinMaxGradient(colorMin); TrailModule trails = val2.trails; if (((TrailModule)(ref trails)).enabled) { MinMaxGradient colorOverLifetime = ((TrailModule)(ref trails)).colorOverLifetime; Color colorMin2 = ((MinMaxGradient)(ref colorOverLifetime)).colorMin; colorMin2.a = alpha; ((TrailModule)(ref trails)).colorOverLifetime = new MinMaxGradient(colorMin2); } } Light[] componentsInChildren3 = thingToColor.GetComponentsInChildren(); foreach (Light val3 in componentsInChildren3) { Color color = val3.color; color.a = alpha; } ParticleSystemRenderer[] componentsInChildren4 = thingToColor.GetComponentsInChildren(); foreach (ParticleSystemRenderer val4 in componentsInChildren4) { _ = ((Renderer)val4).material.color; if (true) { Color color2 = ((Renderer)val4).material.color; color2.a = alpha; ((Renderer)val4).material.color = color2; } } } } public class CoreChanges { public float phase1StrikeInterval = 3.5f; public float phase2StrikeInterval = 5.5f; public float phase3StrikeInterval = 6f; public float phase1AmbientStrikeSpeed = 2f; public float phase2AmbientStrikeSpeed = 1.5f; public float phase3AmbientStrikeSpeed = 1.2f; public static GameObject devastatorEffect = Addressables.LoadAssetAsync((object)RoR2_DLC2_Elites_EliteBead.EliteBeadCrystalExplosionVFX_prefab).WaitForCompletion(); public static GameObject lightningWarningEffect; public static InteractableSpawnCard colossusPortalCard = Addressables.LoadAssetAsync((object)RoR2_DLC2.iscColossusPortal_asset).WaitForCompletion(); public static GameObject textureFinder = Addressables.LoadAssetAsync((object)RoR2_DLC2_meridian_Assets.PMRingMiddle1_prefab).WaitForCompletion(); public static Material meridianMat = Addressables.LoadAssetAsync((object)RoR2_DLC2_meridian_Assets.matPMTerrainPlayZoneWall_mat).WaitForCompletion(); public static GameObject fsPillar = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_Base_dampcavesimple.DCPebbleCrystal_prefab).WaitForCompletion(), "StormboundFSPillarPrefab", false); public SpawnCard lemSpawnCard = Addressables.LoadAssetAsync((object)RoR2_Base_Lemurian.cscLemurian_asset).WaitForCompletion(); public void Initialize() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Expected O, but got Unknown //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown MeshRenderer component = fsPillar.GetComponent(); ((Renderer)component).material = meridianMat; HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(OnTakeDamage); GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; HealthComponent.TakeDamageProcess += new Manipulator(IL_TakeDamageProcess); Run.onRunStartGlobal += Run_onRunStartGlobal; Run.onRunDestroyGlobal += Run_onRunDestroyGlobal; GlobalEventManager.ProcessHitEnemy += new Manipulator(LunarRuinDotFix); FrozenState.OnEnter += new hook_OnEnter(OnFrozenStateEnter); FSBFPhaseBaseState.FixedUpdate += new hook_FixedUpdate(OnFSBFPhaseUpdate); Phase1.OnEnter += new hook_OnEnter(OnPhase1Enter); Phase1.FixedUpdate += new hook_FixedUpdate(OnPhase1Update); Phase2.OnEnter += new hook_OnEnter(OnPhase2Enter); Phase3.OnEnter += new hook_OnEnter(OnPhase3Enter); Phase3.OnBossGroupDefeated += new hook_OnBossGroupDefeated(OnPhase3Finish); MeridianEventTriggerInteraction.HandleFSBFPhase2State += new hook_HandleFSBFPhase2State(OnPhase2State); LightningStrikeInstance.HandleWarning += new hook_HandleWarning(OnHandleWarning); SceneDirector.PopulateScene += new hook_PopulateScene(OnPopulateScene); SceneDirector.GenerateInteractableCardSelection += new hook_GenerateInteractableCardSelection(OnGenerateInteractableCardSelection); HalcyoniteShrineInteractable.Awake += new hook_Awake(OnHalcyoniteShrineAwake); SkyJumpDeathState.GiveColossusItem += new Manipulator(IL_GiveColossusItem); } private void OnTakeDamage(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo info) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) bool flag = false; bool flag2 = true; if (Object.op_Implicit((Object)(object)self.body) && self.body.baseNameToken.Contains("LUNARRAINSHARD")) { flag = true; } if ((DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLightning) || DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLunarRuin)) && Object.op_Implicit((Object)(object)self.body) && !flag) { self.body.AddTimedBuff(Buffs.lunarruin, 420f); } if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLunarRuin) && Object.op_Implicit((Object)(object)self.body) && flag) { info.damage = 0f; } if (DamageAPI.HasModdedDamageType(info, DamageTypes.aurelioniteLaser) && Object.op_Implicit((Object)(object)self.body)) { if (flag) { info.damage *= 0.1f; } else if (self.body.HasBuff(Main.LaserGoldDebuff)) { info.damage = 0f; } else { self.body.AddTimedBuff(Main.LaserGoldDebuff, 0.5f); } } if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLightning) && Object.op_Implicit((Object)(object)self.body)) { float num = 0.125f * (1f + (float)Main.scalingLevel * Main.scalingMult); info.damage = self.fullCombinedHealth * num; } if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLaserCrystal)) { if (flag) { if (self.body.GetBuffCount(Main.LaserCrystalDebuff) >= 5) { info.damage = self.fullCombinedHealth * 2f; } else { info.damage = 0f; } self.body.AddTimedBuff(Main.LaserCrystalDebuff, 50f, 5); self.dontShowHealthbar = false; } else { info.damage = 0f; info.rejected = true; flag2 = false; } } if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundDevastatorCrystal)) { if (flag) { self.body.AddTimedBuff(Main.LaserCrystalDebuff, 50f, 5); self.body.AddTimedBuff(Main.LaserCrystalDebuff, 50f, 5); self.body.AddTimedBuff(Main.LaserCrystalDebuff, 50f, 5); self.body.AddTimedBuff(Main.LaserCrystalDebuff, 50f, 5); self.body.AddTimedBuff(Main.LaserCrystalDebuff, 50f, 5); self.dontShowHealthbar = false; } else { self.body.AddTimedBuff(Buffs.lunarruin, 420f); self.body.AddTimedBuff(Buffs.lunarruin, 420f); } } if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLaser) && Object.op_Implicit((Object)(object)self.body)) { if (!flag) { self.body.AddTimedBuff(Main.LaserTargetDebuff, 2f, 10); self.body.AddTimedBuff(Buffs.lunarruin, 420f); if (Main.currentPhase == 3) { self.body.AddTimedBuff(Buffs.lunarruin, 420f); } } else { info.damage = 0f; } } if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLaserTargeting) && Object.op_Implicit((Object)(object)self.body)) { if (!flag) { self.body.AddTimedBuff(Main.LaserTargetDebuff, 2f, 10); } info.damage = 0f; info.rejected = true; flag2 = false; } if (flag2) { orig.Invoke(self, info); } } private void GlobalEventManager_onServerDamageDealt(DamageReport report) { //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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown HealthComponent victim = report.victim; CharacterBody attackerBody = report.attackerBody; if (report.dotType == Main.devastatorDotIndex && (Object)(object)victim != (Object)null) { victim.body.AddTimedBuff(Buffs.lunarruin, 420f); Util.PlaySound("Play_item_use_BFG_zaps", ((Component)victim).gameObject); EffectData val = new EffectData { origin = report.victimBody.footPosition, scale = 0.25f, rootObject = ((Component)report.victim).gameObject }; EffectManager.SpawnEffect(devastatorEffect, val, true); } } public void IL_TakeDamageProcess(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; float num = default(float); if (val.TryGotoNext(val3, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(HealthComponent), "adaptiveArmorValue"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 400f) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((HealthComponent self) => 1f + ((float)self.itemCounts.adaptiveArmor - 1f) * 0.25f)); val.Emit(OpCodes.Mul); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } int loc1 = -1; if (val.TryGotoNext(val3, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc1) })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc, loc1); val.EmitDelegate>((Func)delegate(HealthComponent self, float damage) { num = self.fullCombinedHealth * 0.15f; if (self.body.HasBuff(Main.DamageCapBuff) && damage >= num) { float num2 = damage - num; num2 *= 0.5f; damage = num + num2; } return damage; }); val.Emit(OpCodes.Stloc, loc1); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } private void OnMeridianStart(orig_Start orig, MeridianEventTriggerInteraction self) { for (int i = 0; i < ClassicStageInfo.instance.monsterSelection.Count; i++) { } orig.Invoke(self); } private void OnPhase2State(orig_HandleFSBFPhase2State orig, MeridianEventTriggerInteraction self) { orig.Invoke(self); self.phase2CombatDirector.SetActive(false); } private void OnSwapColumns(orig_SwapArenaColumns orig, MeridianEventTriggerInteraction self) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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) orig.Invoke(self); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(58.62f, 150.16f, -103.93f); Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(60f, 280f, 180f); GameObject val3 = Object.Instantiate(fsPillar, val, Quaternion.Euler(val2)); val3.transform.eulerAngles = val2; } private void Run_onRunStartGlobal(Run obj) { //IL_0007: 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_0053: Invalid comparison between Unknown and I4 Log.Debug($"{obj.selectedDifficulty} {(object)(DifficultyIndex)9}"); SkillDef skillDef = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("PrimeDevastator")); if ((Object)(object)skillDef != (Object)null) { skillDef.baseRechargeInterval = 60f; } if ((int)obj.selectedDifficulty >= 9) { SkillDef skillDef2 = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("LunarGazePlus")); SkillDef val = SkillCatalog.allSkillDefs.FirstOrDefault((Func)((SkillDef skill) => skill.skillName == "Laser" && skill.baseRechargeInterval == 35f)); if ((Object)(object)skillDef == (Object)null || (Object)(object)skillDef2 == (Object)null || (Object)(object)val == (Object)null) { Log.Error($"One or more SkillDefs could not be found! Check skill names. {skillDef} | {skillDef2} | {val}"); return; } skillDef.baseRechargeInterval *= 1.5f; skillDef2.baseRechargeInterval *= 1.5f; val.baseRechargeInterval *= 1.5f; Log.Debug($"Devestator Skill Cooldown: {skillDef.baseRechargeInterval}"); Log.Debug($"Lunar Gaze Plus Skill Cooldown: {skillDef2.baseRechargeInterval}"); Log.Debug($"Lunar Gaze Skill Cooldown: {val.baseRechargeInterval}"); } } private void Run_onRunDestroyGlobal(Run obj) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Invalid comparison between Unknown and I4 SkillDef skillDef = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("PrimeDevastator")); if ((int)obj.selectedDifficulty >= 9) { SkillDef skillDef2 = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("LunarGazePlus")); SkillDef val = SkillCatalog.allSkillDefs.FirstOrDefault((Func)((SkillDef skill) => skill.skillName == "Laser" && skill.baseRechargeInterval == 52.5f)); if ((Object)(object)skillDef == (Object)null || (Object)(object)skillDef2 == (Object)null || (Object)(object)val == (Object)null) { Log.Error($"One or more SkillDefs could not be found! Check skill names. {skillDef} | {skillDef2} | {val}"); return; } skillDef.baseRechargeInterval /= 1.5f; skillDef2.baseRechargeInterval /= 1.5f; val.baseRechargeInterval /= 1.5f; Log.Debug($"Devestator Skill Cooldown: {skillDef.baseRechargeInterval}"); Log.Debug($"Lunar Gaze Plus Skill Cooldown: {skillDef2.baseRechargeInterval}"); Log.Debug($"Lunar Gaze Skill Cooldown: {val.baseRechargeInterval}"); } } public void OnHandleWarning(orig_HandleWarning orig, LightningStrikeInstance self) { orig.Invoke(self); float delay = Mathf.Max(self.workingImpactDelay / 2f, self.workingImpactDelay - 0.75f); ((MonoBehaviour)self).StartCoroutine(HandleSecondaryWarning(self, delay)); } public IEnumerator HandleSecondaryWarning(LightningStrikeInstance self, float delay) { yield return (object)new WaitForSeconds(delay); EffectManager.SpawnEffect(lightningWarningEffect, new EffectData { origin = self.impactPosition, scale = self.blastRadius, genericFloat = self.workingImpactDelay - delay }, true); } public void OnFSBFPhaseUpdate(orig_FixedUpdate orig, FSBFPhaseBaseState self) { ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime(); if ((Object)(object)self.phaseBossGroup != (Object)null) { self.phaseBossGroup.shouldDisplayHealthBarOnHud = ((FixedTimeStamp)(ref self.healthBarShowTime)).hasPassed; } if (!self.hasSpawned && FSBFPhaseBaseState.readyToSpawnNextBossBody && ((EntityState)self).fixedAge > self.durationBeforeEnablingCombatEncounter) { self.BeginEncounter(); } else if (self.hasSpawned && FSBFPhaseBaseState.readyToSpawnNextBossBody && !self.spawnedNextState && ((EntityState)self).fixedAge > 2f + self.durationBeforeEnablingCombatEncounter && Object.op_Implicit((Object)(object)self.phaseScriptedCombatEncounter) && self.phaseScriptedCombatEncounter.combatSquad.memberCount == 0) { FSBFPhaseBaseState.endStateDelayTimer -= Time.deltaTime; if (FSBFPhaseBaseState.endStateDelayTimer < 0f) { self.spawnedNextState = true; ((EntityState)self).outer.SetNextState(self.nextState); } } if (((EntityState)self).fixedAge > self.durationBeforeEnablingCombatEncounter) { self.ApplyDebuffToMinions(); } } public void OnPhase1Enter(orig_OnEnter orig, Phase1 self) { orig.Invoke(self); if (NetworkServer.active) { foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (!((Object)(object)instance == (Object)null)) { CharacterBody body = instance.master.GetBody(); if (!((Object)(object)body == (Object)null)) { Util.CleanseBody(body, true, false, false, true, false, false); } } } } if (Object.op_Implicit((Object)(object)Run.instance) && Run.instance.stageClearCount >= 5) { if (Run.instance.stageClearCount >= 10) { Main.scalingLevel = 3; } else if (Run.instance.stageClearCount >= 8) { Main.scalingLevel = 2; } else { Main.scalingLevel = 1; } } else { Main.scalingLevel = 0; } Main.strikeSpeed = Main.baseStrikeSpeed / (1f + Main.scalingMult * (float)Main.scalingLevel); } public void OnPhase1Update(orig_FixedUpdate orig, Phase1 self) { orig.Invoke(self); if (Main.currentPhase != 1 && ((EntityState)self).fixedAge > ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.additionalEntryVFXDelay + ((FSBFPhaseBaseState)self).durationBeforeEnablingCombatEncounter + 4f) { Main.currentPhase = 1; if (Main.hardMode) { ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.frequencyOfLightningStrikes = phase1StrikeInterval; ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.delayBeforeExpiringAPreviousStrikePoint = phase1StrikeInterval; ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.lightningWarningDuration = phase1AmbientStrikeSpeed; LightningStormController.SetStormStrikePattern(((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern); LightningStormController.SetStormActive(true); } } } public void OnPhase2Enter(orig_OnEnter orig, Phase2 self) { orig.Invoke(self); ((FSBFPhaseBaseState)self).durationBeforeEnablingCombatEncounter = 0f; ((FSBFPhaseBaseState)self).durationBeforeRingsSpawn = 0.5f; Main.currentPhase = 2; if (Main.hardMode) { ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.frequencyOfLightningStrikes = phase2StrikeInterval; ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.delayBeforeExpiringAPreviousStrikePoint = phase2StrikeInterval; ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.lightningWarningDuration = phase2AmbientStrikeSpeed; LightningStormController.SetStormStrikePattern(((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern); LightningStormController.SetStormActive(true); } } public void OnPhase3Enter(orig_OnEnter orig, Phase3 self) { orig.Invoke(self); Main.currentPhase = 3; ((FSBFPhaseBaseState)self).durationBeforeEnablingCombatEncounter = 0f; ((FSBFPhaseBaseState)self).durationBeforeRingsSpawn = 0.5f; if (Main.hardMode) { ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.frequencyOfLightningStrikes = phase3StrikeInterval; ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.delayBeforeExpiringAPreviousStrikePoint = phase3StrikeInterval; ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.lightningWarningDuration = phase3AmbientStrikeSpeed; LightningStormController.SetStormStrikePattern(((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern); LightningStormController.SetStormActive(true); } LightningStormController.SetStormActive(false); } public void OnPhase3Finish(orig_OnBossGroupDefeated orig, Phase3 self, BossGroup bossGroup) { orig.Invoke(self, bossGroup); if (!NetworkServer.active) { return; } foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (!((Object)(object)instance == (Object)null)) { CharacterBody body = instance.master.GetBody(); if (!((Object)(object)body == (Object)null)) { Util.CleanseBody(body, true, false, false, true, false, false); } } } } private void OnPopulateScene(orig_PopulateScene orig, SceneDirector self) { //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Expected O, but got Unknown //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Invalid comparison between Unknown and I4 WeightedSelection val = self.GenerateInteractableCardSelection(); string text = ""; if ((Object)(object)SceneInfo.instance != (Object)null && (Object)(object)SceneInfo.instance.sceneDef != (Object)null) { Log.Info(SceneInfo.instance.sceneDef.baseSceneName); text = SceneInfo.instance.sceneDef.baseSceneName; } string[] array = Main.halcyonStages.Value.Trim().TrimEnd(',').Split(new string[1] { "," }, StringSplitOptions.None); for (int i = 0; i < val.Count; i++) { if (val == null) { continue; } _ = ref val.choices[i]; string name = ((Object)val.choices[i].value.spawnCard).name; if (!name.Contains("ShrineHalcyonite")) { continue; } string[] array2 = array; foreach (string text2 in array2) { if (!(text == text2)) { continue; } DirectorCard value = val.choices[i].value; if (!value.IsAvailable()) { continue; } self.interactableCredit -= value.cost; if (!Object.op_Implicit((Object)(object)Run.instance)) { continue; } for (int k = 0; k < 10; k++) { DirectorPlacementRule val2 = new DirectorPlacementRule { placementMode = (PlacementMode)4 }; GameObject val3 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(value.GetSpawnCard(), val2, self.rng)); if (Object.op_Implicit((Object)(object)val3)) { Log.Message("Successfully guaranteed Halcyon Shrine on " + text2); PurchaseInteraction component = val3.GetComponent(); if (Object.op_Implicit((Object)(object)component) && (int)component.costType == 1) { component.Networkcost = Run.instance.GetDifficultyScaledCost(component.cost); } break; } } } } orig.Invoke(self); } private WeightedSelection OnGenerateInteractableCardSelection(orig_GenerateInteractableCardSelection orig, SceneDirector self) { WeightedSelection val = orig.Invoke(self); string text = ""; if ((Object)(object)SceneInfo.instance != (Object)null && (Object)(object)SceneInfo.instance.sceneDef != (Object)null) { Log.Info(SceneInfo.instance.sceneDef.baseSceneName); text = SceneInfo.instance.sceneDef.baseSceneName; } string[] array = Main.halcyonStages.Value.Trim().TrimEnd(',').Split(new string[1] { "," }, StringSplitOptions.None); for (int i = 0; i < val.Count; i++) { if (val == null) { continue; } _ = ref val.choices[i]; string name = ((Object)val.choices[i].value.spawnCard).name; if (!name.Contains("ShrineHalcyonite")) { continue; } val.choices[i].weight *= 1.15f; string[] array2 = array; foreach (string text2 in array2) { if (text == text2) { val.choices[i].weight = 0f; } } } return val; } public void OnHalcyoniteShrineAwake(orig_Awake orig, HalcyoniteShrineInteractable self) { orig.Invoke(self); if (!NetworkServer.active) { return; } int num = 0; if ((Object)(object)Run.instance != (Object)null) { num = Run.instance.stageClearCountInCurrentLoop; } if (self.portalSpawners == null) { return; } PortalSpawner[] portalSpawners = self.portalSpawners; foreach (PortalSpawner val in portalSpawners) { if (num >= 4) { val.portalSpawnCard = colossusPortalCard; val.spawnPreviewMessageToken = "PORTAL_STORM_WILL_OPEN"; val.spawnMessageToken = "PORTAL_STORM_OPEN"; val.previewChildName = "StormPortalIndicator"; Log.Message("Success!"); } } } public void IL_GiveColossusItem(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; MethodReference val4 = default(MethodReference); int num = default(int); if (val.TryGotoNext(val3, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(Run), "treasureRng"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, ref val4), (Instruction x) => ILPatternMatchingExt.MatchNewobj(x, ref val4), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Action)delegate(SkyJumpDeathState self) { self.rewardOptionCount = 4; }); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private void LunarRuinDotFix(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs).GetField("lunarruin")) })) { if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_gameObject") })) { val.EmitDelegate>((Action)delegate(CharacterBody body) { body.AddTimedBuff(Buffs.lunarruin, 5f); body.SetTimedBuffDurationIfPresent(Buffs.lunarruin, 5f, true); }); ILLabel val2 = val.DefineLabel(); val.Emit(OpCodes.Br, (object)val2); val.Emit(OpCodes.Ldloc, 1); MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "InflictDot") })) { val.MarkLabel(val2); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private void OnFrozenStateEnter(orig_OnEnter orig, FrozenState self) { if (!(((Object)((EntityState)self).outer).name == "FalseSonBossBody(Clone)") && !(((Object)((EntityState)self).outer).name == "FalseSonBossBodyLunarShard(Clone)") && !(((Object)((EntityState)self).outer).name == "FalseSonBossBodyBrokenLunarShard(Clone)")) { orig.Invoke(self); } } } public class FalseSonChanges { private static GameObject warningPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Common.TeamAreaIndicator__GroundOnly_prefab).WaitForCompletion(); private static GameObject stakePrefab = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSon.LunarStake_prefab).WaitForCompletion(); private static GameObject fissureWarningEffect = Addressables.LoadAssetAsync((object)RoR2_Base_Vagrant.VagrantCannonExplosion_prefab).WaitForCompletion(); private static GameObject warningPrefab2 = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSon.OmniImpactVFXLunarStakeTerrain_prefab).WaitForCompletion(); private static GameObject eyeGlowPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Common_VFX.LightningFlash_prefab).WaitForCompletion(); public static GameObject devastatorProjectile = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSonBoss.PrimeDevastatorProjectile_prefab).WaitForCompletion(); public static GameObject meridianTeleportEffect1 = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSonBoss.FalseSonBossLightningNovaSpawn_prefab).WaitForCompletion(); public static GameObject meridianTeleportEffect2 = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSon.MeridiansWillSecondaryLightningImpact_prefab).WaitForCompletion(); public float crystalRadiusMult = 1.3f; public int bonusCrystalCount = 3; public int crystalScatters = 5; public float dashLightningTimer = 0f; public static float dashDelayDuration = 0.5f; public float speedoverride = -1f; public bool chargedStake = false; private BlastAttack _blastInfo = null; private Vector3[] testPattern = (Vector3[])(object)new Vector3[9] { new Vector3(0f, 0f, 0f), new Vector3(30f, 0f, -30f), new Vector3(30f, 0f, 0f), new Vector3(30f, 0f, 30f), new Vector3(0f, 0f, 30f), new Vector3(-30f, 0f, 30f), new Vector3(-30f, 0f, 0f), new Vector3(-30f, 0f, -30f), new Vector3(0f, 0f, -30f) }; private static Vector3[] tornadoPattern = (Vector3[])(object)new Vector3[8] { new Vector3(28f, 0f, -28f), new Vector3(40f, 0f, 0f), new Vector3(28f, 0f, 28f), new Vector3(0f, 0f, 40f), new Vector3(-28f, 0f, 28f), new Vector3(-40f, 0f, 0f), new Vector3(-28f, 0f, -28f), new Vector3(0f, 0f, -40f) }; private static Vector3[] pattern1a = (Vector3[])(object)new Vector3[12] { new Vector3(0f, 0f, 30f), new Vector3(15f, 0f, 27f), new Vector3(27f, 0f, 15f), new Vector3(30f, 0f, 0f), new Vector3(27f, 0f, -15f), new Vector3(15f, 0f, -27f), new Vector3(0f, 0f, -30f), new Vector3(-15f, 0f, -27f), new Vector3(-27f, 0f, -15f), new Vector3(-30f, 0f, 0f), new Vector3(-27f, 0f, 15f), new Vector3(-15f, 0f, 27f) }; private static Vector3[] pattern1b = (Vector3[])(object)new Vector3[12] { new Vector3(12.5f, 0f, 12.5f), new Vector3(12.5f, 0f, -12.5f), new Vector3(-12.5f, 0f, 12.5f), new Vector3(-12.5f, 0f, -12.5f), new Vector3(25f, 0f, 25f), new Vector3(25f, 0f, -25f), new Vector3(-25f, 0f, 25f), new Vector3(-25f, 0f, -25f), new Vector3(37.5f, 0f, 37.5f), new Vector3(37.5f, 0f, -37.5f), new Vector3(-37.5f, 0f, 37.5f), new Vector3(-37.5f, 0f, -37.5f) }; private static Vector3[] pattern1c = (Vector3[])(object)new Vector3[36] { new Vector3(10f, 0f, 10f), new Vector3(10f, 0f, -10f), new Vector3(-10f, 0f, 10f), new Vector3(-10f, 0f, -10f), new Vector3(20f, 0f, 20f), new Vector3(20f, 0f, -20f), new Vector3(-20f, 0f, 20f), new Vector3(-20f, 0f, -20f), new Vector3(20f, 0f, 0f), new Vector3(20f, 0f, -0f), new Vector3(-20f, 0f, 0f), new Vector3(-20f, 0f, -0f), new Vector3(30f, 0f, 30f), new Vector3(30f, 0f, -30f), new Vector3(-30f, 0f, 30f), new Vector3(-30f, 0f, -30f), new Vector3(30f, 0f, 10f), new Vector3(30f, 0f, -10f), new Vector3(-30f, 0f, 10f), new Vector3(-30f, 0f, -10f), new Vector3(10f, 0f, 30f), new Vector3(10f, 0f, -30f), new Vector3(-10f, 0f, 30f), new Vector3(-10f, 0f, -30f), new Vector3(40f, 0f, 20f), new Vector3(40f, 0f, -20f), new Vector3(40f, 0f, 0f), new Vector3(-40f, 0f, 20f), new Vector3(-40f, 0f, -20f), new Vector3(-40f, 0f, 0f), new Vector3(20f, 0f, 40f), new Vector3(-20f, 0f, 40f), new Vector3(0f, 0f, 40f), new Vector3(20f, 0f, -40f), new Vector3(-20f, 0f, -40f), new Vector3(0f, 0f, -40f) }; private static Vector3[] pattern1d = (Vector3[])(object)new Vector3[12] { new Vector3(0f, 0f, 15f), new Vector3(10f, 0f, 5f), new Vector3(-10f, 0f, 5f), new Vector3(0f, 0f, 45f), new Vector3(10f, 0f, 35f), new Vector3(-10f, 0f, 35f), new Vector3(30f, 0f, 15f), new Vector3(40f, 0f, 5f), new Vector3(30f, 0f, -5f), new Vector3(-30f, 0f, 15f), new Vector3(-40f, 0f, 5f), new Vector3(-30f, 0f, -5f) }; private static Vector3[] pattern1e = (Vector3[])(object)new Vector3[12] { new Vector3(0f, 0f, 35f), new Vector3(10f, 0f, 25f), new Vector3(-10f, 0f, 25f), new Vector3(0f, 0f, -35f), new Vector3(10f, 0f, -25f), new Vector3(-10f, 0f, -25f), new Vector3(25f, 0f, 10f), new Vector3(35f, 0f, 0f), new Vector3(25f, 0f, -10f), new Vector3(-25f, 0f, 10f), new Vector3(-35f, 0f, 0f), new Vector3(-25f, 0f, -10f) }; public List patternList1 = new List { pattern1a, pattern1b, pattern1e }; private static Vector3[] pattern2a = (Vector3[])(object)new Vector3[16] { new Vector3(0f, 0f, -10f), new Vector3(-10f, 0f, -20f), new Vector3(0f, 0f, -20f), new Vector3(10f, 0f, -20f), new Vector3(-12.5f, 0f, -30f), new Vector3(0f, 0f, -30f), new Vector3(12.5f, 0f, -30f), new Vector3(-15f, 0f, -40f), new Vector3(0f, 0f, -40f), new Vector3(15f, 0f, -40f), new Vector3(-17.5f, 0f, -50f), new Vector3(0f, 0f, -50f), new Vector3(17.5f, 0f, -50f), new Vector3(-20f, 0f, -60f), new Vector3(0f, 0f, -60f), new Vector3(20f, 0f, -60f) }; private static Vector3[] pattern2b = (Vector3[])(object)new Vector3[16] { new Vector3(0f, 0f, 45f), new Vector3(18f, 0f, 42f), new Vector3(33f, 0f, 33f), new Vector3(42f, 0f, 18f), new Vector3(45f, 0f, 0f), new Vector3(42f, 0f, -18f), new Vector3(33f, 0f, -33f), new Vector3(18f, 0f, -42f), new Vector3(0f, 0f, -45f), new Vector3(-18f, 0f, -42f), new Vector3(-33f, 0f, -33f), new Vector3(-42f, 0f, -18f), new Vector3(-45f, 0f, 0f), new Vector3(-42f, 0f, 18f), new Vector3(-33f, 0f, 33f), new Vector3(-18f, 0f, 42f) }; private static Vector3[] pattern2c = (Vector3[])(object)new Vector3[36] { new Vector3(10f, 0f, 0f), new Vector3(-10f, 0f, 0f), new Vector3(0f, 0f, 10f), new Vector3(0f, 0f, -10f), new Vector3(20f, 0f, 10f), new Vector3(20f, 0f, -10f), new Vector3(-20f, 0f, 10f), new Vector3(-20f, 0f, -10f), new Vector3(30f, 0f, 20f), new Vector3(30f, 0f, -20f), new Vector3(30f, 0f, 0f), new Vector3(-30f, 0f, 20f), new Vector3(-30f, 0f, -20f), new Vector3(-30f, 0f, 0f), new Vector3(20f, 0f, 30f), new Vector3(-20f, 0f, 30f), new Vector3(0f, 0f, 30f), new Vector3(20f, 0f, -30f), new Vector3(-20f, 0f, -30f), new Vector3(0f, 0f, -30f), new Vector3(40f, 0f, 30f), new Vector3(40f, 0f, -30f), new Vector3(40f, 0f, 10f), new Vector3(40f, 0f, -10f), new Vector3(-40f, 0f, 30f), new Vector3(-40f, 0f, -30f), new Vector3(-40f, 0f, 10f), new Vector3(-40f, 0f, -10f), new Vector3(30f, 0f, 40f), new Vector3(-30f, 0f, 40f), new Vector3(10f, 0f, 40f), new Vector3(-10f, 0f, 40f), new Vector3(30f, 0f, -40f), new Vector3(-30f, 0f, -40f), new Vector3(10f, 0f, -40f), new Vector3(-10f, 0f, -40f) }; private static Vector3[] pattern2d = (Vector3[])(object)new Vector3[16] { new Vector3(10f, 0f, -27.5f), new Vector3(10f, 0f, -40f), new Vector3(10f, 0f, -52.5f), new Vector3(10f, 0f, -15f), new Vector3(-10f, 0f, -27.5f), new Vector3(-10f, 0f, -40f), new Vector3(-10f, 0f, -52.5f), new Vector3(-10f, 0f, -15f), new Vector3(25f, 0f, -10f), new Vector3(25f, 0f, -22.5f), new Vector3(25f, 0f, -35f), new Vector3(25f, 0f, 2.5f), new Vector3(-25f, 0f, -10f), new Vector3(-25f, 0f, -22.5f), new Vector3(-25f, 0f, -35f), new Vector3(-25f, 0f, 2.5f) }; private static Vector3[] pattern2e = (Vector3[])(object)new Vector3[16] { new Vector3(52f, 0f, 16f), new Vector3(40f, 0f, 28f), new Vector3(28f, 0f, 40f), new Vector3(16f, 0f, 52f), new Vector3(-52f, 0f, 16f), new Vector3(-40f, 0f, 28f), new Vector3(-28f, 0f, 40f), new Vector3(-16f, 0f, 52f), new Vector3(52f, 0f, -16f), new Vector3(40f, 0f, -28f), new Vector3(28f, 0f, -40f), new Vector3(16f, 0f, -52f), new Vector3(-52f, 0f, -16f), new Vector3(-40f, 0f, -28f), new Vector3(-28f, 0f, -40f), new Vector3(-16f, 0f, -52f) }; public List patternList2 = new List { pattern2a, pattern2b, pattern2d, pattern2e }; public void Initialize() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Expected O, but got Unknown //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Expected O, but got Unknown //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Expected O, but got Unknown //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown HeartSpawnState.OnEnter += new hook_OnEnter(OnSpawn1Enter); Lightning1SpawnState.OnEnter += new hook_OnEnter(OnSpawn2Enter); Lightning2SpawnState.OnEnter += new hook_OnEnter(OnSpawn3Enter); FissureSlam.HasLoSToPlayer += new hook_HasLoSToPlayer(OnFissureSlamLoS); FissureSlam.DetonateAuthority += new hook_DetonateAuthority(OnFissureSlamDetonate); FissureSlam.OnEnter += new hook_OnEnter(OnFissureSlamEnter); FissureSlam.TriggerAnimationEvent += new hook_TriggerAnimationEvent(OnFissureSlamTriggerAnimation); FissureSlam.OnExit += new hook_OnExit(OnFissureSlamExit); SwatAwayPlayersWindup.OnEnter += new hook_OnEnter(OnSwatEnter); SwatAwayPlayersWindup.GetNextStateAuthority += new hook_GetNextStateAuthority(OnSwatState); LunarRainDeathState.Explode += new hook_Explode(OnLunarSpikeExplode); LunarRainDeathState.OnEnter += new hook_OnEnter(OnLunarSpikeEnter); LunarRain.OnEnter += new hook_OnEnter(OnLunarRainEnter); LunarGazeLeap.OnEnter += new hook_OnEnter(OnLeapEnter); LunarGazeExitLeap.OnEnter += new hook_OnEnter(OnLeapExit); PrimeDevastator.OnEnter += new hook_OnEnter(OnDevastatorEnter); PrimeDevastator.FixedUpdate += new hook_FixedUpdate(OnDevastatorUpdate); PrimeDevastator.FireDevastator += new hook_FireDevastator(OnDevastatorFire); PrimeDevastator.CreateOrbChain += new hook_CreateOrbChain(OnDevastatorOrb); PrimeDevastatorProjectileController.Start += new hook_Start(OnDevastatorProjectileStart); PrimeDevastatorProjectileController.Update += new hook_Update(OnDevastatorProjectileUpdate); ProjectileOwnerOrbiter.AcquireOwner += new hook_AcquireOwner(OnAcquireOwner); CorruptedPathsDash.OnEnter += new hook_OnEnter(OnDashEnter); CorruptedPathsDash.FixedUpdate += new hook_FixedUpdate(OnDashUpdate); LightningStrikeInstance.SetupDefaultBlastInfo += new hook_SetupDefaultBlastInfo(OnSetupLightning); TaintedOffering.FireProjectile += new hook_FireProjectile(OnTaintedOfferingFire); TaintedOffering.FixedUpdate += new hook_FixedUpdate(OnTaintedOfferingUpdate); TaintedOffering.OnEnter += new hook_OnEnter(OnTaintedOfferingEnter); } public void OnSpawn1Enter(orig_OnEnter orig, HeartSpawnState self) { orig.Invoke(self); if (NetworkServer.active) { int itemCountEffective = ((EntityState)self).characterBody.inventory.GetItemCountEffective(Items.AdaptiveArmor); if (itemCountEffective <= 1) { ((EntityState)self).characterBody.inventory.GiveItemPermanent(Items.AdaptiveArmor, 1); } ((EntityState)self).characterBody.AddBuff(Main.DamageCapBuff); } } public void OnSpawn2Enter(orig_OnEnter orig, Lightning1SpawnState self) { orig.Invoke(self); if (NetworkServer.active) { int itemCountEffective = ((EntityState)self).characterBody.inventory.GetItemCountEffective(Items.AdaptiveArmor); if (itemCountEffective <= 1) { ((EntityState)self).characterBody.inventory.GiveItemPermanent(Items.AdaptiveArmor, 1); } ((EntityState)self).characterBody.AddBuff(Main.DamageCapBuff); } } public void OnSpawn3Enter(orig_OnEnter orig, Lightning2SpawnState self) { orig.Invoke(self); if (NetworkServer.active) { int itemCountEffective = ((EntityState)self).characterBody.inventory.GetItemCountEffective(Items.AdaptiveArmor); if (itemCountEffective <= 1) { ((EntityState)self).characterBody.inventory.GiveItemPermanent(Items.AdaptiveArmor, 1); } ((EntityState)self).characterBody.AddBuff(Main.DamageCapBuff); } } public void OnSwatEnter(orig_OnEnter orig, SwatAwayPlayersWindup self) { if (Main.currentPhase > 1) { self.stateAborted = true; ((EntityState)self).outer.SetNextState(self.GetNextStateAuthority()); } else { orig.Invoke(self); } } private EntityState OnSwatState(orig_GetNextStateAuthority orig, SwatAwayPlayersWindup self) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown if (Main.currentPhase > 1) { if (Main.hardMode) { return (EntityState)new CorruptedPathsDash(); } return (EntityState)new FissureSlamWindup(); } return orig.Invoke(self); } public bool OnFissureSlamLoS(orig_HasLoSToPlayer orig, FissureSlam self) { return true; } public void OnFissureSlamEnter(orig_OnEnter orig, FissureSlam self) { if (Main.currentPhase > 1) { self.baseDuration *= 1.8f; ((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(SlamEffect(((EntityState)self).characterBody, self.baseDuration / 1.25f)); } else { self.baseDuration *= 1.2f; } self.totalFissures = 0; orig.Invoke(self); if ((Object)(object)((EntityState)self).characterBody.master != (Object)null) { ((MonoBehaviour)((EntityState)self).characterBody.master).StartCoroutine(ChangeAimSpeed(((EntityState)self).characterBody.master, 30f, self.duration, 0.2f)); } } public IEnumerator SlamEffect(CharacterBody body, float delay) { yield return (object)new WaitForSeconds(delay); if ((Object)(object)body != (Object)null) { Vector3 pos = ((Component)body).gameObject.transform.position; pos.y += 11f; new EffectData { origin = pos, scale = 1.25f }; GameObject warningInstance = Object.Instantiate(warningPrefab2, pos, Util.QuaternionSafeLookRotation(Vector3.up)); Util.PlaySound("Play_FalseSon_LunarStake_Impact", warningInstance); } } public IEnumerator ChangeAimSpeed(CharacterMaster master, float speed, float duration, float delay) { BaseAI baseAI = ((Component)master).GetComponent(); if ((Object)(object)baseAI != (Object)null) { float currentSpeed = baseAI.aimVectorMaxSpeed; yield return (object)new WaitForSeconds(delay); baseAI.aimVectorMaxSpeed = speed; yield return (object)new WaitForSeconds(duration); baseAI.aimVectorMaxSpeed = currentSpeed; } } public void OnFissureSlamTriggerAnimation(orig_TriggerAnimationEvent orig, FissureSlam self, string eventName) { orig.Invoke(self, eventName); if (!(eventName == "DoSlamAttack")) { return; } Animator modelAnimator = ((EntityState)self).GetModelAnimator(); if ((Object)(object)modelAnimator != (Object)null) { if (Main.currentPhase > 1) { modelAnimator.speed *= 1.8f; } else { modelAnimator.speed *= 1.2f; } } } public void OnFissureSlamExit(orig_OnExit orig, FissureSlam self) { Animator modelAnimator = ((EntityState)self).GetModelAnimator(); if ((Object)(object)modelAnimator != (Object)null) { modelAnimator.speed = 1f; } if ((Object)(object)((EntityState)self).characterBody.master != (Object)null) { } orig.Invoke(self); } public Result OnFissureSlamDetonate(orig_DetonateAuthority orig, FissureSlam self) { //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: 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_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)self).isAuthority) { Vector3 position = ((Component)((BaseState)self).FindModelChild("ClubExplosionPoint")).transform.position; float x = position.x; float y = MeridianEventTriggerInteraction.instance.arenaCenter.position.y; float z = position.z; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(x, y, z); Vector3 origin = default(Vector3); ((Vector3)(ref origin))..ctor(((EntityState)self).transform.position.x, y, ((EntityState)self).transform.position.z); Quaternion val2 = Util.QuaternionSafeLookRotation(((EntityState)self).modelLocator.modelTransform.forward); Quaternion val3 = Quaternion.LookRotation(((EntityState)self).transform.position - position); float y2 = ((Quaternion)(ref val3)).eulerAngles.y; int index = Random.Range(0, patternList1.Count); Vector3[] array = patternList1[index]; float num = Main.strikeSpeed; Util.ShuffleArray(array); for (int i = 0; i < 12; i++) { Vector3 val4 = array[i]; Vector3 val5 = Quaternion.AngleAxis(y2, Vector3.up) * val4; Vector3 val6 = val5 + val; Object.Instantiate(LunarGazeExitLeap.lightningPrefab, val6, val2).GetComponent().Initialize(val6, _blastInfo, num, true); num += 0.01f; } if (Main.currentPhase > 1) { int index2 = Random.Range(0, patternList2.Count); Vector3[] array2 = patternList2[index2]; float num2 = Main.strikeSpeed * 1.5f; Util.ShuffleArray(array2); for (int j = 0; j < 16; j++) { Vector3 val7 = array2[j]; Vector3 val8 = Quaternion.AngleAxis(y2, Vector3.up) * val7; Vector3 val9 = val + val8; Object.Instantiate(LunarGazeExitLeap.lightningPrefab, val9, val2).GetComponent().Initialize(val9, _blastInfo, num2, true); num2 += 0.01f; } } BaseAI val10 = default(BaseAI); if (((Component)((EntityState)self).characterBody.master).TryGetComponent(ref val10)) { Target currentEnemy = val10.currentEnemy; if (currentEnemy != null && (Object)(object)val10.currentEnemy.gameObject != (Object)null && ((EntityState)self).isAuthority) { x = currentEnemy.gameObject.transform.position.x; z = currentEnemy.gameObject.transform.position.z; Vector3 position2 = default(Vector3); ((Vector3)(ref position2))..ctor(x, y, z); ((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(FireFissureColumn(position2, origin, ((EntityState)self).characterBody, Main.strikeSpeed, 3, warningCircle: true)); } } } return orig.Invoke(self); } private IEnumerator FireFissureColumn(Vector3 position, Vector3 origin, CharacterBody body, float delay, int amount, bool warningCircle) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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) if (warningCircle) { Vector3 warningPos = position; warningPos.y += 0.2f; GameObject warningInstance = Object.Instantiate(warningPrefab2, warningPos, Util.QuaternionSafeLookRotation(Vector3.up)); Object.Destroy((Object)(object)warningInstance, delay); GameObject warningInstance2 = Object.Instantiate(warningPrefab, warningPos, Util.QuaternionSafeLookRotation(Vector3.up)); warningInstance2.transform.localScale = Vector3.one * 5f; Object.Destroy((Object)(object)warningInstance2, delay); TeamAreaIndicator indicator = warningInstance2.GetComponent(); if ((Object)(object)indicator != (Object)null) { indicator.teamComponent = body.teamComponent; } } yield return (object)new WaitForSeconds(delay); DamageTypeCombo damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)131072), (DamageTypeExtended)8192, (DamageSource)16); DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.stormboundLunarRuin); float num = 360f / (float)amount; for (int i = 0; i < amount; i++) { Quaternion quaternion = Quaternion.LookRotation(origin - position); quaternion *= Quaternion.Euler(Vector3.up * 180f); ((Quaternion)(ref quaternion)).Set(0f, quaternion.y, 0f, quaternion.w); Quaternion forward = Quaternion.AngleAxis(num * (float)i, Vector3.up) * quaternion; ProjectileManager.instance.FireProjectile(FissureSlam.pillarProjectilePrefab, position, forward, ((Component)body).gameObject, body.damage * (FissureSlam.blastDamageCoefficient * 0.2f), 0f, Util.CheckRoll(body.crit, body.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)damageType); quaternion = default(Quaternion); } } public void OnLunarSpikeEnter(orig_OnEnter orig, LunarRainDeathState self) { //IL_013a: 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_014c: 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_0160: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) float num = 1f; if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((BaseState)self).attackSpeedStat = ((EntityState)self).characterBody.attackSpeed; ((BaseState)self).damageStat = ((EntityState)self).characterBody.damage; ((BaseState)self).critStat = ((EntityState)self).characterBody.crit; ((BaseState)self).moveSpeedStat = ((EntityState)self).characterBody.moveSpeed; if (((EntityState)self).characterBody.GetBuffCount(Main.LaserCrystalDebuff) >= 5) { num = crystalRadiusMult; } } if ((Object)(object)((EntityState)self).teamComponent != (Object)null) { ((EntityState)self).teamComponent.teamIndex = (TeamIndex)2; } if (Object.op_Implicit((Object)(object)LunarRainDeathState.chargePrefab)) { if (num > 1f) { GameObject val = Object.Instantiate(warningPrefab, ((EntityState)self).transform.position, Util.QuaternionSafeLookRotation(Vector3.up)); val.transform.localScale = Vector3.one * LunarRainDeathState.explosionRadius * num; Object.Destroy((Object)(object)val, LunarRainDeathState.chargeDuration); TeamAreaIndicator component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.teamComponent = ((EntityState)self).teamComponent; } } EffectData val2 = new EffectData { scale = LunarRainDeathState.explosionRadius * num, origin = ((EntityState)self).transform.position }; EffectManager.SpawnEffect(LunarRainDeathState.chargePrefab, val2, false); } FlashEmission component2 = ((Component)((EntityState)self).modelLocator.modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.StartFlash(); } Util.PlaySound(LunarRainDeathState.explosiveIndicatorSoundString, ((EntityState)self).gameObject); } public void OnLunarSpikeExplode(orig_Explode orig, LunarRainDeathState self) { //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown float num = 1f; if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((EntityState)self).characterBody.GetBuffCount(Main.LaserCrystalDebuff) >= 5) { num = crystalRadiusMult; } if (Object.op_Implicit((Object)(object)((EntityState)self).modelLocator)) { if (Object.op_Implicit((Object)(object)((EntityState)self).modelLocator.modelBaseTransform)) { EntityState.Destroy((Object)(object)((Component)((EntityState)self).modelLocator.modelBaseTransform).gameObject); } if (Object.op_Implicit((Object)(object)((EntityState)self).modelLocator.modelTransform)) { EntityState.Destroy((Object)(object)((Component)((EntityState)self).modelLocator.modelTransform).gameObject); } } if (Object.op_Implicit((Object)(object)LunarRainDeathState.explosionEffectPrefab)) { EffectManager.SpawnEffect(LunarRainDeathState.explosionEffectPrefab, new EffectData { origin = ((EntityState)self).transform.position, scale = LunarRainDeathState.vfxScale * (num + 0.2f), rotation = ((EntityState)self).transform.rotation }, true); } BlastAttack val = new BlastAttack(); val.attacker = ((EntityState)self).gameObject; val.damageColorIndex = (DamageColorIndex)3; val.baseDamage = LunarRainDeathState.baseDamage * LunarRainDeathState.explosionDamageCoefficient * Run.instance.teamlessDamageCoefficient * 1.6f; val.radius = LunarRainDeathState.explosionRadius * num; val.falloffModel = (FalloffModel)3; val.procCoefficient = LunarRainDeathState.explosionProcCoefficient; val.teamIndex = (TeamIndex)2; val.damageType = DamageTypeCombo.op_Implicit((DamageType)131072); val.damageType.damageTypeExtended = (DamageTypeExtended)8192; val.position = ((EntityState)self).transform.position; val.baseForce = LunarRainDeathState.explosionForce; val.canRejectForce = LunarRainDeathState.canRejectForce; val.attackerFiltering = (AttackerFiltering)2; DamageAPI.AddModdedDamageType(val, DamageTypes.stormboundLunarRuin); val.Fire(); EntityState.Destroy((Object)(object)((EntityState)self).gameObject); } public void OnLunarRainEnter(orig_OnEnter orig, LunarRain self) { //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) self.delayBetweenDrops = 0.1f; orig.Invoke(self); BaseAI val = default(BaseAI); if (((Component)((EntityState)self).characterBody.master).TryGetComponent(ref val)) { Target currentEnemy = val.currentEnemy; if (currentEnemy != null && (Object)(object)val.currentEnemy.gameObject != (Object)null) { List list = new List(); if (!Object.op_Implicit((Object)(object)SceneInfo.instance) || !Object.op_Implicit((Object)(object)SceneInfo.instance.groundNodes)) { Debug.LogWarning((object)"No ground nodes available"); } else { NodeGraph groundNodes = SceneInfo.instance.groundNodes; float x = currentEnemy.gameObject.transform.position.x; float y = MeridianEventTriggerInteraction.instance.arenaCenter.position.y; float z = currentEnemy.gameObject.transform.position.z; float num = 75f; if (Main.currentPhase == 3) { num = 50f; } num /= (float)crystalScatters; Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(x, y, z); Vector3 position = MeridianEventTriggerInteraction.instance.arenaCenter.position; Util.ShuffleList(self.fissureLocs); Vector3 item = default(Vector3); for (int i = 0; i < crystalScatters; i++) { List list2 = groundNodes.FindNodesInRange(position, num * (float)i, num * (float)(i + 1), (HullMask)1); foreach (NodeIndex item2 in list2) { if (groundNodes.GetNodePosition(item2, ref item)) { list.Add(item); } } Util.ShuffleList(list); if (list.Count > 0) { if (i + 1 > bonusCrystalCount) { self.fissureLocs[i] = list[0]; } else { self.fissureLocs.Add(list[0]); self.totalLunarDropsToFire++; } } list.Clear(); } Util.ShuffleList(self.fissureLocs); } } } float num2 = self.warningDuration; foreach (Vector3 fissureLoc in self.fissureLocs) { if (((EntityState)self).isAuthority) { ((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(FireFissureColumn(fissureLoc, MeridianEventTriggerInteraction.instance.arenaCenter.position, ((EntityState)self).characterBody, num2, 1, warningCircle: false)); num2 += self.delayBetweenDrops; } } } public Result OnLunarRainDetonate(orig_DetonateAuthority orig, LunarRain self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) int count = self.fissureLocs.Count; Vector3 position = ((EntityState)self).characterBody.transform.position; for (int i = 0; i < count; i++) { Vector3 val = ((EntityState)self).characterBody.transform.position + self.fissureLocs[i]; val.y = MeridianEventTriggerInteraction.instance.arenaCenter.position.y; Quaternion val2 = Quaternion.LookRotation(position - val); val2 *= Quaternion.Euler(Vector3.up * 180f); ((Quaternion)(ref val2)).Set(0f, val2.y, 0f, val2.w); ProjectileManager.instance.FireProjectileWithoutDamageType(FissureSlam.pillarProjectilePrefab, val, val2, ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * (FissureSlam.blastDamageCoefficient * 0.2f), 0f, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } return orig.Invoke(self); } public void OnDashEnter(orig_OnEnter orig, CorruptedPathsDash self) { //IL_003c: 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_0073: Unknown result type (might be due to invalid IL or missing references) CorruptedPathsDash.dashPrepDuration = 0.6f; CorruptedPathsDash.smallHopVelocity = 0f; orig.Invoke(self); CorruptedPathsDash.dashDuration = Vector3.Distance(((Component)((EntityState)self).characterBody.master).GetComponent().currentEnemy.characterBody.transform.position, ((EntityState)self).transform.position) * 0.1f / CorruptedPathsDash.speedCoefficient + 0.04f; ((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility.buffIndex); ((EntityState)self).characterBody.AddTimedBuff(Buffs.ArmorBoost, 1f); } public void OnDashUpdate(orig_FixedUpdate orig, CorruptedPathsDash self) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Expected O, but got Unknown //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Expected O, but got Unknown //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime(); self.overlapAttack.damage = 0f; ((EntityState)self).characterDirection.moveVector = self.dashVector; if (self.stopwatch > CorruptedPathsDash.dashPrepDuration && !self.isDashing && !(self.stopwatch >= CorruptedPathsDash.dashDuration + CorruptedPathsDash.dashPrepDuration)) { self.isDashing = true; self.dashVector = ((EntityState)self).inputBank.aimDirection; CorruptedPathsDash.dashDuration = Vector3.Distance(((Component)((EntityState)self).characterBody.master).GetComponent().currentEnemy.characterBody.transform.position, ((EntityState)self).transform.position) * 0.1f / CorruptedPathsDash.speedCoefficient + 0.04f; self.CreateDashEffect(); ((EntityState)self).PlayCrossfade("FullBody, Override", "StepBrothersLoop", 0.1f); self.originalLayer = ((EntityState)self).gameObject.layer; ((EntityState)self).gameObject.layer = LayerIndex.GetAppropriateFakeLayerForTeam(((EntityState)self).teamComponent.teamIndex).intVal; ((BaseCharacterController)((EntityState)self).characterMotor).Motor.RebuildCollidableLayers(); } if (!self.isDashing) { self.stopwatch += ((EntityState)self).GetDeltaTime(); dashLightningTimer = 0f; } else if (((EntityState)self).isAuthority) { ((EntityState)self).characterMotor.velocity = Vector3.zero; if (self.stopwatch <= CorruptedPathsDash.dashDuration + CorruptedPathsDash.dashPrepDuration) { if (!self.inHitPause) { float num = Main.strikeSpeed / 2.5f; if (self.stopwatch >= dashLightningTimer + 0.008f) { dashLightningTimer = self.stopwatch; float x = ((EntityState)self).gameObject.transform.position.x; float y = MeridianEventTriggerInteraction.instance.arenaCenter.position.y; float z = ((EntityState)self).gameObject.transform.position.z; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(x, y, z); Object.Instantiate(LunarGazeExitLeap.lightningPrefab, val, ((EntityState)self).gameObject.transform.rotation).GetComponent().Initialize(val, _blastInfo, num, true); } bool flag = self.overlapAttack.Fire((List)null); self.stopwatch += ((EntityState)self).GetDeltaTime(); if (flag) { Vector3 position = ((EntityState)self).gameObject.transform.position; EffectManager.SpawnEffect(CorruptedPathsDash.explosionEffect, new EffectData { origin = position, scale = 1f }, true); self.explosionAttack = new BlastAttack(); self.explosionAttack.attacker = ((EntityState)self).gameObject; self.explosionAttack.inflictor = ((EntityState)self).gameObject; self.explosionAttack.teamIndex = TeamComponent.GetObjectTeam(((EntityState)self).gameObject); self.explosionAttack.baseDamage = 0f; self.explosionAttack.position = position; self.explosionAttack.radius = 15f; self.explosionAttack.Fire(); if (!self.hasHit) { self.hasHit = true; } self.inHitPause = true; self.hitPauseTimer = 0f; } else { CharacterMotor characterMotor = ((EntityState)self).characterMotor; characterMotor.rootMotion += self.dashVector * 10f * CorruptedPathsDash.speedCoefficient * ((EntityState)self).GetDeltaTime(); } } else { self.hitPauseTimer -= ((EntityState)self).GetDeltaTime(); if (self.hitPauseTimer < 0f) { self.inHitPause = false; } } } else { self.stopwatch += ((EntityState)self).GetDeltaTime(); self.isDashing = false; ((EntityState)self).PlayAnimation("FullBody, Override", "SwatAwayWindup", "ChargeSwing.playbackRate", dashDelayDuration, 0f); } } if (self.stopwatch >= CorruptedPathsDash.dashDuration + CorruptedPathsDash.dashPrepDuration + dashDelayDuration && ((EntityState)self).isAuthority) { ((EntityState)self).outer.SetNextState(self.GetNextStateAuthority()); } } public void OnDashExit(orig_OnExit orig, CorruptedPathsDash self) { orig.Invoke(self); } public void OnDevastatorEnter(orig_OnEnter orig, PrimeDevastator self) { //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_0033: 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_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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown Vector3 position = ((Component)MeridianEventTriggerInteraction.instance.arenaCenter).transform.position; position.y -= 1f; NodeGraph nodeGraph = SceneInfo.instance.GetNodeGraph((GraphType)0); List source = nodeGraph.FindNodesInRange(position, 0f, 3f, (HullMask)1); Vector3 val = default(Vector3); nodeGraph.GetNodePosition(source.First(), ref val); EffectManager.SpawnEffect(meridianTeleportEffect1, new EffectData { origin = ((EntityState)self).transform.position }, true); TeleportHelper.TeleportBody(((EntityState)self).characterBody, val, false); EffectManager.SpawnEffect(meridianTeleportEffect2, new EffectData { origin = ((Component)MeridianEventTriggerInteraction.instance.arenaCenter).transform.position }, true); orig.Invoke(self); self.duration = 4f + PrimeDevastator.slamEffectDelay; float num = Random.Range(0f, 100f); if (num >= 50f) { for (int i = 0; i < Projectiles.totalOrbCount; i++) { ProjectileOwnerOrbiter component = Projectiles.fsOrbList[i].GetComponent(); component.degreesPerSecond *= -1f; } } } public void OnDevastatorUpdate(orig_FixedUpdate orig, PrimeDevastator self) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime(); if (!self.chargeEffectSpawned && ((EntityState)self).fixedAge > self.duration * 0.3f) { self.chargeEffectSpawned = true; } if (!self.slamEffectSpawned && ((EntityState)self).fixedAge > PrimeDevastator.slamEffectDelay) { self.slamEffectSpawned = true; self.DetonateAuthority(); self.ChainEffectToPlayers(); } if (!self.orbsSpawned && ((EntityState)self).isAuthority && self.slamEffectSpawned) { self.orbSpawnTimer += Time.deltaTime; if (self.orbSpawnTimer > 4f / (float)Projectiles.totalOrbCount) { self.FireDevastator("MuzzleOrb1"); self.orbNumber++; self.orbSpawnTimer = 0f; } if (self.orbNumber >= Projectiles.totalOrbCount) { self.orbsSpawned = true; } } if (((EntityState)self).fixedAge >= self.duration + 1f && ((EntityState)self).isAuthority) { ((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(BlockSkill(((EntityState)self).characterBody.skillLocator.utility, 12f)); ((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(BlockSkill(((EntityState)self).characterBody.skillLocator.secondary, 6f)); ((EntityState)self).outer.SetNextStateToMain(); } } public void OnDevastatorFire(orig_FireDevastator orig, PrimeDevastator self, string targetMuzzle) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_0163: 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_0044: 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) self.projectileRay = ((BaseState)self).GetAimRay(); if (Object.op_Implicit((Object)(object)self.modelTransform)) { ChildLocator component = ((Component)self.modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild(targetMuzzle); Vector3 position = val.position; if (Object.op_Implicit((Object)(object)val)) { ((Ray)(ref self.projectileRay)).origin = position; } } } float num = 9f + (float)self.orbNumber * 9f; if (((EntityState)self).isAuthority) { FireProjectileInfo val2 = new FireProjectileInfo { projectilePrefab = Projectiles.fsOrbList[self.orbNumber], position = ((EntityState)self).gameObject.transform.position + new Vector3(num, 0f, 0f), rotation = Quaternion.identity, owner = ((EntityState)self).gameObject }; Log.Message(self.damageCoefficient); val2.damage = ((BaseState)self).damageStat * 2.5f; val2.force = 0f; val2.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); DamageTypeCombo val3 = default(DamageTypeCombo); ((DamageTypeCombo)(ref val3))..ctor(DamageTypeCombo.op_Implicit((DamageType)131072), (DamageTypeExtended)8192, (DamageSource)8); DamageAPI.AddModdedDamageType(ref val3, DamageTypes.stormboundDevastatorCrystal); ProjectileManager.instance.FireProjectile(val2); } ((EntityState)self).characterBody.AddSpreadBloom(PrimeDevastator.spreadBloomValue); } public void OnDevastatorOrb(orig_CreateOrbChain orig, PrimeDevastator self, Vector3 sourceOrigin, HurtBox targetHurtbox) { //IL_0008: 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) StormboundPrimeDevastatorOrb stormboundPrimeDevastatorOrb = new StormboundPrimeDevastatorOrb(); ((Orb)stormboundPrimeDevastatorOrb).origin = sourceOrigin; ((Orb)stormboundPrimeDevastatorOrb).target = targetHurtbox; stormboundPrimeDevastatorOrb.lightningEffectPrefab = PrimeDevastator.lightningEffectPrefab; stormboundPrimeDevastatorOrb.blastRadius = PrimeDevastator.blastRadius; ((GenericDamageOrb)stormboundPrimeDevastatorOrb).attacker = ((EntityState)self).gameObject; OrbManager.instance.AddOrb((Orb)(object)stormboundPrimeDevastatorOrb); } public void OnDevastatorProjectileStart(orig_Start orig, PrimeDevastatorProjectileController self) { //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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown EffectManager.SpawnEffect(BrokenCrystalDeathState.deathEffectPrefab, new EffectData { origin = ((Component)self).transform.position, scale = 8f }, true); } public void OnDevastatorProjectileUpdate(orig_Update orig, PrimeDevastatorProjectileController self) { } public void OnAcquireOwner(orig_AcquireOwner orig, ProjectileOwnerOrbiter self, ProjectileController controller) { PrimeDevastatorProjectileController val = default(PrimeDevastatorProjectileController); if (((Component)self).gameObject.TryGetComponent(ref val)) { self.ownerTransform = MeridianEventTriggerInteraction.instance.arenaCenter; controller.onInitialized -= self.AcquireOwner; if (self.resetOnAcquireOwner) { self.resetOnAcquireOwner = false; self.ResetState(); } } else { orig.Invoke(self, controller); } } public IEnumerator BlockSkill(GenericSkill skill, float duration) { bool isReady = false; if (skill.stock >= 1) { isReady = true; skill.DeductStock(skill.stock); } else { skill.rechargeStopwatch -= duration; } yield return (object)new WaitForSeconds(duration); if (isReady) { skill.AddOneStock(); } else { skill.rechargeStopwatch += Mathf.Min(duration, skill.CalculateFinalRechargeInterval() - skill.rechargeStopwatch); } } public void IL_DevastatorUpdate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f) })) { val.Next.Operand = 0.35f; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 4) })) { val.Next.Operand = 6; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void OnLeapEnter(orig_OnEnter orig, LunarGazeLeap self) { orig.Invoke(self); if (((EntityState)self).isAuthority) { if (self.isPlus) { ((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(FireLeapLightningPlus()); } else { ((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(FireLeapLightning()); } } ((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(BlockSkill(((EntityState)self).characterBody.skillLocator.special, 13f + LunarGazeLaserCharge.duration)); } private IEnumerator FireLeapLightning() { new List(); List possibleLightningPositions = new List(); Transform arenaCenter = MeridianEventTriggerInteraction.instance.arenaCenter; if (!Object.op_Implicit((Object)(object)SceneInfo.instance) || !Object.op_Implicit((Object)(object)SceneInfo.instance.groundNodes)) { Debug.LogWarning((object)"No ground nodes available"); yield break; } NodeGraph nodeGraph = SceneInfo.instance.groundNodes; List possibleLightningNodes = nodeGraph.FindNodesInRange(arenaCenter.position, 15f, 100f, (HullMask)1); Vector3 item = default(Vector3); foreach (NodeIndex nodeIndex in possibleLightningNodes) { if (nodeGraph.GetNodePosition(nodeIndex, ref item)) { possibleLightningPositions.Add(item); } item = default(Vector3); } float delay = Main.strikeSpeed * 1.5f; float interval = delay / 25f; int count = (int)Math.Floor(2.5f / interval); for (int i = 0; i < count; i++) { int strikeCount = Random.RandomRangeInt(5, 7); for (int j = 1; j < strikeCount; j++) { int rand = Random.RandomRangeInt(0, possibleLightningPositions.Count); Vector3 vector = possibleLightningPositions[rand]; possibleLightningPositions.RemoveAt(rand); Object.Instantiate(LunarGazeExitLeap.lightningPrefab, vector, arenaCenter.rotation).GetComponent().Initialize(vector, _blastInfo, delay, true); } yield return (object)new WaitForSeconds(interval); } } private IEnumerator FireLeapLightningPlus() { new List(); List possibleLightningPositions = new List(); Transform arenaCenter = MeridianEventTriggerInteraction.instance.arenaCenter; if (!Object.op_Implicit((Object)(object)SceneInfo.instance) || !Object.op_Implicit((Object)(object)SceneInfo.instance.groundNodes)) { Debug.LogWarning((object)"No ground nodes available"); yield break; } NodeGraph nodeGraph = SceneInfo.instance.groundNodes; List possibleLightningNodes = nodeGraph.FindNodesInRange(arenaCenter.position, 15f, 75f, (HullMask)1); Vector3 item = default(Vector3); foreach (NodeIndex nodeIndex in possibleLightningNodes) { if (nodeGraph.GetNodePosition(nodeIndex, ref item)) { possibleLightningPositions.Add(item); } item = default(Vector3); } float delay = Main.strikeSpeed * 1.5f; float interval = delay / 25f; int count = (int)Math.Floor(2.5f / interval); for (int i = 0; i < count; i++) { int strikeCount = Random.RandomRangeInt(4, 6); for (int j = 1; j < strikeCount; j++) { int rand = Random.RandomRangeInt(0, possibleLightningPositions.Count); Vector3 vector = possibleLightningPositions[rand]; possibleLightningPositions.RemoveAt(rand); Object.Instantiate(LunarGazeExitLeap.lightningPrefab, vector, arenaCenter.rotation).GetComponent().Initialize(vector, _blastInfo, delay, true); } yield return (object)new WaitForSeconds(interval); } } public void OnLeapExit(orig_OnEnter orig, LunarGazeExitLeap self) { orig.Invoke(self); } private void OnSetupLightning(orig_SetupDefaultBlastInfo orig, LightningStrikeInstance self, ref BlastAttack info) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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) orig.Invoke(self, ref info); if (info.radius > 0f) { BlastAttack obj = info; obj.radius *= 0.9f; } info.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)2), (DamageTypeExtended)8192, (DamageSource)16); info.falloffModel = (FalloffModel)0; DamageAPI.AddModdedDamageType(info, DamageTypes.stormboundLightning); } public void OnTaintedOfferingEnter(orig_OnEnter orig, TaintedOffering self) { orig.Invoke(self); ((EntityState)self).characterBody.SetAimTimer(0.2f); } public void OnTaintedOfferingUpdate(orig_FixedUpdate orig, TaintedOffering self) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) ((GenericProjectileBaseState)self).stopwatch = ((GenericProjectileBaseState)self).stopwatch + ((EntityState)self).GetDeltaTime(); ((EntityState)self).characterDirection.moveVector = ((EntityState)self).inputBank.aimDirection; if (((GenericProjectileBaseState)self).stopwatch >= ((GenericProjectileBaseState)self).delayBeforeFiringProjectile && !((GenericProjectileBaseState)self).firedProjectile) { int num = Random.RandomRangeInt(0, 2); ((GenericProjectileBaseState)self).firedProjectile = true; for (int num2 = 5; num2 > 0; num2--) { switch (num2) { case 1: if (num > 0) { self.projectileYawBonus = -10f; ((GenericProjectileBaseState)self).projectilePitchBonus = 0f; } else { self.projectileYawBonus = -6f; ((GenericProjectileBaseState)self).projectilePitchBonus = 6f; } break; case 2: if (num > 0) { self.projectileYawBonus = 10f; ((GenericProjectileBaseState)self).projectilePitchBonus = 0f; } else { self.projectileYawBonus = 6f; ((GenericProjectileBaseState)self).projectilePitchBonus = -6f; } break; case 3: if (num > 0) { self.projectileYawBonus = 0f; ((GenericProjectileBaseState)self).projectilePitchBonus = -10f; } else { self.projectileYawBonus = 6f; ((GenericProjectileBaseState)self).projectilePitchBonus = 6f; } break; case 4: if (num > 0) { self.projectileYawBonus = 0f; ((GenericProjectileBaseState)self).projectilePitchBonus = 10f; } else { self.projectileYawBonus = -6f; ((GenericProjectileBaseState)self).projectilePitchBonus = -6f; } speedoverride = 35f; break; case 5: self.projectileYawBonus = 0f; ((GenericProjectileBaseState)self).projectilePitchBonus = 0f; chargedStake = true; speedoverride = 50f; break; } ((GenericProjectileBaseState)self).FireProjectile(); } ((GenericProjectileBaseState)self).DoFireEffects(); } if (((GenericProjectileBaseState)self).stopwatch >= ((GenericProjectileBaseState)self).baseDuration && ((EntityState)self).isAuthority) { ((EntityState)self).outer.SetNextStateToMain(); } } public void OnTaintedOfferingFire(orig_FireProjectile orig, TaintedOffering self) { //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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)self).isAuthority) { Ray val = ((BaseState)self).GetAimRay(); val = ((GenericProjectileBaseState)self).ModifyProjectileAimRay(val); ((Ray)(ref val)).direction = Util.ApplySpread(((Ray)(ref val)).direction, ((GenericProjectileBaseState)self).minSpread, ((GenericProjectileBaseState)self).maxSpread, 1f, 1f, self.projectileYawBonus, ((GenericProjectileBaseState)self).projectilePitchBonus); if (chargedStake) { ProjectileManager.instance.FireProjectileWithoutDamageType(stakePrefab, ((Ray)(ref val)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction), ((EntityState)self).gameObject, ((BaseState)self).damageStat * ((GenericProjectileBaseState)self).damageCoefficient, ((GenericProjectileBaseState)self).force, Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, speedoverride); chargedStake = false; } else { ProjectileManager.instance.FireProjectileWithoutDamageType(((GenericProjectileBaseState)self).projectilePrefab, ((Ray)(ref val)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction), ((EntityState)self).gameObject, ((BaseState)self).damageStat * ((GenericProjectileBaseState)self).damageCoefficient, ((GenericProjectileBaseState)self).force, Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, speedoverride); } } } private EntityState CorruptedPathsDash_GetNextStateAuthority(orig_GetNextStateAuthority orig, CorruptedPathsDash self) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (Main.currentPhase > 1) { return (EntityState)(object)new DelayedState(0.25f, (EntityState)new TaintedOffering()); } ((EntityState)self).skillLocator.primary.DeductStock(2); return (EntityState)(object)new DelayedState(0.25f, (EntityState)new FissureSlamWindup()); } } public class LaserChanges { private class LaserTargetInfo2 { public GameObject laserEffect; public GameObject laserEffect2; public Transform laserEffectEnd; public HurtBox hurtbox; public CharacterBody body; public float lockOnStopwatch; public bool isLockOnDelayComplete; public bool laserActive; public Vector3 lastLockedOnPosition; public int debuffTracker; } private List laserTargets; public int currentPhase = 0; private BuffDef LaserTargetDebuff = Main.LaserTargetDebuff; public static GameObject laserAimPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSon.FalseSonChargedLaser_prefab).WaitForCompletion(), "StormboundLaserTargetPrefab", false); public void Initialize() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown LunarGazeLaserCharge.OnEnter += new hook_OnEnter(OnLaserChargeEnter); LunarGazeLaserFire.OnEnter += new hook_OnEnter(OnLaserFireEnter); LunarGazeLaserFire.FixedUpdate += new hook_FixedUpdate(OnLaserFireUpdate); LunarGazeLaserFire.OnExit += new hook_OnExit(OnLaserFireExit); LunarGazeLaserFire.UpdateTargettingLasers += new hook_UpdateTargettingLasers(OnLaserFireTarget); LunarGazeLaserFire.RetractLasers += new hook_RetractLasers(OnLaserFireRetract); CharacterBody.AddTimedBuff_BuffDef_float_int += new hook_AddTimedBuff_BuffDef_float_int(LaserTargetingDecay); } private void OnTestLaser(orig_OnEnter orig, LaserFatherCharged self) { orig.Invoke(self); } private void LaserTargetingDecay(orig_AddTimedBuff_BuffDef_float_int orig, CharacterBody self, BuffDef buffDef, float duration, int maxStacks) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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) orig.Invoke(self, buffDef, duration, maxStacks); if (!((Object)(object)buffDef == (Object)(object)Main.LaserTargetDebuff)) { return; } BuffIndex buffIndex = buffDef.buffIndex; int num = 0; for (int i = 0; i < self.timedBuffs.Count; i++) { TimedBuff val = self.timedBuffs[i]; if (val.buffIndex == buffIndex) { num++; val.timer = 0.1f + (float)num * 0.2f; val.totalDuration = 0.1f + (float)num * 0.2f; } } } private void OnLaserChargeEnter(orig_OnEnter orig, LunarGazeLaserCharge self) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 //IL_0019: 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_0025: Expected I4, but got Unknown if ((int)MeridianEventTriggerInteraction.instance.meridianEventState > 0) { currentPhase = MeridianEventTriggerInteraction.instance.meridianEventState - 1; } orig.Invoke(self); } private void OnLaserFireEnter(orig_OnEnter orig, LunarGazeLaserFire self) { //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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((BaseState)self).attackSpeedStat = ((EntityState)self).characterBody.attackSpeed; ((BaseState)self).damageStat = ((EntityState)self).characterBody.damage; ((BaseState)self).critStat = ((EntityState)self).characterBody.crit; ((BaseState)self).moveSpeedStat = ((EntityState)self).characterBody.moveSpeed; } Util.PlaySound(self.playAttackSoundString, ((Component)MeridianEventTriggerInteraction.instance.arenaCenter).gameObject); if (((EntityState)self).isAuthority) { ((EntityState)self).characterBody.RecalculateStats(); } AimAnimator aimAnimator = ((EntityState)self).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = true; } self.meridianStatueHeadObject = ((EntityState)self).gameObject; self.meridianStatueHeadTransform = self.meridianStatueHeadObject.transform; MeshRenderer component = ((Component)MeridianEventTriggerInteraction.instance.colossusHeadEyeMeshRenderer).GetComponent(); self.currentEyeColor = ((Renderer)component).material.GetColor("_Color"); self.currentEyeEmissionColor = ((Renderer)component).material.GetColor("_EmColor"); if (Object.op_Implicit((Object)(object)self.meridianStatueHeadTransform)) { ChildLocator component2 = ((Component)self.meridianStatueHeadTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { self.muzzleTransform = component2.FindChild("HeadMuzzleLaser"); } } if (Object.op_Implicit((Object)(object)self.burstEffectPrefab)) { Object.Instantiate(self.burstEffectPrefab, self.muzzleTransform.position, self.muzzleTransform.rotation).transform.parent = self.muzzleTransform; } self.laserTargetStartTransform = MeridianEventTriggerInteraction.instance.arenaCenter; self.aimRay = new Ray(self.meridianStatueHeadTransform.position, self.meridianStatueHeadTransform.forward); self.enemyFinder = new BullseyeSearch(); if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { self.enemyFinder.viewer = ((EntityState)self).characterBody; } self.enemyFinder.maxDistanceFilter = self.maxDistance; self.enemyFinder.maxAngleFilter = self.lockOnAngle; self.enemyFinder.searchOrigin = ((Ray)(ref self.aimRay)).origin; self.enemyFinder.searchDirection = ((Ray)(ref self.aimRay)).direction; self.enemyFinder.filterByLoS = false; self.enemyFinder.sortMode = (SortMode)2; self.enemyFinder.teamMaskFilter = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)((EntityState)self).teamComponent)) { ((TeamMask)(ref self.enemyFinder.teamMaskFilter)).RemoveTeam(((EntityState)self).teamComponent.teamIndex); } self.enemyFinder.searchOrigin = ((Ray)(ref self.aimRay)).origin; self.enemyFinder.searchDirection = ((Ray)(ref self.aimRay)).direction; self.enemyFinder.maxAngleFilter = 270f; self.enemyFinder.maxDistanceFilter = 9999f; self.enemyFinder.filterByLoS = false; self.enemyFinder.RefreshCandidates(); IEnumerable results = self.enemyFinder.GetResults(); laserTargets = new List(); foreach (HurtBox item in results) { if (Object.op_Implicit((Object)(object)item.healthComponent)) { CharacterBody component3 = ((Component)item.healthComponent).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component3) && component3.isPlayerControlled && Object.op_Implicit((Object)(object)self.muzzleTransform) && Object.op_Implicit((Object)(object)self.laserPrefab) && Object.op_Implicit((Object)(object)laserAimPrefab)) { LaserTargetInfo2 laserTargetInfo = new LaserTargetInfo2(); laserTargetInfo.laserEffect = Object.Instantiate(laserAimPrefab, self.muzzleTransform.position, self.muzzleTransform.rotation); Main.SetAlpha(laserTargetInfo.laserEffect, 0.5f); laserTargetInfo.laserEffect2 = Object.Instantiate(self.laserPrefab, self.muzzleTransform.position, self.muzzleTransform.rotation); laserTargetInfo.laserEffect.transform.parent = self.muzzleTransform; laserTargetInfo.laserEffect2.transform.parent = self.muzzleTransform; ChildLocator component4 = laserTargetInfo.laserEffect.GetComponent(); laserTargetInfo.laserEffectEnd = component4.FindChild("LaserEnd"); Util.PlaySound(self.playLoopSoundString, ((Component)laserTargetInfo.laserEffectEnd).gameObject); laserTargetInfo.laserEffect2.SetActive(false); laserTargetInfo.laserActive = false; laserTargetInfo.hurtbox = item; laserTargetInfo.body = component3; laserTargetInfo.lastLockedOnPosition = ((Component)self.laserTargetStartTransform).transform.position; laserTargets.Add(laserTargetInfo); } } } } private void OnLaserFireUpdate(orig_FixedUpdate orig, LunarGazeLaserFire self) { //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Expected O, but got Unknown //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); foreach (LaserTargetInfo2 laserTarget in laserTargets) { if (!Object.op_Implicit((Object)(object)laserTarget.laserEffect) || !Object.op_Implicit((Object)(object)laserTarget.laserEffect2) || !Object.op_Implicit((Object)(object)laserTarget.body)) { continue; } if (!laserTarget.isLockOnDelayComplete) { float alpha = Mathf.Max(0.05f, 0.5f - self.stopwatch / (self.stopwatch + 0.75f)); Main.SetAlpha(laserTarget.laserEffect, alpha); } else { if (laserTarget.debuffTracker == laserTarget.body.GetBuffCount(LaserTargetDebuff)) { continue; } laserTarget.debuffTracker = laserTarget.body.GetBuffCount(LaserTargetDebuff); if (!laserTarget.laserActive) { float alpha2 = 0.05f + (float)laserTarget.debuffTracker * (float)laserTarget.debuffTracker * 0.01f; Main.SetAlpha(laserTarget.laserEffect, alpha2); } if (!laserTarget.laserActive && laserTarget.body.HasBuff(LaserTargetDebuff) && laserTarget.body.GetBuffCount(LaserTargetDebuff) >= 10) { if (laserTarget.body.HasBuff(Buffs.Parrying)) { DamageInfo val = new DamageInfo { position = laserTarget.body.transform.position, attacker = ((EntityState)self).gameObject, inflictor = ((EntityState)self).gameObject, damage = 0f, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), crit = false, procChainMask = default(ProcChainMask), procCoefficient = 0f }; laserTarget.body.healthComponent.ProcParry(val); laserTarget.body.SetBuffCount(LaserTargetDebuff.buffIndex, 0); } else { laserTarget.laserActive = true; laserTarget.laserEffect2.SetActive(true); laserTarget.laserEffect2.transform.position = laserTarget.laserEffect.transform.position; laserTarget.laserEffect2.transform.rotation = laserTarget.laserEffect.transform.rotation; ChildLocator component = laserTarget.laserEffect2.GetComponent(); laserTarget.laserEffectEnd = component.FindChild("LaserEnd"); laserTarget.laserEffect.SetActive(false); } } else if (laserTarget.laserActive && laserTarget.body.GetBuffCount(LaserTargetDebuff) < 10) { laserTarget.laserActive = false; laserTarget.laserEffect.SetActive(true); laserTarget.laserEffect.transform.position = laserTarget.laserEffect2.transform.position; laserTarget.laserEffect.transform.rotation = laserTarget.laserEffect2.transform.rotation; ChildLocator component2 = laserTarget.laserEffect.GetComponent(); laserTarget.laserEffectEnd = component2.FindChild("LaserEnd"); laserTarget.laserEffect2.SetActive(false); } } } } private void OnLaserFireExit(orig_OnExit orig, LunarGazeLaserFire self) { foreach (LaserTargetInfo2 laserTarget in laserTargets) { Util.PlaySound(self.stopLoopSoundString, ((Component)laserTarget.laserEffectEnd).gameObject); EntityState.Destroy((Object)(object)laserTarget.laserEffect); EntityState.Destroy((Object)(object)laserTarget.laserEffect2); } } private void OnLaserFireTarget(orig_UpdateTargettingLasers orig, LunarGazeLaserFire self) { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Invalid comparison between Unknown and I4 //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) self.lockOnDelayDuration = 1f; self.fireFrequency = 4f; self.lunarRuinProcChancePerBullet = 100f; self.duration = 13f; if (currentPhase == 3) { self.lockOnDelayDuration = 0.75f; } List list = laserTargets; float deltaTime = ((EntityState)self).GetDeltaTime(); Ray val3 = default(Ray); RaycastHit val4 = default(RaycastHit); RaycastHit val5 = default(RaycastHit); foreach (LaserTargetInfo2 laserTarget in laserTargets) { Vector3 val; if (Object.op_Implicit((Object)(object)laserTarget.body) && (int)laserTarget.body.GetVisibilityLevel(((EntityState)self).characterBody) >= 3) { val = ((Component)laserTarget.hurtbox).transform.position; } else { laserTarget.lastLockedOnPosition = ((Component)laserTarget.laserEffectEnd).transform.position; laserTarget.isLockOnDelayComplete = false; laserTarget.lockOnStopwatch = 0f; val = laserTarget.lastLockedOnPosition; } if (!laserTarget.isLockOnDelayComplete) { laserTarget.lockOnStopwatch += deltaTime; float num = laserTarget.lockOnStopwatch / self.lockOnDelayDuration; float num2 = num * num; val = Vector3.Lerp(laserTarget.lastLockedOnPosition, val, Mathf.Min(num2, 1f)); laserTarget.isLockOnDelayComplete = num >= 1f; } else { laserTarget.lastLockedOnPosition = val; } Vector3 val2 = val - self.muzzleTransform.position; ((Ray)(ref val3))..ctor(self.muzzleTransform.position, val2); if (!laserTarget.laserActive && Object.op_Implicit((Object)(object)laserTarget.laserEffect)) { val = ((!Util.CharacterRaycast(self.meridianStatueHeadObject, val3, ref val4, self.maxDistance, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)0)) ? laserTarget.body.transform.position : ((RaycastHit)(ref val4)).point); laserTarget.laserEffect.transform.rotation = Util.QuaternionSafeLookRotation(val - self.muzzleTransform.position); ((Component)laserTarget.laserEffectEnd).transform.position = val; } if (laserTarget.laserActive && Object.op_Implicit((Object)(object)laserTarget.laserEffect2)) { val = ((!Util.CharacterRaycast(self.meridianStatueHeadObject, val3, ref val5, self.maxDistance, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)0)) ? laserTarget.body.transform.position : ((RaycastHit)(ref val5)).point); laserTarget.laserEffect2.transform.rotation = Util.QuaternionSafeLookRotation(val - self.muzzleTransform.position); ((Component)laserTarget.laserEffectEnd).transform.position = val; } if (self.fireStopwatch > 1f / self.fireFrequency) { string targetMuzzle = "HeadMuzzleLaser"; Transform meridianStatueHeadTransform = self.meridianStatueHeadTransform; Ray aimRay = val3; Vector3 val6 = val - ((Ray)(ref val3)).origin; ModdedFireBullet(self, laserTarget, meridianStatueHeadTransform, aimRay, targetMuzzle, ((Vector3)(ref val6)).magnitude + 0.1f, val); } } } private void OnLaserFireRetract(orig_RetractLasers orig, LunarGazeLaserFire self) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0150: 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_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) List list = laserTargets; Ray val3 = default(Ray); RaycastHit val6 = default(RaycastHit); RaycastHit val8 = default(RaycastHit); foreach (LaserTargetInfo2 laserTarget in laserTargets) { float num = self.windDownStopwatch / self.windDownDuration; float num2 = num * num * num; ((Component)laserTarget.laserEffectEnd).transform.position = Vector3.Lerp(((Component)laserTarget.laserEffectEnd).transform.position, self.muzzleTransform.position, Mathf.Min(num2, 1f)); Vector3 val = ((Component)laserTarget.laserEffectEnd).transform.position - self.muzzleTransform.position; Vector3 val2 = ((Component)laserTarget.laserEffectEnd).transform.position; ((Ray)(ref val3))..ctor(self.muzzleTransform.position, val); Vector3 val5; if (!laserTarget.laserActive && Object.op_Implicit((Object)(object)laserTarget.laserEffect)) { GameObject meridianStatueHeadObject = self.meridianStatueHeadObject; Ray val4 = val3; val5 = val2 - self.muzzleTransform.position; if (Util.CharacterRaycast(meridianStatueHeadObject, val4, ref val6, ((Vector3)(ref val5)).magnitude, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)0)) { val2 = ((RaycastHit)(ref val6)).point; } laserTarget.laserEffect.transform.rotation = Util.QuaternionSafeLookRotation(val2 - self.muzzleTransform.position); ((Component)laserTarget.laserEffectEnd).transform.position = val2; } else if (laserTarget.laserActive && Object.op_Implicit((Object)(object)laserTarget.laserEffect2)) { GameObject meridianStatueHeadObject2 = self.meridianStatueHeadObject; Ray val7 = val3; val5 = val2 - self.muzzleTransform.position; if (Util.CharacterRaycast(meridianStatueHeadObject2, val7, ref val8, ((Vector3)(ref val5)).magnitude, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)0)) { val2 = ((RaycastHit)(ref val8)).point; } laserTarget.laserEffect2.transform.rotation = Util.QuaternionSafeLookRotation(val2 - self.muzzleTransform.position); ((Component)laserTarget.laserEffectEnd).transform.position = val2; } if (self.fireStopwatch > 1f / self.fireFrequency) { string targetMuzzle = "HeadMuzzleLaser"; Transform meridianStatueHeadTransform = self.meridianStatueHeadTransform; Ray aimRay = val3; val5 = val2 - ((Ray)(ref val3)).origin; ModdedFireBullet(self, laserTarget, meridianStatueHeadTransform, aimRay, targetMuzzle, ((Vector3)(ref val5)).magnitude + 0.1f, val2); } } } private void ModdedFireBullet(LunarGazeLaserFire self, LaserTargetInfo2 laserTargetInfo, Transform modelTransform, Ray aimRay, string targetMuzzle, float maxDistance, Vector3 vector) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_005b: 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_0069: 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_0081: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) DamageTypeCombo damageType = new DamageTypeCombo { damageType = (DamageType)0, damageTypeExtended = (DamageTypeExtended)0, damageSource = (DamageSource)0 }; if (!((EntityState)self).isAuthority) { return; } BulletAttack val = new BulletAttack { owner = ((EntityState)self).gameObject, weapon = ((EntityState)self).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = self.minSpread, maxSpread = self.maxSpread, bulletCount = 1u, damage = 3.25f * ((BaseState)self).damageStat, force = self.force, damageType = damageType, muzzleName = targetMuzzle, hitEffectPrefab = self.hitEffectPrefab, procCoefficient = 1f, HitEffectNormal = false, radius = 0.6f, maxDistance = maxDistance, stopperMask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, hitMask = CommonMasks.bullet }; if (laserTargetInfo.laserActive) { DamageAPI.AddModdedDamageType(val, DamageTypes.stormboundLaser); if (Object.op_Implicit((Object)(object)self.effectPrefab)) { EffectManager.SimpleMuzzleFlash(self.effectPrefab, ((EntityState)self).gameObject, targetMuzzle, false); } } else { DamageAPI.AddModdedDamageType(val, DamageTypes.stormboundLaserTargeting); } val.Fire(); BlastAttack val2 = new BlastAttack(); val2.attacker = ((EntityState)self).gameObject; val2.damageColorIndex = (DamageColorIndex)3; val2.baseDamage = 1f; val2.radius = 2f; val2.falloffModel = (FalloffModel)0; val2.procCoefficient = LunarRainDeathState.explosionProcCoefficient; val2.teamIndex = (TeamIndex)2; val2.damageType = DamageTypeCombo.op_Implicit((DamageType)131072); val2.position = vector; val2.baseForce = 0f; val2.attackerFiltering = (AttackerFiltering)2; DamageAPI.AddModdedDamageType(val2, DamageTypes.stormboundLaserCrystal); val2.Fire(); } } public class GeodeChanges { public static GameObject geodePrefab = Addressables.LoadAssetAsync((object)RoR2_DLC2.Geode_prefab).WaitForCompletion(); public static GameObject geode1; public static GameObject geode2; public static GameObject geode3; public static GameObject geode4; public static GeodeHalcyoniteMainController geodeMain; public void Initialize() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown geodePrefab.AddComponent(); MeridianEventTriggerInteraction.HandleFSBFPhase1State += new hook_HandleFSBFPhase1State(OnPhase1State); MeridianEventTriggerInteraction.HandleFSBFPhase3State += new hook_HandleFSBFPhase3State(OnPhase3State); MeridianEventTriggerInteraction.HandleMeridianEventClearedState += new hook_HandleMeridianEventClearedState(OnClearedState); MeridianEventTriggerInteraction.Start += new hook_Start(OnMeridianStart); MeridianEventTriggerInteraction.SpawnOuterGeodes += new hook_SpawnOuterGeodes(OnMeridianSpawnGeodes); GeodeController.OnInteractionBegin += new hook_OnInteractionBegin(OnGeodeInteract); GeodeInert.FixedUpdate += new hook_FixedUpdate(OnGeodeUpdate); GeodeShatter.HandleCleanseNearbyPlayers += new Manipulator(IL_GeodeShatter); GlobalEventManager.onCharacterDeathGlobal += OnHalcDeath; RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnRecalcGeodeStats); MeridianEventTriggerInteraction.OnMiddleRingStartFalling += new Manipulator(IL_MiddleRingFalling); MeridianEventTriggerInteraction.OnOuterRingStartFalling += new Manipulator(IL_OuterRingFalling); MeridianEventTriggerInteraction.HandleEventClearedFX += new Manipulator(IL_EventClearedFX); } private void OnMeridianStart(orig_Start orig, MeridianEventTriggerInteraction self) { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); GeodeHalcyoniteMainController.geodeMax = 3; ((MonoBehaviour)self).StartCoroutine(RemoveGeodesWithDelay(self, 5f)); geodeMain = ((Component)self).gameObject.AddComponent(); geodeMain.meridianEvent = self; geodeMain.geodeNumber = 0; Vector3 position = ((Component)self.arenaCenter).transform.position; if (NetworkServer.active) { if ((Object)(object)geode1 == (Object)null) { Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(170f, position.y - 0.8f, -108.2f); geode1 = Object.Instantiate(geodePrefab, val, Quaternion.identity); NetworkServer.Spawn(geode1); GeodeHalcyoniteController component = geode1.GetComponent(); component.mainController = geodeMain; component.Networknum = 1; component.UpdateNum(1); geodeMain.geode1 = component; } if ((Object)(object)geode2 == (Object)null) { Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(53.6f, position.y - 0.8f, -150.75f); geode2 = Object.Instantiate(geodePrefab, val2, Quaternion.identity); NetworkServer.Spawn(geode2); GeodeHalcyoniteController component2 = geode2.GetComponent(); component2.mainController = geodeMain; component2.Networknum = 2; component2.UpdateNum(2); geodeMain.geode2 = component2; } } } private void OnMeridianSpawnGeodes(orig_SpawnOuterGeodes orig, MeridianEventTriggerInteraction self, bool state, float spawnDelay = 0f) { if (NetworkServer.active) { ((MonoBehaviour)self).StartCoroutine(RemoveGeodesWithDelay(self, 1f)); } } private IEnumerator RemoveGeodesWithDelay(MeridianEventTriggerInteraction self, float delay) { yield return (object)new WaitForSeconds(delay); NetworkServer.Destroy(self.arenaGeode1); NetworkServer.Destroy(self.arenaGeode2); NetworkServer.Destroy(self.arenaGeode3); NetworkServer.Destroy(self.arenaGeode4); GameObject arenaGeode5 = GameObject.Find("GeodeInnerRing5"); if ((Object)(object)arenaGeode5 != (Object)null) { NetworkServer.Destroy(arenaGeode5); } GameObject arenaGeode6 = GameObject.Find("GeodeInnerRing4"); if ((Object)(object)arenaGeode6 != (Object)null) { NetworkServer.Destroy(arenaGeode6); } GameObject arenaGeode7 = GameObject.Find("GeodeInnerRing3"); if ((Object)(object)arenaGeode7 != (Object)null) { NetworkServer.Destroy(arenaGeode7); } GameObject arenaGeode8 = GameObject.Find("GeodeInnerRing2"); if ((Object)(object)arenaGeode8 != (Object)null) { NetworkServer.Destroy(arenaGeode8); } GameObject arenaGeode9 = GameObject.Find("GeodeInnerRing1"); if ((Object)(object)arenaGeode9 != (Object)null) { NetworkServer.Destroy(arenaGeode9); } } private void OnPhase1State(orig_HandleFSBFPhase1State orig, MeridianEventTriggerInteraction self) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (NetworkServer.active) { Vector3 position = ((Component)self.arenaCenter).transform.position; if ((Object)(object)geode3 == (Object)null) { Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(65.5f, position.y - 0.8f, -33.56f); geode3 = Object.Instantiate(geodePrefab, val, Quaternion.identity); NetworkServer.Spawn(geode3); GeodeHalcyoniteController component = geode3.GetComponent(); component.mainController = geodeMain; component.Networknum = 3; component.UpdateNum(3); geodeMain.geode3 = component; } } } private void OnPhase3State(orig_HandleFSBFPhase3State orig, MeridianEventTriggerInteraction self) { orig.Invoke(self); GeodeHalcyoniteController component = geode3.GetComponent(); if ((Object)(object)component != (Object)null && !component.geodeActive && !geodeMain.halcSpawned) { geodeMain.geodeNumber--; } geode3.SetActive(false); GeodeHalcyoniteMainController.geodeMax = 2; } private void OnClearedState(orig_HandleMeridianEventClearedState orig, MeridianEventTriggerInteraction self) { //IL_0069: 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) orig.Invoke(self); geode1.SetActive(false); geode2.SetActive(false); GeodeHalcyoniteMainController.geodeMax = 4; if ((Object)(object)geodeMain.halcBody != (Object)null && (Object)(object)geodeMain.halcBody.healthComponent != (Object)null) { geodeMain.halcBody.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); } } private void OnGeodeUpdate(orig_FixedUpdate orig, GeodeInert self) { //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown GeodeHalcyoniteController geodeHalcyoniteController = default(GeodeHalcyoniteController); if ((Object)(object)((EntityState)self).gameObject != (Object)null && ((EntityState)self).gameObject.TryGetComponent(ref geodeHalcyoniteController) && geodeHalcyoniteController.num > 0) { ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime(); if (!((GeodeEntityStates)self).geodeController.ShouldRegenerate) { EntityState.Destroy((Object)(object)((EntityState)self).gameObject); } if (geodeHalcyoniteController.geodeActive) { geodeHalcyoniteController.NetworkgeodeActive = false; geodeMain.lastGeode = geodeHalcyoniteController.num; geodeMain.geodeNumber++; } else if (geodeHalcyoniteController.regenerating) { geodeHalcyoniteController.Networkregenerating = false; geodeHalcyoniteController.NetworkgeodeActive = true; ((EntityState)self).outer.SetNextState((EntityState)new GeodeRegenerate()); } } else { orig.Invoke(self); } } private void OnGeodeEnter(orig_OnEnter orig, GeodeInert self) { orig.Invoke(self); GeodeHalcyoniteController geodeHalcyoniteController = default(GeodeHalcyoniteController); if ((Object)(object)((EntityState)self).gameObject != (Object)null && ((EntityState)self).gameObject.TryGetComponent(ref geodeHalcyoniteController) && geodeHalcyoniteController.geodeActive) { geodeHalcyoniteController.NetworkgeodeActive = false; geodeMain.lastGeode = geodeHalcyoniteController.num; geodeMain.geodeNumber++; } } private void OnGeodeInteract(orig_OnInteractionBegin orig, GeodeController self, Interactor activator) { GeodeHalcyoniteController geodeHalcyoniteController = default(GeodeHalcyoniteController); if ((Object)(object)((Component)self).gameObject != (Object)null && ((Component)self).gameObject.TryGetComponent(ref geodeHalcyoniteController) && geodeHalcyoniteController.geodeActive) { geodeHalcyoniteController.NetworkgeodeActive = false; geodeMain.lastGeode = geodeHalcyoniteController.num; geodeMain.geodeNumber++; } orig.Invoke(self, activator); } private void OnHalcDeath(DamageReport report) { GameObject gameObject = ((Component)report.victim.body).gameObject; if ((Object)(object)gameObject != (Object)null && (Object)(object)geodeMain != (Object)null) { StormboundHalcyonite component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { geodeMain.geodeNumber = 0; Log.Message("Dieded..... ):"); } else if ((Object)(object)report.victim.body == (Object)(object)geodeMain.halcBody) { geodeMain.geodeNumber = 0; Log.Message("Diedededeed..... ):"); } } } public void IL_GeodeShatter(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: 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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; int loc1 = -1; if (val.TryGotoNext(val3, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(HealthComponent), "body"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc1) })) { int loc2 = -1; int loc3 = -1; if (val.TryGotoNext(val3, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc2), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc3), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, loc1), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "DisableAllSkills") })) { val.Index -= 2; val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc, loc1); val.EmitDelegate>((Func)delegate(GeodeShatter self, CharacterBody body) { if (((EntityState)self).fixedAge >= 2f) { return false; } if (!body.HasBuff(Main.GeodeStatBuff)) { body.AddTimedBuff(Main.GeodeStatBuff, 2f); return true; } return false; }); val.Emit(OpCodes.Stloc, loc2); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private void OnRecalcGeodeStats(CharacterBody sender, StatHookEventArgs args) { if ((Object)(object)sender != (Object)null && (Object)(object)sender.healthComponent != (Object)null && sender.HasBuff(Main.GeodeStatBuff)) { float num = sender.healthComponent.fullHealth * 0.05f; args.baseRegenAdd += num; args.moveSpeedMultAdd += 0.4f; } } public void IL_MiddleRingFalling(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)2; if (val.TryGotoNext(val2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(MeridianEventTriggerInteraction), "arenaGeode4"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(GameObject), "SetActive") })) { val.Index -= 4; val.RemoveRange(4); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_OuterRingFalling(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(MeridianEventTriggerInteraction), "arenaGeode3"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(GameObject), "SetActive") })) { val.Index -= 4; val.RemoveRange(4); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_EventClearedFX(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[8] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(MeridianEventTriggerInteraction), "arenaGeode1"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(GameObject), "SetActive"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(MeridianEventTriggerInteraction), "arenaGeode2"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(GameObject), "SetActive") })) { val.Index -= 8; val.RemoveRange(8); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } } public class GeodeHalcyoniteController : NetworkBehaviour { public GeodeHalcyoniteMainController mainController; [SyncVar] public GameObject geode; [SyncVar] public bool regenerating = false; [SyncVar] public bool geodeActive = true; [SyncVar(hook = "OnNumChanged")] public int num; public GameObject tether = Addressables.LoadAssetAsync((object)RoR2_DLC2.GoldSiphonTetherVFX_prefab).WaitForCompletion(); private NetworkInstanceId ___geodeNetId; public GameObject Networkgeode { get { return geode; } [param: In] set { ((NetworkBehaviour)this).SetSyncVarGameObject(value, ref geode, 1u, ref ___geodeNetId); } } public bool Networkregenerating { get { return regenerating; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref regenerating, 2u); } } public bool NetworkgeodeActive { get { return geodeActive; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref geodeActive, 4u); } } public int Networknum { get { return num; } [param: In] set { ref int reference = ref num; if (NetworkServer.localClientActive && !((NetworkBehaviour)this).syncVarHookGuard) { ((NetworkBehaviour)this).syncVarHookGuard = true; OnNumChanged(value); ((NetworkBehaviour)this).syncVarHookGuard = false; } ((NetworkBehaviour)this).SetSyncVar(value, ref reference, 8u); } } public void Start() { Networkgeode = ((Component)this).gameObject; TetherVfxOrigin val = ((Component)this).gameObject.AddComponent(); val.tetherPrefab = tether; } public void TetherToTarget(Transform target) { TetherVfxOrigin component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.AddTether(target); } } public void Untether() { List tetheredTransforms = new List(); TetherVfxOrigin component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.SetTetheredTransforms(tetheredTransforms); } } public void OnDestroy() { Untether(); } [Server] public void UpdateNum(int newValue) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void StormboundFalseSon.Changes.GeodeHalcyoniteController::UpdateNum(System.Int32)' called on client"); } else { OnNumChanged(newValue); } } private void OnNumChanged(int newValue) { Networknum = newValue; if (num == 1) { GeodeChanges.geode1 = ((Component)this).gameObject; GeodeChanges.geodeMain.geode1 = this; } if (num == 2) { GeodeChanges.geode2 = ((Component)this).gameObject; GeodeChanges.geodeMain.geode2 = this; } if (num == 3) { GeodeChanges.geode3 = ((Component)this).gameObject; GeodeChanges.geodeMain.geode3 = this; } } public override void OnStartClient() { ((NetworkBehaviour)this).OnStartClient(); OnNumChanged(num); Log.Message(num); TetherVfxOrigin component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { component = ((Component)this).gameObject.AddComponent(); component.tetherPrefab = tether; } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(geode); writer.Write(regenerating); writer.Write(geodeActive); writer.WritePackedUInt32((uint)num); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & 1) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(geode); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 2) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(regenerating); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 4) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(geodeActive); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 8) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.WritePackedUInt32((uint)num); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { //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) if (initialState) { ___geodeNetId = reader.ReadNetworkId(); regenerating = reader.ReadBoolean(); geodeActive = reader.ReadBoolean(); this.num = (int)reader.ReadPackedUInt32(); return; } int num = (int)reader.ReadPackedUInt32(); if ((num & 1) != 0) { geode = reader.ReadGameObject(); } if ((num & 2) != 0) { regenerating = reader.ReadBoolean(); } if ((num & 4) != 0) { geodeActive = reader.ReadBoolean(); } if ((num & 8) != 0) { OnNumChanged((int)reader.ReadPackedUInt32()); } } public override void PreStartClient() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkInstanceId)(ref ___geodeNetId)).IsEmpty()) { Networkgeode = ClientScene.FindLocalObject(___geodeNetId); } } } public class StormboundHalcyonite : NetworkBehaviour { public GeodeHalcyoniteMainController mainController; public CharacterBody halcBody; public TetherVfxOrigin tetherVfxOrigin; public GameObject tetherPrefab = Addressables.LoadAssetAsync((object)RoR2_DLC2.GoldSiphonTetherVFX_prefab).WaitForCompletion(); public List tetherList = new List(); public void Start() { } public void FixedUpdate() { } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class GeodeHalcyoniteMainController : NetworkBehaviour { public int geodeNumber; public static int geodeMax = 2; public int lastGeode; public MeridianEventTriggerInteraction meridianEvent; public GameObject owner; public GeodeHalcyoniteController geode1; public GeodeHalcyoniteController geode2; public GeodeHalcyoniteController geode3; public GeodeHalcyoniteController geode4; public bool halcSpawned = false; public CharacterBody halcBody; public SpawnCard halcyoniteSpawnCard = Addressables.LoadAssetAsync((object)RoR2_DLC2_Halcyonite.cscHalcyonite_asset).WaitForCompletion(); private void OnEnable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterModel.Start += new hook_Start(HalcChangeSize); } private void HalcChangeSize(orig_Start orig, CharacterModel self) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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_0092: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!Object.op_Implicit((Object)(object)self.body) || !Object.op_Implicit((Object)(object)self.body.masterObject)) { return; } StormboundHalcyonite component = self.body.masterObject.GetComponent(); if ((Object)(object)component != (Object)null) { Transform transform = ((Component)self).transform; transform.localScale *= 1.2f; if (Object.op_Implicit((Object)(object)self.body.aimOriginTransform)) { Transform aimOriginTransform = self.body.aimOriginTransform; aimOriginTransform.localPosition *= 1.25f; } } } private void OnDisable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterModel.Start -= new hook_Start(HalcChangeSize); } public void Start() { owner = ((Component)this).gameObject; } public void FixedUpdate() { if (geodeNumber < 0) { geodeNumber = 0; } if (geodeNumber >= geodeMax && !halcSpawned) { SpawnHalcyonite(); } if (geodeNumber == 0 && halcSpawned) { halcSpawned = false; RegenerateGeodes(); } } public void SpawnHalcyonite() { //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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)meridianEvent.arenaCenter).transform.position; Vector3 position2 = position; if (lastGeode == 1) { ((Vector3)(ref position2))..ctor(90f, position.y, -150f); } if (lastGeode == 2) { ((Vector3)(ref position2))..ctor(140f, position.y, -135f); } if (lastGeode == 3) { ((Vector3)(ref position2))..ctor(120f, position.y, -170f); } DirectorPlacementRule val = new DirectorPlacementRule { placementMode = (PlacementMode)3, minDistance = 0f, maxDistance = 50f, position = position2 }; DirectorSpawnRequest val2 = new DirectorSpawnRequest(halcyoniteSpawnCard, val, Run.instance.runRNG); val2.teamIndexOverride = (TeamIndex)2; val2.ignoreTeamMemberLimit = true; val2.onSpawnedServer = (Action)Delegate.Combine(val2.onSpawnedServer, (Action)delegate(SpawnResult result) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00dc: Unknown result type (might be due to invalid IL or missing references) if (result.success) { CharacterMaster component2 = result.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { Inventory inventory = component2.inventory; if (Object.op_Implicit((Object)(object)inventory)) { inventory.GiveItemPermanent(Items.TeleportWhenOob, 1); inventory.GiveItemPermanent(Items.UseAmbientLevel, 1); if (Main.hardMode) { List list = new List { Elites.Ice.eliteEquipmentDef.equipmentIndex, Elites.Fire.eliteEquipmentDef.equipmentIndex, Elites.Lightning.eliteEquipmentDef.equipmentIndex, Elites.Aurelionite.eliteEquipmentDef.equipmentIndex }; int index = Random.RandomRangeInt(0, list.Count); inventory.SetEquipmentIndex(list[index], true); inventory.GiveItemPermanent(Items.AdaptiveArmor, 1); } float num = 10f; float num2 = 0f; if (Main.HasHalcyonKnight && Main.knightEnable.Value) { num = 5f; num2 = 0f; } inventory.GiveItemPermanent(Items.BoostHp, Mathf.RoundToInt(num)); inventory.GiveItemPermanent(Items.BoostDamage, Mathf.RoundToInt(num2)); } } } }); GameObject val3 = DirectorCore.instance.TrySpawnObject(val2); if (!((Object)(object)val3 != (Object)null)) { return; } CharacterMaster component = val3.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Log.Message("HIII!! it me (:"); halcSpawned = true; CharacterBody body = component.GetBody(); StormboundHalcyonite stormboundHalcyonite = ((Component)body).gameObject.AddComponent(); stormboundHalcyonite.halcBody = body; halcBody = body; if ((Object)(object)geode1 != (Object)null) { geode1.TetherToTarget(body.transform); } if ((Object)(object)geode2 != (Object)null) { geode2.TetherToTarget(body.transform); } if (geodeMax <= 3 && (Object)(object)geode3 != (Object)null) { geode3.TetherToTarget(body.transform); } if (geodeMax <= 4 && (Object)(object)geode4 != (Object)null) { geode4.TetherToTarget(body.transform); } stormboundHalcyonite.mainController = this; } } public void RegenerateGeodes() { if ((Object)(object)geode1 != (Object)null && !geode1.geodeActive && geode1.geode.activeInHierarchy) { geode1.Untether(); geode1.Networkregenerating = true; } if ((Object)(object)geode2 != (Object)null && !geode2.geodeActive && geode2.geode.activeInHierarchy) { geode2.Untether(); geode2.Networkregenerating = true; } if (geodeMax <= 3 && (Object)(object)geode3 != (Object)null && !geode3.geodeActive && geode3.geode.activeInHierarchy) { geode3.Untether(); geode3.Networkregenerating = true; } if (geodeMax <= 4 && (Object)(object)geode4 != (Object)null && !geode4.geodeActive && geode4.geode.activeInHierarchy) { geode4.Untether(); geode4.Networkregenerating = true; } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class AurelioniteChanges { public class AurelioniteLaserController : MonoBehaviour { public float projectileStopwatch = 0f; public float projectileFireFrequency = 8f; public float baseFireFrequency = 8f; public Transform modelTransform; public Transform muzzleTransform; public Vector3 laserDirection; public void Init(ChargeMegaLaser self) { projectileFireFrequency = baseFireFrequency; modelTransform = ((EntityState)self).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { muzzleTransform = component.FindChild("MuzzleLaser"); } } } } public class GoldRockController : NetworkBehaviour { public Vector3 aimDirection = new Vector3(1f, 0.25f, 1f); public int laserCount = 18; public float currentAngle = 0f; public float stopwatch = 0f; public float vfxStopwatch = 0f; public float vfxInterval = 1f; public bool startedFiring = false; public TitanRockController rockController; public GameObject rockObject; public GameObject auriObject; public CharacterBody auriBody; public List lasers = new List(); public List laserEnds = new List(); public void FixedUpdate() { if ((Object)(object)rockController == (Object)null || (Object)(object)rockObject == (Object)null || (Object)(object)auriBody == (Object)null || (Object)(object)auriObject == (Object)null) { CleanupAndDestroy(); } } public void OnDestroy() { CleanupAndDestroy(); } public void CleanupAndDestroy() { for (int i = 0; i < lasers.Count; i++) { EntityState.Destroy((Object)(object)lasers[i]); } if (Object.op_Implicit((Object)(object)rockController)) { Object.Destroy((Object)(object)rockController); } if (Object.op_Implicit((Object)(object)rockObject)) { Object.Destroy((Object)(object)rockObject); } } public void UpdateLasers(TitanRockController self) { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) stopwatch += Time.fixedDeltaTime; bool flag = false; if (!(stopwatch >= startDelay)) { return; } self.fireTimer -= Time.fixedDeltaTime; if (self.fireTimer <= 0f) { flag = true; self.fireTimer += laserInterval; } if (stopwatch >= goldRockDuration) { CleanupAndDestroy(); } Vector3 position = ((Component)self).gameObject.transform.position; float num = 360f / (float)laserCount; if (!startedFiring) { Quaternion val = Util.QuaternionSafeLookRotation(aimDirection); startedFiring = true; lasers.Clear(); Ray val3 = default(Ray); RaycastHit val4 = default(RaycastHit); for (int i = 0; i < laserCount; i++) { lasers.Add(Object.Instantiate(laserPrefab, ((Component)self).gameObject.transform.position, ((Component)self).gameObject.transform.rotation)); ChildLocator component = lasers[i].GetComponent(); laserEnds.Add(component.FindChild("LaserEnd")); lasers[i].transform.position = position; Quaternion val2 = Quaternion.AngleAxis(360f / (float)laserCount * (float)i + currentAngle, Vector3.up) * val; ((Ray)(ref val3))..ctor(position, val2 * Vector3.forward); lasers[i].transform.rotation = val2; if (Util.CharacterRaycast(self.owner, val3, ref val4, 2000f, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)0)) { laserEnds[i].position = ((RaycastHit)(ref val4)).point; } else { laserEnds[i].position = ((Ray)(ref val3)).GetPoint(2000f); } } } if (aimDirection.y <= -1f) { aimDirection.y -= 0.1f * Time.fixedDeltaTime * (1f - aimDirection.y * aimDirection.y * aimDirection.y * 2f); currentAngle += 50f * Time.fixedDeltaTime / 1.25f; if (currentAngle >= num) { currentAngle -= num; } } else if (aimDirection.y > -0.25f) { aimDirection.y -= 0.25f * Time.fixedDeltaTime; currentAngle += 50f * Time.fixedDeltaTime; if (currentAngle >= num) { currentAngle -= num; } } else if (aimDirection.y > -0.5f) { aimDirection.y -= 0.15f * Time.fixedDeltaTime; currentAngle += 50f * Time.fixedDeltaTime / (1f - aimDirection.y / 4f); if (currentAngle >= num) { currentAngle -= num; } } else { aimDirection.y -= 0.1f * Time.fixedDeltaTime * (1f - aimDirection.y * 2f); currentAngle += 50f * Time.fixedDeltaTime / (1f - aimDirection.y / 4f); if (currentAngle >= num) { currentAngle -= num; } } Quaternion val5 = Util.QuaternionSafeLookRotation(aimDirection); Ray val7 = default(Ray); RaycastHit val8 = default(RaycastHit); for (int j = 0; j < laserCount; j++) { lasers[j].transform.position = position; float num2 = num * (float)j + currentAngle; Quaternion val6 = Quaternion.AngleAxis(num2, Vector3.up) * val5; ((Ray)(ref val7))..ctor(position, val6 * Vector3.forward); lasers[j].transform.rotation = val6; if (Util.CharacterRaycast(self.owner, val7, ref val8, 2000f, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)0)) { laserEnds[j].position = ((RaycastHit)(ref val8)).point; } else { laserEnds[j].position = ((Ray)(ref val7)).GetPoint(2000f); } if (flag) { FireBullet(self, val7); } } } private void FireBullet(TitanRockController self, Ray aimRay) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown DamageTypeCombo damageType = new DamageTypeCombo { damageType = (DamageType)2, damageTypeExtended = (DamageTypeExtended)0, damageSource = (DamageSource)0 }; DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.aurelioniteLaser); if (((NetworkBehaviour)self).hasAuthority) { BulletAttack val = new BulletAttack { owner = self.owner, weapon = self.owner, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = 0f, bulletCount = 1u, damage = 3f * self.ownerCharacterBody.damage, force = 10f, damageType = damageType, isCrit = Util.CheckRoll(self.ownerCharacterBody.crit, self.ownerCharacterBody.master), muzzleName = "MuzzleLaser", procCoefficient = 0.1f, hitEffectPrefab = null, HitEffectNormal = false, smartCollision = true, radius = 0.5f, maxDistance = 2000f, stopperMask = LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), hitMask = CommonMasks.bullet }; val.Fire(); } } } public static GameObject laserPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Titan.LaserTitanGold_prefab).WaitForCompletion(); private static GameObject fistPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Titan.ExplosionGolemClap_prefab).WaitForCompletion(); private static GameObject auriMasterPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Titan.TitanGoldMaster_prefab).WaitForCompletion(); public static float laserInterval = 0.04f; public static float startDelay = 2f; public static float goldRockDuration = 10f; public static Vector3 targetGoldPosition = new Vector3(0f, 20f, -2f); private Vector3[] goldFistPattern = (Vector3[])(object)new Vector3[9] { new Vector3(0f, 0f, 0f), new Vector3(12.5f, 0f, 0f), new Vector3(-12.5f, 0f, 0f), new Vector3(0f, 0f, 12.5f), new Vector3(0f, 0f, -12.5f), new Vector3(25f, 0f, 0f), new Vector3(-25f, 0f, 0f), new Vector3(0f, 0f, 25f), new Vector3(0f, 0f, -25f) }; public void Initialize() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown SpawnState.OnEnter += new hook_OnEnter(OnTitanSpawnEnter); ChargeMegaLaser.OnEnter += new hook_OnEnter(OnTitanChargeEnter); FireMegaLaser.OnEnter += new hook_OnEnter(OnTitanLaserEnter); ChargeGoldMegaLaser.FixedUpdate += new hook_FixedUpdate(OnTitanChargeUpdate); ChargeMegaLaser.Update += new hook_Update(OnTitanChargeUpdate2); FireGoldMegaLaser.FixedUpdate += new hook_FixedUpdate(OnTitanLaserUpdate); ChargeMegaLaser.OnExit += new hook_OnExit(OnTitanChargeExit); FireMegaLaser.OnExit += new hook_OnExit(OnTitanLaserExit); FireGoldFist.PlacePredictedAttack += new hook_PlacePredictedAttack(OnTitanFistAttack); RechargeRocks.OnEnter += new hook_OnEnter(OnRockChargeEnter); RechargeRocks.FixedUpdate += new hook_FixedUpdate(OnRockChargeUpdate); RechargeRocks.OnExit += new hook_OnExit(OnRockChargeExit); TitanRockController.Start += new hook_Start(OnRockStart); TitanRockController.FixedUpdate += new hook_FixedUpdate(OnRockUpdate); TitanRockController.FixedUpdateServer += new hook_FixedUpdateServer(OnRockUpdateServer); GoldTitanManager.TryStartChannelingTitansServer += new Manipulator(IL_ChannelTitan); AISkillDriver[] components = auriMasterPrefab.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val in array) { string customName = val.customName; if (customName == "RechargeRocks") { val.maxUserHealthFraction = 1f; } } } public void IL_ChannelTitan(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)2; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 3) })) { val.Emit(OpCodes.Ldloc_3); val.EmitDelegate>((Action)delegate(DirectorPlacementRule placementRule) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (GoldTitanManager.isFalseSonBossLunarShardBrokenMaster) { placementRule.maxDistance = 25f; placementRule.minDistance = 0f; Transform arenaCenter = MeridianEventTriggerInteraction.instance.arenaCenter; Vector3 position = default(Vector3); ((Vector3)(ref position))..ctor(120f, arenaCenter.position.y, -170f); placementRule.position = position; } }); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private void OnTitanSpawnEnter(orig_OnEnter orig, SpawnState self) { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((Object)((EntityState)self).characterBody).name.Contains("Gold")) { ((EntityState)self).characterBody.baseMaxHealth = 2200f; ((EntityState)self).characterBody.levelMaxHealth = 900f; ((EntityState)self).characterBody.baseRegen = ((EntityState)self).characterBody.baseMaxHealth / 250f; ((EntityState)self).characterBody.levelRegen = ((EntityState)self).characterBody.levelMaxHealth / 250f; ((EntityState)self).characterBody.baseArmor = 20f; if ((Object)(object)MeridianEventTriggerInteraction.instance != (Object)null && (int)MeridianEventTriggerInteraction.instance.meridianEventState > 0) { CharacterBody characterBody = ((EntityState)self).characterBody; characterBody.baseDamage *= 0.75f; CharacterBody characterBody2 = ((EntityState)self).characterBody; characterBody2.levelDamage *= 0.75f; CharacterBody characterBody3 = ((EntityState)self).characterBody; characterBody3.baseMoveSpeed *= 0.5f; CharacterBody characterBody4 = ((EntityState)self).characterBody; characterBody4.levelMoveSpeed *= 0.5f; if (NetworkServer.active && ((EntityState)self).characterBody.inventory.GetItemCountEffective(Items.AdaptiveArmor) == 0) { ((EntityState)self).characterBody.inventory.GiveItemPermanent(Items.AdaptiveArmor, 1); } } if (!Object.op_Implicit((Object)(object)((EntityState)self).skillLocator.utility.skillDef)) { } } orig.Invoke(self); } private void OnTitanChargeEnter(orig_OnEnter orig, ChargeMegaLaser self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((Object)((EntityState)self).characterBody).name.Contains("Gold")) { AurelioniteLaserController aurelioniteLaserController = default(AurelioniteLaserController); if (((EntityState)self).gameObject.TryGetComponent(ref aurelioniteLaserController)) { aurelioniteLaserController.Init(self); return; } aurelioniteLaserController = ((EntityState)self).gameObject.AddComponent(); aurelioniteLaserController.Init(self); } } private void OnTitanChargeUpdate(orig_FixedUpdate orig, ChargeGoldMegaLaser self) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime(); AurelioniteLaserController aurelioniteLaserController = default(AurelioniteLaserController); if (((EntityState)self).isAuthority && ((EntityState)self).gameObject.TryGetComponent(ref aurelioniteLaserController)) { aurelioniteLaserController.projectileStopwatch += ((EntityState)self).GetDeltaTime() * ((BaseState)self).attackSpeedStat; if (aurelioniteLaserController.projectileStopwatch >= 1f / aurelioniteLaserController.projectileFireFrequency) { float num = 15f - ((EntityState)self).fixedAge * 2f; Ray aimRay = ((BaseState)self).GetAimRay(); ((Ray)(ref aimRay)).direction = aurelioniteLaserController.laserDirection; ((Ray)(ref aimRay)).origin = ((ChargeMegaLaser)self).laserEffect.transform.parent.position; ((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f - num, num, 1f, 1f, 0f, 0f); aurelioniteLaserController.projectileStopwatch -= 1f / aurelioniteLaserController.projectileFireFrequency; ProjectileManager.instance.FireProjectileWithoutDamageType(Projectiles.auriBeam, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)self).gameObject, ((BaseState)self).damageStat * FireMegaLaser.damageCoefficient, 0f, Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, 100f); } if (((EntityState)self).fixedAge >= ((ChargeMegaLaser)self).duration) { FireGoldLaser fireGoldLaser = new FireGoldLaser(); fireGoldLaser.laserDirection = aurelioniteLaserController.laserDirection; ((EntityState)self).outer.SetNextState((EntityState)(object)fireGoldLaser); } } } private void OnTitanChargeUpdate2(orig_Update orig, ChargeMegaLaser self) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) AurelioniteLaserController aurelioniteLaserController = default(AurelioniteLaserController); if (((EntityState)self).isAuthority && ((EntityState)self).gameObject.TryGetComponent(ref aurelioniteLaserController) && ((Object)((EntityState)self).characterBody).name.Contains("Gold")) { ((EntityState)self).age = ((EntityState)self).age + Time.deltaTime; if (!Object.op_Implicit((Object)(object)self.laserEffect) || !Object.op_Implicit((Object)(object)self.laserLineComponent)) { return; } float num = 1000f; Ray aimRay = ((BaseState)self).GetAimRay(); self.enemyFinder.RefreshCandidates(); self.lockedOnHurtBox = self.enemyFinder.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)self.lockedOnHurtBox)) { ((Ray)(ref aimRay)).direction = ((Component)self.lockedOnHurtBox).transform.position - ((Ray)(ref aimRay)).origin; } Vector3 position = self.laserEffect.transform.parent.position; Vector3 point = ((Ray)(ref aimRay)).GetPoint(num); aurelioniteLaserController.laserDirection = position - point; AurelioniteLaserController aurelioniteLaserController2 = aurelioniteLaserController; aurelioniteLaserController2.laserDirection *= -1f; RaycastHit val = default(RaycastHit); if (Physics.Raycast(aimRay, ref val, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(CommonMasks.characterBodiesOrDefault))) { point = ((RaycastHit)(ref val)).point; } self.laserLineComponent.SetPosition(0, position); self.laserLineComponent.SetPosition(1, point); float num2; if (self.duration - ((EntityState)self).age > 0.5f) { num2 = ((EntityState)self).age / self.duration; } else { self.flashTimer -= Time.deltaTime; if (self.flashTimer <= 0f) { self.laserOn = !self.laserOn; self.flashTimer = 1f / 30f; } num2 = (self.laserOn ? 1f : 0f); } num2 *= ChargeMegaLaser.laserMaxWidth; self.laserLineComponent.startWidth = num2; self.laserLineComponent.endWidth = num2; } else { orig.Invoke(self); } } private void OnTitanChargeExit(orig_OnExit orig, ChargeMegaLaser self) { orig.Invoke(self); AurelioniteLaserController aurelioniteLaserController = default(AurelioniteLaserController); if (((EntityState)self).isAuthority && ((EntityState)self).gameObject.TryGetComponent(ref aurelioniteLaserController) && ((Object)((EntityState)self).characterBody).name.Contains("Gold")) { aurelioniteLaserController.projectileStopwatch = 0f; } } private void OnTitanLaserEnter(orig_OnEnter orig, FireMegaLaser self) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((Object)((EntityState)self).characterBody).name.Contains("Gold")) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((BaseState)self).attackSpeedStat = ((EntityState)self).characterBody.attackSpeed; ((BaseState)self).damageStat = ((EntityState)self).characterBody.damage; ((BaseState)self).critStat = ((EntityState)self).characterBody.crit; ((BaseState)self).moveSpeedStat = ((EntityState)self).characterBody.moveSpeed; } self.aimRay = ((BaseState)self).GetAimRay(); self.modelTransform = ((EntityState)self).GetModelTransform(); } else { orig.Invoke(self); } } private void OnTitanLaserUpdate(orig_FixedUpdate orig, FireGoldMegaLaser self) { float deltaTime = ((EntityState)self).GetDeltaTime(); ((FireMegaLaser)self).fireStopwatch = ((FireMegaLaser)self).fireStopwatch + deltaTime; ((FireMegaLaser)self).stopwatch = ((FireMegaLaser)self).stopwatch + deltaTime; Log.Warning("Whoopsies"); ((EntityState)self).outer.SetNextStateToMain(); } private void OnTitanLaserExit(orig_OnExit orig, FireMegaLaser self) { if (!Object.op_Implicit((Object)(object)((EntityState)self).characterBody) || !((Object)((EntityState)self).characterBody).name.Contains("Gold")) { orig.Invoke(self); } } private void OnTitanFistAttack(orig_PlacePredictedAttack orig, FireGoldFist self) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: 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_0063: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) Vector3 val = default(Vector3); BaseAI val2 = default(BaseAI); if (((Component)((EntityState)self).characterBody.master).TryGetComponent(ref val2)) { Target currentEnemy = val2.currentEnemy; if (currentEnemy != null && (Object)(object)val2.currentEnemy.gameObject != (Object)null && ((EntityState)self).isAuthority) { float num = currentEnemy.gameObject.transform.position.x + Random.Range(-10f, 10f); float num2 = currentEnemy.gameObject.transform.position.y + 5f; float num3 = currentEnemy.gameObject.transform.position.z + Random.Range(-10f, 10f); RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(new Ray(currentEnemy.gameObject.transform.position + Vector3.up, Vector3.down), ref val3, 200f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { val = ((RaycastHit)(ref val3)).point; val.x += Random.Range(-1f, 1f); val.z += Random.Range(-1f, 1f); } } } bool flag = false; float num4 = 0f; float num5 = Random.Range(0f, 360f); Vector3 val4 = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f) * Vector3.forward; for (int i = 0; i < goldFistPattern.Length; i++) { if (i == 1) { num4 = 0.3f; } if (i == 5) { num4 = 0.6f; } Vector3 val5 = goldFistPattern[i]; Vector3 val6 = Quaternion.AngleAxis(num5, Vector3.up) * val5; Vector3 val7 = val6 + val; ((FireFist)self).PlaceSingleDelayBlast(val7, num4); } } private void OnRockChargeEnter(orig_OnEnter orig, RechargeRocks self) { //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((Object)((EntityState)self).characterBody).name.Contains("Gold")) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((BaseState)self).attackSpeedStat = ((EntityState)self).characterBody.attackSpeed; ((BaseState)self).damageStat = ((EntityState)self).characterBody.damage; ((BaseState)self).critStat = ((EntityState)self).characterBody.crit; ((BaseState)self).moveSpeedStat = ((EntityState)self).characterBody.moveSpeed; } self.stopwatch = 0f; self.duration = goldRockDuration; Transform modelTransform = ((EntityState)self).GetModelTransform(); Util.PlaySound(RechargeRocks.attackSoundString, ((EntityState)self).gameObject); ((EntityState)self).PlayCrossfade("Body", "RechargeRocks", "RechargeRocks.playbackRate", self.duration, 0.2f); Animator modelAnimator = ((EntityState)self).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("LeftFist"); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)RechargeRocks.effectPrefab)) { self.chargeEffect = Object.Instantiate(RechargeRocks.effectPrefab, val.position, val.rotation); self.chargeEffect.transform.parent = val; ScaleParticleSystemDuration component2 = self.chargeEffect.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.newDuration = self.duration * 1.5f; } } } } if (Object.op_Implicit((Object)(object)modelAnimator)) { } if (NetworkServer.active) { GameObject val2 = Object.Instantiate(RechargeRocks.rockControllerPrefab); val2.GetComponent().SetOwner(((EntityState)self).gameObject); NetworkServer.Spawn(val2); } } else { orig.Invoke(self); } } private void OnRockChargeUpdate(orig_FixedUpdate orig, RechargeRocks self) { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown orig.Invoke(self); if (!Object.op_Implicit((Object)(object)((EntityState)self).characterBody) || !((Object)((EntityState)self).characterBody).name.Contains("Gold")) { return; } bool flag = self.stopwatch >= goldRockDuration * 0.925f; GoldRockController goldRockController = default(GoldRockController); if (((EntityState)self).gameObject.TryGetComponent(ref goldRockController) && !flag) { goldRockController.vfxStopwatch += ((EntityState)self).GetDeltaTime(); if (goldRockController.vfxStopwatch >= goldRockController.vfxInterval) { Transform modelTransform = ((EntityState)self).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("LeftFist"); if ((Object)(object)val != (Object)null) { EffectManager.SpawnEffect(fistPrefab, new EffectData { origin = val.position, scale = 1f, rotation = val.rotation }, true); } } } goldRockController.vfxStopwatch = 0f; } } Animator modelAnimator = ((EntityState)self).GetModelAnimator(); if ((Object)(object)modelAnimator == (Object)null) { Log.Warning("Failed!"); } else if (flag) { modelAnimator.speed = 4f; } else if (self.stopwatch >= goldRockDuration * 0.5f) { modelAnimator.speed = 0.2f; } else { modelAnimator.speed = 1f; } } private void OnRockChargeExit(orig_OnExit orig, RechargeRocks self) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((Object)((EntityState)self).characterBody).name.Contains("Gold")) { Animator modelAnimator = ((EntityState)self).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.speed = 1f; } } orig.Invoke(self); if (((Object)((EntityState)self).characterBody).name.Contains("Gold")) { Animator modelAnimator2 = ((EntityState)self).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator2)) { modelAnimator2.speed = 1f; } } } private void OnRockStart(orig_Start orig, TitanRockController self) { //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Invalid comparison between Unknown and I4 orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.ownerCharacterBody) && ((Object)self.ownerCharacterBody).name.Contains("Gold")) { GoldRockController goldRockController = ((Component)self).gameObject.AddComponent(); goldRockController.rockController = self; goldRockController.rockObject = ((Component)self).gameObject; goldRockController.auriObject = self.owner; goldRockController.auriBody = self.ownerCharacterBody; goldRockController.currentAngle = Random.Range(0f, 360f / (float)goldRockController.laserCount); if ((Object)(object)MeridianEventTriggerInteraction.instance != (Object)null && (int)MeridianEventTriggerInteraction.instance.meridianEventState == 4) { goldRockController.laserCount = 12; } self.fireTimer = laserInterval; } } private void OnRockUpdate(orig_FixedUpdate orig, TitanRockController self) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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_0088: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self.ownerCharacterBody) && ((Object)self.ownerCharacterBody).name.Contains("Gold")) { if (Object.op_Implicit((Object)(object)self.targetTransform)) { self.foundOwner = true; ((Component)self).transform.position = Vector3.SmoothDamp(((Component)self).transform.position, self.targetTransform.TransformPoint(targetGoldPosition), ref self.velocity, 1f); ((Component)self).transform.rotation = self.targetTransform.rotation; } else if (self.foundOwner) { self.foundOwner = false; ParticleSystem[] componentsInChildren = ((Component)self).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { Object.Destroy((Object)(object)componentsInChildren[i]); } Light[] componentsInChildren2 = ((Component)self).GetComponentsInChildren(); for (int j = 0; j < componentsInChildren2.Length; j++) { ((Behaviour)componentsInChildren2[j]).enabled = false; } Util.PlaySound("Stop_titanboss_shift_loop", ((Component)self).gameObject); } GoldRockController goldRockController = default(GoldRockController); if (((Component)self).gameObject.TryGetComponent(ref goldRockController)) { goldRockController.UpdateLasers(self); } if (NetworkServer.active) { self.FixedUpdateServer(); } } else { orig.Invoke(self); } } private void OnRockUpdateServer(orig_FixedUpdateServer orig, TitanRockController self) { if (!Object.op_Implicit((Object)(object)self.ownerCharacterBody) || !((Object)self.ownerCharacterBody).name.Contains("Gold")) { orig.Invoke(self); } } } public class FireGoldLaser : BaseState { public static GameObject effectPrefab = FireLaser.effectPrefab; public static GameObject tracerEffectPrefab; public static float damageCoefficient = 1.75f; public static float baseDuration = 1.5f; public static string attackSoundString; public Vector3 laserDirection; private float duration; private Ray modifiedAimRay; private static int FireLaserStateHash = Animator.StringToHash("FireLaser"); private static int FireLaserParamHash = Animator.StringToHash("FireLaser.playbackRate"); public override void OnEnter() { //IL_001c: 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_002d: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; modifiedAimRay = ((BaseState)this).GetAimRay(); ((Ray)(ref modifiedAimRay)).direction = laserDirection; ((EntityState)this).GetModelAnimator(); Transform modelTransform = ((EntityState)this).GetModelTransform(); Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); string text = "MuzzleLaser"; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(duration); } if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false); } if (!((EntityState)this).isAuthority) { return; } float num = 2000f; float num2 = 2000f; Vector3 position = ((Ray)(ref modifiedAimRay)).origin + ((Ray)(ref modifiedAimRay)).direction * num; RaycastHit val = default(RaycastHit); if (Physics.Raycast(modifiedAimRay, ref val, num, LayerMask.op_Implicit(CommonMasks.bullet))) { position = ((RaycastHit)(ref val)).point; num2 = ((RaycastHit)(ref val)).distance; if (num2 < 10f) { num2 = 2000f; } } new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject), baseDamage = base.damageStat * damageCoefficient, baseForce = 700f, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)128), (DamageTypeExtended)0, (DamageSource)0), position = position, radius = 3f, falloffModel = (FalloffModel)2, bonusForce = 3500f * ((Ray)(ref modifiedAimRay)).direction }.Fire(); if (Object.op_Implicit((Object)(object)tracerEffectPrefab)) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref modifiedAimRay)).origin, aimVector = ((Ray)(ref modifiedAimRay)).direction, minSpread = 0f, maxSpread = 0f, bulletCount = 1u, damage = 0f, force = 0f, isCrit = false, muzzleName = "MuzzleLaser", procCoefficient = 0.1f, hitEffectPrefab = FireLaser.hitEffectPrefab, HitEffectNormal = false, tracerEffectPrefab = tracerEffectPrefab, radius = 0f, maxDistance = num2 }.Fire(); } Util.PlaySound(LaserFatherBurst.attackSoundString, ((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class GildedCoastChanges { public static float aurelioniteSpawnTimer = 150f; public float messageThreshold1; public float messageThreshold2; public int currentBeacons = 0; public int totalBeaconResets = 0; public int messagesSent = 0; public static bool bossActive = false; public float auriGoldDrop = 0f; public List timers = new List(); private static readonly FieldInfo onOneCycleGoldTitanKillDelegate = typeof(GoldshoresBossfight).GetField("onOneCycleGoldTitanKill", BindingFlags.Static | BindingFlags.NonPublic); public TetherVfxOrigin tetherVfxOrigin; public bool updateTethers = false; public List beaconTransforms = new List(); public static GameObject tether = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC2.GoldSiphonTetherVFX_prefab).WaitForCompletion(), "StormboundGoldTether"); public static bool geodesPaused; public static GameObject largeChest = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_Base_Chest2.Chest2_prefab).WaitForCompletion(), "StormboundCoastChest", true); public void Initialize() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) LineRenderer component = tether.GetComponent(); if ((Object)(object)component != (Object)null) { Color startColor = component.startColor; startColor.a = 0.2f; component.startColor = startColor; Color endColor = component.endColor; endColor.a = 0.2f; component.endColor = endColor; component.widthMultiplier *= 0.5f; } BezierCurveLine component2 = tether.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.windFrequency = new Vector3(0.1f, 0.1f, 0.1f); } RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnRecalcAuriStats); GlobalEventManager.onServerDamageDealt += OnAuriDamageDealt; ActivateBeacons.OnEnter += new hook_OnEnter(OnActivateBeaconsEnter); ActivateBeacons.FixedUpdate += new hook_FixedUpdate(OnActivateBeaconsUpdate); GoldshoresBossfight.transitionDuration = 1.5f; GoldshoresBossfight.FixedUpdate += new hook_FixedUpdate(OnGoldshoresBossUpdate); GoldshoresBossfight.ServerFixedUpdate += new hook_ServerFixedUpdate(OnGoldshoresBossServerUpdate); GoldshoresBossfight.SpawnBoss += new hook_SpawnBoss(OnGoldshoresBossSpawn); GoldshoresBossfight.SetBossImmunity += new hook_SetBossImmunity(OnGoldshoresBossImmunity); Ready.OnEnter += new hook_OnEnter(OnGoldBeaconReadyEnter); NotReady.OnEnter += new hook_OnEnter(OnGoldBeaconNotReadyEnter); Stage.onStageStartGlobal += OnStageStart; } private void OnRecalcAuriStats(CharacterBody sender, StatHookEventArgs args) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)sender != (Object)null) { int buffCount = sender.GetBuffCount(Main.AuriArmorBuff.buffIndex); if (buffCount > 0) { args.armorAdd = 100f + 100f * (float)buffCount; } } } private void OnAuriDamageDealt(DamageReport report) { //IL_007b: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013d: 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_0165: Unknown result type (might be due to invalid IL or missing references) HealthComponent victim = report.victim; CharacterBody attackerBody = report.attackerBody; if (!((Object)(object)victim != (Object)null) || !((Object)(object)victim.body != (Object)null) || !((Object)(object)((Component)victim).transform != (Object)null) || !victim.body.HasBuff(Main.AuriArmorBuff.buffIndex)) { return; } float num = report.damageInfo.damage / victim.fullCombinedHealth * (5f + 2.5f * (float)victim.body.GetBuffCount(Main.AuriArmorBuff.buffIndex)); auriGoldDrop -= num; if (auriGoldDrop <= 0f) { auriGoldDrop = 1f; float radius = report.victim.body.radius; Vector3 position = ((Component)report.victim).transform.position; Vector3 val = Random.onUnitSphere * (radius + 1f); position.x += val.x; position.y += Random.Range(2f, -2f); position.z += val.z; GameObject val2 = Object.Instantiate(LegacyResourcesAPI.Load("Prefabs/NetworkedObjects/BonusMoneyPack"), position, Random.rotation); TeamFilter component = val2.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.teamIndex = report.attackerTeamIndex; } MoneyPickup componentInChildren = val2.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.baseGoldReward = 10; } NetworkServer.Spawn(val2); } } private void OnActivateBeaconsEnter(orig_OnEnter orig, ActivateBeacons self) { bossActive = false; aurelioniteSpawnTimer = 150f; messageThreshold1 = aurelioniteSpawnTimer / 3f; messageThreshold2 = aurelioniteSpawnTimer / 1.5f; currentBeacons = 0; totalBeaconResets = 0; messagesSent = 0; timers.Clear(); beaconTransforms.Clear(); orig.Invoke(self); } private void OnActivateBeaconsUpdate(orig_FixedUpdate orig, ActivateBeacons self) { //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_00d8: Expected O, but got Unknown //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_011a: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Expected O, but got Unknown ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime(); if (!NetworkServer.active || !Object.op_Implicit((Object)(object)GoldshoresMissionController.instance)) { return; } if (currentBeacons < GoldshoresMissionController.instance.beaconsActive) { float num = (float)(GoldshoresMissionController.instance.beaconsActive - currentBeacons) * 20f; aurelioniteSpawnTimer -= num; messageThreshold1 -= num; messageThreshold2 -= num; currentBeacons = GoldshoresMissionController.instance.beaconsActive; } if (((EntityState)self).fixedAge >= messageThreshold1 && messagesSent <= 0) { messagesSent = 1; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "STORMBOUND_GOLDSHORES_BOSS_WARNING1" }); } if (((EntityState)self).fixedAge >= messageThreshold2 && messagesSent <= 1) { messagesSent = 2; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "STORMBOUND_GOLDSHORES_BOSS_WARNING2" }); } if (((EntityState)self).fixedAge >= aurelioniteSpawnTimer) { ((EntityState)self).outer.SetNextState((EntityState)new GoldshoresBossfight()); if (messagesSent <= 2) { messagesSent = 3; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "STORMBOUND_GOLDSHORES_BOSS_SPAWN" }); } } } private void OnGoldshoresBossEnter(orig_OnEnter orig, GoldshoresBossfight self) { orig.Invoke(self); } private void OnGoldshoresBossUpdate(orig_FixedUpdate orig, GoldshoresBossfight self) { orig.Invoke(self); if (!Object.op_Implicit((Object)(object)self.scriptedCombatEncounter)) { return; } foreach (CharacterMaster readOnlyMembers in self.scriptedCombatEncounter.combatSquad.readOnlyMembersList) { GameObject bodyInstanceObject = readOnlyMembers.bodyInstanceObject; if (Object.op_Implicit((Object)(object)bodyInstanceObject)) { if ((Object)(object)tetherVfxOrigin == (Object)null) { tetherVfxOrigin = bodyInstanceObject.AddComponent(); tetherVfxOrigin.tetherPrefab = tether; tetherVfxOrigin.SetTransform(bodyInstanceObject.GetComponent().coreTransform); } if ((Object)(object)tetherVfxOrigin != (Object)null && updateTethers) { updateTethers = false; tetherVfxOrigin.SetTetheredTransforms(beaconTransforms); } } } } private void OnGoldshoresBossServerUpdate(orig_ServerFixedUpdate orig, GoldshoresBossfight self) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown if (((EntityState)self).fixedAge >= GoldshoresBossfight.transitionDuration) { self.missionController.ExitTransitionIntoBossfight(); if (!self.hasSpawnedBoss) { self.SpawnBoss(); } else { if (self.scriptedCombatEncounter.combatSquad.readOnlyMembersList.Count == 0 && ((EntityState)self).fixedAge >= GoldshoresBossfight.transitionDuration + 3f) { ((EntityState)self).outer.SetNextState((EntityState)new Exit()); if (totalBeaconResets <= 0 && onOneCycleGoldTitanKillDelegate.GetValue(null) is Action action) { action(); } return; } auriGoldDrop -= ((EntityState)self).GetDeltaTime() / (2f + (float)self.missionController.beaconsActive); } } bossActive = self.hasSpawnedBoss; if (Object.op_Implicit((Object)(object)self.scriptedCombatEncounter) && Object.op_Implicit((Object)(object)self.missionController)) { UpdateBossBuffCount(self.scriptedCombatEncounter, self.missionController); } } public void UpdateBossBuffCount(ScriptedCombatEncounter combatEncounter, GoldshoresMissionController missionController) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) foreach (CharacterMaster readOnlyMembers in combatEncounter.combatSquad.readOnlyMembersList) { CharacterBody body = readOnlyMembers.GetBody(); int num = missionController.beaconCount - missionController.beaconsActive; if (Object.op_Implicit((Object)(object)body)) { body.SetBuffCount(Main.AuriArmorBuff.buffIndex, num); } } } private void OnGoldshoresBossSpawn(orig_SpawnBoss orig, GoldshoresBossfight self) { orig.Invoke(self); } private void OnGoldshoresBossImmunity(orig_SetBossImmunity orig, GoldshoresBossfight self, bool newBossImmunity) { } private void OnGoldBeaconNotReadyEnter(orig_OnEnter orig, NotReady self) { orig.Invoke(self); beaconTransforms.Add(((EntityState)self).transform); updateTethers = true; } private void OnGoldBeaconReadyEnter(orig_OnEnter orig, Ready self) { orig.Invoke(self); ((MonoBehaviour)((EntityState)self).outer).StartCoroutine(GoldBeaconTimer(self)); } public IEnumerator GoldBeaconTimer(Ready self) { beaconTransforms.Remove(((EntityState)self).transform); updateTethers = true; int index = timers.Count; for (int i = 0; i < index; i++) { if (timers[i] > 0) { timers[i] = Math.Min(75, timers[i] + 15); } } timers.Add(75); if (!bossActive) { yield return (object)new WaitUntil((Func)(() => bossActive)); } while (timers[index] > 0) { yield return (object)new WaitForSeconds(1f); timers[index]--; } totalBeaconResets++; ((EntityState)self).outer.SetNextState((EntityState)new NotReady()); } public void OnStageStart(Stage stage) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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) GameObject val = largeChest; PurchaseInteraction val2 = default(PurchaseInteraction); if (val.TryGetComponent(ref val2)) { val2.automaticallyScaleCostWithDifficulty = true; } string cachedName = stage.sceneDef.cachedName; if (cachedName == "goldshores") { Vector3 position = default(Vector3); ((Vector3)(ref position))..ctor(76.39f, -10.3f, -111.2f); Vector3 zero = Vector3.zero; SpawnChest(val, position, zero); } } public void SpawnChest(GameObject prefab, Vector3 position, Vector3 rotation) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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) if (NetworkServer.active) { GameObject val = Object.Instantiate(prefab, position, Quaternion.Euler(rotation)); val.transform.eulerAngles = rotation; NetworkServer.Spawn(val); } } } public struct SpawnLocation { public Vector3 pos; public Vector3 rot; public SpawnLocation(Vector3 pos, Vector3 rot) { //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) this.pos = pos; this.rot = rot; } } public class VoidFieldsChanges { public class VoidFieldsGeodeController : NetworkBehaviour { public PortalSpawner colossusPortalSpawner; public static InteractableSpawnCard colossusPortalCard = Addressables.LoadAssetAsync((object)RoR2_DLC2.iscColossusPortal_asset).WaitForCompletion(); private Xoroshiro128Plus rng; public bool geodesDestroyed = false; public static int geodesRequired = 3; public List geodeList = new List(); public static SpawnLocation[] geodeSpawns = new SpawnLocation[9] { new SpawnLocation(new Vector3(108.64f, 41.42f, 245.12f), new Vector3(0f, 0f, 0f)), new SpawnLocation(new Vector3(35.44f, 21.62f, 162.12f), new Vector3(0f, 0f, 340f)), new SpawnLocation(new Vector3(-135.24f, 28.27f, 78.24f), new Vector3(90f, 0f, 15f)), new SpawnLocation(new Vector3(-89.88f, 80.28f, 103.03f), new Vector3(350f, 0f, 0f)), new SpawnLocation(new Vector3(-19.55f, 4.99f, 19.68f), new Vector3(0f, 0f, 0f)), new SpawnLocation(new Vector3(-233.1f, 17.52f, -45.96f), new Vector3(350f, 0f, 30f)), new SpawnLocation(new Vector3(-209.79f, 7.96f, 187.8f), new Vector3(90f, 0f, 110f)), new SpawnLocation(new Vector3(155.08f, 28.3f, 81.08f), new Vector3(180f, 0f, 0f)), new SpawnLocation(new Vector3(-62.94f, 6.99f, 207.67f), new Vector3(0f, 0f, 0f)) }; public void Start() { //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) colossusPortalSpawner = ((Component)this).gameObject.AddComponent(); colossusPortalSpawner.hasRegisteredToTeleporter = false; colossusPortalSpawner.portalSpawnCard = colossusPortalCard; colossusPortalSpawner.spawnMessageToken = "PORTAL_STORM_OPEN"; colossusPortalSpawner.willSpawn = true; colossusPortalSpawner.minSpawnDistance = 0f; colossusPortalSpawner.maxSpawnDistance = 5f; colossusPortalSpawner.minStagesCleared = 0; geodesDestroyed = false; Util.ShuffleArray(geodeSpawns); int num = geodeSpawns.Length; for (int i = 0; i < geodesRequired; i++) { if (num >= i + 1) { Vector3 pos = geodeSpawns[i].pos; Vector3 rot = geodeSpawns[i].rot; SpawnGeode(pos, rot); } } Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "PORTAL_STORM_WILL_OPEN" }); } public void FixedUpdate() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d8: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown if (!NetworkServer.active || geodesDestroyed) { return; } int num = 0; for (int i = 0; i < geodeList.Count; i++) { if ((Object)(object)geodeList[i] == (Object)null) { num++; } } if (num >= geodesRequired) { rng = new Xoroshiro128Plus(Run.instance.stageRng.nextUlong); GameObject val = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest((SpawnCard)(object)colossusPortalCard, new DirectorPlacementRule { minDistance = 0f, maxDistance = 0f, placementMode = (PlacementMode)0, position = new Vector3(-182.68f, 45.99f, 229.69f) }, rng)); if (Object.op_Implicit((Object)(object)val)) { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "PORTAL_STORM_OPEN" }); } geodesDestroyed = true; } } public void SpawnGeode(Vector3 position, Vector3 rotation) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { GameObject val = Object.Instantiate(miniGeode, position, Quaternion.Euler(rotation)); val.transform.eulerAngles = rotation; NetworkServer.Spawn(val); geodeList.Add(val); } } } public static GameObject miniGeode = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC2.MiniGeodeBody_prefab).WaitForCompletion(), "StormboundMiniGeode", true); public static GameObject geodeController = PrefabAPI.CreateEmptyPrefab("StormboundVoidFieldsGeodeController"); public void Initialize() { geodeController.AddComponent(); ArenaMissionController.onBeatArena += OnBeatArena; } public void OnBeatArena() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (ValidateConditions() && NetworkServer.active) { GameObject val = Object.Instantiate(geodeController, new Vector3(-182.68f, 45.99f, 229.69f), Quaternion.identity); NetworkServer.Spawn(val); } } private void OnArenaStart(orig_OnStartServer orig, ArenaMissionController self) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (ValidateConditions() && NetworkServer.active) { GameObject val = Object.Instantiate(geodeController, new Vector3(-182.68f, 45.99f, 229.69f), Quaternion.identity); NetworkServer.Spawn(val); } } private static bool ValidateConditions() { bool flag = !Object.op_Implicit((Object)(object)Listening.requiredExpansion) || Run.instance.IsExpansionEnabled(Listening.requiredExpansion); bool flag2 = !Object.op_Implicit((Object)(object)Listening.requiredExpansion.requiredEntitlement) || ((BaseUserEntitlementTracker)(object)EntitlementManager.networkUserEntitlementTracker).AnyUserHasEntitlement(Listening.requiredExpansion.requiredEntitlement) || ((BaseUserEntitlementTracker)(object)EntitlementManager.localUserEntitlementTracker).AnyUserHasEntitlement(Listening.requiredExpansion.requiredEntitlement); bool flag3 = !string.IsNullOrEmpty(Listening.bannedFalseSonBossCompleteEventFlag) && Run.instance.GetEventFlag(Listening.bannedFalseSonBossCompleteEventFlag); return Run.instance.nextStageScene.stageOrder <= Listening.maxStageTierOrder + 1 && flag2 && flag && !flag3; } } public class DelayedState : EntityState { private readonly float delay; private readonly EntityState state; public DelayedState(float delayTime, EntityState nextState) { state = nextState; delay = delayTime; } public override void Update() { ((EntityState)this).Update(); if (((EntityState)this).fixedAge >= delay) { base.outer.SetNextState(state); } } } public class StormboundPrimeDevastatorOrb : GenericDamageOrb { public float blastRadius; public GameObject lightningEffectPrefab; private const float skillDisableTiming = 3f; public override void Begin() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_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_002e: 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_0046: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / 120f; GameObject val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/FalseSonBoss/PrimeDevastatorLightningOrbEffect.prefab").WaitForCompletion(); EffectData val2 = new EffectData { origin = ((Orb)this).origin, genericFloat = ((Orb)this).duration }; val2.SetHurtBoxReference(((Orb)this).target); EffectManager.SpawnEffect(val, val2, true); } public override void OnArrival() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_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_0087: 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_00a4: Expected O, but got Unknown ((GenericDamageOrb)this).OnArrival(); CharacterBody body = ((Orb)this).target.healthComponent.body; body.AddTimedBuff(Buffs.DisableAllSkills, 3f); InflictDotInfo val = new InflictDotInfo { attackerObject = base.attacker, victimObject = ((Component)body).gameObject, dotIndex = Main.devastatorDotIndex, duration = 420f, damageMultiplier = 1f }; DotController.InflictDot(ref val); EffectManager.SpawnEffect(lightningEffectPrefab, new EffectData { origin = body.corePosition, scale = blastRadius }, true); } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }