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.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using EntityStates; using EntityStates.Destructible; using EntityStates.FalseSon; using EntityStates.FalseSonBoss; using EntityStates.GolemMonster; using EntityStates.MeridianEvent; using EntityStates.PrimeMeridian; using EntityStates.TitanMonster; using IL.RoR2; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates; using On.EntityStates.Destructible; using On.EntityStates.FalseSon; using On.EntityStates.FalseSonBoss; using On.EntityStates.MeridianEvent; using On.EntityStates.PrimeMeridian; using On.EntityStates.TitanMonster; using On.RoR2; using R2API; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2BepInExPack.GameAssetPaths.Version_1_39_0; using StormboundFalseSon.Main; using StormboundFalseSon.Modules; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [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: AssemblyCompany("StormboundFalseSon")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("StormboundFalseSon")] [assembly: AssemblyTitle("StormboundFalseSon")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace 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.4.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class StormboundFalseSonPlugin : BaseUnityPlugin { private FalseSonChanges changes; public void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); new ContentPacks().Initialize(); changes = new FalseSonChanges(); 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)); } } 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 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(); } 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 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) { //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_01b6: 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_01dc: 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); } } bool flag3 = true; ParticleSystemRenderer[] componentsInChildren3 = thingToColor.GetComponentsInChildren(); foreach (ParticleSystemRenderer val4 in componentsInChildren3) { ((Renderer)val4).material.SetColor("_MainColor", color1); ((Renderer)val4).material.SetColor("_Color", color1); ((Renderer)val4).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; } } 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 i = targetIdx; i < skills.Length; i++) { if (i != currentIdx) { master.AddComponentCopy(skills[i]); Object.DestroyImmediate((Object)(object)skills[i]); } } 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(); internal static List projectilePrefabs = new List(); internal static void RegisterProjectiles() { CreateAurelioniteBeam(); projectilePrefabs.Add(auriBeam); } 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; } Component[] components = auriBeam.GetComponents(typeof(Component)); Component[] array = components; foreach (Component data in array) { Log.Message(data); } 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.Main { public class FalseSonChanges { 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 float crystalRadiusMult = 1.3f; public float baseStrikeSpeed = 1.2f; public float strikeSpeed; public int scalingLevel = 0; public float scalingMult = 0.25f; public int currentPhase = 0; private LaserChanges laserChanges; private AurelioniteChanges aurelioniteChanges; public List lightningPoints; 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) }; public List patternList2 = new List { pattern2a, pattern2b, pattern2d }; public BullseyeSearch enemyFinder = new BullseyeSearch(); public static DotIndex devastatorDotIndex; 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 devastatorEffect = Addressables.LoadAssetAsync((object)RoR2_DLC2_Elites_EliteBead.EliteBeadCrystalExplosionVFX_prefab).WaitForCompletion(); private static GameObject warningPrefab2 = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSon.OmniImpactVFXLunarStakeTerrain_prefab).WaitForCompletion(); private static GameObject eyeGlowPrefab = Addressables.LoadAssetAsync((object)RoR2_DLC2_Halcyonite.ExplosionTriLaser_prefab).WaitForCompletion(); public 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; private static Sprite crystalIcon = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSon.texEnergizedCoreBuffIcon_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(); public int bonusCrystalCount = 3; public int crystalScatters = 5; public float dashLightningTimer = 0f; public float speedoverride = -1f; public bool chargedStake = false; 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 //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Expected O, but got Unknown //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Expected O, but got Unknown //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Expected O, but got Unknown //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Expected O, but got Unknown //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Expected O, but got Unknown //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Expected O, but got Unknown //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Expected O, but got Unknown //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Expected O, but got Unknown //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Expected O, but got Unknown CreateBuffs(); SetupAIFixes(); devastatorDotIndex = DotAPI.RegisterDotDef(0.75f, 0.5f, (DamageColorIndex)16, StormboundDevastatorDebuff, (CustomDotBehaviour)null, (CustomDotVisual)null); HealthComponent.TakeDamage += new hook_TakeDamage(OnTakeDamage); GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; Run.onRunStartGlobal += Run_onRunStartGlobal; Run.onRunDestroyGlobal += Run_onRunDestroyGlobal; GlobalEventManager.ProcessHitEnemy += new Manipulator(LunarRuinDotFix); FrozenState.OnEnter += new hook_OnEnter(OnFrozenStateEnter); CorruptedPathsDash.GetNextStateAuthority += new hook_GetNextStateAuthority(CorruptedPathsDash_GetNextStateAuthority); Phase1.FixedUpdate += new hook_FixedUpdate(OnPhase1Update); Phase2.OnEnter += new hook_OnEnter(OnPhase2Enter); Phase3.OnEnter += new hook_OnEnter(OnPhase3Enter); Phase3.OnBossGroupDefeated += new hook_OnBossGroupDefeated(OnPhase3Finish); FissureSlam.HasLoSToPlayer += new hook_HasLoSToPlayer(OnFissureSlamLoS); FissureSlam.DetonateAuthority += new hook_DetonateAuthority(OnFissureSlamDetonate); FissureSlam.OnEnter += new hook_OnEnter(OnFissureSlamEnter); 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); laserChanges = new LaserChanges(); laserChanges.Initialize(); PrimeDevastator.FixedUpdate += new hook_FixedUpdate(OnDevastatorUpdate); PrimeDevastator.CreateOrbChain += new hook_CreateOrbChain(OnDevastatorOrb); PrimeDevastator.FireDevastator += new hook_FireDevastator(OnDevastatorFire); 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); aurelioniteChanges = new AurelioniteChanges(); aurelioniteChanges.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_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: 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_0455: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_07ae: Unknown result type (might be due to invalid IL or missing references) //IL_07b6: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_0739: Unknown result type (might be due to invalid IL or missing references) //IL_073e: Unknown result type (might be due to invalid IL or missing references) //IL_0746: Unknown result type (might be due to invalid IL or missing references) //IL_074b: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_0758: 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.maxDistance = 30f; val2.ignoreNodeGraph = true; val2.activationRequiresTargetLoS = false; } if (customName == "Corrupted Paths (Step Brothers)") { val = val2; Log.Debug("maxDistance: " + val2.maxDistance); Log.Debug("minDistance: " + val2.minDistance); Log.Debug("movementType: " + ((object)(MovementType)(ref val2.movementType)).ToString()); Log.Debug("aimType: " + ((object)(AimType)(ref val2.aimType)).ToString()); Log.Debug("moveTargetType: " + ((object)(TargetType)(ref val2.moveTargetType)).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.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)(MovementType)(ref val3.movementType)).ToString()); Log.Debug("aimType: " + ((object)(AimType)(ref val3.aimType)).ToString()); Log.Debug("moveTargetType: " + ((object)(TargetType)(ref val3.moveTargetType)).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 = 20f; 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.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)(MovementType)(ref val4.movementType)).ToString()); Log.Debug("aimType: " + ((object)(AimType)(ref val4.aimType)).ToString()); Log.Debug("moveTargetType: " + ((object)(TargetType)(ref val4.moveTargetType)).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 = 20f; val4.activationRequiresTargetLoS = false; val4.activationRequiresAimTargetLoS = false; val4.aimType = (AimType)2; val4.movementType = (MovementType)0; val4.moveTargetType = (TargetType)0; val4.selectionRequiresTargetLoS = false; } } } } 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) 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); } private void OnTakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo info) { //IL_0031: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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_020f: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) bool flag = false; 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(LaserGoldDebuff)) { info.damage = 0f; } else { self.body.AddTimedBuff(LaserGoldDebuff, 0.5f); } } if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLightning) && Object.op_Implicit((Object)(object)self.body)) { float num = 0.125f * (1f + (float)scalingLevel * scalingMult); info.damage = self.fullCombinedHealth * num; } if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLaserCrystal)) { if (flag) { self.body.AddTimedBuff(LaserCrystalDebuff, 15f, 10); self.dontShowHealthbar = false; if (self.body.GetBuffCount(LaserCrystalDebuff) >= 10) { info.damage = self.fullCombinedHealth * 2f; } else { info.damage = 0f; } } else { info.damage = 0f; info.rejected = true; } } if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLaser) && Object.op_Implicit((Object)(object)self.body)) { if (!flag) { self.body.AddTimedBuff(LaserTargetDebuff, 2.5f, 10); self.body.SetTimedBuffDurationIfPresent(LaserTargetDebuff, 0.5f, true); self.body.AddTimedBuff(Buffs.lunarruin, 420f); if (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(LaserTargetDebuff, 2.5f, 10); self.body.SetTimedBuffDurationIfPresent(LaserTargetDebuff, 0.5f, true); } info.damage = 0f; } 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 == 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.75f, rootObject = ((Component)report.victim).gameObject }; EffectManager.SpawnEffect(devastatorEffect, val, true); } } private void Run_onRunStartGlobal(Run obj) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Invalid comparison between Unknown and I4 Log.Debug($"{obj.selectedDifficulty} {(object)(DifficultyIndex)9}"); if ((int)obj.selectedDifficulty >= 9) { SkillDef skillDef = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("PrimeDevastator")); 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_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Invalid comparison between Unknown and I4 if ((int)obj.selectedDifficulty >= 9) { SkillDef skillDef = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("PrimeDevastator")); 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 OnPhase1Update(orig_FixedUpdate orig, Phase1 self) { orig.Invoke(self); if (currentPhase == 1 || !(((EntityState)self).fixedAge > ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.additionalEntryVFXDelay + ((FSBFPhaseBaseState)self).durationBeforeEnablingCombatEncounter + 4f)) { return; } currentPhase = 1; ((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); if (Object.op_Implicit((Object)(object)Run.instance) && Run.instance.stageClearCount >= 4) { if (Run.instance.stageClearCount >= 7) { scalingLevel = 2; } else { scalingLevel = 1; } } else { scalingLevel = 0; } strikeSpeed = baseStrikeSpeed / (1f + scalingMult * (float)scalingLevel); } public void OnPhase2Enter(orig_OnEnter orig, Phase2 self) { orig.Invoke(self); ((FSBFPhaseBaseState)self).durationBeforeEnablingCombatEncounter = 0f; ((FSBFPhaseBaseState)self).durationBeforeRingsSpawn = 0.5f; currentPhase = 2; ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.frequencyOfLightningStrikes = phase2StrikeInterval; ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.delayBeforeExpiringAPreviousStrikePoint = phase2StrikeInterval; ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.lightningWarningDuration = phase2AmbientStrikeSpeed; Component[] components = MeridianEventTriggerInteraction.instance.arenaGeode3.GetComponents(typeof(Component)); Component[] array = components; foreach (Component val in array) { } LightningStormController.SetStormStrikePattern(((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern); LightningStormController.SetStormActive(true); } public void OnPhase3Enter(orig_OnEnter orig, Phase3 self) { orig.Invoke(self); ((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); ((FSBFPhaseBaseState)self).durationBeforeEnablingCombatEncounter = 0f; ((FSBFPhaseBaseState)self).durationBeforeRingsSpawn = 0.5f; currentPhase = 3; } 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); } } } } public void OnSwatEnter(orig_OnEnter orig, SwatAwayPlayersWindup self) { if (currentPhase > 1) { self.stateAborted = true; ((EntityState)self).outer.SetNextState(self.GetNextStateAuthority()); } else { orig.Invoke(self); } } private EntityState OnSwatState(orig_GetNextStateAuthority orig, SwatAwayPlayersWindup self) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown if (currentPhase > 1) { if (hardMode) { return (EntityState)new CorruptedPathsDash(); } return (EntityState)new FissureSlamWindup(); } return orig.Invoke(self); } public void IL_FissureSlamEnter(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; MoveType val4 = (MoveType)2; ILLabel val7 = default(ILLabel); if (val2.TryGotoNext(val4, new Func[5] { (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val7), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(EntityState), "outer"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(EntityStateMachine), "SetNextStateToMain"), (Instruction x) => ILPatternMatchingExt.MatchRet(x) })) { Instruction next = val.Next; ILCursor val5 = val; ILLabel val6 = default(ILLabel); if (val5.TryGotoPrev(val4, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val6) })) { val.Emit(OpCodes.Br, next); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public bool OnFissureSlamLoS(orig_HasLoSToPlayer orig, FissureSlam self) { return true; } public void OnFissureSlamWindupEnter(orig_OnEnter orig, FissureSlamWindup self) { 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.chargeDuration = 1.4f; Util.PlaySound(FissureSlamWindup.enterSFXString, ((EntityState)self).gameObject); Util.PlaySound(FissureSlamWindup.startChargeLoopSFXString, ((EntityState)self).gameObject); Transform val = ((BaseState)self).FindModelChild(FissureSlamWindup.chargeVfxChildLocatorName); self.chargeVfxInstanceTransform = Object.Instantiate(FissureSlamWindup.chargeVfxPrefab, val).transform; ((Component)self.chargeVfxInstanceTransform).GetComponent().newDuration = (1f - FissureSlamWindup.minChargeForChargedAttack) * self.chargeDuration; if (currentPhase > 1) { Animator modelAnimator = ((EntityState)self).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.speed = 0.5f; EffectManager.SimpleMuzzleFlash(eyeGlowPrefab, ((EntityState)self).gameObject, "MuzzleLazer", true); } } } public void OnFissureSlamWindupUpdate(orig_FixedUpdate orig, FissureSlamWindup self) { ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime(); self.charge += Time.deltaTime; ((EntityState)self).characterBody.SetSpreadBloom(self.charge, true); ((EntityState)self).characterBody.SetAimTimer(3f); if (currentPhase > 1) { if (self.charge > 3f) { Animator modelAnimator = ((EntityState)self).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.speed = 1f; } ((EntityState)self).outer.SetNextState(self.GetNextStateAuthority()); } } else if (self.charge > self.baseChargeDuration) { ((EntityState)self).outer.SetNextState(self.GetNextStateAuthority()); } ((EntityState)self).characterMotor.walkSpeedPenaltyCoefficient = FissureSlamWindup.walkSpeedCoefficient; } public void OnFissureSlamEnter(orig_OnEnter orig, FissureSlam self) { Log.Message(self.baseDuration); if (currentPhase > 1) { self.baseDuration *= 1.5f; EffectManager.SimpleMuzzleFlash(eyeGlowPrefab, ((EntityState)self).gameObject, "MuzzleLazer", true); } self.totalFissures = 0; orig.Invoke(self); } public Result OnFissureSlamDetonate(orig_DetonateAuthority orig, FissureSlam self) { //IL_02cb: 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_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_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: 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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_012f: 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_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: 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_01c7: 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_01ce: 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_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_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_01ec: 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_028b: 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_02ab: 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 = 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.025f; } if (currentPhase > 1) { int index2 = Random.Range(0, patternList2.Count); Vector3[] array2 = patternList2[index2]; float num2 = 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.02f; } } 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, 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_0139: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Expected O, but got Unknown //IL_011c: 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; } if ((Object)(object)((EntityState)self).teamComponent != (Object)null) { ((EntityState)self).teamComponent.teamIndex = (TeamIndex)2; } if (Object.op_Implicit((Object)(object)LunarRainDeathState.chargePrefab)) { GameObject val = Object.Instantiate(warningPrefab, ((EntityState)self).transform.position, Util.QuaternionSafeLookRotation(Vector3.up)); val.transform.localScale = Vector3.one * LunarRainDeathState.explosionRadius * crystalRadiusMult; Object.Destroy((Object)(object)val, LunarRainDeathState.chargeDuration); TeamAreaIndicator component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.teamComponent = ((EntityState)self).teamComponent; Renderer val2 = default(Renderer); if (((Component)component).TryGetComponent(ref val2)) { val2.material.color = Color.blue; Log.Message("Recolor Success!"); } } EffectData val3 = new EffectData { scale = LunarRainDeathState.explosionRadius * crystalRadiusMult, origin = ((EntityState)self).transform.position }; EffectManager.SpawnEffect(LunarRainDeathState.chargePrefab, val3, 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0129: 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_0139: 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_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_0177: 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_0189: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00af: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown 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 * (crystalRadiusMult + 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 * crystalRadiusMult; 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_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0287: 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_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_0145: 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_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: 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) 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 (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_0099: 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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) CorruptedPathsDash.dashPrepDuration = 0.6f; CorruptedPathsDash.smallHopVelocity = 0f; orig.Invoke(self); if (currentPhase == 1) { CorruptedPathsDash.dashDuration = Vector3.Distance(((Component)((EntityState)self).characterBody.master).GetComponent().currentEnemy.characterBody.transform.position, ((EntityState)self).transform.position) * 0.13f / CorruptedPathsDash.speedCoefficient - CorruptedPathsDash.gapToEnemy; } else { CorruptedPathsDash.dashDuration = Vector3.Distance(((Component)((EntityState)self).characterBody.master).GetComponent().currentEnemy.characterBody.transform.position, ((EntityState)self).transform.position) * 0.1f / CorruptedPathsDash.speedCoefficient - CorruptedPathsDash.gapToEnemy; } ((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility.buffIndex); ((EntityState)self).characterBody.AddTimedBuff(Buffs.ArmorBoost, 1f); } public void OnDashUpdate(orig_FixedUpdate orig, CorruptedPathsDash self) { //IL_0070: 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_009c: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) self.overlapAttack.damage = 0f; orig.Invoke(self); if (self.isDashing) { float num = strikeSpeed / 2.5f; if (self.stopwatch >= dashLightningTimer + 0.008f && ((EntityState)self).isAuthority) { 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); } } else { dashLightningTimer = 0f; } } public void OnDashExit(orig_OnExit orig, CorruptedPathsDash self) { orig.Invoke(self); } 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 && ((EntityState)self).fixedAge > PrimeDevastator.playerLightningDelay) { self.orbSpawnTimer += Time.deltaTime; if (self.orbSpawnTimer > 0.35f) { self.FireDevastator("MuzzleOrb1"); self.orbNumber++; self.orbSpawnTimer = 0f; } if (self.orbNumber >= 6) { self.orbsSpawned = true; } } if (((EntityState)self).fixedAge >= self.duration + 1f && ((EntityState)self).isAuthority) { ((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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_011c: 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 = 6f + (float)self.orbNumber * 3f; if (((EntityState)self).isAuthority) { FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = PrimeDevastator.projectilePrefab; val2.position = ((EntityState)self).gameObject.transform.position + new Vector3(num, num, num); val2.rotation = Quaternion.identity; val2.owner = ((EntityState)self).gameObject; val2.damage = ((BaseState)self).damageStat * self.damageCoefficient; val2.force = 0f; val2.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); 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 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_000b: 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_008d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; if (val2.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f) })) { val.Next.Operand = 0.35f; ILCursor val4 = val; if (val4.TryGotoNext(val3, 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()); } } } 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 = 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); } } 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 = 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(3, 5); 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 void OnSetupLightning(orig_SetupDefaultBlastInfo orig, LightningStrikeInstance self, ref BlastAttack info) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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) orig.Invoke(self, ref info); 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.3f); } 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 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); } } private EntityState CorruptedPathsDash_GetNextStateAuthority(orig_GetNextStateAuthority orig, CorruptedPathsDash self) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown if (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()); } 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_00b2: 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_00d0: 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) ILCursor val = new ILCursor(il); ILCursor val2 = val; if (val2.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs).GetField("lunarruin")) })) { ILCursor val3 = val; if (val3.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_gameObject") })) { val.EmitDelegate>((Action)delegate(CharacterBody body) { body.AddTimedBuff(Buffs.lunarruin, 5f); }); ILLabel val4 = val.DefineLabel(); val.Emit(OpCodes.Br, (object)val4); val.Emit(OpCodes.Ldloc, 1); ILCursor val5 = val; MoveType val6 = (MoveType)2; if (val5.TryGotoNext(val6, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "InflictDot") })) { val.MarkLabel(val4); } 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!"); } } } 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; } private List laserTargets; public int currentPhase = 0; private BuffDef LaserTargetDebuff = FalseSonChanges.LaserTargetDebuff; private GameObject laserAimPrefab = Addressables.LoadAssetAsync((object)RoR2_DLC2_FalseSon.FalseSonChargedLaser_prefab).WaitForCompletion(); 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 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); } private void OnTestLaser(orig_OnEnter orig, LaserFatherCharged self) { orig.Invoke(self); Log.Message(((Object)self.laserEffect).name + " " + (object)self.laserEffect); } 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_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0488: 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); 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_0161: 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) orig.Invoke(self); foreach (LaserTargetInfo2 laserTarget in laserTargets) { if (Object.op_Implicit((Object)(object)laserTarget.laserEffect) && Object.op_Implicit((Object)(object)laserTarget.laserEffect2)) { if (!laserTarget.laserActive && laserTarget.body.HasBuff(LaserTargetDebuff) && laserTarget.body.GetBuffCount(LaserTargetDebuff) >= 10) { 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 = 5f; 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 val = default(DamageTypeCombo); val.damageType = (DamageType)0; val.damageTypeExtended = (DamageTypeExtended)0; val.damageSource = (DamageSource)0; DamageTypeCombo damageType = val; if (!((EntityState)self).isAuthority) { return; } BulletAttack val2 = 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 = 2.5f * ((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(val2, DamageTypes.stormboundLaser); if (Object.op_Implicit((Object)(object)self.effectPrefab)) { EffectManager.SimpleMuzzleFlash(self.effectPrefab, ((EntityState)self).gameObject, targetMuzzle, false); } } else { DamageAPI.AddModdedDamageType(val2, DamageTypes.stormboundLaserTargeting); } val2.Fire(); BlastAttack val3 = new BlastAttack(); val3.attacker = ((EntityState)self).gameObject; val3.damageColorIndex = (DamageColorIndex)3; val3.baseDamage = 1f; val3.radius = 2f; val3.falloffModel = (FalloffModel)0; val3.procCoefficient = LunarRainDeathState.explosionProcCoefficient; val3.teamIndex = (TeamIndex)2; val3.damageType = DamageTypeCombo.op_Implicit((DamageType)131072); val3.position = vector; val3.baseForce = 0f; val3.attackerFiltering = (AttackerFiltering)2; DamageAPI.AddModdedDamageType(val3, DamageTypes.stormboundLaserCrystal); val3.Fire(); } } 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 : MonoBehaviour { public Vector3 aimDirection = new Vector3(1f, 0.25f, 1f); public int laserCount = 16; 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 CleanupAndDestroy() { for (int i = 0; i < lasers.Count; i++) { Object.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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: 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_0181: 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_01a5: 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_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_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: 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_04cd: 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_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_050d: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_0581: 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; 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_012a: 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_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_013b: Expected O, but got Unknown DamageTypeCombo val = default(DamageTypeCombo); val.damageType = (DamageType)2; val.damageTypeExtended = (DamageTypeExtended)0; val.damageSource = (DamageSource)0; DamageTypeCombo damageType = val; DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.aurelioniteLaser); if (((NetworkBehaviour)self).hasAuthority) { BulletAttack val2 = 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 = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, hitMask = CommonMasks.bullet }; val2.Fire(); } } } private 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.05f; 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; Log.Debug("Aurelionite " + 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_000b: 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_0045: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)2; if (val2.TryGotoNext(val3, 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 = 5f; 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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.baseRegen = ((EntityState)self).characterBody.baseMaxHealth / 200f; ((EntityState)self).characterBody.levelRegen = ((EntityState)self).characterBody.levelMaxHealth / 200f; ((EntityState)self).characterBody.baseArmor = 20f; ((EntityState)self).characterBody.levelArmor = 0.1f; 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 (!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.Message("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_0125: 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) if (((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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown orig.Invoke(self); if (!((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"); 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)((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)) { Log.Message("RegularSpeed " + self.stopwatch); modelAnimator2.speed = 1f; } } } private void OnRockStart(orig_Start orig, TitanRockController self) { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Invalid comparison between Unknown and I4 orig.Invoke(self); if (((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_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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) if (((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); } if (NetworkServer.active) { self.FixedUpdateServer(); } } else { orig.Invoke(self); } } private void OnRockUpdateServer(orig_FixedUpdateServer orig, TitanRockController self) { if (((Object)self.ownerCharacterBody).name.Contains("Gold")) { GoldRockController goldRockController = default(GoldRockController); if (((Component)self).gameObject.TryGetComponent(ref goldRockController)) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void RoR2.TitanRockController::FixedUpdateServer()' called on client"); } else { goldRockController.UpdateLasers(self); } } } else { 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); Log.Message("Fired!"); } 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 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 = default(InflictDotInfo); val.attackerObject = base.attacker; val.victimObject = ((Component)body).gameObject; val.dotIndex = FalseSonChanges.devastatorDotIndex; val.duration = 420f; val.damageMultiplier = 1f; InflictDotInfo val2 = val; DotController.InflictDot(ref val2); 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) { } } }