Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of StormySkills v0.0.3
StormySkills.dll
Decompiled 10 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.CodeDom.Compiler; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using EntityStates; using EntityStates.BrotherMonster; using EntityStates.Chef; using EntityStates.FalseSon; using EntityStates.Seeker; using JetBrains.Annotations; using KinematicCharacterController; using Microsoft.CodeAnalysis; using MonoMod.RuntimeDetour; using R2API; using RoR2; using RoR2.Projectile; using RoR2.Skills; using StormySkills.MyEntityStates.Chef; using StormySkills.MyEntityStates.FalseSon; using StormySkills.MyEntityStates.Seeker; using StormySkills.Properties; 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("StormySkills")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+663ac44e6ab174e1a06687177ca1969129decc1a")] [assembly: AssemblyProduct("StormySkills")] [assembly: AssemblyTitle("StormySkills")] [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 StormySkills { public abstract class BaseSkillDef { public SerializableEntityStateType skillState; public string name; public string desc; public string[] keyWords; public byte[] rByte; public InterruptPriority interruptPriority; public string stateMachine; public float cooldown; public int maxStock; public int rechargeStock; public bool beginCooldownOnEnd; public bool cancelSprint; public bool canceledFromSprint; public bool isCombat; public GenericSkill slot; public void Init() { SetParams(); MakeSkillDef(); } public virtual void SetParams() { } public virtual void MakeSkillDef() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: 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_01f2: Expected O, but got Unknown //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = skillState; val.interruptPriority = interruptPriority; val.activationStateMachineName = stateMachine; val.baseRechargeInterval = cooldown; val.baseMaxStock = maxStock; val.rechargeStock = rechargeStock; val.beginSkillCooldownOnSkillEnd = beginCooldownOnEnd; val.cancelSprintingOnActivation = cancelSprint; val.canceledFromSprinting = canceledFromSprint; val.isCombatSkill = isCombat; val.keywordTokens = keyWords; val.icon = CreateSprite(rByte); GenericSkill val2 = slot; SkillFamily skillFamily = val2.skillFamily; int num = skillFamily.variants.Length; string text = ((Object)((Component)val2).gameObject).name.ToUpper(); string text2 = val2.skillName.ToUpper(); val.skillName = text + "_" + text2 + "_SAVAGEALT" + num + "_NAME"; val.skillNameToken = text + "_" + text2 + "_SAVAGEALT" + num + "_NAME"; val.skillDescriptionToken = text + "_" + text2 + "_SAVAGEALT" + num + "_DESCRIPTION"; LanguageAPI.Add(val.skillNameToken, name); LanguageAPI.Add(val.skillDescriptionToken, desc); ContentAddition.AddSkillDef(val); Array.Resize(ref skillFamily.variants, num + 1); Variant[] variants = skillFamily.variants; int num2 = variants.Length - 1; Variant val3 = new Variant { skillDef = val }; ((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[num2] = val3; } public static Sprite CreateSprite(byte[] resourceBytes) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_0056: 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_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (resourceBytes == null) { return Addressables.LoadAssetAsync<Sprite>((object)"Calm Water/CalmWaterLogo.png").WaitForCompletion(); } Texture2D val = new Texture2D(128, 128, (TextureFormat)4, false); ImageConversion.LoadImage(val, resourceBytes, false); return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0f, 0f)); } } public abstract class BaseSteppedSkillDef : BaseSkillDef { public int stepCount; public int stepGrace; public override void MakeSkillDef() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: 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_0210: Expected O, but got Unknown //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) SteppedSkillDef val = ScriptableObject.CreateInstance<SteppedSkillDef>(); ((SkillDef)val).activationState = skillState; ((SkillDef)val).interruptPriority = interruptPriority; ((SkillDef)val).activationStateMachineName = stateMachine; ((SkillDef)val).baseRechargeInterval = cooldown; ((SkillDef)val).baseMaxStock = maxStock; ((SkillDef)val).rechargeStock = rechargeStock; val.stepCount = stepCount; val.stepGraceDuration = stepGrace; ((SkillDef)val).beginSkillCooldownOnSkillEnd = beginCooldownOnEnd; ((SkillDef)val).cancelSprintingOnActivation = cancelSprint; ((SkillDef)val).canceledFromSprinting = canceledFromSprint; ((SkillDef)val).isCombatSkill = isCombat; ((SkillDef)val).keywordTokens = keyWords; ((SkillDef)val).icon = BaseSkillDef.CreateSprite(rByte); GenericSkill val2 = slot; SkillFamily skillFamily = val2.skillFamily; int num = skillFamily.variants.Length; string text = ((Object)((Component)val2).gameObject).name.ToUpper(); string text2 = val2.skillName.ToUpper(); ((SkillDef)val).skillName = text + "_" + text2 + "_SAVAGEALT" + num + "_NAME"; ((SkillDef)val).skillNameToken = text + "_" + text2 + "_SAVAGEALT" + num + "_NAME"; ((SkillDef)val).skillDescriptionToken = text + "_" + text2 + "_SAVAGEALT" + num + "_DESCRIPTION"; LanguageAPI.Add(((SkillDef)val).skillNameToken, name); LanguageAPI.Add(((SkillDef)val).skillDescriptionToken, desc); ContentAddition.AddSkillDef((SkillDef)(object)val); Array.Resize(ref skillFamily.variants, num + 1); Variant[] variants = skillFamily.variants; int num2 = skillFamily.variants.Length - 1; Variant val3 = new Variant { skillDef = (SkillDef)(object)val }; ((Variant)(ref val3)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null); variants[num2] = val3; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("NOTWithor.StormySkills", "StormySkills", "0.0.3")] public class Main : BaseUnityPlugin { public const string PluginGUID = "NOTWithor.StormySkills"; public const string PluginAuthor = "NOTWithor"; public const string PluginName = "StormySkills"; public const string PluginVersion = "0.0.3"; public static GameObject Mando = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/CommandoBody"); public static GameObject Huntress = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/HuntressBody"); public static GameObject Mult = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ToolbotBody"); public static GameObject Bandit = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/Bandit2Body"); public static GameObject Merc = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/MercBody"); public static GameObject Arti = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/MageBody"); public static GameObject Rex = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/TreebotBody"); public static GameObject Acrid = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/CrocoBody"); public static GameObject Loader = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LoaderBody"); public static GameObject Engi = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/EngiBody"); public static GameObject Cap = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/CaptainBody"); public static GameObject Heretic = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/HereticBody"); public static GameObject Fiend = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/VoidSurvivorBody"); public static GameObject Railer = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/RailgunnerBody"); public static GameObject Seeker = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Seeker/SeekerBody.prefab").WaitForCompletion(); public static GameObject Chef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Chef/ChefBody.prefab").WaitForCompletion(); public static GameObject FalseSon = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSon/FalseSonBody.prefab").WaitForCompletion(); public void Awake() { InitializeSkills(); } private void InitializeSkills() { IEnumerable<Type> enumerable = from p in typeof(Main).Assembly.GetTypes() where typeof(BaseSkillDef).IsAssignableFrom(p) && !p.IsAbstract select p; foreach (Type item in enumerable) { BaseSkillDef baseSkillDef = (BaseSkillDef)Activator.CreateInstance(item); baseSkillDef.Init(); } } private void UnfinishedFixToFalseSonSecondary() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown HookConfig val = default(HookConfig); val.ManualApply = true; HookConfig val2 = val; MethodInfo method = typeof(FalseSonController).GetMethod("get_secondarySkillIsFalseSonDefault", BindingFlags.Instance | BindingFlags.NonPublic); Hook val3 = new Hook((MethodBase)method, (Delegate)new Func<Func<FalseSonController, bool>, FalseSonController, bool>(HookMethod), ref val2); val3.Apply(); } private bool HookMethod(Func<FalseSonController, bool> orig, FalseSonController self) { return true; } } public class SeekerTracker : OtherTracker { public override void Awake() { //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) color = new Color32((byte)39, (byte)194, (byte)152, (byte)73); maxTrackingDistance = 60f; maxTrackingAngle = 30f; trackers = 1; base.Awake(); } } public abstract class BaseOtherTrackingSkillDef : BaseSkillDef { public override void MakeSkillDef() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Expected O, but got Unknown //IL_01f8: 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) OtherTrackingSkillDef otherTrackingSkillDef = ScriptableObject.CreateInstance<OtherTrackingSkillDef>(); ((SkillDef)otherTrackingSkillDef).activationState = skillState; ((SkillDef)otherTrackingSkillDef).interruptPriority = interruptPriority; ((SkillDef)otherTrackingSkillDef).activationStateMachineName = stateMachine; ((SkillDef)otherTrackingSkillDef).baseRechargeInterval = cooldown; ((SkillDef)otherTrackingSkillDef).baseMaxStock = maxStock; ((SkillDef)otherTrackingSkillDef).rechargeStock = rechargeStock; ((SkillDef)otherTrackingSkillDef).beginSkillCooldownOnSkillEnd = beginCooldownOnEnd; ((SkillDef)otherTrackingSkillDef).cancelSprintingOnActivation = cancelSprint; ((SkillDef)otherTrackingSkillDef).canceledFromSprinting = canceledFromSprint; ((SkillDef)otherTrackingSkillDef).isCombatSkill = isCombat; ((SkillDef)otherTrackingSkillDef).keywordTokens = keyWords; ((SkillDef)otherTrackingSkillDef).icon = BaseSkillDef.CreateSprite(rByte); GenericSkill val = slot; SkillFamily skillFamily = val.skillFamily; int num = skillFamily.variants.Length; string text = ((Object)((Component)val).gameObject).name.ToUpper(); string text2 = val.skillName.ToUpper(); ((SkillDef)otherTrackingSkillDef).skillName = text + "_" + text2 + "_SAVAGEALT" + num + "_NAME"; ((SkillDef)otherTrackingSkillDef).skillNameToken = text + "_" + text2 + "_SAVAGEALT" + num + "_NAME"; ((SkillDef)otherTrackingSkillDef).skillDescriptionToken = text + "_" + text2 + "_SAVAGEALT" + num + "_DESCRIPTION"; LanguageAPI.Add(((SkillDef)otherTrackingSkillDef).skillNameToken, name); LanguageAPI.Add(((SkillDef)otherTrackingSkillDef).skillDescriptionToken, desc); ContentAddition.AddSkillDef((SkillDef)(object)otherTrackingSkillDef); Array.Resize(ref skillFamily.variants, num + 1); Variant[] variants = skillFamily.variants; int num2 = skillFamily.variants.Length - 1; Variant val2 = new Variant { skillDef = (SkillDef)(object)otherTrackingSkillDef }; ((Variant)(ref val2)).viewableNode = new Node(((SkillDef)otherTrackingSkillDef).skillNameToken, false, (Node)null); variants[num2] = val2; } } public abstract class BaseOtherTrackingSteppedSkillDef : BaseOtherTrackingSkillDef { public int stepCount; public int stepGrace; public override void MakeSkillDef() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: 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_0210: Expected O, but got Unknown //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) OtherTrackingSteppedSkillDef otherTrackingSteppedSkillDef = ScriptableObject.CreateInstance<OtherTrackingSteppedSkillDef>(); ((SkillDef)otherTrackingSteppedSkillDef).activationState = skillState; ((SkillDef)otherTrackingSteppedSkillDef).interruptPriority = interruptPriority; ((SkillDef)otherTrackingSteppedSkillDef).activationStateMachineName = stateMachine; ((SkillDef)otherTrackingSteppedSkillDef).baseRechargeInterval = cooldown; ((SkillDef)otherTrackingSteppedSkillDef).baseMaxStock = maxStock; ((SkillDef)otherTrackingSteppedSkillDef).rechargeStock = rechargeStock; otherTrackingSteppedSkillDef.stepCount = stepCount; otherTrackingSteppedSkillDef.stepGraceDuration = stepGrace; ((SkillDef)otherTrackingSteppedSkillDef).beginSkillCooldownOnSkillEnd = beginCooldownOnEnd; ((SkillDef)otherTrackingSteppedSkillDef).cancelSprintingOnActivation = cancelSprint; ((SkillDef)otherTrackingSteppedSkillDef).canceledFromSprinting = canceledFromSprint; ((SkillDef)otherTrackingSteppedSkillDef).isCombatSkill = isCombat; ((SkillDef)otherTrackingSteppedSkillDef).keywordTokens = keyWords; ((SkillDef)otherTrackingSteppedSkillDef).icon = BaseSkillDef.CreateSprite(rByte); GenericSkill val = slot; SkillFamily skillFamily = val.skillFamily; int num = skillFamily.variants.Length; string text = ((Object)((Component)val).gameObject).name.ToUpper(); string text2 = val.skillName.ToUpper(); ((SkillDef)otherTrackingSteppedSkillDef).skillName = text + "_" + text2 + "_SAVAGEALT" + num + "_NAME"; ((SkillDef)otherTrackingSteppedSkillDef).skillNameToken = text + "_" + text2 + "_SAVAGEALT" + num + "_NAME"; ((SkillDef)otherTrackingSteppedSkillDef).skillDescriptionToken = text + "_" + text2 + "_SAVAGEALT" + num + "_DESCRIPTION"; LanguageAPI.Add(((SkillDef)otherTrackingSteppedSkillDef).skillNameToken, name); LanguageAPI.Add(((SkillDef)otherTrackingSteppedSkillDef).skillDescriptionToken, desc); ContentAddition.AddSkillDef((SkillDef)(object)otherTrackingSteppedSkillDef); Array.Resize(ref skillFamily.variants, num + 1); Variant[] variants = skillFamily.variants; int num2 = skillFamily.variants.Length - 1; Variant val2 = new Variant { skillDef = (SkillDef)(object)otherTrackingSteppedSkillDef }; ((Variant)(ref val2)).viewableNode = new Node(((SkillDef)otherTrackingSteppedSkillDef).skillNameToken, false, (Node)null); variants[num2] = val2; } } public abstract class OtherTracker : MonoBehaviour { public float maxTrackingDistance = 60f; public float maxTrackingAngle = 60f; public float trackerUpdateFrequency = 10f; public int trackers = 10; public Color32 color = Color32.op_Implicit(Color.black); public HurtBox[] trackingTargets; private TeamComponent teamComponent; private InputBankTest inputBank; private float trackerUpdateStopwatch; public Indicator[] indicators; private readonly BullseyeSearch search = new BullseyeSearch(); private CharacterBody characterBody; private bool colorHasChanged = false; public virtual void Awake() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown trackingTargets = (HurtBox[])(object)new HurtBox[trackers]; indicators = (Indicator[])(object)new Indicator[trackers]; for (int i = 0; i < trackers; i++) { indicators[i] = new Indicator(((Component)this).gameObject, Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressTrackingIndicator.prefab").WaitForCompletion()); indicators[i].active = true; } } private void Start() { characterBody = ((Component)this).GetComponent<CharacterBody>(); inputBank = ((Component)this).GetComponent<InputBankTest>(); teamComponent = ((Component)this).GetComponent<TeamComponent>(); } public HurtBox[] GetTrackingTargets() { return trackingTargets; } private void OnEnable() { for (int i = 0; i < indicators.Length; i++) { indicators[i].active = true; } } private void OnDisable() { for (int i = 0; i < indicators.Length; i++) { indicators[i].active = false; } } private void FixedUpdate() { //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_007f: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: 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_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) if (!HasTrackingSkills()) { Object.Destroy((Object)(object)this); } trackerUpdateStopwatch += Time.fixedDeltaTime; if (!(trackerUpdateStopwatch >= 1f / trackerUpdateFrequency)) { return; } trackerUpdateStopwatch -= 1f / trackerUpdateFrequency; Ray aimRay = default(Ray); ((Ray)(ref aimRay))..ctor(inputBank.aimOrigin, inputBank.aimDirection); SearchForTargets(aimRay); for (int i = 0; i < indicators.Length; i++) { if (trackingTargets.Length <= i) { indicators[i].active = false; indicators[i].targetTransform = null; continue; } indicators[i].active = true; indicators[i].targetTransform = ((Component)trackingTargets[i]).transform; ((Component)indicators[i].visualizerInstance.transform.GetChild(0)).gameObject.GetComponent<SpriteRenderer>().color = Color32.op_Implicit(color); ((Component)indicators[i].visualizerInstance.transform.GetChild(1).GetChild(0).GetChild(0)).gameObject.GetComponent<SpriteRenderer>().color = Color32.op_Implicit(color); ((Component)indicators[i].visualizerInstance.transform.GetChild(1).GetChild(1).GetChild(0)).gameObject.GetComponent<SpriteRenderer>().color = Color32.op_Implicit(color); ((Component)indicators[i].visualizerInstance.transform.GetChild(1).GetChild(2).GetChild(0)).gameObject.GetComponent<SpriteRenderer>().color = Color32.op_Implicit(color); ((Component)indicators[i].visualizerInstance.transform.GetChild(2)).gameObject.GetComponent<SpriteRenderer>().color = Color32.op_Implicit(color); } } private void SearchForTargets(Ray aimRay) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_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_0053: Unknown result type (might be due to invalid IL or missing references) search.teamMaskFilter = TeamMask.GetUnprotectedTeams(teamComponent.teamIndex); search.filterByLoS = true; search.searchOrigin = ((Ray)(ref aimRay)).origin; search.searchDirection = ((Ray)(ref aimRay)).direction; search.sortMode = (SortMode)2; search.maxDistanceFilter = maxTrackingDistance; search.maxAngleFilter = maxTrackingAngle; search.RefreshCandidates(); search.FilterOutGameObject(((Component)this).gameObject); trackingTargets = search.GetResults().ToArray(); } public bool HasTrackingSkills() { SkillDef[] array = (SkillDef[])(object)new SkillDef[4] { characterBody.skillLocator.primary.skillDef, characterBody.skillLocator.secondary.skillDef, characterBody.skillLocator.utility.skillDef, characterBody.skillLocator.special.skillDef }; SkillDef[] array2 = array; foreach (SkillDef val in array2) { if (val is OtherTrackingSkillDef) { return true; } } return false; } } public class OtherTrackingSkillDef : SkillDef { public class InstanceData : BaseSkillInstanceData { public OtherTracker otherTracker; } public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData { otherTracker = ((Component)skillSlot).GetComponent<OtherTracker>() }; } private static bool HasTarget([NotNull] GenericSkill skillSlot) { InstanceData instanceData = skillSlot.skillInstanceData as InstanceData; if (instanceData == null) { instanceData = skillSlot.skillInstanceData as OtherTrackingSteppedSkillDef.InstanceData; } if (instanceData == null) { Debug.LogError((object)"Invalid instance data type."); return false; } OtherTracker otherTracker = instanceData.otherTracker; return (Object)(object)otherTracker != (Object)null && otherTracker.GetTrackingTargets().Length != 0; } public override bool CanExecute([NotNull] GenericSkill skillSlot) { return HasTarget(skillSlot) && ((SkillDef)this).CanExecute(skillSlot); } public override bool IsReady([NotNull] GenericSkill skillSlot) { return ((SkillDef)this).IsReady(skillSlot) && HasTarget(skillSlot); } } internal class OtherTrackingSteppedSkillDef : OtherTrackingSkillDef { public new class InstanceData : OtherTrackingSkillDef.InstanceData { public int step; } public interface IStepSetter { void SetStep(int i); } public int stepCount = 2; public float stepGraceDuration = 0.1f; private float stepResetTimer; public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData { otherTracker = ((Component)skillSlot).GetComponent<OtherTracker>(), step = 0 }; } public override EntityState InstantiateNextState([NotNull] GenericSkill skillSlot) { EntityState val = ((SkillDef)this).InstantiateNextState(skillSlot); InstanceData instanceData = (InstanceData)(object)skillSlot.skillInstanceData; if (val is IStepSetter stepSetter) { stepSetter.SetStep(instanceData.step); } return val; } public override void OnExecute([NotNull] GenericSkill skillSlot) { ((SkillDef)this).OnExecute(skillSlot); InstanceData instanceData = (InstanceData)(object)skillSlot.skillInstanceData; instanceData.step++; if (instanceData.step >= stepCount) { instanceData.step = 0; } } public override void OnFixedUpdate([NotNull] GenericSkill skillSlot, float deltaTime) { ((SkillDef)this).OnFixedUpdate(skillSlot, deltaTime); if (skillSlot.CanExecute()) { stepResetTimer += Time.fixedDeltaTime; } else { stepResetTimer = 0f; } if (stepResetTimer > stepGraceDuration) { ((InstanceData)(object)skillSlot.skillInstanceData).step = 0; } } } [RequireComponent(typeof(Rigidbody))] [RequireComponent(typeof(ProjectileTargetComponent))] public class ProjectileTrackerController : MonoBehaviour { private Transform transform; private Rigidbody rigidbody; private HurtBox trackingTarget; private ProjectileController projectileController; private float timer; private QuaternionPID torquePID; public float delayTimer = 0.2f; public float maxVelocity = 30f; public float rollVelocity = 10f; public float acceleration = 20f; public float turbulence = 5f; private void Awake() { if (!NetworkServer.active) { ((Behaviour)this).enabled = false; return; } transform = ((Component)this).transform; rigidbody = ((Component)this).GetComponent<Rigidbody>(); torquePID = ((Component)this).GetComponent<QuaternionPID>(); projectileController = ((Component)this).GetComponent<ProjectileController>(); } private void FixedUpdate() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: 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_00fa: 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_0118: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) timer += Time.fixedDeltaTime; HurtBox[] trackingTargets = projectileController.owner.GetComponent<OtherTracker>().GetTrackingTargets(); if (trackingTargets.Length != 0) { trackingTarget = trackingTargets[0]; } else { trackingTarget = null; } rigidbody.velocity = transform.forward * maxVelocity; if (Object.op_Implicit((Object)(object)trackingTarget) && timer >= delayTimer) { rigidbody.velocity = transform.forward * (maxVelocity + timer * acceleration); Vector3 val = ((Component)trackingTarget).transform.position + Random.insideUnitSphere * turbulence - transform.position; if (val != Vector3.zero) { Quaternion rotation = transform.rotation; Quaternion targetQuat = Util.QuaternionSafeLookRotation(val); torquePID.inputQuat = rotation; torquePID.targetQuat = targetQuat; rigidbody.angularVelocity = torquePID.UpdatePID(); } } } } } namespace StormySkills.SkillDefs.Seeker { internal class SoulSearch : BaseOtherTrackingSteppedSkillDef { public override void SetParams() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) slot = Main.Seeker.GetComponent<SkillLocator>().primary; skillState = new SerializableEntityStateType(typeof(StormySkills.MyEntityStates.Seeker.SoulSearch)); name = "Soul Search"; desc = "Fire tracking orbs at enemies that explodes for <style=cIsDamage>200% damage</style>."; keyWords = new string[0]; rByte = Resources.SoulSearch; interruptPriority = (InterruptPriority)0; stateMachine = "Weapon"; cooldown = 0f; maxStock = 1; rechargeStock = 1; beginCooldownOnEnd = true; cancelSprint = true; canceledFromSprint = false; isCombat = true; stepCount = 2; stepGrace = 2; base.SetParams(); Main.Seeker.AddComponent<SeekerTracker>(); } } internal class UnseenSurge : BaseSkillDef { public override void SetParams() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) slot = Main.Seeker.GetComponent<SkillLocator>().utility; skillState = new SerializableEntityStateType(typeof(StormySkills.MyEntityStates.Seeker.UnseenSurge)); name = "Unseen Surge"; desc = "<style=cIsDamage>Stunning</style>. Launch a phantasmal hand from below you, <style=cIsHealth>damaging you</style> and launching you forward. <style=cIsDamage>Damages</style> enemies for <style=cIsDamage>600% damage</style> and <style=cIsHealing>Drains</style>."; keyWords = new string[1] { "KEYWORD_STUNNING" }; rByte = Resources.UnseenSurge; interruptPriority = (InterruptPriority)2; stateMachine = "Body"; cooldown = 7f; maxStock = 1; rechargeStock = 1; beginCooldownOnEnd = true; cancelSprint = true; canceledFromSprint = false; isCombat = true; base.SetParams(); Main.Seeker.AddComponent<SeekerTracker>(); } } } namespace StormySkills.SkillDefs.FalseSon { internal class Grab : BaseSkillDef { public override void SetParams() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) slot = Main.FalseSon.GetComponent<SkillLocator>().utility; skillState = new SerializableEntityStateType(typeof(GrabDash)); name = "Brotherly Hug"; desc = "<style=cIsDamage>Stunning</style>. Dash a short distance, and <style=cIsDamage>grab</style> the first enemy hit, throwing them for <style=cIsDamage>500% Damage</style>. <style=cIsUtility>Two uses</style>."; keyWords = new string[1] { "KEYWORD_STUNNING" }; rByte = Resources.SonGrab; interruptPriority = (InterruptPriority)2; stateMachine = "Body"; cooldown = 8f; maxStock = 2; rechargeStock = 1; beginCooldownOnEnd = true; cancelSprint = false; canceledFromSprint = false; isCombat = true; base.SetParams(); } } internal class LunarSpikesShotgun : BaseSkillDef { public override void SetParams() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) slot = Main.FalseSon.GetComponent<SkillLocator>().secondary; skillState = new SerializableEntityStateType(typeof(StormySkills.MyEntityStates.FalseSon.LunarSpikesShotgun)); name = "Lunar Shards"; desc = "Throw multiple Lunar Shards for <style=cIsDamage>8x80% damage.</style>"; keyWords = new string[0]; rByte = Resources.LunarShotgun; interruptPriority = (InterruptPriority)0; stateMachine = "Weapon"; cooldown = 4f; maxStock = 4; rechargeStock = 2; beginCooldownOnEnd = true; cancelSprint = false; canceledFromSprint = false; isCombat = true; base.SetParams(); } } } namespace StormySkills.SkillDefs.Chef { internal class OilyDash : BaseSkillDef { public override void SetParams() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) slot = Main.Chef.GetComponent<SkillLocator>().utility; skillState = new SerializableEntityStateType(typeof(StormySkills.MyEntityStates.Chef.OilyDash)); name = "Marinate"; desc = "<style=cIsUtility>Speed</style> forward, <style=cIsDamage>Slowing</style> nearby enemies and covering them in <style=cIsDamage>Oil</style>."; keyWords = new string[1] { "<style=cKeywordName>Boost</style><style=cSub>Boosting Marinate applies bleed per second dealing <style=cIsDamage>20% damage</style> to all nearby enemies." }; rByte = Resources.OilDash; interruptPriority = (InterruptPriority)2; stateMachine = "Body"; cooldown = 7f; maxStock = 1; rechargeStock = 1; beginCooldownOnEnd = true; cancelSprint = false; canceledFromSprint = false; isCombat = true; base.SetParams(); } } internal class Slice : BaseSkillDef { public override void SetParams() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) slot = Main.Chef.GetComponent<SkillLocator>().primary; skillState = new SerializableEntityStateType(typeof(StormySkills.MyEntityStates.Chef.Slice)); name = "Slice"; desc = "Quickly throw a short range cleaver through enemies for <style=cIsDamage>50%+75% damage</style>."; keyWords = new string[1] { "<style=cKeywordName>Boost</style><style=cSub>Boosting Slice throws many damaging cleavers in all directions. Use again to recall all cleavers." }; rByte = Resources.Slice; interruptPriority = (InterruptPriority)0; stateMachine = "Weapon"; cooldown = 0f; maxStock = 1; rechargeStock = 1; beginCooldownOnEnd = true; cancelSprint = false; canceledFromSprint = false; isCombat = true; base.SetParams(); } } } namespace StormySkills.Properties { [GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [DebuggerNonUserCode] [CompilerGenerated] public class Resources { private static ResourceManager resourceMan; private static CultureInfo resourceCulture; [EditorBrowsable(EditorBrowsableState.Advanced)] public static ResourceManager ResourceManager { get { if (resourceMan == null) { ResourceManager resourceManager = new ResourceManager("StormySkills.Properties.Resources", typeof(Resources).Assembly); resourceMan = resourceManager; } return resourceMan; } } [EditorBrowsable(EditorBrowsableState.Advanced)] public static CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } public static byte[] LaserScythe { get { object @object = ResourceManager.GetObject("LaserScythe", resourceCulture); return (byte[])@object; } } public static byte[] LunarShotgun { get { object @object = ResourceManager.GetObject("LunarShotgun", resourceCulture); return (byte[])@object; } } public static byte[] OilDash { get { object @object = ResourceManager.GetObject("OilDash", resourceCulture); return (byte[])@object; } } public static byte[] Slice { get { object @object = ResourceManager.GetObject("Slice", resourceCulture); return (byte[])@object; } } public static byte[] SonGrab { get { object @object = ResourceManager.GetObject("SonGrab", resourceCulture); return (byte[])@object; } } public static byte[] SoulSearch { get { object @object = ResourceManager.GetObject("SoulSearch", resourceCulture); return (byte[])@object; } } public static byte[] UnseenSurge { get { object @object = ResourceManager.GetObject("UnseenSurge", resourceCulture); return (byte[])@object; } } internal Resources() { } } } namespace StormySkills.MyEntityStates.Seeker { public class SoulSearch : BaseState, OtherTrackingSteppedSkillDef.IStepSetter { public enum Gauntlet { Left, Right } public GameObject projectilePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Seeker/SoulSearchProjectile.prefab").WaitForCompletion(); public GameObject muzzleflashEffectPrefab; public float procCoefficient = 1f; public float damageCoefficient = 0.5f; public float force = 20f; public float baseDuration = 0.5f; public string attackSoundString; public float attackSoundPitch; public static float bloom = 1f; private float duration; private bool hasFiredGauntlet; private string muzzleString; private Transform muzzleTransform; private Animator animator; private ChildLocator childLocator; private Gauntlet gauntlet; private OtherTracker tracker; public void SetStep(int i) { gauntlet = (Gauntlet)i; } public override void OnEnter() { ((BaseState)this).OnEnter(); tracker = ((Component)((EntityState)this).characterBody).GetComponent<OtherTracker>(); if (tracker.GetTrackingTargets().Length < 1) { ((EntityState)this).outer.SetNextStateToMain(); return; } duration = baseDuration / base.attackSpeedStat; Util.PlayAttackSpeedSound(attackSoundString, ((EntityState)this).gameObject, attackSoundPitch); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { childLocator = ((Component)animator).GetComponent<ChildLocator>(); } Gauntlet gauntlet = this.gauntlet; if (gauntlet == Gauntlet.Left) { muzzleString = "MuzzleLeft"; ((EntityState)this).PlayCrossfade("Gesture, Additive", "Cast1Left", "FireGauntlet.playbackRate", duration, 0.1f); ((EntityState)this).PlayCrossfade("Gesture, Override", "Cast1Left", "FireGauntlet.playbackRate", duration, 0.1f); } if (gauntlet == Gauntlet.Right) { muzzleString = "MuzzleRight"; ((EntityState)this).PlayCrossfade("Gesture, Additive", "Cast1Right", "FireGauntlet.playbackRate", duration, 0.1f); ((EntityState)this).PlayCrossfade("Gesture, Override", "Cast1Right", "FireGauntlet.playbackRate", duration, 0.1f); } FireGauntlet(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void FireGauntlet() { //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_00e8: 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_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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) if (hasFiredGauntlet) { return; } ((EntityState)this).characterBody.AddSpreadBloom(bloom); Ray aimRay = ((BaseState)this).GetAimRay(); if (Object.op_Implicit((Object)(object)childLocator)) { muzzleTransform = childLocator.FindChild(muzzleString); } if (Object.op_Implicit((Object)(object)muzzleflashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } if ((Object)(object)projectilePrefab != (Object)null && ((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)projectilePrefab.GetComponent<SoulSearchController>())) { EntityState.Destroy((Object)(object)projectilePrefab.GetComponent<SoulSearchController>()); projectilePrefab.AddComponent<ProjectileTrackerController>(); projectilePrefab.GetComponent<ProjectileImpactExplosion>().lifetime = 3f; } FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = projectilePrefab; val.position = muzzleTransform.position; val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.owner = ((EntityState)this).gameObject; val.damage = base.damageStat * damageCoefficient; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } } 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 override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write((byte)gauntlet); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); gauntlet = (Gauntlet)reader.ReadByte(); } } public class UnseenSurge : BaseState { public override void OnEnter() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: 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_00bc: 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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: 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_013d: 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_015c: 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_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_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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Expected O, but got Unknown //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: 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_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Gesture, Additive", "UnseenHandFinish"); ((EntityState)this).PlayAnimation("Gesture, Override", "UnseenHandFinish"); Util.PlaySound(UnseenHand.fireSoundString, ((EntityState)this).gameObject); EffectManager.SpawnEffect(UnseenHand.muzzleFlashEffect, new EffectData { origin = ((EntityState)this).transform.position - Vector3.down * 1f }, true); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; ((EntityState)this).characterBody.isSprinting = true; Vector3 val = ((Vector3)(ref direction)).normalized * 4f * base.moveSpeedStat; Vector3 val2 = Vector3.up * 30f; Vector3 val3 = new Vector3(direction.x, 0f, direction.z); Vector3 val4 = ((Vector3)(ref val3)).normalized * 15f; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = val + val2 + val4; if (((EntityState)this).isAuthority) { Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); FireProjectileInfo val5 = default(FireProjectileInfo); val5.projectilePrefab = UnseenHand.fistProjectilePrefab; val5.position = ((EntityState)this).transform.position - Vector3.down * 1f; aimRay = ((BaseState)this).GetAimRay(); val5.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val5.owner = ((EntityState)this).gameObject; val5.damage = base.damageStat * UnseenHand.fistDamageCoefficient; val5.damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)32); val5.force = UnseenHand.fistForce; val5.crit = ((EntityState)this).characterBody.RollCrit(); ((FireProjectileInfo)(ref val5)).fuseOverride = UnseenHand.fuseOverride; ProjectileManager.instance.FireProjectile(val5); } if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).healthComponent)) { DamageInfo val6 = new DamageInfo(); val6.damage = ((EntityState)this).healthComponent.combinedHealth * 0.3f; val6.position = ((EntityState)this).characterBody.corePosition; val6.force = Vector3.zero; val6.damageColorIndex = (DamageColorIndex)0; val6.crit = false; val6.attacker = null; val6.inflictor = null; val6.damageType = DamageTypeCombo.op_Implicit((DamageType)1); val6.procCoefficient = 0f; val6.procChainMask = default(ProcChainMask); ((EntityState)this).healthComponent.TakeDamage(val6); } Util.PlaySound(UnseenHand.endFistSoundString, ((EntityState)this).gameObject); Util.PlaySound(UnseenHand.stopTargetingLoopSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > 0.3f) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } } } namespace StormySkills.MyEntityStates.FalseSon { internal class GrabDash : BaseState { private Collider[] grabberColliders; private float duration; private float baseDuration = 0.5f; private bool hasHit; private HurtBox hurtbox; private GameObject baby; public override void OnEnter() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00d0: 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_00ee: 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_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_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_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_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_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) duration = baseDuration / base.attackSpeedStat; ((BaseState)this).OnEnter(); if (NetworkServer.active) { ((EntityState)this).PlayAnimation("Gesture, Override", "HoldGauntletsUp", "LunarSpike.playbackRate", duration, 0f); } Util.PlaySound(StepBrothers.beginSoundString, ((EntityState)this).gameObject); ((EntityState)this).characterBody.SetAimTimer(2f); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; ((EntityState)this).characterBody.isSprinting = true; Vector3 val = ((Vector3)(ref direction)).normalized * 6f * base.moveSpeedStat; Vector3 val2 = new Vector3(direction.x, 0f, direction.z); Vector3 val3 = ((Vector3)(ref val2)).normalized * 15f; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = val + val3; grabberColliders = ((EntityState)this).gameObject.GetComponentsInChildren<Collider>(); if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator)) { grabberColliders = grabberColliders.Concat(((Component)((EntityState)this).modelLocator.modelBaseTransform).GetComponentsInChildren<Collider>()).ToArray(); } if (Object.op_Implicit((Object)(object)BaseSlideState.slideEffectPrefab) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { Vector3 val4 = ((EntityState)this).characterBody.corePosition; Quaternion val5 = Quaternion.identity; Transform val6 = ((BaseState)this).FindModelChild("MuzzleRight"); if (Object.op_Implicit((Object)(object)val6)) { val4 = val6.position; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { val5 = Util.QuaternionSafeLookRotation(((EntityState)this).characterDirection.forward, Vector3.up); } EffectManager.SimpleEffect(BaseSlideState.slideEffectPrefab, val4, val5, false); } } public override void FixedUpdate() { //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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (NetworkServer.active) { ((EntityState)this).PlayAnimation("Gesture, Override", "HoldGauntletsUp", "LunarSpike.playbackRate", duration, 0f); } CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.forward = ((Ray)(ref aimRay)).direction; ((EntityState)this).characterBody.isSprinting = false; bool flag = !hasHit; if (flag) { Ray aimRay2 = ((BaseState)this).GetAimRay(); BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = TeamMask.GetUnprotectedTeams(((EntityState)this).teamComponent.teamIndex); val.filterByLoS = true; val.searchOrigin = ((Ray)(ref aimRay2)).origin; val.searchDirection = ((Ray)(ref aimRay2)).direction; val.sortMode = (SortMode)2; val.maxDistanceFilter = 10f; val.maxAngleFilter = 90f; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); for (int i = 0; i < val.GetResults().ToList().Count(); i++) { hurtbox = val.GetResults().ElementAtOrDefault(i); if (Object.op_Implicit((Object)(object)hurtbox) && !hurtbox.healthComponent.body.isBoss) { baby = ((Component)hurtbox.healthComponent).gameObject; SetStateOnHurt.SetStunOnObject(baby, 3f); IsBaby isBaby = baby.AddComponent<IsBaby>(); isBaby.grabberColliders = grabberColliders; isBaby.parentBody = ((EntityState)this).characterBody; baby.transform.parent = ((Component)((EntityState)this).GetModelTransform()).GetComponent<ChildLocator>().FindChild("MuzzleRight"); hasHit = true; break; } } } if ((((EntityState)this).fixedAge >= duration || !flag) && ((EntityState)this).isAuthority) { if (hasHit) { GrabThrow nextState = new GrabThrow { baby = baby }; ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterMotor.velocity = Vector3.zero; } 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)2; } } internal class GrabThrow : BaseState { private float duration; private float baseDuration = 0.5f; public GameObject baby; private string targetMuzzle; private Transform modelTransform; private Transform muzzleTransform; public override void OnEnter() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) duration = baseDuration / base.attackSpeedStat; ((BaseState)this).OnEnter(); if (NetworkServer.active) { ((EntityState)this).PlayAnimation("Gesture, Override", "HoldGauntletsUp", "LunarSpike.playbackRate", duration, 0f); } ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterBody.SetAimTimer(2f); } public override void FixedUpdate() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: 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_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: 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_0206: 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_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021d: 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_022d: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Expected O, but got Unknown ((EntityState)this).FixedUpdate(); bool flag = Object.op_Implicit((Object)(object)baby); if (NetworkServer.active) { ((EntityState)this).PlayAnimation("Gesture, Override", "HoldGauntletsUp", "LunarSpike.playbackRate", duration, 0f); } CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.forward = ((Ray)(ref aimRay)).direction; ((EntityState)this).characterBody.isSprinting = false; if ((!(((EntityState)this).fixedAge >= duration) && flag) || !((EntityState)this).isAuthority) { return; } if (flag) { baby.transform.parent = null; baby.GetComponent<IsBaby>().StartDestroy(); aimRay = ((BaseState)this).GetAimRay(); Vector3 velocity = ((Ray)(ref aimRay)).direction * 50f; CharacterMotor component = baby.GetComponent<CharacterMotor>(); if (Object.op_Implicit((Object)(object)component)) { component.velocity = velocity; } RigidbodyMotor component2 = baby.GetComponent<RigidbodyMotor>(); if (Object.op_Implicit((Object)(object)component2)) { component2.rigid.velocity = velocity; } Util.PlaySound(LaserFatherBurst.attackSoundString, ((EntityState)this).gameObject); targetMuzzle = "MuzzleLaser"; modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform) && Object.op_Implicit((Object)(object)((Component)modelTransform).GetComponent<ChildLocator>())) { muzzleTransform = ((Component)modelTransform).GetComponent<ChildLocator>().FindChild(targetMuzzle); } if (Object.op_Implicit((Object)(object)LaserFatherBurst.effectPrefab)) { EffectManager.SimpleMuzzleFlash(LaserFatherBurst.effectPrefab, ((EntityState)this).gameObject, targetMuzzle, false); } new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject), baseDamage = base.damageStat * 5f, baseForce = 0f, position = muzzleTransform.position, radius = 5f, falloffModel = (FalloffModel)2 }.Fire(); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component3 = ((Component)modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component3)) { int num = component3.FindChildIndex(targetMuzzle); if (Object.op_Implicit((Object)(object)LaserFatherBurst.tracerEffectPrefab)) { EffectData val = new EffectData { origin = baby.transform.position, start = muzzleTransform.position }; val.SetChildLocatorTransformReference(((EntityState)this).gameObject, num); EffectManager.SpawnEffect(LaserFatherBurst.tracerEffectPrefab, val, true); EffectManager.SpawnEffect(LaserFatherBurst.hitEffectPrefab, val, true); } } } } ((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)7; } } public class IsBaby : MonoBehaviour { public Collider[] grabberColliders; private Collider[] grabbedColliders; private float destroyTimer = 0f; private bool startDestroy = false; private CharacterMotor characterMotor; private CharacterBody characterBody; private RigidbodyMotor rigidMotor; public CharacterBody parentBody; private void Start() { grabbedColliders = ((Component)this).gameObject.GetComponentsInChildren<Collider>(); characterMotor = ((Component)this).gameObject.GetComponent<CharacterMotor>(); characterBody = ((Component)this).gameObject.GetComponent<CharacterBody>(); rigidMotor = ((Component)this).gameObject.GetComponent<RigidbodyMotor>(); characterBody.AddBuff(Buffs.Cripple); for (int i = 0; i < grabbedColliders.Length; i++) { for (int j = 0; j < grabberColliders.Length; j++) { if ((Object)(object)grabberColliders[j] != (Object)null && (Object)(object)grabbedColliders[i] != (Object)null) { Physics.IgnoreCollision(grabberColliders[j], grabbedColliders[i], true); } } } } private void OnDestroy() { characterBody.RemoveBuff(Buffs.Cripple); for (int i = 0; i < grabbedColliders.Length; i++) { for (int j = 0; j < grabberColliders.Length; j++) { if ((Object)(object)grabberColliders[j] != (Object)null && (Object)(object)grabbedColliders[i] != (Object)null) { Physics.IgnoreCollision(grabberColliders[j], grabbedColliders[i], false); } } } } public void StartDestroy() { startDestroy = true; } private void FixedUpdate() { //IL_0085: 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_00aa: 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_00c4: 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_0131: 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_0146: Unknown result type (might be due to invalid IL or missing references) if (startDestroy) { destroyTimer += Time.fixedDeltaTime; if (destroyTimer >= 0.3f) { Object.Destroy((Object)(object)this); } } if (Object.op_Implicit((Object)(object)characterMotor) && (Object)(object)((Component)this).gameObject.transform.parent != (Object)null) { ((BaseCharacterController)characterMotor).Motor.SetPositionAndRotation(((Component)this).gameObject.transform.parent.position + ((Component)this).gameObject.transform.parent.forward * characterBody.radius, ((Component)this).gameObject.transform.parent.rotation, true); } if (Object.op_Implicit((Object)(object)rigidMotor) && (Object)(object)((Component)this).gameObject.transform.parent != (Object)null) { rigidMotor.rigid.MovePosition(((Component)this).gameObject.transform.parent.position + ((Component)this).gameObject.transform.parent.forward * characterBody.radius); } } } internal class LunarSpikesShotgun : BaseState { public GameObject projectilePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Brother/LunarShardProjectile.prefab").WaitForCompletion(); public GameObject muzzleflashEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Brother/MuzzleflashLunarShard.prefab").WaitForCompletion(); public float force = 20f; public float baseDuration = 0.5f; public static float bloom = 0.5f; private float duration; private bool hasFiredSpike; private string muzzleString; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "MuzzleRight"; ((EntityState)this).PlayCrossfade("Gesture, Additive", "FireLunarSpike", "LunarSpike.playbackRate", duration, 0.1f); ((EntityState)this).PlayCrossfade("Gesture, Override", "FireLunarSpike", "LunarSpike.playbackRate", duration, 0.1f); FireLunarSpike(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void FireLunarSpike() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_016e: 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_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //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_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) if (hasFiredSpike) { return; } ((EntityState)this).characterBody.AddSpreadBloom(LunarSpikes.bloom); hasFiredSpike = true; Ray aimRay = ((BaseState)this).GetAimRay(); TrajectoryAimAssist.ApplyTrajectoryAimAssist(ref aimRay, projectilePrefab, ((EntityState)this).gameObject, 1f); if (Object.op_Implicit((Object)(object)muzzleflashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } if (((EntityState)this).isAuthority) { Vector3 up = Vector3.up; Vector3 val = Vector3.Cross(up, ((Ray)(ref aimRay)).direction); for (int i = 0; i < 8; i++) { FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = projectilePrefab; val2.position = ((Ray)(ref aimRay)).origin; float num = Random.Range(0, 5); float num2 = Random.Range(0f, 360f); Vector3 val3 = Quaternion.Euler(0f, 0f, num2) * (Quaternion.Euler(num, 0f, 0f) * Vector3.forward); float y = val3.y; val3.y = 0f; float num3 = (Mathf.Atan2(val3.z, val3.x) * 57.29578f - 90f) * 2f; float num4 = Mathf.Atan2(y, ((Vector3)(ref val3)).magnitude) * 57.29578f * 1f; val2.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(num3, up) * (Quaternion.AngleAxis(num4, val) * ((Ray)(ref aimRay)).direction)); val2.owner = ((EntityState)this).gameObject; val2.damage = base.damageStat * 0.08f; val2.damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)0); val2.force = force; val2.crit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); ProjectileManager.instance.FireProjectile(val2); } } } 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; } } } namespace StormySkills.MyEntityStates.Chef { internal class OilyDash : GenericCharacterMain { private ChefController chefController; private bool hasBoost; private Vector3 idealDirection; private int originalLayer; private Ray projectileRay; private Transform modelTransform; private float timer = 0f; private List<HurtBox> hurtBoxBuffer = new List<HurtBox>(); public override void OnEnter() { //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_01ad: 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_0208: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnEnter(); modelTransform = ((EntityState)this).GetModelTransform(); chefController = ((Component)((EntityState)this).characterBody).GetComponent<ChefController>(); chefController.rolyPolyActive = true; originalLayer = ((EntityState)this).gameObject.layer; ((EntityState)this).gameObject.layer = LayerIndex.GetAppropriateFakeLayerForTeam(((EntityState)this).teamComponent.teamIndex).intVal; if (((EntityState)this).characterBody.HasBuff(Buffs.Boosted)) { hasBoost = true; if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.Boosted); } } CharacterMotor characterMotor = ((EntityState)this).characterMotor; if ((Object)(object)characterMotor != (Object)null) { ((BaseCharacterController)characterMotor).Motor.RebuildCollidableLayers(); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.CookingRolling); } if (hasBoost) { Util.PlaySound("Play_chef_skill3_start", ((EntityState)this).gameObject); Util.PlaySound("Play_chef_skill3_boosted_active_loop", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Body", "BoostedRolyPoly", "BoostedRolyPoly.playbackRate", 1f, 0f); ((EntityState)this).GetModelAnimator().SetBool("isInBoostedRolyPoly", true); } else { Util.PlaySound("Play_chef_skill3_start", ((EntityState)this).gameObject); ((EntityState)this).GetModelAnimator().SetBool("isInRolyPoly", true); ((EntityState)this).PlayAnimation("Body", "FireRolyPoly", "FireRolyPoly.playbackRate", 1f, 0f); } if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { idealDirection = ((EntityState)this).inputBank.aimDirection; idealDirection.y = 0f; } UpdateDirection(); } if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator)) { ((EntityState)this).modelLocator.normalizeToFloor = true; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.forward = idealDirection; } Util.PlaySound("Stop_chef_skill3_charge_loop", ((EntityState)this).gameObject); HitBoxGroup val = null; Transform val2 = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)val2)) { val = Array.Find(((Component)val2).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Charge"); } } public override void OnExit() { //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_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) chefController.rolyPolyActive = false; chefController.SetYesChefHeatState(false); chefController.blockOtherSkills = false; if (hasBoost) { if (NetworkServer.active && ((EntityState)this).characterBody.HasBuff(Buffs.boostedFireEffect)) { ((EntityState)this).characterBody.RemoveBuff(Buffs.boostedFireEffect); } if (((EntityState)this).isAuthority) { chefController.ClearSkillOverrides(); } } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.CookingRolling); } ((EntityState)this).gameObject.layer = originalLayer; CharacterMotor characterMotor = ((EntityState)this).characterMotor; if (!((Object)(object)characterMotor != (Object)null)) { return; } ((BaseCharacterController)characterMotor).Motor.RebuildCollidableLayers(); if (!((EntityState)this).outer.destroying && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.isSprinting = false; if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.ArmorBoost); } } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.disableAirControlUntilCollision) { CharacterMotor characterMotor2 = ((EntityState)this).characterMotor; characterMotor2.velocity += GetIdealVelocity(); } if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator)) { ((EntityState)this).modelLocator.normalizeToFloor = false; } ((EntityState)this).GetModelAnimator().SetBool("isInRolyPoly", false); ((EntityState)this).GetModelAnimator().SetBool("isInBoostedRolyPoly", false); ((EntityState)this).PlayCrossfade("Body", "ExitRolyPoly", 0.1f); if (hasBoost) { Util.PlaySound("Stop_chef_skill3_boosted_active_loop", ((EntityState)this).gameObject); } Util.PlaySound(RolyPoly.endSoundString, ((EntityState)this).gameObject); Util.PlaySound("Stop_chef_skill3_active_loop", ((EntityState)this).gameObject); Util.PlaySound("Stop_chef_skill3_charge_loop", ((EntityState)this).gameObject); ((GenericCharacterMain)this).OnExit(); } private void UpdateDirection() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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) if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { Vector3 moveVector = ((EntityState)this).inputBank.moveVector; Vector2 val = ((!(moveVector == Vector3.zero)) ? Util.Vector3XZToVector2XY(((Vector3)(ref moveVector)).normalized) : Util.Vector3XZToVector2XY(((EntityState)this).characterDirection.forward)); if (val != Vector2.zero) { ((Vector2)(ref val)).Normalize(); Vector3 val2 = new Vector3(val.x, 0f, val.y); idealDirection = ((Vector3)(ref val2)).normalized; } } } private void Explode() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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_00ec: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: 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_0166: 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_0088: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound(Glaze.attackSoundString, ((EntityState)this).gameObject); projectileRay = ((BaseState)this).GetAimRay(); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("MuzzleGlaze" + 1); if (Object.op_Implicit((Object)(object)val)) { ((Ray)(ref projectileRay)).origin = val.position; ((Ray)(ref projectileRay)).direction = Vector3.down; } } } ((BaseState)this).AddRecoil(-1f * Glaze.recoilAmplitude, -2f * Glaze.recoilAmplitude, -1f * Glaze.recoilAmplitude, 1f * Glaze.recoilAmplitude); EffectData val2 = new EffectData { origin = ((EntityState)this).transform.position, scale = 0.5f }; EffectManager.SpawnEffect(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ClayBoss/MuzzleflashClayBoss.prefab").WaitForCompletion(), val2, true); if (((EntityState)this).isAuthority) { Vector3 corePosition = ((EntityState)this).characterBody.corePosition; SphereSearch val3 = new SphereSearch(); val3.origin = corePosition; val3.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; val3.radius = 10f; val3.RefreshCandidates(); val3.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(((EntityState)this).teamComponent.teamIndex)); val3.FilterCandidatesByDistinctHurtBoxEntities(); val3.OrderCandidatesByDistance(); val3.GetHurtBoxes(hurtBoxBuffer); val3.ClearCandidates(); for (int i = 0; i < hurtBoxBuffer.Count; i++) { HurtBox val4 = hurtBoxBuffer[i]; if (Object.op_Implicit((Object)(object)val4.healthComponent.body)) { val4.healthComponent.body.AddTimedBuff(Buffs.CookingOiled, 5f); val4.healthComponent.body.AddTimedBuff(Buffs.ClayGoo, 5f); } } } ((EntityState)this).characterBody.AddSpreadBloom(Glaze.spreadBloomValue); } private Vector3 GetIdealVelocity() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) Vector3 forward = ((EntityState)this).characterDirection.forward; return ((Vector3)(ref forward)).normalized * ((EntityState)this).characterBody.moveSpeed * 2f; } public override void FixedUpdate() { //IL_00f2: 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_0109: 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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).FixedUpdate(); timer += Time.fixedDeltaTime; if (((EntityState)this).fixedAge >= 1f) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (timer >= 0.2f) { timer = 0f; Explode(); } if (!((EntityState)this).isAuthority) { return; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.isSprinting = true; } if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.special) && ((EntityState)this).inputBank.skill4.down) { ((EntityState)this).skillLocator.special.ExecuteIfReady(); } UpdateDirection(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.moveDirection = idealDirection; ((EntityState)this).characterDirection.moveVector = idealDirection; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.disableAirControlUntilCollision) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += GetIdealVelocity() * ((EntityState)this).GetDeltaTime(); } } } 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)5; } } internal class Slice : BaseState { private float bloom = 0.5f; private float damageCoefficient = 0.5f; private float boostedDamageCoefficient = 0.2f; private float baseDuration = 1f; private string yesChefAttackString; private string attackString; private float recoilAmplitude = 0.2f; private GameObject effectEnhancedPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Chef/MuzzleflashChefDiceEnhanced.prefab").WaitForCompletion(); private GameObject effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Chef/MuzzleflashChefDice.prefab").WaitForCompletion(); private GameObject projectileEnhancedPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Chef/ChefCleaver.prefab").WaitForCompletion(); private GameObject projectilePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Chef/ChefCleaver.prefab").WaitForCompletion(); private float force = 0f; private string yesChefReturnString; private string returnString; private bool hasBoost; private float duration; private GameObject approximateCleaverDistance; private ChefController chefController; public override void OnEnter() { //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (!Object.op_Implicit((Object)(object)chefController)) { chefController = ((EntityState)this).GetComponent<ChefController>(); } chefController.characterBody = ((EntityState)this).characterBody; chefController.spreadBloom = bloom; hasBoost = ((EntityState)this).characterBody.HasBuff(Buffs.Boosted); if (hasBoost) { damageCoefficient = boostedDamageCoefficient; if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.Boosted); } } chefController.NetworkcatchDirtied = false; chefController.recallCleaver = false; Ray aimRay = ((BaseState)this).GetAimRay(); TrajectoryAimAssist.ApplyTrajectoryAimAssist(ref aimRay, approximateCleaverDistance, ((EntityState)this).gameObject, 1f); duration = baseDuration / base.attackSpeedStat; ((BaseState)this).StartAimMode(duration + 2f, false); if (hasBoost) { ((EntityState)this).PlayAnimation("Gesture, Override", "FireSliceAndDice", "FireSliceAndDice.playbackRate", duration, 0f); ((EntityState)this).PlayAnimation("Gesture, Additive", "FireSliceAndDice", "FireSliceAndDice.playbackRate", duration, 0f); Util.PlaySound(yesChefAttackString, ((EntityState)this).gameObject); } else { ((EntityState)this).PlayAnimation("Gesture, Override", "FireDice", "FireDice.playbackRate", duration, 0f); ((EntityState)this).PlayAnimation("Gesture, Additive", "FireDice", "FireDice.playbackRate", duration, 0f); Util.PlaySound(attackString, ((EntityState)this).gameObject); } ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); string text = "MouthMuzzle"; GameObject val = (hasBoost ? effectEnhancedPrefab : effectPrefab); if (Object.op_Implicit((Object)(object)val)) { EffectManager.SimpleMuzzleFlash(val, ((Component)((EntityState)this).characterBody.aimOriginTransform).gameObject, text, false); } chefController.cleaverAway = true; if (!((EntityState)this).isAuthority) { return; } int[] array = new int[1] { 1 }; GameObject val2 = (hasBoost ? projectileEnhancedPrefab : projectilePrefab); if (hasBoost) { array = new int[1] { 16 }; } int num = array.Length; for (int i = 0; i < num; i++) { int num2 = array[i]; float num3 = (float)(i % 2) * (0.5f / (float)num2); for (int j = 0; j < num2; j++) { FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = val2; val3.position = ((Ray)(ref aimRay)).origin; float num4 = (num3 + (float)j / (float)num2) * MathF.PI * 2f; float num5 = Mathf.Acos(0.02f + (float)i / (float)num); float num6 = Mathf.Sin(num5) * Mathf.Sin(num4); float num7 = Mathf.Cos(num5); float num8 = Mathf.Sin(num5) * Mathf.Cos(num4); Quaternion val4 = Quaternion.LookRotation(new Vector3(num6, num7, num8)); val3.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction) * val4; val3.owner = ((EntityState)this).gameObject; val3.damage = base.damageStat * damageCoefficient; val3.damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)0); val3.force = force; val3.crit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); if (!NetworkServer.active && Object.op_Implicit((Object)(object)chefController)) { chefController.CacheCleaverProjectileFireInfo(val3); } ProjectileManager.instance.FireProjectile(val3); } } } public override void OnExit() { chefController.SetYesChefHeatState(false); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.boostedFireEffect); if (!hasBoost) { chefController.DestroyCleavers(); } } if (((EntityState)this).isAuthority) { chefController.ClearSkillOverrides(); } if (chefController.cleaverAway) { chefController.recallCleaver = true; } if (chefController.catchDirtied) { chefController.NetworkcatchDirtied = false; ((EntityState)this).PlayAnimation("Gesture, Override", "DiceReturnCatch", "DiceReturnCatch.playbackRate", duration, 0f); ((EntityState)this).PlayAnimation("Gesture, Additive", "DiceReturnCatch", "DiceReturnCatch.playbackRate", duration, 0f); } else { ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty", (string)null, duration, 0f); ((EntityState)this).PlayAnimation("Gesture, Additive", "BufferEmpty", (string)null, duration, 0f); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { bool flag = ((EntityState)this).fixedAge > 0f; ((EntityState)this).FixedUpdate(); bool isAuthority = ((EntityState)this).isAuthority; if (((EntityState)this).fixedAge > 0.1f) { chefController.recallCleaver = true; ((EntityState)this).PlayAnimation("Gesture, Override", "DiceReturnHold", (string)null, duration, 0.2f); ((EntityState)this).PlayAnimation("Gesture, Additive", "DiceReturnHold", (string)null, duration, 0.2f); } if (chefController.catchDirtied) { if (hasBoost) { Util.PlaySound(yesChefReturnString, ((EntityState)this).gameObject); } else { Util.PlaySound(returnString, ((EntityState)this).gameObject); } if (isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } else if (!chefController.cleaverAway && flag) { chefController.NetworkcatchDirtied = true; if (isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override InterruptPriority GetMinimumInterruptPriority()