Decompiled source of Videogame Mod 2 Unofficial v0.21.13
plugins/ChirrLover-Starstorm2Unofficial/Starstorm2Unofficial.dll
Decompiled a week ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using BlightedElites.Components; using DefenseMatrixManager; using EmotesAPI; using EntityStates; using EntityStates.Captain.Weapon; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using EntityStates.GlobalSkills.LunarDetonator; using EntityStates.GolemMonster; using EntityStates.GravekeeperBoss; using EntityStates.Gup; using EntityStates.ImpBossMonster; using EntityStates.Interactables.StoneGate; using EntityStates.Mage; using EntityStates.Merc; using EntityStates.MeridianEvent; using EntityStates.Missions.BrotherEncounter; using EntityStates.NullifierMonster; using EntityStates.SS2UStates.Chirr; using EntityStates.SS2UStates.Chirr.Special; using EntityStates.SS2UStates.Chirr.Taunt; using EntityStates.SS2UStates.Common; using EntityStates.SS2UStates.Common.Emotes; using EntityStates.SS2UStates.Cyborg; using EntityStates.SS2UStates.Cyborg.ChargeRifle; using EntityStates.SS2UStates.Cyborg.Jetpack; using EntityStates.SS2UStates.Cyborg.Secondary; using EntityStates.SS2UStates.Cyborg.Special; using EntityStates.SS2UStates.Executioner; using EntityStates.SS2UStates.Nemmando; using EntityStates.SS2UStates.Nemmando.Taunt; using EntityStates.SS2UStates.Nucleator; using EntityStates.SS2UStates.Nucleator.Primary; using EntityStates.SS2UStates.Nucleator.Secondary; using EntityStates.SS2UStates.Nucleator.Special; using EntityStates.SS2UStates.Nucleator.Utility; using EntityStates.SS2UStates.Pyro; using EntityStates.Toolbot; using EntityStates.Treebot.TreebotFlower; using HG; using HG.BlendableTypes; using HG.Reflection; using IL.EntityStates.VoidInfestor; using IL.RoR2; using IL.RoR2.UI; using Inferno; using JetBrains.Annotations; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using NS_KingKombatArena; using On.EntityStates.GlobalSkills.LunarDetonator; using On.EntityStates.Gup; using On.EntityStates.Interactables.StoneGate; using On.EntityStates.MeridianEvent; using On.EntityStates.Missions.BrotherEncounter; using On.EntityStates.Toolbot; using On.RoR2; using On.RoR2.CharacterAI; using On.RoR2.Projectile; using On.RoR2.UI.LogBook; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using Rewired.ComponentControls.Effects; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Artifacts; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2.UI.LogBook; using ShaderSwapper; using Starstorm2Unofficial; using Starstorm2Unofficial.Components; using Starstorm2Unofficial.Components.Projectiles; using Starstorm2Unofficial.Cores; using Starstorm2Unofficial.Cores.Equipment; using Starstorm2Unofficial.Cores.Items; using Starstorm2Unofficial.Cores.NemesisInvasion; using Starstorm2Unofficial.Cores.NemesisInvasion.Components; using Starstorm2Unofficial.Cores.NemesisInvasion.Components.Body; using Starstorm2Unofficial.Cores.Skins; using Starstorm2Unofficial.Cores.States.Wayfarer; using Starstorm2Unofficial.Cores.Unlockables; using Starstorm2Unofficial.Modules; using Starstorm2Unofficial.Modules.Achievements; using Starstorm2Unofficial.Modules.Orbs; using Starstorm2Unofficial.Modules.Survivors; using Starstorm2Unofficial.SharedHooks; using Starstorm2Unofficial.Survivors.Chirr; using Starstorm2Unofficial.Survivors.Chirr.Components; using Starstorm2Unofficial.Survivors.Cyborg; using Starstorm2Unofficial.Survivors.Cyborg.Components; using Starstorm2Unofficial.Survivors.Cyborg.Components.Crosshair; using Starstorm2Unofficial.Survivors.Cyborg.Components.OverheatProjectile; using Starstorm2Unofficial.Survivors.Cyborg.Components.ShockCoreProjectile; using Starstorm2Unofficial.Survivors.Cyborg.Components.TeleportProjectile; using Starstorm2Unofficial.Survivors.Executioner; using Starstorm2Unofficial.Survivors.Executioner.Components; using Starstorm2Unofficial.Survivors.Nemmando; using Starstorm2Unofficial.Survivors.Nemmando.Components; using Starstorm2Unofficial.Survivors.Nucleator; using Starstorm2Unofficial.Survivors.Nucleator.Components; using Starstorm2Unofficial.Survivors.Nucleator.Components.Crosshair; using Starstorm2Unofficial.Survivors.Nucleator.Components.Projectile; using Starstorm2Unofficial.Survivors.Pyro; using Starstorm2Unofficial.Survivors.Pyro.Components; using Starstorm2Unofficial.Survivors.Pyro.Components.Crosshair; using Starstorm2Unofficial.Survivors.Pyro.Components.Projectile; using Survariants; using TILER2; using TMPro; using ThinkInvisible.ClassicItems; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: AssemblyTitle("Starstorm 2 Unofficial")] [assembly: OptIn] [assembly: AssemblyConfiguration("")] [assembly: AssemblyDescription("")] [assembly: CompilationRelaxations(8)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Guid("00c13a13-ed8f-4769-bcb1-029e4edb505a")] [assembly: ComVisible(false)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyProduct("Starstorm 2 Unofficial")] [assembly: AssemblyCompany("")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCopyright("Copyright © 2020")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] [Microsoft.CodeAnalysis.Embedded] [CompilerGenerated] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] [Microsoft.CodeAnalysis.Embedded] [CompilerGenerated] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [CompilerGenerated] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public static class ComponentHelpers { public static bool HasComponent<T>(this GameObject g) where T : Component { return (Object)(object)g.GetComponent(typeof(T)) != (Object)null; } public static bool HasComponent<T>(this MonoBehaviour m) where T : Component { return (Object)(object)((Component)m).GetComponent(typeof(T)) != (Object)null; } public static bool HasComponent<T>(this Transform t) where T : Component { return (Object)(object)((Component)t).GetComponent(typeof(T)) != (Object)null; } public static int ComponentCount<T>(this GameObject g) where T : Component { return g.GetComponents(typeof(T)).Length; } public static int ComponentCount<T>(this MonoBehaviour m) where T : Component { return ((Component)m).GetComponents(typeof(T)).Length; } public static int ComponentCount<T>(this Transform t) where T : Component { return ((Component)t).GetComponents(typeof(T)).Length; } public static T GetComponent<T>(this GameObject g, int index) where T : Component { Component obj = g.GetComponents(typeof(T))[index]; return (T)(object)((obj is T) ? obj : null); } public static T GetComponent<T>(this MonoBehaviour m, int index) where T : Component { Component obj = ((Component)m).gameObject.GetComponents(typeof(T))[index]; return (T)(object)((obj is T) ? obj : null); } public static T GetComponent<T>(this Transform t, int index) where T : Component { Component obj = ((Component)t).GetComponents(typeof(T))[index]; return (T)(object)((obj is T) ? obj : null); } public static T AddComponent<T>(this MonoBehaviour m) where T : Component { Component obj = ((Component)m).gameObject.AddComponent(typeof(T)); return (T)(object)((obj is T) ? obj : null); } public static T AddComponent<T>(this Transform t) where T : Component { Component obj = ((Component)t).gameObject.AddComponent(typeof(T)); return (T)(object)((obj is T) ? obj : null); } public static T AddOrGetComponent<T>(this GameObject g) where T : Component { Component obj = (g.HasComponent<T>() ? g.GetComponent(typeof(T)) : g.AddComponent(typeof(T))); return (T)(object)((obj is T) ? obj : null); } public static T AddOrGetComponent<T>(this MonoBehaviour m) where T : Component { Component obj = (m.HasComponent<T>() ? ((Component)m).GetComponent(typeof(T)) : ((Component)m).gameObject.AddComponent(typeof(T))); return (T)(object)((obj is T) ? obj : null); } public static T AddOrGetComponent<T>(this Transform t) where T : Component { Component obj = (t.HasComponent<T>() ? ((Component)t).GetComponent(typeof(T)) : ((Component)t).gameObject.AddComponent(typeof(T))); return (T)(object)((obj is T) ? obj : null); } } public class LogCore { public static ManualLogSource logger; public LogCore(ManualLogSource logger_) { logger = logger_; } public static void LogDebug(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { logger.LogDebug((object)logString(data, i, member)); } public static void LogError(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { logger.LogError((object)logString(data, i, member)); } public static void LogFatal(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { logger.LogFatal((object)logString(data, i, member)); } public static void LogInfo(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { logger.LogInfo((object)logString(data, i, member)); } public static void LogMessage(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { logger.LogMessage((object)logString(data, i, member)); } public static void LogWarning(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { logger.LogWarning((object)logString(data, i, member)); } private static string logString(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { return $"{data} [Line: {i} | Method {member}]"; } } public static class Utils { public static void RegisterSkillDef(SkillDef skillDef, params Type[] skillTypes) { for (int i = 0; i < skillTypes.Length; i++) { States.AddState(skillTypes[i]); } Skills.skillDefs.Add(skillDef); } public static Variant RegisterSkillVariant(SkillDef skillDef, UnlockableDef unlockableDef = null) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) Variant result = default(Variant); result.skillDef = skillDef; result.unlockableDef = unlockableDef; ((Variant)(ref result)).viewableNode = new Node(skillDef.skillNameToken, false, (Node)null); return result; } public static GenericSkill RegisterSkillsToFamily(GameObject characterBodyObject, params Variant[] skillVariants) { return RegisterSkillsToFamily(characterBodyObject, "", skillVariants); } public static GenericSkill RegisterSkillsToFamily(GameObject characterBodyObject, string skillname, params Variant[] skillVariants) { GenericSkill val = characterBodyObject.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); Skills.skillFamilies.Add(val2); Reflection.SetFieldValue<SkillFamily>((object)val, "_skillFamily", val2); Reflection.SetFieldValue<string>((object)val, "skillName", skillname); val2.variants = skillVariants; return val; } public static void RegisterAdditionalSkills(GenericSkill genericSkill, params Variant[] skillVariants) { SkillFamily skillFamily = genericSkill.skillFamily; skillFamily.variants = skillFamily.variants.Concat(skillVariants).ToArray(); } public static RendererInfo[] SetupRendererInfos(GameObject obj) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) MeshRenderer[] componentsInChildren = obj.GetComponentsInChildren<MeshRenderer>(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[componentsInChildren.Length]; for (int i = 0; i < componentsInChildren.Length; i++) { array[i] = new RendererInfo { defaultMaterial = ((Renderer)componentsInChildren[i]).material, renderer = (Renderer)(object)componentsInChildren[i], defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }; } return array; } internal static GameObject LoadCrosshair(string crosshairName) { return LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/" + crosshairName + "Crosshair"); } public static IEnumerator BroadcastChat(string token) { yield return (object)new WaitForSeconds(1f); Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = token }); } internal static string ScepterDescription(string desc) { return "\n<color=#d299ff>SCEPTER: " + desc + "</color>"; } } public abstract class SS2Equipment { public static string prefabPath = "@Starstorm2:Assets/AssetBundle/Items/"; public EquipmentDef equipDef; public static GameObject displayPrefab; public abstract string NameInternal { get; } public virtual float Cooldown { get; } = 60f; public virtual bool CanDrop { get; } = true; public virtual bool EnigmaCompatible { get; } = true; public virtual bool IsBoss { get; } = false; public virtual bool IsLunar { get; } = false; public virtual BuffDef PassiveBuffDef { get; } = null; public abstract string PickupIconPath { get; } public abstract string PickupModelPath { get; } public virtual EquipmentDef Init() { EquipmentDef result = RegisterEquipment(); RegisterHooks(); return result; } protected EquipmentDef RegisterEquipment() { //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Expected O, but got Unknown string text = NameInternal.ToUpper(CultureInfo.InvariantCulture); EquipmentDef val = ScriptableObject.CreateInstance<EquipmentDef>(); ((Object)val).name = NameInternal; val.nameToken = "EQUIPMENT_" + text + "_NAME"; val.pickupToken = "EQUIPMENT_" + text + "_PICKUP"; val.descriptionToken = "EQUIPMENT_" + text + "_DESC"; val.loreToken = "EQUIPMENT_" + text + "_LORE"; val.cooldown = Cooldown; val.canDrop = CanDrop; val.enigmaCompatible = EnigmaCompatible; val.isBoss = IsBoss; val.isLunar = IsLunar; val.appearsInSinglePlayer = true; val.appearsInMultiPlayer = true; val.passiveBuffDef = PassiveBuffDef; val.pickupIconSprite = ((PickupIconPath != "") ? Assets.mainAssetBundle.LoadAsset<Sprite>(PickupIconPath) : null); val.pickupModelPrefab = ((PickupModelPath != "") ? Assets.mainAssetBundle.LoadAsset<GameObject>(PickupModelPath) : null); if (PickupModelPath != "") { GameObject pickupModelPrefab = val.pickupModelPrefab; if (Object.op_Implicit((Object)(object)pickupModelPrefab)) { ((Renderer)pickupModelPrefab.GetComponentInChildren<MeshRenderer>()).material.shader = Assets.hotpoo; } } ItemDisplayRuleDict val2 = CreateDisplayRules(); EquipmentSlot.PerformEquipmentAction += new hook_PerformEquipmentAction(EquipmentSlot_PerformEquipmentAction); equipDef = val; Items.equipmentDefs.Add(equipDef); return val; } public abstract void RegisterHooks(); public virtual ItemDisplayRuleDict CreateDisplayRules() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown return new ItemDisplayRuleDict((ItemDisplayRule[])(object)new ItemDisplayRule[0]); } public static RendererInfo[] SetupRendererInfos(GameObject obj) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) MeshRenderer[] componentsInChildren = obj.GetComponentsInChildren<MeshRenderer>(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[componentsInChildren.Length]; for (int i = 0; i < componentsInChildren.Length; i++) { array[i] = new RendererInfo { defaultMaterial = ((Renderer)componentsInChildren[i]).material, renderer = (Renderer)(object)componentsInChildren[i], defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }; } return array; } private bool EquipmentSlot_PerformEquipmentAction(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef) { if ((Object)(object)equipmentDef == (Object)(object)equipDef) { return ActivateEquipment(self); } return orig.Invoke(self, equipmentDef); } protected abstract bool ActivateEquipment(EquipmentSlot equip); } internal abstract class SS2Equipment<T> : SS2Equipment where T : SS2Equipment<T> { public static T instance { get; private set; } public SS2Equipment() { instance = this as T; } } public abstract class SS2Item { public ItemDef itemDef; public static GameObject displayPrefab; public abstract string NameInternal { get; } public virtual bool CanRemove { get; } = true; public abstract ItemTier Tier { get; } public abstract ItemTag[] Tags { get; } public abstract string PickupIconPath { get; } public abstract string PickupModelPath { get; } public virtual bool DropInMultiBlacklist { get; } = false; public virtual void Init() { RegisterItem(); RegisterHooks(); } protected virtual void RegisterItem() { //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) string text = NameInternal.ToUpper(CultureInfo.InvariantCulture); itemDef = ScriptableObject.CreateInstance<ItemDef>(); ((Object)itemDef).name = NameInternal; itemDef.nameToken = "ITEM_" + text + "_NAME"; itemDef.pickupToken = "ITEM_" + text + "_PICKUP"; itemDef.descriptionToken = "ITEM_" + text + "_DESC"; itemDef.loreToken = "ITEM_" + text + "_LORE"; itemDef.canRemove = CanRemove; itemDef.pickupIconSprite = ((PickupIconPath != "") ? Assets.mainAssetBundle.LoadAsset<Sprite>(PickupIconPath) : null); itemDef.pickupModelPrefab = ((PickupModelPath != "") ? Assets.mainAssetBundle.LoadAsset<GameObject>(PickupModelPath) : null); itemDef.tags = Tags; itemDef.tier = Tier; itemDef.deprecatedTier = Tier; Items.itemDefs.Add(itemDef); if (!(PickupModelPath != "")) { return; } GameObject pickupModelPrefab = itemDef.pickupModelPrefab; if (Object.op_Implicit((Object)(object)pickupModelPrefab)) { ModelPanelParameters val = pickupModelPrefab.AddComponent<ModelPanelParameters>(); val.focusPointTransform = pickupModelPrefab.transform; val.cameraPositionTransform = ((Component)val).transform; ItemDisplay val2 = pickupModelPrefab.AddComponent<ItemDisplay>(); MeshRenderer[] componentsInChildren = ((Component)val2).GetComponentsInChildren<MeshRenderer>(); List<RendererInfo> list = new List<RendererInfo>(); MeshRenderer[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { Renderer val3 = (Renderer)(object)array[i]; RendererInfo item = default(RendererInfo); item.renderer = val3; item.defaultMaterial = val3.material; item.defaultShadowCastingMode = val3.shadowCastingMode; item.ignoreOverlays = false; item.hideOnDeath = false; list.Add(item); } val2.rendererInfos = list.ToArray(); SetupMaterials(pickupModelPrefab); } itemDef.pickupModelPrefab = pickupModelPrefab; } protected virtual void SetupMaterials(GameObject modelPrefab) { Assets.ConvertAllRenderersToHopooShader(modelPrefab); } public abstract void RegisterHooks(); public virtual ItemDisplayRuleDict CreateDisplayRules() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown return new ItemDisplayRuleDict((ItemDisplayRule[])(object)new ItemDisplayRule[0]); } public int GetCount(CharacterBody body) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return 0; } return body.inventory.GetItemCount(itemDef); } } internal abstract class SS2Item<T> : SS2Item where T : SS2Item<T> { public static T instance { get; private set; } public SS2Item() { instance = this as T; } } public class BodyInfo { public string bodyName = ""; public string bodyNameToken = ""; public string subtitleNameToken = ""; public Texture characterPortrait = null; public Color32 bodyColor = Color32.op_Implicit(Color.gray); public GameObject crosshair = null; public GameObject podPrefab = null; public float maxHealth = 100f; public float healthGrowth = 2f; public float healthRegen = 0f; public float shield = 0f; public float shieldGrowth = 0f; public float moveSpeed = 7f; public float moveSpeedGrowth = 0f; public float acceleration = 80f; public float jumpPower = 15f; public float jumpPowerGrowth = 0f; public float damage = 12f; public float attackSpeed = 1f; public float attackSpeedGrowth = 0f; public float armor = 0f; public float armorGrowth = 0f; public float crit = 1f; public float critGrowth = 0f; public int jumpCount = 1; } public class CustomRendererInfo { public string childName; public Material material; public bool ignoreOverlays; } internal class StarstormBodyInfo { internal string bodyName = ""; internal string bodyNameToken = ""; internal string subtitleNameToken = ""; internal string bodyNameToClone = "Commando"; internal Texture characterPortrait = null; internal GameObject crosshair = null; internal GameObject podPrefab = null; internal float maxHealth = 100f; internal float healthGrowth = 2f; internal float healthRegen = 0f; internal float shield = 0f; internal float shieldGrowth = 0f; internal float moveSpeed = 7f; internal float moveSpeedGrowth = 0f; internal float acceleration = 80f; internal float jumpPower = 15f; internal float jumpPowerGrowth = 0f; internal float damage = 12f; internal float attackSpeed = 1f; internal float attackSpeedGrowth = 0f; internal float armor = 0f; internal float armorGrowth = 0f; internal float crit = 1f; internal float critGrowth = 0f; internal int jumpCount = 1; internal Color bodyColor = Color.grey; internal Vector3 aimOriginPosition = new Vector3(0f, 1.8f, 0f); internal Vector3 modelBasePosition = new Vector3(0f, -0.92f, 0f); internal Vector3 cameraPivotPosition = new Vector3(0f, 1.6f, 0f); internal CharacterCameraParams cameraParams; internal string menuSoundString; } internal class StarstormRendererInfo { internal string childName; internal Material material; internal bool ignoreOverlays; } internal class SkillDefInfo { public string skillName; public string skillNameToken; public string skillDescriptionToken; public Sprite skillIcon; public SerializableEntityStateType activationState; public string activationStateMachineName; public int baseMaxStock; public float baseRechargeInterval; public bool beginSkillCooldownOnSkillEnd; public bool canceledFromSprinting; public bool forceSprintDuringState; public bool fullRestockOnAssign; public InterruptPriority interruptPriority; public bool resetCooldownTimerOnUse; public bool isCombatSkill; public bool mustKeyPress; public bool cancelSprintingOnActivation; public int rechargeStock; public int requiredStock; public int stockToConsume; public string[] keywordTokens; } namespace EntityStates.SS2UStates.Pyro { public class FireFlamethrower : BaseState { public static float baseDuration = 0.16f; public static float baseSelfForce = 450f; public static float maxDistance = 24f; public static float heatFractionPerTick = 0.025f; public static float procCoefficient = 0.7f; public static float damageCoefficient = 0.672f; public static GameObject impactEffectPrefab = Resources.Load<GameObject>("prefabs/effects/impacteffects/missileexplosionvfx"); private float duration; private HeatController heatController; private FlamethrowerController flameController; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; heatController = ((EntityState)this).GetComponent<HeatController>(); if (Object.op_Implicit((Object)(object)heatController)) { heatController.AddHeatAuthority(heatFractionPerTick); } flameController = ((EntityState)this).GetComponent<FlamethrowerController>(); if (Object.op_Implicit((Object)(object)flameController)) { flameController.FireFlamethrower(0.2f); } ShootFlame(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void ShootFlame() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //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_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(2f); } Ray aimRay = ((BaseState)this).GetAimRay(); if (!((EntityState)this).isAuthority) { return; } BulletAttack val = new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, damage = damageCoefficient * base.damageStat, force = 0f, muzzleName = "Muzzle", hitEffectPrefab = impactEffectPrefab, isCrit = ((BaseState)this).RollCrit(), radius = 2.4f, falloffModel = (FalloffModel)0, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, procCoefficient = procCoefficient, maxDistance = maxDistance, smartCollision = true, damageType = DamageTypeCombo.op_Implicit((DamageType)((Object.op_Implicit((Object)(object)heatController) && heatController.IsHighHeat() && Object.op_Implicit((Object)(object)flameController) && flameController.CheckBurn()) ? 128 : 0)) }; val.damageType.damageSource = (DamageSource)1; val.Fire(); heatController.AddHeatAuthority(heatFractionPerTick); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { Ray aimRay2 = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay2)).direction; if (direction.y < 0f) { direction.x = 0f; direction.z = 0f; float num = Mathf.Sqrt(base.attackSpeedStat); direction /= num; ((EntityState)this).characterMotor.ApplyForce(direction * (0f - baseSelfForce), true, false); } } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class FlaregunScepter : Flaregun { public static GameObject scepterProjectilePrefab; public static int scepterMaxExplosions = 16; public override GameObject GetProjectilePrefab() { return scepterProjectilePrefab; } public override int SetExplosionCount(float heatPercent) { int num = Mathf.FloorToInt(Mathf.Lerp(0f, (float)scepterMaxExplosions, heatPercent)); return Mathf.Max(1, num); } public override float SetCostPerExplosion() { return 1f / (float)scepterMaxExplosions; } } public class HeatJetpack : BaseState { public static float minDuration = 0.4f; public static float heatConsumptionPerSecond = 1.2f; public static float maxSpeedCoefficient = 4f; public static float minSpeedCoefficient = 4f; public static GameObject trailPrefab = Resources.Load<GameObject>("prefabs/effects/impacteffects/missileexplosionvfx"); public static float trailFrequency = 8f; private float trailStopwatch; private float trailTime; private HeatController heatController; private float lastUpdateTime; public override void OnEnter() { ((BaseState)this).OnEnter(); lastUpdateTime = Time.time; trailStopwatch = 0f; trailTime = 1f / trailFrequency; heatController = ((EntityState)this).GetComponent<HeatController>(); Util.PlaySound("Play_mage_R_start", ((EntityState)this).gameObject); } 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_012e: 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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); float num = Time.time - lastUpdateTime; lastUpdateTime = Time.time; trailStopwatch += num; if (trailStopwatch >= trailTime) { EffectManager.SpawnEffect(trailPrefab, new EffectData { origin = ((EntityState)this).transform.position }, false); trailStopwatch -= trailTime; } bool flag = false; float num2 = base.moveSpeedStat; if (Object.op_Implicit((Object)(object)heatController)) { num2 *= Mathf.Lerp(minSpeedCoefficient, maxSpeedCoefficient, heatController.GetHeatPercent()); int stocks = 1; if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.utility)) { stocks = ((EntityState)this).skillLocator.utility.maxStock; } heatController.ConsumeHeat(heatConsumptionPerSecond * num, stocks); flag = heatController.GetHeatPercent() <= 0f; } if (!((EntityState)this).isAuthority) { return; } Ray aimRay = ((BaseState)this).GetAimRay(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { if (((EntityState)this).characterMotor.isGrounded && Object.op_Implicit((Object)(object)((BaseCharacterController)((EntityState)this).characterMotor).Motor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } ((EntityState)this).characterMotor.velocity = Vector3.zero; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += num * num2 * ((Ray)(ref aimRay)).direction; } bool flag2 = Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((EntityState)this).inputBank.skill3.down; if (flag || (((EntityState)this).fixedAge >= minDuration && !flag2)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound("Play_mage_R_end", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { float num = base.moveSpeedStat; if (Object.op_Implicit((Object)(object)heatController)) { num *= Mathf.Lerp(minSpeedCoefficient, maxSpeedCoefficient, heatController.GetHeatPercent()); } CharacterMotor characterMotor = ((EntityState)this).characterMotor; Ray aimRay = ((BaseState)this).GetAimRay(); characterMotor.velocity = ((Ray)(ref aimRay)).direction * num; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.isSprinting = true; } ((EntityState)this).OnExit(); } 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)3; } } public class Airblast : BaseState { public static string attackSoundString = "Play_treeBot_shift_shoot"; public static NetworkSoundEventDef reflectSound; public static float baseDuration = 0.75f; public static float reflectWindowDuration = 0.2f; public static Vector3 hitboxDimensions = new Vector3(8f, 8f, 16f); public static float force = 2800f; public static float selfForce = 2800f; public static float heatCost = 0.25f; public static GameObject effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Treebot/TreebotShockwaveEffect.prefab").WaitForCompletion(); public static float reflectDamageCoefficient = 10f; private bool reflected; private ChildLocator childLocator; private Ray aimRay; private HeatController heatController; private static float hitboxOffset = 7.5f; public override void OnEnter() { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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) ((BaseState)this).OnEnter(); heatController = ((EntityState)this).GetComponent<HeatController>(); if (Object.op_Implicit((Object)(object)heatController)) { int stocks = 1; if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.secondary)) { stocks = ((EntityState)this).skillLocator.secondary.maxStock; } heatController.ConsumeHeat(heatCost, stocks); } reflected = false; EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, "Muzzle", false); Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); aimRay = ((BaseState)this).GetAimRay(); childLocator = ((Component)((EntityState)this).GetModelTransform()).GetComponent<ChildLocator>(); ((BaseState)this).StartAimMode(aimRay, 2f, false); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { if (((EntityState)this).characterMotor.velocity.y < 0f) { ((EntityState)this).characterMotor.velocity.y = 0f; } ((EntityState)this).characterMotor.ApplyForce(-((Ray)(ref aimRay)).direction * selfForce, true, false); } if (NetworkServer.active) { PushEnemiesServer(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge <= reflectWindowDuration) { DeflectServer(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= baseDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void DeflectServer() { //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_0022: 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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } Ray val = ((BaseState)this).GetAimRay(); int num = 0; Collider[] array = Physics.OverlapBox(((EntityState)this).transform.position + ((Ray)(ref val)).direction * hitboxOffset, hitboxDimensions, Quaternion.LookRotation(((Ray)(ref val)).direction, Vector3.up), LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.projectile)).mask)); for (int i = 0; i < array.Length; i++) { if (!Object.op_Implicit((Object)(object)array[i]) || !Object.op_Implicit((Object)(object)((Component)array[i]).gameObject)) { continue; } ProjectileController componentInParent = ((Component)array[i]).GetComponentInParent<ProjectileController>(); if (!Object.op_Implicit((Object)(object)componentInParent) || componentInParent.cannotBeDeleted || !((Object)(object)componentInParent.owner != (Object)(object)((EntityState)this).gameObject) || (Object.op_Implicit((Object)(object)componentInParent.teamFilter) && componentInParent.teamFilter.teamIndex == ((BaseState)this).GetTeam())) { continue; } bool flag = false; ProjectileSimple component = ((Component)componentInParent).gameObject.GetComponent<ProjectileSimple>(); ProjectileCharacterController component2 = ((Component)componentInParent).gameObject.GetComponent<ProjectileCharacterController>(); if ((!Object.op_Implicit((Object)(object)component) || (Object.op_Implicit((Object)(object)component) && component.desiredForwardSpeed == 0f)) && !Object.op_Implicit((Object)(object)component2)) { flag = true; } if (flag) { continue; } Vector3 val2 = ((Ray)(ref val)).origin + 90f * ((Ray)(ref val)).direction - ((Component)componentInParent).gameObject.transform.position; componentInParent.owner = ((EntityState)this).gameObject; num++; FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = ((Component)componentInParent).gameObject; val3.position = ((Component)componentInParent).gameObject.transform.position; val3.rotation = ((EntityState)this).transform.rotation * Quaternion.FromToRotation(new Vector3(0f, 0f, 1f), val2); val3.owner = ((EntityState)this).gameObject; val3.damage = base.damageStat * reflectDamageCoefficient; val3.force = 2000f; val3.crit = ((BaseState)this).RollCrit(); val3.damageColorIndex = (DamageColorIndex)0; val3.target = null; ((FireProjectileInfo)(ref val3)).speedOverride = 120f; val3.useSpeedOverride = true; ((FireProjectileInfo)(ref val3)).fuseOverride = -1f; val3.useFuseOverride = false; FireProjectileInfo val4 = val3; ProjectileManager.instance.FireProjectile(val4); EntityState.Destroy((Object)(object)((Component)componentInParent).gameObject); if (!reflected) { reflected = true; if (Object.op_Implicit((Object)(object)reflectSound)) { EffectManager.SimpleSoundEffect(reflectSound.index, ((EntityState)this).transform.position, true); } } } } private void PushEnemiesServer() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: 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_017b: 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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_01ca: 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_01dd: Expected O, but got Unknown //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } List<HealthComponent> list = new List<HealthComponent>(); Collider[] array = Physics.OverlapBox(((EntityState)this).transform.position + ((Ray)(ref aimRay)).direction * hitboxOffset, hitboxDimensions, Quaternion.LookRotation(((Ray)(ref aimRay)).direction, Vector3.up), LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)); for (int i = 0; i < array.Length; i++) { HurtBox component = ((Component)array[i]).GetComponent<HurtBox>(); if (!Object.op_Implicit((Object)(object)component)) { continue; } HealthComponent healthComponent = component.healthComponent; ProjectileController componentInParent = ((Component)array[i]).GetComponentInParent<ProjectileController>(); if (!Object.op_Implicit((Object)(object)healthComponent) || Object.op_Implicit((Object)(object)componentInParent) || list.Contains(healthComponent)) { continue; } list.Add(healthComponent); TeamComponent component2 = ((Component)healthComponent).GetComponent<TeamComponent>(); if (component2.teamIndex == ((EntityState)this).teamComponent.teamIndex) { continue; } CharacterBody body = healthComponent.body; if (Object.op_Implicit((Object)(object)body)) { Vector3 val = force * ((Ray)(ref aimRay)).direction; if (val.y < 1200f && !body.isFlying) { val.y = 1200f; } DamageInfo val2 = new DamageInfo { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, damage = 0f, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)2115), crit = false, dotIndex = (DotIndex)(-1), force = val, position = ((EntityState)this).transform.position, procChainMask = default(ProcChainMask), procCoefficient = 0f }; DamageAPI.AddModdedDamageType(val2, DamageTypeCore.ModdedDamageTypes.ScaleForceToMass); DamageAPI.AddModdedDamageType(val2, DamageTypeCore.ModdedDamageTypes.ResetVictimForce); healthComponent.TakeDamage(val2); } } } 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; } } public class Flaregun : BaseState { public static GameObject muzzleflashEffectPrefab = Resources.Load<GameObject>("prefabs/effects/impacteffects/missileexplosionvfx"); public static GameObject projectilePrefab; public static float damageCoefficient = 4f; public static float baseDuration = 0.5f; public static int maxExplosions = 8; public int explosionCount; private float duration; private float costPerExplosion; public override void OnEnter() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); Util.PlaySound("Play_bandit_M2_shot", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, "Muzzle", false); costPerExplosion = SetCostPerExplosion(); explosionCount = 1; HeatController component = ((EntityState)this).GetComponent<HeatController>(); if (Object.op_Implicit((Object)(object)component)) { float heatPercent = component.GetHeatPercent(); explosionCount = SetExplosionCount(heatPercent); int stocks = 1; if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.special)) { stocks = ((EntityState)this).skillLocator.special.maxStock; } component.ConsumeHeat((float)explosionCount * costPerExplosion, stocks); } if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectile(GetProjectilePrefab(), ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, (float)explosionCount, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public virtual GameObject GetProjectilePrefab() { return projectilePrefab; } public virtual int SetExplosionCount(float heatPercent) { int num = Mathf.FloorToInt(Mathf.Lerp(0f, (float)maxExplosions, heatPercent)); return Mathf.Max(1, num); } public virtual float SetCostPerExplosion() { return 1f / (float)maxExplosions; } 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; } } public class SuppressiveFire : BaseState { public static float baseSelfForce = 450f; public static GameObject muzzleflashEffectPrefab = Resources.Load<GameObject>("prefabs/effects/impacteffects/missileexplosionvfx"); public static GameObject projectilePrefab; public static float damageCoefficient = 1.2f; public static float baseDuration = 0.1f; public static float heatCost = 0.08f; private float duration; private HeatController heatController; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; heatController = ((EntityState)this).GetComponent<HeatController>(); FireProjectile(); } public void FireProjectile() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_011f: 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_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); Util.PlaySound("Play_mage_m1_shoot", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, "Muzzle", false); if (Object.op_Implicit((Object)(object)heatController)) { int stocks = 1; if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.secondary)) { stocks = ((EntityState)this).skillLocator.secondary.maxStock; } heatController.ConsumeHeat(heatCost, stocks); } if (!((EntityState)this).isAuthority) { return; } ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { Ray aimRay2 = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay2)).direction; if (direction.y < 0f) { direction.x = 0f; direction.z = 0f; ((EntityState)this).characterMotor.ApplyForce(direction * (0f - baseSelfForce), true, false); } } } 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 EntityStates.SS2UStates.Nucleator { public abstract class BaseChargeState : BaseState { public static float overchargeFraction = 2f / 3f; public static string overchargeSoundString = "SS2UNucleatorAlarm"; public float baseDuration = 1.5f; public float overchargeHealthFraction = 0.06f; public float overchargeDamageFrequency = 10f; public float overchargeHealingFraction = 0.015f; private bool playedOverchargeSound = false; private float overchargeDamageDuration; private float overchargeDamageStopwatch; protected float duration; private NucleatorChargeComponent chargeComponent; private NucleatorNetworkComponent networkComponent; private ShakeEmitter shakeEmitter; public float chargeFraction; private float lastUpdateTime; public override void OnEnter() { ((BaseState)this).OnEnter(); lastUpdateTime = Time.time; chargeFraction = 0f; duration = baseDuration; overchargeDamageStopwatch = 0f; overchargeDamageDuration = 1f / (overchargeDamageFrequency * base.attackSpeedStat); networkComponent = ((EntityState)this).GetComponent<NucleatorNetworkComponent>(); chargeComponent = ((EntityState)this).GetComponent<NucleatorChargeComponent>(); if (Object.op_Implicit((Object)(object)chargeComponent)) { chargeComponent.StartCharge(); } } public override void FixedUpdate() { //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); float num = Time.time - lastUpdateTime; lastUpdateTime = Time.time; chargeFraction = Mathf.Min(1f, ((EntityState)this).fixedAge / duration); if (Object.op_Implicit((Object)(object)chargeComponent)) { chargeComponent.SetCharge(chargeFraction, overchargeFraction); } bool flag = chargeFraction > overchargeFraction; bool flag2 = Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && !((EntityState)this).characterBody.isPlayerControlled; bool flag3 = Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && ((EntityState)this).characterBody.HasBuff(BuffCore.nucleatorSpecialBuff); bool flag4 = flag2 && flag && !flag3; if (flag4) { chargeFraction = overchargeFraction; flag = false; } if (flag) { if (!playedOverchargeSound) { OnOverchargeStart(); playedOverchargeSound = true; Util.PlaySound(overchargeSoundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { HurtSelfAuthority(); shakeEmitter = ShakeEmitter.CreateSimpleShakeEmitter(((EntityState)this).transform.position, new Wave { amplitude = 0.5f, cycleOffset = 0f, frequency = 10f }, 0.4f, 20f, false); ((Component)shakeEmitter).transform.parent = ((EntityState)this).transform; } } else if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).healthComponent)) { overchargeDamageStopwatch += num; if (overchargeDamageStopwatch >= overchargeDamageDuration) { overchargeDamageStopwatch -= overchargeDamageDuration; HurtSelfAuthority(); } } } if (((EntityState)this).isAuthority && (chargeFraction >= 1f || !GetInputPressed() || flag4)) { if (chargeFraction > overchargeFraction) { SetNextStateOvercharge(); } else { SetNextState(); } } } protected virtual void OnOverchargeStart() { } public override void OnExit() { if (Object.op_Implicit((Object)(object)shakeEmitter)) { EntityState.Destroy((Object)(object)shakeEmitter); } if (Object.op_Implicit((Object)(object)chargeComponent)) { chargeComponent.Reset(); } ((EntityState)this).OnExit(); } private void HurtSelfAuthority() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).isAuthority) { return; } if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || !((EntityState)this).characterBody.HasBuff(BuffCore.nucleatorSpecialBuff)) { DamageInfo val = new DamageInfo(); val.damage = ((EntityState)this).healthComponent.combinedHealth * overchargeHealthFraction; val.position = ((EntityState)this).characterBody.corePosition; val.force = Vector3.zero; val.damageColorIndex = (DamageColorIndex)0; val.crit = false; val.attacker = null; val.inflictor = null; val.damageType = DamageTypeCombo.op_Implicit((DamageType)1); val.procCoefficient = 0f; val.procChainMask = default(ProcChainMask); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.mainHurtBox)) { NetworkingHelpers.DealDamage(val, ((EntityState)this).characterBody.mainHurtBox, true, false, false); } } else if (Object.op_Implicit((Object)(object)((EntityState)this).healthComponent)) { if (NetworkServer.active) { ((EntityState)this).healthComponent.HealFraction(overchargeHealingFraction, default(ProcChainMask)); } else if (Object.op_Implicit((Object)(object)networkComponent)) { networkComponent.HealFractionAuthority(overchargeHealingFraction); } } } protected virtual bool GetInputPressed() { return false; } protected abstract void SetNextState(); protected abstract void SetNextStateOvercharge(); } public class NucleatorMain : GenericCharacterMain { public override void Update() { ((GenericCharacterMain)this).Update(); if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded && Config.GetKeyPressed(Config.RestKeybind)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new RestEmote(), (InterruptPriority)0); } } } } namespace EntityStates.SS2UStates.Nucleator.Utility { public class ChargeLeap : BaseChargeState { public static ConfigEntry<bool> stationaryLeap; private bool isStationary = false; public override void OnEnter() { base.OnEnter(); Util.PlaySound("Play_loader_shift_activate", ((EntityState)this).gameObject); if (stationaryLeap.Value) { isStationary = true; ((EntityState)this).PlayAnimation("FullBody, Override", "UtilityCharge", "Utility.playbackRate", duration, 0f); } else { ((EntityState)this).PlayAnimation("Gesture, Override", "UtilityChargeWalk", "Utility.playbackRate", duration, 0f); } } public override void FixedUpdate() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); ((BaseState)this).StartAimMode(((BaseState)this).GetAimRay(), 2f, false); if (((EntityState)this).isAuthority && isStationary) { ((EntityState)this).characterMotor.moveDirection = Vector3.zero; ((EntityState)this).characterMotor.jumpCount = ((EntityState)this).characterBody.maxJumpCount; } } public override void OnExit() { Util.PlaySound("Play_loader_shift_release", ((EntityState)this).gameObject); if (isStationary) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).characterMotor.jumpCount = 0; } else { ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); } base.OnExit(); } protected override void SetNextState() { EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Body"); if (Object.op_Implicit((Object)(object)val)) { val.SetNextState((EntityState)(object)new FireLeap { charge = chargeFraction, animString = (isStationary ? "UtilityRelease" : "UtilityReleaseWalk") }); } ((EntityState)this).outer.SetNextStateToMain(); } protected override void SetNextStateOvercharge() { EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Body"); if (Object.op_Implicit((Object)(object)val)) { val.SetNextState((EntityState)(object)new FireLeapOvercharge { charge = chargeFraction }); } ((EntityState)this).outer.SetNextStateToMain(); } protected override bool GetInputPressed() { if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && !((EntityState)this).characterBody.isPlayerControlled) { return true; } return Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((EntityState)this).inputBank.skill3.down; } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class FireLeap : BaseCharacterMain { public static ConfigEntry<bool> leapAirControl; public static float minimumDuration = 0.3f; public static float upwardVelocity = 7f; public static float forwardVelocity = 3f; public static float aimVelocity = 3f; public static float airControl = 0.15f; public static float minimumY = 0.05f; public static float maxExitYVelocity = 24f; public static GameObject blastEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Loader/LoaderGroundSlam.prefab").WaitForCompletion(); public static float blastForce = 3000f; public static string soundLoopStartEvent = "Play_acrid_shift_fly_loop"; public static string soundLoopStopEvent = "Stop_acrid_shift_fly_loop"; public static string leapSoundString = "SS2UNucleatorSkill3"; public string animString = "UtilityRelease"; public float charge; private float previousAirControl; protected bool isCrit; private bool detonateNextFrame; public override void OnEnter() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: 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_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0219: 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_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Expected O, but got Unknown //IL_017d: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).OnEnter(); Util.PlaySound(soundLoopStartEvent, ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Body", animString); previousAirControl = ((EntityState)this).characterMotor.airControl; detonateNextFrame = false; isCrit = ((BaseState)this).RollCrit(); ((BaseState)this).damageStat = ((BaseState)this).damageStat * ((BaseState)this).attackSpeedStat; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).characterBody.RecalculateStats(); ((BaseState)this).moveSpeedStat = ((EntityState)this).characterBody.moveSpeed; if (!leapAirControl.Value) { ((EntityState)this).characterMotor.airControl = 0.15f; } else { float num = ((EntityState)this).characterBody.moveSpeed / (((EntityState)this).characterBody.baseMoveSpeed * ((!((EntityState)this).characterBody.isSprinting) ? 1f : ((EntityState)this).characterBody.sprintingSpeedMultiplier)); num = Mathf.Min(num, 3f); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.airControl *= num; } } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.ArmorBoost); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; if (((EntityState)this).characterMotor.isGrounded) { direction.y = Mathf.Max(direction.y, minimumY); } Vector3 val = ((Vector3)(ref direction)).normalized * aimVelocity * ((BaseState)this).moveSpeedStat * CalculateChargeMultiplier(); Vector3 val2 = Vector3.up * upwardVelocity; Vector3 val3 = new Vector3(direction.x, 0f, direction.z); Vector3 val4 = ((Vector3)(ref val3)).normalized * forwardVelocity; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = val + val2 + val4; ((EntityState)this).characterMotor.onMovementHit += new MovementHitDelegate(OnMovementHit); } } public override void FixedUpdate() { //IL_0048: 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_0075: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).FixedUpdate(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { bool flag = ((EntityState)this).fixedAge >= minimumDuration; if (flag && SneedUtils.IsEnemyInSphere(2.5f, ((EntityState)this).transform.position, ((BaseState)this).GetTeam())) { detonateNextFrame = true; } ((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector; bool flag2 = ((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.IsStableOnGround && !((BaseCharacterController)((EntityState)this).characterMotor).Motor.LastGroundingStatus.IsStableOnGround; if (flag && (detonateNextFrame || flag2)) { DetonateAuthority(); ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_0045: Expected O, but got Unknown Util.PlaySound(soundLoopStopEvent, ((EntityState)this).gameObject); ((EntityState)this).characterMotor.airControl = previousAirControl; if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.onMovementHit -= new MovementHitDelegate(OnMovementHit); } CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.ArmorBoost); } ((BaseCharacterMain)this).OnExit(); if (Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator)) { ((EntityState)this).PlayAnimation("FullBody, Override", "UtilityLanding", "Utility.playbackRate", 0.5f, 0f); } } public override void UpdateAnimationParameters() { } 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; } protected virtual float CalculateChargeMultiplier() { return Mathf.Lerp(1f, 1.5f, charge / BaseChargeState.overchargeFraction); } private void OnMovementHit(ref MovementHitInfo movementHitInfo) { detonateNextFrame = true; } protected virtual float CalcDamageCoefficient() { return Mathf.Lerp(4f, 8f, charge / BaseChargeState.overchargeFraction); } protected virtual float GetBlastRadius() { return 12f; } protected virtual void DetonateAuthority() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_00d7: 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_00e8: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_011a: 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_015e: 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_0145: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).isAuthority) { return; } float blastRadius = GetBlastRadius(); EffectManager.SpawnEffect(blastEffectPrefab, new EffectData { rotation = ((EntityState)this).transform.rotation, origin = ((EntityState)this).transform.position, scale = blastRadius }, true); BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)2, baseDamage = ((BaseState)this).damageStat * CalcDamageCoefficient(), baseForce = blastForce, bonusForce = Vector3.zero, canRejectForce = true, crit = isCrit, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)32), falloffModel = (FalloffModel)0, inflictor = ((EntityState)this).gameObject, losType = (LoSType)0, position = ((EntityState)this).transform.position, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = blastRadius, teamIndex = ((BaseState)this).GetTeam() }; val.damageType.damageSource = (DamageSource)4; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && ((EntityState)this).characterBody.HasBuff(BuffCore.nucleatorSpecialBuff)) { DamageAPI.AddModdedDamageType(val, DamageTypeCore.ModdedDamageTypes.NucleatorRadiationOnHit); } DamageAPI.AddModdedDamageType(val, DamageTypeCore.ModdedDamageTypes.AntiFlyingForce); DamageAPI.AddModdedDamageType(val, DamageTypeCore.ModdedDamageTypes.ResetVictimForce); val.Fire(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { if (((EntityState)this).characterMotor.velocity.y < 0f) { ((EntityState)this).characterMotor.velocity.y = 0f; } else if (((EntityState)this).characterMotor.velocity.y > maxExitYVelocity) { ((EntityState)this).characterMotor.velocity.y = maxExitYVelocity; } ((EntityState)this).characterMotor.velocity.x = 0f; ((EntityState)this).characterMotor.velocity.z = 0f; } } } public class FireLeapOvercharge : FireLeap { protected override float CalculateChargeMultiplier() { return Mathf.Lerp(1.5f, 2f, (charge - BaseChargeState.overchargeFraction) / (1f - BaseChargeState.overchargeFraction)); } protected override float CalcDamageCoefficient() { return Mathf.Lerp(8f, 12f, (charge - BaseChargeState.overchargeFraction) / (1f - BaseChargeState.overchargeFraction)); } protected override float GetBlastRadius() { return 20f; } } } namespace EntityStates.SS2UStates.Nucleator.Special { public class BuffSelf : BaseState { public static float baseBuffDuration = 6f; protected float buffDurationRemaining; private float lastUpdateTime; public override void OnEnter() { ((BaseState)this).OnEnter(); lastUpdateTime = Time.time; SetBuffDuration(); if (NetworkServer.active) { SetBuffsServer(); } } public virtual void SetBuffDuration() { buffDurationRemaining = baseBuffDuration; Util.PlaySound("SS2UNucleatorSkill4a", ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = Time.time - lastUpdateTime; lastUpdateTime = Time.time; buffDurationRemaining -= num; if (NetworkServer.active) { SetBuffsServer(); } if (((EntityState)this).isAuthority && buffDurationRemaining <= 0f) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { buffDurationRemaining = 0f; if (NetworkServer.active) { SetBuffsServer(); } ((EntityState)this).OnExit(); } public void SetBuffsServer() { if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || !NetworkServer.active) { return; } int buffCount = ((EntityState)this).characterBody.GetBuffCount(BuffCore.nucleatorSpecialBuff); int num = Mathf.CeilToInt(buffDurationRemaining); if (num < buffCount) { int num2 = buffCount - num; for (int i = 0; i < num2; i++) { ((EntityState)this).characterBody.RemoveBuff(BuffCore.nucleatorSpecialBuff); } } else if (num > buffCount) { int num3 = num - buffCount; for (int j = 0; j < num3; j++) { ((EntityState)this).characterBody.AddBuff(BuffCore.nucleatorSpecialBuff); } } } } public class BuffSelfScepter : BuffSelf { public new static float baseBuffDuration = 12f; public override void SetBuffDuration() { buffDurationRemaining = baseBuffDuration; Util.PlaySound("SS2UNucleatorSkill4c", ((EntityState)this).gameObject); } } } namespace EntityStates.SS2UStates.Nucleator.Secondary { public class ChargeSecondary : BaseChargeState { private uint chargePlayID; public override void OnEnter() { base.OnEnter(); ((EntityState)this).PlayCrossfade("Gesture, Override", "SecondaryCharge", "Secondary.playbackRate", duration, 0.1f); chargePlayID = Util.PlaySound("SS2UNucleatorChargePrimary", ((EntityState)this).gameObject); } public override void FixedUpdate() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); ((BaseState)this).StartAimMode(((BaseState)this).GetAimRay(), 2f, false); } public override void OnExit() { AkSoundEngine.StopPlayingID(chargePlayID); ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); base.OnExit(); } 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; } protected override void SetNextState() { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireSecondary { charge = chargeFraction }); } protected override void SetNextStateOvercharge() { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireSecondaryOvercharge { charge = chargeFraction }); } protected override bool GetInputPressed() { if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && !((EntityState)this).characterBody.isPlayerControlled) { return true; } return Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((EntityState)this).inputBank.skill2.down; } } public class FireSecondary : BaseState { public static float force = 3000f; public static float selfKnockbackForce = 1600f; public static float range = 40f; public static float baseDuration = 0.4f; public static GameObject coneEffectPrefab; public static GameObject hitEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Beetle/BeetleAcidImpact.prefab").WaitForCompletion(); public float charge; private float duration; public override void OnEnter() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0293: 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) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: 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_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0344: 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_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Expected O, but got Unknown //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f6: Expected O, but got Unknown //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_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_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0190: 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_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Expected O, but got Unknown //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Expected O, but got Unknown //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration; base.damageStat *= base.attackSpeedStat; Util.PlaySound("Play_acrid_shift_land", ((EntityState)this).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); if (Object.op_Implicit((Object)(object)coneEffectPrefab)) { Transform val = null; ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { val = modelChildLocator.FindChild("MuzzleCenter"); } if (Object.op_Implicit((Object)(object)val)) { GameObject effectPrefab = GetEffectPrefab(); Quaternion val2 = Quaternion.LookRotation(((Ray)(ref aimRay)).direction) * Quaternion.Euler(90f, 0f, 0f); EffectManager.SpawnEffect(effectPrefab, new EffectData { scale = 5f, rotation = val2, origin = val.position + ((Ray)(ref aimRay)).direction * 3.2f }, false); EffectManager.SpawnEffect(effectPrefab, new EffectData { scale = 5f, rotation = val2 * Quaternion.Euler(0f, 60f, 0f), origin = val.position + ((Ray)(ref aimRay)).direction * 9f }, false); EffectManager.SpawnEffect(effectPrefab, new EffectData { scale = 5f, rotation = val2 * Quaternion.Euler(0f, 120f, 0f), origin = val.position + ((Ray)(ref aimRay)).direction * 15f }, false); EffectManager.SpawnEffect(effectPrefab, new EffectData { scale = 5f, rotation = val2 * Quaternion.Euler(0f, 180f, 0f), origin = val.position + ((Ray)(ref aimRay)).direction * 21f }, false); EffectManager.SpawnEffect(effectPrefab, new EffectData { scale = 5f, rotation = val2 * Quaternion.Euler(0f, 240f, 0f), origin = val.position + ((Ray)(ref aimRay)).direction * 27f }, false); } } if (((EntityState)this).isAuthority) { BulletAttack val3 = new BulletAttack { aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = base.damageStat * GetDamageCoefficient(), damage