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.Security; using System.Security.Permissions; using System.Text; using AncientScepter; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.AI.Walker; using EntityStates.AffixEmpyrean; using EntityStates.AffixStorm; using EntityStates.Bandit2; using EntityStates.Bandit2.Weapon; using EntityStates.Barrel; using EntityStates.Captain.Weapon; using EntityStates.Chirr; using EntityStates.Chirr.Claws; using EntityStates.Chirr.Wings; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using EntityStates.CrystalPickup; using EntityStates.Drone; using EntityStates.Engi.EngiMissilePainter; using EntityStates.Events; using EntityStates.GameplayEvents; using EntityStates.Generic; using EntityStates.GlobalSkills.LunarNeedle; using EntityStates.GolemMonster; using EntityStates.GravekeeperBoss; using EntityStates.Huntress; using EntityStates.ImpBossMonster; using EntityStates.JellyfishMonster; using EntityStates.Knight; using EntityStates.LemurianMonster; using EntityStates.LunarGolem; using EntityStates.LunarTable; using EntityStates.LunarWisp; using EntityStates.Merc; using EntityStates.Mimic; using EntityStates.NemMerc; using EntityStates.Nemmando; using EntityStates.NullifierMonster; using EntityStates.Railgunner.Reload; using EntityStates.ScavBackpack; using EntityStates.Scrapper; using EntityStates.TitanMonster; using EntityStates.Toolbot; using EntityStates.Trader.Bag; using EntityStates.VoidCamp; using EntityStates.VoidSurvivor.CorruptMode; using Grumpy; using HG; using HG.BlendableTypes; using HG.Reflection; using IL.EntityStates; using IL.RoR2; using IL.RoR2.Orbs; using IL.RoR2.UI; using JetBrains.Annotations; using KinematicCharacterController; using MSU; using MSU.Config; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using On.EntityStates; using On.EntityStates.Drone; using On.EntityStates.JellyfishMonster; using On.EntityStates.ScavBackpack; using On.EntityStates.Toolbot; using On.EntityStates.VoidCamp; using On.EntityStates.VoidSurvivor.CorruptMode; using On.RoR2; using On.RoR2.CameraModes; using On.RoR2.CharacterAI; using On.RoR2.Orbs; using On.RoR2.UI; using On.RoR2.UI.MainMenu; using R2API; using R2API.AddressReferencedAssets; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.ScriptableObjects; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RoR2; using RoR2.Achievements; using RoR2.Achievements.Artifacts; using RoR2.Artifacts; using RoR2.Audio; using RoR2.CameraModes; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.Hologram; using RoR2.HudOverlay; using RoR2.Items; using RoR2.Navigation; using RoR2.Networking; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.UI; using RoR2.UI.MainMenu; using SS2; using SS2.Components; using SS2.Equipments; using SS2.Interactables; using SS2.Items; using SS2.Jobs; using SS2.Monsters; using SS2.Orbs; using SS2.Stats; using SS2.Survivors; using SS2.UI; using TMPro; using ThreeEyedGames; using Unity; using Unity.Burst; using Unity.Collections; using Unity.Jobs; using Unity.Mathematics; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.Jobs; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.SceneManagement; using UnityEngine.Serialization; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("Starstorm 2")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Starstorm 2")] [assembly: AssemblyCopyright("")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: OptIn] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] 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; } } } public class ActivateTriggerAfterXSeconds : StateMachineBehaviour { public string triggerParameterName; public float desiredTriggerTime; private float timer; public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { timer = 0f; } public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { timer += Time.deltaTime; if (timer >= desiredTriggerTime) { animator.SetTrigger(triggerParameterName); timer = 0f; } } public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { timer = 0f; } } public class CrosshairPositionNormalize : MonoBehaviour { private RectTransform rectTransform; private void Awake() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) rectTransform = ((Component)this).GetComponent(); ((Transform)rectTransform).localPosition = Vector3.zero; } private void FixedUpdate() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) ((Transform)rectTransform).localPosition = Vector3.zero; } } public class CrosshairScaleNormalize : MonoBehaviour { private RectTransform rectTransform; private void Awake() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) rectTransform = ((Component)this).GetComponent(); ((Transform)rectTransform).localScale = new Vector3(1.2f, 1f, 0f); } private void FixedUpdate() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((Transform)rectTransform).localScale = new Vector3(1.2f, 1f, 0f); } } [RequireComponent(typeof(ProjectileController))] public class PyroTornadoController : NetworkBehaviour { private List processedVictims = new List(); private ProjectileDamage projectileDamage; private ProjectileController projectileController; public Transform rangeIndicator; public GameObject delayBlastPrefab; [Header("Effect Prefabs")] public GameObject impactEffectPrefab; public GameObject indicatorExplosionEffectPrefab; public static float damageCoefficient; public static float force; public static float baseRadius; public static float maxRadiusPerIgnite; public static float minRadiusPerIgnite; public static int maxIgniteHits; public static float diffForMaxGrowthSpeed; public static float maxGrowthSpeed; public static float minGrowthSpeed; public static float decayDuration; public static float decayDurationPerIgnite; public static float searchInterval; public static float delayBlastDamageCoefficient; public static float delayBlastForce; public static float delayBlastRadius; public static float delayBlastVictimRadiusCoefficient; public static float delayBlastProcCoefficient; public static float delayBlastTimer; private float targetRadius; private float currentRadius; private int igniteHits; private AnimateShaderAlpha[] animateShaderAlphas; private SphereSearch sphereSearch; private HurtBox[] hits; private float stopwatch; private float lifetimeStopwatch; private static int kRpcRpcOnIgnitedEnemyHit; public void Start() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) hits = (HurtBox[])(object)new HurtBox[100]; targetRadius = baseRadius; projectileController = ((Component)this).GetComponent(); projectileDamage = ((Component)this).GetComponent(); if (NetworkServer.active) { sphereSearch = new SphereSearch(); } if (!Object.op_Implicit((Object)(object)rangeIndicator)) { return; } animateShaderAlphas = ((Component)rangeIndicator).GetComponentsInChildren(); if (animateShaderAlphas != null) { for (int i = 0; i < animateShaderAlphas.Length; i++) { animateShaderAlphas[i].timeMax = decayDuration; } } rangeIndicator.localScale = Vector3.zero; } private void FixedUpdate() { CalculateRadius(Time.fixedDeltaTime); if (NetworkServer.active) { stopwatch -= Time.fixedDeltaTime; if (stopwatch <= 0f) { stopwatch += searchInterval; SearchForTargets(); } lifetimeStopwatch += Time.fixedDeltaTime; if (lifetimeStopwatch >= decayDuration) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } private void CalculateRadius(float deltaTime) { //IL_0052: 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) float num = targetRadius - currentRadius; float num2 = num / diffForMaxGrowthSpeed; float num3 = Mathf.Lerp(minGrowthSpeed, maxGrowthSpeed, num2) * deltaTime; num3 = Mathf.Min(num3, num); currentRadius += num3; if (Object.op_Implicit((Object)(object)rangeIndicator)) { rangeIndicator.localScale = Vector3.one * currentRadius; } } private void SearchForTargets() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_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_006a: Unknown result type (might be due to invalid IL or missing references) sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; sphereSearch.queryTriggerInteraction = (QueryTriggerInteraction)1; sphereSearch.origin = ((Component)this).transform.position; sphereSearch.radius = currentRadius; TeamMask unprotectedTeams = TeamMask.GetUnprotectedTeams(projectileController.teamFilter.teamIndex); hits = sphereSearch.RefreshCandidates().FilterCandidatesByHurtBoxTeam(unprotectedTeams).OrderCandidatesByDistance() .GetHurtBoxes(); for (int i = 0; i < hits.Length; i++) { TryProcessVictim(hits[i]); } } public void TryProcessVictim(HurtBox victim) { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && (Object)(object)victim != (Object)null && (Object)(object)victim.healthComponent != (Object)null && !processedVictims.Contains(victim.healthComponent.body)) { CharacterBody body = victim.healthComponent.body; processedVictims.Add(body); PerformDamageServer(victim); if (Object.op_Implicit((Object)(object)impactEffectPrefab)) { EffectManager.SimpleEffect(impactEffectPrefab, ((Component)victim).transform.position, Quaternion.identity, true); } } } private void PerformDamageServer(HurtBox hurtBox) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0164: 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_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_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_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)hurtBox) || !Object.op_Implicit((Object)(object)hurtBox.healthComponent)) { return; } HealthComponent healthComponent = hurtBox.healthComponent; DamageInfo val = new DamageInfo(); val.attacker = projectileController.owner; val.procChainMask = projectileController.procChainMask; val.procCoefficient = projectileController.procCoefficient; val.inflictor = ((Component)this).gameObject; val.damage = projectileDamage.damage * damageCoefficient; val.crit = projectileDamage.crit; Vector3 val2 = ((Component)hurtBox).transform.position - ((Component)this).transform.position; val.force = ((Vector3)(ref val2)).normalized * force; val.damageType = projectileDamage.damageType; val.damageColorIndex = projectileDamage.damageColorIndex; val.position = ((Component)hurtBox).transform.position; val.canRejectForce = true; val.inflictedHurtbox = hurtBox; healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)healthComponent).gameObject); if (!val.rejected) { CharacterBody body = healthComponent.body; if (body.GetBurnCountPyro() > 0) { CallRpcOnIgnitedEnemyHit(((Component)hurtBox).transform.position); Vector3 corePosition = body.corePosition; GameObject obj = Object.Instantiate(delayBlastPrefab, corePosition, Quaternion.identity); DelayBlast component = obj.GetComponent(); component.position = corePosition; component.baseDamage = projectileDamage.damage * delayBlastDamageCoefficient; component.procCoefficient = projectileController.procCoefficient * delayBlastProcCoefficient; component.procChainMask = projectileController.procChainMask; component.baseForce = delayBlastForce; component.radius = delayBlastRadius + body.radius * delayBlastVictimRadiusCoefficient; component.attacker = projectileController.owner; component.inflictor = ((Component)this).gameObject; component.crit = projectileDamage.crit; component.maxTimer = delayBlastTimer; component.damageColorIndex = projectileDamage.damageColorIndex; component.falloffModel = (FalloffModel)1; obj.GetComponent().teamIndex = projectileController.teamFilter.teamIndex; NetworkServer.Spawn(((Component)this).gameObject); } } } [ClientRpc] public void RpcOnIgnitedEnemyHit(Vector3 hitPosition) { //IL_009c: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) float num = (float)igniteHits / (float)maxIgniteHits; float num2 = Mathf.Lerp(maxRadiusPerIgnite, minRadiusPerIgnite, num); targetRadius += num2; igniteHits++; lifetimeStopwatch -= decayDurationPerIgnite; if (animateShaderAlphas != null) { for (int i = 0; i < animateShaderAlphas.Length; i++) { AnimateShaderAlpha obj = animateShaderAlphas[i]; obj.time -= decayDurationPerIgnite; } } if (Object.op_Implicit((Object)(object)rangeIndicator) && Object.op_Implicit((Object)(object)indicatorExplosionEffectPrefab)) { Vector3 val = hitPosition - ((Component)this).transform.position; Object.Instantiate(indicatorExplosionEffectPrefab, rangeIndicator).transform.forward = ((Vector3)(ref val)).normalized; } } static PyroTornadoController() { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown damageCoefficient = 8f; force = 300f; baseRadius = 10f; maxRadiusPerIgnite = 4f; minRadiusPerIgnite = 1f; maxIgniteHits = 4; diffForMaxGrowthSpeed = 9f; maxGrowthSpeed = 64f; minGrowthSpeed = 1f; decayDuration = 1.2f; decayDurationPerIgnite = 0.25f; searchInterval = 0.125f; delayBlastDamageCoefficient = 4f; delayBlastForce = 1000f; delayBlastRadius = 11f; delayBlastVictimRadiusCoefficient = 1f; delayBlastProcCoefficient = 1f; delayBlastTimer = 1f; kRpcRpcOnIgnitedEnemyHit = 1640872933; NetworkBehaviour.RegisterRpcDelegate(typeof(PyroTornadoController), kRpcRpcOnIgnitedEnemyHit, new CmdDelegate(InvokeRpcRpcOnIgnitedEnemyHit)); NetworkCRC.RegisterBehaviour("PyroTornadoController", 0); } private void UNetVersion() { } protected static void InvokeRpcRpcOnIgnitedEnemyHit(NetworkBehaviour obj, NetworkReader reader) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcOnIgnitedEnemyHit called on server."); } else { ((PyroTornadoController)(object)obj).RpcOnIgnitedEnemyHit(reader.ReadVector3()); } } public void CallRpcOnIgnitedEnemyHit(Vector3 hitPosition) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcOnIgnitedEnemyHit called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcOnIgnitedEnemyHit); val.Write(((Component)this).GetComponent().netId); val.Write(hitPosition); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcOnIgnitedEnemyHit"); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } public override void PreStartClient() { } } public class VFXListComponent : MonoBehaviour { public List VFXParticles = new List(); private void Start() { } private void FixedUpdate() { } public void TurnOffVFX() { foreach (GameObject vFXParticle in VFXParticles) { vFXParticle.SetActive(false); } } public void TurnOnVFX() { foreach (GameObject vFXParticle in VFXParticles) { vFXParticle.SetActive(true); } } } public class Stumble : MonoBehaviour { private void Start() { } private void Update() { } } public static class PrideHelper { public static List flagMaterials = new List(); public static List flagColors = new List(); private static readonly int MainTex = Shader.PropertyToID("_MainTex"); private const int flagXStart = 0; private const int flagXEnd = 621; private const int flagYStart = 103; private const int flagYEnd = 502; private const int total = 399; private const int textureHeight = 1024; public static Texture2D baseTex; public static Color[] texPixels; public static void AddFlag(Texture texture, Color[] colors) { flagColors.Add(colors); Material val = Object.Instantiate(SS2Assets.LoadAsset("matWhiteFlag", SS2Bundle.Equipments)); val.SetTexture(MainTex, texture); ((Object)val).name = ((Object)texture).name; flagMaterials.Add(val); } public static void AddFlagFromColors(string flagName, Color[] colors) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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) Texture2D val = new Texture2D(((Texture)baseTex).width, ((Texture)baseTex).height); Color[] array = (Color[])(object)new Color[texPixels.Length]; Array.Copy(texPixels, array, texPixels.Length); for (int i = 0; i < 621; i++) { for (int j = 522; j < 921; j++) { for (int k = 1; k <= colors.Length; k++) { if (j - 522 < 399 / colors.Length * k) { Color val2 = colors[k - 1]; val2.a = texPixels[i + j * 1024].a; array[i + j * 1024] = val2; break; } } } } val.SetPixels(array); val.Apply(); ((Object)val).name = flagName; AddFlag((Texture)(object)val, colors); } public static Material GetFlagMaterial(CharacterMaster master) { if (!Object.op_Implicit((Object)(object)master) || !WhiteFlag.usePrideEdits) { return flagMaterials[0]; } PrideFlagTypeStorer component = ((Component)master).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null)) { return flagMaterials[component.flagType]; } return flagMaterials[0]; } public static Color[] GetFlagColors(int index) { if (WhiteFlag.usePrideEdits) { return flagColors[index]; } return flagColors[0]; } public static int GetFlagIndexFromName(string name) { for (int i = 0; i < flagMaterials.Count; i++) { if (!(((Object)flagMaterials[i]).name != name)) { return i; } } return 0; } public static Color GetHex(string hex) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (!hex.StartsWith("#")) { hex = "#" + hex; } Color result = default(Color); ColorUtility.TryParseHtmlString(hex, ref result); return result; } } public class PrideFlagTypeStorer : NetworkBehaviour { [SyncVar] public int flagType; public int NetworkflagType { get { return flagType; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref flagType, 1u); } } public void OnEnable() { //IL_00fa: 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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } NetworkflagType = Run.instance.runRNG.RangeInt(1, PrideHelper.flagMaterials.Count); CharacterMaster component = ((Component)this).gameObject.GetComponent(); string[] array = WhiteFlag.survivorPrideFlagOverrides.Split(',').ToArray(); object obj; if (component == null) { obj = null; } else { CharacterBody body = component.GetBody(); obj = ((body != null) ? ((Object)body).name.Replace("(Clone)", "") : null); } string text = (string)obj; int num = -1; for (int i = 0; i < array.Length; i++) { if (array[i] == text && array.Length != i + 1) { num = i; } } if (num != -1) { int flagIndexFromName = PrideHelper.GetFlagIndexFromName(array[num + 1]); if (flagIndexFromName != -1) { NetworkflagType = flagIndexFromName; SS2Log.Debug("overriding flag to " + array[num + 1] + " !!", 324, "OnEnable"); } } object obj2; if (component == null) { obj2 = null; } else { PlayerCharacterMasterController playerCharacterMasterController = component.playerCharacterMasterController; if (playerCharacterMasterController == null) { obj2 = null; } else { NetworkUser networkUser = playerCharacterMasterController.networkUser; if (networkUser == null) { obj2 = null; } else { NetworkUserId id = networkUser.id; PlatformID steamId = ((NetworkUserId)(ref id)).steamId; obj2 = ((PlatformID)(ref steamId)).ToSteamID(); } } } string text2 = (string)obj2; if (text2 != null) { string[] array2 = WhiteFlag.steamidPrideFlagOverrides.Split(',').ToArray(); int num2 = -1; for (int j = 0; j < array2.Length; j++) { if (array2[j].Split(":")[array2[j].Split(":").Length - 1] == text2.Split(":")[text2.Split(":").Length - 1] && array2.Length != j + 1) { num2 = j; } } if (num2 != -1) { int flagIndexFromName2 = PrideHelper.GetFlagIndexFromName(array2[num + 1]); if (flagIndexFromName2 != -1) { NetworkflagType = flagIndexFromName2; SS2Log.Debug("overriding flag to " + array2[num + 1] + " !!", 347, "OnEnable"); } } } SS2Log.Debug("set master flag type " + ((Object)PrideHelper.flagMaterials[flagType]).name, 352, "OnEnable"); } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.WritePackedUInt32((uint)flagType); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & 1) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.WritePackedUInt32((uint)flagType); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { flagType = (int)reader.ReadPackedUInt32(); return; } int num = (int)reader.ReadPackedUInt32(); if ((num & 1) != 0) { flagType = (int)reader.ReadPackedUInt32(); } } public override void PreStartClient() { } } public class RulebookEnabler : MonoBehaviour { public static RuleCategoryDef ruleCategoryDef; public static RuleDef playerDamageRule; public static int playerDamageRuleIndex; public static float playerDamageModifier; public static RuleDef playerArmorRule; public static int playerArmorRuleIndex; public static float playerArmorModifier; public static RuleDef stormsEnabledRule; public static int stormsEnabledRuleIndex; public static bool stormsEnabled; public static RuleDef eventsEnabledRule; public static int eventsEnabledRuleIndex; public static bool eventsEnabled; public static RuleDef starstormElitesEnabledRule; public static int starstormElitesEnabledRuleIndex; public static bool starstormElitesEnabled; public static Color color = new Color(0.52f, 0.74f, 0.87f, 1f); private static int ruleCategoryIndex; public static bool categoryEnabled = false; internal static IEnumerator Init() { RuleCategoryController.SetData += new hook_SetData(OnRoR2UIRuleCategoryControllerSetData); SceneDirector.Start += new hook_Start(SceneDirector_Start); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); ruleCategoryDef = new RuleCategoryDef(); ruleCategoryDef.displayToken = "SS2_RULEBOOK_NAME"; ruleCategoryDef.subtitleToken = "SS2_RULEBOOK_DESC"; ruleCategoryDef.color = color; ruleCategoryDef.emptyTipToken = "SS2_RULEBOOK_EMPTY"; ruleCategoryDef.editToken = "SS2_RULEBOOK_EDIT"; ruleCategoryDef.ruleCategoryType = (RuleCategoryType)1; ruleCategoryDef.position = 250; ruleCategoryIndex = RuleCatalogExtras.AddCategory(ruleCategoryDef); playerDamageRule = new RuleDef("ss2PlayerDamageMod", "SS2_PLAYER_DAMAGE_RULE_NAME"); playerDamageRule.category = ruleCategoryDef; ExtendedRuleChoiceDef obj = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRuleDefault", (object)"DamageDefault", false); ((RuleChoiceDef)obj).sprite = SS2Assets.LoadAsset("texIconRuleDamageDefault", SS2Bundle.Base); ((RuleChoiceDef)obj).tooltipNameToken = "SS2_PLAYER_DAMAGE_DEFAULT_NAME_TOKEN"; ((RuleChoiceDef)obj).tooltipNameColor = color; ((RuleChoiceDef)obj).tooltipBodyToken = "SS2_PLAYER_DAMAGE_DEFAULT_BODY_TOKEN"; ((RuleChoiceDef)obj).excludeByDefault = false; playerDamageRule.MakeNewestChoiceDefault(); ExtendedRuleChoiceDef obj2 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule25Increase", (object)"25DamageIncrease", false); ((RuleChoiceDef)obj2).sprite = SS2Assets.LoadAsset("texIconRuleDamageIncrease25", SS2Bundle.Base); ((RuleChoiceDef)obj2).tooltipNameToken = "SS2_PLAYER_DAMAGE_25_INCREASE_NAME_TOKEN"; ((RuleChoiceDef)obj2).tooltipNameColor = color; ((RuleChoiceDef)obj2).tooltipBodyToken = "SS2_PLAYER_DAMAGE_25_INCREASE_BODY_TOKEN"; ((RuleChoiceDef)obj2).excludeByDefault = false; ExtendedRuleChoiceDef obj3 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule50Increase", (object)"50DamageIncrease", false); ((RuleChoiceDef)obj3).sprite = SS2Assets.LoadAsset("texIconRuleDamageIncrease50", SS2Bundle.Base); ((RuleChoiceDef)obj3).tooltipNameToken = "SS2_PLAYER_DAMAGE_50_INCREASE_NAME_TOKEN"; ((RuleChoiceDef)obj3).tooltipNameColor = color; ((RuleChoiceDef)obj3).tooltipBodyToken = "SS2_PLAYER_DAMAGE_50_INCREASE_BODY_TOKEN"; ((RuleChoiceDef)obj3).excludeByDefault = false; ExtendedRuleChoiceDef obj4 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule75Increase", (object)"75DamageIncrease", false); ((RuleChoiceDef)obj4).sprite = SS2Assets.LoadAsset("texIconRuleDamageIncrease75", SS2Bundle.Base); ((RuleChoiceDef)obj4).tooltipNameToken = "SS2_PLAYER_DAMAGE_75_INCREASE_NAME_TOKEN"; ((RuleChoiceDef)obj4).tooltipNameColor = color; ((RuleChoiceDef)obj4).tooltipBodyToken = "SS2_PLAYER_DAMAGE_75_INCREASE_BODY_TOKEN"; ((RuleChoiceDef)obj4).excludeByDefault = false; ExtendedRuleChoiceDef obj5 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule100Increase", (object)"100DamageIncrease", false); ((RuleChoiceDef)obj5).sprite = SS2Assets.LoadAsset("texIconRuleDamageIncrease100", SS2Bundle.Base); ((RuleChoiceDef)obj5).tooltipNameToken = "SS2_PLAYER_DAMAGE_100_INCREASE_NAME_TOKEN"; ((RuleChoiceDef)obj5).tooltipNameColor = color; ((RuleChoiceDef)obj5).tooltipBodyToken = "SS2_PLAYER_DAMAGE_100_INCREASE_BODY_TOKEN"; ((RuleChoiceDef)obj5).excludeByDefault = false; ExtendedRuleChoiceDef obj6 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule25Decrease", (object)"25DamageDecrease", false); ((RuleChoiceDef)obj6).sprite = SS2Assets.LoadAsset("texIconRuleDamageDecrease25", SS2Bundle.Base); ((RuleChoiceDef)obj6).tooltipNameToken = "SS2_PLAYER_DAMAGE_25_DECREASE_NAME_TOKEN"; ((RuleChoiceDef)obj6).tooltipNameColor = color; ((RuleChoiceDef)obj6).tooltipBodyToken = "SS2_PLAYER_DAMAGE_25_DECREASE_BODY_TOKEN"; ((RuleChoiceDef)obj6).excludeByDefault = false; ExtendedRuleChoiceDef obj7 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule50Decrease", (object)"50DamageDecrease", false); ((RuleChoiceDef)obj7).sprite = SS2Assets.LoadAsset("texIconRuleDamageDecrease50", SS2Bundle.Base); ((RuleChoiceDef)obj7).tooltipNameToken = "SS2_PLAYER_DAMAGE_50_DECREASE_NAME_TOKEN"; ((RuleChoiceDef)obj7).tooltipNameColor = color; ((RuleChoiceDef)obj7).tooltipBodyToken = "SS2_PLAYER_DAMAGE_50_DECREASE_BODY_TOKEN"; ((RuleChoiceDef)obj7).excludeByDefault = false; ExtendedRuleChoiceDef obj8 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule75Decrease", (object)"75DamageDecrease", false); ((RuleChoiceDef)obj8).sprite = SS2Assets.LoadAsset("texIconRuleDamageDecrease75", SS2Bundle.Base); ((RuleChoiceDef)obj8).tooltipNameToken = "SS2_PLAYER_DAMAGE_75_DECREASE_NAME_TOKEN"; ((RuleChoiceDef)obj8).tooltipNameColor = color; ((RuleChoiceDef)obj8).tooltipBodyToken = "SS2_PLAYER_DAMAGE_75_DECREASE_BODY_TOKEN"; ((RuleChoiceDef)obj8).excludeByDefault = false; ExtendedRuleChoiceDef obj9 = RulesExtensions.AddExtendedRuleChoiceDef(playerDamageRule, "ss2PlayerDamageRule90Decrease", (object)"90DamageDecrease", false); ((RuleChoiceDef)obj9).sprite = SS2Assets.LoadAsset("texIconRuleDamageDecrease90", SS2Bundle.Base); ((RuleChoiceDef)obj9).tooltipNameToken = "SS2_PLAYER_DAMAGE_90_DECREASE_NAME_TOKEN"; ((RuleChoiceDef)obj9).tooltipNameColor = color; ((RuleChoiceDef)obj9).tooltipBodyToken = "SS2_PLAYER_DAMAGE_90_DECREASE_BODY_TOKEN"; ((RuleChoiceDef)obj9).excludeByDefault = false; RuleCatalogExtras.AddRuleToCatalog(playerDamageRule, ruleCategoryIndex); playerDamageRuleIndex = playerDamageRule.globalIndex; playerArmorRule = new RuleDef("ss2PlayerArmorMod", "SS2_PLAYER_ARMOR_RULE_NAME"); playerArmorRule.category = ruleCategoryDef; ExtendedRuleChoiceDef obj10 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRuleDefault", (object)"Default", false); ((RuleChoiceDef)obj10).sprite = SS2Assets.LoadAsset("texIconRuleArmorDefault", SS2Bundle.Base); ((RuleChoiceDef)obj10).tooltipNameToken = "SS2_PLAYER_ARMOR_DEFAULT_NAME_TOKEN"; ((RuleChoiceDef)obj10).tooltipNameColor = color; ((RuleChoiceDef)obj10).tooltipBodyToken = "SS2_PLAYER_ARMOR_DEFAULT_BODY_TOKEN"; ((RuleChoiceDef)obj10).excludeByDefault = false; playerArmorRule.MakeNewestChoiceDefault(); ExtendedRuleChoiceDef obj11 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule25Increase", (object)"25ArmorIncrease", false); ((RuleChoiceDef)obj11).sprite = SS2Assets.LoadAsset("texIconRuleArmorIncrease25", SS2Bundle.Base); ((RuleChoiceDef)obj11).tooltipNameToken = "SS2_PLAYER_ARMOR_25_INCREASE_NAME_TOKEN"; ((RuleChoiceDef)obj11).tooltipNameColor = color; ((RuleChoiceDef)obj11).tooltipBodyToken = "SS2_PLAYER_ARMOR_25_INCREASE_BODY_TOKEN"; ((RuleChoiceDef)obj11).excludeByDefault = false; ExtendedRuleChoiceDef obj12 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule50Increase", (object)"50ArmorIncrease", false); ((RuleChoiceDef)obj12).sprite = SS2Assets.LoadAsset("texIconRuleArmorIncrease50", SS2Bundle.Base); ((RuleChoiceDef)obj12).tooltipNameToken = "SS2_PLAYER_ARMOR_50_INCREASE_NAME_TOKEN"; ((RuleChoiceDef)obj12).tooltipNameColor = color; ((RuleChoiceDef)obj12).tooltipBodyToken = "SS2_PLAYER_ARMOR_50_INCREASE_BODY_TOKEN"; ((RuleChoiceDef)obj12).excludeByDefault = false; ExtendedRuleChoiceDef obj13 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule75Increase", (object)"75ArmorIncrease", false); ((RuleChoiceDef)obj13).sprite = SS2Assets.LoadAsset("texIconRuleArmorIncrease75", SS2Bundle.Base); ((RuleChoiceDef)obj13).tooltipNameToken = "SS2_PLAYER_ARMOR_75_INCREASE_NAME_TOKEN"; ((RuleChoiceDef)obj13).tooltipNameColor = color; ((RuleChoiceDef)obj13).tooltipBodyToken = "SS2_PLAYER_ARMOR_75_INCREASE_BODY_TOKEN"; ((RuleChoiceDef)obj13).excludeByDefault = false; ExtendedRuleChoiceDef obj14 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule100Increase", (object)"100ArmorIncrease", false); ((RuleChoiceDef)obj14).sprite = SS2Assets.LoadAsset("texIconRuleArmorIncrease100", SS2Bundle.Base); ((RuleChoiceDef)obj14).tooltipNameToken = "SS2_PLAYER_ARMOR_100_INCREASE_NAME_TOKEN"; ((RuleChoiceDef)obj14).tooltipNameColor = color; ((RuleChoiceDef)obj14).tooltipBodyToken = "SS2_PLAYER_ARMOR_100_INCREASE_BODY_TOKEN"; ((RuleChoiceDef)obj14).excludeByDefault = false; ExtendedRuleChoiceDef obj15 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule25Decrease", (object)"25ArmorDecrease", false); ((RuleChoiceDef)obj15).sprite = SS2Assets.LoadAsset("texIconRuleArmorDecrease25", SS2Bundle.Base); ((RuleChoiceDef)obj15).tooltipNameToken = "SS2_PLAYER_ARMOR_25_DECREASE_NAME_TOKEN"; ((RuleChoiceDef)obj15).tooltipNameColor = color; ((RuleChoiceDef)obj15).tooltipBodyToken = "SS2_PLAYER_ARMOR_25_DECREASE_BODY_TOKEN"; ((RuleChoiceDef)obj15).excludeByDefault = false; ExtendedRuleChoiceDef obj16 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule50Decrease", (object)"50ArmorDecrease", false); ((RuleChoiceDef)obj16).sprite = SS2Assets.LoadAsset("texIconRuleArmorDecrease50", SS2Bundle.Base); ((RuleChoiceDef)obj16).tooltipNameToken = "SS2_PLAYER_ARMOR_50_DECREASE_NAME_TOKEN"; ((RuleChoiceDef)obj16).tooltipNameColor = color; ((RuleChoiceDef)obj16).tooltipBodyToken = "SS2_PLAYER_ARMOR_50_DECREASE_BODY_TOKEN"; ((RuleChoiceDef)obj16).excludeByDefault = false; ExtendedRuleChoiceDef obj17 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule75Decrease", (object)"75ArmorDecrease", false); ((RuleChoiceDef)obj17).sprite = SS2Assets.LoadAsset("texIconRuleArmorDecrease75", SS2Bundle.Base); ((RuleChoiceDef)obj17).tooltipNameToken = "SS2_PLAYER_ARMOR_75_DECREASE_NAME_TOKEN"; ((RuleChoiceDef)obj17).tooltipNameColor = color; ((RuleChoiceDef)obj17).tooltipBodyToken = "SS2_PLAYER_ARMOR_75_DECREASE_BODY_TOKEN"; ((RuleChoiceDef)obj17).excludeByDefault = false; ExtendedRuleChoiceDef obj18 = RulesExtensions.AddExtendedRuleChoiceDef(playerArmorRule, "ss2PlayerArmorRule90Decrease", (object)"90ArmorDecrease", false); ((RuleChoiceDef)obj18).sprite = SS2Assets.LoadAsset("texIconRuleArmorDecrease90", SS2Bundle.Base); ((RuleChoiceDef)obj18).tooltipNameToken = "SS2_PLAYER_ARMOR_90_DECREASE_NAME_TOKEN"; ((RuleChoiceDef)obj18).tooltipNameColor = color; ((RuleChoiceDef)obj18).tooltipBodyToken = "SS2_PLAYER_ARMOR_90_DECREASE_BODY_TOKEN"; ((RuleChoiceDef)obj18).excludeByDefault = false; RuleCatalogExtras.AddRuleToCatalog(playerArmorRule, ruleCategoryIndex); playerArmorRuleIndex = playerArmorRule.globalIndex; stormsEnabledRule = new RuleDef("ss2StormsEnabled", "SS2_STORMS_ENABLED_RULE_NAME"); stormsEnabledRule.category = ruleCategoryDef; ExtendedRuleChoiceDef obj19 = RulesExtensions.AddExtendedRuleChoiceDef(stormsEnabledRule, "ss2StormsEnabled", (object)"StormsEnabled", false); ((RuleChoiceDef)obj19).sprite = null; ((RuleChoiceDef)obj19).tooltipNameToken = "SS2_STORMS_ENABLED_NAME_TOKEN"; ((RuleChoiceDef)obj19).tooltipNameColor = color; ((RuleChoiceDef)obj19).tooltipBodyToken = "SS2_STORMS_ENABLED_BODY_TOKEN"; ((RuleChoiceDef)obj19).excludeByDefault = false; stormsEnabledRule.MakeNewestChoiceDefault(); ExtendedRuleChoiceDef obj20 = RulesExtensions.AddExtendedRuleChoiceDef(stormsEnabledRule, "ss2StormsDisabled", (object)"StormsDisabled", false); ((RuleChoiceDef)obj20).sprite = null; ((RuleChoiceDef)obj20).tooltipNameToken = "SS2_STORMS_DISABLED_NAME_TOKEN"; ((RuleChoiceDef)obj20).tooltipNameColor = color; ((RuleChoiceDef)obj20).tooltipBodyToken = "SS2_STORMS_DISABLED_BODY_TOKEN"; ((RuleChoiceDef)obj20).excludeByDefault = false; RuleCatalogExtras.AddRuleToCatalog(stormsEnabledRule, ruleCategoryIndex); stormsEnabledRuleIndex = stormsEnabledRule.globalIndex; eventsEnabledRule = new RuleDef("ss2EventsEnabled", "SS2_EVENTS_ENABLED_RULE_NAME"); eventsEnabledRule.category = ruleCategoryDef; ExtendedRuleChoiceDef obj21 = RulesExtensions.AddExtendedRuleChoiceDef(eventsEnabledRule, "ss2EventsEnabled", (object)"EventsEnabled", false); ((RuleChoiceDef)obj21).sprite = null; ((RuleChoiceDef)obj21).tooltipNameToken = "SS2_EVENTS_ENABLED_NAME_TOKEN"; ((RuleChoiceDef)obj21).tooltipNameColor = color; ((RuleChoiceDef)obj21).tooltipBodyToken = "SS2_EVENTS_ENABLED_BODY_TOKEN"; ((RuleChoiceDef)obj21).excludeByDefault = false; eventsEnabledRule.MakeNewestChoiceDefault(); ExtendedRuleChoiceDef obj22 = RulesExtensions.AddExtendedRuleChoiceDef(eventsEnabledRule, "ss2EventsDisabled", (object)"EventsDisabled", false); ((RuleChoiceDef)obj22).sprite = null; ((RuleChoiceDef)obj22).tooltipNameToken = "SS2_EVENTS_DISABLED_NAME_TOKEN"; ((RuleChoiceDef)obj22).tooltipNameColor = color; ((RuleChoiceDef)obj22).tooltipBodyToken = "SS2_EVENTS_DISABLED_BODY_TOKEN"; ((RuleChoiceDef)obj22).excludeByDefault = false; RuleCatalogExtras.AddRuleToCatalog(eventsEnabledRule, ruleCategoryIndex); eventsEnabledRuleIndex = eventsEnabledRule.globalIndex; starstormElitesEnabledRule = new RuleDef("ss2StarstormElitesEnabled", "SS2_STARSTORM_ELITES_ENABLED_RULE_NAME"); starstormElitesEnabledRule.category = ruleCategoryDef; ExtendedRuleChoiceDef obj23 = RulesExtensions.AddExtendedRuleChoiceDef(starstormElitesEnabledRule, "ss2StarstormElitesEnabled", (object)"StarstormElitesEnabled", false); ((RuleChoiceDef)obj23).sprite = null; ((RuleChoiceDef)obj23).tooltipNameToken = "SS2_STARSTORM_ELITES_ENABLED_NAME_TOKEN"; ((RuleChoiceDef)obj23).tooltipNameColor = color; ((RuleChoiceDef)obj23).tooltipBodyToken = "SS2_STARSTORM_ELITES_ENABLED_BODY_TOKEN"; ((RuleChoiceDef)obj23).excludeByDefault = false; starstormElitesEnabledRule.MakeNewestChoiceDefault(); ExtendedRuleChoiceDef obj24 = RulesExtensions.AddExtendedRuleChoiceDef(starstormElitesEnabledRule, "ss2StarstormElitesDisabled", (object)"StarstormElitesDisabled", false); ((RuleChoiceDef)obj24).sprite = null; ((RuleChoiceDef)obj24).tooltipNameToken = "SS2_STARSTORM_ELITES_DISABLED_NAME_TOKEN"; ((RuleChoiceDef)obj24).tooltipNameColor = color; ((RuleChoiceDef)obj24).tooltipBodyToken = "SS2_STARSTORM_ELITES_DISABLED_BODY_TOKEN"; ((RuleChoiceDef)obj24).excludeByDefault = false; RuleCatalogExtras.AddRuleToCatalog(starstormElitesEnabledRule, ruleCategoryIndex); starstormElitesEnabledRuleIndex = starstormElitesEnabledRule.globalIndex; yield return null; } public static void OnRoR2UIRuleCategoryControllerSetData(orig_SetData orig, RuleCategoryController self, RuleCategoryDef categoryDef, RuleChoiceMask availability, RuleBook rulebook) { orig.Invoke(self, categoryDef, availability, rulebook); if (categoryDef == ruleCategoryDef) { for (int i = 0; i < self.rulesToDisplay.Count; i++) { self.popoutButtonIconAllocator.elements[i].canVote = true; } } } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { if ((Object)(object)damageInfo.attacker != (Object)null) { CharacterBody componentInChildren = ((Component)damageInfo.attacker.transform).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null && componentInChildren.isPlayerControlled) { damageInfo.damage *= playerDamageModifier; } } if ((Object)(object)self.body != (Object)null && self.body.isPlayerControlled) { damageInfo.damage *= playerArmorModifier; } orig.Invoke(self, damageInfo); } public unsafe static void SceneDirector_Start(orig_Start orig, SceneDirector self) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); ChoicesEnumerable choices = Run.instance.ruleBook.choices; Enumerator enumerator = ((ChoicesEnumerable)(ref choices)).GetEnumerator(); try { while (((Enumerator)(ref enumerator)).MoveNext()) { RuleChoiceDef current = ((Enumerator)(ref enumerator)).Current; if (current.ruleDef == playerDamageRule) { switch (current.tooltipNameToken) { case "SS2_PLAYER_DAMAGE_25_INCREASE_NAME_TOKEN": playerDamageModifier = 1.25f; break; case "SS2_PLAYER_DAMAGE_50_INCREASE_NAME_TOKEN": playerDamageModifier = 1.5f; break; case "SS2_PLAYER_DAMAGE_75_INCREASE_NAME_TOKEN": playerDamageModifier = 1.75f; break; case "SS2_PLAYER_DAMAGE_100_INCREASE_NAME_TOKEN": playerDamageModifier = 2f; break; case "SS2_PLAYER_DAMAGE_25_DECREASE_NAME_TOKEN": playerDamageModifier = 0.75f; break; case "SS2_PLAYER_DAMAGE_50_DECREASE_NAME_TOKEN": playerDamageModifier = 0.5f; break; case "SS2_PLAYER_DAMAGE_75_DECREASE_NAME_TOKEN": playerDamageModifier = 0.25f; break; case "SS2_PLAYER_DAMAGE_90_DECREASE_NAME_TOKEN": playerDamageModifier = 0.1f; break; case "SS2_PLAYER_DAMAGE_DEFAULT_NAME_TOKEN": playerDamageModifier = 1f; break; default: playerDamageModifier = 1f; break; } } if (current.ruleDef == playerArmorRule) { switch (current.tooltipNameToken) { case "SS2_PLAYER_ARMOR_25_INCREASE_NAME_TOKEN": playerArmorModifier = 1.25f; break; case "SS2_PLAYER_ARMOR_50_INCREASE_NAME_TOKEN": playerArmorModifier = 1.5f; break; case "SS2_PLAYER_ARMOR_75_INCREASE_NAME_TOKEN": playerArmorModifier = 1.75f; break; case "SS2_PLAYER_ARMOR_100_INCREASE_NAME_TOKEN": playerArmorModifier = 2f; break; case "SS2_PLAYER_ARMOR_25_DECREASE_NAME_TOKEN": playerArmorModifier = 0.75f; break; case "SS2_PLAYER_ARMOR_50_DECREASE_NAME_TOKEN": playerArmorModifier = 0.5f; break; case "SS2_PLAYER_ARMOR_75_DECREASE_NAME_TOKEN": playerArmorModifier = 0.25f; break; case "SS2_PLAYER_ARMOR_90_DECREASE_NAME_TOKEN": playerArmorModifier = 0.1f; break; case "SS2_PLAYER_ARMOR_DEFAULT_NAME_TOKEN": playerArmorModifier = 1f; break; default: playerArmorModifier = 1f; break; } } if (current.ruleDef == stormsEnabledRule) { if (current.tooltipNameToken == "SS2_STORMS_DISABLED_NAME") { stormsEnabled = false; } else { stormsEnabled = true; } } if (current.ruleDef == eventsEnabledRule) { if (current.tooltipNameToken == "SS2_EVENTS_DISABLED_NAME") { eventsEnabled = false; } else { eventsEnabled = true; } } if (current.ruleDef == starstormElitesEnabledRule) { if (current.tooltipNameToken == "SS2_STARSTORM_ELITES_DISABLED_NAME") { starstormElitesEnabled = false; } else { starstormElitesEnabled = true; } } } } finally { ((IDisposable)(*(Enumerator*)(&enumerator))/*cast due to .constrained prefix*/).Dispose(); } } } namespace Assets.Starstorm2.Modules.EntityStates.Knight { public class InvigoratePassive : BaseSkillState { public static float duration = 5f; public static float baseDuration = 5f; public static GameObject buffWard; private GameObject wardInstance; private bool hasBuffed; public static string mecanimParameter; public override void OnEnter() { ((BaseState)this).OnEnter(); hasBuffed = false; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) if (!hasBuffed && ((EntityState)this).isAuthority) { hasBuffed = true; wardInstance = Object.Instantiate(buffWard); wardInstance.GetComponent().teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex; wardInstance.GetComponent().AttachToGameObjectAndSpawn(((EntityState)this).gameObject, (string)null); } ((EntityState)this).OnExit(); } } } namespace Assets.Starstorm2.Modules.EntityStates.Executioner2.Templar { public class Consecration : BaseSkillState { public float baseDuration = 0.5f; public static BuffDef holyBuff; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.AddTimedBuff(holyBuff, 10f); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class HolyWeapon : BaseSkillState { [FormatToken(/*Could not decode attribute arguments.*/)] public static float damageCoefficient; public static float procCoefficient; public static float baseDuration; public static float recoil; public static float spreadBloom; public static float force; [HideInInspector] public static GameObject muzzleEffectPrefab = LegacyResourcesAPI.Load("prefabs/effects/muzzleflashes/Muzzleflash1"); [HideInInspector] public static GameObject tracerPrefab = LegacyResourcesAPI.Load("prefabs/effects/tracers/tracercommandodefault"); [HideInInspector] public static GameObject hitPrefab = LegacyResourcesAPI.Load("prefabs/effects/HitsparkCommando"); private float duration; private float fireDuration; private string muzzleString; private bool hasFired; private Animator animator; public static float range = 55f; public static float minSpread = 6f; public static float maxSpread = 10f; public static uint bulletCount = 3u; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireDuration = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "Muzzle"; hasFired = false; ((EntityState)this).PlayCrossfade("Gesture, Override", "Primary", "Primary.playbackRate", duration * 2.5f, 0.05f); Shoot(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!(((EntityState)this).fixedAge < duration) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Shoot() { //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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012a: 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_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015f: 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_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: 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_020c: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; bool num = ((BaseState)this).RollCrit(); string text = "ExecutionerPrimary"; if (num) { text += "Crit"; } Util.PlaySound(text, ((EntityState)this).gameObject); ((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil); if (Object.op_Implicit((Object)(object)muzzleEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } if (((EntityState)this).isAuthority) { float damage = damageCoefficient * ((BaseState)this).damageStat; Ray aimRay = ((BaseState)this).GetAimRay(); BulletAttack val = new BulletAttack { aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damage, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)512), falloffModel = (FalloffModel)2, maxDistance = 55f, force = force, hitMask = CommonMasks.bullet, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 2f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, spreadPitchScale = 0.7f, spreadYawScale = 0.7f, queryTriggerInteraction = (QueryTriggerInteraction)0, tracerEffectPrefab = tracerPrefab, hitEffectPrefab = hitPrefab, minSpread = minSpread, maxSpread = maxSpread, bulletCount = 1u }; val.Fire(); uint num2 = (uint)(Mathf.CeilToInt((float)bulletCount / 2f) - 1); val.minSpread = minSpread; val.maxSpread = maxSpread * 1.45f; val.bulletCount = num2; val.Fire(); val.minSpread = minSpread * 1.45f; val.maxSpread = maxSpread * 2f; val.bulletCount = (uint)Mathf.FloorToInt((float)bulletCount / 2f); val.Fire(); val.minSpread = minSpread * 2f; val.maxSpread = maxSpread * 4f; val.bulletCount = (uint)Mathf.FloorToInt((float)bulletCount / 2f); val.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace Assets.Starstorm2.Modules.EntityStates.Engineer { internal class RemoteDetonation { } } namespace Assets.Starstorm2.Modules.EntityStates.Artificer { public class AutoAimIcicle : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates { public class GrabbedState : BaseState { public float duration = float.PositiveInfinity; public GrabController inflictor; public override void OnEnter() { ((BaseState)this).OnEnter(); Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.GetLayerIndex("Body"); ((Behaviour)modelAnimator).enabled = false; modelAnimator.CrossFadeInFixedTime((Random.Range(0, 2) == 0) ? "Hurt1" : "Hurt2", 0.1f); modelAnimator.Update(0f); } } public override void OnExit() { Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { ((Behaviour)modelAnimator).enabled = true; } ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); if (Object.op_Implicit((Object)(object)inflictor)) { inflictor.AttemptGrab(null); SS2Log.Warning("GrabbedState: " + ((EntityState)this).characterBody.GetDisplayName() + " duration expired!", 44, "FixedUpdate"); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)8; } } public class FearedState : BaseState { private static float turnSpeed = 360f; private static string enterSoundString = "Play_voidman_R_pop"; [SerializeField] public GameObject effectPrefab; public float duration; public GameObject target; private GameObject effectInstance; private float cachedTurnSpeed; private Vector3 lastKnownTargetPosition; private Collider bodyCollider; public override void OnEnter() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { cachedTurnSpeed = ((EntityState)this).characterDirection.turnSpeed; ((EntityState)this).characterDirection.turnSpeed = turnSpeed; } bodyCollider = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)effectPrefab)) { effectInstance = Object.Instantiate(effectPrefab, ((EntityState)this).characterBody.coreTransform.position, Quaternion.identity); } Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } private void PlayStunAnimation() { Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.CrossFadeInFixedTime((Random.Range(0, 2) == 0) ? "Hurt1" : "Hurt2", 0.1f); modelAnimator.Update(0f); } } public override void FixedUpdate() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0067: 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_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) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { if ((Object)(object)target != (Object)null) { lastKnownTargetPosition = target.transform.position; } Vector3 val = ((EntityState)this).transform.position - lastKnownTargetPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.moveDirection = normalized; } if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { ((EntityState)this).rigidbodyMotor.moveVector = normalized * base.moveSpeedStat; } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void Update() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)effectInstance)) { Vector3 position = ((EntityState)this).transform.position; if (Object.op_Implicit((Object)(object)bodyCollider)) { Bounds bounds = bodyCollider.bounds; Vector3 center = ((Bounds)(ref bounds)).center; bounds = bodyCollider.bounds; position = center + new Vector3(0f, ((Bounds)(ref bounds)).extents.y, 0f); } effectInstance.transform.position = position; } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.turnSpeed = cachedTurnSpeed; } } } public class FearedStateRed : BaseState { } } namespace EntityStates.Wayfarer { internal class CreateBuffWard : BaseSkillState { public static float baseDuration = 3.5f; public static float radius = 30f; private Animator animator; private GameObject buffPrefab; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayCrossfade("FullBody, Override", "Ward", "Ward.playbackRate", baseDuration / ((BaseState)this).attackSpeedStat, 0.2f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!Object.op_Implicit((Object)(object)buffPrefab)) { _ = (double)animator.GetFloat("Ward.active"); _ = 0.5; } if (((EntityState)this).fixedAge >= baseDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)buffPrefab)) { Object.Destroy((Object)(object)buffPrefab); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } internal class FireChains : BaseSkillState { public static float baseDuration = 2.5f; public static float damageCoefficient = 4f; public static float force = 10f; public static float radius = 15f; public static GameObject explosionPrefab = Resources.Load("prefabs/effects/omnieffect/OmniExplosionVFX"); private Animator animator; private float duration; private EffectData effectData; private BlastAttack attack; private ChildLocator locator; private bool hasAttackedL; private bool hasAttackedR; private GameObject chainPrefab; public override void OnEnter() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; effectData = new EffectData(); effectData.scale = radius; ((EntityState)this).PlayCrossfade("FullBody, Override", "Melee", "Melee.playbackRate", duration, 0.2f); locator = ((Component)((EntityState)this).GetModelTransform()).GetComponent(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)animator)) { if (!hasAttackedL && (double)animator.GetFloat("MeleeL.active") > 0.5) { hasAttackedL = true; DoAttack("LanternL"); } else if (!hasAttackedR && (double)animator.GetFloat("MeleeR.active") > 0.5) { hasAttackedR = true; DoAttack("LanternR"); } } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void DoAttack(string childName) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //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) Util.PlayAttackSpeedSound(FireHook.soundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (((EntityState)this).isAuthority) { ProjectileManager instance = ProjectileManager.instance; GameObject obj = chainPrefab; Vector3 position = locator.FindChild(childName).position; Ray aimRay = ((BaseState)this).GetAimRay(); instance.FireProjectile(obj, position, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, force, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } internal class MeleeSlam : BaseSkillState { public static float baseDuration = 2f; public static float damageCoefficient = 4f; public static float force = 10f; public static float radius = 15f; public static GameObject explosionPrefab = Resources.Load("prefabs/effects/omnieffect/OmniExplosionVFX"); private Animator animator; private float duration; private EffectData effectData; private BlastAttack attack; private ChildLocator locator; private bool hasAttackedL; private bool hasAttackedR; public override void OnEnter() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; effectData = new EffectData(); effectData.scale = radius; ((EntityState)this).PlayCrossfade("FullBody, Override", "Melee", "Melee.playbackRate", duration, 0.2f); attack = new BlastAttack(); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.baseDamage = ((BaseState)this).damageStat * damageCoefficient; attack.baseForce = force; attack.radius = radius; attack.teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject); locator = ((Component)((EntityState)this).GetModelTransform()).GetComponent(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)animator)) { if (!hasAttackedL && (double)animator.GetFloat("MeleeL.active") > 0.5) { hasAttackedL = true; DoAttack("LanternL"); } else if (!hasAttackedR && (double)animator.GetFloat("MeleeR.active") > 0.5) { hasAttackedR = true; DoAttack("LanternR"); } } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void DoAttack(string childName) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_0054: Unknown result type (might be due to invalid IL or missing references) Vector3 position = locator.FindChild(childName).position; effectData.origin = position; EffectManager.SpawnEffect(explosionPrefab, effectData, true); if (((EntityState)this).isAuthority) { Debug.Log((object)position); attack.position = position; attack.Fire(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.Warden { public abstract class BaseWardenMeleeAttack : BaseSkillState, IStepSetter { public int swingIndex; protected string hitboxGroupName = "SwordHitbox"; public DamageType damageType; public float damageCoefficient = 3.5f; protected float procCoefficient = 1f; protected float pushForce = 300f; protected Vector3 bonusForce = Vector3.zero; public float baseDuration = 1f; protected float attackStartPercentTime = 0.2f; protected float attackEndPercentTime = 0.4f; protected float earlyExitPercentTime = 0.4f; protected float hitStopDuration = 0.012f; protected float attackRecoil = 0.75f; protected float hitHopVelocity = 4f; protected string swingSoundString = ""; protected string hitSoundString = ""; protected string muzzleString = "SwingCenter"; protected string playbackRateParam = "Slash.playbackRate"; protected GameObject swingEffectPrefab; protected GameObject hitEffectPrefab; protected NetworkSoundEventIndex impactSound = (NetworkSoundEventIndex)(-1); public bool addModdedDamageType; public ModdedDamageType moddedDamageType; public float duration; private bool hasFired; private float hitPauseTimer; public OverlapAttack attack; protected bool inHitPause; private bool hasHopped; protected float stopwatch; protected Animator animator; private HitStopCachedState hitStopCachedState; private Vector3 storedVelocity; private WardenChargeMeter chargeMeter; private float chargeMeterGain = 25f; public override void OnEnter() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_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_0147: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); chargeMeter = ((Component)((EntityState)this).characterBody).GetComponent(); duration = baseDuration / ((BaseState)this).attackSpeedStat; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); PlayAttackAnimation(); attack = new OverlapAttack(); attack.damageType = DamageTypeCombo.op_Implicit(damageType); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = damageCoefficient * ((BaseState)this).damageStat; attack.procCoefficient = procCoefficient; attack.hitEffectPrefab = hitEffectPrefab; attack.forceVector = bonusForce; attack.pushAwayForce = pushForce; attack.hitBoxGroup = ((BaseState)this).FindHitBoxGroup(hitboxGroupName); attack.isCrit = ((BaseState)this).RollCrit(); attack.impactSound = impactSound; if (addModdedDamageType) { DamageAPI.AddModdedDamageType(attack, moddedDamageType); } } public virtual void PlayAttackAnimation() { } public override void OnExit() { if (inHitPause) { RemoveHitstop(); } ((EntityState)this).OnExit(); } protected virtual void PlaySwingEffect() { EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } protected virtual void OnHitEnemyAuthority() { Util.PlaySound(hitSoundString, ((EntityState)this).gameObject); if (!hasHopped) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded && hitHopVelocity > 0f) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hitHopVelocity); } hasHopped = true; } ApplyHitstop(); } protected void ApplyHitstop() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (!inHitPause && hitStopDuration > 0f) { storedVelocity = ((EntityState)this).characterMotor.velocity; hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, playbackRateParam); hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat; inHitPause = true; } } private void FireAttack() { if (!((EntityState)this).isAuthority) { return; } List list = new List(); if (!attack.Fire(list)) { return; } Debug.Log((object)("DEBUGGER hitResults.Count: " + list.Count)); if (Object.op_Implicit((Object)(object)chargeMeter)) { Debug.Log((object)"We hit them mfers"); chargeMeter.AddCharge((float)list.Count * chargeMeterGain); } foreach (HurtBox item in list) { if ((Object)(object)((Component)item).gameObject == (Object)(object)SS2.Survivors.Warden.wardenProjectile) { Debug.Log((object)"We hit a WARD!!"); } } OnHitEnemyAuthority(); } private void EnterAttack() { hasFired = true; Util.PlayAttackSpeedSound(swingSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); PlaySwingEffect(); if (((EntityState)this).isAuthority) { ((BaseState)this).AddRecoil(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil); } } public override void FixedUpdate() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer <= 0f && inHitPause) { RemoveHitstop(); } if (!inHitPause) { stopwatch += Time.fixedDeltaTime; } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat(playbackRateParam, 0f); } } bool flag = stopwatch >= duration * attackStartPercentTime; bool flag2 = stopwatch >= duration * attackEndPercentTime; if ((flag && !flag2) || (flag && flag2 && !hasFired)) { if (!hasFired) { EnterAttack(); } FireAttack(); } if (stopwatch >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void RemoveHitstop() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); inHitPause = false; ((EntityState)this).characterMotor.velocity = storedVelocity; } public override InterruptPriority GetMinimumInterruptPriority() { if (!(stopwatch >= duration * earlyExitPercentTime)) { return (InterruptPriority)1; } return (InterruptPriority)0; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(swingIndex); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); swingIndex = reader.ReadInt32(); } public void SetStep(int i) { swingIndex = i; } } public class BatteringBatons : BaseWardenMeleeAttack { public static float swingTimeCoefficient; public static GameObject beamProjectile; public static float baseDurationBeforeInterruptable; public static float comboFinisherBaseDurationBeforeInterruptable; public static float comboFinisherhitPauseDuration; public static float comboFinisherDamageCoefficient; public new float baseDuration = 1f; public new float duration = 1f; private string animationStateName = "SwingSword0"; private bool isComboFinisher => swingIndex == 2; private void SetupHitbox() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) switch (swingIndex) { case 0: animationStateName = "SwingSword0"; muzzleString = "SwingRight"; hitboxGroupName = "SwordHitbox"; break; case 1: animationStateName = "SwingSword1"; muzzleString = "SwingLeft"; hitboxGroupName = "SwordHitbox"; break; default: animationStateName = "SwingSword0"; muzzleString = "SwingLeft"; hitboxGroupName = "SwordHitbox"; break; } damageType = (DamageType)0; procCoefficient = 0.7f; bonusForce = Vector3.zero; baseDuration = 1f; attackStartPercentTime = 0.25f; attackEndPercentTime = 0.7f; earlyExitPercentTime = 0.8f; swingSoundString = "NemmandoSwing"; hitSoundString = ""; playbackRateParam = "Primary.Hitbox"; hitEffectPrefab = SS2.Survivors.Knight.KnightHitEffect; } public override void OnEnter() { if (((EntityState)this).isAuthority) { SetupHitbox(); base.OnEnter(); } } public override void PlayAttackAnimation() { } public override void FixedUpdate() { base.FixedUpdate(); } public override void OnExit() { base.OnExit(); } } public class MagneticToss : BaseSkillState { private static GameObject projectilePrefab = SS2.Survivors.Warden.wardenProjectile; public string soundString; public GameObject muzzleEffectPrefab; public string muzzleName; public static float bloom = 1f; public static float recoilAmplitude = 1f; public static float fireTime = 0.5f; public static float baseDuration = 0.5f; public static float damageCoefficient = 2f; public static float force = 100f; public static float projectileHSpeed = 140f; private bool hasFired; public float duration; public static float autoAimRadius = 2.5f; public static float autoAimDistance = 50f; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); Util.PlaySound("Play_nemmerc_secondary_lunge", ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).fixedAge >= duration * fireTime) { hasFired = true; Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } if (!((BaseState)this).isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 1f); } } private void Fire() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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_00ef: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_014d: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound("Play_nemmerc_knife_throw", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleName, true); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).direction; float speedOverride = -1f; RaycastHit val2 = default(RaycastHit); if (Util.CharacterSpherecast(((EntityState)this).gameObject, aimRay, autoAimRadius, ref val2, autoAimDistance, ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, (QueryTriggerInteraction)0)) { Vector3 val3 = ((RaycastHit)(ref val2)).point; HurtBox component = ((Component)((RaycastHit)(ref val2)).collider).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { val3 = ((Component)component).transform.position; } Vector3 val4 = val3 - ((Ray)(ref aimRay)).origin; Vector2 val5 = default(Vector2); ((Vector2)(ref val5))..ctor(val4.x, val4.z); float num = Trajectory.CalculateInitialYSpeed(((Vector2)(ref val5)).magnitude / projectileHSpeed, val4.y); Vector3 val6 = default(Vector3); ((Vector3)(ref val6))..ctor(((Vector2)(ref val5)).normalized.x * projectileHSpeed, num, ((Vector2)(ref val5)).normalized.y * projectileHSpeed); speedOverride = ((Vector3)(ref val6)).magnitude; val = ((Vector3)(ref val6)).normalized; } if (((EntityState)this).isAuthority) { FireProjectileInfo val7 = new FireProjectileInfo { projectilePrefab = projectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(val), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, force = force, crit = ((BaseState)this).RollCrit() }; ((FireProjectileInfo)(ref val7)).speedOverride = speedOverride; ProjectileManager.instance.FireProjectile(val7); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class PowerVault : BaseState { private float duration = 0.2f; public static float upwardVelocity; public static float forwardVelocity; public static float minimumY; public static float aimVelocity; public static float airControl; public static float hoverVelocity; public static float hoverAcceleration; private float previousAirControl; private bool endNextFrame; private float jetpackStopwatch = 0.1f; private float jetpackHeat = 1f; private float jetpackTimer; private WardenChargeMeter pc; private bool hasJumped; private bool jets; public override void OnEnter() { //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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_00a5: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); previousAirControl = ((EntityState)this).characterMotor.airControl; pc = ((Component)((EntityState)this).characterBody).GetComponent(); Vector3 normalized = ((Vector3)(ref ((EntityState)this).inputBank.moveVector)).normalized; if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; float num = upwardVelocity; float num2 = forwardVelocity; if (((EntityState)this).characterMotor.isGrounded) { normalized.y = 30f; num *= 0.75f; num2 *= 1.25f; } else { normalized.y = 70f; num2 *= 0.75f; num *= 1.25f; } normalized.y = Mathf.Max(normalized.y, minimumY); Vector3 val = ((Vector3)(ref normalized)).normalized * aimVelocity * base.moveSpeedStat; Vector3 val2 = Vector3.up * num; Vector3 val3 = new Vector3(normalized.x, 0f, normalized.z); Vector3 val4 = ((Vector3)(ref val3)).normalized * num2; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = val + val2 + val4; } CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.onMovementHit += new MovementHitDelegate(OnMovementHit); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); Jump(); Jets(); } private void OnMovementHit(ref MovementHitInfo movementHitInfo) { endNextFrame = true; } public void Jump() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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) if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector; if (((EntityState)this).fixedAge >= duration && (endNextFrame || (((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.IsStableOnGround && !((BaseCharacterController)((EntityState)this).characterMotor).Motor.LastGroundingStatus.IsStableOnGround))) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).outer.SetNextStateToMain(); } } } public void Jets() { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).inputBank.skill3.down || !(pc.charge > jetpackHeat)) { return; } if (((EntityState)this).isAuthority) { float y = ((EntityState)this).characterMotor.velocity.y; y = Mathf.MoveTowards(y, hoverVelocity, hoverAcceleration * Time.fixedDeltaTime); ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x, y, ((EntityState)this).characterMotor.velocity.z); jetpackTimer += Time.fixedDeltaTime; if (jetpackTimer >= jetpackStopwatch) { jetpackTimer -= jetpackStopwatch; if ((Object)(object)pc != (Object)null) { pc.AddCharge(-1f * jetpackHeat); } } } if (!jets) { jets = true; ((EntityState)this).characterMotor.airControl = previousAirControl; } } public override void OnExit() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.onMovementHit -= new MovementHitDelegate(OnMovementHit); } ((EntityState)this).characterMotor.airControl = previousAirControl; ((EntityState)this).characterBody.isSprinting = false; ((EntityState)this).OnExit(); } } public class VolticSurge : BaseSkillState { public static float duration = 7f; private GameObject wardInstance; private static float projectileEraserRadius = 20f; private static float minimumFireFrequency = 10f; private static float baseRechargeFrequency = 2f; private float rechargeTimer; private float rechargeFrequency => baseRechargeFrequency * (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) ? ((EntityState)this).characterBody.attackSpeed : 1f); private float fireFrequency => Mathf.Max(minimumFireFrequency, rechargeFrequency); private float timeBetweenFiring => 1f / fireFrequency; private bool isReadyToFire => rechargeTimer <= 0f; public override void OnEnter() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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_0055: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (NetworkServer.active) { Vector3 val = ((EntityState)this).inputBank.aimOrigin - ((EntityState)this).inputBank.aimDirection; wardInstance = Object.Instantiate(SS2.Survivors.Warden.wardenSurgeWard, val, Quaternion.identity); wardInstance.GetComponent().teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex; wardInstance.GetComponent().AttachToGameObjectAndSpawn(((Component)((EntityState)this).characterBody).gameObject, (string)null); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (NetworkServer.active) { rechargeTimer -= ((EntityState)this).GetDeltaTime(); if (((EntityState)this).fixedAge > timeBetweenFiring) { ((EntityState)this).fixedAge = ((EntityState)this).fixedAge - timeBetweenFiring; if (isReadyToFire && DeleteNearbyProjectile()) { rechargeTimer = 1f / rechargeFrequency; } } } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); Debug.Log((object)"Exiting voltic surge"); } private bool DeleteNearbyProjectile() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) Vector3 val = (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) ? ((EntityState)this).characterBody.corePosition : Vector3.zero); TeamIndex val2 = (TeamIndex)((!Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) ? (-1) : ((int)((EntityState)this).characterBody.teamComponent.teamIndex)); float num = projectileEraserRadius * projectileEraserRadius; bool result = false; List instancesList = InstanceTracker.GetInstancesList(); List list = new List(); int i = 0; for (int count = instancesList.Count; i < count; i++) { ProjectileController val3 = instancesList[i]; if (!val3.cannotBeDeleted && val3.teamFilter.teamIndex != val2) { Vector3 val4 = ((Component)val3).transform.position - val; if (((Vector3)(ref val4)).sqrMagnitude < num) { list.Add(val3); } } } int j = 0; for (int count2 = list.Count; j < count2; j++) { ProjectileController val5 = list[j]; if (Object.op_Implicit((Object)(object)val5)) { result = true; _ = ((Component)val5).transform.position; EntityState.Destroy((Object)(object)((Component)val5).gameObject); } } return result; } } } namespace EntityStates.VoidFiend { public class CorruptSwipe : BasicMeleeAttack { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); } public override void OnExit() { ((BasicMeleeAttack)this).OnExit(); } public override void FixedUpdate() { ((BasicMeleeAttack)this).FixedUpdate(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class NadeArm : BaseSkillState { public GameObject effectPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBeamMuzzleflash.prefab").WaitForCompletion(); [SerializeField] public GameObject projectilePrefab; [SerializeField] public float baseDuration = 2f; [SerializeField] public float damageCoefficient = 0.7f; [SerializeField] public float force = 20f; [SerializeField] public string attackString; [SerializeField] public float recoilAmplitude; [SerializeField] public float bloom; private float duration; public override void OnEnter() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Ray aimRay = ((BaseState)this).GetAimRay(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(duration + 2f, false); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); string text = "MuzzleBlaster"; if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false); } if (((EntityState)this).isAuthority) { FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = SS2.Survivors.Acrid.corrodingSpitProjectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, force = force, crit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master) }; ProjectileManager.instance.FireProjectile(val); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class StickyNadeArm : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class UncorruptSwipe : BasicMeleeAttack { public float baseDuration = 2f; private float duration; [SerializeField] public float recoilAmplitude; [SerializeField] public float bloom; [SerializeField] public string animationLayerName; [SerializeField] public string animationStateName; [SerializeField] public string animationPlaybackRateParameter; public override void OnEnter() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) duration = baseDuration; ((BasicMeleeAttack)this).OnEnter(); base.swingEffectPrefab = null; CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.forward = ((Ray)(ref aimRay)).direction; } public override void OnExit() { ((BasicMeleeAttack)this).OnExit(); } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); } public override void PlayAnimation() { ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParameter, duration, 0f); } public override void OnMeleeHitAuthority() { ((BasicMeleeAttack)this).OnMeleeHitAuthority(); ((EntityState)this).characterBody.AddSpreadBloom(bloom); } public override void BeginMeleeAttackEffect() { ((BaseState)this).AddRecoil(-0.1f * recoilAmplitude, 0.1f * recoilAmplitude, -1f * recoilAmplitude, 1f * recoilAmplitude); ((BasicMeleeAttack)this).BeginMeleeAttackEffect(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.Trader.Bag { public class BagBaseState : BaseState { protected PickupPickerController pickupPickerController; protected TraderController traderController; protected virtual bool enableInteraction => true; public override void OnEnter() { ((BaseState)this).OnEnter(); pickupPickerController = ((EntityState)this).GetComponent(); traderController = ((EntityState)this).GetComponent(); if (NetworkServer.active) { pickupPickerController.SetAvailable(enableInteraction); } } } public class Idle : BagBaseState { protected override bool enableInteraction { get { Debug.Log((object)"returning true"); return true; } } } public class TradeToIdle : BagBaseState { public static string enterSoundString; public static string exitSoundString; public static float duration; public static float dropUpVelocityStrength; public static float dropForwardVelocityStrength; public static GameObject muzzleFlashEffectPrefab; public static string muzzleString; private static float dropDuration = 1f; private static float dropInterval = 0.33f; private float stopwatch; protected override bool enableInteraction => false; public override void OnEnter() { base.OnEnter(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); _ = NetworkServer.active; } public override void OnExit() { Util.PlaySound(exitSoundString, ((EntityState)this).gameObject); ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch -= Time.fixedDeltaTime; if (stopwatch <= 0f && ((EntityState)this).fixedAge < dropDuration) { stopwatch += dropInterval; if (traderController.pendingRewards.Count > 0) { TraderController.Reward reward = traderController.pendingRewards.Dequeue(); if (reward.drop != PickupIndex.none) { Transform val = ((BaseState)this).FindModelChild(muzzleString); Vector3 forward = val.forward; if (Object.op_Implicit((Object)(object)reward.target)) { Vector3.RotateTowards(forward, reward.target.transform.position, 60f, 0.33f); } forward.y = 0f; PickupDropletController.CreatePickupDroplet(reward.drop, val.position, Vector3.up * dropUpVelocityStrength + forward * dropForwardVelocityStrength); } } } if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Idle()); } } } public class Trading : BagBaseState { public static float duration; public static string enterSoundString; public static string exitSoundString; protected override bool enableInteraction => false; public override void OnEnter() { base.OnEnter(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } public override void OnExit() { Util.PlaySound(exitSoundString, ((EntityState)this).gameObject); ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new TradeToIdle()); } } } public class WaitToBeginTrade : BagBaseState { public static float duration; protected override bool enableInteraction => false; public override void OnEnter() { base.OnEnter(); ((EntityState)this).PlayCrossfade("Body", "Scavenge", "Scavenge.playbackRate", duration + Trading.duration + TradeToIdle.duration, 0.05f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Trading()); } } } } namespace EntityStates.Toolbot { public class ArcThrower : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } internal class Blowtorch : BaseSkillState { public float baseDuration = 0.5f; private float duration; public static float baseTickFrequency; public static float baseEntryDuration; public static float pressureDuration; private float stopwatch; private float flamethrowerStopwatch; private float entryDuration; private bool hasBegunFlamethrower; public static float maxDistance; public static float heatPerTick; public static float tickProcCoefficient; public static float tickDamageCoefficient; public static float igniteChanceHighHeat; public static float heatIgniteThreshold; public static float recoilForce; public static float force; public static float radius; public static string muzzleString; public static GameObject impactEffectPrefab; public static GameObject flameEffectPrefab; private void Fire(string muzzleString) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.SetAimTimer(duration * 2f); Ray aimRay = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, damage = tickDamageCoefficient * ((BaseState)this).damageStat, force = force, muzzleName = muzzleString, hitEffectPrefab = impactEffectPrefab, isCrit = ((BaseState)this).RollCrit(), radius = radius, falloffModel = (FalloffModel)0, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, procCoefficient = tickProcCoefficient, maxDistance = maxDistance, smartCollision = true }.Fire(); } } public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= entryDuration && !hasBegunFlamethrower) { hasBegunFlamethrower = true; Fire(muzzleString); } if (hasBegunFlamethrower) { flamethrowerStopwatch += Time.fixedDeltaTime; float num = baseTickFrequency / ((BaseState)this).attackSpeedStat; if (flamethrowerStopwatch > num) { flamethrowerStopwatch -= num; Fire(muzzleString); } } if (stopwatch >= baseDuration && !((EntityState)this).inputBank.skill1.down && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class GlueGun : BaseSkillState { public GameObject effectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/MuzzleflashCroco.prefab").WaitForCompletion(); [SerializeField] public float baseDuration = 2f; [SerializeField] public float damageCoefficient = 0.7f; [SerializeField] public float force = 20f; [SerializeField] public string attackString; [SerializeField] public float recoilAmplitude; [SerializeField] public float bloom; private float duration; public override void OnEnter() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_00df: 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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Ray aimRay = ((BaseState)this).GetAimRay(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(duration + 2f, false); ((EntityState)this).PlayAnimation("Gesture, Mouth", "FireSpit", "FireSpit.playbackRate", duration, 0f); Util.PlaySound(attackString, ((EntityState)this).gameObject); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); string text = "MouthMuzzle"; if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false); } if (((EntityState)this).isAuthority) { FireProjectileInfo val = new FireProjectileInfo { damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)0), projectilePrefab = SS2.Survivors.Acrid.corrodingSpitProjectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, force = force, crit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master) }; ProjectileManager.instance.FireProjectile(val); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class SelfRepair : BaseSkillState { public float baseDuration = 1f; private float duration = 3f; private float healthGainPerRepair = 0.05f; private float repairLossPerTick = 1f; private SelfRepairController selfRepairController; public override void OnEnter() { ((BaseState)this).OnEnter(); selfRepairController = ((EntityState)this).GetComponent(); } public override void FixedUpdate() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && selfRepairController.repair <= repairLossPerTick) { ((EntityState)this).outer.SetNextStateToMain(); } if (Object.op_Implicit((Object)(object)selfRepairController) && ((EntityState)this).isAuthority && selfRepairController.repair >= repairLossPerTick) { ((EntityState)this).characterBody.healthComponent.HealFraction(healthGainPerRepair, default(ProcChainMask)); selfRepairController.AddRepair(0f - repairLossPerTick); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.Seraph { public class SeraphPrimary : BaseSkillState { [FormatToken(/*Could not decode attribute arguments.*/)] public static float damageCoefficient; public static float procCoefficient; public static float baseDuration; public static float recoil; public static float spreadBloom; public static float force; [HideInInspector] public static GameObject muzzleEffectPrefab = LegacyResourcesAPI.Load("prefabs/effects/muzzleflashes/Muzzleflash1"); [HideInInspector] public static GameObject tracerPrefab = LegacyResourcesAPI.Load("prefabs/effects/tracers/tracercommandodefault"); [HideInInspector] public static GameObject hitPrefab = LegacyResourcesAPI.Load("prefabs/effects/HitsparkCommando"); private float duration; private float fireDuration; private string muzzleString; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireDuration = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "Muzzle"; hasFired = false; ((EntityState)this).PlayCrossfade("Gesture, Override", "Primary", "Primary.playbackRate", duration * 2.5f, 0.05f); Shoot(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!(((EntityState)this).fixedAge < duration) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Shoot() { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; bool isCrit = ((BaseState)this).RollCrit(); ((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil); if (Object.op_Implicit((Object)(object)muzzleEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } if (((EntityState)this).isAuthority) { _ = damageCoefficient; _ = ((BaseState)this).damageStat; Ray aimRay = ((BaseState)this).GetAimRay(); new BulletAttack { aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageType = DamageTypeCombo.op_Implicit((DamageType)0), damageColorIndex = (DamageColorIndex)0, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, falloffModel = (FalloffModel)0, force = force, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.35f, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = tracerPrefab, hitEffectPrefab = hitPrefab }.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace EntityStates.Runshroom { public class PlaceSpores : BaseSkillState { public static GameObject projectilePrefab; public static GameObject effectPrefab; private static float blastDamageCoefficient = 0.6f; private static float procCoefficient = 1f; private static float blastRadius = 6.5f; private static float force = 14f; private static float fireTime = 0.75f; private static string enterSoundString = "Play_runshroom_charge"; private bool hasFired; private bool hasWaited; private static float baseDuration = 1.3f; private static float damageCoefficient = 1.5f; public static GameObject chargeEffectPrefab; private float duration; private Animator animator; private ChildLocator childLocator; private GameObject chargeEffectInstance; public override void OnEnter() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; childLocator = ((EntityState)this).GetModelChildLocator(); hasFired = false; hasWaited = false; animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)chargeEffectPrefab)) { chargeEffectInstance = Object.Instantiate(chargeEffectPrefab, ((EntityState)this).characterBody.corePosition, Quaternion.identity); } ((EntityState)this).PlayCrossfade("Body", "Attack", "Primary.playbackRate", duration, 0.1f); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime * duration && !hasFired) { hasFired = true; FireProjectile(); } if (((EntityState)this).fixedAge >= duration && hasFired) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void Update() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { chargeEffectInstance.transform.position = ((EntityState)this).characterBody.corePosition; } } public void FireProjectile() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } EffectManager.SimpleEffect(effectPrefab, ((EntityState)this).characterBody.corePosition, Quaternion.identity, false); if (((EntityState)this).isAuthority) { bool flag = ((BaseState)this).RollCrit(); new BlastAttack { position = ((EntityState)this).characterBody.corePosition, baseDamage = ((EntityState)this).characterBody.damage * blastDamageCoefficient, baseForce = force, radius = blastRadius, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = flag, procCoefficient = procCoefficient, falloffModel = (FalloffModel)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), damageType = { damageSource = (DamageSource)1 }, attackerFiltering = (AttackerFiltering)2 }.Fire(); float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).GetAimRay(); DamageTypeCombo val = DamageTypeCombo.op_Implicit((DamageType)0); val.damageSource = (DamageSource)1; ProjectileManager.instance.FireProjectile(projectilePrefab, ((EntityState)this).characterBody.corePosition, Quaternion.identity, ((EntityState)this).gameObject, num, 0f, flag, (DamageColorIndex)0, (GameObject)null, (float)DamageTypeCombo.op_Implicit(val), (DamageTypeCombo?)null); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class RushroomDeath : GenericCharacterDeath { public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); Transform val = ((BaseState)this).FindModelChild("TrailEffect"); if (Object.op_Implicit((Object)(object)val)) { ((Component)val).gameObject.SetActive(false); } } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); } public override void OnExit() { ((GenericCharacterDeath)this).OnExit(); } } public class SpawnState : BaseState { public static GameObject burrowPrefab; private static float duration = 2f; private static string spawnSoundString = "Play_runshroom_spawn"; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlaySound(spawnSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Body", "Spawn", "Spawn.playbackRate", duration, 0f); EffectManager.SimpleMuzzleFlash(burrowPrefab, ((EntityState)this).gameObject, "BurrowCenter", false); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } } namespace EntityStates.Railgunner { public class AssaultRifle : BaseSkillState { [SerializeField] public static float damageCoeff = 1.25f; [SerializeField] public static float procCoeff = 0.7f; public float baseDuration = 0.5f; private float duration; public GameObject hitEffectPrefab; public GameObject tracerEffectPrefab; public override void OnEnter() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((BaseState)this).AddRecoil(-0.6f, 0.6f, -0.6f, 0.6f); bool isCrit = ((BaseState)this).RollCrit(); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 1f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, bulletCount = 1u, procCoefficient = procCoeff, damage = ((EntityState)this).characterBody.damage * damageCoeff, force = 3f, falloffModel = (FalloffModel)1, tracerEffectPrefab = tracerEffectPrefab, hitEffectPrefab = hitEffectPrefab, isCrit = isCrit, HitEffectNormal = false, smartCollision = true, maxDistance = 300f }.Fire(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class PierceRifle : BaseSkillState { [SerializeField] public static float damageCoeff = 1f; [SerializeField] public static float procCoeff = 0.7f; public float baseDuration = 0.5f; private float duration; public GameObject hitEffectPrefab; public GameObject tracerEffectPrefab; public override void OnEnter() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_00fe: 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_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((BaseState)this).AddRecoil(-0.6f, 0.6f, -0.6f, 0.6f); bool isCrit = ((BaseState)this).RollCrit(); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, bulletCount = 1u, procCoefficient = procCoeff, damage = ((EntityState)this).characterBody.damage * damageCoeff, force = 3f, falloffModel = (FalloffModel)0, tracerEffectPrefab = tracerEffectPrefab, muzzleName = "MuzzleRight", hitEffectPrefab = hitEffectPrefab, isCrit = isCrit, HitEffectNormal = false, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, smartCollision = true, maxDistance = 600f }.Fire(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class RailgunnerRoll : BaseSkillState { public static float duration = 0.7f; public static float initialSpeedCoefficient = 5.5f; public static float finalSpeedCoefficient = 3f; public static string dodgeSoundString = "Play_commando_shift"; public static float dodgeFOV = DodgeState.dodgeFOV; private float rollSpeed; private Vector3 forwardDirection; private Animator animator; private Vector3 previousPosition; public override void OnEnter() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_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_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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_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_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Expected O, but got Unknown ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); forwardDirection = ((Vector3)(ref val)).normalized; } Vector3 val2 = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : forwardDirection); Vector3 val3 = Vector3.Cross(Vector3.up, val2); Vector3.Dot(forwardDirection, val2); Vector3.Dot(forwardDirection, val3); RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity.y = 0f; ((EntityState)this).characterMotor.velocity = forwardDirection * rollSpeed; } Vector3 val4 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val4; Util.PlaySound(dodgeSoundString, ((EntityState)this).gameObject); if (!((EntityState)this).isAuthority) { return; } EntityStateMachine val5 = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Reload"); if (Object.op_Implicit((Object)(object)val5)) { EntityState state = val5.state; Reloading val6 = (Reloading)(object)((state is Reloading) ? state : null); if (val6 != null && !val6.hasAttempted) { val5.SetNextState((EntityState)new BoostConfirm()); } } } private void RecalculateRollSpeed() { rollSpeed = ((BaseState)this).moveSpeedStat * Mathf.Lerp(initialSpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / duration); } public override void FixedUpdate() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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) ((EntityState)this).FixedUpdate(); RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.forward = forwardDirection; } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = Mathf.Lerp(dodgeFOV, 60f, ((EntityState)this).fixedAge / duration); } Vector3 val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && normalized != Vector3.zero) { Vector3 val2 = normalized * rollSpeed; float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f); val2 = forwardDirection * num; val2.y = 0f; ((EntityState)this).characterMotor.velocity = val2; } previousPosition = ((EntityState)this).transform.position; if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; ((EntityState)this).OnExit(); } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } } } namespace EntityStates.Pyro { public class FireFlamethrower : BaseState { private static float ticksPerSecond = 6f; private static float baseEntryDuration = 0.3f; private static float pressureDuration = 0.1f; private float baseTickRate; private float tickRate; private float stopwatch; private float flamethrowerStopwatch; private float entryDuration; private bool hasBegunFlamethrower; private static float heatPerSecond = 6.25f; private static float procCoefficientPerSecond = 5f; private static float damageCoefficientPerSecond = 2.7f; private static float spreadBloonPerSecond = 1f; private static float igniteChance = 50f; private static float force = 250f; private static string muzzleString = "Muzzle"; private static string smokeMuzzleEffectString = "SmokeEffect"; public static GameObject flameEffectPrefab; public static GameObject beamEffectPrefab; public static GameObject projectilePrefab; private Transform flamethrowerTransform; private Transform beamTransform; private PyroController pc; private ChildLocator childLocator; private ParticleSystem flames; private ScaleParticleSystemDuration smokeMuzzleEffect; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.isSprinting = false; pc = ((EntityState)this).GetComponent(); stopwatch = 0f; hasBegunFlamethrower = false; entryDuration = baseEntryDuration / base.attackSpeedStat; baseTickRate = 1f / ticksPerSecond; tickRate = baseTickRate / base.attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(2f); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { childLocator = ((Component)modelTransform).GetComponent(); smokeMuzzleEffect = ((Component)childLocator.FindChild(smokeMuzzleEffectString)).GetComponent(); } Util.PlaySound("Play_pyro_primary_start", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)smokeMuzzleEffect)) { smokeMuzzleEffect.newDuration = entryDuration; smokeMuzzleEffect.UpdateDuration(); } ((EntityState)this).PlayCrossfade("Gesture, Override", "FirePrimary", 0.1f); if (!((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.bdPyroJet) && !((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.BuffWatchMetronome)) { ((EntityState)this).characterBody.isSprinting = false; } } public override void FixedUpdate() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).characterBody.isSprinting) { if ((!((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.bdPyroJet) || ((BaseState)this).isGrounded) && !((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.BuffWatchMetronome)) { ((EntityState)this).outer.SetNextStateToMain(); } else { ((EntityState)this).characterDirection.moveVector = ((EntityState)this).inputBank.aimDirection; } } stopwatch += Time.fixedDeltaTime; if ((stopwatch >= entryDuration || ((BaseState)this).HasBuff(SS2Content.Buffs.bdPyroPressure)) && !hasBegunFlamethrower) { BeginFlamethrower(); Util.PlaySound("Play_pyro_primary_loop", ((EntityState)this).gameObject); Fire(); } if (hasBegunFlamethrower) { ((EntityState)this).characterBody.AddSpreadBloom(spreadBloonPerSecond * Time.fixedDeltaTime); flamethrowerStopwatch += Time.fixedDeltaTime; int num = 0; while (flamethrowerStopwatch > tickRate && num <= 3) { num++; flamethrowerStopwatch -= tickRate; Fire(); } } if (!((EntityState)this).inputBank.skill1.down && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void BeginFlamethrower() { hasBegunFlamethrower = true; if (Object.op_Implicit((Object)(object)flameEffectPrefab)) { flamethrowerTransform = Object.Instantiate(flameEffectPrefab, childLocator.FindChild(muzzleString)).transform; } if (Object.op_Implicit((Object)(object)beamEffectPrefab)) { beamTransform = Object.Instantiate(beamEffectPrefab, childLocator.FindChild(muzzleString)).transform; } } public override void Update() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); Object.op_Implicit((Object)(object)flamethrowerTransform); if (Object.op_Implicit((Object)(object)beamTransform)) { ((Component)beamTransform).transform.forward = ((EntityState)this).inputBank.aimDirection; } } public override void OnExit() { ((EntityState)this).OnExit(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(SS2Content.Buffs.bdPyroPressure, pressureDuration); } Util.PlaySound("Stop_pryo_primary_loop", ((EntityState)this).gameObject); Util.PlaySound("Play_pyro_primary_end", ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.1f); if (Object.op_Implicit((Object)(object)flamethrowerTransform)) { EntityState.Destroy((Object)(object)((Component)flamethrowerTransform).gameObject); } if (Object.op_Implicit((Object)(object)beamTransform)) { EntityState.Destroy((Object)(object)((Component)beamTransform).gameObject); } } private void Fire() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: 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_0071: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.SetAimTimer(2f); Ray aimRay = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { DamageTypeCombo value = new DamageTypeCombo { damageSource = (DamageSource)1, damageTypeExtended = (DamageTypeExtended)32768 }; if (Object.op_Implicit((Object)(object)pc) && pc.isHighHeat && Util.CheckRoll(igniteChance, ((EntityState)this).characterBody.master)) { DamageAPI.AddModdedDamageType(ref value, SS2.Survivors.Pyro.PyroIgniteOnHit); } float num = damageCoefficientPerSecond * baseTickRate * base.damageStat; _ = procCoefficientPerSecond; _ = baseTickRate; ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, force, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)value); if (Object.op_Implicit((Object)(object)pc)) { pc.AddHeat(heatPerSecond * baseTickRate); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public abstract class BaseHeatState : BaseState { protected PyroController pyroController; public override void OnEnter() { ((BaseState)this).OnEnter(); pyroController = ((EntityState)this).GetComponent(); } } public class LowHeat : BaseHeatState { private static string enterSoundString = "Play_item_void_bleedOnHit_explo"; public static GameObject effectPrefab; public override void OnEnter() { base.OnEnter(); pyroController.SetHighHeat(newHighHeat: false); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && pyroController.heat >= pyroController.highHeat) { ((EntityState)this).outer.SetNextState((EntityState)(object)new HighHeat()); } } } public class HighHeat : BaseHeatState { private static string enterSoundString = "Play_voidman_m2_shoot_fullCharge"; public static GameObject effectPrefab; public static Material flashMaterial; public static Material overlayMaterial; private Transform modelTransform; private TemporaryOverlayInstance overlayInstance; public override void OnEnter() { base.OnEnter(); pyroController.SetHighHeat(newHighHeat: true); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 0.4f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = flashMaterial; obj.AddToCharacterModel(((Component)modelTransform).GetComponent()); overlayInstance = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); overlayInstance.duration = 0.4f; overlayInstance.animateShaderAlpha = true; overlayInstance.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); overlayInstance.destroyComponentOnEnd = true; overlayInstance.originalMaterial = overlayMaterial; overlayInstance.stopwatch = 0f; overlayInstance.AddToCharacterModel(((Component)modelTransform).GetComponent()); } } public override void Update() { ((EntityState)this).Update(); if (overlayInstance != null) { overlayInstance.stopwatch = 0f; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && pyroController.heat < pyroController.highHeat) { ((EntityState)this).outer.SetNextState((EntityState)(object)new LowHeat()); } } } public class PyroFireball : BaseSkillState { public float charge; public static float maxEmission; public static float minEmission; public static float damageCoefficient; public static float procCoefficient; public static float maxRecoil; public static float minRecoil; public static float projectileSpeed; public static float baseDuration; public static GameObject projectilePrefab; public static GameObject muzzleFlashPrefab; private static string muzzleString = "Muzzle"; private float recoil; private float duration; private float fireDuration; private bool hasFired; private string skinNameToken; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); fireDuration = 0.1f * duration; ((EntityState)this).PlayCrossfade("Gesture, Override", "FireSpecial", 0.1f); } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireBeam() { //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_00a0: 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) if (!hasFired) { hasFired = true; EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, muzzleString, false); if (((EntityState)this).isAuthority) { float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed, (DamageTypeCombo?)null); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireBeam(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class PyroHoverpack : BaseState { public static float snap = 0.15f; public static float heatPerTick; public static float baseDurationBetweenTicks; private static float hoverHeight = 10f; private static float hoverDescendVelocity = -2f; private static float hoverDescendAcceleration = 40f; private static float hoverAscendTargetVelocity = 0f; private static float hoverAscendMaxVelocity = 12f; private static float hoverAscendAcceleration = 70f; private static float startForwardVelocity = 5.5f; private static float endForwardVelocity = 1f; private static float forwardAcceleration = 51f; private static float forwardVelocityDuration = 1.5f; private static float jetBuffDuration = 1f; public static float upwardVelocity; private float heatTimer; private PyroController heat; private ParticleSystem hoverL; private ParticleSystem hoverR; private Animator animator; public override void OnEnter() { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); heat = ((EntityState)this).GetComponent(); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if ((Object)(object)modelChildLocator != (Object)null) { ParticleSystem val = default(ParticleSystem); ((Component)modelChildLocator.FindChild("HoverLParticles")).TryGetComponent(ref val); hoverL = val; ParticleSystem val2 = default(ParticleSystem); ((Component)modelChildLocator.FindChild("HoverRParticles")).TryGetComponent(ref val2); hoverR = val2; } if ((Object)(object)hoverL != (Object)null && (Object)(object)hoverR != (Object)null) { hoverL.Play(); hoverR.Play(); } animator = ((EntityState)this).GetModelAnimator(); if ((Object)(object)animator != (Object)null) { animator.SetBool("isHovering", true); ((EntityState)this).PlayCrossfade("Body", "HoverIdle", 0.1f); } ((EntityState)this).characterBody.isSprinting = true; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 0x20); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(SS2Content.Buffs.bdPyroJet); } } public override void FixedUpdate() { //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_006f: 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_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_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { heatTimer += ((EntityState)this).GetDeltaTime(); if (heatTimer >= baseDurationBetweenTicks) { heatTimer -= heatTimer; heat.AddHeat(0f - heatPerTick); } } RaycastHit val = default(RaycastHit); bool num = Physics.Raycast(((EntityState)this).characterBody.footPosition, Vector3.down, ref val, hoverHeight * 3f, LayerMask.op_Implicit(CommonMasks.bullet), (QueryTriggerInteraction)1); float num2 = -1f; if (num) { num2 = hoverHeight - ((RaycastHit)(ref val)).distance; } if (Mathf.Abs(num2) < snap) { num2 = 0f; } if (num2 < 0f) { if (((EntityState)this).characterMotor.velocity.y < 0f) { ((EntityState)this).characterMotor.velocity.y = Mathf.MoveTowards(((EntityState)this).characterMotor.velocity.y, hoverDescendVelocity, hoverDescendAcceleration * Time.fixedDeltaTime); } } else { float num3 = Mathf.Lerp(hoverAscendTargetVelocity, hoverAscendMaxVelocity, num2 / hoverHeight); ((EntityState)this).characterMotor.velocity.y = Mathf.MoveTowards(((EntityState)this).characterMotor.velocity.y, num3, hoverAscendAcceleration * Time.fixedDeltaTime); } if (((EntityState)this).fixedAge < forwardVelocityDuration) { float num4 = ((EntityState)this).fixedAge / forwardVelocityDuration; float num5 = Mathf.Lerp(startForwardVelocity, endForwardVelocity, num4) * base.moveSpeedStat; Vector3 val2 = ((EntityState)this).inputBank.moveVector * num5; ((EntityState)this).characterMotor.velocity.x = Mathf.MoveTowards(((EntityState)this).characterMotor.velocity.x, val2.x, forwardAcceleration * Time.fixedDeltaTime); ((EntityState)this).characterMotor.velocity.z = Mathf.MoveTowards(((EntityState)this).characterMotor.velocity.z, val2.z, forwardAcceleration * Time.fixedDeltaTime); } if (((EntityState)this).isAuthority && (!((EntityState)this).inputBank.skill3.down || heat.heat <= 0f)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -33); if ((Object)(object)animator != (Object)null) { animator.SetBool("isHovering", false); } if ((Object)(object)hoverL != (Object)null && (Object)(object)hoverR != (Object)null) { hoverL.Stop(); hoverR.Stop(); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(SS2Content.Buffs.bdPyroJet); ((EntityState)this).characterBody.AddTimedBuff(SS2Content.Buffs.bdPyroJet, jetBuffDuration); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class PyroLaunch : BaseSkillState { public static float baseMaxDuration; private float maxDuration; private PyroController pyroController; private static float minDuration = 0.3f; private static float heatInterval = 0.2f; public static float walkSpeedCoefficient; private bool hasLaunched; private bool hasMax; private static float heatPerSecond = 10f; public static float launchHeat; private ParticleSystem leftExhaust; private ParticleSystem rightExhaust; public static GameObject fullChargePrefab; public static float shorthopVelocity; private float heatTimer; private float charge; public override void OnEnter() { ((BaseState)this).OnEnter(); pyroController = ((EntityState)this).GetComponent(); if ((Object)(object)pyroController == (Object)null) { ((EntityState)this).outer.SetNextStateToMain(); SS2Log.Error("PyroLaunch.OnEnter : Failed to find PyroController on body! Is this a Pyro?", 47, "OnEnter"); } maxDuration = baseMaxDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedCoefficient; ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if ((Object)(object)modelChildLocator != (Object)null) { ParticleSystem val = default(ParticleSystem); if (((Component)modelChildLocator.FindChild("ExhaustLParticles")).TryGetComponent(ref val)) { leftExhaust = val; } ParticleSystem val2 = default(ParticleSystem); if (((Component)modelChildLocator.FindChild("ExhaustRParticles")).TryGetComponent(ref val2)) { rightExhaust = val2; } } if (((EntityState)this).isAuthority && !((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, shorthopVelocity); } ((EntityState)this).PlayCrossfade("Gesture, Override", "StartLaunch", 0.1f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(1f); if (!((EntityState)this).isAuthority) { return; } if (!hasLaunched && pyroController.heat > 0f) { charge += ((EntityState)this).GetDeltaTime() / maxDuration; charge = Mathf.Min(charge, 1f); if (charge == 1f && !hasMax) { MaxCharge(); } if (!hasMax) { heatTimer += ((EntityState)this).GetDeltaTime(); if (heatTimer >= heatInterval) { heatTimer -= heatInterval; pyroController.AddHeat((0f - heatPerSecond) * heatInterval); } } } if (((EntityState)this).fixedAge >= minDuration && (!((EntityState)this).inputBank.skill3.down || pyroController.heat <= 0f)) { LaunchBlast(); } } public void MaxCharge() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) hasMax = true; ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); Transform val = default(Transform); if ((Object)(object)modelChildLocator != (Object)null && modelChildLocator.TryFindChild("JetpackBase", ref val)) { EffectManager.SimpleEffect(fullChargePrefab, val.position, val.rotation, false); } } public void LaunchBlast() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) if (hasLaunched) { return; } hasLaunched = true; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; _ = ((EntityState)this).inputBank.moveVector; if (((EntityState)this).isAuthority) { pyroController.AddHeat(Mathf.Max(new float[1] { 0f - launchHeat })); EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Jetpack"); if ((Object)(object)val != (Object)null) { PyroLiftoff pyroLiftoff = new PyroLiftoff(); pyroLiftoff.charge = charge; val.SetNextState((EntityState)(object)pyroLiftoff); ((EntityState)this).outer.SetNextStateToMain(); } } ((EntityState)this).characterDirection.moveVector = direction; } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; ((EntityState)this).PlayCrossfade("Gesture, Override", "Launch", 0.1f); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class PyroLiftoff : BaseState { private static float blastRadius = 10f; private static float damageCoefficient = 3.5f; private static float procCoefficient = 1f; private static float force = 400f; private static float minChargeUpwardVelocity = 20f; private static float maxChargeUpwardVelocity = 44f; private static float minChargeForwardVelocity = 3f; private static float maxChargeForwardVelocity = 1f; private static float duration = 0.3f; private static string enterSoundString = ""; public static GameObject launchEffectPrefab; private static float airControl = 0.15f; public float charge; public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void OnEnter() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_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_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Expected O, but got Unknown ((BaseState)this).OnEnter(); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; Vector3 moveVector = ((EntityState)this).inputBank.moveVector; Vector3 val = Vector3.up * Mathf.Lerp(minChargeUpwardVelocity, maxChargeUpwardVelocity, charge); Vector3 val2 = new Vector3(moveVector.x, 0f, moveVector.z); Vector3 val3 = ((Vector3)(ref val2)).normalized * ((EntityState)this).characterBody.moveSpeed * Mathf.Lerp(minChargeForwardVelocity, maxChargeForwardVelocity, charge); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.2f); ((EntityState)this).characterMotor.velocity = val + val3; ((EntityState)this).characterMotor.airControl = airControl; DamageTypeCombo damageType = new DamageTypeCombo { damageTypeExtended = (DamageTypeExtended)32768, damageSource = (DamageSource)4 }; new BlastAttack { radius = blastRadius, procCoefficient = procCoefficient, baseDamage = ((EntityState)this).characterBody.damage * damageCoefficient, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, teamIndex = ((EntityState)this).teamComponent.teamIndex, attacker = ((EntityState)this).gameObject, baseForce = force, position = ((EntityState)this).characterBody.footPosition, damageType = damageType, crit = ((BaseState)this).RollCrit() }.Fire(); if (Object.op_Implicit((Object)(object)launchEffectPrefab)) { EffectData val4 = new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = blastRadius, rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity) }; EffectManager.SpawnEffect(launchEffectPrefab, val4, true); } EntityStateMachine val5 = ((EntityState)this).FindSiblingStateMachine("Body"); if (Object.op_Implicit((Object)(object)val5)) { val5.SetInterruptState((EntityState)(object)new PyroJetpackMain(), (InterruptPriority)3); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class PyroJetpackMain : GenericCharacterMain { public static SkillDef overrideSkillDef; private static float airControlRestoration = 0.1f; private float originalAirControl; private ParticleSystem hoverL; private ParticleSystem hoverR; public override void OnEnter() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnEnter(); Transform obj = ((BaseState)this).FindModelChild("HoverLParticles"); hoverL = ((obj != null) ? ((Component)obj).GetComponent() : null); Transform obj2 = ((BaseState)this).FindModelChild("HoverRParticles"); hoverR = ((obj2 != null) ? ((Component)obj2).GetComponent() : null); originalAirControl = BodyCatalog.GetBodyPrefab(((EntityState)this).characterBody.bodyIndex).GetComponent().airControl; ((EntityState)this).skillLocator.utility.SetSkillOverride((object)this, overrideSkillDef, (SkillOverridePriority)4); } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); if (Object.op_Implicit((Object)(object)hoverL)) { hoverL.Stop(); } if (Object.op_Implicit((Object)(object)hoverR)) { hoverR.Stop(); } ((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)this, overrideSkillDef, (SkillOverridePriority)4); } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); if (((EntityState)this).isAuthority) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.airControl += Time.fixedDeltaTime * airControlRestoration; ((EntityState)this).characterMotor.airControl = Mathf.Clamp(((EntityState)this).characterMotor.airControl, 0f, originalAirControl); } if (((EntityState)this).isAuthority && ((BaseState)this).isGrounded && ((EntityState)this).fixedAge >= 0.1f) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class SuppressiveFire : BaseSkillState { private static float baseFireInterval = 0.07f; public static float baseEntryDuration; public static float pressureDuration; private static float minProjectileSpeed = 30f; private static float maxProjectileSpeed = 120f; private static float durationForMaxSpeed = 0.5f; private float fireInterval; private float stopwatch; private float heatStopwatch; private float flamethrowerStopwatch; private float entryDuration; private bool hasBegunFlamethrower; private static float heatCostPerSecond = 20f; public static float tickProcCoefficient; private static float damageCoefficientPerSecond = 4.51f; public static float recoilForce; public static float force; public static float radius; public static float recoil; private static float spreadBloomPerSecond = 1f; public static string muzzleString; public static GameObject projectilePrefab; public static GameObject igniteProjectilePrefab; public static GameObject flameEffectPrefab; public static GameObject crosshairPrefab; private static string startFireSoundLoopString = "Play_pyro_primary_loop"; private static string stopFireSoundLoopString = "Stop_pyro_primary_loop"; private static string exitSoundString = "Play_pyro_primary_end"; private GameObject effectInstance; private PyroController pc; private ChildLocator childLocator; private static float turnSpeed = 180f; private AimAnimator aimAnimator; private DirectionOverrideRequest animatorDirectionOverrideRequest; private Vector3 currentAimVector; private static float camEntryDuration = 0.2f; private static float camExitDuration = 0.4f; private static float cameraPivotVerticalOffset = 1.37f; private static Vector3 cameraPos = new Vector3(1f, -0.5f, -6.9f); private OverrideRequest crosshairOverrideRequest; public CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData chargeCameraParams = new CharacterCameraParamsData { pivotVerticalOffset = BlendableFloat.op_Implicit(cameraPivotVerticalOffset), idealLocalCameraPos = BlendableVector3.op_Implicit(cameraPos) }; public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void OnEnter() { //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0155: 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_0160: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.isSprinting = false; pc = ((EntityState)this).GetComponent(); pc.inNapalm = true; hasBegunFlamethrower = false; entryDuration = baseEntryDuration / ((BaseState)this).attackSpeedStat; fireInterval = baseFireInterval / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayCrossfade("Gesture, Override", "FireSecondary", 0.1f); ((BaseState)this).StartAimMode(2f, false); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { childLocator = ((Component)modelTransform).GetComponent(); } if (!((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.bdPyroJet) && !((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.BuffWatchMetronome)) { ((EntityState)this).characterBody.isSprinting = false; } aimAnimator = ((EntityState)this).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { animatorDirectionOverrideRequest = aimAnimator.RequestDirectionOverride((Func)GetAimDirection); } currentAimVector = ((EntityState)this).inputBank.aimDirection; if (Object.op_Implicit((Object)(object)crosshairPrefab)) { crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, crosshairPrefab, (OverridePriority)1); } CameraParamsOverrideRequest val = new CameraParamsOverrideRequest { cameraParamsData = chargeCameraParams, priority = 0f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val, camEntryDuration); } private Vector3 GetAimDirection() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return currentAimVector; } public override void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_0051: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); currentAimVector = Vector3.RotateTowards(currentAimVector, ((EntityState)this).inputBank.aimDirection, MathF.PI / 180f * turnSpeed * Time.deltaTime, 0f); if (Object.op_Implicit((Object)(object)effectInstance)) { effectInstance.transform.forward = currentAimVector; } } public override void FixedUpdate() { //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).characterBody.isSprinting) { if ((!((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.bdPyroJet) || ((BaseState)this).isGrounded) && !((EntityState)this).characterBody.HasBuff(SS2Content.Buffs.BuffWatchMetronome)) { ((EntityState)this).outer.SetNextStateToMain(); } else { ((EntityState)this).characterDirection.moveVector = ((EntityState)this).inputBank.aimDirection; } } stopwatch += Time.fixedDeltaTime; ((EntityState)this).characterBody.SetAimTimer(2f); if ((stopwatch >= entryDuration || ((BaseState)this).HasBuff(SS2Content.Buffs.bdPyroPressure)) && !hasBegunFlamethrower) { hasBegunFlamethrower = true; Util.PlaySound(startFireSoundLoopString, ((EntityState)this).gameObject); effectInstance = Object.Instantiate(flameEffectPrefab, childLocator.FindChild(muzzleString)); effectInstance.transform.forward = ((EntityState)this).inputBank.aimDirection; } if (hasBegunFlamethrower) { heatStopwatch += Time.fixedDeltaTime; flamethrowerStopwatch -= Time.fixedDeltaTime; fireInterval = baseFireInterval / ((BaseState)this).attackSpeedStat; if (flamethrowerStopwatch <= 0f) { flamethrowerStopwatch += fireInterval; Fire(muzzleString); } if (heatStopwatch > baseFireInterval && (Object)(object)pc != (Object)null) { if (((EntityState)this).isAuthority) { pc.AddHeat((0f - heatCostPerSecond) * baseFireInterval); } heatStopwatch -= baseFireInterval; } } if (((EntityState)this).isAuthority && (!((EntityState)this).inputBank.skill2.down || pc.heat <= 0f)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_005b: 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_00c7: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.1f); pc.inNapalm = false; Util.PlaySound(stopFireSoundLoopString, ((EntityState)this).gameObject); Util.PlaySound(exitSoundString, ((EntityState)this).gameObject); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(SS2Content.Buffs.bdPyroPressure.buffIndex, pressureDuration); } if ((Object)(object)effectInstance != (Object)null) { EntityState.Destroy((Object)(object)effectInstance); } if (animatorDirectionOverrideRequest != null) { animatorDirectionOverrideRequest.Dispose(); } if (crosshairOverrideRequest != null) { crosshairOverrideRequest.Dispose(); } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, camExitDuration); } } private float GetCurrentProjectileSpeed() { float num = stopwatch / durationForMaxSpeed; return Mathf.Lerp(minProjectileSpeed, maxProjectileSpeed, num); } private void Fire(string muzzleString) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((Ray)(ref aimRay)).direction = currentAimVector; GameObject val = projectilePrefab; if (pc.isHighHeat) { val = igniteProjectilePrefab; } float num = damageCoefficientPerSecond * baseFireInterval * ((BaseState)this).damageStat; DamageColorIndex val2 = (DamageColorIndex)0; DamageTypeCombo value = new DamageTypeCombo { damageType = (DamageType)0 }; DamageAPI.AddModdedDamageType(ref value, SS2.Survivors.Pyro.PyroIgniteOnHit); value.damageSource = (DamageSource)2; ProjectileManager.instance.FireProjectile(val, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, force, ((BaseState)this).RollCrit(), val2, (GameObject)null, GetCurrentProjectileSpeed(), (DamageTypeCombo?)value); } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomPerSecond * baseFireInterval); ((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil); } } } namespace EntityStates.RemunerationOption { public class Opening : EntityState { public static float duration = 1f; public static int maxItemDropCount = 5; private ChestBehavior chestBehavior; private float itemDropCount; private float timeBetweenDrops; private float itemDropAge; public override void OnEnter() { ((EntityState)this).OnEnter(); ((EntityState)this).PlayAnimation("Body", "Opening"); timeBetweenDrops = duration / (float)maxItemDropCount; chestBehavior = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)((EntityState)this).sfxLocator)) { Util.PlaySound(((EntityState)this).sfxLocator.openSound, ((EntityState)this).gameObject); } } public override void FixedUpdate() { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (NetworkServer.active) { itemDropAge += Time.fixedDeltaTime; if (itemDropCount < (float)maxItemDropCount && itemDropAge > timeBetweenDrops) { itemDropCount += 1f; itemDropAge -= timeBetweenDrops; chestBehavior.currentPickup = new UniquePickup(PickupCatalog.FindPickupIndex(MiscPickups.LunarCoin.miscPickupIndex)); chestBehavior.ItemDrop(); } if (((EntityState)this).fixedAge >= duration) { base.outer.SetNextState((EntityState)new Opened()); } } } } } namespace EntityStates.Pickups.Remuneration { public class OfferCoin : BaseState { public static float duration = 1.93f; public override void OnEnter() { ((BaseState)this).OnEnter(); Transform obj = ((EntityState)this).transform.Find("RemunerationPortal"); ((Component)obj).gameObject.SetActive(true); ((Component)obj).GetComponent().newDuration = duration; ((Component)obj.Find("Portal/Sphere")).GetComponent().timeMax = duration; Util.PlaySound("RemunerationSpawn2", ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Reward()); } } } public class Reward : BaseState { public static float dropletSpreadAngle = 30f; public static float dropletUpVelocity = 20f; public static float dropletForwardVelocity = 8f; private int itemsDropped; private int numItems = 3; private RemunerationShopBehavior shop; private Transform portalTransform; public static GameObject explosionPrefab = SS2Assets.LoadAsset("RemunerationExplosion", SS2Bundle.Items); public static float effectScale = 1f; public override void OnEnter() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown ((BaseState)this).OnEnter(); shop = ((EntityState)this).GetComponent(); if (NetworkServer.active) { ChildLocator component = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { portalTransform = component.FindChild("Portal"); EffectData val = new EffectData { origin = (Object.op_Implicit((Object)(object)portalTransform) ? portalTransform.position : ((EntityState)this).transform.position), rotation = Quaternion.identity, scale = effectScale }; EffectManager.SpawnEffect(explosionPrefab, val, true); } while (itemsDropped < numItems) { DropItem(); itemsDropped++; } } } private void DropItem() { //IL_0030: 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_0048: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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) float num = (0f - dropletSpreadAngle / 2f) * (float)(numItems - 1) + (float)itemsDropped * dropletSpreadAngle; Vector3 val = Quaternion.Euler(0f, num, 0f) * (Object.op_Implicit((Object)(object)portalTransform) ? portalTransform.forward : ((EntityState)this).transform.forward); Vector3 velocity = Vector3.up * dropletUpVelocity + val * dropletForwardVelocity; shop.SpawnDroplet(Object.op_Implicit((Object)(object)portalTransform) ? portalTransform.position : ((EntityState)this).transform.position, velocity); } } public class Wait : BaseState { public static float duration = 1.75f; public override void OnEnter() { ((BaseState)this).OnEnter(); ((Component)((EntityState)this).transform.Find("RemunerationPortal")).gameObject.SetActive(false); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new OfferCoin()); } } } } namespace EntityStates.Pickups.Extinction { public class ExtinctionBaseState : EntityState { private GenericOwnership genericOwnership; private SimpleLeash simpleLeash; private RadialForce radial; private MemoizedGetComponent bodyGetComponent; private protected ExtinctionController extinctionController { get; set; } protected CharacterBody ownerBody { get { GenericOwnership val = genericOwnership; return bodyGetComponent.Get(((Object)(object)val != (Object)null) ? val.ownerObject : null); } } protected virtual bool shouldFollow => true; public override void OnEnter() { ((EntityState)this).OnEnter(); genericOwnership = ((EntityState)this).GetComponent(); simpleLeash = ((EntityState)this).GetComponent(); extinctionController = ((EntityState)this).GetComponent(); radial = ((EntityState)this).GetComponent(); } public override void Update() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)ownerBody) && shouldFollow) { simpleLeash.leashOrigin = ownerBody.corePosition; } } protected float GetScale() { float num = 1f; if (Object.op_Implicit((Object)(object)ownerBody) && Object.op_Implicit((Object)(object)ownerBody.inventory)) { num *= (float)ownerBody.inventory.GetItemCount(SS2Content.Items.RelicOfExtinction); } return num; } } internal class ExtinctionDieStage : ExtinctionBaseState { public static float baseDuration = 10f; public FixedTimeStamp readyTime { get; private set; } protected override bool shouldFollow => false; public override void OnEnter() { //IL_000f: 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) base.OnEnter(); if (((EntityState)this).isAuthority) { readyTime = FixedTimeStamp.now + baseDuration; } } public override void FixedUpdate() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: 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) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)base.ownerBody)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExtinctionIdleState()); } if (((EntityState)this).isAuthority && !Object.op_Implicit((Object)(object)base.ownerBody) && FixedTimeStamp.now >= readyTime) { BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject }; val.teamIndex = TeamComponent.GetObjectTeam(val.attacker); val.position = ((EntityState)this).characterBody.corePosition; val.procCoefficient = 1f; val.radius = GetScale() * 2f; val.baseForce = GetScale(); val.bonusForce = Vector3.up * 20f; val.baseDamage = base.ownerBody.baseDamage * 5f; val.falloffModel = (FalloffModel)1; val.damageColorIndex = (DamageColorIndex)3; val.attackerFiltering = (AttackerFiltering)0; val.Fire(); Object.Destroy((Object)(object)((EntityState)this).gameObject); } } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); NetworkExtensions.Write(writer, readyTime); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnDeserialize(reader); readyTime = NetworkExtensions.ReadFixedTimeStamp(reader); } } internal class ExtinctionEnterState : ExtinctionBaseState { public static float baseDuration = 10f; public FixedTimeStamp readyTime { get; private set; } public override void OnEnter() { //IL_000f: 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) base.OnEnter(); if (((EntityState)this).isAuthority) { readyTime = FixedTimeStamp.now + baseDuration; } base.extinctionController.showExtinctionDisplay = false; } public override void FixedUpdate() { //IL_0033: 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) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && (Object.op_Implicit((Object)(object)base.ownerBody) || base.ownerBody.inventory.GetItemCount(SS2Content.Items.RelicOfExtinction) < 1) && FixedTimeStamp.now >= readyTime) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExtinctionIdleState()); } } public override void OnExit() { ((EntityState)this).OnExit(); base.extinctionController.showExtinctionDisplay = true; } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); NetworkExtensions.Write(writer, readyTime); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnDeserialize(reader); readyTime = NetworkExtensions.ReadFixedTimeStamp(reader); } } internal class ExtinctionIdleState : ExtinctionBaseState { private OverlapAttack attack; private float fireStopwatch; private float resetStopwatch; [Tooltip("The frequency (1/time) at which the overlap attack is tested. Higher values are more accurate but more expensive.")] public float fireFrequency = 1f; [Tooltip("The frequency (1/time) at which the overlap attack is reset. Higher values means more frequent ticks of damage.")] public float resetFrequency = 4f; [Tooltip("Should the attacks also damage the owner.")] public AttackerFiltering attackerFiltering = (AttackerFiltering)1; public override void OnEnter() { base.OnEnter(); ResetOverlap(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { resetStopwatch += Time.fixedDeltaTime; fireStopwatch += Time.fixedDeltaTime; if (resetStopwatch >= 1f / resetFrequency) { ResetOverlap(); resetStopwatch -= 1f / resetFrequency; } if (fireStopwatch >= 1f / fireFrequency) { attack.Fire((List)null); fireStopwatch -= 1f / fireFrequency; } } if (((EntityState)this).isAuthority && (!Object.op_Implicit((Object)(object)base.ownerBody) || base.ownerBody.inventory.GetItemCount(SS2Content.Items.RelicOfExtinction) < 1)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ExtinctionDieStage()); } } private void ResetOverlap() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) attack = new OverlapAttack(); attack.procCoefficient = 0f; attack.attacker = ((Component)base.ownerBody).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = base.ownerBody.teamComponent.teamIndex; attack.attackerFiltering = attackerFiltering; attack.damage = base.ownerBody.baseDamage * 2.5f; attack.isCrit = false; attack.damageColorIndex = (DamageColorIndex)7; attack.damageType = DamageTypeCombo.op_Implicit((DamageType)131072); attack.hitBoxGroup = ((EntityState)this).GetComponent(); } } } namespace EntityStates.Nuke { public abstract class BaseNukeUtilityState : GenericCharacterMain, SS2.Survivors.Nuke.IChargedState { [Tooltip("The min launch speed this utility has, final launch speed is derived from the charge value given by its corresponding charging state")] [SerializeField] public float minLaunchSpeed; [Tooltip("The max launch speed this utility has, final launch speed is derived from the charge value given by its corresponding charging state")] [SerializeField] public float maxLaunchSpeed; [Tooltip("The base duration of this state")] [SerializeField] public float baseDuration; protected float _launchSpeed; protected Vector3 _velocity; private float _duration; public float charge { get; set; } public override void OnEnter() { //IL_003e: 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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnEnter(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); Vector3 velocity = ((EntityState)this).characterMotor.velocity; Ray aimRay = ((BaseState)this).GetAimRay(); _velocity = CalculateLaunchVelocity(velocity, ((Ray)(ref aimRay)).direction, charge, minLaunchSpeed, maxLaunchSpeed); ((EntityState)this).characterMotor.velocity = _velocity; ((EntityState)this).characterDirection.forward = ((Vector3)(ref _velocity)).normalized; _launchSpeed = ((Vector3)(ref _velocity)).magnitude; _duration = baseDuration; } } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; } TryExitState(); } protected virtual void TryExitState() { if (((EntityState)this).fixedAge > _duration) { ((EntityState)this).outer.SetNextStateToMain(); } } protected virtual Vector3 CalculateLaunchVelocity(Vector3 currentVelocity, Vector3 aimDirection, float charge, float minLaunchSpeed, float maxLaunchSpeed) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) currentVelocity = ((Vector3.Dot(currentVelocity, aimDirection) < 0f) ? Vector3.zero : Vector3.Project(currentVelocity, aimDirection)); return currentVelocity + aimDirection * Mathf.Lerp(minLaunchSpeed, maxLaunchSpeed, charge); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class ApplySurge : GenericCharacterMain { public static float baseDuration; private float _duration; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); _duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("UpperBody, Override", "ApplySurge", "applySurge.playbackRate", _duration, 0f); ((EntityState)this).characterBody.AddTimedBuff(SS2Content.Buffs.bdNukeSpecial, 10f); } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); if (((EntityState)this).fixedAge > _duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public abstract class BaseNukeChargeState : BaseSkillState, SS2.Survivors.Nuke.IChargeableState { [SerializeField] [Tooltip("The starting chargeCoefficient, this is also the base damage coefficient of this skill.")] protected float _startingChargeCoefficient; [SerializeField] [Tooltip("The amount of charge added to the coefficient per second, this value is multiplied by attack speed")] public float _baseChargeGain; [SerializeField] [Tooltip("The coefficient at which the skill is considered overcharged.")] public float _chargeCoefficientSoftCap; [SerializeField] [Tooltip("The coefficient at which the skill is fired automatically")] public float _chargeCoefficientHardCap; private float _chargeGain; public NukeSelfDamageController selfDamageController { get; private set; } public float currentCharge { get; protected set; } float SS2.Survivors.Nuke.IChargeableState.startingChargeCoefficient => _startingChargeCoefficient; float SS2.Survivors.Nuke.IChargeableState.chargeCoefficientSoftCap => _chargeCoefficientSoftCap; float SS2.Survivors.Nuke.IChargeableState.chargeCoefficientHardCap => _chargeCoefficientHardCap; public override void OnEnter() { ((BaseState)this).OnEnter(); currentCharge = _startingChargeCoefficient; _chargeGain = _baseChargeGain * ((BaseState)this).attackSpeedStat; NukeSelfDamageController nukeSelfDamageController = default(NukeSelfDamageController); if (((EntityState)this).gameObject.TryGetComponent(ref nukeSelfDamageController)) { selfDamageController = nukeSelfDamageController; if (selfDamageController.isImmune) { _chargeGain *= 2f; } selfDamageController.SetDefaults(this); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((BaseSkillState)this).IsKeyDownAuthority()) { currentCharge += _chargeGain * Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)selfDamageController)) { selfDamageController.charge = currentCharge; } if (currentCharge > _chargeCoefficientHardCap) { currentCharge = _chargeCoefficientHardCap; Fire(); } } else { Fire(); } } private void Fire() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown SS2.Survivors.Nuke.IChargedState fireState = GetFireState(); fireState.charge = currentCharge; if (Object.op_Implicit((Object)(object)selfDamageController)) { selfDamageController.SetDefaults(null); } if (!(fireState is EntityState)) { SS2Log.Error("Invalid IChargedState provided by " + ((object)this).GetType().Name + "! The class implementing IChargedState should inherit from EntityState!", 99, "Fire"); ((EntityState)this).outer.SetNextStateToMain(); } ((EntityState)this).outer.SetNextState((EntityState)fireState); } protected abstract SS2.Survivors.Nuke.IChargedState GetFireState(); } public abstract class BaseNukeFireState : BaseState, SS2.Survivors.Nuke.IChargedState { public float charge { get; set; } public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.AddSpreadBloom(charge); } } public class ChargeImpulse : BaseNukeChargeState { protected override SS2.Survivors.Nuke.IChargedState GetFireState() { return new FireFissionImpulse(); } } public class ChargeLaunch : BaseNukeChargeState { protected override SS2.Survivors.Nuke.IChargedState GetFireState() { return new FireFusionLaunch(); } } public class FireFissionImpulse : BaseNukeUtilityState { } public class FireFusionLaunch : BaseNukeUtilityState { public static float awayForceMagnitude; public static float upwardForceMagnitude; public static float hitPauseDuration; public static float recoilAmplitude; private float _hitPauseTimer; private Vector3 _idealDirection; private OverlapAttack _attack; private bool _inHitPause; private List _victimsStruck = new List(); private int _origLayer; public override void OnEnter() { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown base.OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { _origLayer = ((Component)((EntityState)this).characterMotor.capsuleCollider).gameObject.layer; ((Component)((EntityState)this).characterMotor.capsuleCollider).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); } ((EntityState)this).characterBody.AddSpreadBloom(base.charge); HitBoxGroup hitBoxGroup = null; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { hitBoxGroup = ((Component)modelTransform).GetComponent(); } _attack = new OverlapAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = ((BaseState)this).GetTeam(), damage = base.charge * ((BaseState)this).damageStat, forceVector = Vector3.up * upwardForceMagnitude, pushAwayForce = awayForceMagnitude, hitBoxGroup = hitBoxGroup, isCrit = ((BaseState)this).RollCrit() }; } public override void FixedUpdate() { base.FixedUpdate(); if (!((EntityState)this).isAuthority) { return; } if (!_inHitPause) { if (_attack.Fire(_victimsStruck)) { _inHitPause = true; _hitPauseTimer = hitPauseDuration; ((BaseState)this).AddRecoil(-0.5f * recoilAmplitude, -0.5f * recoilAmplitude, -0.5f * recoilAmplitude, 0.5f * recoilAmplitude); } } else { _hitPauseTimer -= Time.fixedDeltaTime; if (_hitPauseTimer < 0f) { _inHitPause = false; } } } public override void OnExit() { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((Component)((EntityState)this).characterMotor.capsuleCollider).gameObject.layer = _origLayer; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); } ((GenericCharacterMain)this).OnExit(); } } } namespace EntityStates.Nuke.Weapon { public class ChargeFart : BaseNukeChargeState { [Tooltip("The threshold for wether the attack should go into the cratering version or regular version")] public static float lookThreshold; private Ray aimRay; protected override SS2.Survivors.Nuke.IChargedState GetFireState() { //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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; if (((Vector3)(ref direction)).normalized.y <= lookThreshold && !((EntityState)this).characterMotor.isGrounded) { return new FireCraterFart(); } return new FireFart(); } } public class ChargeFire : BaseNukeChargeState { protected override SS2.Survivors.Nuke.IChargedState GetFireState() { return new FireRadonFire(); } } public class ChargeSludge : BaseNukeChargeState, IStepSetter { public static GameObject chargePrefab; public static string leftMuzzleChildName; public static string rightMuzzleChildName; private static int leftChargeHash = Animator.StringToHash("IrradiateChargeL"); private static int rightChargeHash = Animator.StringToHash("IrradiateChargeR"); private static int irradiatePlaybackHash = Animator.StringToHash("irradiate.playbackRate"); private string _chosenMuzzle; private int _chosenAnimationHash; private int _step; private Transform muzzleTransform; private GameObject chargePrefabInstance; public override void OnEnter() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { muzzleTransform = modelChildLocator.FindChild(_chosenMuzzle); } if (Object.op_Implicit((Object)(object)muzzleTransform) && Object.op_Implicit((Object)(object)chargePrefab)) { chargePrefabInstance = Object.Instantiate(chargePrefab, muzzleTransform); chargePrefabInstance.transform.SetPositionAndRotation(muzzleTransform.position, muzzleTransform.rotation); } ((BaseState)this).StartAimMode(2f, false); ((EntityState)this).PlayAnimation("UpperBody, Override", _chosenAnimationHash, irradiatePlaybackHash, ((BaseState)this).attackSpeedStat); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)chargePrefabInstance)) { EntityState.Destroy((Object)(object)chargePrefabInstance); } } protected override SS2.Survivors.Nuke.IChargedState GetFireState() { return new FireSludge { chosenMuzzleString = _chosenMuzzle, muzzleTransform = muzzleTransform, stepIndex = _step }; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public void SetStep(int i) { _step = i; _chosenMuzzle = ((i == 0) ? leftMuzzleChildName : rightMuzzleChildName); _chosenAnimationHash = ((i == 0) ? leftChargeHash : rightChargeHash); } } public class FireCraterFart : BaseNukeFireState { public static SerializableDamageColor damageColor; public static float extraDamageCoefficient; public static float baseForce; public static float baseRadius; public static float procCoefficient; public static Vector3 bonusForce; public static float airControlDuringFall; public static float baseDownardsVelocity; public static float maxDownardsVelocity; public static GameObject poolDOT; private float originalAirControl; private bool isCrit; private bool detonateNextFrame; public override void OnEnter() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown base.OnEnter(); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); originalAirControl = ((EntityState)this).characterMotor.airControl; ((EntityState)this).characterMotor.airControl = airControlDuringFall; if (((EntityState)this).isAuthority) { isCrit = ((BaseState)this).RollCrit(); float num = 0f - baseDownardsVelocity * base.charge; ((EntityState)this).characterMotor.velocity.y = Mathf.Min(num, maxDownardsVelocity); ((EntityState)this).characterMotor.onMovementHit += new MovementHitDelegate(Fart); } } public override void FixedUpdate() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_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_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: 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) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector; if (detonateNextFrame || (((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.IsStableOnGround && !((BaseCharacterController)((EntityState)this).characterMotor).Motor.LastGroundingStatus.IsStableOnGround)) { BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)2, baseDamage = ((BaseState)this).damageStat * extraDamageCoefficient * base.charge, baseForce = baseForce * base.charge, radius = baseRadius * base.charge, bonusForce = bonusForce * base.charge, procCoefficient = procCoefficient }; TeamComponent obj = MSUtil.AsValidOrNull(((EntityState)this).teamComponent); val.teamIndex = (TeamIndex)((obj == null) ? (-1) : ((int)obj.teamIndex)); val.falloffModel = (FalloffModel)2; val.position = ((EntityState)this).characterBody.footPosition; val.canRejectForce = false; val.damageType = DamageTypeCombo.op_Implicit((DamageType)32); val.crit = isCrit; val.damageColorIndex = damageColor.DamageColorIndex; DamageAPI.AddModdedDamageType(val, SS2.Survivors.Nuke.NuclearDamageType); val.Fire(); FireProjectileInfo val2 = new FireProjectileInfo { crit = isCrit, damage = ((BaseState)this).damageStat * extraDamageCoefficient * base.charge, damageColorIndex = damageColor.DamageColorIndex, owner = ((EntityState)this).gameObject, position = ((EntityState)this).characterBody.footPosition, projectilePrefab = poolDOT, rotation = Quaternion.identity }; ProjectileManager.instance.FireProjectile(val2); ((EntityState)this).outer.SetNextStateToMain(); } } } private void Fart(ref MovementHitInfo movementHitInfo) { detonateNextFrame = true; } public override void OnExit() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).characterMotor.airControl = originalAirControl; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags ^ 1); } } public class FireFart : BaseNukeFireState { public static SerializableDamageColor damageColor; public static float extraDamageCoefficient; public static float baseForce; public static float baseRadius; public static float procCoefficient; public static float baseUpwardVelocity; public static float maxUpwardVelocity; public static Vector3 bonusForce; public static GameObject poolProjectile; public static GameObject poolDOT; private BlastAttack _blastAttack; public override void OnEnter() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_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_0056: 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_007a: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: 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_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025f: 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_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_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_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) bool crit = ((BaseState)this).RollCrit(); base.OnEnter(); if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)2, baseDamage = ((BaseState)this).damageStat * base.charge * extraDamageCoefficient, baseForce = baseForce * base.charge, radius = baseRadius * base.charge, bonusForce = bonusForce * base.charge, procCoefficient = procCoefficient }; TeamComponent obj = MSUtil.AsValidOrNull(((EntityState)this).teamComponent); val.teamIndex = (TeamIndex)((obj == null) ? (-1) : ((int)obj.teamIndex)); val.falloffModel = (FalloffModel)1; val.damageType = DamageTypeCombo.op_Implicit((DamageType)32); val.position = ((EntityState)this).characterBody.footPosition; val.canRejectForce = false; val.crit = crit; val.damageColorIndex = damageColor.DamageColorIndex; _blastAttack = val; DamageAPI.AddModdedDamageType(_blastAttack, SS2.Survivors.Nuke.NuclearDamageType); _blastAttack.Fire(); if (!((BaseState)this).isGrounded) { Vector3 velocity = ((EntityState)this).characterMotor.velocity; float num = baseUpwardVelocity * base.charge; velocity.y = Mathf.Min(num, maxUpwardVelocity); ((EntityState)this).characterMotor.velocity = velocity; FireProjectileInfo val2 = new FireProjectileInfo { crit = crit, damage = ((BaseState)this).damageStat * base.charge * extraDamageCoefficient, damageColorIndex = damageColor.DamageColorIndex, owner = ((EntityState)this).gameObject, position = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(Vector3.down), projectilePrefab = poolProjectile }; ProjectileManager.instance.FireProjectile(val2); } else { FireProjectileInfo val3 = new FireProjectileInfo { crit = crit, damage = ((BaseState)this).damageStat * base.charge * extraDamageCoefficient, damageColorIndex = damageColor.DamageColorIndex, owner = ((EntityState)this).gameObject, position = ((EntityState)this).characterBody.footPosition, rotation = Quaternion.identity, projectilePrefab = poolDOT }; ProjectileManager.instance.FireProjectile(val3); } } } } public class FireRadonFire : BaseNukeFireState { public static float duration; public static SerializableDamageColor damageColor; public static string rightMuzzleName; public static string leftMuzzleName; public static float baseRadius; public static float baseDistance; public static float procCoefficientPerTick; public static float tickFrequency; public static float ignitePercentChange; private float _tickDamageCoefficient; private float _flamethrowerStopwatch; private float _duration; private bool _isCrit; private Transform _leftMuzzleTransform; private Transform _rightMuzzleTransform; private BulletAttack _leftFlamethrowerAttack; private BulletAttack _rightFlamethrowerAtack; public override void OnEnter() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_012e: 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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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_018c: 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_0193: 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_01aa: 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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Expected O, but got Unknown //IL_01ef: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); _duration = duration; ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { _leftMuzzleTransform = modelChildLocator.FindChild(leftMuzzleName); _rightMuzzleTransform = modelChildLocator.FindChild(rightMuzzleName); } int num = Mathf.CeilToInt(_duration * tickFrequency); _tickDamageCoefficient = base.charge / (float)num; if (((EntityState)this).isAuthority) { _isCrit = ((BaseState)this).RollCrit(); } _leftFlamethrowerAttack = new BulletAttack { radius = baseRadius * base.charge, maxDistance = baseDistance * base.charge, bulletCount = 1u, damage = ((BaseState)this).damageStat * _tickDamageCoefficient, damageColorIndex = damageColor.DamageColorIndex, falloffModel = (FalloffModel)2, isCrit = _isCrit, muzzleName = leftMuzzleName, owner = ((EntityState)this).gameObject, procCoefficient = procCoefficientPerTick, weapon = ((EntityState)this).gameObject, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, smartCollision = true }; DamageAPI.AddModdedDamageType(_leftFlamethrowerAttack, SS2.Survivors.Nuke.NuclearDamageType); _rightFlamethrowerAtack = new BulletAttack { radius = baseRadius * base.charge, maxDistance = baseDistance * base.charge, bulletCount = 1u, damage = ((BaseState)this).damageStat * _tickDamageCoefficient, damageColorIndex = damageColor.DamageColorIndex, falloffModel = (FalloffModel)2, isCrit = _isCrit, muzzleName = rightMuzzleName, owner = ((EntityState)this).gameObject, procCoefficient = procCoefficientPerTick, weapon = ((EntityState)this).gameObject, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, smartCollision = true }; DamageAPI.AddModdedDamageType(_rightFlamethrowerAtack, SS2.Survivors.Nuke.NuclearDamageType); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); _flamethrowerStopwatch += Time.fixedDeltaTime; float num = 1f / tickFrequency / ((BaseState)this).attackSpeedStat; if (_flamethrowerStopwatch > num) { _flamethrowerStopwatch -= num; FireGauntlet(); } if (((EntityState)this).fixedAge > duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void FireGauntlet() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_007d: 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) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); _leftFlamethrowerAttack.origin = ((Ray)(ref aimRay)).origin; _leftFlamethrowerAttack.aimVector = ((Ray)(ref aimRay)).direction; _leftFlamethrowerAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)(Util.CheckRoll(ignitePercentChange, ((EntityState)this).characterBody.master) ? 128 : 0)); _rightFlamethrowerAtack.origin = ((Ray)(ref aimRay)).origin; _rightFlamethrowerAtack.aimVector = ((Ray)(ref aimRay)).direction; _rightFlamethrowerAtack.damageType = DamageTypeCombo.op_Implicit((DamageType)(Util.CheckRoll(ignitePercentChange, ((EntityState)this).characterBody.master) ? 128 : 0)); _leftFlamethrowerAttack.Fire(); _rightFlamethrowerAtack.Fire(); } } } public class FireSludge : BaseNukeFireState { public static GameObject projectilePrefab; public static SerializableDamageColor damageColor; public static float force; public static float baseSpeed; public static float baseDuration; [HideInInspector] public static GameObject muzzleFlashPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/CrocoDiseaseImpactEffect.prefab").WaitForCompletion(); private static int leftFireHash = Animator.StringToHash("IrradiateFireL"); private static int rightFireHash = Animator.StringToHash("IrradiateFireR"); private static int irradiatePlaybackHash = Animator.StringToHash("irradiate.playbackRate"); public string chosenMuzzleString; public int stepIndex; public Transform muzzleTransform; private float duration; private Ray aimRay; public override void OnEnter() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; aimRay = ((BaseState)this).GetAimRay(); if (Object.op_Implicit((Object)(object)muzzleFlashPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, chosenMuzzleString, true); } GameObject val = null; RaycastHit val2 = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, aimRay, ref val2, 1024f, ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, (QueryTriggerInteraction)0)) { Debug.Log((object)((RaycastHit)(ref val2)).collider); if (Object.op_Implicit((Object)(object)((RaycastHit)(ref val2)).collider)) { val = ((Component)((RaycastHit)(ref val2)).collider).gameObject; } } FireProjectileInfo val3 = new FireProjectileInfo { crit = ((BaseState)this).RollCrit(), position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((EntityState)this).gameObject, projectilePrefab = projectilePrefab, damage = ((BaseState)this).damageStat * base.charge, damageColorIndex = damageColor.DamageColorIndex, force = force, useSpeedOverride = true }; ((FireProjectileInfo)(ref val3)).speedOverride = baseSpeed * base.charge; FireProjectileInfo val4 = val3; if (Object.op_Implicit((Object)(object)val)) { val4.target = val; } ProjectileManager.instance.FireProjectile(val4); int num = ((stepIndex == 0) ? leftFireHash : rightFireHash); ((EntityState)this).PlayAnimation("UpperBody, Override", num, irradiatePlaybackHash, duration); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.Nucleator { internal class ApplyRadionuclideSurge : BaseSkillState { private float stateDuration = 6f; private float buffDuration = 6f; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(SS2Content.Buffs.BuffNucleatorSpecial, buffDuration); } animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { animator.SetLayerWeight(animator.GetLayerIndex("Body, Additive"), 1f); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)animator)) { animator.SetLayerWeight(animator.GetLayerIndex("Body, Additive"), 0f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= stateDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } [RequireComponent(typeof(ProjectileController))] [RequireComponent(typeof(ProjectileDamage))] public class NucleatorProjectile : MonoBehaviour { private ProjectileController projectileController; private ProjectileImpactExplosion projectileImpactExplosion; private ProjectileDamage projectileDamage; private float duration; private float fixedAge; private Rigidbody rigidbody; private float frequency = 14f; private float magnitude = 0.25f; private Vector3 axis; private Vector3 pos; public TeamIndex teamIndex; public float baseDuration = 2f; public float acceleration = 50f; public GameObject rotateObject; public float removalTime = 1f; public float baseRadius; public float baseDamage; public float charge; private void Awake() { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: 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) projectileController = ((Component)this).GetComponent(); projectileDamage = ((Component)this).GetComponent(); projectileImpactExplosion = ((Component)this).GetComponent(); rigidbody = ((Component)this).GetComponent(); rigidbody.useGravity = false; duration = baseDuration; fixedAge = 0f; baseDamage = projectileDamage.damage; projectileImpactExplosion.lifetime = baseDuration; acceleration = (1f - charge) * 30f + 20f; pos = ((Component)this).transform.position; axis = ((Component)this).transform.up * -1f; } private void FixedUpdate() { //IL_008b: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) fixedAge += Time.deltaTime; float num = fixedAge / baseDuration; if (fixedAge < baseDuration) { ((ProjectileExplosion)projectileImpactExplosion).blastRadius = baseRadius + num * (baseRadius * 1.25f - 1f) + 1f; projectileDamage.damage = baseDamage + num * (baseDamage * 1.25f - 1f) + 1f; pos += ((Component)this).transform.forward * Time.deltaTime * acceleration; ((Component)this).transform.position = pos + axis * Mathf.Sin(Time.time * frequency) * magnitude; } } } } namespace EntityStates.NemRailgunner { public class AimRifle : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class DisctructoRifle : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class HeatReload : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class MobileBeamCannon : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class ParticleBeamCannon : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class PositronBurst : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.NemMerc { public class CloneDash : BaseSkillState { public bool hasHit; public bool dashVectorLocked; public GameObject target; public bool m2Buffered; private EntityStateMachine weapon; private int entryLayer; private static string redirectSoundString = "Play_nemmerc_utility_enter"; [NonSerialized] public Transform modelTransform; public static GameObject dashPrefab; public static float dashPrepDuration = 0.25f; public static float smallHopVelocity; public static float m2ExtraDashDuration = 0.1f; public static float m2HitPauseDuration = 0.33f; public static float dashDuration = 0.2f; public static float baseDashDistance = 20f; public static float dashBehindDistance = 5f; public static string beginSoundString; public static string endSoundString; public static float damageCoefficient = 3f; public static float procCoefficient = 1f; public static GameObject hitEffectPrefab; public static float hitPauseDuration = 0.15f; private float dashSpeed; private bool isDashing; [NonSerialized] public float stopwatch; [NonSerialized] public Vector3 dashVector = Vector3.zero; [NonSerialized] public Animator animator; [NonSerialized] public CharacterModel characterModel; [NonSerialized] public HurtBoxGroup hurtboxGroup; [NonSerialized] public OverlapAttack overlapAttack; [NonSerialized] public ChildLocator childLocator; [NonSerialized] public bool inHitPause; [NonSerialized] public bool inM2HitPause; [NonSerialized] public float hitPauseTimer; [NonSerialized] public AimRequest aimRequest; public override void OnEnter() { //IL_00fa: 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_0110: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: 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_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: 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_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); weapon = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } if (Object.op_Implicit((Object)(object)modelTransform)) { animator = ((Component)modelTransform).GetComponent(); characterModel = ((Component)modelTransform).GetComponent(); childLocator = ((Component)modelTransform).GetComponent(); hurtboxGroup = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)childLocator)) { ((Component)childLocator.FindChild("PreDashEffect")).gameObject.SetActive(true); } } overlapAttack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, modelTransform, "Assaulter"); overlapAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)32); overlapAttack.damageType.damageSource = (DamageSource)4; DamageAPI.AddModdedDamageType(overlapAttack, SS2.Survivors.NemMerc.damageType); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).GetPoint(baseDashDistance); CloneInputBank.CloneOwnership component = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.clone)) { entryLayer = LayerIndex.defaultLayer.intVal; Vector3 val2 = component.clone.body.transform.position - ((EntityState)this).transform.position; float magnitude = ((Vector3)(ref val2)).magnitude; val = ((Vector3)(ref val2)).normalized * magnitude + ((EntityState)this).transform.position; component.Reactivate(); } else if (Object.op_Implicit((Object)(object)target)) { entryLayer = LayerIndex.fakeActor.intVal; Vector3 val3 = target.transform.position - ((EntityState)this).transform.position; float magnitude2 = ((Vector3)(ref val3)).magnitude; val = ((Vector3)(ref val3)).normalized * magnitude2 + ((EntityState)this).transform.position; } Vector3 val4 = val - ((EntityState)this).transform.position; dashSpeed = ((Vector3)(ref val4)).magnitude / dashDuration; dashVector = ((Vector3)(ref val4)).normalized; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); ((EntityState)this).PlayAnimation("FullBody, Override", "AssaulterPrep", "AssaulterPrep.playbackRate", dashDuration, 0f); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = dashPrepDuration; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj.AddToCharacterModel(characterModel); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility.buffIndex); } } private void GatherInputs() { GenericSkill secondary = ((EntityState)this).skillLocator.secondary; if (((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed && secondary.IsReady() && secondary.skillDef.skillNameToken == "SS2_NEMESIS_MERCENARY_SECONDARY_SLASH_NAME") { m2Buffered = true; } } public void CreateDashEffect() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) Transform val = childLocator.FindChild("DashCenter"); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)dashPrefab)) { Object.Instantiate(dashPrefab, val.position, Util.QuaternionSafeLookRotation(dashVector), val); } if (Object.op_Implicit((Object)(object)childLocator)) { ((Component)childLocator.FindChild("PreDashEffect")).gameObject.SetActive(false); } } public override void FixedUpdate() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_02db: 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_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); GatherInputs(); ((EntityState)this).characterDirection.forward = dashVector; float num = dashDuration + dashPrepDuration; if (stopwatch > dashPrepDuration && !isDashing) { isDashing = true; CreateDashEffect(); ((EntityState)this).PlayCrossfade("FullBody, Override", "AssaulterLoop", 0.1f); ((EntityState)this).gameObject.layer = LayerIndex.noCollision.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 1.2f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj.AddToCharacterModel(characterModel); } } if (!isDashing) { ((EntityState)this).characterMotor.velocity = Vector3.zero; stopwatch += Time.fixedDeltaTime; } else if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; if (!inHitPause) { stopwatch += Time.fixedDeltaTime; if (overlapAttack.Fire((List)null)) { if (!hasHit) { hasHit = true; } inHitPause = true; hitPauseTimer = hitPauseDuration / ((BaseState)this).attackSpeedStat; if (m2Buffered) { Util.PlaySound(redirectSoundString, ((EntityState)this).gameObject); m2Buffered = false; ((EntityState)this).skillLocator.secondary.DeductStock(1); hitPauseTimer += m2HitPauseDuration / ((BaseState)this).attackSpeedStat; inM2HitPause = true; ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); float num2 = stopwatch + m2ExtraDashDuration - num; if (num2 > 0f) { stopwatch -= num2; } if (Object.op_Implicit((Object)(object)weapon)) { weapon.SetNextState((EntityState)(object)new WhirlwindAssaulter()); } } if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj2 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj2.duration = hitPauseDuration / ((BaseState)this).attackSpeedStat; obj2.animateShaderAlpha = true; obj2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj2.destroyComponentOnEnd = true; obj2.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj2.AddToCharacterModel(((Component)modelTransform).GetComponent()); } } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashVector * dashSpeed * Time.fixedDeltaTime; } else { hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer < 0f) { inM2HitPause = false; inHitPause = false; } } } if (stopwatch >= num && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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) ((EntityState)this).gameObject.layer = entryLayer; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); Util.PlaySound(endSoundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.1f; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); } AimRequest val = aimRequest; if (val != null) { val.Dispose(); } ((EntityState)this).PlayAnimation("FullBody, Override", "EvisLoopExit", "Special.playbackRate", 1f, 0f); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility.buffIndex); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } public override void OnSerialize(NetworkWriter writer) { writer.Write(target); } public override void OnDeserialize(NetworkReader reader) { target = reader.ReadGameObject(); } } public class FireShotgun : GenericBulletBaseState { public static float selfKnockbackForce = 750f; public override void OnEnter() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) ((GenericBulletBaseState)this).OnEnter(); if (!((BaseState)this).isGrounded && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).direction * -1f; ((EntityState)this).characterMotor.ApplyForce(val * selfKnockbackForce, true, false); } } public override void DoFireEffects() { ((GenericBulletBaseState)this).DoFireEffects(); } public override void PlayFireAnimation() { ((GenericBulletBaseState)this).PlayFireAnimation(); ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).PlayAnimation("Gesture, Override", "FireShotgun"); } public override void ModifyBullet(BulletAttack bulletAttack) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) ((GenericBulletBaseState)this).ModifyBullet(bulletAttack); bulletAttack.falloffModel = (FalloffModel)1; bulletAttack.damageType.damageSource = (DamageSource)1; DamageAPI.AddModdedDamageType(bulletAttack, SS2.Survivors.NemMerc.damageType); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class HologramShadowStep : BaseSkillState { public class CameraLooker : MonoBehaviour, ICameraStateProvider { public Vector3 position; public Vector3 initialLookDirection; public GameObject target; public float startLerpDuration; public static float endLerpDuration = 0.4f; public void StartLook() { foreach (CameraRigController readOnlyInstances in CameraRigController.readOnlyInstancesList) { if (Object.op_Implicit((Object)(object)((Component)this).gameObject) && (Object)(object)readOnlyInstances.target == (Object)(object)((Component)this).gameObject) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)(object)this, startLerpDuration); } else if (readOnlyInstances.IsOverrideCam((ICameraStateProvider)(object)this)) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, 0.05f); } } } public void StopLook() { foreach (CameraRigController readOnlyInstances in CameraRigController.readOnlyInstancesList) { if (Object.op_Implicit((Object)(object)((Component)this).gameObject) && (Object)(object)readOnlyInstances.target == (Object)(object)((Component)this).gameObject) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, endLerpDuration); } else if (readOnlyInstances.IsOverrideCam((ICameraStateProvider)(object)this)) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, 0.05f); } } } public void GetCameraState(CameraRigController cameraRigController, ref CameraState cameraState) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d0: 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_00dd: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00a4: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) Vector3 value = cameraRigController.targetParams.currentCameraParamsData.idealLocalCameraPos.value; value.y += cameraRigController.targetParams.currentCameraParamsData.pivotVerticalOffset.value + ShadowStep.CameraFlipper.shitNumber; value += (Object.op_Implicit((Object)(object)cameraRigController.targetParams.cameraPivotTransform) ? cameraRigController.targetParams.cameraPivotTransform.localPosition : Vector3.zero); if (Object.op_Implicit((Object)(object)target)) { Vector3 val = target.transform.position - position; Quaternion val2 = (cameraState.rotation = Util.QuaternionSafeLookRotation(((Vector3)(ref val)).normalized)); cameraState.position = position + val2 * value; } else { Quaternion val3 = (cameraState.rotation = Util.QuaternionSafeLookRotation(initialLookDirection)); cameraState.position = position + val3 * value; } } private void OnDestroy() { StopLook(); } public bool IsHudAllowed(CameraRigController cameraRigController) { return true; } public bool IsUserControlAllowed(CameraRigController cameraRigController) { return true; } public bool IsUserLookAllowed(CameraRigController cameraRigController) { return false; } } public static float baseDuration = 0.25f; public static float smallHopVelocity = 12f; public static float cameraLerpTime = 0.5f; private float duration; private Vector3 teleportTarget; public GameObject target; private Vector3 startPosition; private CameraLooker camera; private Vector3 toHologramTarget; private Vector3 lastKnownTargetPosition; private GameObject bossEffect; public override void OnEnter() { //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_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound("Play_nemmerc_utility_enter", ((EntityState)this).gameObject); ((BaseState)this).StartAimMode(2f, false); GameObject val = null; duration = baseDuration; if (!Object.op_Implicit((Object)(object)target)) { NemMercTracker component = ((EntityState)this).GetComponent(); target = component.GetTrackingTarget(); } if (Object.op_Implicit((Object)(object)target)) { NemMercHologram component2 = target.GetComponent(); if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.target)) { val = ((Component)component2.target).gameObject; toHologramTarget = ((Component)component2.target).transform.position - target.transform.position; } ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { Transform val2 = modelChildLocator.FindChild("Chest"); if (Object.op_Implicit((Object)(object)val2)) { Transform val3 = val2.Find("NemMercenaryBossEffect(Clone)"); if (Object.op_Implicit((Object)(object)val3)) { bossEffect = ((Component)val3).gameObject; bossEffect.SetActive(false); } } } startPosition = ((EntityState)this).transform.position; teleportTarget = target.transform.position; lastKnownTargetPosition = teleportTarget; ((EntityState)this).characterDirection.forward = teleportTarget - ((EntityState)this).transform.position; ((EntityState)this).characterMotor.velocity = Vector3.zero; camera = ((EntityState)this).gameObject.AddComponent(); camera.position = teleportTarget; CameraLooker cameraLooker = camera; Ray aimRay = ((BaseState)this).GetAimRay(); cameraLooker.initialLookDirection = ((Ray)(ref aimRay)).direction; camera.target = val; camera.startLerpDuration = duration * cameraLerpTime; camera.StartLook(); if (Object.op_Implicit((Object)(object)ShadowStep.blinkPrefab)) { EffectManager.SimpleEffect(ShadowStep.blinkPrefab, ((EntityState)this).characterBody.corePosition, Util.QuaternionSafeLookRotation(teleportTarget - ((EntityState)this).transform.position), false); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } else { ((EntityState)this).outer.SetNextStateToMain(); } } private void UpdateTarget() { //IL_0024: 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_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_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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)target)) { lastKnownTargetPosition = target.transform.position; } Vector3 val = lastKnownTargetPosition - ((EntityState)this).transform.position; float magnitude = ((Vector3)(ref val)).magnitude; Vector3 normalized = ((Vector3)(ref val)).normalized; teleportTarget = normalized * magnitude + ((EntityState)this).transform.position; } public unsafe override void FixedUpdate() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_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_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); UpdateTarget(); ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { if (((Vector3)(ref teleportTarget)).magnitude < 5f) { SS2Log.Error("HOLOGRAMSHADOWSTEP WENT TO 0,0", 130, "FixedUpdate"); Vector3 val = teleportTarget; SS2Log.Error("TeleportTarget: " + ((object)(*(Vector3*)(&val))/*cast due to .constrained prefix*/).ToString(), 131, "FixedUpdate"); SS2Log.Error("target: " + (object)target, 132, "FixedUpdate"); val = lastKnownTargetPosition; SS2Log.Error("lastKnownTargetPosition: " + ((object)(*(Vector3*)(&val))/*cast due to .constrained prefix*/).ToString(), 133, "FixedUpdate"); SS2Log.Error("NemMercTrackerComponent target: " + (object)((EntityState)this).GetComponent().GetTrackingTarget(), 134, "FixedUpdate"); } TeleportHelper.TeleportBody(((EntityState)this).characterBody, teleportTarget); ((EntityState)this).characterDirection.forward = ((toHologramTarget != Vector3.zero) ? toHologramTarget : (startPosition - ((EntityState)this).transform.position)); if (Object.op_Implicit((Object)(object)ShadowStep.blinkArrivalPrefab)) { EffectManager.SimpleEffect(ShadowStep.blinkArrivalPrefab, teleportTarget, Quaternion.identity, true); } ((EntityState)this).outer.SetNextStateToMain(); ((BaseState)this).StartAimMode(2f, false); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)bossEffect)) { bossEffect.SetActive(true); } if (Object.op_Implicit((Object)(object)camera)) { camera.StopLook(); EntityState.Destroy((Object)(object)camera); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } } public class Lunge : BaseSkillState { public class Riposter : MonoBehaviour, IOnIncomingDamageServerReceiver { public float duration; private float stopwatch; private EntityStateMachine body; private void Awake() { body = EntityStateMachine.FindByCustomName(((Component)this).gameObject, "Body"); if (!Object.op_Implicit((Object)(object)body)) { Object.Destroy((Object)(object)this); } } private void Start() { stopwatch = duration; } private void FixedUpdate() { stopwatch -= Time.fixedDeltaTime; if (stopwatch <= 0f) { Object.Destroy((Object)(object)this); } } public void OnIncomingDamageServer(DamageInfo damageInfo) { if (Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)body)) { body.SetInterruptState((EntityState)(object)new PrepRetaliate { damageReceived = damageInfo.damage }, (InterruptPriority)2); Object.Destroy((Object)(object)this); } } } public static float maximumDuration = 0.33f; public static float aimVelocity = 4f; public static float minimumY = -0.4f; public static float maximumY = 0.4f; public static float airControl = 0.75f; public static float riposteDuration = 1.5f; public static float collisionRadius = 5f; public float baseSpeed; private float previousAirControl; private Vector3 direction; private EntityStateMachine weapon; private Transform collisionTransform; public override void OnEnter() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("FullBody, Override", "Lunge", "Secondary.playbackRate", 0.3f, 0f); Util.PlaySound("Play_nemmerc_secondary_lunge", ((EntityState)this).gameObject); weapon = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); collisionTransform = ((BaseState)this).FindModelChild("WhirlwindCollision"); Ray aimRay = ((BaseState)this).GetAimRay(); direction = ((Ray)(ref aimRay)).direction; previousAirControl = ((EntityState)this).characterMotor.airControl; ((EntityState)this).characterMotor.airControl = airControl; if (((EntityState)this).isAuthority) { direction.y = Mathf.Clamp(direction.y, minimumY, maximumY); ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).characterBody.RecalculateStats(); Vector3 velocity = ((Vector3)(ref direction)).normalized * aimVelocity * ((EntityState)this).characterBody.moveSpeed; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = velocity; } CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); } public bool CheckCollisions() { //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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_0039: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)collisionTransform)) { Transform obj = collisionTransform; Vector3 position = obj.position; Vector3 val = obj.lossyScale * 0.5f; Quaternion rotation = obj.rotation; Collider[] hits = Physics.OverlapBox(position, val, rotation, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)); return ProcessHits(hits); } return false; } public bool ProcessHits(Collider[] hits) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) foreach (Collider val in hits) { if (!Object.op_Implicit((Object)(object)val)) { continue; } HurtBox component = ((Component)val).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { continue; } HealthComponent healthComponent = component.healthComponent; TeamMask unprotectedTeams = TeamMask.GetUnprotectedTeams(((EntityState)this).characterBody.teamComponent.teamIndex); if (Object.op_Implicit((Object)(object)healthComponent) && healthComponent.alive && ((TeamMask)(ref unprotectedTeams)).HasTeam(healthComponent.body.teamComponent.teamIndex)) { if (NetworkServer.active) { ForceFlinch(healthComponent.body); } return true; } } return false; } protected virtual void ForceFlinch(CharacterBody body) { SetStateOnHurt component = ((Component)body.healthComponent).GetComponent(); if (!((Object)(object)component == (Object)null) && component.canBeHitStunned && !body.isBoss && !body.isChampion) { component.SetPain(); } } public override void FixedUpdate() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterDirection.forward = direction; if (CheckCollisions()) { ((EntityState)this).outer.SetNextStateToMain(); if (Object.op_Implicit((Object)(object)weapon)) { weapon.SetNextState((EntityState)(object)new WhirlwindBase()); } } else if (((EntityState)this).fixedAge >= maximumDuration) { ((EntityState)this).outer.SetNextStateToMain(); if (Object.op_Implicit((Object)(object)weapon)) { weapon.SetNextState((EntityState)(object)new WhirlwindBase()); } } } public override void Update() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); ((EntityState)this).characterMotor.moveDirection = direction; ((EntityState)this).characterDirection.forward = direction; } public override void OnExit() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).characterMotor.airControl = previousAirControl; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class NemAssaulter : BaseState { public bool hasHit; public bool dashVectorLocked; public HurtBox target; private bool m2Buffered; private EntityStateMachine weapon; private static string redirectSoundString = "Play_nemmerc_utility_enter"; [NonSerialized] public Transform modelTransform; public static GameObject dashPrefab; public static float smallHopVelocity; public static float m2ExtraDashDuration = 0.1f; public static float m2HitPauseDuration = 0.33f; public static float dashPrepDuration = 0.75f; public static float dashDistance = 35f; public static float dashDuration = 0.2f; public static string beginSoundString; public static string endSoundString; public static float damageCoefficient = 15f; public static float procCoefficient = 1f; public static GameObject hitEffectPrefab; public static float hitPauseDuration = 0.15f; private static float minBehindDistance = 5f; private static float graceDistance = 10f; private float dashSpeed; [NonSerialized] public float stopwatch; [NonSerialized] public Vector3 dashVector = Vector3.zero; [NonSerialized] public Animator animator; [NonSerialized] public CharacterModel characterModel; [NonSerialized] public HurtBoxGroup hurtboxGroup; [NonSerialized] public OverlapAttack overlapAttack; [NonSerialized] public ChildLocator childLocator; [NonSerialized] public bool isDashing; [NonSerialized] public bool inHitPause; [NonSerialized] public bool inM2HitPause; [NonSerialized] public float hitPauseTimer; [NonSerialized] public AimRequest aimRequest; public override void OnEnter() { //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_016d: 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_0252: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); weapon = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } if (Object.op_Implicit((Object)(object)modelTransform)) { animator = ((Component)modelTransform).GetComponent(); characterModel = ((Component)modelTransform).GetComponent(); childLocator = ((Component)modelTransform).GetComponent(); hurtboxGroup = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)childLocator)) { ((Component)childLocator.FindChild("PreDashEffect")).gameObject.SetActive(true); } TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = dashPrepDuration; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj.AddToCharacterModel(characterModel); } float num = dashDistance + minBehindDistance; dashVector = ((EntityState)this).inputBank.aimDirection; if (Object.op_Implicit((Object)(object)target)) { Vector3 val = ((Component)target).transform.position - ((EntityState)this).transform.position; num = Mathf.Min(((Vector3)(ref val)).magnitude + minBehindDistance, num + graceDistance); } ((EntityState)this).characterDirection.forward = ((Vector3)(ref dashVector)).normalized; num = Mathf.Max(num, dashDistance); dashSpeed = num / dashDuration; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); ((EntityState)this).PlayAnimation("FullBody, Override", "AssaulterPrep", "AssaulterPrep.playbackRate", dashPrepDuration, 0f); overlapAttack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, modelTransform, "Assaulter"); overlapAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)32); overlapAttack.damageType.damageSource = (DamageSource)8; if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility.buffIndex); } } private void GatherInputs() { GenericSkill secondary = ((EntityState)this).skillLocator.secondary; if (((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed && secondary.IsReady() && secondary.skillDef.skillNameToken == "SS2_NEMESIS_MERCENARY_SECONDARY_SLASH_NAME") { m2Buffered = true; } } public void CreateDashEffect() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) Transform val = childLocator.FindChild("DashCenter"); Util.PlaySound("Play_nemmerc_dash", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)dashPrefab)) { Object.Instantiate(dashPrefab, val.position, Util.QuaternionSafeLookRotation(dashVector), val); } if (Object.op_Implicit((Object)(object)childLocator)) { ((Component)childLocator.FindChild("PreDashEffect")).gameObject.SetActive(false); } } public override void FixedUpdate() { //IL_001f: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_014d: 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_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: 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_02e6: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); GatherInputs(); float num = dashDuration + dashPrepDuration; ((EntityState)this).characterDirection.forward = dashVector; if (stopwatch > dashPrepDuration && !isDashing) { isDashing = true; dashVector = ((EntityState)this).inputBank.aimDirection; CreateDashEffect(); ((EntityState)this).PlayCrossfade("FullBody, Override", "AssaulterLoop", 0.1f); ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 1.2f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj.AddToCharacterModel(characterModel); } } if (!isDashing) { ((EntityState)this).characterMotor.velocity = Vector3.zero; stopwatch += Time.fixedDeltaTime; } else if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; if (!inHitPause) { stopwatch += Time.fixedDeltaTime; if (overlapAttack.Fire((List)null)) { if (!hasHit) { hasHit = true; } inHitPause = true; hitPauseTimer = hitPauseDuration / base.attackSpeedStat; if (m2Buffered) { Util.PlaySound(redirectSoundString, ((EntityState)this).gameObject); m2Buffered = false; ((EntityState)this).skillLocator.secondary.DeductStock(1); hitPauseTimer += m2HitPauseDuration / base.attackSpeedStat; inM2HitPause = true; float num2 = stopwatch + m2ExtraDashDuration - num; if (num2 > 0f) { stopwatch -= num2; } if (Object.op_Implicit((Object)(object)weapon)) { weapon.SetNextState((EntityState)(object)new WhirlwindAssaulter()); } } if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj2 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj2.duration = hitPauseDuration / base.attackSpeedStat; obj2.animateShaderAlpha = true; obj2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj2.destroyComponentOnEnd = true; obj2.originalMaterial = LegacyResourcesAPI.Load("Materials/matMercEvisTarget"); obj2.AddToCharacterModel(characterModel); } } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashVector * dashSpeed * Time.fixedDeltaTime; } else { if (inM2HitPause) { dashVector = ((EntityState)this).inputBank.aimDirection; } hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer < 0f) { inM2HitPause = false; inHitPause = false; } } } if (stopwatch >= num && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); Util.PlaySound(endSoundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.1f; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); } AimRequest val = aimRequest; if (val != null) { val.Dispose(); } if (Object.op_Implicit((Object)(object)childLocator)) { ((Component)childLocator.FindChild("PreDashEffect")).gameObject.SetActive(false); } ((EntityState)this).PlayAnimation("FullBody, Override", "EvisLoopExit", "Special.playbackRate", 1f, 0f); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility.buffIndex); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } public override void OnSerialize(NetworkWriter writer) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) NetworkExtensions.Write(writer, HurtBoxReference.FromHurtBox(target)); } public override void OnDeserialize(NetworkReader reader) { //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) HurtBoxReference val = NetworkExtensions.ReadHurtBoxReference(reader); target = ((HurtBoxReference)(ref val)).ResolveHurtBox(); } } public class PrepRetaliate : BaseSkillState { public static float baseDuration = 0.33f; private float duration; public float damageReceived; private EntityStateMachine weapon; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlaySound("Play_commando_M2_grenade_throw", ((EntityState)this).gameObject); duration = baseDuration / ((BaseState)this).attackSpeedStat; weapon = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); } public override void FixedUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); if (Object.op_Implicit((Object)(object)weapon)) { weapon.SetInterruptState((EntityState)(object)new Retaliate(), (InterruptPriority)2); } } } } public class PullKnife : BaseState { public static float smallHopVelocity = 8f; public static float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); } ((EntityState)this).outer.SetNextStateToMain(); } } public class Reload : BaseState { public static float baseDuration = 1f; public static string reloadSoundString; public float reloadTime = 0.5f; private float duration; private bool hasReloaded; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayCrossfade("Gesture, Override", "Reload2", "Reload.playbackRate", duration * 0.9f, 0.1f); Util.PlaySound(reloadSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration * reloadTime && !hasReloaded) { hasReloaded = true; AddStock(); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void AddStock() { ((EntityState)this).skillLocator.primary.stock = 2; } public override InterruptPriority GetMinimumInterruptPriority() { if (hasReloaded) { return (InterruptPriority)0; } return (InterruptPriority)1; } } public class Retaliate : WhirlwindBase { } public class Scan : BaseSkillState { public static float scanRadius = 75f; public static float randomHologramRadius = 40f; public static float scanDuration = 1f; public static float hologramDuration = 10f; [SerializeField] public int targetedHolograms = 3; public static float targetedHologramOffset = 8f; [SerializeField] public int randomHolograms = 1; public static float maxHologramYOffsetInsideUnitSphereIdk = 0.25f; public static float minimumRandomHologramDistance = 25f; public static GameObject hologramPrefab; public static GameObject scanEffect; public static string soundString; public override void OnEnter() { //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_0115: Expected O, but got Unknown //IL_009e: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (NetworkServer.active) { SpawnHolograms(); } Transform modelTransform = ((EntityState)this).GetModelTransform(); TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = hologramDuration; obj.alphaCurve = AnimationCurve.Constant(0f, 1f, 1f); obj.animateShaderAlpha = true; obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemMercGlow", SS2Bundle.NemMercenary); obj.AddToCharacterModel(((Component)modelTransform).GetComponent()); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { Transform val = modelChildLocator.FindChild("GasL"); if (Object.op_Implicit((Object)(object)val)) { ParticleSystem component = ((Component)val).GetComponent(); MainModule main = component.main; ((MainModule)(ref main)).duration = hologramDuration; component.Play(); } Transform val2 = modelChildLocator.FindChild("GasR"); if (Object.op_Implicit((Object)(object)val2)) { ParticleSystem component2 = ((Component)val2).GetComponent(); MainModule main2 = component2.main; ((MainModule)(ref main2)).duration = hologramDuration; component2.Play(); } } EffectManager.SpawnEffect(scanEffect, new EffectData { origin = ((EntityState)this).transform.position, scale = scanRadius }, false); ((EntityState)this).outer.SetNextStateToMain(); Util.PlaySound(soundString, ((EntityState)this).gameObject); } private void SpawnHolograms() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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_0032: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_00e0: 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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0262: 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_0219: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(((EntityState)this).teamComponent.teamIndex); BullseyeSearch val = new BullseyeSearch { teamMaskFilter = allButNeutral, filterByLoS = false, searchOrigin = ((Ray)(ref aimRay)).origin, searchDirection = ((Ray)(ref aimRay)).direction, sortMode = (SortMode)2, maxDistanceFilter = scanRadius, maxAngleFilter = 120f }; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); List list = val.GetResults().ToList(); int num = Mathf.Min(targetedHolograms, list.Count); Vector3 val3 = default(Vector3); RaycastHit val4 = default(RaycastHit); for (int i = 0; i < num; i++) { HurtBox val2; if (i == 0) { val2 = list.FirstOrDefault(); list.RemoveAt(0); } else { int index = Random.Range(0, list.Count - 1); val2 = list[index]; list.RemoveAt(index); } Vector2 insideUnitCircle = Random.insideUnitCircle; ((Vector3)(ref val3))..ctor(insideUnitCircle.x, 0f, insideUnitCircle.y); Vector3 position = ((Component)val2).transform.position + val3 * targetedHologramOffset; if (Physics.Raycast(((Component)val2).transform.position, val3, ref val4, targetedHologramOffset, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { position = ((RaycastHit)(ref val4)).point; } SpawnHologramSingle(position, val2); } Vector3 position2 = default(Vector3); for (int j = 0; j < randomHolograms; j++) { NodeGraph groundNodes = SceneInfo.instance.groundNodes; NodeGraph airNodes = SceneInfo.instance.airNodes; List list2 = groundNodes.FindNodesInRange(((EntityState)this).transform.position, minimumRandomHologramDistance, randomHologramRadius, (HullMask)1); float num2 = list2.Count; List list3 = airNodes.FindNodesInRange(((EntityState)this).transform.position, minimumRandomHologramDistance, randomHologramRadius, (HullMask)1); float num3 = list3.Count; if (Random.Range(0f, num2 + num3) > num2 && list3.Count > 0) { int index2 = Random.Range(0, list3.Count - 1); airNodes.GetNodePosition(list3[index2], ref position2); SpawnHologramSingle(position2, null); } else if (list2.Count > 0) { int index3 = Random.Range(0, list2.Count - 1); groundNodes.GetNodePosition(list2[index3], ref position2); position2.y += 4f; SpawnHologramSingle(position2, null); } } } private void SpawnHologramSingle(Vector3 position, HurtBox target) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) NemMercHologram component = Object.Instantiate(hologramPrefab, position, Quaternion.identity).GetComponent(); component.lifetime = hologramDuration; component.owner = ((EntityState)this).gameObject; component.target = target; NetworkServer.Spawn(((Component)component).gameObject); } } public class ScanScepter : Scan { } public class SpawnCloneScepter : SpawnClone { } public class ShadowStep : BaseSkillState { public class CameraFlipper : MonoBehaviour, ICameraStateProvider { public static bool userLook = false; public static bool userControl = false; public static bool doOffset = true; public static float maxOffset = 12f; public static float endLerpDuration = 0.5f; public static float wallCushion = 0.1f; public static float shitNumber = 0.9f; public AnimationCurve movementCurve; public AnimationCurve fovCurve; private Vector3 cameraStartPosition; public Vector3 cameraEndPosition; private Vector3 cameraPivot; private Vector3 orbitDirection; private GameObject target; private float orbitDistance; public bool inOverride; private float overrideStopwatch; private float overrideDuration; public void UpdateCamera(float dt) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) overrideStopwatch += dt; if (Object.op_Implicit((Object)(object)target)) { cameraPivot = target.transform.position; } } private float EvaluateOffsetCurve(float f) { return 0f - Mathf.Pow(f - 1f, 2f) + 1f; } public void StartCameraFlip(Vector3 endPoint, GameObject target, float duration) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) foreach (CameraRigController readOnlyInstances in CameraRigController.readOnlyInstancesList) { if ((Object)(object)readOnlyInstances.target == (Object)(object)((Component)this).gameObject) { cameraStartPosition = readOnlyInstances.currentCameraState.position; readOnlyInstances.SetOverrideCam((ICameraStateProvider)(object)this, 0.25f); } else if (readOnlyInstances.IsOverrideCam((ICameraStateProvider)(object)this)) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, 0.05f); } } inOverride = true; overrideStopwatch = 0f; overrideDuration = duration; Vector3 val = endPoint - ((Component)this).transform.position; Vector3 val2 = new Vector3(val.x, 0f, val.z); Vector3 normalized = ((Vector3)(ref val2)).normalized; Vector3 val3 = Quaternion.Euler(0f, -90f, 0f) * normalized; this.target = target; cameraPivot = this.target.transform.position; orbitDirection = val3; orbitDistance = Mathf.Min(((Vector3)(ref val)).magnitude / 2f, maxOffset); cameraEndPosition = endPoint; } public void EndCameraFlip() { inOverride = false; foreach (CameraRigController readOnlyInstances in CameraRigController.readOnlyInstancesList) { if ((Object)(object)readOnlyInstances.target == (Object)(object)((Component)this).gameObject) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, endLerpDuration); } else if (readOnlyInstances.IsOverrideCam((ICameraStateProvider)(object)this)) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, 0.05f); } } } public void GetCameraState(CameraRigController cameraRigController, ref CameraState cameraState) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_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_0130: 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_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0165: 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_016d: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) float num = movementCurve.Evaluate(Mathf.Clamp01(overrideStopwatch / overrideDuration)); Vector3 val = (Object.op_Implicit((Object)(object)target) ? target.transform.position : cameraPivot); Vector3 val2 = EvaluateOffsetCurve(num * 2f) * orbitDistance * orbitDirection; Vector3 val3 = Vector3.Lerp(cameraStartPosition, cameraEndPosition, num) + val2; Vector3 val4 = val - val3; Vector3 value = cameraRigController.targetParams.currentCameraParamsData.idealLocalCameraPos.value; value.y += cameraRigController.targetParams.currentCameraParamsData.pivotVerticalOffset.value + shitNumber; value += (Object.op_Implicit((Object)(object)cameraRigController.targetParams.cameraPivotTransform) ? cameraRigController.targetParams.cameraPivotTransform.localPosition : Vector3.zero); val3 += Util.QuaternionSafeLookRotation(((Vector3)(ref val4)).normalized) * value; Vector3 val5 = val - val3; Quaternion rotation = Util.QuaternionSafeLookRotation(((Vector3)(ref val5)).normalized); Vector3 val6 = val3 - val; float num2 = Raycast(new Ray(val, ((Vector3)(ref val6)).normalized), ((Vector3)(ref val6)).magnitude, wallCushion - 0.01f); Vector3 position = ((Vector3)(ref val6)).normalized * num2 + val; cameraState.position = position; cameraState.rotation = rotation; } public float Raycast(Ray ray, float maxDistance, float wallCushion) { //IL_0000: 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) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) LayerIndex world = LayerIndex.world; RaycastHit[] array = Physics.SphereCastAll(ray, wallCushion, maxDistance, LayerMask.op_Implicit(((LayerIndex)(ref world)).mask), (QueryTriggerInteraction)1); float num = maxDistance; for (int i = 0; i < array.Length; i++) { float distance = ((RaycastHit)(ref array[i])).distance; if (distance < num) { Collider collider = ((RaycastHit)(ref array[i])).collider; if (Object.op_Implicit((Object)(object)collider) && !Object.op_Implicit((Object)(object)((Component)collider).GetComponent())) { num = distance; } } } return num; } public float GetPitchFromLookVector(Vector3 lookVector) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Sqrt(lookVector.x * lookVector.x + lookVector.z * lookVector.z); return Mathf.Atan2(0f - lookVector.y, num) * 57.29578f; } public bool IsHudAllowed(CameraRigController cameraRigController) { return true; } public bool IsUserControlAllowed(CameraRigController cameraRigController) { return true; } public bool IsUserLookAllowed(CameraRigController cameraRigController) { return true; } } public static float teleportYBonus = 1.25f; public static float baseDuration = 0.5f; public static float teleportBehindDistance = 5f; public static float teleportTime = 0.75f; public static float smallHopVelocity = 12f; public static float hologramDurationCoefficient = 0.5f; public static AnimationCurve cameraMovementCurve; public static GameObject blinkPrefab; public static GameObject blinkDestinationPrefab; public static GameObject blinkArrivalPrefab; private GameObject destinationInstance; private float duration; private Vector3 teleportStartPosition; private Vector3 teleportTarget; private CameraFlipper camera; private GameObject target; private CharacterModel characterModel; private Transform modelTransform; private Vector3 lastKnownTargetPosition; private Vector3 targetSafe; private GameObject bossEffect; [NonSerialized] public static bool FUCKERTESTINGXDDDDDDDDDDDDDDDDDDDDD = true; private bool s; [NonSerialized] public static float bitch = 0.66f; public override void OnEnter() { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_01e0: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration; NemMercTracker component = ((EntityState)this).GetComponent(); target = component.GetTrackingTarget(); if (!Object.op_Implicit((Object)(object)target)) { ((EntityState)this).outer.SetNextStateToMain(); ((BaseSkillState)this).activatorSkillSlot.AddOneStock(); return; } ((BaseState)this).StartAimMode(2f, false); ((EntityState)this).PlayAnimation("FullBody, Override", "ShadowStep", "Utility.playbackRate", baseDuration, 0f); Util.PlaySound("Play_nemmerc_utility_enter", ((EntityState)this).gameObject); teleportStartPosition = ((EntityState)this).transform.position; UpdateTarget(); lastKnownTargetPosition = target.transform.position; ((EntityState)this).characterDirection.forward = teleportTarget - ((EntityState)this).transform.position; camera = ((EntityState)this).gameObject.AddComponent(); camera.StartCameraFlip(teleportTarget, target, duration * teleportTime); camera.movementCurve = cameraMovementCurve; ((EntityState)this).characterMotor.velocity = Vector3.zero; modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent(); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { Transform val = modelChildLocator.FindChild("Chest"); if (Object.op_Implicit((Object)(object)val)) { Transform val2 = val.Find("NemMercenaryBossEffect(Clone)"); if (Object.op_Implicit((Object)(object)val2)) { bossEffect = ((Component)val2).gameObject; bossEffect.SetActive(false); } } } } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount + 1; } if (Object.op_Implicit((Object)(object)blinkPrefab)) { EffectManager.SimpleEffect(blinkPrefab, ((EntityState)this).characterBody.corePosition, Util.QuaternionSafeLookRotation(teleportTarget - teleportStartPosition), false); } if (Object.op_Implicit((Object)(object)blinkDestinationPrefab)) { destinationInstance = Object.Instantiate(blinkDestinationPrefab, teleportTarget, Quaternion.identity); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } private void UpdateTarget() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)target)) { lastKnownTargetPosition = target.transform.position; } Vector3 val = lastKnownTargetPosition - teleportStartPosition; float magnitude = ((Vector3)(ref val)).magnitude; Vector3 normalized = ((Vector3)(ref val)).normalized; teleportTarget = normalized * (magnitude + teleportBehindDistance) + ((EntityState)this).transform.position; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(lastKnownTargetPosition, normalized, ref val2, teleportBehindDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { teleportTarget = ((RaycastHit)(ref val2)).point; } teleportTarget.y = Mathf.Max(lastKnownTargetPosition.y + teleportYBonus, teleportTarget.y); if (Object.op_Implicit((Object)(object)camera)) { camera.cameraEndPosition = teleportTarget; } if (Object.op_Implicit((Object)(object)destinationInstance)) { destinationInstance.transform.position = teleportTarget; } } private void FixedUpdateTarget() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)target)) { targetSafe = teleportTarget; } } public unsafe override void FixedUpdate() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0196: 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_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_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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) ((EntityState)this).FixedUpdate(); FixedUpdateTarget(); ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).fixedAge >= duration * bitch && !s) { s = true; Util.PlaySound("Play_nemmerc_utility_exit", ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { if (Object.op_Implicit((Object)(object)camera)) { camera.EndCameraFlip(); } if (((Vector3)(ref targetSafe)).magnitude < 5f) { SS2Log.Error("SHADOWSTEP WENT TO 0,0", 170, "FixedUpdate"); Vector3 val = teleportTarget; SS2Log.Error("TeleportTarget: " + ((object)(*(Vector3*)(&val))/*cast due to .constrained prefix*/).ToString(), 171, "FixedUpdate"); val = targetSafe; SS2Log.Error("targetSafe: " + ((object)(*(Vector3*)(&val))/*cast due to .constrained prefix*/).ToString(), 172, "FixedUpdate"); SS2Log.Error("target: " + (object)target, 173, "FixedUpdate"); val = lastKnownTargetPosition; SS2Log.Error("lastKnownTargetPosition: " + ((object)(*(Vector3*)(&val))/*cast due to .constrained prefix*/).ToString(), 174, "FixedUpdate"); SS2Log.Error("NemMercTrackerComponent target: " + (object)((EntityState)this).GetComponent().GetTrackingTarget(), 175, "FixedUpdate"); } TeleportHelper.TeleportBody(((EntityState)this).characterBody, targetSafe); if (Object.op_Implicit((Object)(object)blinkArrivalPrefab)) { EffectManager.SimpleEffect(blinkArrivalPrefab, targetSafe, Quaternion.identity, true); } ((EntityState)this).characterDirection.forward = lastKnownTargetPosition - ((EntityState)this).transform.position; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); ((BaseState)this).StartAimMode(2f, false); ((EntityState)this).outer.SetNextStateToMain(); } } public override void Update() { ((EntityState)this).Update(); UpdateTarget(); if (Object.op_Implicit((Object)(object)camera)) { camera.UpdateCamera(Time.deltaTime); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)bossEffect)) { bossEffect.SetActive(true); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount - 1; } if (Object.op_Implicit((Object)(object)camera)) { camera.EndCameraFlip(); EntityState.Destroy((Object)(object)camera); } if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj2 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj2.duration = 0.67f; obj2.animateShaderAlpha = true; obj2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj2.destroyComponentOnEnd = true; obj2.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj2.AddToCharacterModel(((Component)modelTransform).GetComponent()); } ((EntityState)this).characterMotor.useGravity = true; if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } } public class Slide : BaseSkillState { public static AnimationCurve forwardSpeedCurve; public static float forwardSpeedCurveCoefficient = 5f; public static float baseExtraForwardSpeed = 0f; public static float baseDuration = 1.5f; public static float minDuration = 0.5f; public static float maxTurnSpeed = 720f; public static float minTurnSpeed = 180f; public static float smoothTime = 0.1f; public static float airFrictionCoefficient = 0.4f; public static float movespeedScalingCoefficient = 0.67f; private Vector3 targetMoveVectorVelocity; private Vector3 forwardDirection; private GameObject slideEffectInstance; private bool m2Buffered; private NemMercTracker tracker; private float stopwatch; private EntityStateMachine body; private bool isClone; public override void OnEnter() { //IL_00c1: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Body", "SlideStart"); ((EntityState)this).GetModelAnimator().SetFloat("inSlideState", 1f); Util.PlaySound(SlideState.soundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)SlideState.slideEffectPrefab)) { Transform transform = ((EntityState)this).characterBody.transform; slideEffectInstance = Object.Instantiate(SlideState.slideEffectPrefab, transform); } body = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Body"); tracker = ((EntityState)this).GetComponent(); isClone = tracker is NemMercCloneTracker; if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { CharacterDirection characterDirection = ((EntityState)this).characterDirection; Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).inputBank.aimDirection : ((EntityState)this).inputBank.moveVector); characterDirection.forward = ((Vector3)(ref val)).normalized; forwardDirection = ((EntityState)this).characterDirection.forward; ((EntityState)this).characterDirection.moveVector = forwardDirection; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity.y = Mathf.Max(0f, ((EntityState)this).characterMotor.velocity.y); } ((EntityState)this).characterBody.SetSpreadBloom(0f, false); } private void GatherInputs() { GenericSkill secondary = ((EntityState)this).skillLocator.secondary; if (((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed && secondary.IsReady() && secondary.skillDef.skillNameToken == "SS2_NEMESIS_MERCENARY_SECONDARY_SLASH_NAME") { m2Buffered = true; } } public override void FixedUpdate() { //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!((EntityState)this).isAuthority) { return; } bool flag = !Object.op_Implicit((Object)(object)body) || (Object.op_Implicit((Object)(object)body) && body.IsInMainState()); float num = ((((BaseState)this).isGrounded && flag) ? Time.fixedDeltaTime : (Time.fixedDeltaTime * airFrictionCoefficient)); stopwatch += num; float num2 = Mathf.Clamp01(stopwatch / baseDuration); float num3 = Mathf.Lerp(maxTurnSpeed, minTurnSpeed, num2); float num4 = forwardSpeedCurve.Evaluate(num2) * forwardSpeedCurveCoefficient + baseExtraForwardSpeed; ((EntityState)this).characterMotor.moveDirection = Vector3.zero; if (((BaseState)this).isGrounded) { Vector3 val = ((((EntityState)this).inputBank.moveVector != Vector3.zero) ? ((EntityState)this).inputBank.moveVector : ((EntityState)this).characterDirection.forward); Vector3 val2 = Vector3.ProjectOnPlane(Vector3.SmoothDamp(forwardDirection, val, ref targetMoveVectorVelocity, smoothTime, num3), Vector3.up); Vector3 moveVector = (forwardDirection = ((Vector3)(ref val2)).normalized); ((EntityState)this).characterDirection.moveVector = moveVector; } float num5 = ((EntityState)this).characterBody.moveSpeed / ((EntityState)this).characterBody.baseMoveSpeed; num5 *= movespeedScalingCoefficient; if (flag && !isClone) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += ((EntityState)this).characterBody.baseMoveSpeed * num5 * num4 * forwardDirection * Time.fixedDeltaTime; } if (!((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= minDuration && flag) { if (Object.op_Implicit((Object)(object)tracker)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new TargetDash { m2Buffered = m2Buffered, target = tracker.GetTrackingTarget() }); } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("Body", "SlideEnd"); ((EntityState)this).GetModelAnimator().SetFloat("inSlideState", 0f); if (Object.op_Implicit((Object)(object)slideEffectInstance)) { EntityState.Destroy((Object)(object)slideEffectInstance); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class SpawnClone : BaseSkillState { public static float cloneLifetime = 12f; public static float targetedHologramOffset = 8f; public static GameObject hologramPrefab; public static GameObject scanEffect; public static float maxRange = 50f; public static bool copyInventory; [SerializeField] public int numRecasts = 1; private NemMercTracker tracker; private uint primary; private uint secondary; private uint utility; private uint special; private static List illegalItems = new List { Items.ExtraLife, Items.ExtraLifeVoid, Items.RoboBallBuddy, Items.BeetleGland, Items.FocusConvergence, Items.TPHealingNova, Items.Squid, Items.TitanGoldDuringTP, Items.DroneWeapons, Items.FreeChest, Items.VoidMegaCrabItem, Items.TreasureCache, Items.TreasureCacheVoid, SS2Content.Items.RelicOfTermination, SS2Content.Items.NkotasHeritage, SS2Content.Items.Remuneration }; public override void OnEnter() { //IL_002e: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ea: 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_0105: Expected O, but got Unknown ((BaseState)this).OnEnter(); tracker = ((EntityState)this).GetComponent(); primary = ((EntityState)this).characterBody.master.loadout.bodyLoadoutManager.GetSkillVariant(((EntityState)this).characterBody.bodyIndex, 0); secondary = ((EntityState)this).characterBody.master.loadout.bodyLoadoutManager.GetSkillVariant(((EntityState)this).characterBody.bodyIndex, 1); utility = ((EntityState)this).characterBody.master.loadout.bodyLoadoutManager.GetSkillVariant(((EntityState)this).characterBody.bodyIndex, 2); special = ((EntityState)this).characterBody.master.loadout.bodyLoadoutManager.GetSkillVariant(((EntityState)this).characterBody.bodyIndex, 3); SpawnHolograms(); Util.PlaySound("Play_nemmerc_clone_spawn", ((EntityState)this).gameObject); EffectManager.SpawnEffect(scanEffect, new EffectData { origin = ((EntityState)this).transform.position, scale = 60f }, false); ((EntityState)this).outer.SetNextStateToMain(); } private void SpawnHolograms() { //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } if (Object.op_Implicit((Object)(object)tracker)) { GameObject trackingTarget = tracker.GetTrackingTarget(); if (Object.op_Implicit((Object)(object)trackingTarget)) { Vector3 val = trackingTarget.transform.position - ((EntityState)this).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; Vector3 position = trackingTarget.transform.position + normalized * targetedHologramOffset; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(trackingTarget.transform.position, normalized, ref val2, targetedHologramOffset, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { position = ((RaycastHit)(ref val2)).point; } SpawnHologramSingle(position); return; } } Vector3 position2 = ((EntityState)this).inputBank.aimDirection * maxRange + ((EntityState)this).inputBank.aimOrigin; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(((EntityState)this).inputBank.aimOrigin, ((EntityState)this).inputBank.aimDirection, ref val3, maxRange, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { position2 = ((RaycastHit)(ref val3)).point; } SpawnHologramSingle(position2); } public static bool ItemFilter(ItemIndex itemIndex) { //IL_0000: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) ItemDef itemDef = ItemCatalog.GetItemDef(itemIndex); if ((Object)(object)itemDef == (Object)null) { return false; } if (((Object)itemDef).name == "ITEM_ANCIENT_SCEPTER" || itemDef.nameToken == "ITEM_ANCIENT_SCEPTER_NAME") { return false; } if (ItemCatalog.GetItemDef(itemIndex).ContainsTag((ItemTag)13)) { return false; } foreach (ItemDef illegalItem in illegalItems) { if ((Object)(object)illegalItem == (Object)null) { return false; } if (illegalItem.itemIndex == itemIndex) { return false; } } return true; } private void SpawnHologramSingle(Vector3 position) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0026: 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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00b8: 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_00c6: Unknown result type (might be due to invalid IL or missing references) CharacterMaster component = hologramPrefab.GetComponent(); Loadout val = new Loadout(); component.loadout.Copy(val); BodyIndex bodyIndex = component.bodyPrefab.GetComponent().bodyIndex; val.bodyLoadoutManager.SetSkillVariant(bodyIndex, 0, primary); val.bodyLoadoutManager.SetSkillVariant(bodyIndex, 1, secondary); val.bodyLoadoutManager.SetSkillVariant(bodyIndex, 2, utility); val.bodyLoadoutManager.SetSkillVariant(bodyIndex, 3, special); CloneInputBank component2 = ((Component)new MasterSummon { masterPrefab = hologramPrefab, position = position, rotation = ((EntityState)this).characterBody.transform.rotation, inventoryToCopy = null, summonerBodyObject = ((EntityState)this).gameObject, ignoreTeamMemberLimit = true, loadout = val, preSpawnSetupCallback = delegate(CharacterMaster master) { ((Component)master).gameObject.AddComponent().lifeTimer = cloneLifetime; master.inventory.itemAcquisitionOrder.Clear(); master.inventory.CloneItemInventory(((EntityState)this).characterBody.inventory); master.inventory.CopyEquipmentFrom(((EntityState)this).characterBody.inventory, true); master.onBodyStart += delegate(CharacterBody body) { ((Component)body).GetComponent().ownerTracker = tracker; StupidFuckingCooldownSetter stupidFuckingCooldownSetter = ((Component)body).gameObject.AddComponent(); stupidFuckingCooldownSetter.primaryStock = ((EntityState)this).skillLocator.primary.stock; stupidFuckingCooldownSetter.primaryStopwatch = ((EntityState)this).skillLocator.primary.rechargeStopwatch; stupidFuckingCooldownSetter.secondaryStock = ((EntityState)this).skillLocator.secondary.stock; stupidFuckingCooldownSetter.secondaryStopwatch = ((EntityState)this).skillLocator.secondary.rechargeStopwatch; stupidFuckingCooldownSetter.utilityStock = ((EntityState)this).skillLocator.utility.stock; stupidFuckingCooldownSetter.utilityStopwatch = ((EntityState)this).skillLocator.utility.rechargeStopwatch; stupidFuckingCooldownSetter.specialStock = ((EntityState)this).skillLocator.special.stock; stupidFuckingCooldownSetter.specialStopwatch = ((EntityState)this).skillLocator.special.rechargeStopwatch; }; } }.Perform()).GetComponent(); component2.NetworkownerMasterObject = ((Component)((EntityState)this).characterBody.master).gameObject; component2.maxRecasts = numRecasts; } } public class TargetDash : BaseSkillState { public bool hasHit; public bool dashVectorLocked; public GameObject target; public bool m2Buffered; private EntityStateMachine weapon; private int entryLayer; private static string redirectSoundString = "Play_nemmerc_utility_enter"; [NonSerialized] public Transform modelTransform; public static GameObject dashPrefab; public static float smallHopVelocity; public static float m2HitPauseDuration = 0.33f; public static float dashDuration = 0.2f; public static float baseDashDistance = 20f; public static float dashBehindDistance = 5f; public static string beginSoundString; public static string endSoundString; public static float damageCoefficient = 3f; public static float procCoefficient = 1f; public static GameObject hitEffectPrefab; public static float hitPauseDuration = 0.15f; private float dashSpeed; [NonSerialized] public float stopwatch; [NonSerialized] public Vector3 dashVector = Vector3.zero; [NonSerialized] public Animator animator; [NonSerialized] public CharacterModel characterModel; [NonSerialized] public HurtBoxGroup hurtboxGroup; [NonSerialized] public OverlapAttack overlapAttack; [NonSerialized] public ChildLocator childLocator; [NonSerialized] public bool inHitPause; [NonSerialized] public bool inM2HitPause; [NonSerialized] public float hitPauseTimer; [NonSerialized] public AimRequest aimRequest; public override void OnEnter() { //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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); weapon = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } if (Object.op_Implicit((Object)(object)modelTransform)) { animator = ((Component)modelTransform).GetComponent(); characterModel = ((Component)modelTransform).GetComponent(); childLocator = ((Component)modelTransform).GetComponent(); hurtboxGroup = ((Component)modelTransform).GetComponent(); } overlapAttack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, modelTransform, "Assaulter"); overlapAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)32); overlapAttack.damageType.damageSource = (DamageSource)8; DamageAPI.AddModdedDamageType(overlapAttack, SS2.Survivors.NemMerc.damageType); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).GetPoint(baseDashDistance); if (Object.op_Implicit((Object)(object)target)) { Vector3 val2 = target.transform.position - ((EntityState)this).transform.position; float magnitude = ((Vector3)(ref val2)).magnitude; Vector3 normalized = ((Vector3)(ref val2)).normalized; val = normalized * (magnitude + dashBehindDistance) + ((EntityState)this).transform.position; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(target.transform.position, normalized, ref val3, dashBehindDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { val = ((RaycastHit)(ref val3)).point; } } Vector3 val4 = val - ((EntityState)this).transform.position; dashSpeed = ((Vector3)(ref val4)).magnitude / dashDuration; dashVector = ((Vector3)(ref val4)).normalized; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); CreateDashEffect(); ((EntityState)this).PlayCrossfade("FullBody, Override", "AssaulterLoop", 0.1f); entryLayer = ((EntityState)this).gameObject.layer; ((EntityState)this).gameObject.layer = (Object.op_Implicit((Object)(object)target) ? LayerIndex.noCollision.intVal : LayerIndex.debris.intVal); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 1.2f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj.AddToCharacterModel(((Component)modelTransform).GetComponent()); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility.buffIndex); } } private void GatherInputs() { GenericSkill secondary = ((EntityState)this).skillLocator.secondary; if (((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed && secondary.IsReady() && secondary.skillDef.skillNameToken == "SS2_NEMESIS_MERCENARY_SECONDARY_SLASH_NAME") { m2Buffered = true; } } public void CreateDashEffect() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) Transform val = childLocator.FindChild("DashCenter"); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)dashPrefab)) { Object.Instantiate(dashPrefab, val.position, Util.QuaternionSafeLookRotation(dashVector), val); } } public override void FixedUpdate() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); GatherInputs(); ((EntityState)this).characterDirection.forward = dashVector; if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; if (!inHitPause) { stopwatch += Time.fixedDeltaTime; if (overlapAttack.Fire((List)null)) { if (!hasHit) { hasHit = true; } inHitPause = true; hitPauseTimer = hitPauseDuration / ((BaseState)this).attackSpeedStat; if (m2Buffered) { m2Buffered = false; ((EntityState)this).skillLocator.secondary.DeductStock(1); hitPauseTimer += m2HitPauseDuration / ((BaseState)this).attackSpeedStat; inM2HitPause = true; ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); if (Object.op_Implicit((Object)(object)weapon)) { weapon.SetNextState((EntityState)(object)new WhirlwindAssaulter()); } } if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = hitPauseDuration / ((BaseState)this).attackSpeedStat; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); obj.AddToCharacterModel(((Component)modelTransform).GetComponent()); } } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashVector * dashSpeed * Time.fixedDeltaTime; } else { hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer < 0f) { inM2HitPause = false; inHitPause = false; } } } if (stopwatch >= dashDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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) ((EntityState)this).gameObject.layer = entryLayer; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); Util.PlaySound(endSoundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.1f; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); } AimRequest val = aimRequest; if (val != null) { val.Dispose(); } ((EntityState)this).PlayAnimation("FullBody, Override", "EvisLoopExit", "Special.playbackRate", 1f, 0f); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility.buffIndex); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } public override void OnSerialize(NetworkWriter writer) { writer.Write(target); } public override void OnDeserialize(NetworkReader reader) { target = reader.ReadGameObject(); } } public class ThrowKnife : BaseSkillState { public static GameObject projectilePrefab; public string soundString; public GameObject muzzleEffectPrefab; public string muzzleName; public static float bloom = 1f; public static float recoilAmplitude = 1f; public static float fireTime = 0.5f; public static float baseDuration = 0.5f; public static float damageCoefficient = 2f; public static float force = 100f; public static float projectileHSpeed = 140f; private bool hasFired; public float duration; public static float autoAimRadius = 2.5f; public static float autoAimDistance = 50f; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); ((EntityState)this).PlayAnimation("Gesture, Override", "ThrowKnife", "Secondary.playbackRate", duration * 2f, 0f); if (!((BaseState)this).isGrounded) { ((EntityState)this).PlayAnimation("Body", "Jump"); } Util.PlaySound("Play_nemmerc_secondary_lunge", ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).fixedAge >= duration * fireTime) { hasFired = true; Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } if (!((BaseState)this).isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 1f); } } private void Fire() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: 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_0183: 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_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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_00ef: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_014d: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound("Play_nemmerc_knife_throw", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleName, true); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).direction; float speedOverride = -1f; RaycastHit val2 = default(RaycastHit); if (Util.CharacterSpherecast(((EntityState)this).gameObject, aimRay, autoAimRadius, ref val2, autoAimDistance, ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, (QueryTriggerInteraction)0)) { Vector3 val3 = ((RaycastHit)(ref val2)).point; HurtBox component = ((Component)((RaycastHit)(ref val2)).collider).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { val3 = ((Component)component).transform.position; } Vector3 val4 = val3 - ((Ray)(ref aimRay)).origin; Vector2 val5 = default(Vector2); ((Vector2)(ref val5))..ctor(val4.x, val4.z); float num = Trajectory.CalculateInitialYSpeed(((Vector2)(ref val5)).magnitude / projectileHSpeed, val4.y); Vector3 val6 = default(Vector3); ((Vector3)(ref val6))..ctor(((Vector2)(ref val5)).normalized.x * projectileHSpeed, num, ((Vector2)(ref val5)).normalized.y * projectileHSpeed); speedOverride = ((Vector3)(ref val6)).magnitude; val = ((Vector3)(ref val6)).normalized; } if (((EntityState)this).isAuthority) { FireProjectileInfo val7 = new FireProjectileInfo { projectilePrefab = projectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(val), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, force = force, crit = ((BaseState)this).RollCrit() }; ((FireProjectileInfo)(ref val7)).speedOverride = speedOverride; val7.damageTypeOverride = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)1024), (DamageTypeExtended)0, (DamageSource)2); ProjectileManager.instance.FireProjectile(val7); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class WhirlwindAssaulter : WhirlwindBase { } public class WhirlwindBase : BaseSkillState { [SerializeField] public float walkSpeedCoefficient = 0.5f; [SerializeField] public float damageCoefficient = 3.5f; [SerializeField] public float smallHopVelocity = 8f; [SerializeField] public float baseDuration = 0.5f; [SerializeField] public float numAttacks = 2f; [SerializeField] public float hitPauseDuration = 0.05f; [SerializeField] public float entryVelocityDamp = 0.5f; [SerializeField] public float attackSoundPitch = 1f; [SerializeField] public string hitboxGroupName; [SerializeField] public string muzzleName; [SerializeField] public string attackSoundString = "NemmandoFireBeam2"; [SerializeField] public GameObject hitEffectPrefab; [SerializeField] public GameObject swingEffectPrefab; [SerializeField] public InterruptPriority interruptPriority = (InterruptPriority)2; private Animator animator; private float duration; private float timeBetweenAttacks; private float attackStopwatch; private OverlapAttack attack; private float timesAttacked; [NonSerialized] public bool hitEnemy; private bool isInHitPause; private float hitPauseTimer; private HitStopCachedState hitStopCachedState; public override void OnEnter() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((BaseState)this).StartAimMode(2f, false); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; timeBetweenAttacks = duration / numAttacks; attack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), hitboxGroupName); DamageAPI.AddModdedDamageType(attack, SS2.Survivors.NemMerc.damageType); attack.damageType.damageSource = (DamageSource)2; ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedCoefficient; ((EntityState)this).PlayAnimation("FullBody, Override", "SecondarySlash", "Secondary.playbackRate", duration * 0.825f, 0f); ((EntityState)this).PlayAnimation("Gesture, Override", "SecondarySlash", "Secondary.playbackRate", duration * 0.825f, 0f); } public override void FixedUpdate() { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!isInHitPause) { attackStopwatch -= Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity.y = Mathf.Max(((EntityState)this).characterMotor.velocity.y, 0f); if (attackStopwatch <= 0f && timesAttacked < numAttacks) { FireAttack(); if (timesAttacked == numAttacks && !((BaseState)this).isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; } } } else { ((EntityState)this).characterMotor.velocity = Vector3.zero; hitPauseTimer -= Time.fixedDeltaTime; animator.SetFloat("Secondary.playbackRate", 0f); } if (((EntityState)this).isAuthority) { if (attack.Fire((List)null)) { OnHitEnemyAuthority(); } if (hitPauseTimer <= 0f && isInHitPause) { ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); isInHitPause = false; } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } private void FireAttack() { Util.PlayAttackSpeedSound(attackSoundString, ((EntityState)this).gameObject, attackSoundPitch); EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, muzzleName, false); attackStopwatch += timeBetweenAttacks; attack.ResetIgnoredHealthComponents(); timesAttacked += 1f; } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; while (timesAttacked < numAttacks) { FireAttack(); attack.Fire((List)null); } } private void OnHitEnemyAuthority() { //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) if (!isInHitPause) { hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "Secondary.playbackRate"); hitPauseTimer = hitPauseDuration / ((BaseState)this).attackSpeedStat; isInHitPause = true; } } public override InterruptPriority GetMinimumInterruptPriority() { if (timesAttacked < numAttacks) { return (InterruptPriority)2; } return (InterruptPriority)1; } } } namespace EntityStates.NemMerc.Clone { public class CloneDeath : GenericCharacterDeath { public override bool shouldAutoDestroy => true; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); ((GenericCharacterDeath)this).DestroyModel(); } } } namespace EntityStates.NemKnight { public class ChargeSpellsSpecial : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class CrossCounter : BasicMeleeAttack { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); } public override void FixedUpdate() { ((BasicMeleeAttack)this).FixedUpdate(); } public override void OnExit() { ((BasicMeleeAttack)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class ResetOverrides : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class SpearCharge : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class SpearPrimary : BasicMeleeAttack, IStepSetter { public float baseDuration = 0.5f; private float duration; public void SetStep(int i) { } public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); } public override void FixedUpdate() { ((BasicMeleeAttack)this).FixedUpdate(); } public override void OnExit() { ((BasicMeleeAttack)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class SpellTemplate : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.NemHuntress2 { public class BaseChargeArrow : BaseSkillState { [SerializeField] public float baseChargeDuration; private float chargeDuration; [SerializeField] public float maxDamageCoefficient; [SerializeField] public float minDamageCoefficient; [SerializeField] public float procCoefficient; [SerializeField] public float minRecoil; [SerializeField] public float maxRecoil; [SerializeField] public float minProjectileSpeed; [SerializeField] public float maxProjectileSpeed; [SerializeField] public float fireDuration; [SerializeField] public float maxSpreadAngle; private bool hasPlayedSound; private OverrideRequest crosshairOverrideRequest; private float baseSpreadRate; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; Util.PlayAttackSpeedSound("NemHuntressChargeBow", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, ((EntityState)this).characterBody.defaultCrosshairPrefab, (OverridePriority)2); baseSpreadRate = ((EntityState)this).characterBody.spreadBloomDecayTime; ((EntityState)this).characterBody.spreadBloomDecayTime = 50f; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); if (num >= 1f) { num = 1f; if (!hasPlayedSound) { hasPlayedSound = true; Util.PlaySound("NemHuntressBowMax", ((EntityState)this).gameObject); } } ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 1f), true); ((BaseState)this).StartAimMode(2f, false); if (!((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f) { BaseFireArrow baseFireArrow = new BaseFireArrow(); baseFireArrow.charge = num; baseFireArrow.maxDamageCoefficient = maxDamageCoefficient; baseFireArrow.minDamageCoefficient = minDamageCoefficient; baseFireArrow.procCoefficient = procCoefficient; baseFireArrow.minRecoil = minRecoil; baseFireArrow.maxRecoil = maxRecoil; baseFireArrow.minProjectileSpeed = minProjectileSpeed; baseFireArrow.maxProjectileSpeed = maxProjectileSpeed; baseFireArrow.baseDuration = fireDuration; baseFireArrow.maxSpreadAngle = maxSpreadAngle; ((EntityState)this).outer.SetNextState((EntityState)(object)baseFireArrow); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } public override void OnExit() { OverrideRequest val = crosshairOverrideRequest; if (val != null) { val.Dispose(); } ((EntityState)this).OnExit(); ((EntityState)this).characterBody.spreadBloomDecayTime = baseSpreadRate; } } public class BaseFireArrow : BaseSkillState { public float charge; public GameObject projectilePrefab; public float maxDamageCoefficient; public float minDamageCoefficient; public float procCoefficient; public float minRecoil; public float maxRecoil; public float minProjectileSpeed; public float maxProjectileSpeed; public float maxSpreadAngle; public float baseDuration; private float damageCoefficient; private float recoil; private float projectileSpeed; private float duration; private float spread; private bool hasFired; private NemHuntressController nhc; public override void OnEnter() { ((BaseState)this).OnEnter(); nhc = ((Component)((EntityState)this).characterBody).GetComponent(); if ((Object)(object)nhc != (Object)null) { projectilePrefab = nhc.currentArrow; } if ((Object)(object)projectilePrefab == (Object)null) { Debug.Log((object)"nemhuntress arrow projectile prefab is null .. what did you do?"); return; } ((EntityState)this).characterBody.SetAimTimer(2f); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoefficient, maxDamageCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); projectileSpeed = Util.Remap(charge, 0f, 1f, minProjectileSpeed, maxProjectileSpeed); spread = 0f; Util.PlayAttackSpeedSound("NemHuntressFireBow", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); FireProjectile(); } public virtual void FireProjectile() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_0101: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_014e: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: 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_024f: 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_025e: Unknown result type (might be due to invalid IL or missing references) if (hasFired) { return; } hasFired = true; float damage = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, spread, spread); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction, damage); if (((EntityState)this).skillLocator.primary.stock > 1) { Vector3 direction2 = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, spread + 0f, -2f - spread); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction2, damage); if (((EntityState)this).skillLocator.primary.stock > 2) { Vector3 direction3 = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, spread + 0f, spread + 2f); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction3, damage); if (((EntityState)this).skillLocator.primary.stock > 3) { Vector3 direction4 = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, 1.5f + spread, spread + 1.5f); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction4, damage); if (((EntityState)this).skillLocator.primary.stock > 4) { Vector3 direction5 = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, 1.5f + spread, -1.5f - spread); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction5, damage); if (((EntityState)this).skillLocator.primary.stock > 5) { Vector3 direction6 = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, -1.5f - spread, spread + 1.5f); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction6, damage); if (((EntityState)this).skillLocator.primary.stock > 6) { Vector3 direction7 = CalculateSpreadDirection(((Ray)(ref aimRay)).direction, -1.5f - spread, -1.5f - spread); FireArrowProjectile(((Ray)(ref aimRay)).origin, direction7, damage); } } } } } } ((EntityState)this).skillLocator.primary.stock = 1; nhc.currentArrow = nhc.baseArrow; } private void FireArrowProjectile(Vector3 origin, Vector3 direction, float damage) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) ProjectileManager.instance.FireProjectile(projectilePrefab, origin, Util.QuaternionSafeLookRotation(direction), ((EntityState)this).gameObject, damage, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed, (DamageTypeCombo?)null); } private Vector3 CalculateSpreadDirection(Vector3 aimDirection, float angleOffsetX, float angleOffsetY) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return Quaternion.Euler(0f - angleOffsetX, angleOffsetY, 0f) * aimDirection; } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).skillLocator.primary, ((EntityState)this).skillLocator.primary.skillDef, (SkillOverridePriority)4); ((EntityState)this).skillLocator.special.cooldownScale = 1f; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class BaseSwapArrow : BaseState { [SerializeField] public float baseDuration = 0.2f; [SerializeField] public GameObject arrowPrefab; private float duration; private int primaryStockCount; private NemHuntressController nhc; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; nhc = ((Component)((EntityState)this).characterBody).GetComponent(); if ((Object)(object)nhc != (Object)null) { nhc.currentArrow = arrowPrefab; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } } public class ChargeArrow : BaseChargeArrow { } public class ChargeExplosiveArrow : BaseChargeArrow { } public class GlaiveHop : BaseSkillState { public float charge; public static float hopVelocity; [SerializeField] public static float baseDuration; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); CastHop(); } private void CastHop() { if (((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); } else { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity * 0.4f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= baseDuration && ((EntityState)this).isAuthority) { GlaiveThrow nextState = new GlaiveThrow(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } internal class GlaiveThrow : BaseSkillState { [SerializeField] public static float projectileDmgCoefficient; [SerializeField] public static float projectileProcCoefficient; [SerializeField] public static float projectileRecoilAmount; [SerializeField] public static float projectileBaseSpeed; [SerializeField] public static GameObject projectilePrefab; [SerializeField] public static float baseDuration; private bool hasFired; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); hasFired = false; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity.y = 3f; } duration = baseDuration / ((BaseState)this).attackSpeedStat; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterMotor.velocity.y += 30f * Time.fixedDeltaTime * (1f - ((EntityState)this).fixedAge / duration); if (((EntityState)this).fixedAge >= duration / 2f && ((EntityState)this).isAuthority) { FireProjectile(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } else { duration = baseDuration / ((BaseState)this).attackSpeedStat; } } public virtual void FireProjectile() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; if (((EntityState)this).isAuthority) { float num = projectileDmgCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * projectileRecoilAmount, -3f * projectileRecoilAmount, -1f * projectileRecoilAmount, 1f * projectileRecoilAmount); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * projectileRecoilAmount); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileBaseSpeed, (DamageTypeCombo?)null); } } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class MiniDash : MiniBlinkState { public override void OnEnter() { ((BlinkState)this).OnEnter(); } public override void OnExit() { ((BlinkState)this).OnExit(); } } public class SwapExplosiveArrow : BaseSwapArrow { public override void OnEnter() { base.OnEnter(); } } } namespace EntityStates.NemHuntress { public class Blink : BaseState { private Transform modelTransform; public static GameObject blinkprefab; private CharacterModel characterModel; private HurtBoxGroup hurtboxGroup; private float stopwatch; private Vector3 blinkVector = Vector3.zero; [SerializeField] public float duration = 0.3f; [SerializeField] public float speedCoefficient = 25f; [SerializeField] public string beginSoundString; [SerializeField] public string endSoundString; public override void OnEnter() { //IL_009e: 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_00af: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent(); hurtboxGroup = ((Component)modelTransform).GetComponent(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount + 1; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { int hurtBoxesDeactivatorCounter = hurtboxGroup.hurtBoxesDeactivatorCounter + 1; hurtboxGroup.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } blinkVector = GetBlinkVector(); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); } protected virtual Vector3 GetBlinkVector() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).inputBank.aimDirection; } private void CreateBlinkEffect(Vector3 origin) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(blinkVector); val.origin = origin; EffectManager.SpawnEffect(blinkprefab, val, false); } public override void FixedUpdate() { //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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += blinkVector * (base.moveSpeedStat * speedCoefficient * Time.fixedDeltaTime); } if (stopwatch >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).outer.destroying) { Util.PlaySound(endSoundString, ((EntityState)this).gameObject); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); modelTransform = ((EntityState)this).GetModelBaseTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 0.6f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = LegacyResourcesAPI.Load("Materials/matHuntressFlashBright"); obj.AddToCharacterModel(((Component)modelTransform).GetComponent()); TemporaryOverlayInstance obj2 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj2.duration = 0.7f; obj2.animateShaderAlpha = true; obj2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj2.destroyComponentOnEnd = true; obj2.originalMaterial = LegacyResourcesAPI.Load("Materials/matHuntressFlashExpanded"); obj2.AddToCharacterModel(((Component)modelTransform).GetComponent()); } } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj3 = characterModel; int invisibilityCount = obj3.invisibilityCount; obj3.invisibilityCount = invisibilityCount - 1; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { _ = hurtboxGroup; int hurtBoxesDeactivatorCounter = hurtboxGroup.hurtBoxesDeactivatorCounter - 1; hurtboxGroup.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; } ((EntityState)this).OnExit(); } } public class ChargeArrow : BaseSkillState { public static float baseChargeDuration = 1.75f; public static float maxEmission; public static float minEmission; public static GameObject lightningEffect; public static NetworkSoundEventDef sound; private float chargeDuration; private bool hasPlayedSound; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; } public override void FixedUpdate() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); float num = CalcCharge(); if (num > 1f) { num = 1f; if (Object.op_Implicit((Object)(object)sound) && !hasPlayedSound) { Debug.Log((object)"attempting to play full charge sound"); hasPlayedSound = true; EffectManager.SimpleSoundEffect(sound.index, ((EntityState)this).transform.position, true); } } ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 1f), true); ((BaseState)this).StartAimMode(2f, false); if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f) { FireArrow fireArrow = new FireArrow(); fireArrow.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)fireArrow); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class ChargeBurstArrow : BaseSkillState { public static float baseChargeDuration = 2.1f; public static float maxEmission; public static float minEmission; public static GameObject lightningEffect; private float chargeDuration; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 3f), true); ((BaseState)this).StartAimMode(2f, false); if ((double)num >= 0.142 && ((EntityState)this).characterBody.skillLocator.primary.stock == 1) { GenericSkill primary = ((EntityState)this).characterBody.skillLocator.primary; int stock = primary.stock; primary.stock = stock + 1; } if (((EntityState)this).isAuthority && (num >= 1f || (!((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f))) { FireBurstArrow fireBurstArrow = new FireBurstArrow(); fireBurstArrow.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)fireBurstArrow); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class ChargeExplosiveArrow : BaseSkillState { public static float baseChargeDuration = 1.75f; public static float maxEmission; public static float minEmission; public static GameObject lightningEffect; public static NetworkSoundEventDef sound; private float chargeDuration; private bool hasPlayedSound; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; } public override void FixedUpdate() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); float num = CalcCharge(); if (num > 1f) { num = 1f; if (Object.op_Implicit((Object)(object)sound) && !hasPlayedSound) { hasPlayedSound = true; EffectManager.SimpleSoundEffect(sound.index, ((EntityState)this).transform.position, true); } } ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 1f), true); ((BaseState)this).StartAimMode(2f, false); if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f) { FireExplosiveArrow fireExplosiveArrow = new FireExplosiveArrow(); fireExplosiveArrow.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)fireExplosiveArrow); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class FireArrow : BaseSkillState { public float charge; public static float maxDamageCoefficient; public static float minDamageCoeffficient; public static float procCoefficient; public static float maxRecoil; public static float minRecoil; public static float maxProjectileSpeed; public static float minProjectileSpeed; public static float baseDuration; public static GameObject projectilePrefab; private float damageCoefficient; private float recoil; private float projectileSpeed; private float duration; private float fireDuration; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoeffficient, maxDamageCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); projectileSpeed = Util.Remap(charge, 0f, 1f, minProjectileSpeed, maxProjectileSpeed); fireDuration = 0.4f * duration; _ = charge; _ = 0.6f; bool num = animator.GetBool("isMoving"); bool flag = animator.GetBool("isGrounded"); _ = !num && flag; } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireProjectile() { //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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; if (((EntityState)this).isAuthority) { float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed, (DamageTypeCombo?)null); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireProjectile(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class FireBurstArrow : BaseSkillState { public float charge; public static float maxDamageCoefficient; public static float minDamageCoeffficient; public static float procCoefficient; public static float maxRecoil; public static float minRecoil; public static float maxProjectileSpeed; public static float minProjectileSpeed; public static float baseDuration; public static GameObject projectilePrefab; private float damageCoefficient; private float recoil; private float projectileSpeed; private float duration; private float fireDuration; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoeffficient, maxDamageCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); projectileSpeed = Util.Remap(charge, 0f, 1f, minProjectileSpeed, maxProjectileSpeed); fireDuration = 0.4f * duration; _ = charge; _ = 0.6f; bool num = animator.GetBool("isMoving"); bool flag = animator.GetBool("isGrounded"); _ = !num && flag; } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireProjectile() { //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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) if (hasFired) { return; } hasFired = true; if (!((EntityState)this).isAuthority) { return; } float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed, (DamageTypeCombo?)null); if ((double)charge >= 0.142) { ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(new Vector3(((Ray)(ref aimRay)).direction.x, ((Ray)(ref aimRay)).direction.y + 5f, ((Ray)(ref aimRay)).direction.z)), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed, (DamageTypeCombo?)null); if (((EntityState)this).characterBody.skillLocator.primary.stock != 1) { GenericSkill primary = ((EntityState)this).characterBody.skillLocator.primary; int stock = primary.stock; primary.stock = stock - 1; } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireProjectile(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class FireExplosiveArrow : BaseSkillState { public float charge; public static float maxDamageCoefficient; public static float minDamageCoeffficient; public static float procCoefficient; public static float maxRecoil; public static float minRecoil; public static float maxProjectileSpeed; public static float minProjectileSpeed; public static float baseDuration; public static GameObject projectilePrefab; private float damageCoefficient; private float recoil; private float projectileSpeed; private float duration; private float fireDuration; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoeffficient, maxDamageCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); projectileSpeed = Util.Remap(charge, 0f, 1f, minProjectileSpeed, maxProjectileSpeed); fireDuration = 0.4f * duration; _ = charge; _ = 0.6f; bool num = animator.GetBool("isMoving"); bool flag = animator.GetBool("isGrounded"); _ = !num && flag; } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireProjectile() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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) if (!hasFired) { hasFired = true; if (((EntityState)this).isAuthority) { float num = maxDamageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed, (DamageTypeCombo?)null); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireProjectile(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class SwapArrowExplosive : BaseState { public static float baseDuration = 0.2f; public static GameObject arrowPrefab; private float duration; private NemHuntressController nhc; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; nhc = ((Component)((EntityState)this).characterBody).GetComponent(); if ((Object)(object)nhc != (Object)null) { nhc.currentArrow = arrowPrefab; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } } public class ThrowHatchet : BaseSkillState { public float charge; public static float dmgCoefficient; public static float procCoefficient; public static float recoilAmount; public static float projSpeed; public static float baseDuration; public static GameObject projectilePrefab; private float damageCoefficient; private float recoil; private float projectileSpeed; private float duration; private float fireDuration; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; damageCoefficient = dmgCoefficient; recoil = recoilAmount; projectileSpeed = projSpeed; fireDuration = 0.1f * duration; _ = charge; _ = 0.6f; bool num = animator.GetBool("isMoving"); bool flag = animator.GetBool("isGrounded"); _ = !num && flag; } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireProjectile() { //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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; if (((EntityState)this).isAuthority) { float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed, (DamageTypeCombo?)null); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireProjectile(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } } namespace EntityStates.NemExecutioner { public class FireFearProjectile : BaseSkillState { public static GameObject projectilePrefab; public string soundString; public GameObject muzzleEffectPrefab; public string muzzleName; private static float bloom = 1f; private static float recoilAmplitude = 1f; private static float fireTime = 0.5f; private static float baseDuration = 0.5f; private static float damageCoefficient = 2f; private static float force = 100f; private static string fireSoundString = "Play_mage_m1_shoot"; private static float selfAwayForce = 11f; private static float selfUpForce = 11f; private bool hasFired; public float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); ((EntityState)this).PlayAnimation("Gesture, Override", "FireUtility", "Utility.playbackRate", duration, 0f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).fixedAge >= duration * fireTime) { hasFired = true; Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_00a2: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound(fireSoundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleName, true); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; if (((EntityState)this).isAuthority) { FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = projectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(direction), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, force = force, crit = ((BaseState)this).RollCrit() }; DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)0); DamageAPI.AddModdedDamageType(ref value, SS2.Survivors.NemExecutioner.fearOnHit); value.damageSource = (DamageSource)4; val.damageTypeOverride = value; ProjectileManager.instance.FireProjectile(val); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class FireRicochetBall : BaseSkillState { public static GameObject projectilePrefab; public string soundString; public GameObject muzzleEffectPrefab; public string muzzleName; private static float bloom = 1f; private static float recoilAmplitude = 1f; private static float fireTime = 0.1f; private static float baseDuration = 0.4f; private static float damageCoefficient = 1f; private static float force = 100f; private static string fireSoundString = "Play_mage_m1_shoot"; private bool hasFired; public float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); ((EntityState)this).PlayAnimation("Gesture, Override", "FirePrimary", "Primary.playbackRate", duration, 0f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).fixedAge >= duration * fireTime) { hasFired = true; Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_00a2: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: 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_010e: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound(fireSoundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleName, true); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; if (((EntityState)this).isAuthority) { FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = projectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(direction), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, force = force, crit = ((BaseState)this).RollCrit() }; DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)0); value.damageSource = (DamageSource)1; val.damageTypeOverride = value; ProjectileManager.instance.FireProjectile(val); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class ChargeReap : BaseSkillState { private static float baseDuration = 1.5f; private static float maxDashDistance = 45f; private static float minDashDistance = 10f; public static GameObject effectPrefab; public static GameObject indicatorPrefab; private static Vector3 indicatorScale = new Vector3(5f, 5f, 5f); private static string muzzle = "Chest"; private static string chargeSoundString = "NemmandoDecisiveStrikeCharge"; private CameraParamsOverrideHandle camOverrideHandle; private static float cameraLerpDuration = 0.5f; private static float cameraPivotVerticalOffset = 1.37f; private static Vector3 cameraPosition = new Vector3(0f, 2f, -16f); private CharacterCameraParamsData cameraParams = new CharacterCameraParamsData { pivotVerticalOffset = BlendableFloat.op_Implicit(cameraPivotVerticalOffset), idealLocalCameraPos = BlendableVector3.op_Implicit(cameraPosition) }; private float duration; private uint soundID; private GameObject effectInstance; private GameObject indicatorInstance; public override void OnEnter() { //IL_00a1: 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_0179: 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_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: 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_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; soundID = Util.PlayAttackSpeedSound(chargeSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayAnimation("Gesture, Override", "ChargeReap", "Special.playbackRate", duration, 0f); ((EntityState)this).characterBody.SetAimTimer(duration + 1f); Transform val = ((BaseState)this).FindModelChild(muzzle) ?? ((EntityState)this).characterBody.coreTransform; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)effectPrefab)) { effectInstance = Object.Instantiate(effectPrefab, val.position, val.rotation); effectInstance.transform.parent = val; ScaleParticleSystemDuration component = effectInstance.GetComponent(); ObjectScaleCurve component2 = effectInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = duration; } if (Object.op_Implicit((Object)(object)component2)) { component2.timeMax = duration; } } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = duration; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { CameraParamsOverrideRequest val2 = new CameraParamsOverrideRequest { cameraParamsData = cameraParams, priority = 1f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, cameraLerpDuration); } if (Object.op_Implicit((Object)(object)indicatorPrefab)) { Ray aimRay = ((BaseState)this).GetAimRay(); indicatorInstance = Object.Instantiate(indicatorPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction)); indicatorInstance.transform.localScale = new Vector3(indicatorScale.x, indicatorScale.y, minDashDistance); } } public override void FixedUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterMotor.useGravity = false; } if ((((EntityState)this).isAuthority && ((EntityState)this).fixedAge > duration) || !((BaseSkillState)this).IsKeyDownAuthority()) { float num = ((EntityState)this).fixedAge / duration; float dashDistance = Mathf.Lerp(minDashDistance, maxDashDistance, num); ((EntityState)this).outer.SetNextState((EntityState)(object)new Reap { dashDistance = dashDistance }); } } public override void Update() { //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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)indicatorInstance)) { float num = ((EntityState)this).age / duration; float num2 = Mathf.Lerp(minDashDistance, maxDashDistance, num); Ray aimRay = ((BaseState)this).GetAimRay(); indicatorInstance.transform.SetPositionAndRotation(((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction)); indicatorInstance.transform.localScale = new Vector3(indicatorScale.x, indicatorScale.y, num2); } } public override void OnExit() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.useGravity = true; } if (Object.op_Implicit((Object)(object)effectInstance)) { EntityState.Destroy((Object)(object)effectInstance); } if (Object.op_Implicit((Object)(object)indicatorInstance)) { EntityState.Destroy((Object)(object)indicatorInstance); } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.1f); } AkSoundEngine.StopPlayingID(soundID); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class Reap : BaseState { public static GameObject dashPrefab; private static float smallHopVelocity; private static float dashDuration = 0.2f; private static string beginSoundString; private static string endSoundString; private static float damageCoefficient = 15f; private static float procCoefficient = 1f; public static GameObject hitEffectPrefab; private static float hitPauseDuration = 0.3f; private float dashSpeed; private Transform modelTransform; private float stopwatch; private Vector3 dashVector = Vector3.zero; private OverlapAttack overlapAttack; private ChildLocator childLocator; private bool inHitPause; private float hitPauseTimer; private CameraParamsOverrideHandle camOverrideHandle; private static float cameraLerpDuration = 0.25f; private static float cameraPivotVerticalOffset = 1.37f; private static Vector3 cameraPosition = new Vector3(0f, 1f, -12f); private CharacterCameraParamsData cameraParams = new CharacterCameraParamsData { pivotVerticalOffset = BlendableFloat.op_Implicit(cameraPivotVerticalOffset), idealLocalCameraPos = BlendableVector3.op_Implicit(cameraPosition) }; public float dashDistance; public override void OnEnter() { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00d1: 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_00da: 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_01c6: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); CreateDashEffect(); ((EntityState)this).PlayCrossfade("FullBody, Override", "AssaulterLoop", 0.1f); Util.PlaySound(beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 1.2f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matNemergize", SS2Bundle.NemMercenary); } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { CameraParamsOverrideRequest val = new CameraParamsOverrideRequest { cameraParamsData = cameraParams, priority = 2f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val, cameraLerpDuration); } dashVector = ((EntityState)this).inputBank.aimDirection; ((EntityState)this).characterDirection.forward = ((Vector3)(ref dashVector)).normalized; dashSpeed = dashDistance / dashDuration; ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); overlapAttack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, modelTransform, "Reap"); overlapAttack.procCoefficient = procCoefficient; overlapAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)524288); DamageAPI.AddModdedDamageType(ref overlapAttack.damageType, SS2.Survivors.NemExecutioner.healNovaOnKill); overlapAttack.damageType.damageSource = (DamageSource)8; if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility.buffIndex); } } public void CreateDashEffect() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound("Play_nemmerc_dash", ((EntityState)this).gameObject); childLocator = ((EntityState)this).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)childLocator)) { Transform val = childLocator.FindChild("DashCenter"); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)dashPrefab)) { Object.Instantiate(dashPrefab, val.position, Util.QuaternionSafeLookRotation(dashVector), val); } } } public override void FixedUpdate() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterDirection.forward = dashVector; if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; if (!inHitPause) { stopwatch += Time.fixedDeltaTime; if (overlapAttack.Fire((List)null)) { OnMeleeHitAuthority(); } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashVector * dashSpeed * Time.fixedDeltaTime; } else { hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer < 0f) { inHitPause = false; } } } if (stopwatch >= dashDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void OnMeleeHitAuthority() { inHitPause = true; hitPauseTimer = hitPauseDuration / base.attackSpeedStat; if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = hitPauseDuration / base.attackSpeedStat; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = LegacyResourcesAPI.Load("Materials/matMercEvisTarget"); } } public override void OnExit() { //IL_0063: 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_00a4: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); Util.PlaySound(endSoundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, smallHopVelocity); } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.1f); } ((EntityState)this).PlayAnimation("FullBody, Override", "EvisLoopExit", "Special.playbackRate", 1f, 0f); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility.buffIndex); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class SummonGhouls : BaseSkillState, IInventorySetupCallback { public static GameObject masterPrefab; private static int summonLifetime = 24; private static float baseSummonInterval = 0.2f; private static float summonRadius = 8f; private static string summonTransformString = "Summon"; private static float walkSpeedCoefficient = 0.5f; private static float up = 5f; private static float down = 10f; private float summonInterval; private float stopwatch; private Transform summonTransform; public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } public override void OnEnter() { ((BaseState)this).OnEnter(); summonInterval = baseSummonInterval / ((BaseState)this).attackSpeedStat; Transform val = ((BaseState)this).FindModelChild(summonTransformString); summonTransform = (Object.op_Implicit((Object)(object)val) ? val : ((EntityState)this).characterBody.coreTransform); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedCoefficient; } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(2f); ((EntityState)this).characterBody.isSprinting = false; stopwatch -= Time.fixedDeltaTime; if (stopwatch <= 0f) { stopwatch += summonInterval; ((BaseSkillState)this).activatorSkillSlot.DeductStock(1); SummonGhoul(); } if (((BaseSkillState)this).activatorSkillSlot.stock <= 0) { ((EntityState)this).outer.SetNextStateToMain(); } } public void SetupSummonedInventory([NotNull] MasterSummon masterSummon, [NotNull] Inventory summonedInventory) { summonedInventory.GiveItem(SS2Content.Items.HealthDecayWithRegen, summonLifetime); } private void SummonGhoul() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; direction.y = 0f; ((Ray)(ref aimRay)).direction = ((Vector3)(ref direction)).normalized; Vector3 point = ((Ray)(ref aimRay)).GetPoint(summonRadius); Vector2 val = Random.insideUnitCircle * summonRadius; Vector3 position; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast((position = new Vector3(val.x + point.x, point.y, val.y + point.z)) + Vector3.up * up, Vector3.down, ref val2, down, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { position = ((RaycastHit)(ref val2)).point; } CharacterMaster val3 = new MasterSummon { masterPrefab = masterPrefab, position = position, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), summonerBodyObject = ((EntityState)this).gameObject, ignoreTeamMemberLimit = true, inventorySetupCallback = (IInventorySetupCallback)(object)this }.Perform(); Deployable val4 = ((Component)val3).gameObject.AddComponent(); val4.onUndeploy = new UnityEvent(); val4.onUndeploy.AddListener(new UnityAction(val3.TrueKill)); ((EntityState)this).characterBody.master.AddDeployable(val4, SS2.Survivors.NemExecutioner.Ghoul); } } } } namespace EntityStates.NemCommando { public class GrenadeLeap : BaseSkillState { public static float baseDuration; private float duration; public static float airControl; private float previousAirControl; public static float upwardVelocity; public static float forwardVelocity; public static float minimumY; public static float aimVelocity; private float throwDur; private bool hasThrown; public static GameObject projectilePrefab; public static float damageCoefficient; public static float projectileSpeed; private Animator animator; public override void OnEnter() { //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_00d7: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_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_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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; throwDur = duration * 0.6f; ((EntityState)this).characterBody.SetAimTimer(duration * 1.2f); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayCrossfade("Body", "AltUtility", "Utility.rate", duration * 1.4f, 0.05f); ((EntityState)this).PlayCrossfade("FullBody, Override", "AltUtility", "Utility.rate", duration * 1.4f, 0.05f); Util.PlaySound(DodgeState.dodgeSoundString, ((EntityState)this).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = -((Ray)(ref aimRay)).direction; if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; val.y = Mathf.Max(val.y, minimumY); Vector3 val2 = ((Vector3)(ref val)).normalized * aimVelocity * ((BaseState)this).moveSpeedStat; Vector3 val3 = Vector3.up * upwardVelocity; Vector3 val4 = new Vector3(val.x, 0f, val.z); Vector3 val5 = ((Vector3)(ref val4)).normalized * forwardVelocity; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = val2 + val3 + val5; } } public override void FixedUpdate() { if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } if (!hasThrown && animator.GetFloat("throwGrenades") >= 0.5f) { hasThrown = true; ThrowGrenades(); Util.PlaySound("Play_commando_M2_grenade_throw", ((EntityState)this).gameObject); } ((EntityState)this).FixedUpdate(); } public void ThrowGrenades() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_005d: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; Vector3 normalized = ((Vector3)(ref direction)).normalized; Vector3 direction2 = Quaternion.Euler(0f, -35f, 0f) * normalized; Vector3 direction3 = Quaternion.Euler(0f, 35f, 0f) * normalized; Grenade(direction); Grenade(direction2); Grenade(direction3); } private void Grenade(Vector3 direction) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) float num = damageCoefficient * ((BaseState)this).damageStat; Ray aimRay = ((BaseState)this).GetAimRay(); DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)32); value.damageSource = (DamageSource)4; ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed, (DamageTypeCombo?)value); } public override void OnExit() { ((EntityState)this).OnExit(); } } public class NemCommandoAppearState : Appear { public static SkillDef gunSecondary; public static SkillDef gunSpecial; private bool hasGun = true; public static float throwGunDelay; private float throwGunTime; private bool thrownGun; public override void OnEnter() { base.OnEnter(); throwGunTime = throwGunDelay * Appear.duration; if ((Object)(object)((EntityState)this).skillLocator.secondary.skillDef != (Object)(object)gunSecondary && (Object)(object)((EntityState)this).skillLocator.special.skillDef != (Object)(object)gunSpecial) { hasGun = false; ((EntityState)this).GetModelAnimator().SetBool("gunEquipped", hasGun); ((EntityState)this).PlayAnimation("FullBody, Override", "SpawnNoGun"); } } public override void FixedUpdate() { base.FixedUpdate(); if (!hasGun && !thrownGun && ((EntityState)this).fixedAge >= throwGunTime) { ((Component)((BaseState)this).FindModelChild("gunParticle")).GetComponent().Emit(1); ((Component)((BaseState)this).FindModelChild("GunModel")).gameObject.SetActive(false); thrownGun = true; } } } public class NemCommandoSpawnState : Spawn { public override void FixedUpdate() { ((EntityState)this).fixedAge = ((EntityState)this).fixedAge + ((EntityState)this).GetDeltaTime(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= Spawn.minimumIdleDuration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new NemCommandoAppearState()); } } } public class ReloadGun : BaseState { private bool hasReloaded; public static float baseDuration; public static string reloadEffectMuzzleString; public static GameObject reloadEffectPrefab; public static string enterSoundString; public static string exitSoundString; public static float exitSoundpitch; public static float enterSoundPitch; private Animator animator; private bool hasEjectedMag; private float duration => baseDuration / base.attackSpeedStat * ((EntityState)this).skillLocator.secondary.cooldownScale; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayCrossfade("Gesture, Override, LeftArm", "LowerGun", "FireGun.playbackRate", duration, 0.3f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if ((double)animator.GetFloat("ejectMag") >= 0.1 && !hasEjectedMag) { hasEjectedMag = true; ((Component)((BaseState)this).FindModelChild("magParticle")).GetComponent().Emit(1); } if ((double)((EntityState)this).fixedAge >= (double)duration * 0.6 && !hasReloaded) { Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, enterSoundPitch); ((EntityState)this).skillLocator.secondary.stock = ((EntityState)this).skillLocator.secondary.maxStock; hasReloaded = true; } if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { if (((EntityState)this).inputBank.skill2.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ShootGun2()); GenericSkill secondary = ((EntityState)this).skillLocator.secondary; secondary.stock -= 1; } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class ShootGun2 : BaseSkillState { [FormatToken(/*Could not decode attribute arguments.*/)] public static float damageCoefficient; public static float procCoefficient; public static float baseDuration; public static float minimumDuration; public static float force; public static float recoil; public static float range; public static string muzzleString; public static string soundString; private string skinNameToken; [HideInInspector] public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/GoldGat/TracerGoldGat.prefab").WaitForCompletion(); private float fireTime; private bool hasFired; private Animator animator; private float duration => baseDuration / ((BaseState)this).attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; fireTime = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_GM") { muzzleString = "Suppressor"; } else { muzzleString = "Muzzle"; } animator.SetBool("shouldAdditiveReload", false); if ((double)animator.GetFloat("primaryPlaying") > 0.05) { ((EntityState)this).PlayCrossfade("Gesture, Override, LowerLeftArm", "FireGun", "FireGun.playbackRate", baseDuration, 0.005f); animator.SetBool("shouldAdditiveReload", true); } ((EntityState)this).PlayCrossfade("Gesture, Override, LeftArm", "FireGun", "FireGun.playbackRate", baseDuration, 0.005f); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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_0138: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0157: 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_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_019f: 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_01b0: 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_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) if (hasFired) { return; } hasFired = true; bool isCrit = ((BaseState)this).RollCrit(); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); if (soundString != string.Empty) { Util.PlaySound(soundString, ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); float num = 0f; float num2 = ((EntityState)this).characterBody.spreadBloomAngle; if ((int)((EntityState)this).teamComponent.teamIndex != 1) { num += 2f; num2 += 4f; } DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)0); damageType.damageSource = (DamageSource)2; new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = damageType, falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = num, maxSpread = num2, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 1f, spreadYawScale = 1f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); ((Component)((BaseState)this).FindModelChild("casingParticle")).GetComponent().Emit(1); ((EntityState)this).characterBody.AddSpreadBloom(3f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime * duration) { Fire(); } if (((EntityState)this).fixedAge >= minimumDuration / ((BaseState)this).attackSpeedStat && (((EntityState)this).inputBank.skill2.down & (((EntityState)this).skillLocator.secondary.stock >= 1))) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ShootGun2()); GenericSkill secondary = ((EntityState)this).skillLocator.secondary; secondary.stock -= 1; ((EntityState)this).characterBody.OnSkillActivated(((EntityState)this).skillLocator.secondary); } else if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { if (!(((EntityState)this).fixedAge <= minimumDuration)) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class Submission : BaseSkillState { [FormatToken(/*Could not decode attribute arguments.*/)] public static float damageCoefficient; public static float procCoefficient; public static uint bulletCountPerShot; public static float range; public static float maxSpread; [FormatToken("SS2_NEMMANDO_SPECIAL_SUBMISSION_DESCRIPTION", 0)] public static int BulletCount; public static float baseDuration; public static float recoil; public static GameObject tracerPrefab; public static GameObject muzzleFlashPrefab; public static GameObject hitSparkPrefab; public static float baseDurationBetweenShots; private int totalBulletsFired; private int bulletCount; private float durationBetweenShots; public float stopwatchBetweenShots; public float charge; private Animator modelAnimator; private Transform modelTransform; private float duration; private string skinNameToken; private GameObject muzzleFlashEffect = Resources.Load("Prefabs/Effects/ImpactEffects/FusionCellExplosion"); [HideInInspector] public override void OnEnter() { //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0165: 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_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetSpreadBloom(0.2f, false); duration = baseDuration; durationBetweenShots = baseDurationBetweenShots / ((BaseState)this).attackSpeedStat; bulletCount = (int)((float)BulletCount * ((BaseState)this).attackSpeedStat); modelAnimator = ((EntityState)this).GetModelAnimator(); modelTransform = ((EntityState)this).GetModelTransform(); ((EntityState)this).characterBody.SetAimTimer(2f); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; skinNameToken = ((Component)modelTransform).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (skinNameToken != "SS2_SKIN_NEMCOMMANDO_DEFAULT" && skinNameToken != "SS2_SKIN_NEMCOMMANDO_GRANDMASTERY") { if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_MASTERY" || skinNameToken.Contains("YELLOW")) { tracerPrefab = SS2Assets.LoadAsset("TracerNemCommandoShotgunYellow", SS2Bundle.NemCommando); muzzleFlashPrefab = SS2Assets.LoadAsset("MuzzleflashNemCommandoYellow", SS2Bundle.NemCommando); hitSparkPrefab = SS2Assets.LoadAsset("HitsparkNemCommandoYellow", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_COMMANDO" || skinNameToken.Contains("BLUE")) { tracerPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/TracerCommandoShotgun.prefab").WaitForCompletion(); muzzleFlashPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/MuzzleflashFMJ.prefab").WaitForCompletion(); hitSparkPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/HitsparkCommandoShotgun.prefab").WaitForCompletion(); } } else { tracerPrefab = SS2Assets.LoadAsset("TracerNemCommandoShotgunRed", SS2Bundle.NemCommando); muzzleFlashPrefab = SS2Assets.LoadAsset("MuzzleflashNemCommandoRed", SS2Bundle.NemCommando); hitSparkPrefab = SS2Assets.LoadAsset("HitsparkNemCommandoRed", SS2Bundle.NemCommando); } FireBullet(); } private void FireBullet() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0151: 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_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0196: 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_019e: 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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); string text = "Muzzle"; EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, text, false); Util.PlaySound("NemmandoSubmissionFire", ((EntityState)this).gameObject); if ((double)modelAnimator.GetFloat("primaryPlaying") > 0.05) { ((EntityState)this).PlayCrossfade("Gesture, Override, LowerLeftArm", "FireGunSpecial", "Special.playbackRate", durationBetweenShots, durationBetweenShots / 2f); } ((EntityState)this).PlayCrossfade("Gesture, Override, LeftArm", "FireGunSpecial", "Special.playbackRate", durationBetweenShots, durationBetweenShots / 2f); ((BaseState)this).AddRecoil(-0.8f * recoil, -1f * recoil, -0.1f * recoil, 0.15f * recoil); if (((EntityState)this).isAuthority) { DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)32); damageType.damageSource = (DamageSource)8; new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = maxSpread, bulletCount = bulletCountPerShot, damage = damageCoefficient * ((BaseState)this).damageStat, force = 0.5f * FireBarrage.force, tracerEffectPrefab = tracerPrefab, muzzleName = text, hitEffectPrefab = hitSparkPrefab, isCrit = ((BaseState)this).RollCrit(), radius = FireBarrage.bulletRadius, smartCollision = true, damageType = damageType, spreadPitchScale = 0.5f, spreadYawScale = 0.5f, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, falloffModel = (FalloffModel)1, maxDistance = range }.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(2f * FireBarrage.spreadBloomValue); totalBulletsFired++; } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatchBetweenShots += Time.fixedDeltaTime; if (stopwatchBetweenShots >= durationBetweenShots && totalBulletsFired < bulletCount) { stopwatchBetweenShots -= durationBetweenShots; FireBullet(); } if (((EntityState)this).fixedAge >= duration && totalBulletsFired == bulletCount && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } internal class SwingSword2 : BasicMeleeAttack, IStepSetter, ISkillState { public static float swingTimeCoefficient = 1.71f; private static float reloadDelay = 0.5f; public int swingSide; private bool inCombo; private string skinNameToken; private EntityStateMachine gunSM; private NetworkStateMachine nsm; public static float TokenModifier_dmgCoefficient => ((BasicMeleeAttack)new SwingSword2()).damageCoefficient; public GenericSkill activatorSkillSlot { get; set; } public override void OnEnter() { skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; base.swingEffectPrefab = SS2Assets.LoadAsset("NemCommandoSwingEffect", SS2Bundle.NemCommando); base.hitEffectPrefab = SS2Assets.LoadAsset("NemCommandoImpactSlashEffect", SS2Bundle.NemCommando); if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_MASTERY" || skinNameToken.Contains("YELLOW")) { base.swingEffectPrefab = SS2Assets.LoadAsset("NemCommandoSwingEffectYellow", SS2Bundle.NemCommando); base.hitEffectPrefab = SS2Assets.LoadAsset("NemCommandoImpactSlashEffectYellow", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_COMMANDO" || skinNameToken.Contains("BLUE")) { base.swingEffectPrefab = SS2Assets.LoadAsset("NemCommandoSwingEffectBlue", SS2Bundle.NemCommando); base.hitEffectPrefab = SS2Assets.LoadAsset("NemCommandoImpactSlashEffectBlue", SS2Bundle.NemCommando); } ((BasicMeleeAttack)this).OnEnter(); base.animator = ((EntityState)this).GetModelAnimator(); } public override void PlayAnimation() { string text = "Primary" + (1 + swingSide); if (inCombo) { text = "Primary3"; } ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Primary.playbackRate", base.duration * swingTimeCoefficient, 0.05f); } void IStepSetter.SetStep(int i) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) swingSide = i; if (swingSide > 1) { ((InstanceData)activatorSkillSlot.skillInstanceData).step = 0; swingSide = 0; inCombo = true; } base.swingEffectMuzzleString = ((swingSide == 0) ? "SwingLeft" : "SwingRight"); } public override void OnExit() { ((BasicMeleeAttack)this).OnExit(); } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write((byte)swingSide); SkillStateMethods.Serialize((ISkillState)(object)this, ((EntityState)this).skillLocator, writer); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); swingSide = reader.ReadByte(); SkillStateMethods.Deserialize((ISkillState)(object)this, ((EntityState)this).skillLocator, reader); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); overlapAttack.damageType.damageSource = (DamageSource)1; DamageAPI.AddModdedDamageType(overlapAttack, SS2.Survivors.NemCommando.GougeDamageType); } } public class SwordBeam : BaseSkillState { public float charge; public static float maxEmission; public static float minEmission; public static float damageCoefficient; public static float procCoefficient; public static float maxRecoil; public static float minRecoil; public static float projectileSpeed; public static float baseDuration; public static GameObject projectilePrefab; private float recoil; private float duration; private float fireDuration; private bool hasFired; private string muzzleString; private string skinNameToken; private GameObject muzzleFlash; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); fireDuration = 0.1f * duration; ((EntityState)this).PlayCrossfade("Gesture, Override", "SecondaryBeam", "Secondary.playbackRate", duration, 0.05f); Util.PlaySound("NemmandoFireBeam2", ((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireBeam() { //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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; muzzleFlash = SS2Assets.LoadAsset("MuzzleflashNemCommandoRed", SS2Bundle.NemCommando); projectilePrefab = SS2Assets.LoadAsset("NemCommandoSwordBeamProjectile", SS2Bundle.NemCommando); if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_COMMANDO" || skinNameToken.Contains("BLUE")) { muzzleFlash = SS2Assets.LoadAsset("MuzzleflashNemCommandoBlue", SS2Bundle.NemCommando); projectilePrefab = SS2Assets.LoadAsset("NemCommandoSwordBeamProjectileBlue", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_MASTERY" || skinNameToken.Contains("YELLOW")) { muzzleFlash = SS2Assets.LoadAsset("MuzzleflashNemCommandoYellow", SS2Bundle.NemCommando); projectilePrefab = SS2Assets.LoadAsset("NemCommandoSwordBeamProjectileYellow", SS2Bundle.NemCommando); } EffectManager.SimpleMuzzleFlash(muzzleFlash, ((EntityState)this).gameObject, muzzleString, false); if (((EntityState)this).isAuthority) { float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)0); value.damageSource = (DamageSource)2; ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed, (DamageTypeCombo?)value); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireBeam(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } } namespace EntityStates.NemCommmando { public class Dodge2 : BaseSkillState { private static float duration = 0.5f; private static float initialSpeedCoefficient = 6.5f; private static float finalSpeedCoefficient = 1.5f; private static float upThing = 0.67f; public static float dodgeFOV = -1f; public static GameObject JetEffect; public static string DashJetL; public static string DashJetR; private float rollSpeed; private Vector3 forwardDirection; private Vector3 previousPosition; private Animator animator; private EntityStateMachine swordSM; private NetworkStateMachine nsm; private string skinNameToken; public override void OnEnter() { //IL_018d: 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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: 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_011b: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: 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_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ChildLocator component = ((Component)animator).GetComponent(); Util.PlaySound(DodgeState.dodgeSoundString, ((EntityState)this).gameObject); animator.SetBool("isRolling", true); ((EntityState)this).PlayCrossfade("Body", "Utility", "Utility.rate", duration * 1.25f, 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.05f); ((EntityState)this).PlayCrossfade("FullBody, Override", "BufferEmpty", 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Override, LeftArm", "BufferEmpty", 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Additive, LeftArm", "BufferEmpty", 0.05f); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.ArmorBoost, 1.5f * duration); } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); forwardDirection = ((Vector3)(ref val)).normalized; } RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { float y = Mathf.Min(Mathf.Max(((EntityState)this).characterMotor.velocity.y, 0f), rollSpeed) * upThing; ((EntityState)this).characterMotor.velocity = forwardDirection * rollSpeed; ((EntityState)this).characterMotor.velocity.y = y; } skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (Object.op_Implicit((Object)(object)JetEffect) && skinNameToken != "SS2_SKIN_NEMCOMMANDO_GRANDMASTERY") { if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_DEFAULT") { JetEffect = SS2Assets.LoadAsset("NemCommandoDashJets", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_MASTERY") { JetEffect = SS2Assets.LoadAsset("NemCommandoDashJetsYellow", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_COMMANDO") { JetEffect = SS2Assets.LoadAsset("NemCommandoDashJetsBlue", SS2Bundle.NemCommando); } Transform val2 = component.FindChild(DashJetL); Transform val3 = component.FindChild(DashJetR); if (Object.op_Implicit((Object)(object)val2)) { Object.Instantiate(JetEffect, val2); } if (Object.op_Implicit((Object)(object)val3)) { Object.Instantiate(JetEffect, val3); } } Vector3 val4 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val4; } private void RecalculateRollSpeed() { rollSpeed = ((BaseState)this).moveSpeedStat * Mathf.Lerp(initialSpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / duration); } public override void FixedUpdate() { //IL_0029: 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_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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: 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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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) ((EntityState)this).FixedUpdate(); RecalculateRollSpeed(); ((EntityState)this).characterBody.isSprinting = true; if (((EntityState)this).isAuthority) { Vector3 val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && normalized != Vector3.zero) { Vector3 val2 = normalized * rollSpeed; float y = val2.y; val2.y = 0f; float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f); val2 = forwardDirection * num; val2.y += Mathf.Max(y, 0f); ((EntityState)this).characterMotor.velocity = val2; Vector3 val3 = (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) ? ((EntityState)this).characterDirection.forward : forwardDirection); Vector3 val4 = Vector3.Cross(Vector3.up, val3); float num2 = Vector3.Dot(forwardDirection, val3); float num3 = Vector3.Dot(forwardDirection, val4); animator.SetFloat("forwardSpeed", num2); animator.SetFloat("rightSpeed", num3); } previousPosition = ((EntityState)this).transform.position; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { animator.SetBool("isRolling", false); Object.op_Implicit((Object)(object)swordSM); animator.SetBool("shouldExit", true); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } ((EntityState)this).OnExit(); } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } } namespace EntityStates.Nemmando { public class Appear : BaseState { private static GameObject spawnEffectPrefab = SpawnState.spawnEffectPrefab; public static float duration = 2.5f; public static float delayBeforeAimAnimatorWeight; private Animator modelAnimator; private CharacterModel characterModel; public override void OnEnter() { ((BaseState)this).OnEnter(); characterModel = null; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator.modelTransform)) { characterModel = ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount - 1; } modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat(AnimationParameters.aimWeight, 0f); } ((EntityState)this).PlayAnimation("FullBody, Override", "Spawn", "Spawn.playbackRate", duration, 0f); if (Object.op_Implicit((Object)(object)spawnEffectPrefab)) { Util.PlaySound(SpawnState.spawnSoundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(spawnEffectPrefab, ((EntityState)this).gameObject, "PortalSpawn", false); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, duration * 1.2f); } } public override void Update() { ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat(AnimationParameters.aimWeight, Mathf.Clamp01((((EntityState)this).age - delayBeforeAimAnimatorWeight) / duration)); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat(AnimationParameters.aimWeight, 1f); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } public class BarrageCharge : BaseSkillState { public static float baseChargeDuration; public static GameObject chargeEffect; private float chargeDuration; private ChildLocator childLocator; private Animator animator; private Transform modelBaseTransform; private uint chargePlayID; private bool hasFinishedCharging; private GameObject chargeEffectInstance; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); chargeDuration = baseChargeDuration; childLocator = ((EntityState)this).GetModelChildLocator(); modelBaseTransform = ((EntityState)this).GetModelBaseTransform(); animator = ((EntityState)this).GetModelAnimator(); hasFinishedCharging = false; chargePlayID = Util.PlaySound("NemmandoSubmissionCharge", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)chargeEffect)) { Transform val = childLocator.FindChild("GunChargeEffect"); chargeEffectInstance = Object.Instantiate(chargeEffect, val); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); if (num >= 1f && !hasFinishedCharging) { hasFinishedCharging = true; Util.PlaySound("NemmandoSubmissionReady", ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f) { BarrageFire barrageFire = new BarrageFire(); barrageFire.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)barrageFire); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); AkSoundEngine.StopPlayingID(chargePlayID); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class BarrageFire : BaseState { [FormatToken(/*Could not decode attribute arguments.*/)] public static float damageCoefficient; public static float procCoefficient; public static uint bulletCountPerShot; public static float range; public static float maxSpread; public static int minBulletCount; [FormatToken("SS2_NEMMANDO_SPECIAL_SUBMISSION_DESCRIPTION", 0)] public static int maxBulletCount; public static float baseDuration; public static float minTimeBetweenShots; public static float maxTimeBetweenShots; public static float recoil; public static GameObject tracerPrefab; private int totalBulletsFired; private int bulletCount; public float stopwatchBetweenShots; public float charge; private Animator modelAnimator; private Transform modelTransform; private float duration; private float durationBetweenShots; private GameObject muzzleFlashEffect = Resources.Load("Prefabs/Effects/ImpactEffects/FusionCellExplosion"); public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetSpreadBloom(0.2f, false); ((EntityState)this).characterBody.isSprinting = false; duration = baseDuration; durationBetweenShots = Util.Remap(charge, 0f, 1f, minTimeBetweenShots, maxTimeBetweenShots) / base.attackSpeedStat; bulletCount = (int)((float)Mathf.RoundToInt(Util.Remap(charge, 0f, 1f, (float)minBulletCount, (float)maxBulletCount)) * base.attackSpeedStat); modelAnimator = ((EntityState)this).GetModelAnimator(); modelTransform = ((EntityState)this).GetModelTransform(); ((EntityState)this).characterBody.SetAimTimer(2f); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; FireBullet(); } private void FireBullet() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0172: 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_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); string text = "Muzzle"; EffectManager.SimpleMuzzleFlash(FireBarrage.effectPrefab, ((EntityState)this).gameObject, text, false); Util.PlaySound("NemmandoSubmissionFire", ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Gesture, Additive", "FireGun", "FireGun.playbackRate", durationBetweenShots, durationBetweenShots / 2f); ((BaseState)this).AddRecoil(-0.8f * recoil, -1f * recoil, -0.1f * recoil, 0.15f * recoil); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = maxSpread, bulletCount = bulletCountPerShot, damage = damageCoefficient * base.damageStat, force = 0.5f * FireBarrage.force, tracerEffectPrefab = tracerPrefab, muzzleName = text, hitEffectPrefab = FireBarrage.hitEffectPrefab, isCrit = ((BaseState)this).RollCrit(), radius = FireBarrage.bulletRadius, smartCollision = true, damageType = DamageTypeCombo.op_Implicit((DamageType)0), spreadPitchScale = 0.5f, spreadYawScale = 0.5f, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, falloffModel = (FalloffModel)1, maxDistance = range }.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(2f * FireBarrage.spreadBloomValue); totalBulletsFired++; } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", "", 1f, 0.4f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatchBetweenShots += Time.fixedDeltaTime; if (stopwatchBetweenShots >= durationBetweenShots && totalBulletsFired < bulletCount) { stopwatchBetweenShots -= durationBetweenShots; FireBullet(); } if (((EntityState)this).fixedAge >= duration && totalBulletsFired == bulletCount && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class BossAttack : BaseSkillState { public float charge; public static float baseDuration; [FormatToken("SS2_NEMMANDO_SPECIAL_BOSS_DESCRIPTION", 0)] public static int maxHits; public static int minHits; [FormatToken(/*Could not decode attribute arguments.*/)] public static float maxDamageCoefficient; public static float minDamageCoefficient; public static float maxRadius; public static float minRadius; public static float maxEmission; public static float minEmission; public static GameObject effectPrefab; public static GameObject hitEffectPrefab; private float hitStopwatch; private float duration; private int hitCount; private float damageCoefficient; private float radius; private float emission; private BlastAttack blastAttack; private EffectData attackEffect; public Material swordMat; public Material matInstance; private float minimumEmission; private string skinNameToken; public CameraParamsOverrideHandle camOverrideHandle; public override void OnEnter() { //IL_00d1: 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_00d8: 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_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: 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_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: 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_020f: 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_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0276: 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_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Expected O, but got Unknown //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Expected O, but got Unknown //IL_0304: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.isSprinting = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; hitCount = Mathf.RoundToInt(Util.Remap(charge, 0f, 1f, (float)minHits, (float)maxHits)); int num = (int)((float)hitCount * (0.5f * ((EntityState)this).characterBody.attackSpeed + 0.5f)); hitCount = Mathf.Max(hitCount, num); damageCoefficient = maxDamageCoefficient; radius = maxRadius; emission = Util.Remap(charge, 0f, 1f, minEmission, maxEmission); ((EntityState)this).characterBody.hideCrosshair = false; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (skinNameToken != "SS2_SKIN_NEMCOMMANDO_DEFAULT" && skinNameToken != "SS2_SKIN_NEMCOMMANDO_GRANDMASTERY") { if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_MASTERY" || skinNameToken.Contains("YELLOW")) { effectPrefab = SS2Assets.LoadAsset("DecisiveStrikeSlashYellow", SS2Bundle.NemCommando); hitEffectPrefab = SS2Assets.LoadAsset("NemCommandoImpactSlashEffectYellow", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_COMMANDO" || skinNameToken.Contains("BLUE")) { effectPrefab = SS2Assets.LoadAsset("DecisiveStrikeSlashBlue", SS2Bundle.NemCommando); hitEffectPrefab = SS2Assets.LoadAsset("NemCommandoImpactSlashEffectBlue", SS2Bundle.NemCommando); } } else { effectPrefab = SS2Assets.LoadAsset("DecisiveStrikeSlash", SS2Bundle.NemCommando); } DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)32); damageType.damageSource = (DamageSource)8; blastAttack = new BlastAttack { attacker = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)2, baseDamage = damageCoefficient * ((BaseState)this).damageStat, baseForce = -500f, bonusForce = Vector3.zero, crit = ((BaseState)this).RollCrit(), damageColorIndex = (DamageColorIndex)0, damageType = damageType, falloffModel = (FalloffModel)0, inflictor = ((EntityState)this).gameObject, losType = (LoSType)0, position = ((EntityState)this).characterBody.corePosition, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = radius, impactEffect = EffectCatalog.FindEffectIndexFromPrefab(hitEffectPrefab), teamIndex = ((BaseState)this).GetTeam() }; DamageAPI.AddModdedDamageType(blastAttack, SS2.Survivors.NemCommando.GougeDamageType); ((EntityState)this).characterMotor.rootMotion = Vector3.zero; ((EntityState)this).characterMotor.velocity = Vector3.zero; if (charge >= 0.4f) { EffectData val = new EffectData(); val.scale = ((EntityState)this).characterBody.bestFitRadius * 10f; val.origin = ((EntityState)this).characterBody.corePosition; EffectManager.SpawnEffect(effectPrefab, val, true); } FireAttack(); Util.PlaySound("NemmandoDecisiveStrikeFire", ((EntityState)this).gameObject); if (charge >= 1f) { ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrikeMax", "DecisiveStrike.playbackRate", duration, 0f); } else if (charge >= 0.5f) { ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrikeMid", "DecisiveStrike.playbackRate", duration, 0f); } else { ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrike", "DecisiveStrike.playbackRate", duration, 0f); } } private void FireAttack() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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_005c: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) hitStopwatch = duration / (float)hitCount; if (((EntityState)this).isAuthority) { blastAttack.position = ((EntityState)this).characterBody.corePosition; if (blastAttack.Fire().hitCount > 0) { Util.PlaySound(GroundLight.hitSoundString, ((EntityState)this).gameObject); } EffectData val = new EffectData(); val.scale = ((EntityState)this).characterBody.bestFitRadius * 10f; val.origin = ((EntityState)this).characterBody.corePosition; EffectManager.SpawnEffect(effectPrefab, val, true); } } public override void FixedUpdate() { //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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); hitStopwatch -= Time.fixedDeltaTime; emission -= 2f * Time.fixedDeltaTime; if (emission < 0f) { emission = 0f; } ((EntityState)this).characterMotor.rootMotion = Vector3.zero; ((EntityState)this).characterMotor.velocity = Vector3.zero; int num = 0; while (hitStopwatch <= 0f && num < hitCount) { FireAttack(); num++; } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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) ((EntityState)this).OnExit(); emission = 0f; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, duration / 1.5f); } ((Component)((EntityState)this).GetModelTransform()).GetComponent().baseRendererInfos[1].defaultMaterial.SetFloat("_EmPower", 1f); } } public class BossAttackCharge : BaseSkillState { public static float baseChargeDuration; public static GameObject chargeEffect; public static string childName; private float chargeDuration; private bool finishedCharge; private ChildLocator childLocator; private Animator animator; private Transform modelBaseTransform; private uint chargePlayID; private ParticleSystem swordVFX; private bool zoomin; private Material swordMat; private float minEmission; private GameObject chargeEffectInstance; private Transform areaIndicator; private string skinNameToken; public CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData decisiveCameraParams = new CharacterCameraParamsData { pivotVerticalOffset = BlendableFloat.op_Implicit(1f), idealLocalCameraPos = BlendableVector3.op_Implicit(zoomCameraPosition) }; public static Vector3 zoomCameraPosition = new Vector3(0f, 0f, -5.3f); private Material matInstance; public override void OnEnter() { //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: 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_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Invalid comparison between Unknown and I4 //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; childLocator = ((EntityState)this).GetModelChildLocator(); modelBaseTransform = ((EntityState)this).GetModelBaseTransform(); animator = ((EntityState)this).GetModelAnimator(); zoomin = false; ((EntityState)this).characterBody.hideCrosshair = true; if (Object.op_Implicit((Object)(object)chargeEffect)) { Transform val = childLocator.FindChild(childName); skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (skinNameToken != "SS2_SKIN_NEMCOMMANDO_DEFAULT" && skinNameToken != "SS2_SKIN_NEMCOMMANDO_GRANDMASTERY") { if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_MASTERY" || skinNameToken.Contains("YELLOW")) { chargeEffect = SS2Assets.LoadAsset("DecisiveStrikeChargeYellow", SS2Bundle.NemCommando); } if (skinNameToken == "SS2_SKIN_NEMCOMMANDO_COMMANDO" || skinNameToken.Contains("BLUE")) { chargeEffect = SS2Assets.LoadAsset("DecisiveStrikeChargeBlue", SS2Bundle.NemCommando); } } else { chargeEffect = SS2Assets.LoadAsset("DecisiveStrikeCharge", SS2Bundle.NemCommando); } chargeEffectInstance = Object.Instantiate(chargeEffect, val); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { ChildLocator component = chargeEffectInstance.GetComponent(); MainModule main = ((Component)component.FindChild("Charge")).GetComponent().main; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(chargeDuration); ParticleSystem[] componentsInChildren = ((Component)component.FindChild("FullCharge")).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { MainModule main2 = componentsInChildren[i].main; ((MainModule)(ref main2)).startDelay = MinMaxCurve.op_Implicit(chargeDuration); } componentsInChildren = chargeEffectInstance.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].Play(); } } } chargePlayID = Util.PlayAttackSpeedSound("NemmandoDecisiveStrikeCharge", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrikeCharge", "DecisiveStrike.playbackRate", chargeDuration, 0f); CameraParamsOverrideRequest val2 = new CameraParamsOverrideRequest { cameraParamsData = decisiveCameraParams, priority = 0f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, chargeDuration); ref RendererInfo reference = ref ((Component)((EntityState)this).GetModelTransform()).GetComponent().baseRendererInfos[1]; swordMat = reference.defaultMaterial; matInstance = Object.Instantiate(swordMat); reference.defaultMaterial = matInstance; if ((int)((BaseState)this).GetTeam() == 2) { chargeEffectInstance = Object.Instantiate(new BlinkState().blinkDestinationPrefab, ((EntityState)this).gameObject.transform); chargeEffectInstance.transform.position = ((EntityState)this).characterBody.corePosition; chargeEffectInstance.GetComponent().newDuration = chargeDuration; areaIndicator = chargeEffectInstance.transform.Find("Particles").Find("AreaIndicator"); chargeEffectInstance.GetComponentInChildren().maxDuration = chargeDuration; } } public override void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterMotor.velocity = Vector3.zero; float num = CalcCharge(); matInstance.SetFloat("_EmPower", Util.Remap(num, 0f, 1f, minEmission, BossAttack.maxEmission)); if (Object.op_Implicit((Object)(object)areaIndicator)) { areaIndicator.localScale = Vector3.one * Util.Remap(num, 0f, 1f, BossAttack.minRadius, BossAttack.maxRadius); } if (num >= 0.6f && !zoomin) { zoomin = true; } if (num >= 1f && !finishedCharge) { finishedCharge = true; AkSoundEngine.StopPlayingID(chargePlayID); Util.PlaySound("NemmandoDecisiveStrikeReady", ((EntityState)this).gameObject); } bool flag = ((BaseSkillState)this).IsKeyDownAuthority(); if (!((EntityState)this).characterBody.isPlayerControlled) { flag = true; } if (((EntityState)this).isAuthority && (((EntityState)this).fixedAge >= chargeDuration || (!flag && ((EntityState)this).fixedAge >= 0.1f))) { BossAttackEntry bossAttackEntry = new BossAttackEntry(); bossAttackEntry.charge = num; bossAttackEntry.camOverrideHandle = camOverrideHandle; bossAttackEntry.matInstance = matInstance; bossAttackEntry.swordMat = swordMat; ((EntityState)this).outer.SetNextState((EntityState)(object)bossAttackEntry); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); AkSoundEngine.StopPlayingID(chargePlayID); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class BossAttackEntry : BaseSkillState { public float charge; public static float maxRecoil; public static float minRecoil; public static float initialMaxSpeedCoefficient; public static float initialMinSpeedCoefficient; public static float minDuration; public static float maxDuration; public static GameObject dashEffect; private float speedCoefficient; private float recoil; private float duration; private float dashSpeed; private Vector3 forwardDirection; private Vector3 previousPosition; private ChildLocator childLocator; private GameObject dashEffectInstance; public CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData decisiveCameraParams = new CharacterCameraParamsData { pivotVerticalOffset = BlendableFloat.op_Implicit(2f), idealLocalCameraPos = BlendableVector3.op_Implicit(zoomCameraPosition) }; public static Vector3 zoomCameraPosition = new Vector3(0f, 0f, -14f); public Material matInstance; public Material swordMat; public override void OnEnter() { //IL_0019: 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_002b: 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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0160: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_018b: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.25f); CameraParamsOverrideRequest val = new CameraParamsOverrideRequest { cameraParamsData = decisiveCameraParams, priority = 0f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val, duration); duration = Util.Remap(charge, 0f, 1f, minDuration, maxDuration); speedCoefficient = Util.Remap(charge, 0f, 1f, initialMinSpeedCoefficient, initialMaxSpeedCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); childLocator = ((EntityState)this).GetModelChildLocator(); Ray aimRay = ((BaseState)this).GetAimRay(); forwardDirection = ((Ray)(ref aimRay)).direction; RecalculateSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity.y *= 0.1f; ((EntityState)this).characterMotor.velocity = forwardDirection * dashSpeed; } ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrikeDash"); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); Vector3 val2 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val2; if (Object.op_Implicit((Object)(object)dashEffect)) { Transform val3 = childLocator.FindChild("DashEffect"); dashEffectInstance = Object.Instantiate(dashEffect, val3); if (Object.op_Implicit((Object)(object)dashEffectInstance)) { ParticleSystem[] componentsInChildren = dashEffectInstance.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].Play(); } } } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 1.5f * duration; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = Resources.Load("Materials/matDoppelganger"); obj.AddToCharacterModel(((Component)modelTransform).GetComponent()); } } private void RecalculateSpeed() { dashSpeed = (4f + 0.25f * ((BaseState)this).moveSpeedStat) * speedCoefficient; } public override void OnExit() { //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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; } ((EntityState)this).characterMotor.velocity = Vector3.zero; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).PlayCrossfade("FullBody, Override", "BufferEmpty", 0.15f); if (Object.op_Implicit((Object)(object)dashEffectInstance)) { EntityState.Destroy((Object)(object)dashEffectInstance); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_00a8: 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_0112: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_0105: 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) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { BossAttack bossAttack = new BossAttack(); bossAttack.charge = charge; bossAttack.camOverrideHandle = camOverrideHandle; bossAttack.matInstance = matInstance; bossAttack.swordMat = swordMat; ((EntityState)this).outer.SetNextState((EntityState)(object)bossAttack); return; } RecalculateSpeed(); if (!((EntityState)this).isAuthority) { return; } Vector3 val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { if (normalized != Vector3.zero) { Vector3 val2 = normalized * dashSpeed; float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f); val2 = forwardDirection * num; val2.y = ((EntityState)this).characterMotor.velocity.y; ((EntityState)this).characterMotor.velocity = val2; } ((EntityState)this).characterDirection.forward = forwardDirection; } previousPosition = ((EntityState)this).transform.position; } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class Dodge : BaseSkillState { public float duration = 0.6f; public float initialSpeedCoefficient = 7.5f; public float finalSpeedCoefficient = 1f; public static float dodgeFOV = -1f; public static GameObject JetEffect; private float rollSpeed; private Vector3 forwardDirection; private Vector3 previousPosition; private Animator animator; public override void OnEnter() { //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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_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_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ChildLocator component = ((Component)animator).GetComponent(); Util.PlaySound(DodgeState.dodgeSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("FullBody, Override", "Utility", "Utility.rate", duration * 1.25f, 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.05f); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.ArmorBoost, 1.5f * duration); } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); forwardDirection = ((Vector3)(ref val)).normalized; } RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity.y = 0f; ((EntityState)this).characterMotor.velocity = forwardDirection * rollSpeed; } if (Object.op_Implicit((Object)(object)JetEffect)) { Transform val2 = component.FindChild("JetMuzzleL"); Transform val3 = component.FindChild("JetMuzzleR"); if (Object.op_Implicit((Object)(object)val2)) { Object.Instantiate(JetEffect, val2); } if (Object.op_Implicit((Object)(object)val3)) { Object.Instantiate(JetEffect, val3); } } Vector3 val4 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val4; } private void RecalculateRollSpeed() { rollSpeed = ((BaseState)this).moveSpeedStat * Mathf.Lerp(initialSpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / duration); } public override void FixedUpdate() { //IL_001d: 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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); RecalculateRollSpeed(); if (((EntityState)this).isAuthority) { Vector3 val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && normalized != Vector3.zero) { Vector3 val2 = normalized * rollSpeed; float y = val2.y; val2.y = 0f; float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f); val2 = forwardDirection * num; val2.y += Mathf.Max(y, 0f); ((EntityState)this).characterMotor.velocity = val2; Vector3 val3 = (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) ? ((EntityState)this).characterDirection.forward : forwardDirection); Vector3 val4 = Vector3.Cross(Vector3.up, val3); float num2 = Vector3.Dot(forwardDirection, val3); float num3 = Vector3.Dot(forwardDirection, val4); animator.SetFloat("forwardSpeed", num2); animator.SetFloat("rightSpeed", num3); } previousPosition = ((EntityState)this).transform.position; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } ((EntityState)this).OnExit(); } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } } public class NemmandoSpawnState : NemesisSpawnState { public override void SpawnEffect() { portalMuzzle = "PortalSpawn"; base.SpawnEffect(); } } public class ScepterBarrageCharge : BaseSkillState { public static float baseChargeDuration = 1.5f; public static GameObject chargeEffect; public static GameObject scepterChargeEffect; private float chargeDuration; private ChildLocator childLocator; private Animator animator; private Transform modelBaseTransform; private uint chargePlayID; private bool hasFinishedCharging; private GameObject chargeEffectInstance; private int chargeState; private List chargeEffectInstances; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration; childLocator = ((EntityState)this).GetModelChildLocator(); modelBaseTransform = ((EntityState)this).GetModelBaseTransform(); animator = ((EntityState)this).GetModelAnimator(); hasFinishedCharging = false; chargePlayID = Util.PlaySound("NemmandoSubmissionCharge", ((EntityState)this).gameObject); chargeState = 0; chargeEffectInstances = new List(); if (Object.op_Implicit((Object)(object)chargeEffect)) { Transform val = childLocator.FindChild("GunChargeEffect"); chargeEffectInstance = Object.Instantiate(chargeEffect, val); chargeEffectInstances.Add(chargeEffectInstance); chargeState++; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); if ((double)num >= 0.3 * (double)(chargeState - 1) && chargeState == chargeEffectInstances.Count && (double)num < 0.5) { if (Object.op_Implicit((Object)(object)scepterChargeEffect)) { Transform val = childLocator.FindChild("GunChargeEffect"); chargeEffectInstance = Object.Instantiate(scepterChargeEffect, val); chargeEffectInstances.Add(chargeEffectInstance); } chargeState++; } if (num >= 1f && !hasFinishedCharging) { hasFinishedCharging = true; Util.PlaySound("NemmandoSubmissionReady", ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f) { ScepterBarrageFire scepterBarrageFire = new ScepterBarrageFire(); scepterBarrageFire.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)scepterBarrageFire); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); AkSoundEngine.StopPlayingID(chargePlayID); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } if (chargeEffectInstances.Count > 0) { for (int i = 0; i < chargeEffectInstances.Count; i++) { EntityState.Destroy((Object)(object)chargeEffectInstances[i]); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class ScepterBarrageFire : BaseState { public float charge; [FormatToken(/*Could not decode attribute arguments.*/)] public static float laserDamageCoefficient; public static float laserBlastRadius; public static float laserBlastForce; [FormatToken(/*Could not decode attribute arguments.*/)] public static float damageCoefficient = 0.6f; public static float procCoefficient = 0.5f; public static uint bulletCountPerShot = 4u; public static float range = 128f; public static float maxSpread = 40f; public static int minBulletCount = 2; [FormatToken("SS2_NEMMANDO_SPECIAL_SCEPSUBMISSION_DESCRIPTION", 0)] public static int maxBulletCount = 6; public static float baseDuration = 0.8f; public static float minTimeBetweenShots = 0.2f; public static float maxTimeBetweenShots = 0.075f; public static float recoil = 5f; public static GameObject tracerPrefab; private int totalBulletsFired; private int bulletCount; public float stopwatchBetweenShots; private Animator modelAnimator; private Transform modelTransform; private float duration; private float durationBetweenShots; private GameObject muzzleFlashEffect = Resources.Load("Prefabs/Effects/ImpactEffects/FusionCellExplosion"); public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetSpreadBloom(0.2f, false); ((EntityState)this).characterBody.isSprinting = false; duration = baseDuration; durationBetweenShots = Util.Remap(charge, 0f, 1f, minTimeBetweenShots, maxTimeBetweenShots) / base.attackSpeedStat; bulletCount = (int)((float)Mathf.RoundToInt(Util.Remap(charge, 0f, 1f, (float)minBulletCount, (float)maxBulletCount)) * base.attackSpeedStat); modelAnimator = ((EntityState)this).GetModelAnimator(); modelTransform = ((EntityState)this).GetModelTransform(); ((EntityState)this).characterBody.SetAimTimer(2f); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; FireBullet(); } private void FireBullet() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_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_011b: 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_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0160: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017e: 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_018f: 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_01a0: 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_01a7: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); string text = "Muzzle"; EffectManager.SimpleMuzzleFlash(FireBarrage.effectPrefab, ((EntityState)this).gameObject, text, false); ((EntityState)this).PlayCrossfade("UpperBody, Override", "Special", "Special.rate", durationBetweenShots, 0.05f); Util.PlaySound("NemmandoSubmissionFire", ((EntityState)this).gameObject); Util.PlaySound(FireLaser.attackSoundString, ((EntityState)this).gameObject); float num = recoil / base.attackSpeedStat; ((BaseState)this).AddRecoil(-0.8f * num, -1f * num, -0.1f * num, 0.15f * num); EffectManager.SimpleMuzzleFlash(FireLaser.effectPrefab, ((EntityState)this).gameObject, "Muzzle", false); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = maxSpread, bulletCount = bulletCountPerShot, damage = damageCoefficient * base.damageStat, force = 0.5f * FireBarrage.force, tracerEffectPrefab = tracerPrefab, muzzleName = text, hitEffectPrefab = FireBarrage.hitEffectPrefab, isCrit = ((BaseState)this).RollCrit(), radius = FireBarrage.bulletRadius, smartCollision = true, damageType = DamageTypeCombo.op_Implicit((DamageType)0), spreadPitchScale = 0.5f, spreadYawScale = 0.5f, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, falloffModel = (FalloffModel)1, maxDistance = range }.Fire(); FireLaser(); } ((EntityState)this).characterBody.AddSpreadBloom(2f * FireBarrage.spreadBloomValue); totalBulletsFired++; } private void FireLaser() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_00bc: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * 1000f; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(aimRay, ref val2, 1000f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.defaultLayer)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask))) { val = ((RaycastHit)(ref val2)).point; } new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject), baseDamage = base.damageStat * laserDamageCoefficient, baseForce = laserBlastForce * 0.2f, position = val, radius = laserBlastRadius, falloffModel = (FalloffModel)2, bonusForce = laserBlastForce * ((Ray)(ref aimRay)).direction, crit = ((BaseState)this).RollCrit() }.Fire(); if (!Object.op_Implicit((Object)(object)modelTransform)) { return; } ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { int num = component.FindChildIndex("Muzzle"); if (Object.op_Implicit((Object)(object)FireLaser.tracerEffectPrefab)) { EffectData val3 = new EffectData { origin = val, start = ((Ray)(ref aimRay)).origin }; val3.SetChildLocatorTransformReference(((EntityState)this).gameObject, num); EffectManager.SpawnEffect(FireLaser.tracerEffectPrefab, val3, true); EffectManager.SpawnEffect(FireLaser.hitEffectPrefab, val3, true); } } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatchBetweenShots += Time.fixedDeltaTime; if (stopwatchBetweenShots >= durationBetweenShots && totalBulletsFired < bulletCount) { stopwatchBetweenShots -= durationBetweenShots; FireBullet(); } if (((EntityState)this).fixedAge >= duration && totalBulletsFired == bulletCount && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class ScepterSlashAttack : BaseSkillState { public static float baseDuration; [FormatToken("SS2_NEMMANDO_SPECIAL_SCEPBOSS_DESCRIPTION", 0)] public static int maxHits; public static int minHits; [FormatToken(/*Could not decode attribute arguments.*/)] public static float maxDamageCoefficient; public static float minDamageCoefficient; public static float maxRadius; public static float minRadius; public static float maxEmission; public static float minEmission; public static GameObject preSlashEffectPrefab; public static GameObject slashEffectPrefab; public static GameObject sheatheEffectPrefab; public static GameObject stunEffectPrefab; public float charge; private float hitStopwatch; private int hitCount; private int hitsFired; private float duration; private float emission; private float radius; private float damageCoefficient; private EffectData attackEffect; private CharacterModel characterModel; private float minimumEmission; private bool isCrit; private bool hidden; public CameraParamsOverrideHandle camOverrideHandle; public Material matInstance; public Material swordMat; private List targetList; public override void OnEnter() { //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_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_01c9: Expected O, but got Unknown //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.isSprinting = false; hitsFired = 0; hitCount = Mathf.RoundToInt(Util.Remap(charge, 0f, 1f, (float)minHits, (float)maxHits)); SS2Log.Debug("hit count inital: " + hitCount + "| " + ((EntityState)this).characterBody.attackSpeed, 59, "OnEnter"); int num = (int)((float)hitCount * ((EntityState)this).characterBody.attackSpeed); hitCount = Mathf.Max(hitCount, num); SS2Log.Debug("hit count after: " + hitCount, 62, "OnEnter"); duration = baseDuration; radius = Util.Remap(charge, 0f, 1f, minRadius, maxRadius); damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoefficient, maxDamageCoefficient); emission = Util.Remap(charge, 0f, 1f, minEmission, maxEmission); isCrit = ((BaseState)this).RollCrit(); hidden = true; characterModel = ((Component)((EntityState)this).modelLocator.modelTransform).GetComponent(); ((EntityState)this).characterBody.hideCrosshair = true; if (((EntityState)this).characterBody.skinIndex == 2) { minimumEmission = 70f; } else { minimumEmission = 0f; } attackEffect = new EffectData { scale = 0.5f * radius, origin = ((EntityState)this).characterBody.corePosition }; EffectManager.SpawnEffect(preSlashEffectPrefab, attackEffect, true); ((EntityState)this).characterMotor.rootMotion = Vector3.zero; ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrike", "DecisiveStrike.playbackRate", duration, 0f); Util.PlaySound("NemmandoDecisiveStrikeFire", ((EntityState)this).gameObject); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } GetTargets(); if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount + 1; } } private void FireAttack() { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) hitsFired++; if (targetList == null) { return; } hitStopwatch = 0.05f; foreach (HurtBox target in targetList) { if (Object.op_Implicit((Object)(object)target)) { HurtBoxGroup hurtBoxGroup = target.hurtBoxGroup; HurtBox val = hurtBoxGroup.hurtBoxes[Random.Range(0, hurtBoxGroup.hurtBoxes.Length - 1)]; if (Object.op_Implicit((Object)(object)val) && val.healthComponent.alive) { EffectData val2 = new EffectData { scale = 4f, origin = ((Component)val).transform.position, rotation = ((Component)val).transform.rotation }; EffectManager.SpawnEffect(slashEffectPrefab, val2, true); Util.PlaySound(GroundLight.hitSoundString, ((EntityState)this).gameObject); DamageInfo val3 = new DamageInfo(); val3.damage = damageCoefficient * ((BaseState)this).damageStat; val3.attacker = ((EntityState)this).gameObject; val3.procCoefficient = 1f; val3.position = ((Component)val).transform.position; val3.crit = isCrit; DamageAPI.AddModdedDamageType(val3, SS2.Survivors.NemCommando.GougeDamageType); val.healthComponent.TakeDamage(val3); GlobalEventManager.instance.OnHitEnemy(val3, ((Component)val.healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val3, ((Component)val.healthComponent).gameObject); } } } } private void GetTargets() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) targetList = new List(); ((BaseState)this).GetAimRay(); SphereSearch val = new SphereSearch { mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }; val.ClearCandidates(); val.origin = ((EntityState)this).transform.position; val.radius = radius; val.RefreshCandidates(); val.FilterCandidatesByDistinctHurtBoxEntities(); val.FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)); val.GetHurtBoxes(targetList); if (!NetworkServer.active) { return; } foreach (HurtBox target in targetList) { if ((Object)(object)target.healthComponent != (Object)(object)((EntityState)this).healthComponent && target.healthComponent.alive) { attackEffect = new EffectData { scale = 0.5f * radius, origin = target.healthComponent.body.corePosition }; EffectManager.SpawnEffect(stunEffectPrefab, attackEffect, true); NemmandoDashOrb nemmandoDashOrb = new NemmandoDashOrb(); ((Orb)nemmandoDashOrb).origin = ((EntityState)this).transform.position; ((Orb)nemmandoDashOrb).target = target; OrbManager.instance.AddOrb((Orb)(object)nemmandoDashOrb); } } } public override void FixedUpdate() { //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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e2: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Expected O, but got Unknown ((EntityState)this).FixedUpdate(); hitStopwatch -= Time.fixedDeltaTime; emission -= 10f * Time.fixedDeltaTime; if (emission < 0f) { emission = 0f; } ((EntityState)this).characterMotor.rootMotion = Vector3.zero; ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).fixedAge >= 0.4f * duration && hidden) { hidden = false; if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount - 1; } ((EntityState)this).PlayAnimation("FullBody, Override", "ScepterSpecial", "DecisiveStrike.playbackRate", 1f, 0f); EffectData val = new EffectData { scale = 4f, origin = ((Component)characterModel).transform.position, rotation = ((Component)characterModel).transform.rotation }; EffectManager.SpawnEffect(preSlashEffectPrefab, val, true); } if (((EntityState)this).fixedAge >= duration && hitsFired < hitCount && hitStopwatch <= 0f) { if (hitsFired == 0) { ((EntityState)this).PlayAnimation("FullBody, Override", "ScepterSpecialEnd", "DecisiveStrike.playbackRate", 1.4f, 0f); EffectData val2 = new EffectData { scale = 4f, origin = ((Component)characterModel).transform.position, rotation = ((Component)characterModel).transform.rotation }; EffectManager.SpawnEffect(sheatheEffectPrefab, val2, true); } FireAttack(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration && hitsFired >= hitCount) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_001a: 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) ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, duration / 1.5f); } if (Object.op_Implicit((Object)(object)matInstance)) { ((Component)((EntityState)this).GetModelTransform()).GetComponent().baseRendererInfos[1].defaultMaterial = swordMat; Object.Destroy((Object)(object)matInstance); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } } public class ScepterSlashCharge : BaseSkillState { public static float baseChargeDuration; public static GameObject chargeEffect; public static string childName; private float chargeDuration; private bool finishedCharge; private ChildLocator childLocator; private Animator animator; private Transform modelBaseTransform; private uint chargePlayID; private ParticleSystem swordVFX; private bool zoomin; private Material swordMat; private float minEmission; private GameObject chargeEffectInstance; public CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData decisiveCameraParams = new CharacterCameraParamsData { pivotVerticalOffset = BlendableFloat.op_Implicit(1f), idealLocalCameraPos = BlendableVector3.op_Implicit(zoomCameraPosition) }; public static Vector3 zoomCameraPosition = new Vector3(0f, 0f, -5.3f); private Material matInstance; public override void OnEnter() { //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration; childLocator = ((EntityState)this).GetModelChildLocator(); modelBaseTransform = ((EntityState)this).GetModelBaseTransform(); animator = ((EntityState)this).GetModelAnimator(); zoomin = false; ((EntityState)this).characterBody.hideCrosshair = true; if (Object.op_Implicit((Object)(object)chargeEffect)) { Transform val = childLocator.FindChild(childName); chargeEffectInstance = Object.Instantiate(chargeEffect, val); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { ChildLocator component = chargeEffectInstance.GetComponent(); MainModule main = ((Component)component.FindChild("Charge")).GetComponent().main; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(chargeDuration); main = ((Component)component.FindChild("Shadow")).GetComponent().main; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(chargeDuration); main = ((Component)component.FindChild("FullCharge")).GetComponent().main; ((MainModule)(ref main)).startDelay = MinMaxCurve.op_Implicit(chargeDuration); ParticleSystem[] componentsInChildren = chargeEffectInstance.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].Play(); } } } chargePlayID = Util.PlayAttackSpeedSound("NemmandoDecisiveStrikeCharge", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrikeCharge", "DecisiveStrike.playbackRate", chargeDuration, 0f); CameraParamsOverrideRequest val2 = new CameraParamsOverrideRequest { cameraParamsData = decisiveCameraParams, priority = 0f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, chargeDuration); ref RendererInfo reference = ref ((Component)((EntityState)this).GetModelTransform()).GetComponent().baseRendererInfos[1]; swordMat = reference.defaultMaterial; matInstance = Object.Instantiate(swordMat); reference.defaultMaterial = matInstance; } public override void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterMotor.velocity = Vector3.zero; float num = CalcCharge(); matInstance.SetFloat("_EmPower", Util.Remap(num, 0f, 1f, 0f, 350f)); if (num >= 0.6f && !zoomin) { zoomin = true; } if (num >= 1f && !finishedCharge) { finishedCharge = true; AkSoundEngine.StopPlayingID(chargePlayID); Util.PlaySound("NemmandoDecisiveStrikeReady", ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority && (((EntityState)this).fixedAge >= 1.25f * chargeDuration || (!((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f))) { ScepterSlashEntry scepterSlashEntry = new ScepterSlashEntry(); scepterSlashEntry.charge = num; scepterSlashEntry.camOverrideHandle = camOverrideHandle; scepterSlashEntry.matInstance = matInstance; scepterSlashEntry.swordMat = swordMat; ((EntityState)this).outer.SetNextState((EntityState)(object)scepterSlashEntry); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); AkSoundEngine.StopPlayingID(chargePlayID); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class ScepterSlashEntry : BaseSkillState { public float charge; public static float maxRecoil; public static float minRecoil; public static float initialMaxSpeedCoefficient; public static float initialMinSpeedCoefficient; public static float minDuration; public static float maxDuration; public static GameObject dashEffect; private float speedCoefficient; private float recoil; private float duration; private float dashSpeed; private Vector3 forwardDirection; private Vector3 previousPosition; private ChildLocator childLocator; private GameObject dashEffectInstance; public CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData decisiveCameraParams = new CharacterCameraParamsData { pivotVerticalOffset = BlendableFloat.op_Implicit(2f), idealLocalCameraPos = BlendableVector3.op_Implicit(zoomCameraPosition) }; public static Vector3 zoomCameraPosition = new Vector3(0f, 0f, -14f); public Material matInstance; public Material swordMat; public override void OnEnter() { //IL_0019: 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_002b: 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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0160: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_018b: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.25f); CameraParamsOverrideRequest val = new CameraParamsOverrideRequest { cameraParamsData = decisiveCameraParams, priority = 0f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val, duration); duration = Util.Remap(charge, 0f, 1f, minDuration, maxDuration); speedCoefficient = Util.Remap(charge, 0f, 1f, initialMinSpeedCoefficient, initialMaxSpeedCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); childLocator = ((EntityState)this).GetModelChildLocator(); Ray aimRay = ((BaseState)this).GetAimRay(); forwardDirection = ((Ray)(ref aimRay)).direction; RecalculateSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity.y *= 0.1f; ((EntityState)this).characterMotor.velocity = forwardDirection * dashSpeed; } ((EntityState)this).PlayAnimation("FullBody, Override", "DecisiveStrikeDash"); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); Vector3 val2 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val2; if (Object.op_Implicit((Object)(object)dashEffect)) { Transform val3 = childLocator.FindChild("DashEffect"); dashEffectInstance = Object.Instantiate(dashEffect, val3); if (Object.op_Implicit((Object)(object)dashEffectInstance)) { ParticleSystem[] componentsInChildren = dashEffectInstance.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].Play(); } } } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 1.5f * duration; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = Resources.Load("Materials/matDoppelganger"); obj.AddToCharacterModel(((Component)modelTransform).GetComponent()); } } private void RecalculateSpeed() { dashSpeed = (4f + 0.25f * ((BaseState)this).moveSpeedStat) * speedCoefficient; } public override void OnExit() { //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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; } ((EntityState)this).characterMotor.velocity = Vector3.zero; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); if (Object.op_Implicit((Object)(object)dashEffectInstance)) { EntityState.Destroy((Object)(object)dashEffectInstance); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_00d8: 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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (charge >= 1f) { ScepterSlashAttack scepterSlashAttack = new ScepterSlashAttack(); scepterSlashAttack.charge = charge; scepterSlashAttack.camOverrideHandle = camOverrideHandle; scepterSlashAttack.matInstance = matInstance; scepterSlashAttack.swordMat = swordMat; ((EntityState)this).outer.SetNextState((EntityState)(object)scepterSlashAttack); } else { BossAttack bossAttack = new BossAttack(); bossAttack.charge = charge; bossAttack.camOverrideHandle = camOverrideHandle; bossAttack.matInstance = matInstance; bossAttack.swordMat = swordMat; ((EntityState)this).outer.SetNextState((EntityState)(object)bossAttack); } return; } RecalculateSpeed(); if (!((EntityState)this).isAuthority) { return; } Vector3 val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { if (normalized != Vector3.zero) { Vector3 val2 = normalized * dashSpeed; float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f); val2 = forwardDirection * num; val2.y = ((EntityState)this).characterMotor.velocity.y; ((EntityState)this).characterMotor.velocity = val2; } ((EntityState)this).characterDirection.forward = forwardDirection; } previousPosition = ((EntityState)this).transform.position; } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class ShootGun : BaseState { [FormatToken(/*Could not decode attribute arguments.*/)] public static float damageCoefficient; public static float procCoefficient; public static float baseDuration; public static float force; public static float recoil; public static float range; public static string muzzleString; public static string soundString; [HideInInspector] public static GameObject tracerEffectPrefab = Resources.Load("Prefabs/Effects/Tracers/TracerGoldGat"); private float fireTime; private bool hasFired; private Animator animator; private float duration => baseDuration / base.attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; fireTime = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); muzzleString = "Muzzle"; ((BaseState)this).FindModelChildGameObject("GunSpinEffect").SetActive(false); ((EntityState)this).PlayCrossfade("RightArm, Override", "ShootGunShort", "ShootGun.playbackRate", duration, 0.05f); } public override void OnExit() { ((EntityState)this).OnExit(); float num = Mathf.Clamp(((EntityState)this).skillLocator.secondary.finalRechargeInterval, 0.25f, float.PositiveInfinity); ((EntityState)this).PlayAnimation("Gesture, Override", "ReloadGun", "Reload.playbackRate", 0.5f * (num - duration - 0.3f), 0f); } private void Fire() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016d: 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_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: 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_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: 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) if (!hasFired) { hasFired = true; bool isCrit = ((BaseState)this).RollCrit(); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); ((EntityState)this).PlayCrossfade("Gesture, Additive", "FireGun", "FireGun.playbackRate", duration, 0.075f); if (soundString != string.Empty) { Util.PlaySound(soundString, ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * base.damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 0f, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 0f, spreadYawScale = 0f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(1.5f); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Spawn : BaseState { public static float minimumIdleDuration = 3.5f; public static GameObject spawnEffectPrefab; public static GameObject spawnEffectFakePod; private Animator modelAnimator; private CharacterModel characterModel; private bool hasSpawnedPrefab; public override void OnEnter() { ((BaseState)this).OnEnter(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, minimumIdleDuration); } characterModel = null; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator.modelTransform)) { characterModel = ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount + 1; } modelAnimator = ((EntityState)this).GetModelAnimator(); } public override void OnExit() { if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetFloat(AnimationParameters.aimWeight, 1f); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= minimumIdleDuration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Appear()); } } } internal class SwingSword : BasicMeleeAttack, IStepSetter { public static float swingTimeCoefficient = 1.33f; public int swingSide; [FormatToken(/*Could not decode attribute arguments.*/)] public static float TokenModifier_dmgCoefficient => ((BasicMeleeAttack)new SwingSword()).damageCoefficient; public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); base.animator = ((EntityState)this).GetModelAnimator(); } public override void PlayAnimation() { string text = ((swingSide == 0) ? "Primary1" : "Primary2"); ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Primary.playbackRate", base.duration * swingTimeCoefficient, 0.1f); } void IStepSetter.SetStep(int i) { swingSide = i; base.swingEffectMuzzleString = ((swingSide == 0) ? "SwingLeft" : "SwingRight"); } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write((byte)swingSide); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); swingSide = reader.ReadByte(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); DamageAPI.AddModdedDamageType(overlapAttack, SS2.Survivors.NemCommando.GougeDamageType); } } public class ChargeSwordBeam : BaseSkillState { public static float baseChargeDuration = 1.25f; public static float maxEmission; public static float minEmission; public static GameObject lightningEffect; private Material swordMat; private float chargeDuration; private ChildLocator childLocator; private Animator animator; private Transform modelBaseTransform; private GameObject effectInstance; private GameObject defaultCrosshair; private uint chargePlayID; public override void OnEnter() { ((BaseState)this).OnEnter(); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; childLocator = ((EntityState)this).GetModelChildLocator(); modelBaseTransform = ((EntityState)this).GetModelBaseTransform(); animator = ((EntityState)this).GetModelAnimator(); defaultCrosshair = ((EntityState)this).characterBody.defaultCrosshairPrefab; if (Object.op_Implicit((Object)(object)lightningEffect)) { effectInstance = Object.Instantiate(lightningEffect, childLocator.FindChild("LightingEffect")); effectInstance.GetComponentInChildren().Play(); } ((EntityState)this).PlayCrossfade("Gesture, Override", "Secondary1", "Secondary.playbackRate", chargeDuration, 0.05f); swordMat = ((Component)((EntityState)this).GetModelTransform()).GetComponent().baseRendererInfos[1].defaultMaterial; chargePlayID = Util.PlaySound("NemmandoChargeBeam2", ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = CalcCharge(); ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(num, 0f, 1f, 0f, 3f), true); ((BaseState)this).StartAimMode(2f, false); if (Object.op_Implicit((Object)(object)swordMat)) { swordMat.SetFloat("_EmPower", Util.Remap(num, 0f, 1f, minEmission, maxEmission)); } if (((EntityState)this).isAuthority && (num >= 1f || (!((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.1f))) { FireSwordBeam fireSwordBeam = new FireSwordBeam(); fireSwordBeam.charge = num; ((EntityState)this).outer.SetNextState((EntityState)(object)fireSwordBeam); } } protected float CalcCharge() { return Mathf.Clamp01(((EntityState)this).fixedAge / chargeDuration); } public override void OnExit() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); swordMat.SetFloat("_EmPower", minEmission); swordMat.SetColor("_EmColor", Color.red); if (Object.op_Implicit((Object)(object)effectInstance)) { EntityState.Destroy((Object)(object)effectInstance); } AkSoundEngine.StopPlayingID(chargePlayID); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class FireSwordBeam : BaseSkillState { public float charge; public static float maxEmission; public static float minEmission; [FormatToken(/*Could not decode attribute arguments.*/)] public static float maxDamageCoefficient; public static float minDamageCoeffficient; public static float procCoefficient; public static float maxRecoil; public static float minRecoil; public static float maxProjectileSpeed; public static float minProjectileSpeed; public static float baseDuration; public static GameObject projectilePrefab; private float emission; private Material swordMat; private float damageCoefficient; private float recoil; private float projectileSpeed; private float duration; private float fireDuration; private bool hasFired; private Animator animator; private string muzzleString; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); muzzleString = "Muzzle"; hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; damageCoefficient = Util.Remap(charge, 0f, 1f, minDamageCoeffficient, maxDamageCoefficient); recoil = Util.Remap(charge, 0f, 1f, minRecoil, maxRecoil); projectileSpeed = Util.Remap(charge, 0f, 1f, minProjectileSpeed, maxProjectileSpeed); emission = Util.Remap(charge, 0f, 1f, minEmission, maxEmission); fireDuration = 0.1f * duration; string text = ((charge > 0.6f) ? "Secondary3(Strong)" : "Secondary3(Weak)"); bool num = animator.GetBool("isMoving"); bool flag = animator.GetBool("isGrounded"); if (!num && flag) { ((EntityState)this).PlayCrossfade("FullBody, Override", text, "Secondary.playbackRate", duration, 0.05f); } ((EntityState)this).PlayCrossfade("Gesture, Override", text, "Secondary.playbackRate", duration, 0.05f); swordMat = ((Component)((EntityState)this).GetModelTransform()).GetComponent().baseRendererInfos[1].defaultMaterial; Util.PlaySound("NemmandoFireBeam2", ((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); } public virtual void FireBeam() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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) if (!hasFired) { hasFired = true; EffectManager.SimpleMuzzleFlash(FireBarrage.effectPrefab, ((EntityState)this).gameObject, muzzleString, false); if (((EntityState)this).isAuthority) { float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed, (DamageTypeCombo?)null); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireBeam(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } } namespace EntityStates.NemCaptainDrone { public class BaseNemCaptainDroneState : BaseState { protected TeamFilter teamFilter; private ProxyInteraction interactionComponent; protected virtual string GetContextString(Interactor activator) { return null; } protected virtual Interactability GetInteractability(Interactor activator) { return (Interactability)0; } protected virtual void OnInteractionBegin(Interactor activator) { } protected virtual bool ShouldShowOnScanner() { return false; } protected virtual bool ShouldIgnoreSpherecaseForInteractability(Interactor activator) { return false; } private string GetContextStringInternal(ProxyInteraction proxyInteraction, Interactor activator) { return GetContextString(activator); } private Interactability GetInteractabilityInternal(ProxyInteraction proxyInteraction, Interactor activator) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return GetInteractability(activator); } private void OnInteractionBeginInternal(ProxyInteraction proxyInteraction, Interactor activator) { OnInteractionBegin(activator); } private bool ShouldIgnoreSPherecastForInteractabilityInternal(ProxyInteraction proxyInteraction, Interactor activator) { return ShouldIgnoreSpherecaseForInteractability(activator); } private bool ShouldShowOnScannerInternal(ProxyInteraction proxyInteraction) { return ShouldShowOnScanner(); } public override void OnEnter() { ((BaseState)this).OnEnter(); teamFilter = ((EntityState)this).GetComponent(); interactionComponent = ((EntityState)this).GetComponent(); interactionComponent.getContextString = GetContextStringInternal; interactionComponent.getInteractability = GetInteractabilityInternal; interactionComponent.onInteractionBegin = OnInteractionBeginInternal; interactionComponent.shouldShowOnScanner = ShouldShowOnScannerInternal; interactionComponent.shouldIgnoreSpherecastForInteractability = ShouldIgnoreSPherecastForInteractabilityInternal; } public override void OnExit() { interactionComponent.getContextString = null; interactionComponent.getInteractability = null; interactionComponent.onInteractionBegin = null; interactionComponent.shouldShowOnScanner = null; interactionComponent.shouldIgnoreSpherecastForInteractability = null; ((EntityState)this).OnExit(); } } public class BlackHoleState : BaseNemCaptainDroneState { public static GameObject blackHolePrefab; public static float lifetime; private GameObject blackHoleInstance; protected override Interactability GetInteractability(Interactor activator) { return (Interactability)0; } public override void OnEnter() { //IL_0019: 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_0044: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (NetworkServer.active) { blackHoleInstance = Object.Instantiate(blackHolePrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation); blackHoleInstance.GetComponent().teamIndex = teamFilter.teamIndex; NetworkServer.Spawn(blackHoleInstance); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= lifetime) { Debug.Log((object)"I should be dead right now!!!"); ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitState()); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)blackHoleInstance)) { EntityState.Destroy((Object)(object)blackHoleInstance); } base.OnExit(); } } public class BuffZoneState : BaseNemCaptainDroneState { public static GameObject buffZonePrefab; public static float lifetime; private GameObject buffZoneInstance; protected override Interactability GetInteractability(Interactor activator) { return (Interactability)0; } public override void OnEnter() { //IL_0019: 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_0044: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (NetworkServer.active) { buffZoneInstance = Object.Instantiate(buffZonePrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation); buffZoneInstance.GetComponent().teamIndex = teamFilter.teamIndex; NetworkServer.Spawn(buffZoneInstance); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= lifetime) { Debug.Log((object)"I should be dead right now!!!"); ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitState()); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)buffZoneInstance)) { EntityState.Destroy((Object)(object)buffZoneInstance); } base.OnExit(); } } public class EntryState : BaseNemCaptainDroneState { private float duration; public static float baseDuration; public override void OnEnter() { base.OnEnter(); duration = baseDuration; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class ExitState : BaseNemCaptainDroneState { private float duration; public static float baseDuration; private Transform modelTransform; private EffectData effectData; public override void OnEnter() { //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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //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_0051: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); modelTransform = ((EntityState)this).GetModelBaseTransform(); ((Component)modelTransform).gameObject.SetActive(false); effectData = new EffectData { origin = modelTransform.position }; EffectManager.SpawnEffect(EffectCatalog.FindEffectIndexFromPrefab(Addressables.LoadAssetAsync((object)"RoR2/Base/Captain/CaptainSuplyDropExplosion.prefab").WaitForCompletion()), effectData, true); duration = baseDuration; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } } public class HealZoneState : BaseNemCaptainDroneState { public static GameObject healZonePrefab; public static float lifetime; private GameObject healZoneInstance; protected override Interactability GetInteractability(Interactor activator) { return (Interactability)0; } public override void OnEnter() { //IL_0019: 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_0044: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (NetworkServer.active) { healZoneInstance = Object.Instantiate(healZonePrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation); healZoneInstance.GetComponent().teamIndex = teamFilter.teamIndex; NetworkServer.Spawn(healZoneInstance); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= lifetime) { Debug.Log((object)"I should be dead right now!!!"); ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitState()); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)healZoneInstance)) { EntityState.Destroy((Object)(object)healZoneInstance); } base.OnExit(); } } } namespace EntityStates.NemCaptain { public class ArmRifle : BaseSkillState { public static float baseArmDuration = 1f; private float armDuration; public static string enterSoundString; public static float enterSoundPitch; public override void OnEnter() { ((BaseState)this).OnEnter(); armDuration = baseArmDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(armDuration * 2f); Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, enterSoundPitch); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= armDuration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireRifle()); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FireRifle : BaseSkillState { public static float damageCoefficient; public static float procCoefficient; public static float baseDuration; public static float force; public static float recoil; public static float range; public static string soundString; public static string muzzleString; [HideInInspector] public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Railgunner/TracerRailgun.prefab").WaitForCompletion(); private float fireTime; private bool hasFired; private NemCaptainController ncc; private float duration => baseDuration / ((BaseState)this).attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; fireTime = 0.1f * duration; hasFired = false; ncc = ((Component)((EntityState)this).characterBody).GetComponent(); } private void Fire() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_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_0134: 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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_01a8: 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_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) if (hasFired) { return; } hasFired = true; bool isCrit = ((BaseState)this).RollCrit(); if (soundString != string.Empty) { Util.PlaySound(soundString, ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); float num = 0f + 4f * ncc.stressFraction; float num2 = ((EntityState)this).characterBody.spreadBloomAngle + 8f * ncc.stressFraction; if ((int)((EntityState)this).teamComponent.teamIndex != 1) { num += 2f * (2f * ncc.stressFraction); num2 += 2f + 4f * ncc.stressFraction; } new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)32), falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = num, maxSpread = num2, isCrit = isCrit, owner = ((EntityState)this).gameObject, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 1.5f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 1f + 4f * ncc.stressFraction, spreadYawScale = 1f + 4f * ncc.stressFraction, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(3f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime * duration && !hasFired) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class ForcedCooldown : BaseState { public static float dur = 0.4f; public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= dur) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class Haidara : BaseState { public static float dmgCoef; public static float force; public static GameObject hitEffectPrefab; public static float radius; public static float procCoef; public static float maxDistance; public static float baseDuration; public static string muzzleString; public static GameObject projectilePrefab; private float duration; private bool hasFired; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; } public void FireThunder() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); bool crit = ((BaseState)this).RollCrit(); FireProjectileInfo val = new FireProjectileInfo { position = ((EntityState)this).characterBody.transform.position, rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction), crit = crit, damage = dmgCoef * base.damageStat, owner = ((EntityState)this).gameObject, damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)16777216), projectilePrefab = projectilePrefab }; ProjectileManager.instance.FireProjectile(val); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration * 0.6f && !hasFired) { hasFired = true; FireThunder(); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class MachinePistol : BaseSkillState { public static float damageCoefficient; public static float procCoefficient; public static float baseDuration; public static float minimumDuration; public static float force; public static float recoil; public static float range; public static string muzzleString; public static string soundString; [HideInInspector] public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/GoldGat/TracerGoldGat.prefab").WaitForCompletion(); private float fireTime; private bool hasFired; private Animator animator; private NemCaptainController ncc; private float duration => baseDuration / ((BaseState)this).attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; fireTime = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); ncc = ((Component)((EntityState)this).characterBody).GetComponent(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00da: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0137: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018f: 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_01bd: 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) if (!hasFired) { hasFired = true; bool isCrit = ((BaseState)this).RollCrit(); if (soundString != string.Empty) { Util.PlaySound(soundString, ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0.2f * ncc.stressFraction, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle + ncc.stressFraction, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 2f * ncc.stressFraction, spreadYawScale = 2f * ncc.stressFraction, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(0.2f + 0.3f * ncc.stressFraction); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (((EntityState)this).inputBank.skill1.down & (((EntityState)this).skillLocator.primary.stock >= 1)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new MachinePistol()); GenericSkill primary = ((EntityState)this).skillLocator.primary; primary.stock -= 1; } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override InterruptPriority GetMinimumInterruptPriority() { if (!(((EntityState)this).fixedAge <= minimumDuration)) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class Punch : BasicMeleeAttack { private bool hasPunched; public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void OnMeleeHitAuthority() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).OnMeleeHitAuthority(); ((Component)ShakeEmitter.CreateSimpleShakeEmitter(((EntityState)this).transform.position, new Wave { amplitude = 3f, cycleOffset = 0f, frequency = 4f }, 0.25f, 20f, true)).transform.parent = ((EntityState)this).transform; } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); overlapAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)32); } public override void FixedUpdate() { ((BasicMeleeAttack)this).FixedUpdate(); if (((EntityState)this).fixedAge >= base.duration * 0.3f && !hasPunched) { ((BasicMeleeAttack)this).BeginMeleeAttackEffect(); hasPunched = true; } if (((EntityState)this).isAuthority) { ((BasicMeleeAttack)this).AuthorityFixedUpdate(); } } } public class ReloadMachinePistol : BaseState { private bool hasReloaded; public static float baseDuration; public static string reloadEffectMuzzleString; public static GameObject reloadEffectPrefab; public static string enterSoundString; public static string exitSoundString; public static float exitSoundpitch; public static float enterSoundPitch; private Animator animator; private bool hasEjectedMag; private NemCaptainController ncc; private float duration => baseDuration / base.attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ncc = ((Component)((EntityState)this).characterBody).GetComponent(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration * 0.8f && !hasReloaded) { Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, enterSoundPitch); ((EntityState)this).skillLocator.primary.stock = ((EntityState)this).skillLocator.primary.maxStock; hasReloaded = true; } if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.NemCaptain.Weapon { public class CallDroneBase : BaseSkillState { [SerializeField] public GameObject dronePrefab; public static float baseDuration; public SetupDroneOrders.PlacementInfo placementInfo; private NemCaptainController ncc; private float duration => baseDuration / ((BaseState)this).attackSpeedStat; public override void OnEnter() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Debug.Log((object)"base call drone start"); ncc = ((Component)((EntityState)this).characterBody).GetComponent(); ((BaseSkillState)this).activatorSkillSlot.UnsetSkillOverride((object)((EntityState)this).gameObject, ((BaseSkillState)this).activatorSkillSlot.skillDef, (SkillOverridePriority)3); ((BaseSkillState)this).activatorSkillSlot.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); if (((EntityState)this).isAuthority) { placementInfo = SetupDroneOrders.GetPlacementInfo(((BaseState)this).GetAimRay(), ((EntityState)this).gameObject); if (placementInfo.ok) { Debug.Log((object)"uhhh i hope this is right.. some other info: "); Debug.Log((object)("activatorSkillSlot name : " + ((Object)((BaseSkillState)this).activatorSkillSlot).name)); } } if (placementInfo.ok) { ((EntityState)this).characterBody.SetAimTimer(3f); if (NetworkServer.active && (Object)(object)dronePrefab != (Object)null) { Debug.Log((object)"deploying!"); GameObject obj = Object.Instantiate(dronePrefab, placementInfo.position, placementInfo.rotation); obj.GetComponent().teamIndex = ((EntityState)this).teamComponent.teamIndex; obj.GetComponent().ownerObject = ((EntityState)this).gameObject; if (Object.op_Implicit((Object)(object)((EntityState)this).gameObject.GetComponent())) { Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master); } NetworkServer.Spawn(((EntityState)this).gameObject); } } else { Debug.Log((object)"placement info was NOT ok... >:("); } EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Skillswap"); if (Object.op_Implicit((Object)(object)val)) { val.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); Debug.Log((object)"base call drone exit"); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); placementInfo.Serialize(writer); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); placementInfo.Deserialize(reader); } } public class BaseDroneStrike : BaseSkillState { [SerializeField] public float dmgCoefficient; [SerializeField] public float procCoefficient; [SerializeField] public float radius; [SerializeField] public GameObject explosionPrefab; [SerializeField] public GameObject dronePrefab; [SerializeField] public float minDur = 0.2f; [SerializeField] public GameObject areaIndicator; [SerializeField] public float maxDistance = 256f; [Header("gross and hacky")] [SerializeField] public bool isFrost; [SerializeField] public bool isShock; private GameObject areaIndicatorInstance; public override void OnEnter() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.hideCrosshair = true; if (((EntityState)this).isAuthority) { areaIndicatorInstance = Object.Instantiate(areaIndicator); areaIndicatorInstance.transform.localScale = new Vector3(radius, radius, radius); } } public override void OnExit() { Util.PlaySound(CallAirstrikeBase.fireAirstrikeSoundString, ((EntityState)this).gameObject); if ((Object)(object)explosionPrefab != (Object)null) { Explode(); } if ((Object)(object)dronePrefab != (Object)null && ((EntityState)this).isAuthority) { PlaceDrone(); } ((EntityState)this).characterBody.hideCrosshair = false; if (((EntityState)this).skillLocator.primary.stock < 1) { ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).gameObject, ((BaseSkillState)this).activatorSkillSlot.skillDef, (SkillOverridePriority)3); } if ((Object)(object)areaIndicatorInstance != (Object)null) { EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); } ((EntityState)this).OnExit(); } public void PlaceDrone() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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_0041: Unknown result type (might be due to invalid IL or missing references) RaycastHit val = default(RaycastHit); Physics.Raycast(((BaseState)this).GetAimRay(), ref val, maxDistance, LayerMask.op_Implicit(CommonMasks.bullet)); GameObject obj = Object.Instantiate(dronePrefab, ((RaycastHit)(ref val)).point, Quaternion.identity); obj.GetComponent().teamIndex = ((EntityState)this).teamComponent.teamIndex; obj.GetComponent().ownerObject = ((EntityState)this).gameObject; NetworkServer.Spawn(((EntityState)this).gameObject); } public void Explode() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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_004d: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"exploding"); RaycastHit val = default(RaycastHit); Physics.Raycast(((BaseState)this).GetAimRay(), ref val, maxDistance, LayerMask.op_Implicit(CommonMasks.bullet)); bool crit = ((BaseState)this).RollCrit(); DamageType val2 = (DamageType)32; if (isFrost) { val2 = (DamageType)256; } if (isShock) { val2 = (DamageType)16777216; } new BlastAttack { radius = radius, procCoefficient = procCoefficient, position = ((RaycastHit)(ref val)).point, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = crit, baseDamage = ((EntityState)this).characterBody.damage * dmgCoefficient, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, damageType = DamageTypeCombo.op_Implicit(val2) }.Fire(); EffectManager.SimpleEffect(explosionPrefab, ((RaycastHit)(ref val)).point, Quaternion.identity, true); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(4f); if (((EntityState)this).isAuthority) { FixedUpdateAuthority(); } } private void FixedUpdateAuthority() { if (!((EntityState)this).inputBank.skill1.down && ((EntityState)this).fixedAge > minDur) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void Update() { ((EntityState)this).Update(); UpdateAreaIndicator(); } private void UpdateAreaIndicator() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { float num = 256f; Ray aimRay = ((BaseState)this).GetAimRay(); RaycastHit val = default(RaycastHit); if (Physics.Raycast(aimRay, ref val, num, LayerMask.op_Implicit(CommonMasks.bullet))) { areaIndicatorInstance.transform.position = ((RaycastHit)(ref val)).point; areaIndicatorInstance.transform.up = ((RaycastHit)(ref val)).normal; } else { areaIndicatorInstance.transform.position = ((Ray)(ref aimRay)).GetPoint(num); areaIndicatorInstance.transform.up = -((Ray)(ref aimRay)).direction; } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class BaseSetupCallDrone : BaseSkillState { private NemCaptainController ncc; private float dur = 0.1f; private float discardDur = 0.6f; private bool hasSetPrimary; [SerializeField] public SkillDef primaryOverride; [SerializeField] public bool isRegen; [SerializeField] public bool isDiscard4Mana; [SerializeField] public bool isDampen; public override void OnEnter() { ((BaseState)this).OnEnter(); hasSetPrimary = false; ncc = ((Component)((EntityState)this).characterBody).GetComponent(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= dur * 0.5f && !((BaseSkillState)this).IsKeyDownAuthority() && !hasSetPrimary && ((EntityState)this).isAuthority) { hasSetPrimary = true; UnsetSkills(); ((EntityState)this).outer.SetNextState((EntityState)(object)new ForcedCooldown()); Debug.Log((object)"setting primary"); } if (((EntityState)this).fixedAge > discardDur && ((EntityState)this).isAuthority) { UnsetSkills(); ((EntityState)this).outer.SetNextState((EntityState)(object)new ForcedCooldown()); Util.PlaySound("ExecutionerGainCharge", ((EntityState)this).gameObject); Debug.Log((object)"discarding"); } } public void UnsetSkills() { //IL_0082: 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) if (!((EntityState)this).isAuthority) { return; } EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Skillswap"); if (Object.op_Implicit((Object)(object)val)) { val.SetNextStateToMain(); } ((BaseSkillState)this).activatorSkillSlot.UnsetSkillOverride((object)((EntityState)this).gameObject, ((BaseSkillState)this).activatorSkillSlot.skillDef, (SkillOverridePriority)3); ((BaseSkillState)this).activatorSkillSlot.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); if (!hasSetPrimary) { return; } if (isRegen) { ((EntityState)this).characterBody.AddTimedBuffAuthority(SS2Content.Buffs.bdNemCapManaRegen.buffIndex, 15f); } if (isDampen) { ((EntityState)this).characterBody.AddTimedBuffAuthority(SS2Content.Buffs.bdNemCapManaReduction.buffIndex, 10f); } if (!isDiscard4Mana) { return; } if ((Object)(object)ncc.hand1.skillDef != (Object)(object)ncc.nullSkill) { ncc.hand1.UnsetSkillOverride((object)((EntityState)this).gameObject, ncc.hand1.skillDef, (SkillOverridePriority)3); ncc.hand1.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); if ((Object)(object)((BaseSkillState)this).activatorSkillSlot != (Object)(object)ncc.hand1) { ncc.AddStress(-17f); } } if ((Object)(object)ncc.hand2.skillDef != (Object)(object)ncc.nullSkill) { ncc.hand2.UnsetSkillOverride((object)((EntityState)this).gameObject, ncc.hand2.skillDef, (SkillOverridePriority)3); ncc.hand2.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); if ((Object)(object)((BaseSkillState)this).activatorSkillSlot != (Object)(object)ncc.hand2) { ncc.AddStress(-17f); } } if ((Object)(object)ncc.hand3.skillDef != (Object)(object)ncc.nullSkill) { ncc.hand3.UnsetSkillOverride((object)((EntityState)this).gameObject, ncc.hand3.skillDef, (SkillOverridePriority)3); ncc.hand3.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); if ((Object)(object)((BaseSkillState)this).activatorSkillSlot != (Object)(object)((EntityState)this).skillLocator.utility) { ncc.AddStress(-17f); } } if ((Object)(object)ncc.hand4.skillDef != (Object)(object)ncc.nullSkill) { ncc.hand4.UnsetSkillOverride((object)((EntityState)this).gameObject, ncc.hand4.skillDef, (SkillOverridePriority)3); ncc.hand4.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); if ((Object)(object)((BaseSkillState)this).activatorSkillSlot != (Object)(object)ncc.hand4) { ncc.AddStress(-17f); } } } public override void OnExit() { ((EntityState)this).OnExit(); if (hasSetPrimary && (Object)(object)primaryOverride != (Object)null) { ((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).gameObject, primaryOverride, (SkillOverridePriority)3); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class DeployGravityDrone : BaseDroneStrike { } public class DeployHealDrone : BaseDroneStrike { } public class DiscardAllRestoreMana : BaseSetupCallDrone { } public class DroneStrikeBasic : BaseDroneStrike { public override void OnEnter() { base.OnEnter(); } } public class DroneStrikeFrost : BaseDroneStrike { public override void OnEnter() { base.OnEnter(); } } public class DroneStrikeTriple : BaseDroneStrike { public override void OnEnter() { base.OnEnter(); } } public class GiveManaReductionBuff : BaseSetupCallDrone { } public class GiveManaRegenBuff : BaseSetupCallDrone { } public class RecoverManaLoseCards : BaseSetupCallDrone { } public class Recycle : BaseSkillState { private NemCaptainController ncc; private float dur = 0.1f; public override void OnEnter() { ((BaseState)this).OnEnter(); ncc = ((Component)((EntityState)this).characterBody).GetComponent(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= dur && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ForcedCooldown()); } } public override void OnExit() { ((BaseSkillState)this).activatorSkillSlot.SetSkillOverride((object)((EntityState)this).gameObject, ncc.GetRandomSkillDefFromDeck(), (SkillOverridePriority)3); EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Skillswap"); if (Object.op_Implicit((Object)(object)val)) { val.SetNextStateToMain(); } ((EntityState)this).OnExit(); } } public class SetupDroneStrike : BaseSetupCallDrone { } public class SetupDronestrikeFrost : BaseSetupCallDrone { } public class SetupDroneStrikeTriple : BaseSetupCallDrone { } public class SetupGravityDrone : BaseSetupCallDrone { } public class SetupHealDrone : BaseSetupCallDrone { } public class CallDronestrikeBase : AimThrowableBase { [SerializeField] public float airstrikeRadius; [SerializeField] public float bloom; public static GameObject muzzleflashEffect; public static string muzzleString; public static string fireDronestrikeSoundString; private NemCaptainController ncc; public override void OnEnter() { ((AimThrowableBase)this).OnEnter(); ((EntityState)this).characterBody.SetSpreadBloom(bloom, true); ncc = ((Component)((EntityState)this).characterBody).GetComponent(); EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Skillswap"); if (Object.op_Implicit((Object)(object)val)) { val.SetNextStateToMain(); } ((BaseSkillState)this).activatorSkillSlot.UnsetSkillOverride((object)((EntityState)this).gameObject, ((BaseSkillState)this).activatorSkillSlot.skillDef, (SkillOverridePriority)3); ((BaseSkillState)this).activatorSkillSlot.SetSkillOverride((object)((EntityState)this).gameObject, ncc.nullSkill, (SkillOverridePriority)1); } public override void FixedUpdate() { ((AimThrowableBase)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(4f); } public override void OnExit() { Util.PlaySound(fireDronestrikeSoundString, ((EntityState)this).gameObject); ((AimThrowableBase)this).OnExit(); } public override void ModifyProjectile(ref FireProjectileInfo fireProjectileInfo) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) ((AimThrowableBase)this).ModifyProjectile(ref fireProjectileInfo); fireProjectileInfo.position = base.currentTrajectoryInfo.hitPoint; fireProjectileInfo.rotation = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f); ((FireProjectileInfo)(ref fireProjectileInfo)).speedOverride = 0f; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class DroneA : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone a!"); } } public class DroneB : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone b!"); } } public class DroneBlackHole : CallDroneBase { public override void OnEnter() { base.OnEnter(); } } public class DroneBuff : CallDroneBase { public override void OnEnter() { base.OnEnter(); } } public class DroneC : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone c!"); } } public class DroneD : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone d!"); } } public class DroneDiscard : BaseSkillState { public static GameObject projectilePrefab; public static float damageCoefficient; public static float procCoefficient; public static float projectileSpeed; public static float baseDuration; public static float recoil; public static string muzzleString; private NemCaptainController ncc; private float duration; private float shotDur; private int shotsToFire; private int timesFired; private float timer; public override void OnEnter() { ((BaseState)this).OnEnter(); ncc = ((EntityState)this).GetComponent(); SkillDef[] obj = new SkillDef[4] { ncc.hand1.skillDef, ncc.hand2.skillDef, ncc.hand3.skillDef, ncc.hand4.skillDef }; shotsToFire = 0; SkillDef[] array = (SkillDef[])(object)obj; for (int i = 0; i < array.Length; i++) { if ((Object)(object)array[i] != (Object)(object)ncc.nullSkill) { shotsToFire++; } } duration = baseDuration * (float)shotsToFire / ((BaseState)this).attackSpeedStat; shotDur = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(duration * 1.2f); timesFired = 0; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); timer += Time.fixedDeltaTime; if (timer >= shotDur && timesFired < shotsToFire && ((EntityState)this).isAuthority) { timer = 0f; timesFired++; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public virtual void FireDrone() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { _ = damageCoefficient; _ = ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); ((BaseState)this).GetAimRay(); Debug.Log((object)"fired shot :D"); } } public override void OnExit() { ncc.DiscardCardsAndReplace(); ((EntityState)this).OnExit(); } } public class DroneE : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone e!"); } } public class DroneF : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone f!"); } } public class DroneFrostStrike : CallDronestrikeBase { public override void OnEnter() { base.OnEnter(); } } public class DroneG : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone g!"); } } public class DroneH : CallDroneBase { public override void OnEnter() { base.OnEnter(); Debug.Log((object)"drone h!"); } } public class DroneHeal : CallDroneBase { public override void OnEnter() { base.OnEnter(); } } public class DroneStrike : CallDronestrikeBase { public override void OnEnter() { base.OnEnter(); } } public class SetupDroneOrders : BaseState { public struct PlacementInfo { public bool ok; public Vector3 position; public Quaternion rotation; public void Serialize(NetworkWriter writer) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) writer.Write(ok); writer.Write(position); writer.Write(rotation); } public void Deserialize(NetworkReader reader) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) ok = reader.ReadBoolean(); position = reader.ReadVector3(); rotation = reader.ReadQuaternion(); } } public static GameObject crosshairOverridePrefab; public static string enterSoundString; public static string exitSoundString; public static GameObject effectMuzzlePrefab; public static string effectMuzzleString; public static float baseExitDuration; public static float maxPlacementDistance; public static GameObject blueprintPrefab; public static float normalYThreshold; public PlacementInfo currentPlacementInfo; private OverrideRequest crosshairOverrideRequest; private GenericSkill primarySkillSlot; private AimAnimator modelAimAnimator; private GameObject effectMuzzleInstance; private Animator modelAnimator; private float timerSinceComplete; private bool beginExit; private GenericSkill originalPrimarySkill; private GenericSkill originalSecondarySkill; private GenericSkill originalUtilitySkill; private GenericSkill originalSpecialSkill; private BlueprintController blueprints; private AimRequest aimRequest; private NemCaptainController ncc; private float exitDuration => baseExitDuration / base.attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); modelAnimator = ((EntityState)this).GetModelAnimator(); ncc = ((Component)((EntityState)this).characterBody).GetComponent(); Debug.Log((object)"setting drone orders..."); Object.op_Implicit((Object)(object)crosshairOverridePrefab); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } originalPrimarySkill = ((EntityState)this).skillLocator.primary; Debug.Log((object)("originalPrimarySkill : " + ((Object)((EntityState)this).skillLocator.primary).name)); originalSecondarySkill = ((EntityState)this).skillLocator.secondary; Debug.Log((object)("originalSecondarySkill : " + ((Object)((EntityState)this).skillLocator.secondary).name)); originalUtilitySkill = ((EntityState)this).skillLocator.utility; Debug.Log((object)("originalUtilitySkill : " + ((Object)((EntityState)this).skillLocator.utility).name)); originalSpecialSkill = ((EntityState)this).skillLocator.special; Debug.Log((object)("originalSpecialSkill : " + ((Object)((EntityState)this).skillLocator.special).name)); ncc.cachedPrimary = ((EntityState)this).skillLocator.primary.skillDef; Debug.Log((object)("cachedPrimaryDef : " + ((EntityState)this).skillLocator.primary.skillDef.skillNameToken)); Debug.Log((object)"stored original skills"); ((EntityState)this).skillLocator.primary = ncc.hand1; ((EntityState)this).skillLocator.secondary = ncc.hand2; ((EntityState)this).skillLocator.utility = ncc.hand3; ((EntityState)this).skillLocator.special = ncc.hand4; Debug.Log((object)("hand1 : " + ((Object)ncc.hand1).name)); Debug.Log((object)("hand2 : " + ((Object)ncc.hand2).name)); Debug.Log((object)("hand3 : " + ((Object)ncc.hand3).name)); Debug.Log((object)("hand4 : " + ((Object)ncc.hand4).name)); ((EntityState)this).skillLocator.primary.stock = 0; ((EntityState)this).skillLocator.secondary.stock = 0; ((EntityState)this).skillLocator.utility.stock = 0; ((EntityState)this).skillLocator.special.stock = 0; } public static PlacementInfo GetPlacementInfo(Ray aimRay, GameObject gameObject) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) float num = 0f; CameraRigController.ModifyAimRayIfApplicable(aimRay, gameObject, ref num); Vector3 val = -((Ray)(ref aimRay)).direction; Vector3 val2 = Vector3.up; Vector3 val3 = Vector3.Cross(val2, val); PlacementInfo result = new PlacementInfo { ok = false }; RaycastHit val4 = default(RaycastHit); if (Physics.Raycast(aimRay, ref val4, maxPlacementDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)) && ((RaycastHit)(ref val4)).normal.y > normalYThreshold) { val2 = ((RaycastHit)(ref val4)).normal; val = Vector3.Cross(val3, val2); result.ok = true; } result.rotation = Util.QuaternionSafeLookRotation(val, val2); Vector3 point = ((RaycastHit)(ref val4)).point; result.position = point; return result; } public override void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); currentPlacementInfo = GetPlacementInfo(((BaseState)this).GetAimRay(), ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)blueprints)) { blueprints.PushState(currentPlacementInfo.position, currentPlacementInfo.rotation, currentPlacementInfo.ok); } } public override void FixedUpdate() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.moveVector = ((Ray)(ref aimRay)).direction; } if (((EntityState)this).isAuthority && beginExit) { timerSinceComplete += Time.fixedDeltaTime; if (timerSinceComplete >= exitDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { Debug.Log((object)"exiting drone orders!"); if (((EntityState)this).outer.destroying) { Util.PlaySound(exitSoundString, ((EntityState)this).gameObject); } OverrideRequest val = crosshairOverrideRequest; if (val != null) { val.Dispose(); } ((EntityState)this).skillLocator.primary = originalPrimarySkill; ((EntityState)this).skillLocator.secondary = originalSecondarySkill; ((EntityState)this).skillLocator.utility = originalUtilitySkill; ((EntityState)this).skillLocator.special = originalSpecialSkill; Debug.Log((object)"reset skills"); if (Object.op_Implicit((Object)(object)blueprints)) { EntityState.Destroy((Object)(object)((Component)blueprints).gameObject); blueprints = null; } AimRequest val2 = aimRequest; if (val2 != null) { val2.Dispose(); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace EntityStates.NemBandit { public class NemEnterReload : BaseState { public static float baseDuration; public static string enterSoundString; private float duration => baseDuration / base.attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new NemReload()); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class NemReload : BaseState { public static float enterSoundPitch; public static float exitSoundPitch; public static string enterSoundString; public static string exitSoundString; public static GameObject reloadEffectPrefab; public static string reloadEffectMuzzleString; public static float baseDuration; private bool hasGivenStock; private float duration => baseDuration / base.attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, enterSoundPitch); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration / 2f) { GiveStock(); } if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { if (((EntityState)this).skillLocator.primary.stock < ((EntityState)this).skillLocator.primary.maxStock) { ((EntityState)this).outer.SetNextState((EntityState)(object)new NemReload()); return; } Util.PlayAttackSpeedSound(exitSoundString, ((EntityState)this).gameObject.gameObject, exitSoundPitch); ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } private void GiveStock() { if (!hasGivenStock) { ((EntityState)this).skillLocator.primary.AddOneStock(); hasGivenStock = true; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class NemRevolver : BaseSkillState { public static float damageCoefficient; public static float procCoefficient; public static float baseDuration; public static float minimumDuration; public static float force; public static float recoil; public static float range; public static string muzzleString; public static string soundString; [HideInInspector] public static GameObject tracerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/TracerBanditPistol.prefab").WaitForCompletion(); private float fireTime; private bool hasFired; private Animator animator; private float duration => baseDuration / ((BaseState)this).attackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; fireTime = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00da: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012a: 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_0137: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015a: 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_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0182: 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_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; bool isCrit = ((BaseState)this).RollCrit(); if (soundString != string.Empty) { Util.PlaySound(soundString, ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 1f, spreadYawScale = 1f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(0.3f); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (((EntityState)this).inputBank.skill1.down & (((EntityState)this).skillLocator.primary.stock >= 1)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new NemRevolver()); GenericSkill primary = ((EntityState)this).skillLocator.primary; primary.stock -= 1; } else { ((EntityState)this).outer.SetNextStateToMain(); } } } public override InterruptPriority GetMinimumInterruptPriority() { if (!(((EntityState)this).fixedAge <= minimumDuration)) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class OctocamoTest : BaseState { public override void OnEnter() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Debug.Log((object)"skill activated"); CharacterModel component = ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent(); Debug.Log((object)component); RaycastHit val = default(RaycastHit); if (Physics.Raycast(((EntityState)this).characterBody.transform.position, Vector3.down, ref val, 4f)) { Material material = ((Renderer)((Component)((RaycastHit)(ref val)).collider).GetComponentInParent()).material; component.baseRendererInfos[1].defaultMaterial = material; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= 0.2f && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } } } namespace EntityStates.Mimic { public class MimicChestActivateEnter : BaseState { public static float baseDuration; private float duration; protected PurchaseInteraction purchaseInter; private bool endedSuccessfully; private BaseAI ai; private GameObject lVFX; private GameObject rVFX; public CharacterBody? target; public HurtBox? hurt; protected virtual bool enableInteraction => false; public override void OnEnter() { //IL_0124: 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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) duration = baseDuration / base.attackSpeedStat; ((BaseState)this).OnEnter(); ((EntityState)this).PlayCrossfade("FullBody, Override", "ActivateEnter", "Activate.playbackRate", duration, 0.05f); ((EntityState)this).PlayCrossfade("Body", "Idle", 0.05f); ((EntityState)this).GetModelAnimator().SetBool("isGrounded", false); purchaseInter = ((EntityState)this).GetComponent(); if (NetworkServer.active && Object.op_Implicit((Object)(object)purchaseInter)) { purchaseInter.SetAvailable(enableInteraction); } CharacterMaster master = ((EntityState)this).characterBody.master; if (Object.op_Implicit((Object)(object)master)) { ai = ((Component)master).GetComponent(); } Transform val = ((BaseState)this).FindModelChild("ZipperL"); if (Object.op_Implicit((Object)(object)val)) { lVFX = Object.Instantiate(SS2.Monsters.Mimic.zipperVFX, val); } Transform val2 = ((BaseState)this).FindModelChild("ZipperR"); if (Object.op_Implicit((Object)(object)val2)) { rVFX = Object.Instantiate(SS2.Monsters.Mimic.zipperVFX, val2); } ((Collider)((EntityState)this).GetComponent()).enabled = true; Vector3 val3; if (Object.op_Implicit((Object)(object)target)) { ref BodyInputs bodyInputs = ref ai.bodyInputs; val3 = target.corePosition - ((EntityState)this).transform.position; AimInDirection(ref bodyInputs, ((Vector3)(ref val3)).normalized); } else if (NetworkServer.active && ((EntityState)this).isAuthority) { SphereSearch val4 = new SphereSearch(); List list = new List(); val4.origin = ((EntityState)this).transform.position; val4.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; val4.radius = 10f; val4.RefreshCandidates(); val4.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(((EntityState)this).characterBody.teamComponent.teamIndex)); val4.FilterCandidatesByDistinctHurtBoxEntities(); val4.OrderCandidatesByDistance(); val4.GetHurtBoxes(list); val4.ClearCandidates(); if (list.Count > 0) { hurt = list[0]; ref BodyInputs bodyInputs2 = ref ai.bodyInputs; val3 = ((Component)hurt).transform.position - ((EntityState)this).transform.position; AimInDirection(ref bodyInputs2, ((Vector3)(ref val3)).normalized); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration / 4f && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)ai)) { ai.UpdateBodyAim(Time.fixedDeltaTime); } if (((EntityState)this).fixedAge >= duration) { endedSuccessfully = true; if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new MimicChestActivateLoop()); } } } public override void OnExit() { ((EntityState)this).OnExit(); EntityState.Destroy((Object)(object)lVFX); EntityState.Destroy((Object)(object)rVFX); if (!endedSuccessfully) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); } ModelLocator component = ((EntityState)this).GetComponent(); HurtBox[] hurtBoxes = ((Component)component.modelTransform).GetComponent().hurtBoxes; for (int i = 0; i < hurtBoxes.Length; i++) { ((Component)hurtBoxes[i]).gameObject.SetActive(true); } ((Behaviour)((EntityState)this).GetComponent()).enabled = false; ((Component)component.modelTransform).GetComponent().FindChildGameObject("HologramPivot").SetActive(false); ((Collider)((Component)component.modelTransform).GetComponent()).enabled = false; ((EntityState)this).characterBody.skillLocator.special.RemoveAllStocks(); ((EntityState)this).GetComponent().displayToken = "SS2_MIMIC_BODY_NAME"; } protected void AimAt(ref BodyInputs dest, Target aimTarget) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) Vector3 val = default(Vector3); if (aimTarget != null && aimTarget.GetBullseyePosition(ref val)) { Vector3 val2 = val - ((EntityState)this).inputBank.aimOrigin; dest.desiredAimDirection = ((Vector3)(ref val2)).normalized; } } protected void AimInDirection(ref BodyInputs dest, Vector3 aimDirection) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (aimDirection != Vector3.zero) { dest.desiredAimDirection = aimDirection; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class MimicChestActivateExit : BaseState { public static float baseDuration; private float duration; public override void OnEnter() { duration = baseDuration / base.attackSpeedStat; ((BaseState)this).OnEnter(); ((EntityState)this).PlayCrossfade("FullBody, Override", "ActivateExit", "Activate.playbackRate", duration, 0.05f); Util.PlaySound("Play_MULT_shift_hit", ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class MimicChestActivateLoop : BaseCharacterMain { public static float baseDuration; private float duration; public static float blastRadius; public static float blastProcCoefficient; public static float damageCoeff; public float blastForce; public Vector3 blastBonusForce; public static float knockbackForce; public static string leapSoundString; public GameObject blastImpactEffectPrefab; public GameObject blastEffectPrefab; public static float airControl; public static float aimVelocity; public static float upwardVelocity; public static float forwardVelocity; public static float minimumY; public static float minYVelocityForAnim; public static float maxYVelocityForAnim; public static string soundLoopStartEvent; public static string soundLoopStopEvent; public static NetworkSoundEventDef landingSound; private float previousAirControl; protected bool isCritAuthority; private bool endedSuccessfully; public override void OnEnter() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0081: 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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) duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseCharacterMain)this).OnEnter(); ((EntityState)this).PlayCrossfade("FullBody, Override", "ActivateLoop", "Activate.playbackRate", duration, 0.05f); previousAirControl = ((EntityState)this).characterMotor.airControl; ((EntityState)this).characterMotor.airControl = airControl; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; direction.y = Mathf.Max(direction.y, minimumY); Vector3 val = ((Vector3)(ref direction)).normalized * aimVelocity * ((BaseState)this).moveSpeedStat; 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; isCritAuthority = ((BaseState)this).RollCrit(); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.IgnoreFallDamage, 0.25f, 1); ((EntityState)this).characterBody.AddTimedBuff(Buffs.ArmorBoost, duration); } ((Behaviour)((Component)((EntityState)this).GetModelTransform()).GetComponent()).enabled = true; Util.PlaySound(leapSoundString, ((EntityState)this).gameObject); ((EntityState)this).characterDirection.moveVector = direction; Util.PlaySound(soundLoopStartEvent, ((EntityState)this).gameObject); Transform val5 = ((BaseState)this).FindModelChild("ThrusterL"); Transform val6 = ((BaseState)this).FindModelChild("ThrusterR"); if (Object.op_Implicit((Object)(object)val5)) { Object.Instantiate(SS2.Monsters.Mimic.jetVFX, val5); } if (Object.op_Implicit((Object)(object)val6)) { Object.Instantiate(SS2.Monsters.Mimic.jetVFX, val6); } } public override void FixedUpdate() { ((BaseCharacterMain)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && ((EntityState)this).fixedAge >= duration) { endedSuccessfully = true; if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new MimicChestActivateExit()); } } } protected Result DetonateAuthority() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0057: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00ae: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)0); damageType.damageSource = (DamageSource)8; BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, baseDamage = ((BaseState)this).damageStat * damageCoeff, baseForce = blastForce, bonusForce = blastBonusForce, crit = isCritAuthority, damageType = damageType, falloffModel = (FalloffModel)0, procCoefficient = blastProcCoefficient, radius = blastRadius, position = ((EntityState)this).characterBody.corePosition, attackerFiltering = (AttackerFiltering)2, teamIndex = ((EntityState)this).teamComponent.teamIndex }; DamageAPI.AddModdedDamageType(val, SS2.Monsters.Mimic.StealItemDamageType); EffectData val2 = new EffectData { origin = ((EntityState)this).characterBody.corePosition }; val2.SetNetworkedObjectReference(((EntityState)this).gameObject); EffectManager.SpawnEffect(SS2.Monsters.Mimic.leapLandVFX, val2, true); return val.Fire(); } public override void OnExit() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).OnExit(); Util.PlaySound(soundLoopStopEvent, ((EntityState)this).gameObject); ((EntityState)this).characterMotor.airControl = previousAirControl; if (!endedSuccessfully) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); } else if (NetworkServer.active && ((EntityState)this).isAuthority) { DetonateAuthority(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class MimicChestDeath : GenericCharacterDeath { private GameObject lVFX; private GameObject rVFX; private bool hasDropped; private bool shouldMakeVFX = true; private MimicInventoryManager mimicInventory; public override bool shouldAutoDestroy => false; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); CharacterModel val = default(CharacterModel); if (((Component)((EntityState)this).characterBody.modelLocator.modelTransform).TryGetComponent(ref val) && val.invisibilityCount >= 1) { shouldMakeVFX = false; } Transform val2 = ((BaseState)this).FindModelChild("ZipperL"); if (Object.op_Implicit((Object)(object)val2) && shouldMakeVFX) { lVFX = Object.Instantiate(SS2.Monsters.Mimic.zipperVFX, val2); } Transform val3 = ((BaseState)this).FindModelChild("ZipperR"); if (Object.op_Implicit((Object)(object)val3) && shouldMakeVFX) { rVFX = Object.Instantiate(SS2.Monsters.Mimic.zipperVFX, val3); } PurchaseInteraction component = ((EntityState)this).GetComponent(); if (NetworkServer.active && Object.op_Implicit((Object)(object)component)) { component.SetAvailable(false); } HologramProjector component2 = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { ((Behaviour)component2).enabled = false; } KinematicCharacterMotor component3 = ((EntityState)this).GetComponent(); component3.SetCapsuleDimensions(component3.CapsuleRadius, component3.CapsuleHeight, 0.925f); mimicInventory = ((EntityState)this).gameObject.GetComponent(); SpecialObjectAttributes val4 = default(SpecialObjectAttributes); if (((EntityState)this).TryGetComponent(ref val4)) { val4.grabbable = false; } } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); ((EntityState)this).characterMotor.velocity.x = 0f; ((EntityState)this).characterMotor.velocity.z = 0f; if (((EntityState)this).fixedAge > 1.5f && !hasDropped && Object.op_Implicit((Object)(object)mimicInventory)) { hasDropped = true; mimicInventory.DropItems(); } if (!shouldMakeVFX && !hasDropped && Object.op_Implicit((Object)(object)mimicInventory)) { hasDropped = true; mimicInventory.DropItems(); } } public override void OnExit() { ((GenericCharacterDeath)this).OnExit(); if (Object.op_Implicit((Object)(object)lVFX)) { Object.Destroy((Object)(object)lVFX); } if (Object.op_Implicit((Object)(object)rVFX)) { Object.Destroy((Object)(object)rVFX); } } } public class MimicChestInteractableIdle : BaseState { protected PurchaseInteraction purchaseInter; private bool activated; public static float baseDuration; private float duration; private float timer; private CharacterBody target; public bool rechest; public float healthPrevious; protected virtual bool enableInteraction => true; public override void OnEnter() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_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_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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_01bf: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; purchaseInter = ((EntityState)this).GetComponent(); if (NetworkServer.active && Object.op_Implicit((Object)(object)purchaseInter)) { purchaseInter.SetAvailable(enableInteraction); } ((UnityEvent)(object)purchaseInter.onPurchase).AddListener((UnityAction)delegate(Interactor interactor) { OnPurchaseMimic(interactor, purchaseInter); }); if (!rechest) { int num = Random.Range(0, 2) - 1; PurchaseInteraction obj = purchaseInter; obj.cost += num; ((EntityState)this).characterMotor.velocity = Vector3.zero; ICharacterGravityParameterProvider component = ((EntityState)this).gameObject.GetComponent(); if (component != null) { CharacterGravityParameters gravityParameters = component.gravityParameters; gravityParameters.channeledAntiGravityGranterCount++; component.gravityParameters = gravityParameters; } } else { ((Collider)((Component)((EntityState)this).characterBody).GetComponent()).enabled = true; ((Collider)((Component)((EntityState)this).characterBody).GetComponent()).enabled = false; ((Component)((EntityState)this).characterBody).GetComponent().displayToken = "CHEST1_NAME"; ((Component)((EntityState)this).GetComponent().modelTransform).GetComponent().FindChildGameObject("HologramPivot").SetActive(true); if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform)) { ((Collider)((Component)((EntityState)this).modelLocator.modelTransform).GetComponent()).enabled = true; } GameObject rechestVFX = SS2.Monsters.Mimic.rechestVFX; EffectData val = new EffectData { origin = ((EntityState)this).characterBody.corePosition }; val.SetNetworkedObjectReference(rechestVFX); EffectManager.SpawnEffect(rechestVFX, val, true); ((EntityState)this).PlayAnimation("Body", "IntermediateIdle"); ((Behaviour)((EntityState)this).GetComponent()).enabled = true; if (NetworkServer.active) { ((EntityState)this).healthComponent.HealFraction(0.5f, default(ProcChainMask)); Util.CleanseBody(((EntityState)this).characterBody, true, true, true, true, true, false); } } SetStateOnHurt component2 = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.canBeFrozen = false; component2.canBeStunned = false; } ((EntityState)this).GetComponent().isInteractable = true; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator.modelTransform)) { Animator component3 = ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { component3.SetBool("aimActive", false); } } } private void OnPurchaseMimic(Interactor interactor, PurchaseInteraction purchaseInter) { ((EntityState)this).PlayCrossfade("Body", "Activate", "Activate.playbackRate", 1f, 0.05f); timer = 0f; activated = true; target = ((Component)interactor).GetComponent(); } public override void FixedUpdate() { //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); HandleSkill(((EntityState)this).skillLocator.special, ref ((EntityState)this).inputBank.skill4); if (activated) { timer += Time.fixedDeltaTime; if (timer >= duration && ((EntityState)this).isAuthority) { MimicChestActivateEnter nextState = new MimicChestActivateEnter { target = target }; ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } if (healthPrevious > ((EntityState)this).healthComponent.health && ((EntityState)this).isAuthority) { MimicChestActivateEnter nextState2 = new MimicChestActivateEnter { target = target }; ((EntityState)this).outer.SetNextState((EntityState)(object)nextState2); } else { healthPrevious = ((EntityState)this).healthComponent.health; } if (rechest) { ((EntityState)this).characterMotor.velocity.x = 0f; ((EntityState)this).characterMotor.velocity.z = 0f; } else { ((EntityState)this).characterMotor.velocity = Vector3.zero; } } private void HandleSkill(GenericSkill skillSlot, ref ButtonState buttonState) { if (!Object.op_Implicit((Object)(object)skillSlot) || (Object)(object)skillSlot.skillDef == (Object)null || (!buttonState.down && Object.op_Implicit((Object)(object)skillSlot.skillDef)) || (skillSlot.mustKeyPress && buttonState.hasPressBeenClaimed)) { return; } if (rechest) { if (Random.Range(0, 3) == 0) { skillSlot.ExecuteIfReady(); buttonState.hasPressBeenClaimed = true; } else { skillSlot.RemoveAllStocks(); } } else if (Random.Range(0, 4) == 0) { skillSlot.ExecuteIfReady(); buttonState.hasPressBeenClaimed = true; } else { skillSlot.RemoveAllStocks(); } } public override void OnExit() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator.modelTransform)) { Animator component = ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.SetBool("aimActive", true); } } if (!rechest) { ICharacterGravityParameterProvider component2 = ((EntityState)this).gameObject.GetComponent(); if (component2 != null) { CharacterGravityParameters gravityParameters = component2.gravityParameters; gravityParameters.channeledAntiGravityGranterCount--; component2.gravityParameters = gravityParameters; } } ((EntityState)this).GetComponent().isInteractable = false; KinematicCharacterMotor component3 = ((EntityState)this).GetComponent(); component3.SetCapsuleDimensions(component3.CapsuleRadius, component3.CapsuleHeight, 0.925f); SetStateOnHurt component4 = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)component4)) { component4.canBeFrozen = true; component4.canBeStunned = true; } if (NetworkServer.active && Object.op_Implicit((Object)(object)purchaseInter)) { purchaseInter.SetAvailable(false); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class MimicChestRechest : BaseState { protected PurchaseInteraction purchaseInter; public static float baseDuration; private float duration; public bool taunting; public bool tryRechest = true; private MimicInventoryManager mim; protected virtual bool enableInteraction => false; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; purchaseInter = ((EntityState)this).GetComponent(); if (NetworkServer.active && Object.op_Implicit((Object)(object)purchaseInter)) { purchaseInter.SetAvailable(enableInteraction); } ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); mim = ((EntityState)this).GetComponent(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)mim) && mim.rechestPreventionTime > 0f && !taunting) { tryRechest = false; if (((EntityState)this).isAuthority) { ((EntityState)this).skillLocator.utility.RemoveAllStocks(); ((EntityState)this).skillLocator.utility.RunRecharge(Mathf.Max(0f, ((EntityState)this).skillLocator.special.cooldownRemaining - 3f)); ((EntityState)this).outer.SetNextStateToMain(); } } if (((EntityState)this).fixedAge >= duration && tryRechest && ((EntityState)this).isAuthority) { ((EntityState)this).skillLocator.special.cooldownOverride = 1f; ((EntityState)this).skillLocator.special.AddOneStock(); MimicChestInteractableIdle nextState = new MimicChestInteractableIdle { rechest = true }; ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write(taunting); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); taunting = reader.ReadBoolean(); } public override void ModifyNextState(EntityState nextState) { if (nextState is MimicChestInteractableIdle mimicChestInteractableIdle) { mimicChestInteractableIdle.rechest = true; } } } public class MimicLeapEnter : BaseState { public static float baseDuration; private float duration; private bool endedSuccessfully; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayCrossfade("FullBody, Override", "LeapEnter", "Leap.playbackRate", duration, 0.05f); ((EntityState)this).GetModelAnimator().SetBool("isGrounded", false); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.walkSpeedPenaltyCoefficient += 0.6f; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.walkSpeedPenaltyCoefficient -= 0.6f; endedSuccessfully = true; if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new MimicLeapLoop()); } } } public override void OnExit() { ((EntityState)this).OnExit(); if (!endedSuccessfully) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class MimicLeapExit : BaseState { public static float baseDuration; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayCrossfade("FullBody, Override", "LeapExit", "Leap.playbackRate", duration, 0.05f); Util.PlaySound("Play_MULT_shift_hit", ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = false; ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class MimicLeapLoop : BaseCharacterMain { public static float minimumDuration; public static float blastRadius; public static float blastProcCoefficient; public static float damageCoeff; public float blastForce; public Vector3 blastBonusForce; public static float knockbackForce; public static string leapSoundString; public GameObject blastImpactEffectPrefab; public GameObject blastEffectPrefab; public static float airControl; public static float aimVelocity; public static float upwardVelocity; public static float forwardVelocity; public static float minimumY; public static string soundLoopStartEvent; public static string soundLoopStopEvent; public static NetworkSoundEventDef landingSound; private float previousAirControl; protected bool isCritAuthority; private bool detonateNextFrame; private bool endedSuccessfully; public override void OnEnter() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00b2: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: 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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Expected O, but got Unknown ((BaseCharacterMain)this).OnEnter(); ((EntityState)this).PlayCrossfade("FullBody, Override", "LeapLoop", 0.05f); previousAirControl = ((EntityState)this).characterMotor.airControl; ((EntityState)this).characterMotor.airControl = airControl; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; direction.y = Mathf.Max(direction.y, minimumY); Vector3 val = ((Vector3)(ref direction)).normalized * aimVelocity * ((BaseState)this).moveSpeedStat / 2f; 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; isCritAuthority = ((BaseState)this).RollCrit(); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.IgnoreFallDamage, 0.25f, 1); } ((Behaviour)((Component)((EntityState)this).GetModelTransform()).GetComponent()).enabled = true; Util.PlaySound(leapSoundString, ((EntityState)this).gameObject); ((EntityState)this).characterDirection.moveVector = direction; if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.onMovementHit += new MovementHitDelegate(OnMovementHit); } Util.PlaySound(soundLoopStartEvent, ((EntityState)this).gameObject); Transform val5 = ((BaseState)this).FindModelChild("ThrusterL"); Transform val6 = ((BaseState)this).FindModelChild("ThrusterR"); if (Object.op_Implicit((Object)(object)val5)) { Object.Instantiate(SS2.Monsters.Mimic.jetVFX, val5); } if (Object.op_Implicit((Object)(object)val6)) { Object.Instantiate(SS2.Monsters.Mimic.jetVFX, val6); } } private void OnMovementHit(ref MovementHitInfo movementHitInfo) { detonateNextFrame = true; } public override void FixedUpdate() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && ((EntityState)this).fixedAge >= minimumDuration && (detonateNextFrame || (((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.IsStableOnGround && !((BaseCharacterController)((EntityState)this).characterMotor).Motor.LastGroundingStatus.IsStableOnGround))) { endedSuccessfully = true; if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector; DoImpactAuthority(); ((EntityState)this).outer.SetNextState((EntityState)(object)new MimicLeapExit()); } } } protected void DoImpactAuthority() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)landingSound)) { EffectManager.SimpleSoundEffect(landingSound.index, ((EntityState)this).characterBody.footPosition, true); } DetonateAuthority(); } protected Result DetonateAuthority() { //IL_0000: 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) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //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_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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_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_009e: 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_00b0: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d2: Unknown result type (might be due to invalid IL or missing references) EffectData val = new EffectData { origin = ((EntityState)this).characterBody.corePosition }; val.SetNetworkedObjectReference(((EntityState)this).gameObject); EffectManager.SpawnEffect(SS2.Monsters.Mimic.leapLandVFX, val, true); DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)0); damageType.damageSource = (DamageSource)2; return new BlastAttack { attacker = ((EntityState)this).gameObject, baseDamage = ((BaseState)this).damageStat * damageCoeff, baseForce = blastForce, bonusForce = blastBonusForce, crit = isCritAuthority, damageType = damageType, falloffModel = (FalloffModel)0, procCoefficient = blastProcCoefficient, radius = blastRadius, position = ((EntityState)this).characterBody.corePosition, attackerFiltering = (AttackerFiltering)2, teamIndex = ((EntityState)this).teamComponent.teamIndex }.Fire(); } public override void OnExit() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown Util.PlaySound(soundLoopStopEvent, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.onMovementHit -= new MovementHitDelegate(OnMovementHit); } ((EntityState)this).characterMotor.airControl = previousAirControl; ((BaseCharacterMain)this).OnExit(); if (!endedSuccessfully) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace EntityStates.Mimic.Weapon { public class MimicMinigunEnter : MimicMinigunState { public static float baseDuration; public static GameObject spinVFXPrefab; private float duration; private bool endedSuccessfully; public override void OnEnter() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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) base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; if (Object.op_Implicit((Object)(object)muzzleTransformLeft) && Object.op_Implicit((Object)(object)spinVFXPrefab)) { fireVFXInstanceLeft = Object.Instantiate(spinVFXPrefab, muzzleTransformLeft.position, muzzleTransformLeft.rotation); fireVFXInstanceLeft.transform.parent = muzzleTransformLeft; } if (Object.op_Implicit((Object)(object)muzzleTransformLeft) && Object.op_Implicit((Object)(object)spinVFXPrefab)) { fireVFXInstanceRight = Object.Instantiate(spinVFXPrefab, muzzleTransformRight.position, muzzleTransformRight.rotation); fireVFXInstanceRight.transform.parent = muzzleTransformRight; } ((EntityState)this).PlayCrossfade("Gesture, Override", "MinigunEnter", "MinigunFire.playbackRate", duration, 0.05f); } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { endedSuccessfully = true; if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new MimicMinigunLoop()); } } } public override void OnExit() { base.OnExit(); if (!endedSuccessfully) { ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); if (Object.op_Implicit((Object)(object)fireVFXInstanceLeft)) { EntityState.Destroy((Object)(object)fireVFXInstanceLeft); } if (Object.op_Implicit((Object)(object)fireVFXInstanceRight)) { EntityState.Destroy((Object)(object)fireVFXInstanceRight); } } } } public class MimicMinigunExit : MimicMinigunState { public static float baseDuration; private float duration; public override void OnEnter() { base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayCrossfade("Gesture, Override", "MinigunExit", "MinigunFire.playbackRate", duration, 0.05f); if (Object.op_Implicit((Object)(object)fireVFXInstanceLeft)) { EntityState.Destroy((Object)(object)fireVFXInstanceLeft); } if (Object.op_Implicit((Object)(object)fireVFXInstanceRight)) { EntityState.Destroy((Object)(object)fireVFXInstanceRight); } } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class MimicMinigunLoop : MimicMinigunState { public static float baseFireInterval; public static int baseBulletCount; public static float baseDamagePerSecondCoefficient; public static float baseProcCoefficientPerSecond; public static float bulletMinSpread; public static float bulletMaxSpread; public static GameObject muzzleVfxPrefab; public static GameObject bulletTracerEffectPrefab; public static GameObject bulletHitEffectPrefab; public static bool bulletHitEffectNormal; public static float bulletMaxDistance; private float fireTimer; private float baseFireRate; private float baseBulletsPerSecond; private FixedTimeStamp critEndTime; private FixedTimeStamp lastCritCheck; private bool endedSuccessfully; private float bulletDamage; private float procCoeff; private float fireInterval; public override void OnEnter() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); baseFireRate = 1f / baseFireInterval; fireInterval = baseFireInterval / ((BaseState)this).attackSpeedStat; baseBulletsPerSecond = (float)baseBulletCount * baseFireRate; critEndTime = FixedTimeStamp.negativeInfinity; lastCritCheck = FixedTimeStamp.negativeInfinity; ((EntityState)this).PlayCrossfade("Gesture, Override", "MinigunLoop", 0.05f); bulletDamage = baseDamagePerSecondCoefficient / baseBulletsPerSecond; procCoeff = baseProcCoefficientPerSecond / baseBulletsPerSecond; } public override void FixedUpdate() { base.FixedUpdate(); fireTimer -= ((EntityState)this).GetDeltaTime(); if (fireTimer <= 0f) { fireTimer += fireInterval; OnFireShared(); } if (!base.skillButtonState.down) { endedSuccessfully = true; if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new MimicMinigunExit()); } } } private void UpdateCrits() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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) if (((FixedTimeStamp)(ref lastCritCheck)).timeSince >= 1f) { lastCritCheck = FixedTimeStamp.now; if (((BaseState)this).RollCrit()) { critEndTime = FixedTimeStamp.now + 2f; } } } public override void OnExit() { base.OnExit(); if (!endedSuccessfully) { ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); if (Object.op_Implicit((Object)(object)fireVFXInstanceLeft)) { EntityState.Destroy((Object)(object)fireVFXInstanceLeft); } if (Object.op_Implicit((Object)(object)fireVFXInstanceRight)) { EntityState.Destroy((Object)(object)fireVFXInstanceRight); } } } private void OnFireShared() { Util.PlaySound("Play_commando_M1", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { OnFireAuthority(); } } private void OnFireAuthority() { //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_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_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_004c: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020d: 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_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) UpdateCrits(); bool isCrit = !((FixedTimeStamp)(ref critEndTime)).hasPassed; float damage = bulletDamage * ((BaseState)this).damageStat; Ray aimRay = ((BaseState)this).GetAimRay(); DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)0); damageType.damageSource = (DamageSource)1; new BulletAttack { bulletCount = (uint)baseBulletCount, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damage, damageColorIndex = (DamageColorIndex)0, damageType = damageType, falloffModel = (FalloffModel)0, maxDistance = bulletMaxDistance, force = 0f, hitMask = CommonMasks.bullet, minSpread = bulletMinSpread, maxSpread = bulletMaxSpread, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = MimicMinigunState.muzzleNameLeft, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = procCoeff, radius = 0f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = bulletTracerEffectPrefab, spreadPitchScale = 1f, spreadYawScale = 1f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = bulletHitEffectPrefab, HitEffectNormal = bulletHitEffectNormal }.Fire(); new BulletAttack { bulletCount = (uint)baseBulletCount, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damage, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)0, maxDistance = bulletMaxDistance, force = 0f, hitMask = CommonMasks.bullet, minSpread = bulletMinSpread, maxSpread = bulletMaxSpread, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = MimicMinigunState.muzzleNameRight, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = procCoeff, radius = 0f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = bulletTracerEffectPrefab, spreadPitchScale = 1f, spreadYawScale = 1f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = bulletHitEffectPrefab, HitEffectNormal = bulletHitEffectNormal }.Fire(); } } public class MimicMinigunState : BaseState { public static string muzzleNameLeft; public static string muzzleNameRight; protected static readonly BuffDef slowBuff = SS2Content.Buffs.bdHiddenSlow20; protected Transform muzzleTransformLeft; protected Transform muzzleTransformRight; public GameObject fireVFXInstanceLeft; public GameObject fireVFXInstanceRight; protected ref ButtonState skillButtonState => ref ((EntityState)this).inputBank.skill1; public override void OnEnter() { ((BaseState)this).OnEnter(); muzzleTransformLeft = ((BaseState)this).FindModelChild(muzzleNameLeft); muzzleTransformRight = ((BaseState)this).FindModelChild(muzzleNameRight); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((BaseState)this).StartAimMode(2f, false); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void ModifyNextState(EntityState nextState) { ((EntityState)this).ModifyNextState(nextState); if (nextState is MimicMinigunState mimicMinigunState) { if (Object.op_Implicit((Object)(object)fireVFXInstanceLeft)) { mimicMinigunState.fireVFXInstanceLeft = fireVFXInstanceLeft; } if (Object.op_Implicit((Object)(object)fireVFXInstanceRight)) { mimicMinigunState.fireVFXInstanceRight = fireVFXInstanceRight; } } } } } namespace EntityStates.LunarTable { public class Activate : EntityState { public override void OnEnter() { ((EntityState)this).OnEnter(); ((EntityState)this).PlayAnimation("Activate", "Activate"); } } } namespace EntityStates.LampBoss { public class BuffNearby : BaseState { public static float baseDuration; private float duration; public static GameObject buffWard; public static GameObject blueBuffWard; private GameObject wardInstance; public static GameObject chargingVFX; public static GameObject chargingVFXBlue; public static GameObject explosionVFX; public static GameObject explosionBlueVFX; public static float baseDamageCoefficient = 2f; public static float forceCoefficient = 400f; public static float procCoefficient = 1f; public static float radius = 10f; private bool hasBuffed; private Animator animator; public static string mecanimParameter; private float timer; private bool isBlue; public override void OnEnter() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); hasBuffed = false; animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / base.attackSpeedStat; hasBuffed = false; isBlue = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE"; if (Object.op_Implicit((Object)(object)(isBlue ? chargingVFXBlue : chargingVFX))) { new EffectData { origin = ((EntityState)this).characterBody.corePosition, rootObject = ((Component)((EntityState)this).GetModelChildLocator().FindChild("Chest")).gameObject }; } ((EntityState)this).PlayCrossfade("FullBody, Override", "SecondaryBuff", "Secondary.playbackRate", duration, 0.05f); } public override void FixedUpdate() { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (animator.GetFloat(mecanimParameter) >= 0.5f && !hasBuffed) { hasBuffed = true; GameObject val = (isBlue ? blueBuffWard : buffWard); GameObject val2 = (isBlue ? explosionBlueVFX : explosionVFX); if (((EntityState)this).isAuthority) { wardInstance = Object.Instantiate(val); wardInstance.GetComponent().teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex; wardInstance.GetComponent().AttachToGameObjectAndSpawn(((EntityState)this).gameObject, (string)null); } bool crit = ((BaseState)this).RollCrit(); new BlastAttack { radius = radius, procCoefficient = procCoefficient, position = ((EntityState)this).characterBody.corePosition, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, baseForce = forceCoefficient, crit = crit, baseDamage = ((EntityState)this).characterBody.damage * baseDamageCoefficient, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2 }.Fire(); if (Object.op_Implicit((Object)(object)val2)) { EffectManager.SimpleEffect(val2, ((EntityState)this).characterBody.corePosition, Quaternion.identity, true); } Util.PlayAttackSpeedSound("LampBullet", ((EntityState)this).gameObject, ((EntityState)this).characterBody.attackSpeed); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class FireOrbs : BaseSkillState { public static float damageCoefficient; public static float recoil; public static float projectileSpeed; public static float baseDuration; public static string mecanimPerameter; public static float baseTimeBetweenShots; public static GameObject projectilePrefab; public static GameObject blueProjectilePrefab; public static string muzzleString; public static float maxOrbCount; private static float walkSpeedCoefficient = 0.5f; private float orbCount; private float timer; private float duration; private float timeBetweenShots; private Transform muzzle; private Animator animator; private Ray aimRay; private GameObject projectile; public override void OnEnter() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(5f); timeBetweenShots = baseTimeBetweenShots / ((BaseState)this).attackSpeedStat; muzzle = ((EntityState)this).GetModelChildLocator().FindChild(muzzleString); animator = ((EntityState)this).GetModelAnimator(); aimRay = ((BaseState)this).GetAimRay(); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedCoefficient; bool flag = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE"; projectile = (flag ? blueProjectilePrefab : projectilePrefab); Util.PlayAttackSpeedSound("WayfarerAttack", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayCrossfade("FullBody, Override", "HoldLamp", "Primary.playbackRate", duration, 0.05f); } public virtual 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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) aimRay = ((BaseState)this).GetAimRay(); float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Vector3 val = Quaternion.Euler(Random.Range(-18.5f, 18.5f), Random.Range(-2.5f, 22.5f), 0f) * ((Ray)(ref aimRay)).direction; DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)0); value.damageSource = (DamageSource)1; ProjectileManager.instance.FireProjectile(projectile, muzzle.position, Util.QuaternionSafeLookRotation(val), ((EntityState)this).gameObject, num, 20f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed, (DamageTypeCombo?)value); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); timer += Time.fixedDeltaTime; if (animator.GetFloat("RaiseLamp") >= 0.5f && orbCount < maxOrbCount && timer >= baseTimeBetweenShots / ((BaseState)this).attackSpeedStat) { orbCount += 1f; timer = 0f; if (((EntityState)this).isAuthority) { FireProjectile(); } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class LampBossDeath : GenericCharacterDeath { public static GameObject deathVFX; public static GameObject deathVFXblue; public static GameObject initialVFX; public static GameObject initialVFXblue; public static float duration; public static string mecanimPerameter; private float timer; private Animator animator; private bool hasPlayedEffect; public static string muzzleString; private GameObject particles; private Transform muzzle; private bool isBlue; public override void OnEnter() { //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayCrossfade("FullBody, Override", "BufferEmpty", 0.01f); muzzle = ((EntityState)this).GetModelChildLocator().FindChild(muzzleString); Util.PlaySound("WayfarerVO", ((EntityState)this).gameObject); hasPlayedEffect = false; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((Behaviour)((EntityState)this).characterMotor).enabled = false; } isBlue = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE"; hasPlayedEffect = true; GameObject val = (isBlue ? deathVFXblue : deathVFX); if (NetworkServer.active) { EffectManager.SimpleEffect(val, muzzle.position, muzzle.rotation, true); } } public override void FixedUpdate() { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).FixedUpdate(); if ((Object.op_Implicit((Object)(object)animator) && animator.GetFloat(mecanimPerameter) > 0.5f) || (((EntityState)this).fixedAge > 2.7f && !hasPlayedEffect && NetworkServer.active)) { hasPlayedEffect = true; GameObject val = (isBlue ? deathVFXblue : deathVFX); Util.PlaySound("WayfarerDeath", ((EntityState)this).gameObject); if (NetworkServer.active) { EffectManager.SimpleEffect(val, muzzle.position, muzzle.rotation, true); } if (Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { EntityState.Destroy((Object)(object)((Component)((GenericCharacterDeath)this).cachedModelTransform).gameObject); ((GenericCharacterDeath)this).cachedModelTransform = null; } ((GenericCharacterDeath)this).DestroyBodyAsapServer(); ((GenericCharacterDeath)this).DestroyModel(); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override void OnExit() { ((GenericCharacterDeath)this).DestroyModel(); ((GenericCharacterDeath)this).OnExit(); } } public class LampBossSpawn : GenericCharacterSpawnState { public static GameObject spawnVFX; public static GameObject spawnVFXblue; private static string childString = "BodyMesh"; private Transform muzzle; private static float realDuration = 3.7f; private static float printTime = 3.7f; private static float printStartHeight = 9.5f; private static float printMaxHeight = -5f; private static float printStartBias = 6f; private static float printMaxBias = 2f; private Animator animator; private AimAnimator aimAnimator; public override void OnEnter() { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).damageStat = realDuration; ((GenericCharacterSpawnState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ((Behaviour)animator).enabled = false; aimAnimator = ((EntityState)this).GetAimAnimator(); ((Behaviour)aimAnimator).enabled = false; GameObject val = ((((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE") ? spawnVFXblue : spawnVFX); Util.PlaySound("WayfarerSpawn", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)val)) { GameObject obj = Object.Instantiate(val, ((EntityState)this).transform.position, Quaternion.identity); SkinnedMeshRenderer component = ((Component)((BaseState)this).FindModelChild(childString)).GetComponent(); ShapeModule shape = obj.GetComponent().shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)14; ((ShapeModule)(ref shape)).skinnedMeshRenderer = component; } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { PrintController component2 = ((Component)modelTransform).GetComponent(); ((Behaviour)component2).enabled = false; component2.printTime = printTime; component2.startingPrintHeight = printStartHeight; component2.maxPrintHeight = printMaxHeight; component2.startingPrintBias = printStartBias; component2.maxPrintBias = printMaxBias; ((Behaviour)component2).enabled = true; } } public override void OnExit() { ((EntityState)this).OnExit(); ((Behaviour)animator).enabled = true; ((Behaviour)aimAnimator).enabled = true; } } public class PrepSpawnBigLamp : BaseSkillState { public static GameObject muzzleEffectPrefab; private static string muzzleName = "LanternL"; private static float baseDuration = 1.5f; private static string enterSoundString = "WayfarerRaiseBigLamp"; private static float walkSpeedCoefficient = 0.25f; private float duration; private GameObject effectInstance; private Transform muzzle; public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)5; } public override void OnEnter() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("FullBody, Override", "HoldLamp"); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedCoefficient; muzzle = ((BaseState)this).FindModelChild(muzzleName); if (Object.op_Implicit((Object)(object)muzzleEffectPrefab) && Object.op_Implicit((Object)(object)muzzle)) { effectInstance = Object.Instantiate(muzzleEffectPrefab, ((Component)muzzle).transform.position, Quaternion.identity); } Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new SpawnBigLamp()); } } public override void Update() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)effectInstance)) { effectInstance.transform.position = ((Component)muzzle).transform.position; } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; } } public class SpawnBigLamp : BaseSkillState { private static BodyIndex bigLamp = (BodyIndex)(-1); public static GameObject muzzleEffectPrefab; public static GameObject bodyPrefab; private static float duration = 30f; private static string enterSoundString = "WayfarerStartBigLamp"; private static string startLoopSoundString = "Play_WayfarerBigLampLoop"; private static string stopLoopSoundString = "Stop_WayfarerBigLampLoop"; private static float walkSpeedCoefficient = 0.25f; private CharacterBody bigLampInstanceBody; private bool bigLampResolved; public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)5; } public override void OnEnter() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Invalid comparison between Unknown and I4 //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) if ((int)bigLamp == -1) { bigLamp = BodyCatalog.FindBodyIndex(bodyPrefab); } ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("FullBody, Override", "HoldLamp", "Primary.playbackRate", duration, 0f); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedCoefficient; if (Object.op_Implicit((Object)(object)muzzleEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, "LanternL", false); } if (NetworkServer.active) { GameObject val = Object.Instantiate(bodyPrefab); bigLampInstanceBody = val.GetComponent(); bigLampInstanceBody.teamComponent.teamIndex = ((EntityState)this).teamComponent.teamIndex; bigLampResolved = true; val.GetComponent().AttachToGameObjectAndSpawn(((EntityState)this).gameObject, "LanternL"); } if (((EntityState)this).isAuthority) { CharacterBody.onBodyStartGlobal += ResolveLampInstance; CharacterBody.onBodyDestroyGlobal += OnBodyDestroyGlobal; } Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } private void ResolveLampInstance(CharacterBody body) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) NetworkedBodyAttachment val = default(NetworkedBodyAttachment); if (!bigLampResolved && body.bodyIndex == bigLamp && ((Component)body).TryGetComponent(ref val) && (Object)(object)val.Network_attachedBodyObject == (Object)(object)((EntityState)this).gameObject) { bigLampResolved = true; bigLampInstanceBody = body; } } private void OnBodyDestroyGlobal(CharacterBody body) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) NetworkedBodyAttachment val = default(NetworkedBodyAttachment); if (body.bodyIndex == bigLamp && ((Component)body).TryGetComponent(ref val) && (Object)(object)val.Network_attachedBodyObject == (Object)(object)((EntityState)this).gameObject) { ((EntityState)this).outer.SetNextState((EntityState)(object)new OwieMyLamp()); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { FixedUpdateAuthority(); } } private void FixedUpdateAuthority() { if (bigLampResolved && (!Object.op_Implicit((Object)(object)bigLampInstanceBody) || !bigLampInstanceBody.healthComponent.alive)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new OwieMyLamp()); } else if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new LowerBigLamp()); } } public override void OnExit() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); Util.PlaySound(stopLoopSoundString, ((EntityState)this).gameObject); CharacterBody.onBodyStartGlobal -= ResolveLampInstance; CharacterBody.onBodyDestroyGlobal -= OnBodyDestroyGlobal; ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; if (NetworkServer.active && Object.op_Implicit((Object)(object)bigLampInstanceBody)) { bigLampInstanceBody.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); } } } public class LowerBigLamp : BaseState { private static string enterSoundString = "WayfarerEndBigLamp"; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); ((EntityState)this).outer.SetNextStateToMain(); } } public class OwieMyLamp : BaseState { private static float duration = 3f; private static string enterSoundString; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class SummonLamps : BaseState { private static float baseDuration = 2.4f; private static float startTime = 0.5f; private float duration; private Animator animator; private BullseyeSearch enemySearch; public static SpawnCard spawnCard; private float summonTimer; private int summonCount; private static float summonInterval = 0.3f; private static int maxSummonCount = 4; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayCrossfade("FullBody, Override", "SecondaryBuff", "Secondary.playbackRate", duration, 0.05f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration * startTime) { summonTimer += Time.fixedDeltaTime; if (NetworkServer.active && summonTimer > 0f && summonCount < maxSummonCount) { summonCount++; summonTimer -= summonInterval; SummonFollower(); } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void SummonFollower() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_004c: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown Transform coreTransform = ((EntityState)this).characterBody.coreTransform; if (!Object.op_Implicit((Object)(object)coreTransform)) { return; } DirectorSpawnRequest val = new DirectorSpawnRequest(spawnCard, new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 3f, maxDistance = 20f, spawnOnTarget = coreTransform }, RoR2Application.rng); val.summonerBodyObject = ((EntityState)this).gameObject; val.onSpawnedServer = (Action)Delegate.Combine(val.onSpawnedServer, (Action)delegate(SpawnResult spawnResult) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (spawnResult.success && Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { Inventory component = spawnResult.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.CopyEquipmentFrom(((EntityState)this).characterBody.inventory); } } }); DirectorCore instance = DirectorCore.instance; if (!((Object)(object)instance == (Object)null)) { instance.TrySpawnObject(val); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class TurnInvis : BaseState { public static float baseDuration; private float duration; private bool hasBuffed; private Animator animator; public static string mecanimParameter; private float timer; public float blinkDistance = 18f; public GameObject particles; private Vector3 blinkDestination = Vector3.zero; private BullseyeSearch enemySearch; public static SpawnCard spawnCard; private float summonTimer; private int summonCount; public static float summonInterval = 0.6f; public static int maxSummonCount = 5; public override void OnEnter() { ((BaseState)this).OnEnter(); hasBuffed = false; animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / base.attackSpeedStat; ((Component)((BaseState)this).FindModelChild("GlowParticles")).gameObject.SetActive(true); CalculateBlinkDestination(); ((EntityState)this).PlayCrossfade("FullBody, Override", "SecondaryBuff", "Secondary.playbackRate", duration, 0.05f); } public override void FixedUpdate() { //IL_00a5: 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_00d4: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); summonTimer += Time.fixedDeltaTime; if (NetworkServer.active && summonTimer > 0f && summonCount < maxSummonCount) { summonCount++; summonTimer -= summonInterval; if (((EntityState)this).isAuthority) { SummonFollower(); } } if (animator.GetFloat(mecanimParameter) >= 0.5f && !hasBuffed) { hasBuffed = true; ((Component)((BaseState)this).FindModelChild("GlowParticles")).gameObject.SetActive(false); SetPosition(blinkDestination); ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.Cloak.buffIndex, 6f); ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.CloakSpeed.buffIndex, 6f); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void SetPosition(Vector3 newPosition) { //IL_0018: 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) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(newPosition, Quaternion.identity, true); } } private void CalculateBlinkDestination() { //IL_0000: 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) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0114: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.zero; Ray aimRay = ((BaseState)this).GetAimRay(); BullseyeSearch val2 = new BullseyeSearch { searchOrigin = ((Ray)(ref aimRay)).origin, searchDirection = ((Ray)(ref aimRay)).direction, maxDistanceFilter = blinkDistance, teamMaskFilter = TeamMask.allButNeutral, filterByLoS = false }; ((TeamMask)(ref val2.teamMaskFilter)).RemoveTeam((TeamIndex)1); val2.sortMode = (SortMode)2; val2.RefreshCandidates(); HurtBox val3 = val2.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val3)) { val = ((Component)val3).transform.position - ((EntityState)this).transform.position; } blinkDestination = ((EntityState)this).transform.position; NodeGraph groundNodes = SceneInfo.instance.groundNodes; NodeIndex val4 = groundNodes.FindClosestNode(((EntityState)this).transform.position + val, ((EntityState)this).characterBody.hullClassification, float.PositiveInfinity); groundNodes.GetNodePosition(val4, ref blinkDestination); blinkDestination += ((EntityState)this).transform.position - ((EntityState)this).characterBody.footPosition; ((EntityState)this).characterDirection.forward = val; } private void SummonFollower() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_004c: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown Transform coreTransform = ((EntityState)this).characterBody.coreTransform; if (!Object.op_Implicit((Object)(object)coreTransform)) { return; } DirectorSpawnRequest val = new DirectorSpawnRequest(spawnCard, new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 3f, maxDistance = 20f, spawnOnTarget = coreTransform }, RoR2Application.rng); val.summonerBodyObject = ((EntityState)this).gameObject; val.onSpawnedServer = (Action)Delegate.Combine(val.onSpawnedServer, (Action)delegate(SpawnResult spawnResult) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (spawnResult.success && Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { Inventory component = spawnResult.spawnedInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.CopyEquipmentFrom(((EntityState)this).characterBody.inventory); } } }); DirectorCore instance = DirectorCore.instance; if (!((Object)(object)instance == (Object)null)) { instance.TrySpawnObject(val); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } } namespace EntityStates.BigLamp { public class DeathState : GenericCharacterDeath { public static GameObject effectPrefab; public override bool shouldAutoDestroy => true; public override void OnEnter() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).OnEnter(); LampCameraPullController component = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } Transform val = ((BaseState)this).FindModelChild("VfxRoot"); if (Object.op_Implicit((Object)(object)val)) { ((Component)val).gameObject.SetActive(false); } if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleEffect(effectPrefab, ((EntityState)this).transform.position, Quaternion.identity, false); } } } } namespace EntityStates.Lamp { public class FireOrb : BaseSkillState { public static float damageCoefficient; public static float recoil; public static float projectileSpeed; public static float baseDuration; public static string mecanimPeramater; public static GameObject projectilePrefab; public static GameObject blueProjectilePrefab; public static string muzzleString; private float duration; private bool hasFired; private Transform muzzle; private Animator animator; private float originalMoveSpeed; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(duration * 1.5f); duration = baseDuration / ((BaseState)this).attackSpeedStat; muzzle = ((EntityState)this).GetModelChildLocator().FindChild(muzzleString); animator = ((EntityState)this).GetModelAnimator(); hasFired = false; originalMoveSpeed = ((EntityState)this).characterBody.moveSpeed; ((EntityState)this).PlayCrossfade("FullBody, Override", "Attack", "Primary.playbackRate", duration, 0.05f); } public virtual void FireProjectile() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_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_00bc: 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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) float num = damageCoefficient * ((BaseState)this).damageStat; ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * recoil); Ray aimRay = ((BaseState)this).GetAimRay(); GameObject val = ((((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE") ? blueProjectilePrefab : projectilePrefab); Util.PlayAttackSpeedSound("LampBullet", ((EntityState)this).gameObject, ((EntityState)this).characterBody.attackSpeed); DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)0); value.damageSource = (DamageSource)1; ProjectileManager.instance.FireProjectile(val, muzzle.position, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, num, 30f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileSpeed, (DamageTypeCombo?)value); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed * 0.5f; if (animator.GetFloat("Fire") >= 0.5f && !hasFired) { hasFired = true; if (((EntityState)this).isAuthority) { FireProjectile(); } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FriendSearch : BaseSkillState { public static float duration = 0.6f; public static float radius = 12f; public static string muzzleString = "Muzzle"; private SphereSearch sphereSearch; public override void OnEnter() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0025: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (((EntityState)this).isAuthority) { sphereSearch = new SphereSearch(); sphereSearch.origin = ((EntityState)this).transform.position; sphereSearch.mask = ((LayerIndex)(ref LayerIndex.enemyBody)).mask; sphereSearch.queryTriggerInteraction = (QueryTriggerInteraction)2; sphereSearch.radius = radius; } } public void Search() { List list = CollectionPool>.RentCollection(); sphereSearch.ClearCandidates(); sphereSearch.RefreshCandidates(); sphereSearch.FilterCandidatesByColliderEntities(); sphereSearch.OrderCandidatesByDistance(); sphereSearch.FilterCandidatesByDistinctColliderEntities(); sphereSearch.GetColliders(list); List list2 = new List(); foreach (Collider item in list) { GameObject gameObject = ((Component)((Component)item).transform.parent).gameObject; list2.Add(gameObject); } } } public class HealBeam : BaseSkillState { private static float baseDuration = 6f; private static float buffDuration = 4f; private static float tickInterval = 0.2f; private static float totalDamageCoefficient = 9f; private static DamageType damageType = (DamageType)0; private static float procCoefficientPerTick = 0.4f; private static float totalHealCoefficient = 8f; private static float enemyPrioritySearchRadius = 19f; private static float searchRadius = 27f; private static float beamBreakDistance = 36f; private static int maxBeams = 1; private static bool ignoreMass = true; private static float forceMagnitude = -1.25f; private static float forceDamping = 0.4f; private static float maxHeightDiff = 15f; private static float forceCoefficientAtMaxHeightDiff = 2f; private static float selfUpSpeed = 3f; public static GameObject healBeamPrefab; public static GameObject healBeamPrefabBlue; private SphereSearch sphereSearch; private List hits; private List healBeams; private bool isBlue; private float duration; private float originalMoveSpeed; private float healRate; private float damageRate; private bool shouldFlyUp; private Transform muzzle; private bool resolvedAnyBeam; public override void OnEnter() { //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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) ((BaseState)this).OnEnter(); ((EntityState)this).PlayCrossfade("Body", "IdleBuff", 0.3f); Util.PlaySound("FollowerCast", ((EntityState)this).gameObject); originalMoveSpeed = ((EntityState)this).characterBody.moveSpeed; isBlue = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE"; duration = baseDuration / ((BaseState)this).attackSpeedStat; healRate = totalHealCoefficient * ((BaseState)this).damageStat / duration; damageRate = totalDamageCoefficient * ((BaseState)this).damageStat / duration; muzzle = ((BaseState)this).FindModelChild("Muzzle"); if (NetworkServer.active) { hits = new List(); SphereSearch val = new SphereSearch { mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, radius = enemyPrioritySearchRadius, origin = ((EntityState)this).characterBody.corePosition }; val.RefreshCandidates(); val.FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)); val.FilterCandidatesByDistinctHurtBoxEntities(); val.OrderCandidatesByDistance(); val.GetHurtBoxes(hits); if (hits.Count == 0) { TeamMask allButNeutral = TeamMask.allButNeutral; sphereSearch = new SphereSearch(); sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; sphereSearch.radius = searchRadius; sphereSearch.origin = ((EntityState)this).characterBody.corePosition; sphereSearch.RefreshCandidates(); sphereSearch.FilterCandidatesByHurtBoxTeam(allButNeutral); sphereSearch.FilterCandidatesByDistinctHurtBoxEntities(); sphereSearch.OrderCandidatesByDistance(); sphereSearch.GetHurtBoxes(hits); } healBeams = new List(); int num = 0; foreach (HurtBox hit in hits) { CharacterBody body = hit.healthComponent.body; if (CanHeal(body) && num < maxBeams) { num++; BeamController component = Object.Instantiate(isBlue ? healBeamPrefabBlue : healBeamPrefab, muzzle).GetComponent(); ((UnityEvent)component.onTickServer).AddListener((UnityAction)OnTickServer); component.tickInterval = tickInterval; component.target = hit.hurtBoxGroup.mainHurtBox; component.ownership.ownerObject = ((EntityState)this).gameObject; healBeams.Add(component); NetworkServer.Spawn(((EntityState)this).gameObject); if (!shouldFlyUp && ShouldDamage(hit)) { shouldFlyUp = true; } } } } if (((EntityState)this).isAuthority) { BeamController.onBeamStartGlobal += ResolveBeam; } } private void ResolveBeam(BeamController beam) { if ((Object)(object)beam.ownership.ownerObject == (Object)(object)((EntityState)this).gameObject) { resolvedAnyBeam = true; } } private void OnTickServer(BeamController beam) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_00b5: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) HurtBox target = beam.target; float num = beam.tickInterval; if (!ShouldDamage(target)) { target.healthComponent.Heal(healRate * num, default(ProcChainMask), true); } else { DamageInfo val = new DamageInfo(); val.damage = damageRate * num; val.crit = ((EntityState)this).characterBody.RollCrit(); val.attacker = ((EntityState)this).gameObject; val.inflictor = ((Component)beam).gameObject; val.position = ((Component)target).transform.position; val.force = Vector3.zero; val.procChainMask = default(ProcChainMask); val.procCoefficient = procCoefficientPerTick; val.damageType = DamageTypeCombo.op_Implicit(damageType); val.damageColorIndex = (DamageColorIndex)0; target.healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)target.healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)target.healthComponent).gameObject); } target.healthComponent.body.AddTimedBuff(SS2Content.Buffs.bdLampBuff.buffIndex, buffDuration); } private bool CanHeal(CharacterBody body) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body.master) && body.healthComponent.alive && !body.hasCloakBuff && body.bodyIndex != ((EntityState)this).characterBody.bodyIndex && body.bodyIndex != SS2.Monsters.LampBoss.BodyIndex) { return body.bodyIndex != SS2.Monsters.Lamp.BodyIndex; } return false; } private bool ShouldDamage(HurtBox target) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) return FriendlyFireManager.ShouldSeekingProceed(target.healthComponent, ((EntityState)this).teamComponent.teamIndex); } public override void OnExit() { ((EntityState)this).PlayCrossfade("Body", "Idle", 0.3f); BeamController.onBeamStartGlobal -= ResolveBeam; if (NetworkServer.active && healBeams != null && healBeams.Count > 0) { foreach (BeamController healBeam in healBeams) { if (Object.op_Implicit((Object)(object)healBeam)) { healBeam.BreakServer(); } } } ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed; ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_002b: 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_003f: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed * 0.1f; if (shouldFlyUp) { ((EntityState)this).rigidbodyMotor.AddDisplacement(Vector3.up * selfUpSpeed * Time.fixedDeltaTime); } if (NetworkServer.active) { RaycastHit val2 = default(RaycastHit); for (int i = 0; i < healBeams.Count; i++) { BeamController beamController = healBeams[i]; if (!Object.op_Implicit((Object)(object)beamController) || !Object.op_Implicit((Object)(object)beamController.target)) { continue; } Vector3 val = ((Component)beamController.target).transform.position - ((EntityState)this).transform.position; if (Physics.Linecast(((Component)beamController.target).transform.position, ((EntityState)this).transform.position, ref val2, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1) || ((Vector3)(ref val)).sqrMagnitude > beamBreakDistance * beamBreakDistance) { if (Object.op_Implicit((Object)(object)beamController)) { beamController.BreakServer(); } } else if (Object.op_Implicit((Object)(object)beamController) && Object.op_Implicit((Object)(object)beamController.target) && ShouldDamage(beamController.target)) { Lifto(beamController.target); } } } if (((EntityState)this).isAuthority) { bool flag = ((EntityState)this).fixedAge >= duration; if (resolvedAnyBeam && BeamController.GetBeamCountForOwner(((EntityState)this).gameObject) == 0) { flag = true; } if (flag) { ((EntityState)this).outer.SetNextStateToMain(); } } } protected void Lifto(HurtBox hurtBox) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_0132: 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_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0176: 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_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || !Object.op_Implicit((Object)(object)hurtBox)) { return; } HealthComponent healthComponent = hurtBox.healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent) || !Object.op_Implicit((Object)(object)healthComponent.body) || !Object.op_Implicit((Object)(object)((Component)hurtBox).transform)) { return; } CharacterMotor characterMotor = healthComponent.body.characterMotor; Vector3 val = ((Component)hurtBox).transform.position - ((EntityState)this).transform.position; float num = Mathf.Abs(val.y); Vector3 normalized = default(Vector3); ((Vector3)(ref normalized))..ctor(0f, val.y, 0f); normalized = ((Vector3)(ref normalized)).normalized; float num2 = Mathf.Clamp(num / maxHeightDiff, 1f, forceCoefficientAtMaxHeightDiff); Vector3 val2 = normalized * forceMagnitude * num2; Vector3 val3 = Vector3.zero; float num3 = 0f; bool flag = false; if (Object.op_Implicit((Object)(object)characterMotor)) { flag = characterMotor.useGravity; val3 = Vector3.up * characterMotor.velocity.y; num3 = characterMotor.mass; } else { Rigidbody rigidbody = healthComponent.body.rigidbody; if (Object.op_Implicit((Object)(object)rigidbody)) { flag = rigidbody.useGravity; val3 = Vector3.up * rigidbody.velocity.y; num3 = rigidbody.mass; } } if (flag) { val3.y += Physics.gravity.y * Time.fixedDeltaTime; } if (ignoreMass) { val2 *= num3; } healthComponent.TakeDamageForce(val2 - val3 * forceDamping * num3 * num2, true, false); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class LampDeath : GenericCharacterDeath { public static GameObject deathVFX; public static GameObject deathVFXblue; private static float duration = 0.6f; private static string mecanimPerameter = "Death"; private static string muzzleString = "Head"; private static string deathSoundString = "FollowerDeath"; private static string deathVoiceSoundString; private static float printTime = 1f; private static float printStartHeight = -25f; private static float printMaxHeight = -25f; private static float printStartBias = 0.9f; private static float printMaxBias = 3.33f; private Transform muzzle; private float timer; private Animator animator; private bool hasPlayedEffect; private bool isBlue; private bool hasDestroyed; public override void OnEnter() { //IL_00a5: 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) ((GenericCharacterDeath)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayAnimation("Body", "Death"); muzzle = ((EntityState)this).GetModelChildLocator().FindChild(muzzleString); Util.PlaySound(deathSoundString, ((EntityState)this).gameObject); Util.PlaySound(deathVoiceSoundString, ((EntityState)this).gameObject); isBlue = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE"; EffectManager.SimpleEffect(isBlue ? deathVFXblue : deathVFX, muzzle.position, muzzle.rotation, false); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { PrintController component = ((Component)modelTransform).GetComponent(); ((Behaviour)component).enabled = false; component.printTime = printTime; component.startingPrintHeight = printStartHeight; component.maxPrintHeight = printMaxHeight; component.startingPrintBias = printStartBias; component.maxPrintBias = printMaxBias; ((Behaviour)component).enabled = true; } Transform val = ((BaseState)this).FindModelChild("GlassMesh"); if (Object.op_Implicit((Object)(object)val)) { ((Component)val).gameObject.SetActive(false); } } public void DestroyLamp() { if (!hasDestroyed) { hasPlayedEffect = true; hasDestroyed = true; if (Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { EntityState.Destroy((Object)(object)((Component)((GenericCharacterDeath)this).cachedModelTransform).gameObject); ((GenericCharacterDeath)this).cachedModelTransform = null; } ((GenericCharacterDeath)this).DestroyBodyAsapServer(); ((GenericCharacterDeath)this).DestroyModel(); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override void OnExit() { DestroyLamp(); ((GenericCharacterDeath)this).OnExit(); } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority && !hasPlayedEffect) { DestroyLamp(); } if (Object.op_Implicit((Object)(object)animator) && animator.GetFloat(mecanimPerameter) > 0.5f && !hasPlayedEffect) { DestroyLamp(); } } } public class LampSpawn : GenericCharacterSpawnState { public static GameObject spawnVFX; public static GameObject spawnVFXblue; public static GameObject preSpawnEffect; private static float realDuration = 1f; private static float spawnEffectTime = 0.3f; private static string muzzleString = "Head"; private static string spawnSoundString = "FollowerSpawn"; private Transform muzzle; private EffectData effectData; private bool hasSpawnedEffect; private CharacterModel characterModel; private static float printTime = 1f; private static float printStartHeight = -100f; private static float printMaxHeight = -100f; private static float printStartBias = 3.33f; private static float printMaxBias = 0.4f; public override void OnEnter() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) base.duration = realDuration; ((GenericCharacterSpawnState)this).OnEnter(); muzzle = ((BaseState)this).FindModelChild(muzzleString); characterModel = ((Component)((EntityState)this).GetModelTransform()).GetComponent(); CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount + 1; if (Object.op_Implicit((Object)(object)preSpawnEffect)) { EffectManager.SimpleEffect(preSpawnEffect, Object.op_Implicit((Object)(object)muzzle) ? muzzle.position : ((EntityState)this).characterBody.corePosition, Quaternion.identity, false); } } public override void FixedUpdate() { ((GenericCharacterSpawnState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= spawnEffectTime && !hasSpawnedEffect) { Appear(); } } private void Appear() { //IL_0077: 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_007c: Unknown result type (might be due to invalid IL or missing references) hasSpawnedEffect = true; Transform modelTransform = ((EntityState)this).GetModelTransform(); CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount - 1; EffectManager.SimpleEffect((((Component)modelTransform).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken == "SS2_SKIN_LAMP_BLUE") ? spawnVFXblue : spawnVFX, Object.op_Implicit((Object)(object)muzzle) ? muzzle.position : ((EntityState)this).characterBody.corePosition, Quaternion.identity, false); Util.PlaySound(spawnSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)modelTransform)) { PrintController component = ((Component)modelTransform).GetComponent(); ((Behaviour)component).enabled = false; component.printTime = printTime; component.startingPrintHeight = printStartHeight; component.maxPrintHeight = printMaxHeight; component.startingPrintBias = printStartBias; component.maxPrintBias = printMaxBias; ((Behaviour)component).enabled = true; } } public override void OnExit() { ((EntityState)this).OnExit(); if (!hasSpawnedEffect) { Appear(); } } } } namespace EntityStates.Knight { public class EnterBannerSpecial : BaseState { private static float duration = 0.125f; private static float velocityDamping = 0.33f; private static InterruptPriority minimumInterruptPriority = (InterruptPriority)2; private static string enterSoundString = "Play_item_proc_warbanner"; public override void OnEnter() { //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) ((BaseState)this).OnEnter(); if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } ((EntityState)this).PlayAnimation("FullBody, Override", "SpecialLeapStart"); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= velocityDamping; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { SetNextState(); } } public virtual void SetNextState() { ((EntityState)this).outer.SetNextState((EntityState)(object)new BannerSpecial()); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return minimumInterruptPriority; } } public class BannerSpecial : BaseState { public static GameObject knightBannerWard; public static GameObject slowBuffWard; internal static float impactRadius = 4f; private static float impactDamage = 7.5f; private static float minimumY = 0.05f; private static float airControl = 0.15f; private static float aimVelocity = 3f; private static float upwardVelocity = 21f; private static float moveVelocity = 3f; private static float forwardVelocity = 3f; private static float gravityCoefficient = 1.8f; private static Vector3 bannerOffset = new Vector3(0.15f, 0f, 1.4f); private static float gracePeriod = 0.2f; private static string collisionTransformString = "BannerSlamHitbox"; private bool detonateNextFrame; private float previousAirControl; private Vector3 initialDirection; private Transform collisionTransform; public override void OnEnter() { //IL_002e: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00c8: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Expected O, but got Unknown ((BaseState)this).OnEnter(); ((BaseState)this).OnEnter(); previousAirControl = ((EntityState)this).characterMotor.airControl; ((EntityState)this).characterMotor.airControl = airControl; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; direction.y = Mathf.Max(direction.y, minimumY); Vector3 val = ((Vector3)(ref direction)).normalized * aimVelocity * base.moveSpeedStat; Vector3 val2 = Vector3.up * upwardVelocity; Vector3 val3 = new Vector3(direction.x, 0f, direction.z); Vector3 val4 = ((Vector3)(ref val3)).normalized * forwardVelocity; Vector3 val5 = ((EntityState)this).inputBank.moveVector * moveVelocity; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.2f); ((EntityState)this).characterMotor.velocity = val + val2 + val4 + val5; initialDirection = direction; } CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); ((EntityState)this).characterDirection.moveVector = direction; if (((EntityState)this).isAuthority) { collisionTransform = ((BaseState)this).FindModelChild(collisionTransformString); ((EntityState)this).characterMotor.onMovementHit += new MovementHitDelegate(OnMovementHit); } } private void OnMovementHit(ref MovementHitInfo movementHitInfo) { detonateNextFrame = true; } private void CheckCollisions() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)collisionTransform)) { return; } Collider[] array = Physics.OverlapBox(collisionTransform.position, collisionTransform.lossyScale * 0.5f, collisionTransform.rotation, LayerMask.op_Implicit(CommonMasks.bullet), (QueryTriggerInteraction)0); for (int i = 0; i < array.Length; i++) { if (Object.op_Implicit((Object)(object)array[i])) { HurtBox component = ((Component)array[i]).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { detonateNextFrame = true; break; } if ((Object)(object)((Component)component.healthComponent).gameObject != (Object)(object)((EntityState)this).gameObject) { detonateNextFrame = true; break; } } } } public override void FixedUpdate() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_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_0072: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector; ((EntityState)this).characterDirection.moveVector = initialDirection; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity += Physics.gravity * gravityCoefficient * Time.fixedDeltaTime; if (((EntityState)this).fixedAge > gracePeriod) { CheckCollisions(); } if (detonateNextFrame || (((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.IsStableOnGround && !((BaseCharacterController)((EntityState)this).characterMotor).Motor.LastGroundingStatus.IsStableOnGround)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new BannerSpecialWindDown()); } } } public override void OnExit() { //IL_002c: 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_0034: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.onMovementHit -= new MovementHitDelegate(OnMovementHit); } FireImpact(); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).characterMotor.airControl = previousAirControl; ((EntityState)this).characterBody.isSprinting = false; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.1f; ((EntityState)this).OnExit(); } protected virtual void FireImpact() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_0132: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).PlayAnimation("FullBody, Override", "SpecialLeapEnd", "Special.playbackRate", detonateNextFrame ? 1f : 0.2f, 0f); Util.PlaySound("Play_huntress_R_snipe_shoot", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, baseDamage = base.damageStat * impactDamage, baseForce = 0f, bonusForce = Vector3.up, crit = false, damageType = DamageTypeCombo.GenericSpecial, falloffModel = (FalloffModel)0, procCoefficient = 1f, radius = impactRadius, position = ((EntityState)this).characterBody.footPosition, attackerFiltering = (AttackerFiltering)2, teamIndex = ((EntityState)this).teamComponent.teamIndex }; ModifyBlastAttack(val); val.Fire(); } if (NetworkServer.active) { Vector3 val2 = ((EntityState)this).inputBank.aimOrigin + Util.QuaternionSafeLookRotation(((EntityState)this).characterDirection.forward) * bannerOffset; GameObject obj = Object.Instantiate(knightBannerWard, val2, Util.QuaternionSafeLookRotation(-((EntityState)this).characterDirection.forward)); obj.GetComponent().teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex; NetworkServer.Spawn(obj); } } protected virtual void ModifyBlastAttack(BlastAttack blastAttack) { } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class BannerSpecialWindDown : BaseState { private static float baseDuration = 0.4f; private static InterruptPriority minimumInterruptPriority = (InterruptPriority)1; protected float duration; private Vector3 initialDirection; public override void OnEnter() { //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) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; initialDirection = ((EntityState)this).characterDirection.forward; } public override void FixedUpdate() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.moveDirection = Vector3.zero; ((EntityState)this).characterDirection.moveVector = initialDirection; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return minimumInterruptPriority; } } public abstract class BaseKnightDashMelee : BaseKnightMeleeAttack { [SerializeField] public float minSpeedCoefficient = 2f; [SerializeField] public float maxSpeedCoefficient = 7f; [SerializeField] public float interruptSpeedCoefficient = 0.2f; [SerializeField] public AnimationCurve dashAnimationCurve; [SerializeField] public string dodgeSoundString = ""; [SerializeField] public bool forceUnground = true; [SerializeField] [Tooltip("locks to x/z plane")] public bool lockY; [SerializeField] [Tooltip("False for direction to be based on input")] public bool directionAimOverride; [SerializeField] [Tooltip("Force body to face the dashing direction.")] public bool forceFacingDirection; public float dodgeFOV = DodgeState.dodgeFOV; public Vector3 forwardDirection; public Vector3 previousPosition; public float rollSpeed; protected bool interrupted; private float sprintSpeedMultiplier; private int _origLayer; public override void OnEnter() { if (((EntityState)this).isAuthority) { CalculateInitialDirection(); } DisableCharacterMotorCollision(); base.OnEnter(); } private void DisableCharacterMotorCollision() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterBody characterBody2 = ((EntityState)this).characterBody; int fakeActorCounter = characterBody2.fakeActorCounter; characterBody2.fakeActorCounter = fakeActorCounter + 1; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); } } private void EnableCharacterMotorCollision() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterBody characterBody = ((EntityState)this).characterBody; int fakeActorCounter = characterBody.fakeActorCounter; characterBody.fakeActorCounter = fakeActorCounter - 1; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); } CharacterBody characterBody2 = ((EntityState)this).characterBody; characterBody2.bodyFlags = (BodyFlags)(characterBody2.bodyFlags & -2); } private void CalculateInitialDirection() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { forwardDirection = GetDashDirection(); } sprintSpeedMultiplier = (((EntityState)this).characterBody.isSprinting ? 1f : ((EntityState)this).characterBody.sprintingSpeedMultiplier); RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity = forwardDirection * rollSpeed; } Vector3 val = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val; if (forceUnground) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } } private Vector3 GetDashDirection() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_0092: 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) Vector3 aimDirection = ((EntityState)this).inputBank.aimDirection; if (directionAimOverride || ((EntityState)this).inputBank.moveVector == Vector3.zero) { if (lockY) { aimDirection.y = 0f; } return ((Vector3)(ref aimDirection)).normalized; } aimDirection.y = 0f; Vector3 val = -Vector3.Cross(Vector3.up, aimDirection); float num = Vector3.Angle(((EntityState)this).inputBank.aimDirection, aimDirection); if (((EntityState)this).inputBank.aimDirection.y < 0f) { num = 0f - num; } Vector3 result = Vector3.Normalize(Quaternion.AngleAxis(num, val) * ((EntityState)this).inputBank.moveVector); if (lockY) { result.y = 0f; } return result; } private void RecalculateRollSpeed() { rollSpeed = ((BaseState)this).moveSpeedStat * sprintSpeedMultiplier * Mathf.Lerp(minSpeedCoefficient, maxSpeedCoefficient, dashAnimationCurve.Evaluate(Mathf.Clamp01(((EntityState)this).fixedAge / duration))) * (interrupted ? interruptSpeedCoefficient : 1f); } public virtual void MoveKnight() { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && forceFacingDirection) { ((EntityState)this).characterDirection.forward = forwardDirection; } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = Mathf.Lerp(dodgeFOV, 60f, stopwatch / duration); } ((EntityState)this).characterMotor.velocity = forwardDirection * rollSpeed; previousPosition = ((EntityState)this).transform.position; } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && !(stopwatch >= duration) && !inHitPause) { MoveKnight(); } } public override void OnExit() { base.OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } EnableCharacterMotorCollision(); if (stopwatch < duration * 0.9f) { OnInterrupted(); } MoveKnight(); } protected virtual void OnInterrupted() { interrupted = true; ((EntityState)this).PlayCrossfade("FullBody, Override", "BufferEmpty", 0.1f); } } public abstract class BaseKnightMeleeAttack : BaseSkillState, IStepSetter { [SerializeField] public string hitboxGroupName = "SwordHitbox"; [SerializeField] public DamageType damageType; [SerializeField] public float damageCoefficient = 3.5f; [SerializeField] public float procCoefficient = 1f; [SerializeField] public float pushForce = 300f; [SerializeField] public Vector3 bonusForce = Vector3.zero; [SerializeField] public float baseDuration = 1f; [SerializeField] public bool ignoreAttackSpeed; [SerializeField] public float attackStartTimeFraction; [SerializeField] public float attackEndTimeFraction = 1f; [SerializeField] public float earlyExitTimeFraction = 0.4f; [SerializeField] public InterruptPriority earlyExitPriority; [SerializeField] public InterruptPriority basePriority = (InterruptPriority)1; [SerializeField] public float hitStopDuration = 0.012f; [SerializeField] public float attackRecoil = 0.75f; [SerializeField] public float hitHopVelocity = 4f; [SerializeField] public string swingSoundString = ""; [SerializeField] public string hitSoundString = ""; [SerializeField] public string muzzleString = "SwingCenter"; [SerializeField] public string playbackRateParam = "Slash.playbackRate"; [SerializeField] public GameObject swingEffectPrefab; [SerializeField] public GameObject hitEffectPrefab; [SerializeField] public NetworkSoundEventDef impactSound; public bool addModdedDamageType; public ModdedDamageType moddedDamageType; public int swingIndex; protected OverlapAttack attack; protected float duration; protected bool hasFired; protected Animator animator; protected bool inHitPause; protected float stopwatch; private float hitPauseTimer; private bool hasHopped; private HitStopCachedState hitStopCachedState; protected Vector3 storedVelocity; private GameObject swingEffectInstance; private EffectManagerHelper swingEffectInstanceHelper; private ScaleParticleSystemDuration swingEffectParticleScaler; protected virtual void ModifyMelee() { } public override void OnEnter() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ModifyMelee(); duration = (ignoreAttackSpeed ? baseDuration : (baseDuration / ((BaseState)this).attackSpeedStat)); animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(2f + duration, false); PlayAttackAnimation(); if (!string.IsNullOrEmpty(hitboxGroupName)) { attack = new OverlapAttack(); attack.damageType = DamageTypeCombo.op_Implicit(damageType); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = damageCoefficient * ((BaseState)this).damageStat; attack.procCoefficient = procCoefficient; attack.hitEffectPrefab = hitEffectPrefab; attack.forceVector = bonusForce; attack.pushAwayForce = pushForce; attack.hitBoxGroup = ((BaseState)this).FindHitBoxGroup(hitboxGroupName); attack.isCrit = ((BaseState)this).RollCrit(); attack.maximumOverlapTargets = 1000; if ((Object)(object)impactSound != (Object)null) { attack.impactSound = impactSound.index; } if (addModdedDamageType) { DamageAPI.AddModdedDamageType(attack, moddedDamageType); } } } public virtual void PlayAttackAnimation() { } public override void OnExit() { if (inHitPause) { RemoveHitstop(); } ((EntityState)this).OnExit(); } protected virtual void PlaySwingEffect() { Transform val = ((BaseState)this).FindModelChild(muzzleString); if (Object.op_Implicit((Object)(object)val)) { if (!EffectManager.ShouldUsePooledEffect(swingEffectPrefab)) { swingEffectInstance = Object.Instantiate(swingEffectPrefab, val); } else { swingEffectInstanceHelper = EffectManager.GetAndActivatePooledEffect(swingEffectPrefab, val, true); swingEffectInstance = ((Component)swingEffectInstanceHelper).gameObject; } swingEffectParticleScaler = swingEffectInstance.GetComponent(); if (Object.op_Implicit((Object)(object)swingEffectParticleScaler)) { swingEffectParticleScaler.newDuration = swingEffectParticleScaler.initialDuration; } } } protected virtual void OnHitEnemyAuthority() { Util.PlaySound(hitSoundString, ((EntityState)this).gameObject); if (!hasHopped) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded && hitHopVelocity > 0f) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hitHopVelocity / (((BaseState)this).attackSpeedStat * ((BaseState)this).attackSpeedStat)); } hasHopped = true; } ApplyHitstop(); } protected void ApplyHitstop() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (!inHitPause && hitStopDuration > 0f) { storedVelocity = ((EntityState)this).characterMotor.velocity; hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, playbackRateParam); hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat; inHitPause = true; } } protected virtual void AuthorityModifyOverlapAttack(OverlapAttack attack) { } protected virtual void FireAttack() { if (((EntityState)this).isAuthority && attack != null) { AuthorityModifyOverlapAttack(attack); if (attack.Fire((List)null)) { OnHitEnemyAuthority(); } } } private void EnterAttack() { hasFired = true; Util.PlayAttackSpeedSound(swingSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); PlaySwingEffect(); if (((EntityState)this).isAuthority) { ((BaseState)this).AddRecoil(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil); } } public override void FixedUpdate() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer <= 0f && inHitPause) { RemoveHitstop(); } if (!inHitPause) { stopwatch += Time.fixedDeltaTime; } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat(playbackRateParam, 0f); } } bool flag = stopwatch >= duration * attackStartTimeFraction; bool flag2 = stopwatch >= duration * attackEndTimeFraction; if ((flag && !flag2) || (flag && flag2 && !hasFired)) { if (!hasFired) { EnterAttack(); } FireAttack(); } if (stopwatch >= duration && ((EntityState)this).isAuthority) { SetNextState(); } } protected virtual void SetNextState() { ((EntityState)this).outer.SetNextStateToMain(); } private void RemoveHitstop() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); inHitPause = false; ((EntityState)this).characterMotor.velocity = storedVelocity; if (Object.op_Implicit((Object)(object)swingEffectInstance) && Object.op_Implicit((Object)(object)swingEffectParticleScaler)) { swingEffectParticleScaler.newDuration = swingEffectParticleScaler.initialDuration; } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (stopwatch >= duration * earlyExitTimeFraction) { return earlyExitPriority; } return basePriority; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(swingIndex); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); swingIndex = reader.ReadInt32(); } public void SetStep(int i) { swingIndex = i; } } public class EnterBannerSlam : EnterBannerSpecial { public override void SetNextState() { ((EntityState)this).outer.SetNextState((EntityState)(object)new BannerSlam()); } } public class BannerSlam : BannerSpecial { private static float barrierMultiplier = 0.4f; protected override void FireImpact() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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) base.FireImpact(); for (int i = 0; i < CharacterBody.readOnlyInstancesList.Count; i++) { CharacterBody val = CharacterBody.readOnlyInstancesList[i]; if (val.teamComponent.teamIndex == ((EntityState)this).characterBody.teamComponent.teamIndex) { Vector3 val2 = val.transform.position - ((EntityState)this).transform.position; if (((Vector3)(ref val2)).sqrMagnitude < BannerSpecial.impactRadius * BannerSpecial.impactRadius) { val.healthComponent.AddBarrier(((EntityState)this).characterBody.healthComponent.fullCombinedHealth * barrierMultiplier); } } } } public override void OnEnter() { base.OnEnter(); ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } public override void OnExit() { base.OnExit(); ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } public class BuffedPrimaryLunar : BaseSkillState { public static float baseDuration = 0.5f; public static int projectileCount = 10; public static float maxSpread = 10f; public static float damageCoefficient = 0.5f; private float duration; public override void OnEnter() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); for (int i = 0; i < projectileCount; i++) { FireNeedle(aimRay); } } ((BaseState)this).AddRecoil(-0.4f * FireLunarNeedle.recoilAmplitude, -0.8f * FireLunarNeedle.recoilAmplitude, -0.3f * FireLunarNeedle.recoilAmplitude, 0.3f * FireLunarNeedle.recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(FireLunarNeedle.spreadBloomValue); ((BaseState)this).StartAimMode(2f, false); EffectManager.SimpleMuzzleFlash(FireLunarNeedle.muzzleFlashEffectPrefab, ((EntityState)this).gameObject, "Head", false); Util.PlaySound(FireLunarNeedle.fireSound, ((EntityState)this).gameObject); ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.1f); ((EntityState)this).PlayCrossfade("FullBody, Override", "BufferEmpty", 0.1f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } private void FireNeedle(Ray aimRay) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) ((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f, maxSpread, 1f, 1f, 0f, 0f); FireProjectileInfo val = new FireProjectileInfo { position = ((Ray)(ref aimRay)).origin, rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction), crit = ((EntityState)this).characterBody.RollCrit(), damage = ((EntityState)this).characterBody.damage * damageCoefficient, damageColorIndex = (DamageColorIndex)0, owner = ((EntityState)this).gameObject, procChainMask = default(ProcChainMask), force = 0f, useFuseOverride = false, useSpeedOverride = false, target = null, projectilePrefab = FireLunarNeedle.projectilePrefab }; ProjectileManager.instance.FireProjectile(val); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Flurry : BaseKnightMeleeAttack { private bool swipeDown; private static Vector3 swipeUpForce = new Vector3(-8f, 5f, 3f); private static Vector3 swipeDownForce = new Vector3(8f, -3f, 3f); public float totalDuration { get; set; } public override void OnEnter() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) baseDuration = SwordDashToFlurry.flurrySwipeDuration; damageCoefficient = SwordDashToFlurry.flurrySwipeDamage; muzzleString = (swipeDown ? "SwingDownMuzzle" : "SwingUpMuzzle") + Random.Range(1, 4); base.OnEnter(); attack.damageType.damageSource = (DamageSource)1; ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } public override void OnExit() { base.OnExit(); ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } public override void PlayAttackAnimation() { ((EntityState)this).PlayAnimation("FullBody, Override", "FlurrySwipe" + (swipeDown ? "Down" : "Up")); } protected override void AuthorityModifyOverlapAttack(OverlapAttack attack) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) base.AuthorityModifyOverlapAttack(attack); attack.forceVector = Util.QuaternionSafeLookRotation(((EntityState)this).characterDirection.forward) * (swipeDown ? swipeDownForce : swipeUpForce); attack.physForceFlags = (PhysForceFlags)15; } public override void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); ((EntityState)this).characterMotor.velocity = Vector3.zero; } protected override void SetNextState() { if (totalDuration > 0f) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Flurry { totalDuration = totalDuration - ((EntityState)this).fixedAge, swipeDown = !swipeDown }); } else { ((EntityState)this).outer.SetNextStateToMain(); } } } internal class StunSlash : BaseKnightMeleeAttack { public static float swingTimeCoefficient; public static float baseDurationBeforeInterruptable; public static float comboFinisherBaseDurationBeforeInterruptable; public static float comboFinisherhitPauseDuration; public static float comboFinisherDamageCoefficient; public new float baseDuration = 1f; public new float duration = 1f; private string animationStateName = "SwingSword0"; public static float TokenModifier_dmgCoefficient => new SwingSword().damageCoefficient; private void SetupHitbox() { } public override void OnEnter() { if (((EntityState)this).isAuthority) { SetupHitbox(); base.OnEnter(); } } public override void PlayAttackAnimation() { if (((BaseState)this).isGrounded & !((EntityState)this).GetModelAnimator().GetBool("isMoving")) { ((EntityState)this).PlayCrossfade("FullBody, Override", animationStateName, "Primary.playbackRate", duration * swingTimeCoefficient, 0.08f); } else { ((EntityState)this).PlayCrossfade("Gesture, Override", animationStateName, "Primary.playbackRate", duration * swingTimeCoefficient, 0.08f); } } public override void FixedUpdate() { base.FixedUpdate(); } } public class SwordDashToFlurry : BaseSkillState { [RiskOfOptionsConfigureField("SS2.Survivors")] public static float flurryTotalDuration = 0.4f; [RiskOfOptionsConfigureField("SS2.Survivors")] public static float flurrySwipeDamage = 4f; [RiskOfOptionsConfigureField("SS2.Survivors")] public static float flurrySwipeDuration = 0.22f; private static float baseDuration = 0.2f; private static float minSpeedCoefficient = 0f; private static float maxSpeedCoefficient = 10f; private static float interruptSpeedCoefficient = 0.2f; private static string collisionTransformString = "ShieldBashHitbox"; public static AnimationCurve dashAnimationCurve; private static string enterSoundString = DodgeState.dodgeSoundString; private static float dodgeFOV = DodgeState.dodgeFOV; public Vector3 forwardDirection; public Vector3 previousPosition; public float rollSpeed; protected bool interrupted; private float stopwatch; private float duration; private float sprintSpeedMultiplier; private Transform collisionTransform; public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration; if (((EntityState)this).isAuthority) { collisionTransform = ((BaseState)this).FindModelChild(collisionTransformString); CalculateInitialDirection(); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } ((EntityState)this).PlayAnimation("FullBody, Override", "FlurryDash"); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } private void CalculateInitialDirection() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { forwardDirection = GetDashDirection(); } sprintSpeedMultiplier = (((EntityState)this).characterBody.isSprinting ? 1f : ((EntityState)this).characterBody.sprintingSpeedMultiplier); RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity = forwardDirection * rollSpeed; } Vector3 val = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } private Vector3 GetDashDirection() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).inputBank.aimDirection; } private void RecalculateRollSpeed() { rollSpeed = ((BaseState)this).moveSpeedStat * sprintSpeedMultiplier * Mathf.Lerp(minSpeedCoefficient, maxSpeedCoefficient, dashAnimationCurve.Evaluate(Mathf.Clamp01(((EntityState)this).fixedAge / duration))) * (interrupted ? interruptSpeedCoefficient : 1f); } public virtual void MoveKnight() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.forward = forwardDirection; } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = Mathf.Lerp(dodgeFOV, 60f, stopwatch / duration); } ((EntityState)this).characterMotor.velocity = forwardDirection * rollSpeed; previousPosition = ((EntityState)this).transform.position; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && (((EntityState)this).fixedAge > duration || CheckCollisions())) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Flurry { totalDuration = flurryTotalDuration }); } } private bool CheckCollisions() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)collisionTransform)) { Collider[] array = Physics.OverlapBox(collisionTransform.position, collisionTransform.lossyScale * 0.5f, collisionTransform.rotation, LayerMask.op_Implicit(CommonMasks.bullet), (QueryTriggerInteraction)0); for (int i = 0; i < array.Length; i++) { if (Object.op_Implicit((Object)(object)array[i])) { HurtBox component = ((Component)array[i]).GetComponent(); if (Object.op_Implicit((Object)(object)component) && (Object)(object)((Component)component.healthComponent).gameObject != (Object)(object)((EntityState)this).gameObject && FriendlyFireManager.ShouldDirectHitProceed(component.healthComponent, ((EntityState)this).teamComponent.teamIndex)) { return true; } } } } return false; } public override void OnExit() { ((EntityState)this).OnExit(); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } if (stopwatch < duration * 0.9f) { OnInterrupted(); } MoveKnight(); } protected virtual void OnInterrupted() { interrupted = true; ((EntityState)this).PlayCrossfade("FullBody, Override", "BufferEmpty", 0.1f); } } public class TornadoSpin : SpinUtility { public override void OnEnter() { base.OnEnter(); fireFrequency = SpinUtility.testFireFrequencyBoosted * ((BaseState)this).attackSpeedStat; fireInterval = 1f / fireFrequency; ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } public override void OnExit() { base.OnExit(); ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } public override void FixedUpdate() { base.FixedUpdate(); if (((ButtonState)(ref ((EntityState)this).inputBank.skill1)).justPressed) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class MainState : GenericCharacterMain { private EntityStateMachine weaponStateMachine; private EntityStateMachine rollStateMachine; private float jankInputBuffer; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); weaponStateMachine = EntityStateMachine.FindByCustomName(((Component)((EntityState)this).characterBody).gameObject, "Weapon"); rollStateMachine = EntityStateMachine.FindByCustomName(((Component)((EntityState)this).characterBody).gameObject, "Roll"); } public override void ProcessJump() { jankInputBuffer -= ((EntityState)this).GetDeltaTime(); if (base.jumpInputReceived) { jankInputBuffer = 0.35f; } if (((BaseCharacterMain)this).hasCharacterMotor && !((EntityState)this).healthComponent.isInFrozenState && base.jumpInputReceived && jankInputBuffer > 0f && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && ((EntityState)this).characterMotor.jumpCount < ((EntityState)this).characterBody.maxJumpCount + 1 && Object.op_Implicit((Object)(object)weaponStateMachine) && weaponStateMachine.state is Shield) { if (Object.op_Implicit((Object)(object)rollStateMachine) && rollStateMachine.CanInterruptState((InterruptPriority)1)) { if (!((BaseState)this).isGrounded) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.jumpCount++; } rollStateMachine.SetNextState((EntityState)(object)new Roll()); } } else { ((GenericCharacterMain)this).ProcessJump(); } } } public class Parry : BasicMeleeAttack { [SerializeField] private float inputtableTime; public GameObject impactEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/Bandit2/Bandit2SmokeBomb.prefab").WaitForCompletion(); public int swingSide; private GenericSkill primarySkill; private GenericSkill utilitySkill; private GenericSkill specialSkill; private SkillDef buffedPrimarySkillDef; private SkillDef buffedUtilitySkillDef; private SkillDef buffedSpecialSkillDef; private UpgradedSkillCache upgradedSkillCache; private static float testbaseDuration = 1.2f; private static float testInputLockDuration = 0.3f; [FormatToken(/*Could not decode attribute arguments.*/)] public static float TokenModifier_dmgCoefficient => new ShieldPunch().damageCoefficient; public override void OnEnter() { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) base.baseDuration = testbaseDuration; inputtableTime = testInputLockDuration; ((BasicMeleeAttack)this).OnEnter(); ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); base.animator = ((EntityState)this).GetModelAnimator(); primarySkill = ((EntityState)this).skillLocator.primary; utilitySkill = ((EntityState)this).skillLocator.utility; specialSkill = ((EntityState)this).skillLocator.special; upgradedSkillCache = ((EntityState)this).gameObject.GetComponent(); TryOverrideSkill(primarySkill, ref buffedPrimarySkillDef); TryOverrideSkill(utilitySkill, ref buffedUtilitySkillDef); TryOverrideSkill(specialSkill, ref buffedSpecialSkillDef); EffectData val = new EffectData(); val.origin = ((EntityState)this).characterBody.corePosition; EffectManager.SpawnEffect(impactEffect, val, false); } private void TryOverrideSkill(GenericSkill genericSkill, ref SkillDef buffedSkillDef) { if ((Object)(object)upgradedSkillCache == (Object)null) { SS2Log.Warning("no upgradedskillcachecomponent. doing a probably costly search through the skillcatalog", 70, "TryOverrideSkill"); buffedSkillDef = (SkillDef)(object)UpgradedSkillCache.FindUpgradedSkillDef(genericSkill.skillDef); } else { buffedSkillDef = upgradedSkillCache.GetUpgradedSkillDef(genericSkill.skillDef); } if (!((Object)(object)buffedSkillDef == (Object)null)) { SetOverride(genericSkill, buffedSkillDef, shouldSet: true); } } private void SetOverride(GenericSkill genericSkill, SkillDef buffedSkillDef, bool shouldSet) { if (shouldSet) { genericSkill.SetSkillOverride((object)this, buffedSkillDef, (SkillOverridePriority)4); } else { genericSkill.UnsetSkillOverride((object)this, buffedSkillDef, (SkillOverridePriority)4); } } public override void PlayAnimation() { ((EntityState)this).PlayAnimation("FullBody, Override", "Parry", "Secondary.playbackRate", base.duration, 0f); } public override void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).FixedUpdate(); ((EntityState)this).inputBank.moveVector = Vector3.zero; ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).fixedAge >= inputtableTime * base.duration) { PerformInputs(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } protected void PerformInputs() { if (((EntityState)this).isAuthority) { HandleSkill(((EntityState)this).skillLocator.primary, ref ((EntityState)this).inputBank.skill1); HandleSkill(((EntityState)this).skillLocator.utility, ref ((EntityState)this).inputBank.skill3); HandleSkill(((EntityState)this).skillLocator.special, ref ((EntityState)this).inputBank.skill4); } void HandleSkill(GenericSkill skillSlot, ref ButtonState buttonState) { if (buttonState.down && Object.op_Implicit((Object)(object)skillSlot) && (!skillSlot.mustKeyPress || !buttonState.hasPressBeenClaimed) && skillSlot.ExecuteIfReady()) { buttonState.hasPressBeenClaimed = true; ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { TryUnsetOverride(primarySkill, buffedPrimarySkillDef); TryUnsetOverride(utilitySkill, buffedUtilitySkillDef); TryUnsetOverride(specialSkill, buffedSpecialSkillDef); ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); ((BasicMeleeAttack)this).OnExit(); } private void TryUnsetOverride(GenericSkill primarySkill, SkillDef buffedPrimarySkillDef) { if (!((Object)(object)buffedPrimarySkillDef == (Object)null)) { SetOverride(primarySkill, buffedPrimarySkillDef, shouldSet: false); } } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); overlapAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)32); } } public class Roll : BaseKnightDashMelee { [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testbaseDuration = 0.69f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testAnimationDurationMulti = 1.69f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testminSpeedCoefficient = 2f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testmaxSpeedCoefficient = 4f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testinterruptSpeedCoefficient = 0f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testearlyexit = 0.1f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testWindDown = 0.1f; public override void OnEnter() { baseDuration = testbaseDuration; minSpeedCoefficient = testminSpeedCoefficient; maxSpeedCoefficient = testmaxSpeedCoefficient; interruptSpeedCoefficient = testinterruptSpeedCoefficient; earlyExitTimeFraction = testearlyexit; ((BaseState)this).StartAimMode(2f, false); base.OnEnter(); animator.SetBool("isRolling", true); if (((BaseState)this).isGrounded) { ((EntityState)this).PlayCrossfade("FullBody, Override", "Roll", "Utility.rate", duration * testAnimationDurationMulti, 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Override", "Roll", "Utility.rate", duration * testAnimationDurationMulti, 0.05f); } else { ((EntityState)this).PlayCrossfade("FullBody, Override", "AirRoll", "Utility.rate", duration * testAnimationDurationMulti, 0.05f); } } public override void FixedUpdate() { base.FixedUpdate(); } protected override void SetNextState() { ((EntityState)this).outer.SetNextState((EntityState)(object)new RollWindDown()); } protected override void OnInterrupted() { } public override void OnExit() { if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } animator.SetBool("isRolling", false); base.OnExit(); ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; } } public class RollWindDown : BaseWindDownState { public override void OnEnter() { base.OnEnter(); duration = Roll.testWindDown; } } public class Shield : BaseSkillState { public static BuffDef shieldBuff; public static BuffDef parryBuff; public static GameObject parryFlashEffectPrefab; public static float parryBuffDuration; public static SkillDef shieldBashSkillDef; private bool hasParried; private float stopwatch; private static float minDuration = 0.4f; private static float minInterruptDuration = 0.2f; private static float cameraEnterDuration = 0.2f; private static float cameraExitDuration = 0.3f; public bool overridden; private Animator animator; private bool useAltCamera; private bool isParrying; private CameraParamsOverrideHandle camOverrideHandle; private EntityStateMachine rollStateMachine; private GameObject parryHurtbox; private KnightBlockTracker blockTracker; public override void OnEnter() { ((BaseState)this).OnEnter(); rollStateMachine = EntityStateMachine.FindByCustomName(((Component)((EntityState)this).characterBody).gameObject, "Roll"); parryHurtbox = ((BaseState)this).FindModelChildGameObject("ParryHurtbox"); blockTracker = ((Component)((EntityState)this).characterBody).GetComponent(); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayCrossfade("Gesture, Override", "RaiseShield", 0.1f); ((EntityState)this).characterBody.SetAimTimer(0.5f); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(shieldBuff); } GameObject lastAttacker = blockTracker.GetLastAttacker(); if ((Object)(object)lastAttacker != (Object)null) { ParryAttacker(lastAttacker); } else { BeginParrying(); } CameraSwap(); } private void CameraSwap() { //IL_0060: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_000f: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_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_0053: Unknown result type (might be due to invalid IL or missing references) if (useAltCamera) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, cameraEnterDuration); CameraParamsOverrideRequest val = new CameraParamsOverrideRequest { cameraParamsData = SS2.Survivors.Knight.altCameraParams, priority = 0f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val, cameraEnterDuration); } else { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, cameraEnterDuration); CameraParamsOverrideRequest val2 = new CameraParamsOverrideRequest { cameraParamsData = SS2.Survivors.Knight.chargeCameraParams, priority = 0f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, cameraEnterDuration); } } private void SetPrimaryOverride(bool shouldSet) { if (overridden != shouldSet) { overridden = shouldSet; if (shouldSet) { ((EntityState)this).skillLocator.primary.SetSkillOverride((object)this, shieldBashSkillDef, (SkillOverridePriority)4); } else { ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)this, shieldBashSkillDef, (SkillOverridePriority)4); } } } private void BeginParrying() { if (!isParrying) { isParrying = true; KnightBlockTracker knightBlockTracker = blockTracker; knightBlockTracker.onIncomingDamageAuthority = (KnightBlockTracker.OnIncomingDamageAuthority)Delegate.Combine(knightBlockTracker.onIncomingDamageAuthority, new KnightBlockTracker.OnIncomingDamageAuthority(ParryAttacker)); parryHurtbox.SetActive(true); ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } private void EndParrying() { if (isParrying) { isParrying = false; KnightBlockTracker knightBlockTracker = blockTracker; knightBlockTracker.onIncomingDamageAuthority = (KnightBlockTracker.OnIncomingDamageAuthority)Delegate.Remove(knightBlockTracker.onIncomingDamageAuthority, new KnightBlockTracker.OnIncomingDamageAuthority(ParryAttacker)); parryHurtbox.SetActive(false); ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } private void ParryAttacker(GameObject attacker) { SetStateOnHurt val = default(SetStateOnHurt); if (Object.op_Implicit((Object)(object)attacker) && attacker.TryGetComponent(ref val) && val.canBeStunned) { Type type = ((object)val.targetStateMachine.state).GetType(); if (type != typeof(StunState) && type != typeof(ShockState) && type != typeof(FrozenState)) { val.SetStun(3f); } } Util.PlaySound("NemmandoDecisiveStrikeReady", ((EntityState)this).gameObject); EndParrying(); hasParried = true; SetPrimaryOverride(shouldSet: false); EntityStateMachine val2 = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Body"); if ((Object)(object)val2 != (Object)null) { val2.SetNextState((EntityState)(object)new Parry()); } ((EntityState)this).outer.SetNextStateToMain(); } public override void Update() { ((EntityState)this).Update(); if (Input.GetKeyDown((KeyCode)118) && ((EntityState)this).isAuthority) { useAltCamera = !useAltCamera; CameraSwap(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasParried) { SetPrimaryOverride(((EntityState)this).inputBank.skill2.down); } if (!((EntityState)this).inputBank.skill2.down && ((EntityState)this).fixedAge > minDuration) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (((EntityState)this).fixedAge >= parryBuffDuration) { EndParrying(); } stopwatch += ((EntityState)this).fixedAge; if (stopwatch >= 0.25f) { stopwatch = 0f; ((EntityState)this).characterBody.SetAimTimer(0.5f); } } public override void OnExit() { //IL_001a: 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) ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, cameraExitDuration); } ((EntityState)this).characterBody.SetAimTimer(0.5f); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.1f); ((EntityState)this).characterBody.RemoveBuff(shieldBuff); SetPrimaryOverride(shouldSet: false); EndParrying(); rollStateMachine.SetNextStateToMain(); } public override InterruptPriority GetMinimumInterruptPriority() { if (((EntityState)this).fixedAge >= minInterruptDuration) { return (InterruptPriority)1; } return (InterruptPriority)2; } } public class ShieldPunch : BaseKnightDashMelee { public int swingSide; [SerializeField] public BuffDef shieldBuff; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float swingTimeCoefficient = 2.3f; private static float testDamage = 4f; private static float bounceAwayVelocity = -3f; private static float bounceUpVelocity = 2f; private static float knockbackForwardVelocity = 19f; private static float knockbackUpVelocity = 1.5f; private bool hasBounced; public static float TokenModifier_dmgCoefficient => new ShieldPunch().damageCoefficient; public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void OnEnter() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) damageCoefficient = testDamage; base.OnEnter(); attack.damageType.damageSource = (DamageSource)3; ((EntityState)this).characterBody.AddTimedBuff(shieldBuff, duration + 0.5f); } public override void PlayAttackAnimation() { ((EntityState)this).PlayCrossfade("FullBody, Override", "ShieldPunch", "Primary.playbackRate", duration * swingTimeCoefficient, 0.15f); } public override void MoveKnight() { if (!hasBounced) { base.MoveKnight(); } } protected override void OnInterrupted() { } protected override void SetNextState() { ((EntityState)this).outer.SetNextState((EntityState)(object)new ShieldPunchWindDown()); } public override void OnExit() { if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.fovOverride = -1f; } ((EntityState)this).characterBody.isSprinting = true; base.OnExit(); } protected override void AuthorityModifyOverlapAttack(OverlapAttack attack) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) base.AuthorityModifyOverlapAttack(attack); DamageAPI.AddModdedDamageType(ref attack.damageType, SS2.Survivors.Knight.ExtendedStunDamageType); attack.forceVector = forwardDirection * knockbackForwardVelocity + Vector3.up * knockbackUpVelocity; attack.physForceFlags = (PhysForceFlags)15; } protected override void OnHitEnemyAuthority() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) base.OnHitEnemyAuthority(); if (!hasBounced) { hasBounced = true; Vector3 normalized = default(Vector3); ((Vector3)(ref normalized))..ctor(((EntityState)this).inputBank.aimDirection.x, 0f, ((EntityState)this).inputBank.aimDirection.z); normalized = ((Vector3)(ref normalized)).normalized; Vector3 velocity = normalized * bounceAwayVelocity + Vector3.up * bounceUpVelocity; ((EntityState)this).characterMotor.velocity = velocity; storedVelocity = velocity; } ((EntityState)this).outer.SetNextState((EntityState)(object)new ShieldPunchWindDown()); } } public class ShieldPunchWindDown : BaseState { private static float baseDuration = 0.25f; private static InterruptPriority minimumInterruptPriority = (InterruptPriority)1; protected float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return minimumInterruptPriority; } } public class SpinUtility : BaseKnightDashMelee { public static float swingTimeCoefficient = 1.63f; private Transform swordPivot; [SerializeField] public float baseFireFrequency = 2f; public float fireFrequency; public float fireAge; public float fireInterval; public Transform modelTransform; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testbaseDuration = 0.69f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testminSpeedCoefficient = 2f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testmaxSpeedCoefficient = 4f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testinterruptSpeedCoefficient = 0.4f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testFireFrequency = 5f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testFireFrequencyBoosted = 10f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testDamage = 2f; [RiskOfOptionsConfigureField("SS2.Survivors")] [Tooltip("overridden by configs")] public static float testDamageBoosted = 4f; [FormatToken(/*Could not decode attribute arguments.*/)] public static float TokenModifier_dmgCoefficient => new SpinUtility().damageCoefficient; public override void OnEnter() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) baseDuration = testbaseDuration; minSpeedCoefficient = testminSpeedCoefficient; maxSpeedCoefficient = testmaxSpeedCoefficient; interruptSpeedCoefficient = testinterruptSpeedCoefficient; baseFireFrequency = testFireFrequency; damageCoefficient = testDamage; base.OnEnter(); attack.damageType.damageSource = (DamageSource)4; fireFrequency = baseFireFrequency * ((BaseState)this).attackSpeedStat; fireInterval = 1f / fireFrequency; modelTransform = ((EntityState)this).GetModelTransform(); swordPivot = ((BaseState)this).FindModelChild("HitboxAnchor"); Transform obj = swordPivot; Ray aimRay = ((BaseState)this).GetAimRay(); obj.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); } protected override void ModifyMelee() { swingEffectPrefab = SS2.Survivors.Knight.KnightSpinEffect; hitEffectPrefab = SS2.Survivors.Knight.KnightHitEffect; } protected override void FireAttack() { if (!inHitPause) { fireAge += Time.fixedDeltaTime; } List list = new List(); while (fireAge >= fireInterval) { fireAge -= fireInterval; attack.ResetIgnoredHealthComponents(); list.Clear(); PlaySwingEffect(); if (((EntityState)this).isAuthority && attack.Fire(list)) { for (int i = 0; i < list.Count; i++) { PushVictim(list[i]); } OnHitEnemyAuthority(); } } } public void PushVictim(HurtBox hurtBox) { //IL_0025: 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected I4, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)hurtBox.healthComponent.body == (Object)null)) { float num = 1f; HullClassification hullClassification = hurtBox.healthComponent.body.hullClassification; switch ((int)hullClassification) { case 1: num = 0.5f; break; case 2: num = 0.2f; break; } Vector3 position = ((Component)hurtBox.healthComponent).transform.position; float z = modelTransform.InverseTransformPoint(position).z; float num2 = Mathf.InverseLerp(8f, -8f, z); PhysForceInfo val = default(PhysForceInfo); ((PhysForceInfo)(ref val)).massIsOne = true; ((PhysForceInfo)(ref val)).disableAirControlUntilCollision = true; ((PhysForceInfo)(ref val)).ignoreGroundStick = true; val.force = forwardDirection * (rollSpeed * fireInterval * 6f + num2 * 3f) * num; PhysForceInfo val2 = val; if (Object.op_Implicit((Object)(object)hurtBox.healthComponent.body.characterMotor)) { hurtBox.healthComponent.body.characterMotor.velocity = Vector3.zero; hurtBox.healthComponent.body.characterMotor.ApplyForceImpulse(ref val2); } RigidbodyMotor val3 = default(RigidbodyMotor); if (((Component)hurtBox.healthComponent).TryGetComponent(ref val3)) { ((PhysForceInfo)(ref val2)).disableAirControlUntilCollision = false; val3.rigid.velocity = Vector3.zero; val3.ApplyForceImpulse(ref val2); } } } public override void PlayAttackAnimation() { ((EntityState)this).PlayCrossfade("FullBody, Override", "Utility", "Utility.playbackRate", duration * swingTimeCoefficient, duration * 0.15f); } public override void OnExit() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) base.OnExit(); ((Component)swordPivot).transform.localRotation = Quaternion.identity; } } internal class SwingSword : BaseKnightMeleeAttack { private static float swingTimeCoefficient = 0.8f; private static float finisherSwingTimeCoefficient = 0.64f; private static float finisherAttackStart = 0.33f; private static float finisherAttackEnd = 0.5f; private static float finisherEarlyExit = 1f; private static float finisherHitPause = 0.12f; private static float finisherDamage = 4f; private static float finisherBaseDuration = 1.5f; private string animationStateName = "SwingSword0"; private Vector3 attackForceVector; private Transform swordPivot; private static float testDuration = 1.1f; private static float testDamage = 2f; private static float testFinisherDuration = 1.5f; private static float testFinisherDamage = 4f; private static float spikeMaxY = -0.8f; private static Vector3 swing1ForceVector = new Vector3(-4.5f, 1f, 3f); private static Vector3 swing2ForceVector = new Vector3(4.5f, 1f, 3f); private static Vector3 swing3ForceVector = new Vector3(0f, 6f, 6f); private static float spikeForce = -10f; private bool isSpike; public static float TokenModifier_dmgCoefficient => new SwingSword().damageCoefficient; private void SetupMelee() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_0119: Unknown result type (might be due to invalid IL or missing references) damageCoefficient = testDamage; baseDuration = testDuration; finisherDamage = testFinisherDamage; finisherBaseDuration = testFinisherDuration; float num = swingTimeCoefficient; switch (swingIndex) { case 0: animationStateName = "SwingSword0"; muzzleString = "Swing1Muzzle"; attackForceVector = swing1ForceVector; break; case 1: animationStateName = "SwingSword1"; muzzleString = "Swing2Muzzle"; attackForceVector = swing2ForceVector; break; default: animationStateName = "SwingSword3"; muzzleString = "SwingStabMuzzle"; hitboxGroupName = "SpearHitbox"; swingSoundString = "NemmandoSwing"; hitStopDuration = finisherHitPause; damageCoefficient = finisherDamage; baseDuration = finisherBaseDuration; attackForceVector = swing3ForceVector; num = finisherSwingTimeCoefficient; attackStartTimeFraction = finisherAttackStart; attackEndTimeFraction = finisherAttackEnd; earlyExitTimeFraction = finisherEarlyExit; break; } if (((EntityState)this).inputBank.aimDirection.y < spikeMaxY) { isSpike = true; } attackStartTimeFraction *= num; attackEndTimeFraction *= num; earlyExitTimeFraction *= num; hitEffectPrefab = SS2.Survivors.Knight.KnightHitEffect; } public override void OnEnter() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) SetupMelee(); swordPivot = ((BaseState)this).FindModelChild("HitboxAnchor"); base.OnEnter(); attack.damageType.damageSource = (DamageSource)1; } public override void PlayAttackAnimation() { if (((BaseState)this).isGrounded & !((EntityState)this).GetModelAnimator().GetBool("isMoving")) { ((EntityState)this).PlayCrossfade("FullBody, Override", animationStateName, "Primary.playbackRate", duration * swingTimeCoefficient, 0.08f); } else { ((EntityState)this).PlayCrossfade("FullBody, Override", "BufferEmpty", 0.1f); } ((EntityState)this).PlayCrossfade("Gesture, Override", animationStateName, "Primary.playbackRate", duration * swingTimeCoefficient, 0.08f); } protected override void AuthorityModifyOverlapAttack(OverlapAttack attack) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) base.AuthorityModifyOverlapAttack(attack); attack.forceVector = Util.QuaternionSafeLookRotation(((EntityState)this).characterDirection.forward) * attackForceVector; if (isSpike) { attack.forceVector = Vector3.up * spikeForce; } attack.physForceFlags = (PhysForceFlags)12; } public override void FixedUpdate() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_0034: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; direction.y = Mathf.Max(direction.y, direction.y * 0.5f); swordPivot.rotation = Util.QuaternionSafeLookRotation(direction); base.FixedUpdate(); } public override void OnExit() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((Component)swordPivot).transform.localRotation = Quaternion.identity; base.OnExit(); } } } namespace EntityStates.CrystalPickup { public abstract class CrystalBaseState : EntityState { protected SkinCrystal controller; protected PurchaseInteraction purchaseInter; protected ChildLocator childLoc; protected virtual bool enableInteraction => false; public override void OnEnter() { ((EntityState)this).OnEnter(); controller = ((EntityState)this).GetComponent(); purchaseInter = ((EntityState)this).GetComponent(); childLoc = ((EntityState)this).GetComponent(); if ((Object)(object)purchaseInter != (Object)null) { purchaseInter.SetAvailable(enableInteraction); } if ((Object)(object)childLoc != (Object)null && (Object)(object)childLoc.FindChild("CrystalMesh") != (Object)null) { ((Component)childLoc.FindChild("CrystalMesh")).gameObject.SetActive(enableInteraction); } } } public class DestroyCrystal : CrystalBaseState { public static float duration; protected override bool enableInteraction => false; public static event Action onPickup; public override void OnEnter() { base.OnEnter(); DestroyCrystal.onPickup?.Invoke(((EntityState)this).gameObject); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public class IdleActive : CrystalBaseState { public bool isActive; public static float checkDur; public static float radius; private float timer; private SkinCrystal scc; private SphereSearch search; private List hits; protected override bool enableInteraction => true; public override void OnEnter() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //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) base.OnEnter(); scc = ((EntityState)this).GetComponent(); hits = new List(); search = new SphereSearch(); search.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; search.radius = radius; } public override void FixedUpdate() { //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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); timer += Time.fixedDeltaTime; if (!(timer >= checkDur)) { return; } timer -= checkDur; hits.Clear(); search.ClearCandidates(); search.origin = ((EntityState)this).transform.position; search.RefreshCandidates(); search.FilterCandidatesByDistinctHurtBoxEntities(); search.GetHurtBoxes(hits); foreach (HurtBox hit in hits) { HealthComponent healthComponent = hit.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { CharacterBody body = healthComponent.body; if (Object.op_Implicit((Object)(object)body) && body.bodyIndex == scc.bodyIndex) { return; } } } IdleUnactive nextState = new IdleUnactive(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } public override void OnExit() { ((EntityState)this).OnExit(); } } public class IdleUnactive : CrystalBaseState { public bool isActive; public static float checkDur; public static float radius; private float timer; private SkinCrystal scc; private SphereSearch search; private List hits; protected override bool enableInteraction => false; public override void OnEnter() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); scc = ((EntityState)this).GetComponent(); if ((Object)(object)scc == (Object)null) { SS2Log.Error("CrystalPickup.idleUnactive : Failed to find SkinCrystal component! How? Destroying object.", 31, "OnEnter"); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); return; } hits = new List(); search = new SphereSearch(); search.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; search.radius = radius; } public override void FixedUpdate() { //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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); timer += Time.fixedDeltaTime; if (!(timer >= checkDur)) { return; } timer -= checkDur; hits.Clear(); search.ClearCandidates(); search.origin = ((EntityState)this).transform.position; search.RefreshCandidates(); search.FilterCandidatesByDistinctHurtBoxEntities(); search.GetHurtBoxes(hits); foreach (HurtBox hit in hits) { HealthComponent healthComponent = hit.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { CharacterBody body = healthComponent.body; if (Object.op_Implicit((Object)(object)body) && body.bodyIndex == scc.bodyIndex) { IdleActive nextState = new IdleActive(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); break; } } } } public override void OnExit() { ((EntityState)this).OnExit(); } } } namespace EntityStates.DroneTable { public class DestroyAction : DroneTableBaseState { } public class DestroyLeadin : DroneTableBaseState { } public abstract class DroneTableBaseState : EntityState { } public class Idle : DroneTableBaseState { } } namespace EntityStates.Hero { public class SpellCircles : BaseSkillState { public static GameObject spellObject; public static float baseDuration; public static float baseDurationBeforeCast; public static float baseDurationBetweenCast; private HuntressTracker tracker; private float duration; private float durationBeforeCast; private float durationBetweenCast; private float timer; private float castTimer; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; durationBeforeCast = baseDurationBeforeCast / ((BaseState)this).attackSpeedStat; durationBetweenCast = baseDurationBetweenCast / ((BaseState)this).attackSpeedStat; tracker = ((EntityState)this).GetComponent(); if ((Object)(object)tracker == (Object)null) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Circle() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)tracker.trackingTarget) && tracker.trackingTarget.healthComponent.alive) { ProjectileManager.instance.FireProjectile(spellObject, ((Component)tracker.trackingTarget).transform.position, new Quaternion(0f, 0f, 0f, 0f), ((Component)((EntityState)this).characterBody).gameObject, 1f, 0f, ((EntityState)this).characterBody.RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f, (DamageTypeCombo?)null); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!NetworkServer.active) { return; } timer += Time.fixedDeltaTime; if (timer >= durationBeforeCast) { if (castTimer >= durationBetweenCast) { Circle(); castTimer -= durationBetweenCast; } castTimer += Time.fixedDeltaTime; } if (timer >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class Step : BaseState { public static float baseDuration; private float duration; private Animator animator; private HuntressTracker tracker; private Vector3 startPos; private Vector3 targetPos; private bool hasBlinked; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.moveSpeedStat; tracker = ((EntityState)this).GetComponent(); if ((Object)(object)tracker != (Object)null) { GetTargetPosition(); } } public override void FixedUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (!hasBlinked) { SetPosition(Vector3.Lerp(startPos, targetPos, ((EntityState)this).fixedAge / duration)); } if (((EntityState)this).fixedAge >= duration && !hasBlinked) { hasBlinked = true; SetPosition(targetPos); } if (((EntityState)this).fixedAge >= duration && hasBlinked) { ((EntityState)this).outer.SetNextStateToMain(); } } private void SetPosition(Vector3 newPosition) { //IL_0018: 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) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(newPosition, Quaternion.identity, true); } } private void GetTargetPosition() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) startPos = ((EntityState)this).transform.position; HurtBox trackingTarget = tracker.GetTrackingTarget(); if (Object.op_Implicit((Object)(object)trackingTarget) && Object.op_Implicit((Object)(object)trackingTarget.healthComponent) && Object.op_Implicit((Object)(object)trackingTarget.healthComponent.body)) { targetPos = ((Component)trackingTarget.healthComponent).transform.position; Vector3 corePosition = trackingTarget.healthComponent.body.corePosition; Ray aimRay = trackingTarget.healthComponent.body.inputBank.GetAimRay(); Vector3 val = corePosition + ((Ray)(ref aimRay)).direction * 30f; Random random = new Random(); NodeGraph groundNodes = SceneInfo.instance.groundNodes; List list = groundNodes.FindNodesInRange(val, 0f, 10f, (HullMask)2); NodeIndex val2 = list[random.Next(list.Count)]; groundNodes.GetNodePosition(val2, ref targetPos); targetPos.y += 5f; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class WeaponSlam : BaseState { public static float duration = 3.5f; public static float damageCoefficient = 4f; public static float forceMagnitude = 16f; public static float upwardForce; public static float weaponForce; public static float radius = 3f; public static string attackSoundString; public static string muzzleString; public static GameObject slamImpactEffect; public static float durationBeforePriorityReduces; private BlastAttack blastAttack; private OverlapAttack weaponAttack; private Animator modelAnimator; private Transform modelTransform; private bool hasDoneBlastAttack; public override void OnEnter() { //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_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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00d3: 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_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) ((BaseState)this).OnEnter(); modelAnimator = ((EntityState)this).GetModelAnimator(); modelTransform = ((EntityState)this).GetModelTransform(); Util.PlayAttackSpeedSound(attackSoundString, ((EntityState)this).gameObject, base.attackSpeedStat); ((EntityState)this).PlayCrossfade("FullBody Override", "WeaponSlam", "WeaponSlam.playbackRate", duration, 0.1f); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.moveVector = ((Ray)(ref aimRay)).direction; } if (Object.op_Implicit((Object)(object)modelTransform)) { AimAnimator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = true; } } if (((EntityState)this).isAuthority) { OverlapAttack val = new OverlapAttack(); val.attacker = ((EntityState)this).gameObject; val.damage = damageCoefficient * base.damageStat; val.damageColorIndex = (DamageColorIndex)0; val.hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents(), (HitBoxGroup hbg) => hbg.groupName == "WeaponBig"); val.inflictor = ((EntityState)this).gameObject; val.procChainMask = default(ProcChainMask); val.pushAwayForce = weaponForce; val.procCoefficient = 1f; val.teamIndex = ((BaseState)this).GetTeam(); weaponAttack = val; } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)modelAnimator)) { if (((EntityState)this).isAuthority && modelAnimator.GetFloat("weaponAttack.hitBoxActive") > 0.5f) { weaponAttack.Fire((List)null); } if (modelAnimator.GetFloat("blastAttack.hitBoxActive") > 0.5f && !hasDoneBlastAttack) { hasDoneBlastAttack = true; if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterDirection.forward; } if (Object.op_Implicit((Object)(object)modelTransform)) { Transform val = ((BaseState)this).FindModelChild(muzzleString); if (Object.op_Implicit((Object)(object)val)) { blastAttack = new BlastAttack(); blastAttack.attacker = ((EntityState)this).gameObject; blastAttack.inflictor = ((EntityState)this).gameObject; blastAttack.teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject); blastAttack.baseDamage = base.damageStat * damageCoefficient; blastAttack.baseForce = forceMagnitude; blastAttack.position = val.position; blastAttack.radius = radius; blastAttack.bonusForce = new Vector3(0f, upwardForce, 0f); blastAttack.Fire(); } } } } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { if (!(((EntityState)this).fixedAge <= durationBeforePriorityReduces)) { return (InterruptPriority)1; } return (InterruptPriority)2; } } } namespace EntityStates.Invaders.Green { public class FireRay : GenericProjectileBaseState { public override void PlayAnimation(float duration) { ((GenericProjectileBaseState)this).PlayAnimation(duration); Object.op_Implicit((Object)(object)((EntityState)this).GetModelAnimator()); } } public class Jetpack : BaseSkillState { public Vector3 targetPosition; private float launchSpeed; private Vector3 startPosition; private static Random random = new Random(); public override void OnEnter() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); startPosition = ((EntityState)this).characterBody.footPosition; NodeGraph groundNodes = SceneInfo.instance.groundNodes; List list = groundNodes.FindNodesInRange(((EntityState)this).characterBody.transform.position, 64f, 80f, (HullMask)1); NodeIndex val = list[random.Next(list.Count)]; Vector3 val2 = default(Vector3); groundNodes.GetNodePosition(val, ref val2); targetPosition = val2; ICanDoMath(); } private void ICanDoMath() { //IL_006e: 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) float num = Trajectory.CalculateInitialYSpeed(4f, targetPosition.y - startPosition.y); float num2 = targetPosition.x - startPosition.x; float num3 = targetPosition.z - startPosition.z; Vector3 velocity = default(Vector3); ((Vector3)(ref velocity))..ctor(num2 / 4f, num, num3 / 4f); ((EntityState)this).characterMotor.velocity = velocity; ((EntityState)this).characterMotor.disableAirControlUntilCollision = true; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } } } namespace EntityStates.Ghoul { public abstract class BaseGhoulState : BaseSkillState { private CharacterBody leaderBody; public GameObject attackerObject { get { if (!Object.op_Implicit((Object)(object)attackerBody)) { return null; } return ((Component)attackerBody).gameObject; } } public CharacterBody attackerBody { get { if (!((Object)(object)leaderBody != (Object)null)) { return ((EntityState)this).characterBody; } return leaderBody; } } public override void OnEnter() { ((BaseState)this).OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.minionOwnership)) { CharacterMaster ownerMaster = ((EntityState)this).characterBody.master.minionOwnership.ownerMaster; if (Object.op_Implicit((Object)(object)ownerMaster)) { leaderBody = ownerMaster.GetBody(); } } } } public class DeathState : GenericCharacterDeath { public override bool shouldAutoDestroy => true; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); if (Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { EntityState.Destroy((Object)(object)((Component)((GenericCharacterDeath)this).cachedModelTransform).gameObject); ((GenericCharacterDeath)this).cachedModelTransform = null; } } } public class Leap : BaseGhoulState { private static float searchDistance = 24f; private static float searchAngle = 60f; private static string enterSoundString = "Play_imp_attack_tell"; public static GameObject leapEffectPrefab; private static float flightDuration = 0.4f; private static float maxHeight = 10f; private static float leapDistanceIfNoTarget = 10f; public override void OnEnter() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_0212: 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_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: 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_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); BullseyeSearch val = new BullseyeSearch { maxDistanceFilter = searchDistance, maxAngleFilter = searchAngle, searchOrigin = ((Ray)(ref aimRay)).origin, searchDirection = ((Ray)(ref aimRay)).direction, teamMaskFilter = TeamMask.GetEnemyTeams(base.attackerBody.teamComponent.teamIndex), sortMode = (SortMode)2, viewer = ((EntityState)this).characterBody }; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); HurtBox val2 = null; foreach (HurtBox result in val.GetResults()) { if (Object.op_Implicit((Object)(object)result) && Object.op_Implicit((Object)(object)result.healthComponent) && result.healthComponent.alive) { val2 = result; break; } } Vector3 val3 = ((Ray)(ref aimRay)).GetPoint(leapDistanceIfNoTarget); RaycastHit val4 = default(RaycastHit); if (Object.op_Implicit((Object)(object)val2)) { val3 = GetHighestPoint(val2); } else if (Util.CharacterSpherecast(((EntityState)this).gameObject, aimRay, 2f, ref val4, searchDistance, ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, (QueryTriggerInteraction)1)) { val3 = ((RaycastHit)(ref val4)).point; } float num = val3.y - ((EntityState)this).characterBody.footPosition.y; if (num > maxHeight) { num = maxHeight; } Vector3 val5 = val3 - ((EntityState)this).characterBody.footPosition; Vector3 val6 = new Vector3(val5.x, 0f, val5.z); float magnitude = ((Vector3)(ref val6)).magnitude; magnitude = Mathf.Abs(magnitude); float num2 = Trajectory.CalculateInitialYSpeed(flightDuration, num); float num3 = Trajectory.CalculateGroundSpeed(flightDuration, magnitude); Vector3 normalized = ((Vector3)(ref val5)).normalized; Vector3 velocity = default(Vector3); ((Vector3)(ref velocity))..ctor(num3 * normalized.x, num2, num3 * normalized.z); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = velocity; } if (Object.op_Implicit((Object)(object)leapEffectPrefab)) { Quaternion val7 = Util.QuaternionSafeLookRotation(((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized); EffectManager.SimpleEffect(leapEffectPrefab, ((EntityState)this).characterBody.footPosition, val7, false); } Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); } private Vector3 GetHighestPoint(HurtBox hurtBox) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return ((Component)hurtBox).transform.position; } public override void FixedUpdate() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterDirection.forward = ((EntityState)this).characterMotor.velocity; if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= flightDuration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Swipe()); } } } public class Swipe : BaseGhoulState { private static float baseDuration = 0.4f; private static float damageCoefficient = 1f; private static float forceMagnitude = 16f; private static float hitHopVelocity = 7f; private static float hitVelocityMultiplier = 0.2f; private static float bleedPercentChance = 25f; public static GameObject hitEffectPrefab; public static GameObject effectPrefab; private static string attackSoundString = "Play_imp_attack"; private static float attackStartTime = 0f; private static float attackEndTime = 0.8f; private OverlapAttack attack; private Animator modelAnimator; private float duration; private bool hasAttacked; private bool isBleed; public override void OnEnter() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); isBleed = Util.CheckRoll(bleedPercentChance, base.attackerBody.master); duration = baseDuration / ((BaseState)this).attackSpeedStat; modelAnimator = ((EntityState)this).GetModelAnimator(); Transform modelTransform = ((EntityState)this).GetModelTransform(); attack = new OverlapAttack(); attack.attacker = base.attackerObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = base.attackerBody.teamComponent.teamIndex; attack.damage = damageCoefficient * base.attackerBody.damage; attack.damageType = DamageTypeCombo.op_Implicit((DamageType)(isBleed ? 1024 : 0)); attack.hitEffectPrefab = hitEffectPrefab; attack.isCrit = base.attackerBody.RollCrit(); if (Object.op_Implicit((Object)(object)modelTransform)) { attack.hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents(), (HitBoxGroup element) => element.groupName == "Swipe"); } if (Object.op_Implicit((Object)(object)modelAnimator)) { ((EntityState)this).PlayAnimation("Gesture, Override", "Swipe", "Swipe.playbackRate", duration, 0f); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(2f); } } public override void FixedUpdate() { //IL_007d: 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) ((EntityState)this).FixedUpdate(); float num = ((EntityState)this).fixedAge / duration; bool flag = num >= attackStartTime && num <= attackEndTime; if (((EntityState)this).isAuthority && flag) { if (!hasAttacked) { Util.PlayAttackSpeedSound(attackSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, "SwipeLeft", true); hasAttacked = true; } attack.forceVector = ((EntityState)this).transform.forward * forceMagnitude; if (attack.Fire((List)null)) { OnHitEnemyAuthority(); } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void OnHitEnemyAuthority() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= hitVelocityMultiplier; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hitHopVelocity); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Unburrow : BaseGhoulState { private static float searchDistance = 40f; private static float searchAngle = 30f; private static string enterSoundString = "Play_imp_spawn"; public static GameObject leapEffectPrefab; private static float flightDuration = 0.8f; private static float leapDistanceIfNoTarget = 15f; private bool hasTarget; public bool useLeaderAimRay = true; public override void OnEnter() { //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (((EntityState)this).isAuthority) { Ray val = (useLeaderAimRay ? base.attackerBody.inputBank.GetAimRay() : ((BaseState)this).GetAimRay()); BullseyeSearch val2 = new BullseyeSearch { maxDistanceFilter = searchDistance, maxAngleFilter = searchAngle, searchOrigin = ((Ray)(ref val)).origin, searchDirection = ((Ray)(ref val)).direction, teamMaskFilter = TeamMask.GetEnemyTeams(base.attackerBody.teamComponent.teamIndex), sortMode = (SortMode)2, viewer = ((EntityState)this).characterBody }; val2.RefreshCandidates(); val2.FilterOutGameObject(((EntityState)this).gameObject); val2.FilterOutGameObject(base.attackerObject); HurtBox val3 = null; foreach (HurtBox result in val2.GetResults()) { if (Object.op_Implicit((Object)(object)result) && Object.op_Implicit((Object)(object)result.healthComponent) && result.healthComponent.alive) { val3 = result; break; } } Vector3 val4 = ((Ray)(ref val)).GetPoint(leapDistanceIfNoTarget); RaycastHit val5 = default(RaycastHit); if (Object.op_Implicit((Object)(object)val3)) { hasTarget = true; val4 = GetHighestPoint(val3); } else if (Util.CharacterSpherecast(((EntityState)this).gameObject, val, 2f, ref val5, searchDistance, ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, (QueryTriggerInteraction)1)) { val4 = ((RaycastHit)(ref val5)).point; } float num = val4.y - ((EntityState)this).characterBody.footPosition.y; Vector3 val6 = val4 - ((EntityState)this).characterBody.footPosition; Vector3 val7 = new Vector3(val6.x, 0f, val6.z); float magnitude = ((Vector3)(ref val7)).magnitude; magnitude = Mathf.Abs(magnitude); float num2 = Trajectory.CalculateInitialYSpeed(flightDuration, num); float num3 = Trajectory.CalculateGroundSpeed(flightDuration, magnitude); Vector3 normalized = ((Vector3)(ref val6)).normalized; Vector3 velocity = default(Vector3); ((Vector3)(ref velocity))..ctor(num3 * normalized.x, num2, num3 * normalized.z); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = velocity; } if (Object.op_Implicit((Object)(object)leapEffectPrefab)) { Quaternion val8 = Util.QuaternionSafeLookRotation(((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized); EffectManager.SimpleEffect(leapEffectPrefab, ((EntityState)this).characterBody.footPosition, val8, false); } Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); ((BaseState)this).StartAimMode(2f, false); } private Vector3 GetHighestPoint(HurtBox hurtBox) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return ((Component)hurtBox).transform.position; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((BaseState)this).StartAimMode(2f, false); if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((BaseCharacterController)((EntityState)this).characterMotor).Motor.LastGroundingStatus.IsStableOnGround && ((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.IsStableOnGround) { ((EntityState)this).outer.SetNextStateToMain(); } else if (((EntityState)this).fixedAge >= flightDuration && hasTarget) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Swipe()); } } } } } namespace EntityStates.Generic { public abstract class BaseWindDownState : BaseState { [SerializeField] public float baseDuration; [SerializeField] public InterruptPriority minimumInterruptPriority; [SerializeField] public bool ignoreAttackSpeed; protected float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = (ignoreAttackSpeed ? baseDuration : (baseDuration / base.attackSpeedStat)); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return minimumInterruptPriority; } } public class NemesisSpawnState : BaseState { public static float duration = 3f; protected string portalMuzzle = "Chest"; private CameraRigController cameraController; private bool initCamera; public override void OnEnter() { ((BaseState)this).OnEnter(); initCamera = false; ((EntityState)this).PlayAnimation("FullBody, Override", "Spawn"); Util.PlaySound(SpawnState.spawnSoundString, ((EntityState)this).gameObject); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } SpawnEffect(); } public virtual void SpawnEffect() { if (Object.op_Implicit((Object)(object)SpawnState.spawnEffectPrefab)) { EffectManager.SimpleMuzzleFlash(SpawnState.spawnEffectPrefab, ((EntityState)this).gameObject, portalMuzzle, false); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!Object.op_Implicit((Object)(object)cameraController)) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.playerCharacterMasterController) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.playerCharacterMasterController.networkUser)) { cameraController = ((EntityState)this).characterBody.master.playerCharacterMasterController.networkUser.cameraRigController; } } else if (!initCamera) { initCamera = true; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } } namespace EntityStates.FlowerTurret { public class AimFlowerTurret : BaseFlowerTurretState { public static float minDuration = 0f; public static float maxEnemyDistanceToStartFiring = 25f; public static float searchInterval = 0.25f; private BullseyeSearch enemyFinder; private float searchRefreshTimer; public override void OnEnter() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (NetworkServer.active) { enemyFinder = new BullseyeSearch(); enemyFinder.teamMaskFilter = TeamMask.GetEnemyTeams(body.teamComponent.teamIndex); enemyFinder.maxDistanceFilter = maxEnemyDistanceToStartFiring; enemyFinder.maxAngleFilter = float.MaxValue; enemyFinder.filterByLoS = true; enemyFinder.sortMode = (SortMode)1; } } public override void FixedUpdate() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!NetworkServer.active || !(((EntityState)this).fixedAge > minDuration)) { return; } searchRefreshTimer -= Time.fixedDeltaTime; if (!(searchRefreshTimer < 0f)) { return; } searchRefreshTimer = searchInterval; enemyFinder.searchOrigin = muzzleTransform.position; enemyFinder.searchDirection = body.transform.forward; enemyFinder.RefreshCandidates(); using IEnumerator enumerator = enemyFinder.GetResults().GetEnumerator(); if (enumerator.MoveNext()) { HurtBox current = enumerator.Current; ((EntityState)this).outer.SetNextState((EntityState)(object)new FireFlowerTurret { targetHurtBox = current }); } } } public abstract class BaseFlowerTurretState : EntityState { protected NetworkedBodyAttachment networkedBodyAttachment; protected CharacterBody body; protected Animator animator; protected Transform muzzleTransform; protected Transform displayTransform; protected bool linkedToDisplay; public override void OnEnter() { ((EntityState)this).OnEnter(); networkedBodyAttachment = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)networkedBodyAttachment)) { body = networkedBodyAttachment.attachedBody; } muzzleTransform = FindMuzzle(); } private Transform FindMuzzle() { //IL_0084: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)networkedBodyAttachment)) { body = networkedBodyAttachment.attachedBody; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.modelLocator) && Object.op_Implicit((Object)(object)body.modelLocator.modelTransform)) { CharacterModel component = ((Component)body.modelLocator.modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { foreach (GameObject itemDisplayObject in component.GetItemDisplayObjects(SS2Content.Items.FlowerTurret.itemIndex)) { displayTransform = itemDisplayObject.transform; animator = itemDisplayObject.GetComponentInChildren(); ChildLocator componentInChildren = itemDisplayObject.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { Transform val = componentInChildren.FindChild("Muzzle"); if (Object.op_Implicit((Object)(object)val)) { return val; } } } } } } return ((EntityState)this).transform; } } public class FireFlowerTurret : BaseFlowerTurretState { public static float baseDuration = 1f; public static float damageCoefficient = 1f; public static float force = 100f; public static float procCoefficient = 1f; public static string muzzleName = "Muzzle"; public static GameObject muzzleFlashPrefab; private static float eliteDamageCoefficient = 1f / 3f; public HurtBox targetHurtBox; private float duration; private bool hasFired; public float fireTime = 0.23f; public override void OnEnter() { base.OnEnter(); duration = baseDuration; if (Object.op_Implicit((Object)(object)body)) { duration = baseDuration / body.attackSpeed; } if (Object.op_Implicit((Object)(object)animator)) { EntityState.PlayAnimationOnAnimator(animator, "Body", "FireGoo", "Primary.playbackRate", duration, 0f); } } private void Fire() { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)muzzleTransform)) { muzzleTransform = body.coreTransform; } if (!NetworkServer.active || !Object.op_Implicit((Object)(object)targetHurtBox)) { return; } float num = Mathf.Max(12f, body.damage); FlowerOrb flowerOrb = new FlowerOrb(); flowerOrb.forceScalar = force; ((GenericDamageOrb)flowerOrb).damageValue = num * damageCoefficient; ((GenericDamageOrb)flowerOrb).isCrit = Util.CheckRoll(body.crit, body.master); ((GenericDamageOrb)flowerOrb).teamIndex = body.teamComponent.teamIndex; ((GenericDamageOrb)flowerOrb).attacker = ((Component)body).gameObject; ((GenericDamageOrb)flowerOrb).procCoefficient = procCoefficient; HurtBox val = targetHurtBox; if (Object.op_Implicit((Object)(object)val)) { if (Object.op_Implicit((Object)(object)displayTransform)) { EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((Component)displayTransform).gameObject, "Muzzle", true); } ((Orb)flowerOrb).origin = muzzleTransform.position; ((Orb)flowerOrb).target = val; OrbManager.instance.AddOrb((Orb)(object)flowerOrb); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration * fireTime && !hasFired) { Fire(); hasFired = true; } if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } } namespace EntityStates.Executioner { public class FirePistol : BaseSkillState { [FormatToken(/*Could not decode attribute arguments.*/)] private static float damageCoefficient = 1.8f; private static float procCoefficient = 1f; private static float baseDuration = 0.42f; private static float recoil = 2f; private static float spreadBloom = 0.75f; private static float force = 120f; private static float bulletRadius = 0.7f; [HideInInspector] private static GameObject muzzleEffectPrefab = LegacyResourcesAPI.Load("prefabs/effects/muzzleflashes/Muzzleflash1"); [HideInInspector] private static GameObject tracerPrefab = LegacyResourcesAPI.Load("prefabs/effects/tracers/tracercommandodefault"); [HideInInspector] private static GameObject hitPrefab = LegacyResourcesAPI.Load("prefabs/effects/HitsparkCommando"); private float duration; private float fireDuration; private string muzzleString; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireDuration = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "Muzzle"; hasFired = false; ((EntityState)this).PlayAnimation("Gesture, Override", "Primary"); Shoot(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!(((EntityState)this).fixedAge < duration) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Shoot() { //IL_00a9: 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_00b0: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_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_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; bool flag = ((BaseState)this).RollCrit(); string text = "ExecutionerPrimary"; if (flag) { text += "Crit"; } Util.PlaySound(text, ((EntityState)this).gameObject); ((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil); if (Object.op_Implicit((Object)(object)muzzleEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } if (((EntityState)this).isAuthority) { _ = damageCoefficient; _ = ((BaseState)this).damageStat; Ray aimRay = ((BaseState)this).GetAimRay(); DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)0); damageType.damageSource = (DamageSource)1; new BulletAttack { aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageType = damageType, damageColorIndex = (DamageColorIndex)0, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, falloffModel = (FalloffModel)1, force = force, isCrit = flag, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = bulletRadius, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = tracerPrefab, hitEffectPrefab = hitPrefab }.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.Executioner2 { public class ChargeBloodletting : BaseSkillState { private static float baseDuration = 0.5f; public static GameObject effectPrefab; public static GameObject effectPrefabMastery; private static string muzzle; private static string chargeSoundString = "Play_voidman_R_activate"; private float duration; private uint soundID; private GameObject effectInstance; public override void OnEnter() { //IL_00c0: 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) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; soundID = Util.PlayAttackSpeedSound(chargeSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayAnimation("Gesture, Override", "Bloodletting", "Utility.playbackRate", duration, 0f); ((EntityState)this).characterBody.SetAimTimer(duration + 1f); Transform val = ((BaseState)this).FindModelChild(muzzle) ?? ((EntityState)this).characterBody.coreTransform; GameObject val2 = ((Object.op_Implicit((Object)(object)((EntityState)this).GetComponent()) && ((EntityState)this).GetComponent().inMasterySkin) ? effectPrefabMastery : effectPrefab); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val2)) { effectInstance = Object.Instantiate(val2, val.position, val.rotation); effectInstance.transform.parent = val; ScaleParticleSystemDuration component = effectInstance.GetComponent(); ObjectScaleCurve component2 = effectInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = duration; } if (Object.op_Implicit((Object)(object)component2)) { component2.timeMax = duration; } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Bloodletting()); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)effectInstance)) { EntityState.Destroy((Object)(object)effectInstance); } AkSoundEngine.StopPlayingID(soundID); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Bloodletting : BaseSkillState { private static float baseDuration = 0.25f; private static float healthFraction = 0.25f; private static float orbDuration = 0.25f; private static float debuffDuration = 3f; private static float debuffRadius = 16f; private static float buffDuration = 8f; private static int chargesToGrant = 0; private static string activationSoundString = "Play_voidman_R_pop"; public static GameObject effectPrefab; public static GameObject effectPrefabMastery; private float duration; public override void OnEnter() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Util.PlaySound(activationSoundString, ((EntityState)this).gameObject); GameObject val = ((Object.op_Implicit((Object)(object)((EntityState)this).GetComponent()) && ((EntityState)this).GetComponent().inMasterySkin) ? effectPrefabMastery : effectPrefab); if (Object.op_Implicit((Object)(object)val)) { EffectManager.SimpleEffect(val, ((EntityState)this).characterBody.coreTransform.position, Quaternion.identity, false); } if (NetworkServer.active) { DamageInfo val2 = new DamageInfo(); val2.damage = ((EntityState)this).healthComponent.fullHealth * healthFraction; val2.position = ((EntityState)this).characterBody.corePosition; val2.force = Vector3.zero; val2.damageColorIndex = (DamageColorIndex)0; val2.crit = false; val2.attacker = null; val2.inflictor = null; val2.damageType = DamageTypeCombo.op_Implicit((DamageType)3); val2.procCoefficient = 0f; val2.procChainMask = default(ProcChainMask); ((EntityState)this).healthComponent.TakeDamage(val2); for (int i = 0; (float)i < buffDuration; i++) { ((EntityState)this).characterBody.AddTimedBuff(SS2Content.Buffs.bdConsecration, (float)(i + 1)); } for (int j = 0; j < chargesToGrant; j++) { ExecutionerBloodOrb executionerBloodOrb = new ExecutionerBloodOrb(); ((Orb)executionerBloodOrb).duration = orbDuration; ((Orb)executionerBloodOrb).origin = ((EntityState)this).characterBody.corePosition; ((Orb)executionerBloodOrb).target = ((EntityState)this).characterBody.mainHurtBox; OrbManager.instance.AddOrb((Orb)(object)executionerBloodOrb); } CreateFearAoe(); } } private void CreateFearAoe() { //IL_0000: 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) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) SphereSearch val = new SphereSearch { mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, radius = debuffRadius, origin = ((EntityState)this).characterBody.corePosition }; val.RefreshCandidates(); val.FilterCandidatesByDistinctHurtBoxEntities(); val.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(((EntityState)this).teamComponent.teamIndex)); HurtBox[] hurtBoxes = val.GetHurtBoxes(); for (int i = 0; i < hurtBoxes.Length; i++) { HealthComponent healthComponent = hurtBoxes[i].healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent)) { continue; } SetStateOnHurt component = ((Component)healthComponent).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.SetStun(-1f); } CharacterBody body = healthComponent.body; if (Object.op_Implicit((Object)(object)body) && (Object)(object)body != (Object)(object)((EntityState)this).characterBody) { body.AddTimedBuff(SS2Content.Buffs.BuffFear, debuffDuration); if (Object.op_Implicit((Object)(object)body.master) && body.master.aiComponents.Length != 0 && Object.op_Implicit((Object)(object)body.master.aiComponents[0])) { body.master.aiComponents[0].stateMachine.SetNextState((EntityState)(object)new Fear { fearTarget = ((EntityState)this).gameObject }); } } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class ChargeGun : BaseSkillState { private static float baseDuration = 1.2f; private static float durationWithWhichYouWillNeedToHaveBeenInThisStateOrHadAtLeastOneStockToBeAbleToSetTheSkillOverride = 0.175f; private static float camEntryDuration = 0.2f; private static float camExitDuration = 0.4f; private static string enterSoundString = "ExecutionerAimSecondary"; private static string exitSoundString = "ExecutionerExitSecondary"; public static GameObject crosshairOverridePrefab; public static GameObject crosshairOverridePrefabMastery; [SerializeField] public SkillDef primaryOverride; private bool thisFuckingSucks; private EntityStateMachine weapon; private float duration; private float overrideStopwatch; private ExecutionerController controller; private bool overrideSet; private OverrideRequest crosshairOverrideRequest; public CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData chargeCameraParams = new CharacterCameraParamsData { pivotVerticalOffset = BlendableFloat.op_Implicit(cameraPivotVerticalOffset), idealLocalCameraPos = BlendableVector3.op_Implicit(chargeCameraPos) }; private CharacterCameraParamsData altCameraParams = new CharacterCameraParamsData { pivotVerticalOffset = BlendableFloat.op_Implicit(cameraPivotVerticalOffset), idealLocalCameraPos = BlendableVector3.op_Implicit(altCameraPos) }; private static float cameraPivotVerticalOffset = 1.37f; private static Vector3 chargeCameraPos = new Vector3(1.2f, -0.75f, -6.1f); private static Vector3 altCameraPos = new Vector3(-1.2f, -0.75f, -6.1f); public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration * ((EntityState)this).skillLocator.secondary.cooldownScale; Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Gesture, Override", "FireIonGunStart", "Secondary.playbackRate", duration, 0.3f); ((EntityState)this).characterBody.SetAimTimer(2f); controller = ((EntityState)this).GetComponent(); CameraSwap(); if (((EntityState)this).skillLocator.secondary.stock > 0) { SetSkillOverride(); } GameObject val = ((Object.op_Implicit((Object)(object)((EntityState)this).GetComponent()) && ((EntityState)this).gameObject.GetComponent().inMasterySkin) ? crosshairOverridePrefabMastery : crosshairOverridePrefab); if (Object.op_Implicit((Object)(object)val)) { crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, val, (OverridePriority)1); } weapon = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); } private void CameraSwap() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_0021: 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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)controller) && controller.useAltCamera) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, camExitDuration); CameraParamsOverrideRequest val = new CameraParamsOverrideRequest { cameraParamsData = altCameraParams, priority = 0f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val, camEntryDuration); } else { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, camExitDuration); CameraParamsOverrideRequest val2 = new CameraParamsOverrideRequest { cameraParamsData = chargeCameraParams, priority = 0f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, camEntryDuration); } } private void SetSkillOverride() { overrideStopwatch += Time.fixedDeltaTime; if (!overrideSet && overrideStopwatch >= durationWithWhichYouWillNeedToHaveBeenInThisStateOrHadAtLeastOneStockToBeAbleToSetTheSkillOverride) { overrideSet = true; ((EntityState)this).PlayCrossfade("Gesture, Override", "FireIonGunStart", "Secondary.playbackRate", duration, 0.3f); ((EntityState)this).skillLocator.primary.SetSkillOverride((object)this, primaryOverride, (SkillOverridePriority)3); } } private void UnsetSkillOverride() { overrideStopwatch = 0f; if (overrideSet) { overrideSet = false; ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)this, primaryOverride, (SkillOverridePriority)3); } } public override void Update() { ((EntityState)this).Update(); if (Input.GetKeyDown((KeyCode)118) && ((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)controller)) { controller.useAltCamera = !controller.useAltCamera; } CameraSwap(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!(weapon.state is Dash)) { ((EntityState)this).characterBody.isSprinting = false; ((EntityState)this).characterBody.aimTimer = 2f; } else { ((EntityState)this).characterBody.aimTimer = 0f; } if (((EntityState)this).skillLocator.secondary.stock > 0) { SetSkillOverride(); } else { UnsetSkillOverride(); } if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill2.down) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void OnExit() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); UnsetSkillOverride(); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", "Secondary.playbackRate", duration, 0.3f); Util.PlaySound(exitSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, camExitDuration); } if (crosshairOverrideRequest != null) { crosshairOverrideRequest.Dispose(); } } } public class ChargeConsecration : BaseSkillState { private static float baseDuration = 0.5f; public static GameObject effectPrefab; public static GameObject effectPrefabMastery; private static string muzzle = "MuzzleCrush"; private static string chargeSoundString = "Play_voidman_m2_chargeUp"; private float duration; private uint soundID; private GameObject effectInstance; public override void OnEnter() { //IL_00c0: 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) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; soundID = Util.PlayAttackSpeedSound(chargeSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayAnimation("Gesture, Override", "Crush", "Secondary.playbackRate", duration, 0f); ((EntityState)this).characterBody.SetAimTimer(duration + 1f); Transform val = ((BaseState)this).FindModelChild(muzzle) ?? ((EntityState)this).characterBody.coreTransform; GameObject val2 = ((Object.op_Implicit((Object)(object)((EntityState)this).GetComponent()) && ((EntityState)this).GetComponent().inMasterySkin) ? effectPrefabMastery : effectPrefab); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val2)) { effectInstance = Object.Instantiate(val2, val.position, val.rotation); effectInstance.transform.parent = val; ScaleParticleSystemDuration component = effectInstance.GetComponent(); ObjectScaleCurve component2 = effectInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = duration; } if (Object.op_Implicit((Object)(object)component2)) { component2.timeMax = duration; } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Consecration()); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)effectInstance)) { EntityState.Destroy((Object)(object)effectInstance); } AkSoundEngine.StopPlayingID(soundID); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Consecration : BaseSkillState { private static float baseDuration = 0.25f; private static float healFraction = 0.05f; private static float buffDuration = 6f; private static float cooldownDeduction = 1f; private static string activationSoundString = "Play_voidman_m2_shoot_fullCharge"; private static string muzzleString = "MuzzleCrush"; public static GameObject effectPrefab; public static GameObject effectPrefabMastery; public static GameObject orbEffectPrefab; public static GameObject orbEffectPrefabMastery; private float duration; public override void OnEnter() { //IL_0107: 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_0164: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0171: 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_0185: Expected O, but got Unknown ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Util.PlaySound(activationSoundString, ((EntityState)this).gameObject); GameObject val = effectPrefab; GameObject val2 = orbEffectPrefab; if (Object.op_Implicit((Object)(object)((EntityState)this).GetComponent()) && ((EntityState)this).gameObject.GetComponent().inMasterySkin) { val = effectPrefabMastery; val2 = orbEffectPrefabMastery; } if (Object.op_Implicit((Object)(object)val)) { EffectManager.SimpleMuzzleFlash(val, ((EntityState)this).gameObject, muzzleString, false); } int stock = ((EntityState)this).skillLocator.secondary.stock; _ = ((EntityState)this).skillLocator.secondary.maxStock; ((EntityState)this).skillLocator.secondary.stock = 0; if (((EntityState)this).isAuthority) { for (int i = 0; i < stock; i++) { ((EntityState)this).skillLocator.DeductCooldownFromAllSkillsAuthority(cooldownDeduction); } } if (!NetworkServer.active) { return; } float num = ((EntityState)this).healthComponent.fullHealth - ((EntityState)this).healthComponent.health; ((EntityState)this).healthComponent.Heal(num * healFraction * (float)stock, default(ProcChainMask), true); for (int j = 0; j < stock; j++) { if (buffDuration > 0f) { ((EntityState)this).characterBody.AddTimedBuff(SS2Content.Buffs.bdConsecration, buffDuration); } Transform val3 = ((BaseState)this).FindModelChild(muzzleString); Vector3 origin = (Object.op_Implicit((Object)(object)val3) ? val3.position : ((EntityState)this).characterBody.corePosition); EffectData val4 = new EffectData { origin = origin, genericFloat = 0.4f }; val4.SetHurtBoxReference(((EntityState)this).characterBody.mainHurtBox); EffectManager.SpawnEffect(val2, val4, true); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class Dash : BaseSkillState { private static float baseDuration = 0.75f; private static float speedMultiplier = 2.4f; private static float debuffRadius = 11f; [FormatToken("SS2_EXECUTIONER_DASH_DESCRIPTION", 0)] private static float debuffDuration = 3.5f; private static float debuffCheckInterval = 0.0333333f; private static float hopVelocity = 17f; private static float turnSpeed = 360f; private float debuffCheckStopwatch; private float duration; private SphereSearch fearSearch; private List hits; private List fearedTargets = new List(); private Animator animator; public static GameObject fearTracerEffect; public static GameObject fearTracerEffectMastery; public static GameObject dashEffect; public static GameObject dashEffectMastery; public static Material dashMasteryMaterial; public static Material dashMaterial; public static string ExhaustL; public static string ExhaustR; private EntityStateMachine bodyStateMachine; private Vector3 currentDirection; private Vector3 directionVelocity; private bool playedExitAnimation; private bool inMasterySkin; private static float asodiyhbeajbde = 0.33f; public override void OnEnter() { //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); bodyStateMachine = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Body"); debuffCheckStopwatch = 0f; duration = baseDuration; Util.PlayAttackSpeedSound("ExecutionerUtility", ((EntityState)this).gameObject, 1f); ((EntityState)this).PlayAnimation("FullBody, Override", "Dash", "Utility.playbackRate", duration * asodiyhbeajbde, 0f); HopIfAirborne(); ((EntityState)this).characterDirection.turnSpeed = turnSpeed; currentDirection = ((EntityState)this).characterDirection.forward; hits = new List(); fearSearch = new SphereSearch(); fearSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; fearSearch.radius = debuffRadius; string nameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; inMasterySkin = nameToken == "SS2_SKIN_EXECUTIONER2_MASTERY"; if (NetworkServer.active) { CreateFearAoe(); if (inMasterySkin) { EffectManager.SimpleMuzzleFlash(dashEffectMastery, ((EntityState)this).gameObject, ExhaustL, true); EffectManager.SimpleMuzzleFlash(dashEffectMastery, ((EntityState)this).gameObject, ExhaustR, true); } else { EffectManager.SimpleMuzzleFlash(dashEffect, ((EntityState)this).gameObject, ExhaustL, true); EffectManager.SimpleMuzzleFlash(dashEffect, ((EntityState)this).gameObject, ExhaustR, true); } } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val.duration = duration * 1.3f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; if (inMasterySkin) { val.originalMaterial = dashMasteryMaterial; } else { val.originalMaterial = dashMaterial; } val.AddToCharacterModel(((Component)modelTransform).GetComponent()); } } private void CreateFearAoe() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown hits.Clear(); fearSearch.ClearCandidates(); fearSearch.origin = ((EntityState)this).characterBody.corePosition; fearSearch.RefreshCandidates(); fearSearch.FilterCandidatesByDistinctHurtBoxEntities(); fearSearch.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(((EntityState)this).teamComponent.teamIndex)); fearSearch.GetHurtBoxes(hits); foreach (HurtBox hit in hits) { HealthComponent healthComponent = hit.healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent) || fearedTargets.Contains(healthComponent)) { continue; } fearedTargets.Add(healthComponent); SetStateOnHurt component = ((Component)healthComponent).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.SetStun(-1f); } CharacterBody body = healthComponent.body; if (Object.op_Implicit((Object)(object)body) && (Object)(object)body != (Object)(object)((EntityState)this).characterBody) { body.AddTimedBuff(SS2Content.Buffs.BuffFear, debuffDuration); SS2.Survivors.Executioner2.FearBehavior component2 = ((Component)body).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.inMasterySkin = inMasterySkin; } GameObject val = (inMasterySkin ? fearTracerEffectMastery : fearTracerEffect); if (Object.op_Implicit((Object)(object)val)) { EffectData val2 = new EffectData { origin = body.corePosition, start = ((EntityState)this).characterBody.corePosition }; EffectManager.SpawnEffect(val, val2, true); } if (Object.op_Implicit((Object)(object)body.master) && body.master.aiComponents.Length != 0 && Object.op_Implicit((Object)(object)body.master.aiComponents[0])) { body.master.aiComponents[0].stateMachine.SetNextState((EntityState)(object)new Fear { fearTarget = ((EntityState)this).gameObject }); } } } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).characterDirection.turnSpeed = 720f; if (!playedExitAnimation) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); } } public override void FixedUpdate() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_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_00cc: 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_00ea: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; bool flag = Object.op_Implicit((Object)(object)bodyStateMachine) && bodyStateMachine.state is ExecuteLeap; Vector3 val = (flag ? ((EntityState)this).inputBank.moveVector : ((EntityState)this).characterDirection.forward); if (flag) { playedExitAnimation = true; val = (currentDirection = Vector3.SmoothDamp(currentDirection, val, ref directionVelocity, 360f / turnSpeed * 0.25f)); } else { currentDirection = ((EntityState)this).characterDirection.forward; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += val * ((EntityState)this).characterBody.moveSpeed * speedMultiplier * Time.fixedDeltaTime; } if (NetworkServer.active) { debuffCheckStopwatch += Time.fixedDeltaTime; if (debuffCheckStopwatch >= debuffCheckInterval) { debuffCheckInterval -= debuffCheckInterval; CreateFearAoe(); } } if (((EntityState)this).fixedAge >= duration) { if (!playedExitAnimation) { ((EntityState)this).PlayAnimation("FullBody, Override", "DashEnd"); playedExitAnimation = true; } if (((EntityState)this).isAuthority && !flag) { ((EntityState)this).outer.SetNextStateToMain(); } } } private void HopIfAirborne() { if (!((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class ExecuteHold : BaseSkillState { public static float duration = 1f; public static GameObject jumpEffect; public static GameObject jumpEffectMastery; public static string ExhaustL; public static string ExhaustR; private string skinNameToken; public static GameObject areaIndicator; public static GameObject areaIndicatorOOB; [HideInInspector] public GameObject areaIndicatorInstance; [HideInInspector] public GameObject areaIndicatorInstanceOOB; private ExecutionerController exeController; private bool controlledExit; public bool imAFilthyFuckingLiar; private CameraParamsOverrideHandle camOverrideHandle; private CharacterCameraParamsData slamCameraParams = new CharacterCameraParamsData { pivotVerticalOffset = BlendableFloat.op_Implicit(1f), idealLocalCameraPos = BlendableVector3.op_Implicit(slamCameraPosition) }; [HideInInspector] public static Vector3 slamCameraPosition = new Vector3(2.6f, -2f, -8f); public override void OnEnter() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0124: 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) ((BaseState)this).OnEnter(); exeController = ((EntityState)this).GetComponent(); if ((Object)(object)exeController != (Object)null) { exeController.meshExeAxe.SetActive(true); } ((EntityState)this).characterBody.hideCrosshair = true; ((EntityState)this).PlayAnimation("FullBody, Override", "SpecialHang", "Special.playbackRate", duration, 0f); if (((EntityState)this).isAuthority) { skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; if (skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY") { EffectManager.SimpleMuzzleFlash(jumpEffectMastery, ((EntityState)this).gameObject, ExhaustL, true); EffectManager.SimpleMuzzleFlash(jumpEffectMastery, ((EntityState)this).gameObject, ExhaustR, true); } else { EffectManager.SimpleMuzzleFlash(jumpEffect, ((EntityState)this).gameObject, ExhaustL, true); EffectManager.SimpleMuzzleFlash(jumpEffect, ((EntityState)this).gameObject, ExhaustR, true); } CameraParamsOverrideRequest val = new CameraParamsOverrideRequest { cameraParamsData = slamCameraParams, priority = 0f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val, 0f); ((EntityState)this).characterBody.SetAimTimer(duration); areaIndicatorInstance = Object.Instantiate(areaIndicator); areaIndicatorInstance.SetActive(true); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { FixedUpdateAuthority(); } } public override void Update() { ((EntityState)this).Update(); UpdateAreaIndicator(); } private void UpdateAreaIndicator() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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) if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { float num = 256f; Ray aimRay = ((BaseState)this).GetAimRay(); RaycastHit val = default(RaycastHit); if (Physics.Raycast(aimRay, ref val, num, LayerMask.op_Implicit(CommonMasks.bullet))) { imAFilthyFuckingLiar = true; areaIndicatorInstance.transform.position = ((RaycastHit)(ref val)).point; areaIndicatorInstance.transform.up = ((RaycastHit)(ref val)).normal; } else { imAFilthyFuckingLiar = false; areaIndicatorInstance.transform.position = ((Ray)(ref aimRay)).GetPoint(num); areaIndicatorInstance.transform.up = -((Ray)(ref aimRay)).direction; } } } private void FixedUpdateAuthority() { if (((EntityState)this).fixedAge >= duration || !((EntityState)this).inputBank.skill4.down || ((EntityState)this).inputBank.skill1.down) { ExecuteSlam nextState = new ExecuteSlam(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } else { HandleMovement(); } } public void HandleMovement() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterMotor.velocity = Vector3.zero; } public override void OnExit() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).characterBody.hideCrosshair = false; if ((Object)(object)exeController != (Object)null && !controlledExit) { exeController.meshExeAxe.SetActive(false); } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 1f); } if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); } if (Object.op_Implicit((Object)(object)areaIndicatorInstanceOOB)) { EntityState.Destroy((Object)(object)areaIndicatorInstanceOOB.gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class ExecuteLeap : BaseSkillState { private Vector3 flyVector = Vector3.zero; private static float walkSpeedCoefficient = 2f; private static float baseVerticalSpeed = 58f; public static AnimationCurve speedCoefficientCurve; private static float baseDuration = 0.8f; private static float maxAttackSpeed = 1.4f; private static float dumbFuckingSpeedScalingNumberCoefficientValue = 1.3f; public static float crosshairDur = 0.75f; private static float maxAngle = 42f; private static float maxAngleTuah = 66f; private static float rayRadius = 1.5f; private static float axeFadeInDuration = 0.8f; public static GameObject indicatorPrefab; public static GameObject indicatorPrefabMastery; public static GameObject jumpEffect; public static GameObject jumpEffectMastery; public static string ExhaustL; public static string ExhaustR; private bool controlledExit; private float duration; private float verticalSpeed; private ExecutionerController exeController; private GameObject indicatorInstance; private CameraParamsOverrideHandle camOverrideHandle; private static float cameraLerpDuration = 0.5f; private CharacterCameraParamsData slamCameraParams = new CharacterCameraParamsData { pivotVerticalOffset = BlendableFloat.op_Implicit(1.37f), idealLocalCameraPos = BlendableVector3.op_Implicit(slamCameraPosition) }; private static Vector3 slamCameraPosition = new Vector3(2.6f, -2f, -12f); public override void OnEnter() { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: 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_020d: 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_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) ((BaseState)this).OnEnter(); exeController = ((EntityState)this).GetComponent(); if ((Object)(object)exeController != (Object)null) { exeController.meshExeAxe.SetActive(true); exeController.AxeFadeIn(axeFadeInDuration); } float num = Mathf.Min(((BaseState)this).attackSpeedStat, maxAttackSpeed); duration = baseDuration / num; float num2 = (num - 1f) * dumbFuckingSpeedScalingNumberCoefficientValue + 1f; verticalSpeed = baseVerticalSpeed * num2; ((EntityState)this).characterBody.hideCrosshair = true; ((EntityState)this).characterBody.SetAimTimer(duration); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedCoefficient; flyVector = Vector3.up; Util.PlaySound("ExecutionerSpecialCast", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("FullBody, Override", "SpecialJump", "Special.playbackRate", duration, 0f); ((BaseState)this).StartAimMode(2f, false); GameObject val = (exeController.inMasterySkin ? indicatorPrefabMastery : indicatorPrefab); if (Object.op_Implicit((Object)(object)val)) { indicatorInstance = Object.Instantiate(val); indicatorInstance.transform.localScale = Vector3.one * ExecuteSlam.slamRadius; indicatorInstance.GetComponent().teamIndex = ((EntityState)this).teamComponent.teamIndex; UpdateIndicator(); } if (((EntityState)this).isAuthority) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); if (exeController.inMasterySkin) { EffectManager.SimpleMuzzleFlash(jumpEffectMastery, ((EntityState)this).gameObject, ExhaustL, true); EffectManager.SimpleMuzzleFlash(jumpEffectMastery, ((EntityState)this).gameObject, ExhaustR, true); } else { EffectManager.SimpleMuzzleFlash(jumpEffect, ((EntityState)this).gameObject, ExhaustL, true); EffectManager.SimpleMuzzleFlash(jumpEffect, ((EntityState)this).gameObject, ExhaustR, true); } CameraParamsOverrideRequest val2 = new CameraParamsOverrideRequest { cameraParamsData = slamCameraParams, priority = 1f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, cameraLerpDuration); EntityStateMachine val3 = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "JumpPack"); if (Object.op_Implicit((Object)(object)val3)) { val3.SetNextStateToMain(); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { FixedUpdateAuthority(); } } public override void Update() { ((EntityState)this).Update(); UpdateIndicator(); } private void UpdateIndicator() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_003a: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)indicatorInstance)) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 down = Vector3.down; down = Vector3.RotateTowards(down, ((Ray)(ref aimRay)).direction, maxAngle * (MathF.PI / 180f), 0f); ((Ray)(ref aimRay)).direction = down; RaycastHit val = default(RaycastHit); if (Util.CharacterSpherecast(((EntityState)this).gameObject, aimRay, rayRadius, ref val, 1000f, CommonMasks.bullet, (QueryTriggerInteraction)1)) { indicatorInstance.transform.position = ((RaycastHit)(ref val)).point; indicatorInstance.transform.up = ((RaycastHit)(ref val)).normal; } else { indicatorInstance.transform.position = ((Ray)(ref aimRay)).GetPoint(1000f); indicatorInstance.transform.up = Vector3.up; } Vector3 val2 = indicatorInstance.transform.position - ((Ray)(ref aimRay)).origin; Vector3 direction = Vector3.RotateTowards(Vector3.down, ((Vector3)(ref val2)).normalized, maxAngleTuah * (MathF.PI / 180f), 0f); ((Ray)(ref aimRay)).direction = direction; RaycastHit val3 = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, aimRay, ref val3, 1000f, CommonMasks.bullet, (QueryTriggerInteraction)1)) { indicatorInstance.transform.position = ((RaycastHit)(ref val3)).point; indicatorInstance.transform.up = ((RaycastHit)(ref val3)).normal; } else { indicatorInstance.transform.position = ((Ray)(ref aimRay)).GetPoint(1000f); indicatorInstance.transform.up = Vector3.up; } } } private void FixedUpdateAuthority() { //IL_0020: 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_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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).fixedAge >= duration) { controlledExit = true; Vector3 val = indicatorInstance.transform.position - ((EntityState)this).characterBody.footPosition; Vector3 val2 = ((Vector3)(ref val)).normalized; val2 = Vector3.RotateTowards(Vector3.down, val2, maxAngleTuah * (MathF.PI / 180f), 0f); EntityState nextState = InstantiateNextState(((Vector3)(ref val2)).normalized); ((EntityState)this).outer.SetNextState(nextState); } else { HandleMovement(); } } public virtual EntityState InstantiateNextState(Vector3 dashVector) { //IL_0006: 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) return (EntityState)(object)new ExecuteSlam { dashVector = dashVector }; } public void HandleMovement() { //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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).characterMotor.isGrounded) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } float num = verticalSpeed * speedCoefficientCurve.Evaluate(((EntityState)this).fixedAge / duration); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += flyVector * num * Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity.y = 0f; ((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector; ((EntityState)this).characterDirection.forward = ((EntityState)this).inputBank.aimDirection; ((EntityState)this).characterDirection.targetVector = ((EntityState)this).inputBank.aimDirection; ((EntityState)this).characterDirection.moveVector = Vector3.zero; } public override void OnExit() { //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)indicatorInstance)) { EntityState.Destroy((Object)(object)indicatorInstance); } if (!(((EntityState)this).outer.nextState is ExecuteSlam)) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); } ((EntityState)this).characterBody.hideCrosshair = false; ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; if ((Object)(object)exeController != (Object)null && !controlledExit) { exeController.meshExeAxe.SetActive(false); } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.1f); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class ExecuteLeapScepter : ExecuteLeap { public override EntityState InstantiateNextState(Vector3 dashVector) { //IL_0006: 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) return (EntityState)(object)new ExecuteSlamScepter { dashVector = dashVector }; } } public class ExecuteSlam : BaseSkillState { private class TeleportHandler : MonoBehaviour, ITeleportHandler, IEventSystemHandler { public ExecuteSlam state; public void OnTeleport(Vector3 oldPosition, Vector3 newPosition) { state.DoImpactAuthority(); Object.Destroy((Object)(object)this); } } public static float baseDamageCoefficient; public static float slamRadius; public static float procCoefficient; public static float recoil; private static float maxDuration = 10f; private static float acceleration = 1f; private static float walkSpeedCoefficient = 1.5f; public static float verticlalSpeed = 100f; public static AnimationCurve verticlalCurve; private static float durationForMaxSpeed = 0.5f; public static GameObject slamEffect; public static GameObject slamEffectMastery; public static GameObject impactEffectPrefab; public static GameObject impactEffectPrefabMastery; public static GameObject soloImpactEffectPrefab; public static GameObject soloImpactEffectPrefabMastery; public static GameObject cameraEffectPrefab; public static float duration = 1f; public Vector3 dashVector = Vector3.zero; private bool hasImpacted; private ExecutionerController exeController; private CameraParamsOverrideHandle camOverrideHandle; private static float cameraLerpDuration = 0.3f; private CharacterCameraParamsData slamCameraParams = new CharacterCameraParamsData { pivotVerticalOffset = BlendableFloat.op_Implicit(1.37f), idealLocalCameraPos = BlendableVector3.op_Implicit(slamCameraPosition) }; private static Vector3 slamCameraPosition = new Vector3(0f, 0f, -9f); private Transform collisionTransform; private static bool FUCK = true; public override void OnEnter() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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) ((BaseState)this).OnEnter(); exeController = ((EntityState)this).GetComponent(); if ((Object)(object)exeController != (Object)null) { exeController.meshExeAxe.SetActive(true); } ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedCoefficient; ((EntityState)this).characterBody.hideCrosshair = true; ((EntityState)this).PlayAnimation("FullBody, Override", "SpecialSwing", "Special.playbackRate", duration * 0.8f, 0f); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).characterBody.SetAimTimer(duration); if (((EntityState)this).isAuthority) { ((EntityState)this).gameObject.AddComponent().state = this; ((EntityState)this).characterMotor.onHitGroundAuthority += new HitGroundDelegate(OnGroundHit); ((EntityState)this).characterMotor.onMovementHit += new MovementHitDelegate(OnMovementHit); collisionTransform = ((BaseState)this).FindModelChild("SlamCollision"); CameraParamsOverrideRequest val = new CameraParamsOverrideRequest { cameraParamsData = slamCameraParams, priority = 1f }; camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val, cameraLerpDuration); } } private void OnGroundHit(ref HitGroundInfo hitGroundInfo) { DoImpactAuthority(); } private void OnMovementHit(ref MovementHitInfo movementHitInfo) { if (((EntityState)this).isAuthority) { DoImpactAuthority(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { FixedUpdateAuthority(); } } private void FixedUpdateAuthority() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterDirection.forward = dashVector; HandleMovement(); bool flag = ((EntityState)this).fixedAge > maxDuration || ((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.IsStableOnGround; Collider[] array = Physics.OverlapBox(collisionTransform.position, collisionTransform.lossyScale * 0.5f, collisionTransform.rotation, LayerMask.op_Implicit(CommonMasks.bullet), (QueryTriggerInteraction)0); for (int i = 0; i < array.Length; i++) { if (Object.op_Implicit((Object)(object)array[i])) { HurtBox component = ((Component)array[i]).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { flag = true; break; } if ((Object)(object)((Component)component.healthComponent).gameObject != (Object)(object)((EntityState)this).gameObject) { flag = true; break; } } } if (flag) { DoImpactAuthority(); } } public void HandleMovement() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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) float num = Mathf.Clamp01(((EntityState)this).fixedAge / durationForMaxSpeed); float num2 = verticlalCurve.Evaluate(num) * verticlalSpeed; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashVector * num2 * Time.fixedDeltaTime; ((EntityState)this).characterMotor.moveDirection = (FUCK ? Vector3.zero : ((EntityState)this).inputBank.moveVector); ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterDirection.targetVector = dashVector; ((EntityState)this).characterDirection.moveVector = Vector3.zero; ((EntityState)this).characterDirection.forward = dashVector; } private void DoImpactAuthority() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_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_005b: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_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_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0176: 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_0187: 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_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_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: 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_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) if (hasImpacted) { return; } hasImpacted = true; SphereSearch val = new SphereSearch(); List list = new List(); List list2 = new List(); Vector3 val2 = ((EntityState)this).characterBody.footPosition; float num = baseDamageCoefficient; float num2 = 1f; bool flag = false; val.ClearCandidates(); val.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; val.origin = val2; val.radius = slamRadius; val.RefreshCandidates(); val.FilterCandidatesByDistinctHurtBoxEntities(); val.FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)); val.GetHurtBoxes(list); list2.Clear(); foreach (HurtBox item in list) { HealthComponent healthComponent = item.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent) && !list2.Contains(healthComponent)) { list2.Add(healthComponent); } } if (list2.Count == 1) { num *= 2f; num2 = 2f; flag = true; OnHitSingleTargetAuthority(); } GameObject val3 = impactEffectPrefab; val3 = ((!exeController.inMasterySkin) ? (flag ? soloImpactEffectPrefab : impactEffectPrefab) : (flag ? soloImpactEffectPrefabMastery : impactEffectPrefabMastery)); bool crit = ((BaseState)this).RollCrit(); DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)0); damageType.damageSource = (DamageSource)8; Result val4 = new BlastAttack { radius = slamRadius, procCoefficient = procCoefficient * num2, position = val2, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = crit, baseDamage = ((EntityState)this).characterBody.damage * num, damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, impactEffect = EffectCatalog.FindEffectIndexFromPrefab(val3), damageType = damageType }.Fire(); Vector3 targetPosition = ((val4.hitCount > 0) ? val4.hitPoints[0].hitPosition : val2); ((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil); if (Object.op_Implicit((Object)(object)slamEffect)) { Transform val5 = ((BaseState)this).FindModelChild("AxeSlam"); if (Object.op_Implicit((Object)(object)val5)) { val2 = val5.position; } if (exeController.inMasterySkin) { EffectManager.SimpleEffect(slamEffectMastery, val2, Quaternion.identity, true); } else { EffectManager.SimpleEffect(slamEffect, val2, Quaternion.identity, true); } } ((EntityState)this).outer.SetNextState((EntityState)(object)new ExecuteImpact { soloTarget = flag, targetPosition = targetPosition, dashVector = dashVector, hitAnyEnemies = (val4.hitCount > 0) }); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } } public virtual void OnHitSingleTargetAuthority() { Object.Instantiate(cameraEffectPrefab, ((EntityState)this).characterBody.transform).GetComponent().targetCharacter = ((EntityState)this).gameObject; } public override void OnExit() { //IL_0029: 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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown ((EntityState)this).OnExit(); ((EntityState)this).characterBody.hideCrosshair = false; ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags - 1); if (!(((EntityState)this).outer.nextState is ExecuteImpact)) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 1.2f); } if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.onHitGroundAuthority -= new HitGroundDelegate(OnGroundHit); ((EntityState)this).characterMotor.onMovementHit -= new MovementHitDelegate(OnMovementHit); TeleportHandler teleportHandler = default(TeleportHandler); if (((EntityState)this).gameObject.TryGetComponent(ref teleportHandler)) { EntityState.Destroy((Object)(object)teleportHandler); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class ExecuteSlamScepter : ExecuteSlam { private static float cooldownRefreshFraction = 0.35f; public override void OnHitSingleTargetAuthority() { base.OnHitSingleTargetAuthority(); GenericSkill special = ((EntityState)this).skillLocator.special; if (special != null) { special.RunRecharge(((EntityState)this).skillLocator.special.CalculateFinalRechargeInterval() * cooldownRefreshFraction); } } } public class ExecuteImpact : BaseCharacterMain { private static int chargesToGrant = 3; public bool soloTarget; public bool hitAnyEnemies; public Vector3 targetPosition; public Vector3 dashVector; private static float baseHitPauseDuration = 2f; private static float hitPauseDurationSolo = 0.45f; private static float duration = 0.5f; private static float axeFadeOutDuratoin = 0.9f; private static float ionOrbSpeed = 30f; private float hitPauseDuration; private ExecutionerController exeController; private Vector3 direction; public override void OnSerialize(NetworkWriter writer) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) writer.Write(soloTarget); writer.Write(targetPosition); } public override void OnDeserialize(NetworkReader reader) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) soloTarget = reader.ReadBoolean(); targetPosition = reader.ReadVector3(); } public override void OnEnter() { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(1f); ((EntityState)this).PlayAnimation("FullBody, Override", "SpecialImpact"); hitPauseDuration = (soloTarget ? hitPauseDurationSolo : baseHitPauseDuration); exeController = ((EntityState)this).GetComponent(); exeController.AxeFadeOut(axeFadeOutDuratoin); if (NetworkServer.active && soloTarget) { for (int i = 0; i < chargesToGrant; i++) { ExecutionerIonOrb executionerIonOrb = new ExecutionerIonOrb(); executionerIonOrb.speed = ionOrbSpeed; ((Orb)executionerIonOrb).origin = targetPosition; ((Orb)executionerIonOrb).target = ((EntityState)this).characterBody.mainHurtBox; OrbManager.instance.AddOrb((Orb)(object)executionerIonOrb); } } if (!hitAnyEnemies) { direction = ((EntityState)this).characterDirection.forward; } else if (soloTarget) { direction = targetPosition - ((EntityState)this).transform.position; } else { direction = dashVector; } } public override void FixedUpdate() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).FixedUpdate(); if (((EntityState)this).fixedAge >= hitPauseDuration) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector; } } else if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.targetVector = direction; ((EntityState)this).characterDirection.moveVector = Vector3.zero; ((EntityState)this).characterDirection.forward = direction; } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((BaseCharacterMain)this).OnExit(); ExecutionerController executionerController = default(ExecutionerController); if (((EntityState)this).gameObject.TryGetComponent(ref executionerController)) { executionerController.meshExeAxe.SetActive(false); } } } public class FireChargeGun : BaseSkillState { [FormatToken(/*Could not decode attribute arguments.*/)] private static float damageCoefficient = 3.5f; private static float damageBurstCoefficient = 0.5f; private static float procCoefficient = 1f; private static float baseDuration = 0.115f; private static float extraDurationOnLastShot = 0.42f; private static float recoil = 0.6f; private static bool useAimAssist = true; private static float aimSnapAngle = 15f; private static float aimSnapAnglePerShot = 1f; private static float aimSnapRange = 70f; private static float range = 200f; private static float force = 200f; private static float spreadBloomValue = 0.4f; private static float selfKnockbackForce = 250f; private static string muzzleString = "Muzzle"; public static GameObject ionEffectPrefab; public static GameObject muzzlePrefabMastery; public static GameObject tracerPrefabMastery; public static GameObject hitPrefabMastery; private string skinNameToken; public bool fullBurst; public bool firstShot = true; public static GameObject muzzlePrefab; public static GameObject tracerPrefab; public static GameObject hitPrefab; public int shotsToFire; public int shotsFired; private float duration; private float extraDuration; private ShackledLamp.LampBehavior lamp; public override void OnEnter() { ((BaseState)this).OnEnter(); if (firstShot) { shotsToFire = ((EntityState)this).skillLocator.secondary.stock; } if (((EntityState)this).skillLocator.secondary.stock != 0 && shotsToFire != shotsFired) { ((EntityState)this).skillLocator.secondary.DeductStock(1); ((EntityState)this).characterBody.OnSkillActivated(((EntityState)this).skillLocator.secondary); duration = baseDuration / ((BaseState)this).attackSpeedStat; extraDuration = extraDurationOnLastShot / ((BaseState)this).attackSpeedStat; if (!fullBurst) { _ = ((EntityState)this).skillLocator.secondary.stock; _ = 10; } skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; lamp = ((EntityState)this).GetComponent(); ((EntityState)this).PlayAnimation("Gesture, Override", "FireIonGun"); if (skinNameToken == "SS2_SKIN_EXECUTIONER2_MASTERY") { EffectManager.SimpleMuzzleFlash(muzzlePrefabMastery, ((EntityState)this).gameObject, muzzleString, false); } else { EffectManager.SimpleMuzzleFlash(muzzlePrefab, ((EntityState)this).gameObject, muzzleString, false); } Shoot(); shotsFired++; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!(((EntityState)this).fixedAge >= duration) || !((EntityState)this).isAuthority) { return; } if (((EntityState)this).skillLocator.secondary.stock > 0 && shotsToFire > shotsFired) { FireChargeGun fireChargeGun = new FireChargeGun(); fireChargeGun.shotsFired = shotsFired; ((BaseSkillState)fireChargeGun).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; if (fullBurst) { fireChargeGun.fullBurst = true; } fireChargeGun.firstShot = false; fireChargeGun.shotsToFire = shotsToFire; ((EntityState)this).outer.SetNextState((EntityState)(object)fireChargeGun); } else if (((EntityState)this).fixedAge >= duration + extraDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Shoot() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: 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_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_023b: 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_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: 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_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) bool isCrit = ((BaseState)this).RollCrit(); Util.PlayAttackSpeedSound("ExecutionerSecondary", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (!((EntityState)this).isAuthority) { return; } ((EntityState)this).characterBody.SetAimTimer(2f); ((BaseState)this).AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil); ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue * 1f); Ray aimRay = ((BaseState)this).GetAimRay(); ((EntityState)this).characterMotor.ApplyForce((0f - selfKnockbackForce) * ((Ray)(ref aimRay)).direction, false, false); Vector3 aimVector = ((Ray)(ref aimRay)).direction; if (Object.op_Implicit((Object)(object)lamp)) { lamp.IncrementFire(); } if (useAimAssist) { bool flag = true; RaycastHit val = default(RaycastHit); if (Util.CharacterSpherecast(((EntityState)this).gameObject, aimRay, 1f, ref val, range, ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, (QueryTriggerInteraction)1)) { flag = false; } if (flag) { float maxAngleFilter = aimSnapAngle + aimSnapAnglePerShot * (float)shotsFired; BullseyeSearch val2 = new BullseyeSearch { teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()), filterByLoS = true, maxDistanceFilter = aimSnapRange, minAngleFilter = 0f, maxAngleFilter = maxAngleFilter, sortMode = (SortMode)2, filterByDistinctEntity = true, searchOrigin = ((Ray)(ref aimRay)).origin, searchDirection = ((Ray)(ref aimRay)).direction }; val2.RefreshCandidates(); foreach (HurtBox result in val2.GetResults()) { if (Object.op_Implicit((Object)(object)result) && Object.op_Implicit((Object)(object)result.healthComponent) && result.healthComponent.alive) { aimVector = ((Component)result).transform.position - ((Ray)(ref aimRay)).origin; break; } } } } DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)0); damageType.damageSource = (DamageSource)2; bool flag2 = skinNameToken.Equals("SS2_SKIN_EXECUTIONER2_MASTERY"); new BulletAttack { aimVector = aimVector, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageType = damageType, damageColorIndex = (DamageColorIndex)0, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, falloffModel = (FalloffModel)0, maxDistance = range, force = force, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procCoefficient = procCoefficient, radius = 1f, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = (flag2 ? tracerPrefabMastery : tracerPrefab), hitEffectPrefab = (flag2 ? hitPrefabMastery : hitPrefab), spreadPitchScale = 0.2f, spreadYawScale = 0.2f }.Fire(); } public override InterruptPriority GetMinimumInterruptPriority() { if (((EntityState)this).fixedAge > duration) { return (InterruptPriority)2; } return (InterruptPriority)7; } } public class FireTaser : BaseSkillState { public static float damageCoefficient; public static float procCoefficient = 0.65f; public static float baseDuration = 0.4f; public static float recoil = 0f; public static float spreadBloom = 0.75f; public static float force = 200f; public static GameObject muzzleEffectPrefab; public static GameObject muzzleEffectPrefabMastery; private float duration; private float fireDuration; private string muzzleString; private bool hasFired; private Animator animator; private BullseyeSearch search; private float minAngleFilter; private float maxAngleFilter = 45f; private float attackRange = 36f; private List previousTargets; private int attackFireCount = 1; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireDuration = 0.1f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "Muzzle"; hasFired = false; ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; ((EntityState)this).PlayAnimation("Gesture, Override", "FireTaser"); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { Shoot(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Shoot() { //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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_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_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: 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_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0381: 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_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0252: 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_0448: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) if (hasFired) { return; } hasFired = true; bool flag = ((BaseState)this).RollCrit(); string text = "ExecutionerPrimary"; if (flag) { text += "Crit"; } Vector3 position = ((EntityState)this).transform.position; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("Muzzle"); if (Object.op_Implicit((Object)(object)val)) { position = val.position; position.y -= 0.85f; } } } GameObject val2 = ((Object.op_Implicit((Object)(object)((EntityState)this).GetComponent()) && ((EntityState)this).GetComponent().inMasterySkin) ? muzzleEffectPrefabMastery : muzzleEffectPrefab); if (Object.op_Implicit((Object)(object)val2)) { EffectManager.SimpleMuzzleFlash(val2, ((EntityState)this).gameObject, muzzleString, false); } if (NetworkServer.active) { float damageValue = damageCoefficient * ((BaseState)this).damageStat; Ray aimRay = ((BaseState)this).GetAimRay(); search = new BullseyeSearch(); search.searchOrigin = ((EntityState)this).transform.position; search.searchDirection = ((Ray)(ref aimRay)).direction; search.sortMode = (SortMode)1; search.teamMaskFilter = TeamMask.all; ((TeamMask)(ref search.teamMaskFilter)).RemoveTeam(((BaseState)this).GetTeam()); search.filterByLoS = false; search.minAngleFilter = minAngleFilter; search.maxAngleFilter = maxAngleFilter; search.maxDistanceFilter = attackRange; search.RefreshCandidates(); HurtBox val3 = search.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val3)) { Util.PlaySound(text, ((EntityState)this).gameObject); DamageTypeCombo val4 = DamageTypeCombo.op_Implicit((DamageType)0); val4.damageSource = (DamageSource)1; ExecutionerTaserOrb executionerTaserOrb = new ExecutionerTaserOrb(); executionerTaserOrb.bouncedObjects = new List(); executionerTaserOrb.attacker = ((EntityState)this).gameObject; executionerTaserOrb.inflictor = ((EntityState)this).gameObject; executionerTaserOrb.teamIndex = ((BaseState)this).GetTeam(); executionerTaserOrb.damageValue = damageValue; executionerTaserOrb.isCrit = flag; ((Orb)executionerTaserOrb).origin = position; executionerTaserOrb.bouncesRemaining = 4; executionerTaserOrb.procCoefficient = procCoefficient; ((Orb)executionerTaserOrb).target = val3; executionerTaserOrb.damageColorIndex = (DamageColorIndex)0; executionerTaserOrb.damageType = DamageTypeCombo.op_Implicit(val4); executionerTaserOrb.skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; OrbManager.instance.AddOrb((Orb)(object)executionerTaserOrb); } else { Ray aimRay2 = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay2)).direction; direction.y -= Random.Range(-0.125f, -0.05f); Vector3 val5 = Vector3.Cross(Vector3.up, direction); float num = Random.Range(0f, 5f); float num2 = Random.Range(0f, 360f); Vector3 val6 = Quaternion.Euler(0f, 0f, num2) * (Quaternion.Euler(num, 0f, 0f) * Vector3.forward); float y = val6.y; val6.y = 0f; float num3 = (Mathf.Atan2(val6.z, val6.x) * 57.29578f - 90f) * 5f; float num4 = Mathf.Atan2(y, ((Vector3)(ref val6)).magnitude) * 57.29578f; Vector3 val7 = Quaternion.AngleAxis(num3, Vector3.up) * (Quaternion.AngleAxis(num4, val5) * direction); Ray val8 = new Ray(((EntityState)this).gameObject.transform.position, val7); Vector3 point = ((Ray)(ref val8)).GetPoint(attackRange * 0.95f); RaycastHit[] array = Physics.RaycastAll(new Ray(((Ray)(ref aimRay2)).origin, direction), attackRange * 0.95f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)); if (array.Length != 0) { point = ((RaycastHit)(ref array[0])).point; } ExecutionerTaserOrb executionerTaserOrb2 = new ExecutionerTaserOrb(); executionerTaserOrb2.bouncedObjects = new List(); executionerTaserOrb2.attacker = ((EntityState)this).gameObject; executionerTaserOrb2.inflictor = ((EntityState)this).gameObject; executionerTaserOrb2.teamIndex = ((BaseState)this).GetTeam(); executionerTaserOrb2.damageValue = damageValue; executionerTaserOrb2.isCrit = flag; ((Orb)executionerTaserOrb2).origin = position; executionerTaserOrb2.bouncesRemaining = 4; executionerTaserOrb2.procCoefficient = procCoefficient; ((Orb)executionerTaserOrb2).target = null; executionerTaserOrb2.damageColorIndex = (DamageColorIndex)0; executionerTaserOrb2.damageType = DamageTypeCombo.op_Implicit(DamageTypeCombo.GenericPrimary); executionerTaserOrb2.targetPosition = point; executionerTaserOrb2.attackerAimVector = ((Ray)(ref aimRay2)).direction; executionerTaserOrb2.skinNameToken = ((Component)((EntityState)this).GetModelTransform()).GetComponentInChildren().skins[((EntityState)this).characterBody.skinIndex].nameToken; OrbManager.instance.AddOrb((Orb)(object)executionerTaserOrb2); } } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.Events { public class GenericNemesisEvent : EntityState { [SerializeField] [Tooltip("The minimum duration for this EventState")] public float minDuration = 30f; [SerializeField] [Tooltip("The maximum duration for this EventState")] public float maxDuration = 90f; [SerializeField] [Tooltip("The amount of time before the event officially starts")] public float warningDur = 10f; public static GameObject musicOverridePrefab; [SerializeField] public MusicTrackDef introTrack; [SerializeField] public MusicTrackDef mainTrack; [SerializeField] public MusicTrackDef outroTrack; public static GameObject encounterPrefab; [SerializeField] public NemesisSpawnCard spawnCard; public static float fadeDuration = 7f; private Xoroshiro128Plus rng; private MusicTrackOverride musicTrack; public GameObject chosenPlayer; public CharacterBody nemesisBossBody; private static int minimumLevel = 60; private bool hasSpawned; public bool HasWarned { get; protected set; } public static event Action onNemesisDefeatedGlobal; public override void OnEnter() { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnEnter(); rng = Run.instance.spawnRng; if (NetworkServer.active) { spawnCard = EventDirector.instance.availableNemesisSpawnCards.Evaluate(EventDirector.instance.rng.nextNormalizedFloat); FindSpawnTarget(); } if (Object.op_Implicit((Object)(object)musicOverridePrefab) && Object.op_Implicit((Object)(object)introTrack) && Object.op_Implicit((Object)(object)mainTrack)) { musicTrack = Object.Instantiate(musicOverridePrefab, ((Component)Stage.instance).transform).GetComponent(); musicTrack.track = introTrack; } EventTextRequest val = new EventTextRequest { eventToken = "SS2_EVENT_GENERICNEMESIS_START", eventColor = new Color(0.67f, 0.168f, 0.168f), textDuration = 7f }; GameplayEventTextController.instance.EnqueueNewTextRequest(val, false); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!HasWarned && ((EntityState)this).fixedAge >= warningDur) { StartEvent(); } } public void StartEvent() { if (Object.op_Implicit((Object)(object)musicOverridePrefab)) { musicTrack.track = mainTrack; } if (NetworkServer.active && !hasSpawned) { SpawnNemesisBoss(); hasSpawned = true; } } private void FindSpawnTarget() { ReadOnlyCollection instances = PlayerCharacterMasterController.instances; List list = new List(); foreach (PlayerCharacterMasterController item in instances) { if (item.master.hasBody) { list.Add(item); } } if (list.Count > 0) { PlayerCharacterMasterController val = rng.NextElementUniform(list); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.body)) { chosenPlayer = ((Component)val.body).gameObject; } } } public virtual void SpawnNemesisBoss() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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_0086: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)spawnCard)) { NemesisSpawnCard nemesisSpawnCard = Object.Instantiate(spawnCard); Transform val = null; MonsterSpawnDistance val2 = (MonsterSpawnDistance)2; if (Object.op_Implicit((Object)(object)chosenPlayer)) { val = chosenPlayer.GetComponent().coreTransform; } if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance)) { val = ((Component)TeleporterInteraction.instance).transform; val2 = (MonsterSpawnDistance)1; } if (!Object.op_Implicit((Object)(object)val)) { SS2Log.Error("Unable to spawn Nemesis Event. Returning.", 133, "SpawnNemesisBoss"); return; } DirectorPlacementRule val3 = new DirectorPlacementRule { spawnOnTarget = val, placementMode = (PlacementMode)3 }; DirectorCore.GetMonsterSpawnDistance(val2, ref val3.minDistance, ref val3.maxDistance); DirectorSpawnRequest val4 = new DirectorSpawnRequest((SpawnCard)(object)nemesisSpawnCard, val3, rng); val4.teamIndexOverride = (TeamIndex)2; val4.ignoreTeamMemberLimit = true; val4.onSpawnedServer = (Action)Delegate.Combine(val4.onSpawnedServer, new Action(OnBossSpawned)); DirectorCore.instance.TrySpawnObject(val4); Object.Destroy((Object)(object)nemesisSpawnCard); } } private void OnBossSpawned(SpawnResult spawnResult) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_019a: Unknown result type (might be due to invalid IL or missing references) CombatSquad component = Object.Instantiate(encounterPrefab).GetComponent(); CharacterMaster component2 = spawnResult.spawnedInstance.GetComponent(); nemesisBossBody = component2.GetBody(); component2.onBodyDeath.AddListener(new UnityAction(OnBodyDeath)); component2.onBodyStart += delegate(CharacterBody body) { FriendManager instance = FriendManager.instance; GameObject gameObject2 = ((Component)body).gameObject; GameObject visualEffect = spawnCard.visualEffect; instance.CallRpcSetupNemBoss(gameObject2, (visualEffect != null) ? ((Object)visualEffect).name : null); }; int stageClearCount = Run.instance.stageClearCount; component2.inventory.GiveItem(SS2Content.Items.MaxHealthPerMinute, stageClearCount); component2.inventory.GiveItem(Items.UseAmbientLevel, 1); int num = Mathf.FloorToInt(Run.instance.ambientLevel); if (num < minimumLevel) { component2.inventory.GiveItem(Items.LevelBonus, minimumLevel - num); } else if (Run.instance.ambientLevel >= (float)Run.ambientLevelCap) { int num2 = Mathf.FloorToInt(SS2Util.AmbientLevelUncapped()) - Run.instance.ambientLevelFloor; component2.inventory.GiveItem(Items.LevelBonus, num2); } GameObject gameObject = null; foreach (PlayerCharacterMasterController instance2 in PlayerCharacterMasterController.instances) { if (Object.op_Implicit((Object)(object)instance2) && Object.op_Implicit((Object)(object)instance2.master) && instance2.master.inventory.GetItemCount(SS2Content.Items.VoidRock) > 0) { gameObject = instance2.master.GetBodyObject(); break; } } BaseAI component3 = ((Component)component2).GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { component3.currentEnemy.gameObject = gameObject; } NetMessageExtensions.Send((INetMessage)(object)new FriendManager.SyncBaseStats(nemesisBossBody), (NetworkDestination)1); component.AddMember(component2); ((Component)component).GetComponent().defaultTeam = (TeamIndex)2; NetworkServer.Spawn(((Component)component).gameObject); } public virtual void OnBodyDeath() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) EventTextRequest val = new EventTextRequest { eventToken = "SS2_EVENT_GENERICNEMESIS_END", eventColor = new Color(0.67f, 0.168f, 0.168f), textDuration = 7f }; GameplayEventTextController.instance.EnqueueNewTextRequest(val, false); if (Object.op_Implicit((Object)(object)musicOverridePrefab)) { musicTrack.track = outroTrack; } base.outer.SetNextState((EntityState)(object)new IdleRestOfStage()); GenericNemesisEvent.onNemesisDefeatedGlobal?.Invoke(nemesisBossBody); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)musicTrack)) { EntityState.Destroy((Object)(object)((Component)musicTrack).gameObject); } } public override void OnSerialize(NetworkWriter writer) { ((EntityState)this).OnSerialize(writer); writer.Write(chosenPlayer); } public override void OnDeserialize(NetworkReader reader) { ((EntityState)this).OnDeserialize(reader); chosenPlayer = reader.ReadGameObject(); } } public class IdleRestOfStage : EntityState { } public class NemCommandoBossState : GenericNemesisEvent { } public class NemMercenaryBossState : GenericNemesisEvent { } public class Calm : GenericWeatherState { private static float chargeInterval = 30f; private static float chargeVariance = 0.5f; private static float chargeFromKill = 0.33f; private float charge; private float chargeStopwatch = 10f; private float chargeFromKills; private float chargeFromTime; private float totalMultiplier; private bool oldStorm; private float oldDuration; public float thing = 1f; public override void OnEnter() { if (!((ConfiguredVariable)(object)SS2.Events.EnableEvents).value) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); return; } base.OnEnter(); stormController.StartLerp(0f, 8f); totalMultiplier = StormController.chargeRng.RangeFloat(1f, 1f + chargeVariance); GlobalEventManager.onCharacterDeathGlobal += AddCharge; oldDuration = fuckingduration() * 60f * thing; oldStorm = !((ConfiguredVariable)(object)SS2.Storm.ReworkedStorm).value; } private void AddCharge(DamageReport damageReport) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) if (ShouldCharge()) { TeamMask enemyTeams = TeamMask.GetEnemyTeams((TeamIndex)1); if (((TeamMask)(ref enemyTeams)).HasTeam(damageReport.victimTeamIndex)) { float num = chargeFromKill; float num2 = chargeVariance * num; float num3 = StormController.mobChargeRng.RangeFloat(num - num2, num + num2) * totalMultiplier; chargeFromKills += num3; charge += num3; } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!NetworkServer.active) { return; } if (oldStorm) { if (((EntityState)this).fixedAge >= oldDuration && ShouldCharge()) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Storm { stormLevel = 3, lerpDuration = 10f }); } return; } chargeStopwatch -= Time.fixedDeltaTime; if (chargeStopwatch <= 0f && ShouldCharge()) { chargeStopwatch += chargeInterval; float num = CalculateCharge(chargeInterval); charge += num; stormController.AddCharge(num); } if (charge >= 100f) { stormController.OnStormLevelCompleted(); ((EntityState)this).outer.SetNextState((EntityState)(object)new Storm { stormLevel = 1, lerpDuration = 15f }); } } private float fuckingduration() { if (Run.instance.stageClearCount < 2) { return float.PositiveInfinity; } if (Random.Range(0f, 1f) > 0.6f) { return float.PositiveInfinity; } float num = Run.instance.stageClearCount + 1; float num2 = -13f * num / (num + 1f) + 13f; float num3 = chargeVariance * num2; return Mathf.Max(StormController.chargeRng.RangeFloat(num2 - num3, num2 + num3) * totalMultiplier, 1f); } private float CalculateCharge(float deltaTime) { float num = Run.instance.stageClearCount + 1; float num2 = -6f * num / (num + 1f) + 10f; float num3 = 100f / (num2 * 60f); float num4 = chargeVariance * num3; float num5 = StormController.chargeRng.RangeFloat(num3 - num4, num3 + num4) * deltaTime * totalMultiplier; chargeFromTime += num5; return num5; } private bool ShouldCharge() { return !Object.op_Implicit((Object)(object)TeleporterInteraction.instance) | (Object.op_Implicit((Object)(object)TeleporterInteraction.instance) && TeleporterInteraction.instance.isIdle); } public override void OnExit() { ((EntityState)this).OnExit(); GlobalEventManager.onCharacterDeathGlobal -= AddCharge; } } public abstract class GenericWeatherState : GameplayEventState { protected StormController stormController; public override void OnEnter() { ((GameplayEventState)this).OnEnter(); stormController = ((EntityState)this).GetComponent(); } } public class Storm : GenericWeatherState { private class OnBossKilled : MonoBehaviour, IOnKilledServerReceiver { public void OnKilledServer(DamageReport damageReport) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) UniquePickup val = StormController.dropTable.GeneratePickup(StormController.instance.treasureRng); if (val.pickupIndex != PickupIndex.none) { CreatePickupInfo val2 = default(CreatePickupInfo); ((CreatePickupInfo)(ref val2)).pickup = val; PickupDropletController.CreatePickupDroplet(val2, damageReport.victimBody.corePosition, Vector3.up * 20f); } } } private static float chargeInterval = 10f; private static float chargeVariance = 0.66f; private static float chargeFromKill = 0.5f; private static float effectLerpDuration = 5f; private static SerializableEntityStateType textState = new SerializableEntityStateType(typeof(StormController.EtherealFadeIn)); private static SerializableEntityStateType textState2 = new SerializableEntityStateType(typeof(StormController.EtherealBlinkIn)); private static Color textColor = Color.gray; private static int bossEliteLevel = 4; private static int eliteLevel = 3; private static float eliteChancePerExtraLevelCoefficient = 2f; private static float eliteChancePerSecond = 2.5f; private static float baseEliteChance = 10f; private float charge; private float chargeStopwatch = 10f; private bool isPermanent; private float eliteChance; private float eliteChanceStopwatch; private float eliteChanceTimer; private float maxEliteChanceInterval = 24f; private float minEliteChanceInterval = 4f; public float lerpDuration; public int stormLevel; public bool instantStorm; private bool oldStorm; private static float oldstormelitemutlifewafa = 0.67f; private float oldStormMinDuration = 120f; private float oldStormMaxDuration = 180f; private float oldStormDuration; private UnityAction modifyMonsters; private UnityAction modifyBoss; public override void OnEnter() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_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_0076: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); oldStorm = !ConfiguredVariable.op_Implicit((ConfiguredVariable)(object)SS2.Storm.ReworkedStorm); if (oldStorm) { oldStormDuration = Random.Range(oldStormMinDuration, oldStormMaxDuration); EventTextRequest val = new EventTextRequest { eventToken = GETDUMBASSTOKENDELETELATER() + "_START", eventColor = textColor, textDuration = 6f }; GameplayEventTextController.instance.EnqueueNewTextRequest(val, false); } else { EventTextRequest val2 = new EventTextRequest { eventToken = "ermmmm..... storm " + stormLevel, eventColor = textColor, textDuration = 6f }; GameplayEventTextController.instance.EnqueueNewTextRequest(val2, false); } stormController.StartLerp(stormLevel, lerpDuration); isPermanent = stormController.IsPermanent && stormLevel >= stormController.MaxStormLevel; if (NetworkServer.active) { CombatDirector val3 = TeleporterInteraction.instance?.bossDirector; if (Object.op_Implicit((Object)(object)val3) && stormLevel >= bossEliteLevel) { if (Object.op_Implicit((Object)(object)TeleporterUpgradeController.instance)) { TeleporterUpgradeController.instance.UpgradeStorm(upgrade: true); } ((UnityEvent)(object)val3.onSpawnedServer).AddListener(modifyBoss = ModifySpawnedBoss); } if (stormLevel < 1 && Object.op_Implicit((Object)(object)TeleporterUpgradeController.instance)) { TeleporterUpgradeController.instance.UpgradeStorm(upgrade: false); } foreach (CombatDirector instances in CombatDirector.instancesList) { if ((Object)(object)instances != (Object)(object)val3) { ((UnityEvent)(object)instances.onSpawnedServer).AddListener(modifyMonsters = ModifySpawnedMasters); } } CharacterBody.onBodyStartGlobal += BuffEnemy; foreach (TeamComponent item in TeamComponent.GetTeamMembers((TeamIndex)2).Concat(TeamComponent.GetTeamMembers((TeamIndex)3)).Concat(TeamComponent.GetTeamMembers((TeamIndex)4))) { BuffEnemy(item.body); } } TeleporterInteraction.onTeleporterChargedGlobal += OnTeleporterChargedGlobal; } private void OnTeleporterChargedGlobal(TeleporterInteraction _) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Calm()); } private void ModifySpawnedMasters(GameObject masterObject) { int num = stormLevel - eliteLevel; float num2 = eliteChance * (1f + (float)num * eliteChancePerExtraLevelCoefficient); if (oldStorm) { num2 *= oldstormelitemutlifewafa; } if (Util.CheckRoll(num2, 0f, (CharacterMaster)null)) { eliteChance /= 2f; CreateStormElite(masterObject); } } private void ModifySpawnedBoss(GameObject masterObject) { CreateStormElite(masterObject); GameObject bodyObject = masterObject.GetComponent().GetBodyObject(); if (Object.op_Implicit((Object)(object)bodyObject)) { bodyObject.AddComponent(); } } private void CreateStormElite(GameObject masterObject) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) CharacterMaster component = masterObject.GetComponent(); if (component.inventory.currentEquipmentIndex != SS2Content.Equipments.AffixEmpyrean.equipmentIndex) { component.inventory.GiveItemPermanent(SS2Content.Items.AffixStorm, 1); GameObject bodyObject = component.GetBodyObject(); if (Object.op_Implicit((Object)(object)bodyObject)) { EntityStateMachine.FindByCustomName(bodyObject, "Body").initialStateType = new SerializableEntityStateType(typeof(EntityStates.AffixStorm.SpawnState)); } } } private void BuffEnemy(CharacterBody body) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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) if (!NetworkServer.active) { return; } TeamIndex teamIndex = body.teamComponent.teamIndex; int buffCount = body.GetBuffCount(SS2Content.Buffs.BuffStorm); TeamMask enemyTeams = TeamMask.GetEnemyTeams((TeamIndex)1); if (((TeamMask)(ref enemyTeams)).HasTeam(teamIndex) && !((Enum)body.bodyFlags).HasFlag((Enum)(object)(BodyFlags)4)) { int num = stormLevel - buffCount; for (int i = 0; i < num; i++) { body.AddBuff(SS2Content.Buffs.BuffStorm); } } } public override void FixedUpdate() { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: 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) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!NetworkServer.active) { return; } eliteChanceStopwatch -= Time.fixedDeltaTime; eliteChanceTimer += Time.fixedDeltaTime; if (eliteChanceStopwatch <= 0f) { eliteChanceStopwatch += Random.Range(minEliteChanceInterval, maxEliteChanceInterval); eliteChance += eliteChancePerSecond * eliteChanceTimer; if (eliteChance > 100f) { eliteChance = 100f; } eliteChanceTimer = 0f; } if (oldStorm) { if (!(((EntityState)this).fixedAge >= oldStormDuration)) { return; } EventTextRequest val = new EventTextRequest { eventToken = GETDUMBASSTOKENDELETELATER() + "_END", eventColor = textColor, textDuration = 6f }; GameplayEventTextController.instance.EnqueueNewTextRequest(val, false); ((EntityState)this).outer.SetNextState((EntityState)(object)new Calm { thing = 3f }); { foreach (TeamComponent item in TeamComponent.GetTeamMembers((TeamIndex)2).Concat(TeamComponent.GetTeamMembers((TeamIndex)3)).Concat(TeamComponent.GetTeamMembers((TeamIndex)4))) { int buffCount = item.body.GetBuffCount(SS2Content.Buffs.BuffStorm); for (int i = 0; i < buffCount; i++) { item.body.RemoveBuff(SS2Content.Buffs.BuffStorm); } } return; } } chargeStopwatch -= Time.fixedDeltaTime; if (chargeStopwatch <= 0f && ShouldCharge()) { chargeStopwatch = chargeInterval; float num = CalculateCharge(chargeInterval); charge += num; stormController.AddCharge(num); } if (isPermanent || !(charge >= 100f)) { return; } if (stormLevel == stormController.MaxStormLevel && !stormController.IsPermanent) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Calm()); if ((Object)(object)TeleporterUpgradeController.instance != (Object)null) { TeleporterUpgradeController.instance.UpgradeStorm(upgrade: false); } foreach (TeamComponent item2 in TeamComponent.GetTeamMembers((TeamIndex)2).Concat(TeamComponent.GetTeamMembers((TeamIndex)3)).Concat(TeamComponent.GetTeamMembers((TeamIndex)4))) { int buffCount2 = item2.body.GetBuffCount(SS2Content.Buffs.BuffStorm); for (int j = 0; j < buffCount2; j++) { item2.body.RemoveBuff(SS2Content.Buffs.BuffStorm); } } EventTextRequest val2 = new EventTextRequest { eventToken = "ermmmm..... bye storm", eventColor = textColor, textDuration = 6f }; GameplayEventTextController.instance.EnqueueNewTextRequest(val2, false); } else { stormController.OnStormLevelCompleted(); ((EntityState)this).outer.SetNextState((EntityState)(object)new Storm { stormLevel = stormLevel + 1, lerpDuration = 8f }); } } private string GETDUMBASSTOKENDELETELATER() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I8 //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Invalid comparison between Unknown and I8 //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Invalid comparison between Unknown and I8 //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Invalid comparison between Unknown and I8 //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Invalid comparison between Unknown and I8 //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Invalid comparison between Unknown and I8 Stage stageEnumFromSceneDef = DirectorAPI.GetStageEnumFromSceneDef(Stage.instance.sceneDef); if ((long)stageEnumFromSceneDef <= 32L) { if ((long)stageEnumFromSceneDef == 16) { return "SS2_EVENT_SANDSTORM"; } if ((long)stageEnumFromSceneDef == 32) { goto IL_003c; } } else { if ((long)stageEnumFromSceneDef == 64 || (long)stageEnumFromSceneDef == 128) { return "SS2_EVENT_ASHSTORM"; } if ((long)stageEnumFromSceneDef == 67108864) { goto IL_003c; } } return "SS2_EVENT_THUNDERSTORM"; IL_003c: return "SS2_EVENT_BLIZZARD"; } private bool ShouldCharge() { return !Object.op_Implicit((Object)(object)TeleporterInteraction.instance) | (Object.op_Implicit((Object)(object)TeleporterInteraction.instance) && TeleporterInteraction.instance.isIdle); } private float CalculateCharge(float deltaTime) { float num = 60f; float num2 = 100f / num; float num3 = chargeVariance * num2; return StormController.chargeRng.RangeFloat(num2 - num3, num2 + num3) * deltaTime; } public override void OnExit() { ((EntityState)this).OnExit(); CharacterBody.onBodyStartGlobal -= BuffEnemy; TeleporterInteraction.onTeleporterChargedGlobal += OnTeleporterChargedGlobal; if (!NetworkServer.active) { return; } CombatDirector val = TeleporterInteraction.instance?.bossDirector; if (Object.op_Implicit((Object)(object)val) && stormLevel >= 4) { ((UnityEvent)(object)val.onSpawnedServer).RemoveListener(modifyBoss); } if (!oldStorm && stormController.IsPermanent) { return; } foreach (CombatDirector instances in CombatDirector.instancesList) { if ((Object)(object)instances != (Object)(object)val) { ((UnityEvent)(object)instances.onSpawnedServer).RemoveListener(modifyMonsters); } } } public override void OnSerialize(NetworkWriter writer) { writer.Write(stormLevel); writer.Write(lerpDuration); } public override void OnDeserialize(NetworkReader reader) { stormLevel = reader.ReadInt32(); lerpDuration = reader.ReadSingle(); } } } namespace EntityStates.Engineer { public class QuantumTranslocator : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) MinionGroup val = MinionGroup.FindGroup(((NetworkBehaviour)((EntityState)this).characterBody.master).netId); if (val != null) { MinionOwnership[] members = val.members; foreach (MinionOwnership val2 in members) { if (!Object.op_Implicit((Object)(object)val2)) { continue; } CharacterMaster component = ((Component)val2).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Debug.Log((object)("CharacterMaster name is " + ((Object)component).name)); CharacterBody body = component.GetBody(); if (Object.op_Implicit((Object)(object)body)) { Debug.Log((object)("CharacterBody baseNameToken is " + body.baseNameToken)); } } } } else { Debug.Log((object)"YOU FAILED"); } ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.Engi { public class HopDisplacement : BaseSkillState { [SerializeField] public static float baseDuration = 0.5f; [SerializeField] public static float hopVelocity = 10f; [SerializeField] public static AnimationCurve jumpCurve; private float duration; private Transform modelTransform; public bool fromDash; private Transform muzzleLeft; private Transform muzzleRight; private List victimsStruck = new List(); private OverlapAttack attack; private GameObject vfxLeft; private GameObject vfxRight; public override void OnEnter() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_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_01dc: 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_01f2: 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_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Expected O, but got Unknown //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_0247: 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_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_027e: 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_0291: Expected O, but got Unknown //IL_019b: 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_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0183: 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) ((BaseState)this).OnEnter(); ((BaseState)this).GetAimRay(); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 0x20); ((EntityState)this).PlayAnimation("Body", "SprintEnter"); ((EntityState)this).characterBody.isSprinting = true; modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { muzzleLeft = component.FindChild("MuzzleLeft"); muzzleRight = component.FindChild("MuzzleRight"); } } duration = baseDuration; HitBoxGroup val = null; if (Object.op_Implicit((Object)(object)modelTransform)) { val = Array.Find(((Component)modelTransform).GetComponents(), (HitBoxGroup element) => element.groupName == "HitboxHop"); attack = new OverlapAttack(); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = 2f * ((BaseState)this).damageStat; attack.forceVector = ((EntityState)this).characterDirection.forward * -1600f; attack.pushAwayForce = 1000f; attack.hitBoxGroup = val; attack.isCrit = ((BaseState)this).RollCrit(); attack.damageType = DamageTypeCombo.op_Implicit((DamageType)32); } if (!fromDash) { Vector3 velocity = ((EntityState)this).characterMotor.velocity; velocity.y = ((EntityState)this).characterBody.jumpPower * 0.75f; ((EntityState)this).characterMotor.velocity = velocity; } EffectData val2 = new EffectData { origin = new Vector3(0.325f, 0.2f, -1.1f), rotation = modelTransform.rotation, scale = 0.375f, rootObject = ((Component)((EntityState)this).characterBody).gameObject, modelChildIndex = 2, genericFloat = -23f }; EffectManager.SpawnEffect(SS2.Survivors.Engineer.engiPrefabExplosion, val2, true); EffectData val3 = new EffectData { origin = new Vector3(-0.325f, 0.2f, -1.1f), rotation = modelTransform.rotation, scale = 0.375f, rootObject = ((Component)((EntityState)this).characterBody).gameObject, modelChildIndex = 2, genericFloat = -23f }; EffectManager.SpawnEffect(SS2.Survivors.Engineer.engiPrefabExplosion, val3, true); } public override void FixedUpdate() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { float num = jumpCurve.Evaluate(((EntityState)this).fixedAge / duration); Vector3 forward = ((EntityState)this).characterDirection.forward; forward.y = (fromDash ? 0.175f : 0.3f); forward /= 1.125f; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += (fromDash ? 2.5f : 3.25f) * num * (((BaseState)this).moveSpeedStat / 2f) * Time.fixedDeltaTime * forward; } if (((EntityState)this).fixedAge < duration / 4f) { attack.Fire((List)null); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); EngiHopToken engiHopToken = ((Component)((EntityState)this).characterBody).gameObject.AddComponent(); engiHopToken.body = ((EntityState)this).characterBody; engiHopToken.motor = ((EntityState)this).characterMotor; } private void HopIfAirborne() { if (!((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class EngiHopToken : MonoBehaviour { public CharacterBody body; public CharacterMotor motor; private float timer; private void FixedUpdate() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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) if (Object.op_Implicit((Object)(object)motor) && motor.isGrounded) { CharacterBody obj = body; obj.bodyFlags = (BodyFlags)(obj.bodyFlags & -33); Object.Destroy((Object)(object)this); } timer += Time.deltaTime; if (timer > 2f) { CharacterBody obj2 = body; obj2.bodyFlags = (BodyFlags)(obj2.bodyFlags & -33); Object.Destroy((Object)(object)this); } } } public class LaserFocus : BaseSkillState { [SerializeField] public static float damageCoeff = 0.75f; [SerializeField] public static float procCoeff = 0.3f; [SerializeField] public static float fireFrequency = 4f; [SerializeField] public static float maxDistance = 25f; [SerializeField] public static GameObject laserPrefab; [SerializeField] public static GameObject hitsparkPrefab; public float baseDuration = 1f; private float duration; private float fireTimer; private Transform modelTransform; private float counter; private GameObject leftLaserInstance; private Transform leftLaserInstanceEnd; private GameObject rightLaserInstance; private Transform rightLaserInstanceEnd; private Transform muzzleLeft; private Transform muzzleRight; public override void OnEnter() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((EntityState)this).PlayAnimation("Gesture, Additive", "ChargeGrenades"); Util.PlaySound("Play_engi_R_walkingTurret_laser_start", ((EntityState)this).gameObject); fireTimer = 0f; counter = 0f; modelTransform = ((EntityState)this).GetModelTransform(); if (!Object.op_Implicit((Object)(object)modelTransform)) { return; } ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { muzzleLeft = component.FindChild("MuzzleLeft"); if (Object.op_Implicit((Object)(object)muzzleLeft) && Object.op_Implicit((Object)(object)laserPrefab)) { leftLaserInstance = Object.Instantiate(laserPrefab, muzzleLeft.position, muzzleLeft.rotation); leftLaserInstance.transform.parent = ((EntityState)this).transform; leftLaserInstanceEnd = leftLaserInstance.GetComponent().FindChild("LaserEnd"); } muzzleRight = component.FindChild("MuzzleRight"); if (Object.op_Implicit((Object)(object)muzzleRight) && Object.op_Implicit((Object)(object)laserPrefab)) { rightLaserInstance = Object.Instantiate(laserPrefab, muzzleRight.position, muzzleRight.rotation); rightLaserInstance.transform.parent = ((EntityState)this).transform; rightLaserInstanceEnd = rightLaserInstance.GetComponent().FindChild("LaserEnd"); } } } public override void FixedUpdate() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_0111: 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_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); Util.PlaySound("Stop_engi_R_walkingTurret_laser_loop", ((EntityState)this).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); fireTimer += Time.fixedDeltaTime; float num = fireFrequency * ((EntityState)this).characterBody.attackSpeed; float num2 = 1f / num; if (fireTimer > num2) { counter += 1f; FireLasers(aimRay); fireTimer = 0f; } if (Object.op_Implicit((Object)(object)leftLaserInstance) && Object.op_Implicit((Object)(object)leftLaserInstanceEnd)) { leftLaserInstance.transform.position = muzzleLeft.position; leftLaserInstance.transform.rotation = muzzleLeft.rotation; leftLaserInstanceEnd.position = GetBeamEndPoint(aimRay); } if (Object.op_Implicit((Object)(object)rightLaserInstance) && Object.op_Implicit((Object)(object)rightLaserInstanceEnd)) { rightLaserInstance.transform.position = muzzleRight.position; rightLaserInstance.transform.rotation = muzzleRight.rotation; rightLaserInstanceEnd.position = GetBeamEndPoint(aimRay); } if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill1.down) { ((EntityState)this).outer.SetNextStateToMain(); } else if (counter >= 8f) { counter = 0f; } } protected Vector3 GetBeamEndPoint(Ray aimRay) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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) Vector3 point = ((Ray)(ref aimRay)).GetPoint(maxDistance); RaycastHit val = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, aimRay, ref val, maxDistance, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)0)) { point = ((RaycastHit)(ref val)).point; } return point; } private void FireLasers(Ray aimRay) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_0086: 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_00b0: 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_00c0: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Expected O, but got Unknown //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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_0138: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017d: 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_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: 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_01f1: 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_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) bool isCrit = ((BaseState)this).RollCrit(); if (((EntityState)this).isAuthority) { BulletAttack val = new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = muzzleLeft.position, aimVector = ((Ray)(ref aimRay)).direction, damageType = DamageTypeCombo.GenericPrimary, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, bulletCount = 1u, procCoefficient = procCoeff, damage = ((EntityState)this).characterBody.damage * damageCoeff / 2f, force = 0f, falloffModel = (FalloffModel)0, muzzleName = "MuzzleLeft", hitEffectPrefab = ((counter == 4f || counter == 8f) ? hitsparkPrefab : null), isCrit = isCrit, HitEffectNormal = false, smartCollision = true, maxDistance = maxDistance, radius = 0.6f }; BulletAttack val2 = new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = muzzleRight.position, aimVector = ((Ray)(ref aimRay)).direction, damageType = DamageTypeCombo.GenericPrimary, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, bulletCount = 1u, procCoefficient = procCoeff, damage = ((EntityState)this).characterBody.damage * damageCoeff / 2f, force = 0f, falloffModel = (FalloffModel)0, muzzleName = "MuzzleRight", hitEffectPrefab = ((counter == 4f || counter == 8f) ? hitsparkPrefab : null), isCrit = isCrit, HitEffectNormal = false, smartCollision = true, maxDistance = maxDistance, radius = 0.6f }; if (counter == 4f) { DamageAPI.AddModdedDamageType(val, SS2.Survivors.Engineer.EngiFocusDamageProc); DamageAPI.AddModdedDamageType(val2, SS2.Survivors.Engineer.EngiFocusDamage); ((EntityState)this).PlayCrossfade("Gesture Left Cannon, Additive", "FireGrenadeLeft", 0.1f); ((EntityState)this).PlayCrossfade("Gesture Right Cannon, Additive", "FireGrenadeRight", 0.1f); } else if (counter == 8f) { DamageAPI.AddModdedDamageType(val2, SS2.Survivors.Engineer.EngiFocusDamageProc); DamageAPI.AddModdedDamageType(val, SS2.Survivors.Engineer.EngiFocusDamage); ((EntityState)this).PlayCrossfade("Gesture Left Cannon, Additive", "FireGrenadeLeft", 0.1f); ((EntityState)this).PlayCrossfade("Gesture Right Cannon, Additive", "FireGrenadeRight", 0.1f); } else { DamageAPI.AddModdedDamageType(val, SS2.Survivors.Engineer.EngiFocusDamage); DamageAPI.AddModdedDamageType(val2, SS2.Survivors.Engineer.EngiFocusDamage); } val.Fire(); val2.Fire(); } } public override void OnExit() { ((EntityState)this).OnExit(); Util.PlaySound("Play_engi_R_walkingTurret_laser_end", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture, Additive", "Empty"); if (Object.op_Implicit((Object)(object)leftLaserInstance)) { EntityState.Destroy((Object)(object)leftLaserInstance); } if (Object.op_Implicit((Object)(object)rightLaserInstance)) { EntityState.Destroy((Object)(object)rightLaserInstance); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class RapidDisplacement : BaseSkillState { [SerializeField] public static float baseDuration = 1f; [SerializeField] public static float speedMultiplier = 2f; [SerializeField] public static float hitRadius = 5f; [SerializeField] public static float damageCoeff = 0.75f; [SerializeField] public static float procCoeff = 1f; [SerializeField] public static float maxDistance = 25f; private float duration; private Transform modelTransform; private Transform muzzleLeft; private Transform muzzleRight; private OverlapAttack attack; private List victimsStruck = new List(); private int count = 1; private bool fromDash; public override void OnEnter() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: 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_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_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0240: 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_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Expected O, but got Unknown ((BaseState)this).OnEnter(); Ray aimRay = ((BaseState)this).GetAimRay(); duration = baseDuration; ((EntityState)this).characterBody.isSprinting = true; Util.PlaySound("Play_engi_R_walkingTurret_laser_start", ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { muzzleLeft = component.FindChild("MuzzleLeft"); muzzleRight = component.FindChild("MuzzleRight"); } } duration = baseDuration; ((EntityState)this).characterDirection.turnSpeed = 300f; HopIfAirborne(); if (!((EntityState)this).characterMotor.isGrounded) { HopDisplacement nextState = new HopDisplacement { fromDash = false }; ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); fromDash = false; } else { ((BaseState)this).StartAimMode(aimRay, 1.5f, false); HitBoxGroup hitBoxGroup = null; if (Object.op_Implicit((Object)(object)modelTransform)) { ((Component)modelTransform).GetComponentsInChildren(); hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents(), (HitBoxGroup element) => element.groupName == "HitboxGround"); } attack = new OverlapAttack(); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = 2f * ((BaseState)this).damageStat; attack.forceVector = (((EntityState)this).characterDirection.forward + Vector3.up / 1.125f) * 1000f; attack.pushAwayForce = 500f; attack.hitBoxGroup = hitBoxGroup; attack.isCrit = ((BaseState)this).RollCrit(); attack.damageType = DamageTypeCombo.op_Implicit((DamageType)32); attack.damageColorIndex = (DamageColorIndex)0; attack.procChainMask = default(ProcChainMask); attack.procCoefficient = 1f; fromDash = true; EffectData val = new EffectData { origin = new Vector3(0f, 0f, -0.875f), rotation = modelTransform.rotation, scale = 1f, rootObject = ((Component)((EntityState)this).characterBody).gameObject, modelChildIndex = 2, genericFloat = -23f }; EffectManager.SpawnEffect(SS2.Survivors.Engineer.engiPrefabExplosion, val, true); } count = 1; } public override void FixedUpdate() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; if (((EntityState)this).characterMotor.isGrounded && fromDash) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += ((EntityState)this).characterDirection.forward * ((EntityState)this).characterBody.moveSpeed * speedMultiplier * Time.fixedDeltaTime; } if (attack != null) { attack.Fire(victimsStruck); if (((EntityState)this).fixedAge >= duration / 4f * (float)count) { attack.ignoredHealthComponentList = new List(); count++; } } } else if (fromDash) { HopDisplacement nextState = new HopDisplacement { fromDash = true }; ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); Util.PlaySound("Play_engi_R_walkingTurret_laser_end", ((EntityState)this).gameObject); ((EntityState)this).characterDirection.turnSpeed = 720f; } private void HopIfAirborne() { if (!((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 10f); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace EntityStates.DUT { public class ChargeDamage : BaseSkillState { public static float baseDuration = 0.8f; public static float chargeRadius = 13f; public static float chargeDmgCoefficient = 0.8f; public static float chargeProcCoef = 0.2f; public static float selfHarmCoef = 2.4f; public static float minDischargeDmg = 0.8f; public static float maxDischargeDmg = 135.75f; public static float minRadius = 0.2f; public static float maxRadius = 3f; public static float baseRecoil = 1f; public static string muzzleName = "Muzzle"; private float timer; private DUTController controller; public override void OnEnter() { ((BaseState)this).OnEnter(); controller = ((Component)((EntityState)this).characterBody).GetComponent(); if ((Object)(object)controller == (Object)null) { SS2Log.Error("Failed to find DU-T controller on body " + (object)((EntityState)this).characterBody, 41, "OnEnter"); ((EntityState)this).outer.SetNextStateToMain(); } Charge(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= baseDuration) { Discharge(); ((EntityState)this).outer.SetNextStateToMain(); return; } timer += Time.fixedDeltaTime; if (timer >= baseDuration) { timer = 0f; Charge(); } } public void Charge() { switch (controller.currentChargeType) { case DUTController.ChargeType.Damage: SiphonEnemies(); break; case DUTController.ChargeType.Healing: SiphonSelf(); break; } } public void SiphonEnemies() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) bool crit = ((BaseState)this).RollCrit(); BlastAttack val = new BlastAttack { radius = chargeRadius, procCoefficient = chargeProcCoef, position = ((EntityState)this).characterBody.corePosition, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = crit, baseDamage = ((EntityState)this).characterBody.damage * chargeDmgCoefficient, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, damageType = DamageTypeCombo.op_Implicit((DamageType)0) }; DamageAPI.AddModdedDamageType(val, SS2.Survivors.DUT.DUTDamageType); val.Fire(); } public void SiphonSelf() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).healthComponent)) { DamageInfo val = new DamageInfo(); val.damage = ((EntityState)this).characterBody.baseDamage * selfHarmCoef; 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); ((EntityState)this).healthComponent.TakeDamage(val); DUTGreenOrb dUTGreenOrb = new DUTGreenOrb(); ((Orb)dUTGreenOrb).origin = val.position; ((Orb)dUTGreenOrb).target = ((EntityState)this).characterBody.mainHurtBox; OrbManager.instance.AddOrb((Orb)(object)dUTGreenOrb); OrbManager.instance.AddOrb((Orb)(object)dUTGreenOrb); OrbManager.instance.AddOrb((Orb)(object)dUTGreenOrb); } } public void Discharge() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0140: 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_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0186: 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_0194: 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_01b3: Expected O, but got Unknown //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) float num = Util.Remap(controller.charge, 0f, controller.chargeMax, minDischargeDmg, maxDischargeDmg); float radius = Util.Remap(controller.charge, 0f, controller.chargeMax, minRadius, maxRadius); Ray aimRay = ((BaseState)this).GetAimRay(); SS2Log.Debug("discharging at " + controller.charge + " with a dmgcoef of " + num, 142, "Discharge"); float num2 = 1f; if (controller.charge >= controller.chargeMax * 0.5f) { num2 += 1f; } if (controller.charge >= controller.chargeMax) { num2 += 1f; } BulletAttack val = new BulletAttack { aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = num * ((BaseState)this).damageStat, damageType = DamageTypeCombo.op_Implicit((DamageType)0), damageColorIndex = (DamageColorIndex)0, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, falloffModel = (FalloffModel)1, force = 10f, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzleName, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = num2, radius = radius, weapon = ((EntityState)this).gameObject, tracerEffectPrefab = controller.tracerPrefab }; if (controller.charge >= controller.chargeMax / 3f) { val.stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask; } val.Fire(); ((BaseState)this).AddRecoil(-0.4f * baseRecoil, -0.8f * baseRecoil, -0.3f * baseRecoil, 0.3f * baseRecoil); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void OnExit() { ((EntityState)this).OnExit(); if ((Object)(object)controller != (Object)null) { SS2Log.Debug("DUT Charge: " + controller.charge, 193, "OnExit"); controller.ResetCharge(); } } } public class Drift : BaseSkillState { public static float dashDuration = 0.3f; public static float releaseDuration = 0.2f; public static float driftDuration = 2.5f; public static float initalSpeedCoefficient = 4.5f; public static float finalSpeedCoefficient = 1.5f; public static float turnSpeed = 360f; public static float upThing = 0.67f; public static float FOV = -1f; private float dashSpeed; private Vector3 forwardDirection; private Vector3 previousPosition; public override void OnEnter() { //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_0131: 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_005d: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(SS2Content.Buffs.bdDUTDrift); } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); forwardDirection = ((Vector3)(ref val)).normalized; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { float y = Mathf.Min(Mathf.Max(((EntityState)this).characterMotor.velocity.y, 0f), dashSpeed) * upThing; ((EntityState)this).characterMotor.velocity = forwardDirection * dashSpeed; ((EntityState)this).characterMotor.velocity.y = y; } ((EntityState)this).characterDirection.turnSpeed = turnSpeed; Vector3 val2 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val2; } private void RecalcDashSpeed() { dashSpeed = ((BaseState)this).moveSpeedStat * Mathf.Lerp(initalSpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / dashSpeed); } public override void FixedUpdate() { //IL_002d: 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_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge <= dashDuration) { RecalcDashSpeed(); if (((EntityState)this).isAuthority) { Vector3 val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && normalized != Vector3.zero) { Vector3 val2 = normalized * dashSpeed; float y = val2.y; val2.y = 0f; float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f); val2 = forwardDirection * num; val2.y += Mathf.Max(y, 0f); ((EntityState)this).characterMotor.velocity = val2; Vector3 val3 = (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) ? ((EntityState)this).characterDirection.forward : forwardDirection); Vector3 val4 = Vector3.Cross(Vector3.up, val3); Vector3.Dot(forwardDirection, val3); Vector3.Dot(forwardDirection, val4); } previousPosition = ((EntityState)this).transform.position; } } else if (!((EntityState)this).inputBank.skill3.down || ((EntityState)this).fixedAge > driftDuration) { ((EntityState)this).outer.SetNextStateToMain(); } ((EntityState)this).characterBody.isSprinting = true; } public override void OnExit() { ((EntityState)this).OnExit(); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(SS2Content.Buffs.bdDUTDrift); } ((EntityState)this).characterDirection.turnSpeed = 720f; } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class SwapChargeType : BaseSkillState { public static float baseDuration = 0.1f; private DUTController controller; public override void OnEnter() { ((BaseState)this).OnEnter(); controller = ((Component)((EntityState)this).characterBody).GetComponent(); if ((Object)(object)controller == (Object)null) { SS2Log.Error("Failed to find DU-T controller on body " + (object)((EntityState)this).characterBody, 20, "OnEnter"); } else { controller.SwapChargeType(); } Debug.Log((object)controller.currentChargeType); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= baseDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } } } namespace EntityStates.ShockDrone { public class ShockDroneFire : BaseSkillState { public static float duration = 1f; public static float damageCoefficient = 1f; public static float radius = 12f; public static string muzzleString = "Muzzle"; public static GameObject blastEffect; private ChildLocator childLocator; public override void OnEnter() { ((BaseState)this).OnEnter(); childLocator = ((EntityState)this).GetModelChildLocator(); } public override void OnExit() { ((EntityState)this).OnExit(); if (((EntityState)this).isAuthority) { FireShock(); } } public void FireShock() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) Vector3 position = childLocator.FindChild(muzzleString).position; bool crit = ((BaseState)this).RollCrit(); DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)16777216) | DamageTypeCombo.GenericPrimary | DamageTypeCombo.op_Implicit((DamageTypeExtended)8192); new BlastAttack { radius = radius, procCoefficient = 1f, position = position, attacker = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).teamComponent.teamIndex, crit = crit, baseDamage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)11, falloffModel = (FalloffModel)0, attackerFiltering = (AttackerFiltering)2, damageType = damageType }.Fire(); EffectManager.SimpleEffect(blastEffect, position, Quaternion.identity, true); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && duration >= ((EntityState)this).fixedAge) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } } namespace EntityStates.CloneDrone { public class CloneDroneCook : BaseSkillState { public static float baseDuration = 4f; public static string spawnMuzzle = "Muzzle"; public static string spawnMuzzle2 = "Muzzle2"; public static float dropUpVelocityStrength = -5f; public static float dropForwardVelocityStrength = 3f; public static GameObject targetIndicatorVfxPrefab; public GenericPickupController gpc; public GameObject target; private ChildLocator childLocator; private ItemTier pickupTier; private float duration = 4f; private CharacterModel charModel; private Material lightOn = SS2Assets.LoadAsset("matCloneDroneLight", SS2Bundle.Interactables); private Material lightOff = SS2Assets.LoadAsset("matCloneDroneNoLight", SS2Bundle.Interactables); private GameObject targetIndicatorVfxInstance; private GameObject sparksObj; private GameObject lightObj; private GameObject startObj; private GameObject glowMesh; private MeshRenderer glowMeshRenderer; private Material glowMeshMat; private float originalMoveSpeed; public override void OnEnter() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected I4, but got Unknown //IL_009e: 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_0540: Unknown result type (might be due to invalid IL or missing references) //IL_0545: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_022a: 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_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_01c2: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); childLocator = ((EntityState)this).GetModelChildLocator(); charModel = ((Component)childLocator).gameObject.GetComponent(); targetIndicatorVfxPrefab = SS2Assets.LoadAsset("DuplicatingCircleVFX", SS2Bundle.Interactables); gpc = target.GetComponent(); PickupIndex pickupIndex = gpc.pickupIndex; pickupTier = ((PickupIndex)(ref pickupIndex)).pickupDef.itemTier; originalMoveSpeed = ((EntityState)this).characterBody.moveSpeed; if (Object.op_Implicit((Object)(object)targetIndicatorVfxPrefab)) { targetIndicatorVfxInstance = Object.Instantiate(targetIndicatorVfxPrefab, ((Component)gpc).gameObject.transform.position, Quaternion.identity); ChildLocator component = targetIndicatorVfxInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("LineEnd"); if (Object.op_Implicit((Object)(object)val)) { val.position = ((BaseState)this).FindModelChild(spawnMuzzle).position; val.SetParent(((Component)((BaseState)this).FindModelChild(spawnMuzzle)).transform); } Transform val2 = component.FindChild("Sparks"); if (Object.op_Implicit((Object)(object)val2)) { if ((Object)(object)((Component)val2).GetComponent() != (Object)null) { ParticleSystem component2 = ((Component)val2).GetComponent(); pickupIndex = gpc.pickupIndex; component2.startColor = ((PickupIndex)(ref pickupIndex)).GetPickupColor(); } val2.position = ((BaseState)this).FindModelChild(spawnMuzzle2).position; val2.SetParent(((Component)((BaseState)this).FindModelChild(spawnMuzzle2)).transform); sparksObj = ((Component)val2).gameObject; } Transform val3 = component.FindChild("Light"); if (Object.op_Implicit((Object)(object)val3)) { if ((Object)(object)((Component)val3).GetComponent() != (Object)null) { Light component3 = ((Component)val3).GetComponent(); pickupIndex = gpc.pickupIndex; component3.color = ((PickupIndex)(ref pickupIndex)).GetPickupColor(); } val3.position = ((BaseState)this).FindModelChild(spawnMuzzle2).position; val3.SetParent(((Component)((BaseState)this).FindModelChild(spawnMuzzle2)).transform); lightObj = ((Component)val3).gameObject; } Transform val4 = component.FindChild("StartEffect"); if (Object.op_Implicit((Object)(object)val4)) { val4.position = ((BaseState)this).FindModelChild(spawnMuzzle).position; val4.SetParent(((Component)((BaseState)this).FindModelChild(spawnMuzzle)).transform); startObj = ((Component)val4).gameObject; } } } float num = 60f; duration = baseDuration; ItemTier val5 = pickupTier; switch ((int)val5) { case 0: if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightT1", SS2Bundle.Interactables); } break; case 1: duration *= 1.5f; num *= 1.5f; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightT2", SS2Bundle.Interactables); } break; case 2: duration *= 2f; num *= 2f; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightT3", SS2Bundle.Interactables); } break; case 4: duration *= 2f; num *= 2f; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightT4", SS2Bundle.Interactables); } break; case 6: if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightVoid", SS2Bundle.Interactables); } break; case 7: duration *= 1.5f; num *= 1.5f; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightVoid", SS2Bundle.Interactables); } break; case 8: duration *= 2f; num *= 2f; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightVoid", SS2Bundle.Interactables); } break; case 9: duration *= 2f; num *= 2f; if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightVoid", SS2Bundle.Interactables); } break; case 3: if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightLunar", SS2Bundle.Interactables); } break; default: if (Object.op_Implicit((Object)(object)charModel)) { pickupIndex = gpc.pickupIndex; if (((PickupIndex)(ref pickupIndex)).pickupDef.isLunar) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightLunar", SS2Bundle.Interactables); } else { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneLightEquip", SS2Bundle.Interactables); } } break; } ((EntityState)this).skillLocator.primary.stock = 0; GenericSkill primary = ((EntityState)this).skillLocator.primary; primary.rechargeStopwatch -= num; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed * 0.1f; if (!Object.op_Implicit((Object)(object)target)) { GenericSkill primary = ((EntityState)this).skillLocator.primary; primary.rechargeStopwatch *= 0.25f; ((EntityState)this).outer.SetNextStateToMain(); } else if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); if (NetworkServer.active) { CreateClone(); } } } public void CreateClone() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) CreatePickupInfo val = new CreatePickupInfo { prefabOverride = CloneDroneDamaged.clonedPickupPrefab }; ((CreatePickupInfo)(ref val)).pickupIndex = gpc.pickupIndex; val.position = ((EntityState)this).transform.position; CreatePickupInfo val2 = val; CloneDroneDamaged.ClonedPickup clonedPickup = ((Component)gpc).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)clonedPickup)) { clonedPickup = ((Component)gpc).gameObject.AddComponent(); } clonedPickup.OnCloned(((EntityState)this).gameObject); PickupDropletController.CreatePickupDroplet(val2, ((EntityState)this).transform.position, Vector3.up * dropUpVelocityStrength + ((EntityState)this).transform.forward * dropForwardVelocityStrength); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)targetIndicatorVfxInstance)) { EntityState.Destroy((Object)(object)targetIndicatorVfxInstance); targetIndicatorVfxInstance = null; } ((EntityState)this).characterBody.moveSpeed = originalMoveSpeed; ((EntityState)this).skillLocator.primary.DeductStock(1); if ((Object)(object)sparksObj != (Object)null) { EntityState.Destroy((Object)(object)sparksObj); } if ((Object)(object)lightObj != (Object)null) { EntityState.Destroy((Object)(object)lightObj); } if ((Object)(object)startObj != (Object)null) { EntityState.Destroy((Object)(object)startObj); } if (Object.op_Implicit((Object)(object)charModel)) { charModel.baseRendererInfos[2].defaultMaterial = SS2Assets.LoadAsset("matCloneDroneNoLight", SS2Bundle.Interactables); } } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(target); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); target = reader.ReadGameObject(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class CloneDroneSearch : BaseSkillState { public static float duration = 0.6f; public static float radius = 18f; public static string muzzleString = "Muzzle"; public static GameObject blastEffect; private ChildLocator childLocator; private SphereSearch sphereSearch; public GenericPickupController gpc; public ItemTier pickupTier; public override void OnEnter() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); childLocator = ((EntityState)this).GetModelChildLocator(); if (NetworkServer.active) { sphereSearch = new SphereSearch(); sphereSearch.origin = ((EntityState)this).transform.position; sphereSearch.mask = ((LayerIndex)(ref LayerIndex.pickups)).mask; sphereSearch.queryTriggerInteraction = (QueryTriggerInteraction)2; sphereSearch.radius = radius; Search(); } } public void Search() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_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_0114: 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_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) List list = CollectionPool>.RentCollection(); sphereSearch.mask = CommonMasks.interactable; sphereSearch.ClearCandidates(); sphereSearch.RefreshCandidates(); sphereSearch.FilterCandidatesByColliderEntities(); sphereSearch.OrderCandidatesByDistance(); sphereSearch.FilterCandidatesByDistinctColliderEntities(); sphereSearch.GetColliders(list); List list2 = new List(); foreach (Collider item in list) { GameObject gameObject = ((Component)((Component)item).transform.parent).gameObject; list2.Add(gameObject); } GameObject val = null; CloneDroneDamaged.ClonedPickup clonedPickup = default(CloneDroneDamaged.ClonedPickup); foreach (GameObject item2 in list2) { GenericPickupController component = item2.GetComponent(); if (!Object.op_Implicit((Object)(object)component) || component.Duplicated || (item2.TryGetComponent(ref clonedPickup) && !clonedPickup.CanBeCloned(((EntityState)this).gameObject))) { continue; } PickupIndex pickupIndex = component.pickupIndex; if (IsWhitelistTier(((PickupIndex)(ref pickupIndex)).pickupDef)) { float num = Vector3.Distance(((EntityState)this).transform.position, item2.transform.position); if ((Object)(object)val == (Object)null || num < Vector3.Distance(((EntityState)this).transform.position, val.transform.position)) { val = item2; } } } if ((Object)(object)val != (Object)null) { gpc = val.GetComponent(); Clone(); } else { ((EntityState)this).outer.SetNextStateToMain(); } } public bool IsWhitelistTier(PickupDef pickupDef) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Invalid comparison between Unknown and I4 //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Invalid comparison between Unknown and I4 //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Invalid comparison between Unknown and I4 //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Invalid comparison between Unknown and I4 //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Invalid comparison between Unknown and I4 if (pickupDef == null) { return false; } if ((int)pickupTier == 0 || (int)pickupTier == 1 || (int)pickupTier == 2 || (int)pickupTier == 4 || (int)pickupTier == 6 || (int)pickupTier == 7 || (int)pickupTier == 8 || (int)pickupTier == 9) { return true; } return false; } public override void OnExit() { ((EntityState)this).OnExit(); _ = (Object)(object)gpc != (Object)null; } public void Clone() { CloneDroneCook cloneDroneCook = new CloneDroneCook(); cloneDroneCook.target = ((Component)gpc).gameObject; ((EntityState)this).outer.SetNextState((EntityState)(object)cloneDroneCook); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } } namespace EntityStates.Cyborg2 { public class DetonateMagnetBall : BaseSkillState { public static float baseDuration = 0.33f; private float duration; private ProjectileRemoteDetonator.RemoteDetonatorOwnership projectileOwnership; public override void OnEnter() { ((BaseState)this).OnEnter(); projectileOwnership = ((EntityState)this).GetComponent(); if (!Object.op_Implicit((Object)(object)projectileOwnership)) { ((EntityState)this).outer.SetNextStateToMain(); return; } projectileOwnership.Detonate(); duration = baseDuration / ((BaseState)this).attackSpeedStat; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)projectileOwnership)) { projectileOwnership.Detonate(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)0; } } public class EnterLastPrism : BaseSkillState { public static float baseDuration = 1f; private float duration; private bool canceled = true; private static float startTime = 0.75f; public override void OnEnter() { ((BaseState)this).OnEnter(); ((BaseState)this).StartAimMode(2f, false); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture, Override", "FireLaser", "Primary.playbackRate", duration, 0f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration * startTime) { canceled = false; ((EntityState)this).outer.SetNextState((EntityState)(object)new LastPrism()); } } public override void OnExit() { ((EntityState)this).OnExit(); if (canceled) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class ExitLastPrism : BaseSkillState { public static float baseDuration = 0.33f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration; ((EntityState)this).PlayAnimation("Gesture, Override", "EndLaser"); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class FireBloonTrap : AimThrowableBase { public static GameObject projectilePrefab; public static string soundString = "Play_engi_M2_throw"; public static GameObject muzzleEffectPrefab; private static GameObject INDICATOR = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/BasicThrowableVisualizer.prefab").WaitForCompletion(); private static float maxDistanceee = 8f; private float antiGravityCoefficient = 1f; public override void OnEnter() { base.arcVisualizerPrefab = INDICATOR; base.endpointVisualizerPrefab = ArrowRain.areaIndicatorPrefab; base.rayRadius = 0.5f; base.useGravity = true; base.endpointVisualizerRadiusScale = 0.5f; base.maxDistance = maxDistanceee; base.projectilePrefab = projectilePrefab; base.damageCoefficient = 0f; base.baseMinimumDuration = 0.15f; ((AimThrowableBase)this).OnEnter(); ((BaseState)this).StartAimMode(2f, false); ((EntityState)this).PlayAnimation("Gesture, Override", "FireBox"); } public override void UpdateTrajectoryInfo(out TrajectoryInfo dest) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_018f: 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_00e6: 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_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_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_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) dest = default(TrajectoryInfo); Ray aimRay = ((BaseState)this).GetAimRay(); RaycastHit val = default(RaycastHit); bool flag = false; if (base.rayRadius > 0f && Util.CharacterSpherecast(((EntityState)this).gameObject, aimRay, base.rayRadius, ref val, base.maxDistance, CommonMasks.bullet, (QueryTriggerInteraction)0) && Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref val)).collider).GetComponent())) { flag = true; } if (!flag) { flag = Util.CharacterRaycast(((EntityState)this).gameObject, aimRay, ref val, base.maxDistance, CommonMasks.bullet, (QueryTriggerInteraction)0); } if (flag) { dest.hitPoint = ((RaycastHit)(ref val)).point; dest.hitNormal = ((RaycastHit)(ref val)).normal; } else { dest.hitPoint = ((Ray)(ref aimRay)).GetPoint(base.maxDistance); dest.hitNormal = -((Ray)(ref aimRay)).direction; } Vector3 val2 = dest.hitPoint - ((Ray)(ref aimRay)).origin; if (base.useGravity) { float projectileBaseSpeed = base.projectileBaseSpeed; Vector2 val3 = default(Vector2); ((Vector2)(ref val3))..ctor(val2.x, val2.z); float magnitude = ((Vector2)(ref val3)).magnitude; float num = Trajectory.CalculateInitialYSpeed(magnitude / projectileBaseSpeed, val2.y, antiGravityCoefficient * Physics.gravity.y); Vector3 val4 = default(Vector3); ((Vector3)(ref val4))..ctor(val3.x / magnitude * projectileBaseSpeed, num, val3.y / magnitude * projectileBaseSpeed); dest.speedOverride = ((Vector3)(ref val4)).magnitude; dest.finalRay = new Ray(((Ray)(ref aimRay)).origin, val4 / dest.speedOverride); dest.travelTime = Trajectory.CalculateGroundTravelTime(projectileBaseSpeed, magnitude); } else { dest.speedOverride = base.projectileBaseSpeed; dest.finalRay = aimRay; dest.travelTime = base.projectileBaseSpeed / ((Vector3)(ref val2)).magnitude; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FireBuffTeleporter : BaseSkillState { public static GameObject projectilePrefab; public static string soundString = "Play_captain_m2_tazer_shoot"; public static GameObject muzzleEffectPrefab; private static float bloom = 0.5f; private static float recoilAmplitude = 7f; private static float baseDuration = 0.5f; private static float earlyExitTime = 0.5f; private static float damageCoefficient = 6f; private static float force = -1400f; private static float chargeTime = 0.21f; private static float selfKnockbackForce = 5000f; private float duration; private bool hasFired; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); ((EntityState)this).PlayAnimation("Gesture, Override", "FireTeleporter", "Utility.playbackRate", duration, 0f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration * chargeTime && !hasFired) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) hasFired = true; Util.PlaySound(soundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, "CannonR", true); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); Ray aimRay = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.ApplyForce(((Ray)(ref aimRay)).direction * -1f * selfKnockbackForce, false, false); } FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = projectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, force = force, crit = ((BaseState)this).RollCrit() }; ProjectileManager.instance.FireProjectile(val); } } public override InterruptPriority GetMinimumInterruptPriority() { if (((EntityState)this).fixedAge >= duration * earlyExitTime) { return (InterruptPriority)0; } return (InterruptPriority)3; } } public class FireMagnetBall : BaseSkillState { public static GameObject projectilePrefab; public static string soundString = "Play_captain_m2_tazer_shoot"; public static GameObject muzzleEffectPrefab; public static float bloom = 0.5f; public static float recoilAmplitude = 7f; public static float baseDuration = 1.5f; public static float earlyExitTime = 0.5f; private static float damageCoefficient = 7f; public static float force = 500f; private static float chargeTime = 0.2f; private static float selfKnockbackForce = 6000f; private float duration; private bool hasFired; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); ((EntityState)this).PlayAnimation("Gesture, Override", "FireTeleporter", "Utility.playbackRate", duration, 0f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration * chargeTime && !hasFired) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012f: 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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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) hasFired = true; Util.PlaySound(soundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, "CannonR", true); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); Ray aimRay = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.ApplyForce(((Ray)(ref aimRay)).direction * -1f * selfKnockbackForce, false, false); } FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = projectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, force = force, crit = ((BaseState)this).RollCrit() }; DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)0); value.damageSource = (DamageSource)8; val.damageTypeOverride = value; ProjectileManager.instance.FireProjectile(val); } } public override InterruptPriority GetMinimumInterruptPriority() { if (((EntityState)this).fixedAge >= duration * earlyExitTime) { return (InterruptPriority)0; } return (InterruptPriority)3; } } public class FireShockMine : BaseSkillState { public static GameObject projectilePrefab; public static string soundString = "Play_captain_m2_tazer_shoot"; public static GameObject muzzleEffectPrefab; public static float bloom = 2f; public static float recoilAmplitude = 0f; public static float baseDuration = 0.33f; public static float damageCoefficient = 1.2f; private float duration; public override void OnEnter() { //IL_009e: 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_00b1: 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); Util.PlaySound(soundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, "CannonR", true); ((EntityState)this).PlayAnimation("Gesture, Override", "FireMine"); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); Ray aimRay = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = projectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, force = 0f, crit = ((BaseState)this).RollCrit() }; DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)16777216); value.damageSource = (DamageSource)2; val.damageTypeOverride = value; ProjectileManager.instance.FireProjectile(val); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class LastPrism : BaseSkillState { private static float maxDamageCoefficientPerSecond = 10f; private static float procCoefficientPerSecond = 3f; private static float forcePerSecond = 500f; private static float baseTicksPerSecond = 6f; private static float baseMinimumDuration = 0.25f; private static float maxRange = 50f; private static float bulletRadius = 1.5f; private static float minTurnAnglePerSecond = 90f; public static GameObject beamEffectPrefab; private static float walkSpeedPenaltyCoefficient = 0.33f; private float recoilAmplitude; private float spreadBloomValuePerSecond = 3f; private float maxChargeTime; private float tickDamageStopwatch; private float minimumDuration; private Vector3 currentAimVector; private GameObject beamEffectInstance; private BeamFromPoints beamEffectComponent; private float turnSpeedAngle; private float range; private bool canceled = true; private Transform muzzleTransform; private AimAnimator aimAnimator; private DirectionOverrideRequest animatorDirectionOverrideRequest; public override void OnEnter() { //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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); minimumDuration = baseMinimumDuration / ((BaseState)this).attackSpeedStat; currentAimVector = ((EntityState)this).inputBank.aimDirection; turnSpeedAngle = minTurnAnglePerSecond; muzzleTransform = ((BaseState)this).FindModelChild("MuzzleLaser"); if (Object.op_Implicit((Object)(object)muzzleTransform)) { beamEffectInstance = Object.Instantiate(beamEffectPrefab, muzzleTransform.position, Quaternion.identity); beamEffectComponent = beamEffectInstance.GetComponent(); } UpdateBeam(); ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedPenaltyCoefficient; Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetLayerWeight(modelAnimator.GetLayerIndex("Body, Laser"), 1f); modelAnimator.SetBool("inLaser", true); } aimAnimator = ((EntityState)this).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { animatorDirectionOverrideRequest = aimAnimator.RequestDirectionOverride((Func)GetAimDirection); } } public override void Update() { ((EntityState)this).Update(); UpdateBeam(); } public void AimImmediate() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) currentAimVector = ((EntityState)this).inputBank.aimDirection; UpdateBeam(); } private void UpdateBeam() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) Vector3 aimDirection = ((EntityState)this).inputBank.aimDirection; currentAimVector = Vector3.RotateTowards(currentAimVector, aimDirection, MathF.PI / 180f * turnSpeedAngle * Time.deltaTime, 0f); if (Object.op_Implicit((Object)(object)beamEffectComponent)) { Vector3 position = currentAimVector * range + ((EntityState)this).transform.position; RaycastHit val = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, new Ray(((EntityState)this).inputBank.aimOrigin, currentAimVector), ref val, range, ((LayerIndex)(ref LayerIndex.world)).mask, (QueryTriggerInteraction)0)) { position = ((RaycastHit)(ref val)).point; } beamEffectComponent.startPoint.position = muzzleTransform.position; beamEffectComponent.endPoint.position = position; } } private Vector3 GetAimDirection() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return currentAimVector; } public override void FixedUpdate() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(2f); _ = ((EntityState)this).fixedAge / maxChargeTime; float damageCoefficient = maxDamageCoefficientPerSecond / baseTicksPerSecond; turnSpeedAngle = minTurnAnglePerSecond; range = maxRange; tickDamageStopwatch -= Time.fixedDeltaTime; ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValuePerSecond * (1f / baseTicksPerSecond)); if (tickDamageStopwatch <= 0f) { tickDamageStopwatch += 1f / baseTicksPerSecond; FireBullet(damageCoefficient, currentAimVector); } if (((((EntityState)this).fixedAge >= minimumDuration && !((EntityState)this).inputBank.skill1.down) || ((EntityState)this).characterBody.isSprinting) && ((EntityState)this).isAuthority) { canceled = false; ((EntityState)this).outer.SetNextState((EntityState)(object)new ExitLastPrism()); } } public override void OnExit() { ((EntityState)this).OnExit(); if (animatorDirectionOverrideRequest != null) { animatorDirectionOverrideRequest.Dispose(); } Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.SetLayerWeight(modelAnimator.GetLayerIndex("Body, Laser"), 0f); modelAnimator.SetBool("inLaser", false); } if (canceled) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); } if (Object.op_Implicit((Object)(object)beamEffectInstance)) { EntityState.Destroy((Object)(object)beamEffectInstance); } ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; } private void FireBullet(float damageCoefficient, Vector3 direction) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00e3: 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_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)0); damageType.damageSource = (DamageSource)1; new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = direction, muzzleName = "", maxDistance = range, minSpread = 0f, maxSpread = 0f, radius = bulletRadius, falloffModel = (FalloffModel)0, smartCollision = true, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, hitMask = CommonMasks.bullet, damage = damageCoefficient * ((BaseState)this).damageStat, procCoefficient = procCoefficientPerSecond / baseTicksPerSecond, force = forcePerSecond / baseTicksPerSecond, isCrit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), damageType = damageType, hitEffectPrefab = null }.Fire(); } } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(currentAimVector); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); currentAimVector = reader.ReadVector3(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class RisingStar : BaseSkillState { private struct IndicatorInfo { public int refCount; public RisingStarIndicator indicator; } private class RisingStarIndicator : Indicator { public int missileCount; public override void UpdateVisualizer() { //IL_00ca: Unknown result type (might be due to invalid IL or missing references) ((Indicator)this).UpdateVisualizer(); Transform val = ((Indicator)this).visualizerTransform.Find("DotOrigin"); for (int num = val.childCount - 1; num >= missileCount; num--) { EntityState.Destroy((Object)(object)((Component)val.GetChild(num)).gameObject); } for (int i = val.childCount; i < missileCount; i++) { Object.Instantiate(((Component)((Indicator)this).visualizerPrefab.transform.Find("DotOrigin/DotTemplate")).gameObject, val); } if (val.childCount > 0) { float num2 = 360f / (float)val.childCount; float num3 = (float)(val.childCount - 1) * 90f; for (int j = 0; j < val.childCount; j++) { Transform child = val.GetChild(j); ((Component)child).gameObject.SetActive(true); child.localRotation = Quaternion.Euler(0f, 0f, num3 + (float)j * num2); } } } public RisingStarIndicator(GameObject owner, GameObject visualizerPrefab) : base(owner, visualizerPrefab) { } } public static float baseScanDuration = 0.3f; public static float baseScanInterval = 0.075f; public static float scanDistance = 128f; public static float scanAngle = 30f; private static float damageCoefficient = 1.5f; public static float procCoefficient = 1f; public static float baseFireDuration = 0.5f; public static float force = 150f; public static float recoil = 1f; public static float bloom = 0.4f; private static float bulletRadius = 0.1f; public static float bulletDistance = 150f; public static float blastRadius = 5f; private static float baseExitDuration = 0.3f; public static int maxShots = 3; public static float walkSpeedPenaltyCoefficient = 0.33f; public static GameObject explosionEffectPrefab; public static GameObject tracerPrefab; public static GameObject hitEffectPrefab; public static GameObject muzzleFlashPrefab; public static string fireSoundString = "Play_lunar_golem_attack1_launch"; private HurtBox[] targets; private Dictionary targetIndicators; private int indicatorsAdded; private float scanInterval; private float scanStopwatch; private float scanDuration; private int shotsFired; private float fireInterval; private float fireStopwatch; private float exitTimer; private string muzzleString = "CannonL"; private Animator animator; private Vector3 aimDirection; private AimAnimator aimAnimator; private DirectionOverrideRequest animatorDirectionOverrideRequest; private static float wawaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = 1.6f; public override void OnEnter() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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) ((BaseState)this).OnEnter(); scanDuration = baseScanDuration / ((BaseState)this).attackSpeedStat; scanInterval = baseScanInterval / ((BaseState)this).attackSpeedStat; targets = GetTargets(); ((BaseState)this).StartAimMode(2f, false); animator = ((EntityState)this).GetModelAnimator(); targetIndicators = new Dictionary(); fireInterval = baseFireDuration / (float)maxShots / ((BaseState)this).attackSpeedStat; exitTimer = baseExitDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = walkSpeedPenaltyCoefficient; Ray aimRay = ((BaseState)this).GetAimRay(); aimDirection = ((Ray)(ref aimRay)).direction; aimAnimator = ((EntityState)this).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { animatorDirectionOverrideRequest = aimAnimator.RequestDirectionOverride((Func)GetAimDirection); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= scanDuration && shotsFired < maxShots) { fireStopwatch -= Time.fixedDeltaTime; if (fireStopwatch <= 0f) { fireStopwatch += fireInterval; if (targets.Length != 0) { int num = targets.Length; int num2 = shotsFired % num; FireAt(targets[num2]); } else { FireAt(null); } } } else if (((EntityState)this).isAuthority && targets.Length != 0) { CleanTargetsList(); scanStopwatch -= Time.fixedDeltaTime; if (scanStopwatch <= 0f && indicatorsAdded < maxShots) { scanStopwatch += scanInterval; AddIndicator(targets[indicatorsAdded]); indicatorsAdded++; } } if (shotsFired >= maxShots) { exitTimer -= Time.fixedDeltaTime; if (exitTimer <= 0f) { ((EntityState)this).outer.SetNextStateToMain(); } } } private Vector3 GetAimDirection() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return aimDirection; } public override void Update() { ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)aimAnimator)) { aimAnimator.AimImmediate(); } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat(AnimationParameters.walkSpeed, ((EntityState)this).characterMotor.walkSpeed); } } public override void OnExit() { ((EntityState)this).OnExit(); if (animatorDirectionOverrideRequest != null) { animatorDirectionOverrideRequest.Dispose(); } ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 1f; if (targetIndicators == null) { return; } foreach (KeyValuePair targetIndicator in targetIndicators) { ((Indicator)targetIndicator.Value.indicator).active = false; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public void CleanTargetsList() { for (int num = targets.Length - 1; num >= 0; num--) { HurtBox val = targets[num]; if ((!Object.op_Implicit((Object)(object)val.healthComponent) || !val.healthComponent.alive) && targetIndicators.TryGetValue(val, out var value)) { ((Indicator)value.indicator).active = false; targetIndicators.Remove(val); } } } private void FireAt(HurtBox hurtBox) { //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_00ac: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018c: 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_0199: 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_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: 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_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: 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_0200: 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_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Expected O, but got Unknown shotsFired++; ((EntityState)this).PlayAnimation("Gesture, Override", "Primary2"); EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, muzzleString, false); ((EntityState)this).characterBody.AddSpreadBloom(bloom); ((BaseState)this).AddRecoil(-1f * recoil, -1.5f * recoil, -1f * recoil, 1f * recoil); Util.PlayAttackSpeedSound(fireSoundString, ((EntityState)this).gameObject, wawaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val; if (!((Object)(object)hurtBox != (Object)null)) { val = ((Ray)(ref aimRay)).direction; } else { Vector3 val2 = ((Component)hurtBox).transform.position - ((Ray)(ref aimRay)).origin; val = ((Vector3)(ref val2)).normalized; } Vector3 val3 = (aimDirection = val); if (((EntityState)this).isAuthority) { RaycastHit val4 = default(RaycastHit); if (!Physics.SphereCast(((Ray)(ref aimRay)).origin, bulletRadius, val3, ref val4, bulletDistance, ((LayerMask)(ref CommonMasks.bullet)).value, (QueryTriggerInteraction)0)) { ((Ray)(ref aimRay)).GetPoint(bulletDistance); } else { _ = ((RaycastHit)(ref val4)).point; } if (Object.op_Implicit((Object)(object)hurtBox)) { RemoveIndicator(hurtBox); } DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)0); damageType.damageSource = (DamageSource)2; BulletAttack val5 = new BulletAttack { aimVector = val3, origin = ((Ray)(ref aimRay)).origin, owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, damageColorIndex = (DamageColorIndex)0, damageType = damageType, falloffModel = (FalloffModel)0, force = force, HitEffectNormal = false, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, maxDistance = bulletDistance, radius = bulletRadius, isCrit = ((BaseState)this).RollCrit(), muzzleName = muzzleString, minSpread = 0f, maxSpread = 0f, hitEffectPrefab = hitEffectPrefab, smartCollision = true, tracerEffectPrefab = tracerPrefab, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask }; DamageAPI.AddModdedDamageType(val5, SS2.Survivors.Cyborg2.applyCyborgPrime); val5.Fire(); } } private void AddIndicator(HurtBox hurtBox) { Util.PlaySound(Paint.lockOnSoundString, ((EntityState)this).gameObject); if (!targetIndicators.TryGetValue(hurtBox, out var value)) { value = new IndicatorInfo { refCount = 0, indicator = new RisingStarIndicator(((EntityState)this).gameObject, Resources.Load("Prefabs/EngiMissileTrackingIndicator")) }; ((Indicator)value.indicator).targetTransform = ((Component)hurtBox).transform; ((Indicator)value.indicator).active = true; } value.refCount++; value.indicator.missileCount = value.refCount; targetIndicators[hurtBox] = value; } public void RemoveIndicator(HurtBox hurtBox) { if (targetIndicators.TryGetValue(hurtBox, out var value)) { value.refCount--; value.indicator.missileCount = value.refCount; targetIndicators[hurtBox] = value; if (value.refCount == 0) { ((Indicator)value.indicator).active = false; targetIndicators.Remove(hurtBox); } } } private HurtBox[] GetTargets() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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_0032: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(((EntityState)this).teamComponent.teamIndex); BullseyeSearch val = new BullseyeSearch { teamMaskFilter = allButNeutral, filterByLoS = true, searchOrigin = ((Ray)(ref aimRay)).origin, searchDirection = ((Ray)(ref aimRay)).direction, sortMode = (SortMode)2, maxDistanceFilter = scanDistance, maxAngleFilter = scanAngle }; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); HurtBox[] array = val.GetResults().ToArray(); if (array.Length == 0) { return Array.Empty(); } HurtBox[] array2 = (HurtBox[])(object)new HurtBox[maxShots]; for (int i = 0; i < array2.Length; i++) { int num = i % array.Length; array2[i] = array[num]; } return array2; } } public class Teleport : BaseSkillState { public class CameraMover : MonoBehaviour, ICameraStateProvider { public static float endLerpTime = 0.2f; public float lerpTime; public Vector3 position; private void OnEnable() { foreach (CameraRigController readOnlyInstances in CameraRigController.readOnlyInstancesList) { if ((Object)(object)readOnlyInstances.target == (Object)(object)((Component)this).gameObject) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)(object)this, lerpTime); } else if (readOnlyInstances.IsOverrideCam((ICameraStateProvider)(object)this)) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, 0.05f); } } } private void OnDisable() { foreach (CameraRigController readOnlyInstances in CameraRigController.readOnlyInstancesList) { if ((Object)(object)readOnlyInstances.target == (Object)(object)((Component)this).gameObject) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, endLerpTime); } else if (readOnlyInstances.IsOverrideCam((ICameraStateProvider)(object)this)) { readOnlyInstances.SetOverrideCam((ICameraStateProvider)null, 0.05f); } } } public void GetCameraState(CameraRigController cameraRigController, ref CameraState cameraState) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) Vector3 val = position; Vector3 value = cameraRigController.targetParams.currentCameraParamsData.idealLocalCameraPos.value; value.y += cameraRigController.targetParams.currentCameraParamsData.pivotVerticalOffset.value + 0.9f; value += (Object.op_Implicit((Object)(object)cameraRigController.targetParams.cameraPivotTransform) ? cameraRigController.targetParams.cameraPivotTransform.localPosition : Vector3.zero); val += cameraState.rotation * value; cameraState.position = val; } public bool IsHudAllowed(CameraRigController cameraRigController) { return true; } public bool IsUserControlAllowed(CameraRigController cameraRigController) { return true; } public bool IsUserLookAllowed(CameraRigController cameraRigController) { return true; } } public static float exitHopVelocity = 12f; public static float baseDuration = 0.33f; private float duration; private CameraMover camera; private TeleporterProjectile.ProjectileTeleporterOwnership teleporterOwnership; private Vector3 teleportTarget; private Vector3 storedVelocity; private bool didTeleport; private Vector3 initialPosition; private bool wasSprinting; public override void OnEnter() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); teleporterOwnership = ((EntityState)this).GetComponent(); if (!Object.op_Implicit((Object)(object)teleporterOwnership)) { Debug.LogError((object)"Cyborg2 teleport failed! No teleporter component. (howw?????)"); ((EntityState)this).outer.SetNextStateToMain(); return; } wasSprinting = ((EntityState)this).characterBody.isSprinting; initialPosition = ((EntityState)this).transform.position; teleportTarget = teleporterOwnership.teleporter.GetSafeTeleportPosition(); duration = baseDuration; camera = ((EntityState)this).gameObject.AddComponent(); camera.lerpTime = duration; camera.position = teleportTarget; storedVelocity = ((EntityState)this).characterMotor.velocity; if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } private void UpdateTarget() { //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_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) if (Object.op_Implicit((Object)(object)teleporterOwnership) && Object.op_Implicit((Object)(object)teleporterOwnership.teleporter)) { teleportTarget = teleporterOwnership.teleporter.GetSafeTeleportPosition(); if (Object.op_Implicit((Object)(object)camera)) { camera.position = teleportTarget; } } } public override void FixedUpdate() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); UpdateTarget(); ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { if (teleportTarget != Vector3.zero) { didTeleport = true; TeleportHelper.TeleportBody(((EntityState)this).characterBody, teleportTarget); CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.forward = ((Ray)(ref aimRay)).direction; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, exitHopVelocity); } ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0102: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); if (didTeleport) { EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); if (Object.op_Implicit((Object)(object)val) && val.state is LastPrism) { (val.state as LastPrism).AimImmediate(); } ((EntityState)this).characterBody.isSprinting = wasSprinting; storedVelocity.y = Mathf.Max(storedVelocity.y, 0f); } Transform modelTransform = ((EntityState)this).characterBody.modelLocator.modelTransform; if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 0.67f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matTeleportOverlay", SS2Bundle.Indev); obj.AddToCharacterModel(((Component)modelTransform).GetComponent()); } if (Object.op_Implicit((Object)(object)teleporterOwnership)) { teleporterOwnership.DoTeleport(initialPosition); } if (Object.op_Implicit((Object)(object)camera)) { EntityState.Destroy((Object)(object)camera); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class Unmaker : BaseSkillState, IStepSetter { private static float baseDuration = 0.625f; private static float bulletMaxDistance = 256f; private static float bulletRadius = 1f; private static float damageCoefficient = 2f; private static float procCoefficient = 1f; private static float force = 150f; public static GameObject tracerPrefab; public static GameObject hitEffectPrefab; public static GameObject muzzleFlashPrefab; private static string fireSoundString = "Play_MULT_m1_snipe_shoot"; private static float recoil = 2f; private static float bloom = 2f; private static float fireSoundPitch = 1f; private float duration; private bool hasFired; private string muzzleString; private int step; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); muzzleString = ((step == 0) ? "CannonR" : "CannonL"); Fire(); ((EntityState)this).PlayAnimation("Gesture, Override", (step == 0) ? "Primary1" : "Primary2"); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (!((EntityState)this).outer.destroying && !hasFired) { Fire(); } ((EntityState)this).OnExit(); } private void Fire() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, muzzleString, false); ((EntityState)this).characterBody.AddSpreadBloom(bloom); ((BaseState)this).AddRecoil(-1f * recoil, -1.5f * recoil, -1f * recoil, 1f * recoil); hasFired = true; Util.PlayAttackSpeedSound(fireSoundString, ((EntityState)this).gameObject, fireSoundPitch); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)8); damageType.damageSource = (DamageSource)1; new BulletAttack { aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, damageColorIndex = (DamageColorIndex)0, damageType = damageType, falloffModel = (FalloffModel)0, force = force, HitEffectNormal = false, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, maxDistance = bulletMaxDistance, radius = bulletRadius, isCrit = ((BaseState)this).RollCrit(), muzzleName = muzzleString, minSpread = 0f, maxSpread = 0f, hitEffectPrefab = hitEffectPrefab, smartCollision = true, tracerEffectPrefab = tracerPrefab }.Fire(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public void SetStep(int i) { step = i; } } } namespace EntityStates.Cyborg2.ShockMine { public class BaseShockMineState : BaseState { private protected ProjectileStickOnImpact projectileStickOnImpact; private protected ProjectileTargetComponent projectileTargetComponent; protected virtual bool shouldStick => false; public override void OnEnter() { ((BaseState)this).OnEnter(); projectileTargetComponent = ((EntityState)this).GetComponent(); projectileStickOnImpact = ((EntityState)this).GetComponent(); if (((Behaviour)projectileStickOnImpact).enabled != shouldStick) { ((Behaviour)projectileStickOnImpact).enabled = shouldStick; } } } public class Burrow : BaseShockMineState { public static float baseDuration = 0.25f; private float duration; protected override bool shouldStick => true; public override void OnEnter() { base.OnEnter(); duration = baseDuration; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { EntityState val = null; if (!projectileStickOnImpact.stuck) { val = (EntityState)(object)new WaitForStick(); } else if (duration <= ((EntityState)this).fixedAge) { val = (EntityState)(object)new WaitForTarget(); } if (val != null) { ((EntityState)this).outer.SetNextState(val); } } } } public class Expire : BaseShockMineState { public static GameObject expireEffectPrefab; protected override bool shouldStick => false; public override void OnEnter() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown base.OnEnter(); if (NetworkServer.active && Object.op_Implicit((Object)(object)expireEffectPrefab)) { EffectManager.SpawnEffect(expireEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position }, true); } EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public class ShockNearby : BaseShockMineState { public static int numShocks = 4; public static float baseDuration = 4f; public static float blastRadius = 10f; public static GameObject shockEffectPrefab = SS2Assets.LoadAsset("Cyborg2ShockNova", SS2Bundle.Indev); private ProjectileDamage projectileDamage; private float shockInterval; private float shockTimer; private int timesShocked; protected override bool shouldStick => false; public override void OnEnter() { base.OnEnter(); projectileDamage = ((EntityState)this).GetComponent(); shockInterval = (float)numShocks / baseDuration; } public override void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).rigidbody.velocity = Vector3.zero; shockTimer -= Time.fixedDeltaTime; if (shockTimer <= 0f) { shockTimer += shockInterval; Shock(); timesShocked++; } if (timesShocked >= numShocks) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Expire()); } } private void Shock() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_0040: Expected O, but got Unknown //IL_00a2: 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_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_00d5: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { if (Object.op_Implicit((Object)(object)shockEffectPrefab)) { EffectManager.SpawnEffect(shockEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position, scale = blastRadius }, true); } BlastAttack val = new BlastAttack { position = ((EntityState)this).transform.position, baseDamage = 0f, baseForce = 0f, radius = blastRadius, attacker = (Object.op_Implicit((Object)(object)((EntityState)this).projectileController.owner) ? ((EntityState)this).projectileController.owner.gameObject : null), inflictor = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).projectileController.teamFilter.teamIndex, crit = projectileDamage.crit, procChainMask = ((EntityState)this).projectileController.procChainMask, procCoefficient = ((EntityState)this).projectileController.procCoefficient, bonusForce = Vector3.zero, falloffModel = (FalloffModel)0, damageColorIndex = projectileDamage.damageColorIndex, damageType = projectileDamage.damageType, attackerFiltering = (AttackerFiltering)0 }; DamageAPI.AddModdedDamageType(val, SS2.Survivors.Cyborg2.applyCyborgPrime); val.Fire(); } } } public class Unburrow : BaseShockMineState { public static float baseDuration = 0.67f; public static float hopVelocity = 20f; private float duration; protected override bool shouldStick => false; public override void OnEnter() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); duration = baseDuration; Vector3 velocity = Vector3.up * hopVelocity; ((EntityState)this).rigidbody.velocity = velocity; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ShockNearby()); } } } public class WaitForStick : BaseShockMineState { protected override bool shouldStick => true; public override void OnEnter() { base.OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && projectileStickOnImpact.stuck) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Burrow()); } } } public class WaitForTarget : BaseShockMineState { private protected ProjectileSphereTargetFinder targetFinder; protected override bool shouldStick => true; public override void OnEnter() { base.OnEnter(); if (NetworkServer.active) { targetFinder = ((EntityState)this).GetComponent(); ((Behaviour)targetFinder).enabled = true; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { EntityState val = null; if (!projectileStickOnImpact.stuck) { val = (EntityState)(object)new WaitForStick(); } else if (Object.op_Implicit((Object)(object)projectileTargetComponent.target)) { val = (EntityState)(object)new Unburrow(); } if (val != null) { ((EntityState)this).outer.SetNextState(val); } } } public override void OnExit() { if (Object.op_Implicit((Object)(object)targetFinder)) { ((Behaviour)targetFinder).enabled = false; } ((EntityState)this).OnExit(); } } } namespace EntityStates.Cyborg2.BloonTrap { public class BaseBloonTrapState : BaseState { private protected ProjectileStickOnImpact projectileStickOnImpact; private protected ProjectileTargetComponent projectileTargetComponent; private protected SS2.Components.BloonTrap bloonTrap; protected virtual bool shouldStick => false; public override void OnEnter() { ((BaseState)this).OnEnter(); projectileStickOnImpact = ((EntityState)this).GetComponent(); bloonTrap = ((EntityState)this).GetComponent(); if (((Behaviour)projectileStickOnImpact).enabled != shouldStick) { ((Behaviour)projectileStickOnImpact).enabled = shouldStick; } } } } namespace EntityStates.Borg { public class BorgMain : GenericCharacterMain { private float hoverVelocity = -1.1f; private float hoverAcceleration = 25f; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); } public override void ProcessJump() { //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).ProcessJump(); if (((BaseCharacterMain)this).hasCharacterMotor && ((BaseCharacterMain)this).hasInputBank && ((EntityState)this).isAuthority) { bool flag = ((EntityState)this).inputBank.jump.down && ((EntityState)this).characterMotor.velocity.y < 0f && !((EntityState)this).characterMotor.isGrounded; if (((EntityState)this).isAuthority && flag) { float y = ((EntityState)this).characterMotor.velocity.y; y = Mathf.MoveTowards(y, hoverVelocity, hoverAcceleration * Time.fixedDeltaTime); ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x, y, ((EntityState)this).characterMotor.velocity.z); } } } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); } } public class BorgFireBaseShot : BaseSkillState { private enum BorgMuzzle { MuzzleLeft, MuzzleRight, MuzzleEye } public static float damageCoefficient = 2.5f; public float baseDuration = 0.5f; public float recoil = 1f; public static int CurrentMuzzleIndex = 0; [HideInInspector] public static GameObject tracerEffectPrefab = Resources.Load("Prefabs/Effects/Tracers/TracerHuntressSnipe"); [HideInInspector] public GameObject effectPrefab = Resources.Load("prefabs/effects/impacteffects/HitsparkCommandoShotgun"); [HideInInspector] public GameObject critEffectPrefab = Resources.Load("prefabs/effects/impacteffects/critspark"); private float duration; private float fireDuration; private bool hasFired; private Animator animator; private string muzzleString; private BorgMuzzle borgMuzzle; public override void OnEnter() { borgMuzzle = (BorgMuzzle)CurrentMuzzleIndex; ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireDuration = 0.25f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); switch (borgMuzzle) { case BorgMuzzle.MuzzleEye: muzzleString = "MuzzleEye"; break; case BorgMuzzle.MuzzleLeft: muzzleString = "MuzzleLeft"; ((EntityState)this).PlayAnimation("Gesture, Override", "FireM1", "FireM1.playbackRate", duration, 0f); break; case BorgMuzzle.MuzzleRight: muzzleString = "MuzzleRight"; ((EntityState)this).PlayAnimation("Gesture, Override", "FireM1Alt", "FireM1.playbackRate", duration, 0f); break; } SwitchMuzzle(); } private void SwitchMuzzle() { if (borgMuzzle == BorgMuzzle.MuzzleLeft) { CurrentMuzzleIndex = 1; } else if (borgMuzzle == BorgMuzzle.MuzzleRight) { CurrentMuzzleIndex = 2; } else if (borgMuzzle == BorgMuzzle.MuzzleEye) { CurrentMuzzleIndex = 0; } } public override void OnExit() { ((EntityState)this).OnExit(); } private void FireShot() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d1: 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) if (!hasFired) { hasFired = true; ((EntityState)this).characterBody.AddSpreadBloom(0.35f); Ray aimRay = ((BaseState)this).GetAimRay(); Util.PlaySound("BorgPrimary", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = 0f, damage = damageCoefficient * ((BaseState)this).damageStat, force = 100f, radius = 0.35f, tracerEffectPrefab = tracerEffectPrefab, muzzleName = muzzleString, hitEffectPrefab = (Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master) ? critEffectPrefab : effectPrefab), isCrit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master) }.Fire(); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration) { FireShot(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class BorgFireTrackshot : BaseSkillState { public static float damageCoefficient = 3f; public float baseDuration = 0.4f; public float recoil = 1f; [HideInInspector] public static GameObject tracerEffectPrefab = Resources.Load("Prefabs/Effects/Tracers/TracerHuntressSnipe"); [HideInInspector] public GameObject effectPrefab = Resources.Load("prefabs/effects/impacteffects/HitsparkCommandoShotgun"); [HideInInspector] public GameObject critEffectPrefab = Resources.Load("prefabs/effects/impacteffects/critspark"); private float duration; private float fireDuration; private bool firstShot; private bool secondShot; private bool thirdShot; private Animator animator; private string muzzleString; private BullseyeSearch search = new BullseyeSearch(); public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireDuration = 0.25f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); muzzleString = "Lowerarm.L_end"; ((EntityState)this).PlayAnimation("Gesture, Override", "FireM2", "FireArrow.playbackRate", duration, 0f); } public override void OnExit() { ((EntityState)this).OnExit(); } private void FireTrackshot() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_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_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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0184: 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_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.AddSpreadBloom(0.75f); Ray aimRay = ((BaseState)this).GetAimRay(); BullseyeSearch val = new BullseyeSearch(); TeamComponent component = ((Component)((EntityState)this).characterBody).GetComponent(); val.teamMaskFilter = TeamMask.all; ((TeamMask)(ref val.teamMaskFilter)).RemoveTeam(component.teamIndex); val.filterByLoS = true; val.searchOrigin = ((Ray)(ref aimRay)).origin; val.searchDirection = ((Ray)(ref aimRay)).direction; val.sortMode = (SortMode)2; val.maxDistanceFilter = 10000f; val.maxAngleFilter = 30f; val.RefreshCandidates(); Vector3 val2 = ((Ray)(ref aimRay)).direction; HurtBox val3 = val.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val3)) { val2 = ((Component)val3).transform.position - ((Ray)(ref aimRay)).origin; } Util.PlaySound("BorgSecondary", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Vector3)(ref val2)).normalized, minSpread = 0f, maxSpread = 0f, damage = damageCoefficient * ((BaseState)this).damageStat, force = 100f, tracerEffectPrefab = tracerEffectPrefab, muzzleName = muzzleString, hitEffectPrefab = (Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master) ? critEffectPrefab : effectPrefab), isCrit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), damageType = DamageTypeCombo.op_Implicit((DamageType)32) }.Fire(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDuration && !firstShot) { FireTrackshot(); firstShot = true; } if (((EntityState)this).fixedAge >= fireDuration * 2f && !secondShot) { FireTrackshot(); secondShot = true; } if (((EntityState)this).fixedAge >= fireDuration * 3f && !thirdShot) { FireTrackshot(); thirdShot = true; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } } namespace EntityStates.Commando { public class Deadeye : BaseSkillState, IStepSetter { [SerializeField] public static float damageCoeff = 1.65f; [SerializeField] public static float procCoeff = 0.7f; public float baseDuration = 0.5f; private float duration; public GameObject hitEffectPrefab = FireBarrage.hitEffectPrefab; public GameObject tracerEffectPrefab = FireBarrage.tracerEffectPrefab; private int pistolSide; private string pistolEffectMuzzleString = "FirePistol, Right"; private string pistolEffectAnimationString = "Gesture Additive, Right"; private void PlayPistolAnimation() { ((EntityState)this).PlayAnimation(pistolEffectAnimationString, pistolEffectMuzzleString); if (Object.op_Implicit((Object)(object)FireBarrage.effectPrefab)) { EffectManager.SimpleMuzzleFlash(FireBarrage.effectPrefab, ((EntityState)this).gameObject, "MuzzleLeft", false); } } void IStepSetter.SetStep(int i) { pistolSide = i; pistolEffectMuzzleString = ((pistolSide == 0) ? "FirePistol, Left" : "FirePistol, Right"); pistolEffectAnimationString = ((pistolSide == 0) ? "Gesture Additive, Left" : "Gesture Additive, Right"); } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write((byte)pistolSide); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); pistolSide = reader.ReadByte(); } public override void OnEnter() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0230: 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_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: 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_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_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_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_0156: 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_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0182: 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_0198: 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_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_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_01d3: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); PlayPistolAnimation(); Util.PlaySound(FireBarrage.fireBarrageSoundString, ((EntityState)this).gameObject); ((BaseState)this).AddRecoil(-0.6f, 0.6f, -0.6f, 0.6f); bool flag = ((BaseState)this).RollCrit(); if (!((EntityState)this).isAuthority) { return; } RaycastHit val = default(RaycastHit); if (flag && Physics.Raycast(((EntityState)this).transform.position, ((EntityState)this).transform.TransformDirection(Vector3.forward), ref val, float.PositiveInfinity, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { _ = ((RaycastHit)(ref val)).point; SphereSearch val2 = new SphereSearch { radius = 20f, origin = ((RaycastHit)(ref val)).point, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }; val2.RefreshCandidates(); val2.FilterCandidatesByDistinctHurtBoxEntities(); HurtBox[] hurtBoxes = val2.GetHurtBoxes(); int num = Math.Min(5, hurtBoxes.Length); for (int i = 0; i < num; i++) { HurtBox val3 = hurtBoxes[i]; if ((Object)(object)val3 != (Object)null && ((EntityState)this).isAuthority) { Vector3 aimVector = ((Component)val3).transform.position - ((RaycastHit)(ref val)).point; new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((RaycastHit)(ref val)).point, aimVector = aimVector, minSpread = 0f, maxSpread = 0f, radius = 2f, bulletCount = 1u, procCoefficient = procCoeff, damage = ((EntityState)this).characterBody.damage * damageCoeff, force = 3f, falloffModel = (FalloffModel)0, tracerEffectPrefab = tracerEffectPrefab, hitEffectPrefab = hitEffectPrefab, isCrit = flag, HitEffectNormal = false, smartCollision = true, maxDistance = 300f }.Fire(); } } } new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, bulletCount = 1u, procCoefficient = procCoeff, damage = ((EntityState)this).characterBody.damage * damageCoeff, force = 3f, radius = 2f, falloffModel = (FalloffModel)0, tracerEffectPrefab = tracerEffectPrefab, muzzleName = "MuzzleRight", hitEffectPrefab = hitEffectPrefab, isCrit = flag, HitEffectNormal = false, smartCollision = true, maxDistance = 300f }.Fire(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class DirtBomb : GenericProjectileBaseState { public override void PlayAnimation(float duration) { if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelAnimator())) { ((EntityState)this).PlayAnimation("Gesture, Additive", "ThrowGrenade", "FireFMJ.playbackRate", duration * 2f, 0f); ((EntityState)this).PlayAnimation("Gesture, Override", "ThrowGrenade", "FireFMJ.playbackRate", duration * 2f, 0f); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace EntityStates.ClayMonger { public class Charge : GenericCharacterMain { public static float stateDuration; public static float damageCoefficient; public static float upwardForceMagnitude; public static float awayForceMagnitude; public static string hitboxGroupName; private OverlapAttack _attack; private HitBoxGroup _hitboxGroup; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); ((EntityState)this).characterBody.AddBuff(SS2Content.Buffs.bdMongerSlippery); ResetOverlapAttack(); } private void ResetOverlapAttack() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)_hitboxGroup)) { _hitboxGroup = HitBoxGroup.FindByGroupName(((Component)((EntityState)this).GetModelTransform()).gameObject, hitboxGroupName); } _attack = new OverlapAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject), damage = ((BaseState)this).damageStat * damageCoefficient, forceVector = Vector3.up * upwardForceMagnitude, pushAwayForce = awayForceMagnitude, hitBoxGroup = _hitboxGroup }; } public override void FixedUpdate() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).FixedUpdate(); List list = new List(); if (((EntityState)this).isAuthority && _attack.Fire(list)) { foreach (HurtBox item in list) { if (Object.op_Implicit((Object)(object)item.healthComponent)) { CharacterBody body = item.healthComponent.body; if (!((Enum)body.bodyFlags).HasFlag((Enum)(object)(BodyFlags)8) && !body.HasBuff(SS2Content.Buffs.bdMongerTar)) { body.AddTimedBuff(SS2Content.Buffs.bdMongerTar, 5f); } } } } if (((EntityState)this).fixedAge > stateDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).characterBody.RemoveBuff(SS2Content.Buffs.bdMongerSlippery); ((GenericCharacterMain)this).OnExit(); } } public class DeathState : GenericCharacterDeath { public static GameObject initialEffect; public static GameObject deathEffect; private static GameObject _omniExplosion; public static float duration; [Header("Explosion Data")] public static float explosionRadius; public static float explosionDamageCoefficient; public static float procCoefficient; public static float baseForce; public static Vector3 bonusForce; private Transform _modelTransform; private Transform _baseTransform; private bool _attemptedDeathBehaviour; private EffectData _effectData; private EffectManagerHelper _emh_initialEffect; [AsyncAssetLoad] private static IEnumerator Load() { AsyncOperationHandle request = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/OmniExplosionVFX.prefab"); while (!request.IsDone) { yield return null; } _omniExplosion = request.Result; } public override void OnEnter() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).OnEnter(); if (!Object.op_Implicit((Object)(object)((EntityState)this).modelLocator)) { return; } ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (!Object.op_Implicit((Object)(object)modelChildLocator)) { return; } _baseTransform = modelChildLocator.FindChild("Base"); if (Object.op_Implicit((Object)(object)initialEffect)) { if (!EffectManager.ShouldUsePooledEffect(initialEffect)) { Transform transform = Object.Instantiate(initialEffect).transform; transform.localPosition = Vector3.zero; transform.SetParent(_baseTransform); } else { _emh_initialEffect = EffectManager.GetAndActivatePooledEffect(initialEffect, _baseTransform, true); } } _modelTransform = ((EntityState)this).modelLocator.modelTransform; } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { AttemptDeathBehaviour(); } } private void AttemptDeathBehaviour() { //IL_003f: 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_007a: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_01c9: 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_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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_017e: 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) if (_attemptedDeathBehaviour) { return; } _attemptedDeathBehaviour = true; CleanupInitialEffect(); if (NetworkServer.active) { if (_effectData == null) { _effectData = new EffectData(); } _effectData.origin = _baseTransform.position; EffectManager.SpawnEffect(deathEffect, _effectData, true); Util.PlaySound("Play_clayboss_M1_explo", ((Component)_baseTransform).gameObject); EffectManager.SpawnEffect(_omniExplosion, new EffectData { origin = _baseTransform.position, scale = explosionRadius }, true); Result val = new BlastAttack { attacker = ((EntityState)this).gameObject, attackerFiltering = (AttackerFiltering)2, baseDamage = ((BaseState)this).damageStat * explosionDamageCoefficient, baseForce = baseForce, bonusForce = bonusForce, canRejectForce = true, crit = ((BaseState)this).RollCrit(), damageColorIndex = (DamageColorIndex)0, falloffModel = (FalloffModel)1, inflictor = ((EntityState)this).gameObject, losType = (LoSType)1, position = _baseTransform.position, procCoefficient = procCoefficient, radius = explosionRadius, teamIndex = ((EntityState)this).teamComponent.teamIndex }.Fire(); for (int i = 0; i < val.hitCount; i++) { HitPoint val2 = val.hitPoints[i]; if (Object.op_Implicit((Object)(object)val2.hurtBox) && Object.op_Implicit((Object)(object)val2.hurtBox.healthComponent)) { CharacterBody body = val2.hurtBox.healthComponent.body; if (!((Enum)body.bodyFlags).HasFlag((Enum)(object)(BodyFlags)8) && !body.HasBuff(SS2Content.Buffs.bdMongerTar)) { body.AddTimedBuff(SS2Content.Buffs.bdMongerTar, 5f); } } } } if (Object.op_Implicit((Object)(object)_modelTransform)) { EntityState.Destroy((Object)(object)((Component)_modelTransform).gameObject); _modelTransform = null; } if (NetworkServer.active) { ((GenericCharacterDeath)this).DestroyBodyAsapServer(); } } public override void OnExit() { if (!((EntityState)this).outer.destroying) { AttemptDeathBehaviour(); } else { CleanupInitialEffect(); } ((GenericCharacterDeath)this).OnExit(); } public void CleanupInitialEffect() { if ((Object)(object)_emh_initialEffect != (Object)null && _emh_initialEffect.OwningPool != null) { ((GenericPool)(object)_emh_initialEffect.OwningPool).ReturnObject(_emh_initialEffect); _emh_initialEffect = null; } } } public class PrepCharge : BaseState { public static float stateDuration; private float _duration; public override void OnEnter() { ((BaseState)this).OnEnter(); _duration = stateDuration / base.attackSpeedStat; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > _duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Charge()); } } } public class SpawnState : BaseState { public static float duration; public static string spawnSoundString; [Header("Anim Params")] public static string animLayerName; public static string spawnAnimName; public override void OnEnter() { ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation(animLayerName, spawnAnimName); Util.PlaySound(spawnSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } } namespace EntityStates.Chirr { public class AimDrop : BaseSkillState { public static float splashRadius = 10f; public static float damageCoefficient = 15f; public static float dropMaxHorizontalVelocity = 20f; public static float minimumThrowDistance = 20f; public static float dropConeAngle = 55f; public static float maxRayDistance = 50f; public static float extraGravity = -15f; public static float selfAwayForce = 10f; public static float selfUpForce = 10f; private GameObject areaIndicatorInstance; private GrabController grabController; private ChirrGrabBehavior chirrGrabBehavior; private Vector3 desiredTrajectory; public bool cancelled; public override void OnEnter() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((BaseState)this).StartAimMode(2f, false); grabController = ((EntityState)this).GetComponent(); chirrGrabBehavior = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab)) { areaIndicatorInstance = Object.Instantiate(ArrowRain.areaIndicatorPrefab); areaIndicatorInstance.transform.localScale = new Vector3(ArrowRain.arrowRainRadius, ArrowRain.arrowRainRadius, ArrowRain.arrowRainRadius); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority()) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void Update() { ((EntityState)this).Update(); CalculateTrajectory(); } private unsafe void CalculateTrajectory() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0085: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e9: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) Vector3 down = Vector3.down; Vector3 aimOrigin = ((EntityState)this).inputBank.aimOrigin; Vector3 val = Vector3.RotateTowards(down, ((EntityState)this).inputBank.aimDirection, MathF.PI / 180f * dropConeAngle, 0f); Vector3 val2 = val * maxRayDistance + aimOrigin; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(aimOrigin, val, ref val3, maxRayDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { val2 = ((RaycastHit)(ref val3)).point; } Vector3 val4 = aimOrigin; if (grabController.IsGrabbing()) { val4 = GetBetterFootPosition(); } val2.y = Mathf.Min(val2.y - 0.1f, val4.y - 0.1f); if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { areaIndicatorInstance.transform.position = val2; areaIndicatorInstance.transform.up = val2; } float num = Trajectory.CalculateFlightDuration(val4.y, val2.y, 0f, Physics.gravity.y + extraGravity); if (float.IsNaN(num) || num < 0.2f) { num = 0.2f; } Vector3 val5 = val2 - aimOrigin; val5.y = 0f; float magnitude = ((Vector3)(ref val5)).magnitude; float num2 = magnitude / num; desiredTrajectory = num2 * ((Vector3)(ref val5)).normalized; Vector3 val6 = aimOrigin; SS2Log.Info("aimOrigin " + ((object)(*(Vector3*)(&val6))/*cast due to .constrained prefix*/).ToString(), 95, "CalculateTrajectory"); val6 = val2; SS2Log.Info("hitPoint " + ((object)(*(Vector3*)(&val6))/*cast due to .constrained prefix*/).ToString(), 96, "CalculateTrajectory"); val6 = val4; SS2Log.Info("victimFootPosition " + ((object)(*(Vector3*)(&val6))/*cast due to .constrained prefix*/).ToString(), 97, "CalculateTrajectory"); SS2Log.Info("flightDuration " + num, 98, "CalculateTrajectory"); val6 = val5; SS2Log.Info("hBetween " + ((object)(*(Vector3*)(&val6))/*cast due to .constrained prefix*/).ToString(), 99, "CalculateTrajectory"); SS2Log.Info("hSpeed " + num2, 100, "CalculateTrajectory"); SS2Log.Info("hDistance " + magnitude, 101, "CalculateTrajectory"); val6 = desiredTrajectory; SS2Log.Info("desiredTrajectory " + ((object)(*(Vector3*)(&val6))/*cast due to .constrained prefix*/).ToString(), 102, "CalculateTrajectory"); } public Vector3 GetBetterFootPosition() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) Vector3 position = grabController.victimBodyObject.transform.position; if (Object.op_Implicit((Object)(object)grabController.victimInfo.characterMotor)) { return grabController.victimInfo.body.footPosition; } if (grabController.victimColliders.Length != 0) { Bounds bounds = grabController.victimColliders[0].bounds; position.y = ((Bounds)(ref bounds)).min.y; return position; } return position; } public override void OnExit() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); if (((EntityState)this).isAuthority) { Vector3 val = -1f * ((EntityState)this).inputBank.aimDirection * selfAwayForce; val += Vector3.up * selfUpForce; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((BaseState)this).isGrounded) { float num = Mathf.Max(((EntityState)this).characterMotor.velocity.y, val.y); ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x + val.x, num, ((EntityState)this).characterMotor.velocity.z + val.z); EntityStateMachine obj = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Wings"); if (((obj != null) ? ((object)obj.state).GetType() : null) != typeof(Idle)) { ((EntityState)this).characterBody.isSprinting = true; } } } if (!cancelled && !((EntityState)this).outer.destroying && Object.op_Implicit((Object)(object)grabController) && grabController.IsGrabbing()) { Util.PlaySound("ChirrGrabThrow", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("FullBody, Override", "GrabThrow"); ((BaseState)this).StartAimMode(2f, false); bool friendly = grabController.victimInfo.body.teamComponent.teamIndex == ((EntityState)this).teamComponent.teamIndex; if (NetworkServer.active && Object.op_Implicit((Object)(object)chirrGrabBehavior)) { GameObject victimBodyObject = grabController.victimBodyObject; grabController.AttemptGrab(null); chirrGrabBehavior.ThrowVictim(victimBodyObject, desiredTrajectory, extraGravity, friendly); } } if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class Befriend : BaseSkillState { public string soundString; public GameObject muzzleEffectPrefab; public static float baseDuration = 0.5f; public static float fireTime = 0f; public static float bloom = 1f; public static float recoilAmplitude = 0.1f; public static float damageCoefficient; public static float procCoefficient; public static float force; private bool hasFired; private float duration; private ChirrFriendTracker tracker; private HurtBox target; [NonSerialized] private static bool additivetest = false; [NonSerialized] private static bool fullbodytest = true; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; tracker = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)tracker) && ((EntityState)this).isAuthority) { target = tracker.GetTrackingTarget(); } ((BaseState)this).StartAimMode(2f, false); Util.PlaySound("ChirrFireSpecial", ((EntityState)this).gameObject); string text = (fullbodytest ? "FullBody, " : "Gesture, "); text += (additivetest ? "Additive" : "Override"); ((EntityState)this).PlayAnimation(text, "FireSpecial", "Special.playbackRate", duration, 0f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).fixedAge >= fireTime * duration) { Fire(); hasFired = true; } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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) ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); Transform val = ((BaseState)this).FindModelChild("Mouth"); if (NetworkServer.active) { OrbManager.instance.AddOrb((Orb)(object)new ChirrFriendOrb { attacker = ((EntityState)this).gameObject, target = target, tracker = tracker, origin = (Object.op_Implicit((Object)(object)val) ? val.position : ((EntityState)this).characterBody.corePosition), damageType = DamageTypeCombo.op_Implicit((DamageType)32), procCoefficient = 0f }); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void OnSerialize(NetworkWriter writer) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) NetworkExtensions.Write(writer, HurtBoxReference.FromHurtBox(target)); } public override void OnDeserialize(NetworkReader reader) { //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) HurtBoxReference val = NetworkExtensions.ReadHurtBoxReference(reader); target = ((HurtBoxReference)(ref val)).ResolveHurtBox(); } } public class BugCharacterMain : GenericCharacterMain { private EntityStateMachine wingsStateMachine; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); wingsStateMachine = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Wings"); } public override void ProcessJump() { bool flag = !wingsStateMachine.IsInMainState(); if (!flag || !SS2.Survivors.Chirr.toggleHover) { ((GenericCharacterMain)this).ProcessJump(); } if (((BaseCharacterMain)this).hasCharacterMotor && ((BaseCharacterMain)this).hasInputBank && ((EntityState)this).isAuthority && ((EntityState)this).inputBank.jump.down && ((EntityState)this).characterMotor.velocity.y < 0f && !((EntityState)this).characterMotor.isGrounded && !flag) { wingsStateMachine.SetNextState((EntityState)(object)new WingsOn()); } } public override void HandleMovements() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_003b: 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_0064: 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) ((GenericCharacterMain)this).HandleMovements(); if (!wingsStateMachine.IsInMainState()) { Vector3 val = ((base.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : base.moveVector); bool flag = ((EntityState)this).characterBody.aimTimer > 0f; ((EntityState)this).characterDirection.moveVector = ((Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && flag) ? base.aimDirection : val); } } public override void OnExit() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown ((GenericCharacterMain)this).OnExit(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)wingsStateMachine)) { wingsStateMachine.SetNextState((EntityState)new Idle()); } ((GenericCharacterMain)this).OnExit(); } } public class DroppedState : BaseState { public class DetonateOnImpact : MonoBehaviour { public DroppedState droppedState; private void OnCollisionEnter(Collision collision) { if (collision.gameObject.layer == LayerIndex.world.intVal || collision.gameObject.layer == LayerIndex.entityPrecise.intVal || collision.gameObject.layer == LayerIndex.defaultLayer.intVal) { droppedState.detonateNextFrame = true; Object.Destroy((Object)(object)this); } } } internal static float bounceForce = 2000f; internal static float force = 800f; internal static float blastRadius = 10f; internal static float procCoefficient = 1f; internal static float damageCoefficient = 15f; internal static float absoluteMaxTime = 8f; public GameObject inflictor; public Vector3 initialVelocity; public static GameObject hitGroundEffect; public float extraGravity; public bool friendlyDrop; public bool detonateNextFrame; private DetonateOnImpact detonateOnImpact; private bool bodyHadGravity = true; private bool bodyWasKinematic = true; private bool bodyCouldTakeImpactDamage = true; private bool bodyWasPlayer; private CharacterGravityParameters gravParams; private Rigidbody tempRigidbody; private SphereCollider tempSphereCollider; public override void OnEnter() { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_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_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && NetworkServer.active) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); } if (Object.op_Implicit((Object)(object)modelAnimator)) { if (!friendlyDrop) { modelAnimator.GetLayerIndex("Body"); ((Behaviour)modelAnimator).enabled = false; modelAnimator.CrossFadeInFixedTime((Random.Range(0, 2) == 0) ? "Hurt1" : "Hurt2", 0.1f); modelAnimator.Update(0f); } else { AimAnimator aimAnimator = ((EntityState)this).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = true; } } } GameObject bodyPrefab = BodyCatalog.GetBodyPrefab(((EntityState)this).characterBody.bodyIndex); CharacterGravityParameters gravityParameters; if (Object.op_Implicit((Object)(object)bodyPrefab)) { Rigidbody component = bodyPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { bodyHadGravity = component.useGravity; bodyWasKinematic = component.isKinematic; } CharacterMotor component2 = bodyPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { gravityParameters = component2.gravityParameters; bodyHadGravity = ((CharacterGravityParameters)(ref gravityParameters)).CheckShouldUseGravity(); } } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { detonateOnImpact = ((EntityState)this).gameObject.AddComponent(); detonateOnImpact.droppedState = this; ((EntityState)this).characterMotor.onMovementHit += new MovementHitDelegate(DoSplashDamage); ((EntityState)this).characterMotor.disableAirControlUntilCollision = true; ((EntityState)this).characterMotor.velocity = initialVelocity; ((EntityState)this).characterMotor.useGravity = true; gravParams = ((EntityState)this).characterMotor.gravityParameters; CharacterMotor characterMotor = ((EntityState)this).characterMotor; gravityParameters = new CharacterGravityParameters { environmentalAntiGravityGranterCount = 0, antiGravityNeutralizerCount = 0, channeledAntiGravityGranterCount = 0 }; characterMotor.gravityParameters = gravityParameters; } else { Rigidbody val = ((EntityState)this).rigidbody; if (!Object.op_Implicit((Object)(object)val)) { val = ((EntityState)this).gameObject.AddComponent(); val.mass = 100f; tempRigidbody = val; tempSphereCollider = ((EntityState)this).gameObject.AddComponent(); } val.velocity = initialVelocity; val.useGravity = true; detonateOnImpact = ((EntityState)this).gameObject.AddComponent(); detonateOnImpact.droppedState = this; if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { bodyCouldTakeImpactDamage = ((EntityState)this).rigidbodyMotor.canTakeImpactDamage; ((EntityState)this).rigidbodyMotor.canTakeImpactDamage = false; ((Behaviour)((EntityState)this).rigidbodyMotor).enabled = false; } } if (((EntityState)this).isAuthority) { inflictor.GetComponent().onVictimReleased += ReleaseLatencyFixTEMP; } } private void ReleaseLatencyFixTEMP(PassengerInfo _) { //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_0033: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = initialVelocity; } else if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody)) { ((EntityState)this).rigidbody.velocity = initialVelocity; } } private void DoSplashDamage(ref MovementHitInfo movementHitInfo) { detonateNextFrame = true; } public override void OnExit() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)inflictor)) { inflictor.GetComponent().onVictimReleased -= ReleaseLatencyFixTEMP; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.onMovementHit -= new MovementHitDelegate(DoSplashDamage); ((EntityState)this).characterMotor.useGravity = bodyHadGravity; ((EntityState)this).characterMotor.gravityParameters = gravParams; } if (Object.op_Implicit((Object)(object)detonateOnImpact)) { EntityState.Destroy((Object)(object)detonateOnImpact); } if (Object.op_Implicit((Object)(object)tempRigidbody)) { EntityState.Destroy((Object)(object)tempRigidbody); } if (Object.op_Implicit((Object)(object)tempSphereCollider)) { EntityState.Destroy((Object)(object)tempSphereCollider); } if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { ((EntityState)this).rigidbodyMotor.canTakeImpactDamage = bodyCouldTakeImpactDamage; ((Behaviour)((EntityState)this).rigidbodyMotor).enabled = true; } if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody)) { ((EntityState)this).rigidbody.useGravity = bodyHadGravity; ((EntityState)this).rigidbody.isKinematic = bodyWasKinematic; } if (NetworkServer.active) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); } Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { ((Behaviour)modelAnimator).enabled = true; } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //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_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_0123: 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_012f: 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_014a: Expected O, but got Unknown //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: 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_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: 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_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (friendlyDrop && ((EntityState)this).isLocalPlayer) { PerformInputs(); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity += Vector3.up * extraGravity * Time.fixedDeltaTime; } else { Rigidbody obj = (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody) ? ((EntityState)this).rigidbody : tempRigidbody); obj.velocity += Vector3.up * extraGravity * Time.fixedDeltaTime; } if (!(((EntityState)this).fixedAge > absoluteMaxTime) && !detonateNextFrame) { return; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } else if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody)) { ((EntityState)this).rigidbody.velocity = Vector3.zero; } else if (Object.op_Implicit((Object)(object)tempRigidbody)) { tempRigidbody.velocity = Vector3.zero; } if (((EntityState)this).isAuthority) { EffectManager.SpawnEffect(hitGroundEffect, new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = 1.25f }, true); if (Object.op_Implicit((Object)(object)inflictor)) { CharacterBody component = inflictor.GetComponent(); float num = (Object.op_Implicit((Object)(object)component) ? component.damage : 12f); BlastAttack val = new BlastAttack { position = ((EntityState)this).characterBody.footPosition, baseDamage = damageCoefficient * num, baseForce = force, bonusForce = Vector3.up * bounceForce, radius = blastRadius, attacker = inflictor, inflictor = inflictor, teamIndex = component.teamComponent.teamIndex, crit = component.RollCrit(), procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, falloffModel = (FalloffModel)1, damageColorIndex = (DamageColorIndex)0 }; DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)32); damageType.damageSource = (DamageSource)4; val.damageType = damageType; val.attackerFiltering = (AttackerFiltering)0; val.Fire(); } } if (Object.op_Implicit((Object)(object)tempRigidbody)) { EntityState.Destroy((Object)(object)tempRigidbody); } if (Object.op_Implicit((Object)(object)tempSphereCollider)) { EntityState.Destroy((Object)(object)tempSphereCollider); } ((EntityState)this).outer.SetNextStateToMain(); } protected void PerformInputs() { if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator)) { PerformInput(((EntityState)this).skillLocator.primary, ref ((EntityState)this).inputBank.skill1); PerformInput(((EntityState)this).skillLocator.secondary, ref ((EntityState)this).inputBank.skill2); PerformInput(((EntityState)this).skillLocator.utility, ref ((EntityState)this).inputBank.skill3); PerformInput(((EntityState)this).skillLocator.special, ref ((EntityState)this).inputBank.skill4); } } private void PerformInput(GenericSkill skillSlot, ref ButtonState buttonState) { if (buttonState.down && Object.op_Implicit((Object)(object)skillSlot) && (!skillSlot.mustKeyPress || !buttonState.hasPressBeenClaimed) && skillSlot.ExecuteIfReady()) { buttonState.hasPressBeenClaimed = true; } } public override InterruptPriority GetMinimumInterruptPriority() { if (friendlyDrop) { return (InterruptPriority)1; } return (InterruptPriority)8; } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); writer.Write(initialVelocity); writer.Write(friendlyDrop); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnDeserialize(reader); initialVelocity = reader.ReadVector3(); friendlyDrop = reader.ReadBoolean(); } } public class FireTriLeaf : BaseSkillState { public static GameObject projectilePrefab; public string soundString; public GameObject muzzleEffectPrefab; public static float baseDuration = 0.8f; public static float fireTime = 0.3f; public static int numShots = 3; public static float bloom = 1f; public static float recoilAmplitude = 0.1f; public static float damageCoefficient; public static float procCoefficient; public static float force; public static float pitchCoefficient = 0.5f; public static float minSpreadCoefficient = 0.5f; public static float minSpread = 0f; public static float maxSpread = 5.5f; private float duration; private int shotsFired; private float fireInterval; private float fireStopwatch; private bool isCrit; [NonSerialized] private static bool additivetest = true; [NonSerialized] private static bool fullbodytest = false; public override void OnEnter() { ((BaseState)this).OnEnter(); ((BaseState)this).StartAimMode(2f, false); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireInterval = duration * fireTime / (float)numShots; isCrit = ((BaseState)this).RollCrit(); Util.PlaySound("ChirrFirePrimary", ((EntityState)this).gameObject); string text = (fullbodytest ? "FullBody, " : "Gesture, "); text += (additivetest ? "Additive" : "Override"); ((EntityState)this).PlayAnimation(text, "FirePrimary", "Primary.playbackRate", duration, 0f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); fireStopwatch -= Time.fixedDeltaTime; if (fireStopwatch <= 0f && shotsFired < numShots) { fireStopwatch += fireInterval; Fire(); } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) shotsFired++; Util.PlaySound("ChirrFirePrimarySingle", ((EntityState)this).gameObject); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); if (((EntityState)this).isAuthority) { float num = Mathf.Lerp(minSpread, maxSpread * minSpreadCoefficient, (float)shotsFired / (float)numShots); float num2 = Mathf.Lerp(minSpread, maxSpread, (float)shotsFired / (float)numShots); Ray aimRay = ((BaseState)this).GetAimRay(); ((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, num, num2, 1f, pitchCoefficient, 0f, 0f); ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, force, isCrit, (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1)); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class GrabDash : BaseSkillState { public static float baseDuration = 0.75f; public static float dashSpeed = 7.5f; public static float minGrabRadius = 4f; public static float maxGrabRadius = 8f; public static float grabSearchFrequency = 20f; public static float maxTurnAnglePerSecond = 30f; private float stopwatch; private float duration; private Vector3 currentAimVector; private AnimationCurve speedCurve; private float grabSearchTimer; private GrabController grabController; public override void OnEnter() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); speedCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.2f); duration = baseDuration; currentAimVector = ((EntityState)this).inputBank.aimDirection; ((EntityState)this).characterDirection.forward = currentAimVector; grabController = ((EntityState)this).GetComponent(); Util.PlaySound("ChirrDashStart", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("FullBody, Override", "GrabDash", "Utility.playbackRate", duration, 0f); } public override void FixedUpdate() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; Vector3 aimDirection = ((EntityState)this).inputBank.aimDirection; currentAimVector = Vector3.RotateTowards(currentAimVector, aimDirection, MathF.PI / 180f * maxTurnAnglePerSecond * Time.deltaTime, 0f); ((EntityState)this).characterDirection.forward = currentAimVector; float num = speedCurve.Evaluate(stopwatch / duration) * dashSpeed; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += currentAimVector * num * ((BaseState)this).moveSpeedStat * Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity.y = 0f; if (((EntityState)this).isAuthority) { grabSearchTimer -= Time.fixedDeltaTime; if (grabSearchTimer <= 0f) { grabSearchTimer += 1f / grabSearchFrequency; float grabRadius = Mathf.Lerp(minGrabRadius, maxGrabRadius, stopwatch / duration); AttemptGrab(grabRadius); } } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).characterMotor.velocity = currentAimVector * num * ((BaseState)this).moveSpeedStat; ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public void AttemptGrab(float grabRadius) { //IL_0000: 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) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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) SphereSearch val = new SphereSearch { radius = grabRadius, origin = ((EntityState)this).characterBody.corePosition, queryTriggerInteraction = (QueryTriggerInteraction)1, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }; val.RefreshCandidates(); val.FilterCandidatesByDistinctHurtBoxEntities(); HurtBox[] hurtBoxes = val.GetHurtBoxes(); foreach (HurtBox val2 in hurtBoxes) { if (!Object.op_Implicit((Object)(object)val2)) { continue; } HealthComponent healthComponent = val2.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent) && (Object)(object)((Component)healthComponent).gameObject != (Object)(object)((EntityState)this).gameObject && (!healthComponent.body.isChampion || (((Object)((Component)healthComponent).gameObject).name.Contains("Brother") && ((Object)((Component)healthComponent).gameObject).name.Contains("Body")) || Object.op_Implicit((Object)(object)((Component)healthComponent.body).GetComponent()))) { bool flag = BodyIsGrabbable(((Component)healthComponent).gameObject); if (!SS2.Survivors.Chirr.grabDrones) { flag &= !IsBodyDrone(healthComponent.body); } if (flag) { OnGrabBodyAuthority(val2.healthComponent.body); break; } } } } private bool IsBodyDrone(CharacterBody body) { return body.GetDisplayName().Contains("drone", StringComparison.InvariantCultureIgnoreCase); } private bool BodyIsGrabbable(GameObject candidate) { if (GrabController.victimsToGrabControllers.TryGetValue(((EntityState)this).gameObject, out var value) && Object.op_Implicit((Object)(object)value) && ((Object)(object)((Component)value).gameObject != (Object)(object)candidate || (Object)(object)value.victimBodyObject != (Object)null)) { return false; } return true; } public void OnGrabBodyAuthority(CharacterBody body) { if (Object.op_Implicit((Object)(object)grabController)) { grabController.AttemptGrab(((Component)body).gameObject); } ((EntityState)this).outer.SetNextStateToMain(); EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Wings"); if (Object.op_Implicit((Object)(object)val)) { val.SetNextState((EntityState)(object)new BoostUp()); } EntityStateMachine val2 = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Claws"); if (Object.op_Implicit((Object)(object)val2)) { val2.SetNextState((EntityState)(object)new Grabbing()); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class SpitBomb : BaseSkillState { public static GameObject projectilePrefab; public string soundString; public GameObject muzzleEffectPrefab; public string muzzleName; public static float bloom = 1f; public static float recoilAmplitude = 1f; public static float fireTime = 0.5f; public static float baseDuration = 0.5f; public static float damageCoefficient = 2f; public static float force = 100f; public static float selfAwayForce = 11f; public static float selfUpForce = 11f; private bool hasFired; public float duration; [NonSerialized] private static bool additivetest = true; [NonSerialized] private static bool fullbodytest = true; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); string text = (fullbodytest ? "FullBody, " : "Gesture, "); text += (additivetest ? "Additive" : "Override"); ((EntityState)this).PlayAnimation(text, "FireSecondary", "Secondary.playbackRate", duration, 0f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).fixedAge >= duration * fireTime) { hasFired = true; Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018b: 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_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_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_01f2: 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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_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) Util.PlaySound("ChirrFireSpitBomb", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleName, false); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; if (!((EntityState)this).isAuthority) { return; } Vector3 val = -1f * direction * selfAwayForce; val += Vector3.up * selfUpForce; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((BaseState)this).isGrounded) { float num = Mathf.Max(((EntityState)this).characterMotor.velocity.y, val.y); ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x + val.x, num, ((EntityState)this).characterMotor.velocity.z + val.z); EntityStateMachine obj = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Wings"); if (((obj != null) ? ((object)obj.state).GetType() : null) != typeof(Idle)) { ((EntityState)this).characterBody.isSprinting = true; } } FireProjectileInfo val2 = new FireProjectileInfo { projectilePrefab = projectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(direction), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, force = force, crit = ((BaseState)this).RollCrit() }; DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)8); value.damageSource = (DamageSource)2; val2.damageTypeOverride = value; ProjectileManager.instance.FireProjectile(val2); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class SpitBombFuse : AimThrowableBase { private static GameObject INDICATOR = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/BasicThrowableVisualizer.prefab").WaitForCompletion(); [NonSerialized] public static float maxDistanceee = 30f; public override void OnEnter() { base.arcVisualizerPrefab = INDICATOR; base.endpointVisualizerPrefab = ArrowRain.areaIndicatorPrefab; base.rayRadius = 0.5f; base.useGravity = true; base.maxDistance = maxDistanceee; base.minimumDuration = 0.15f; base.baseMinimumDuration = 0.15f; base.setFuse = true; ((BaseState)this).StartAimMode(2f, false); ((AimThrowableBase)this).OnEnter(); } public override void FireProjectile() { ((AimThrowableBase)this).FireProjectile(); Util.PlaySound("Play_nemmerc_knife_throw", ((EntityState)this).gameObject); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace EntityStates.Chirr.Wings { public class BoostUp : BaseState { private Transform hoverEffect; public float boostVelocity; public static float boostAcceleration = 90f; public static float baseDuration = 1f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration; Util.PlaySound("ChirrGrabFlyUp", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } } public override void FixedUpdate() { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { if (((BaseState)this).isGrounded) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } float y = ((EntityState)this).characterMotor.velocity.y; float num = Mathf.Lerp(boostAcceleration, 0f, ((EntityState)this).fixedAge / duration); y += num * Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x, y, ((EntityState)this).characterMotor.velocity.z); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } } public class WingsOn : BaseState { private Transform hoverEffect; public static float hoverVelocity = -3f; public static float hoverAcceleration = 50f; private uint soundId; private float graceTimer = 0.6f; private Animator animator; private bool isToggle; public override void OnEnter() { //IL_0079: 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_0081: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Body", "EnterHover"); animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { animator.SetBool("inHover", true); } Util.PlaySound("ChirrSprintStart", ((EntityState)this).gameObject); soundId = Util.PlaySound("ChirrSprintLoop", ((EntityState)this).gameObject); isToggle = SS2.Survivors.Chirr.toggleHover; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 0x20); } public override void FixedUpdate() { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { float y = ((EntityState)this).characterMotor.velocity.y; y = Mathf.MoveTowards(y, hoverVelocity, hoverAcceleration * Time.fixedDeltaTime); y = Mathf.Max(((EntityState)this).characterMotor.velocity.y, y); ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x, y, ((EntityState)this).characterMotor.velocity.z); if (((EntityState)this).characterMotor.velocity.y >= 0f) { graceTimer -= Time.fixedDeltaTime; } else { graceTimer = 0.6f; } bool num = (((EntityState)this).inputBank.jump.down || isToggle) && graceTimer > 0f && !((EntityState)this).characterMotor.isGrounded; bool flag = isToggle && ((ButtonState)(ref ((EntityState)this).inputBank.jump)).justPressed; if (!num || flag) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -33); AkSoundEngine.StopPlayingID(soundId); Util.PlaySound("ChirrSprintStop", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)animator)) { animator.SetBool("inHover", false); } } } } namespace EntityStates.Chirr.Claws { public class ClawMelee : BaseState { } public class Grabbing : BaseState { public static SkillDef overrideDef; private GrabController grabController; private GrabController victimGrabController; private Collider victimCollider; public static float releaseVictimDistance = 3f; public static float graceTimer = 1.5f; private Transform dropVisualizer; private Animator animator; public override void OnEnter() { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("FullBody, Override", "GrabSuccess"); Util.PlaySound("ChirrGrabStart", ((EntityState)this).gameObject); grabController = ((EntityState)this).GetComponent(); if (((EntityState)this).isAuthority) { victimCollider = grabController.victimColliders[0]; victimGrabController = grabController.victimBodyObject.GetComponent(); } ((EntityState)this).skillLocator.utility.SetSkillOverride((object)((EntityState)this).gameObject, overrideDef, (SkillOverridePriority)4); animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { animator.SetBool("inGrab", true); } dropVisualizer = ((BaseState)this).FindModelChild("DropAngleCone"); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)dropVisualizer)) { ((Component)dropVisualizer).gameObject.SetActive(true); ((Component)dropVisualizer).transform.localScale = AimDrop.maxRayDistance * Vector3.one; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } } public override void FixedUpdate() { //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_011c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!((EntityState)this).isAuthority) { return; } if (Object.op_Implicit((Object)(object)grabController) && !grabController.IsGrabbing()) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (!grabController.victimInfo.body.healthComponent.alive) { grabController.AttemptGrab(null); ((EntityState)this).outer.SetNextStateToMain(); return; } if (Object.op_Implicit((Object)(object)victimGrabController) && victimGrabController.IsGrabbing() && (Object)(object)victimGrabController.victimBodyObject == (Object)(object)((EntityState)this).gameObject) { grabController.AttemptGrab(null); ((EntityState)this).outer.SetNextStateToMain(); } if (((EntityState)this).fixedAge < graceTimer) { return; } if (((BaseState)this).isGrounded) { grabController.AttemptGrab(null); ((EntityState)this).outer.SetNextStateToMain(); return; } Vector3 betterFootPosition = GetBetterFootPosition(); if (((EntityState)this).characterMotor.velocity.y < 0f && Physics.Raycast(betterFootPosition, ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized, releaseVictimDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 9f); EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon"); if (Object.op_Implicit((Object)(object)val) && val.state is AimDrop) { (val.state as AimDrop).cancelled = true; val.SetNextStateToMain(); } grabController.AttemptGrab(null); ((EntityState)this).outer.SetNextStateToMain(); } } public Vector3 GetBetterFootPosition() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) Vector3 position = grabController.victimBodyObject.transform.position; if (Object.op_Implicit((Object)(object)grabController.victimInfo.characterMotor)) { return grabController.victimInfo.body.footPosition; } if (Object.op_Implicit((Object)(object)victimCollider)) { Bounds bounds = victimCollider.bounds; position.y = ((Bounds)(ref bounds)).min.y; return position; } return position; } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)animator)) { animator.SetBool("inGrab", false); } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)grabController) && grabController.IsGrabbing()) { grabController.AttemptGrab(null); } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)dropVisualizer)) { ((Component)dropVisualizer).gameObject.SetActive(false); } ((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)((EntityState)this).gameObject, overrideDef, (SkillOverridePriority)4); } } } namespace EntityStates.Bandit { public class MetalTrap : BaseSkillState { public float baseDuration = 0.5f; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class TranquilizerGun : Bandit2FirePrimaryBase { public override void ModifyBullet(BulletAttack bulletAttack) { //IL_0025: 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_0031: 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) ((Bandit2FirePrimaryBase)this).ModifyBullet(bulletAttack); bulletAttack.damage = SS2.Survivors.Bandit.tranqDamageAmount * ((BaseState)this).damageStat; bulletAttack.radius = SS2.Survivors.Bandit.tranqBulletRadius; bulletAttack.damageType = DamageTypeCombo.GenericPrimary; bulletAttack.falloffModel = (FalloffModel)0; DamageAPI.AddModdedDamageType(bulletAttack, SS2.Survivors.Bandit.TranqDamageType); } } } namespace EntityStates.AI.Walker { public class Fear : BaseAIState { public GameObject fearTarget; private float aiUpdateTimer; protected Vector3 myBodyFootPosition; private float lastPathUpdate; private float fallbackNodeStartAge; private readonly float fallbackNodeDuration = 4f; public override void OnEnter() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) ((BaseAIState)this).OnEnter(); if (Object.op_Implicit((Object)(object)((BaseAIState)this).ai)) { Agent broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; AgentOutput output = ((Agent)(ref broadNavigationAgent)).output; lastPathUpdate = ((AgentOutput)(ref output)).lastPathUpdate; broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; ((Agent)(ref broadNavigationAgent)).InvalidatePath(); } fallbackNodeStartAge = float.NegativeInfinity; } public override void FixedUpdate() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown ((BaseAIState)this).FixedUpdate(); if (!Object.op_Implicit((Object)(object)((BaseAIState)this).ai) || !Object.op_Implicit((Object)(object)((BaseAIState)this).body)) { return; } aiUpdateTimer -= Time.fixedDeltaTime; UpdateFootPosition(); if (aiUpdateTimer <= 0f) { aiUpdateTimer = BaseAIState.cvAIUpdateInterval.value; UpdateAI(BaseAIState.cvAIUpdateInterval.value); if (!((BaseAIState)this).body.HasBuff(SS2Content.Buffs.BuffFear)) { ((EntityState)this).outer.SetNextState((EntityState)new LookBusy()); } } } protected void UpdateFootPosition() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) myBodyFootPosition = ((BaseAIState)this).body.footPosition; Agent broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; ((Agent)(ref broadNavigationAgent)).currentPosition = myBodyFootPosition; } protected void UpdateAI(float deltaTime) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) SkillDriverEvaluation skillDriverEvaluation = ((BaseAIState)this).ai.skillDriverEvaluation; base.bodyInputs.moveVector = Vector3.zero; float num = 1f; if (!Object.op_Implicit((Object)(object)((BaseAIState)this).body) || !Object.op_Implicit((Object)(object)((BaseAIState)this).bodyInputBank)) { return; } Vector3 position = ((BaseAIState)this).bodyTransform.position; Agent broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; AgentOutput output = ((Agent)(ref broadNavigationAgent)).output; GameObject val = (Object.op_Implicit((Object)(object)fearTarget) ? fearTarget : ((skillDriverEvaluation.target != null) ? skillDriverEvaluation.target.gameObject : null)); if (Object.op_Implicit((Object)(object)(((Object)(object)val != (Object)null) ? val.gameObject : null))) { Vector3 position2 = val.transform.position; Vector3 val2 = position; Vector3 val3 = position2 - myBodyFootPosition; Vector3 val4 = ((Vector3)(ref val3)).normalized * 10f; val2 -= val4; if (fallbackNodeStartAge + fallbackNodeDuration < ((EntityState)this).fixedAge) { ((BaseAIState)this).ai.SetGoalPosition((Vector3?)val2); } ((BaseAIState)this).ai.localNavigator.targetPosition = val2; ((BaseAIState)this).ai.localNavigator.allowWalkOffCliff = true; ((BaseAIState)this).ai.localNavigator.Update(deltaTime); base.bodyInputs.moveVector = ((BaseAIState)this).ai.localNavigator.moveVector; ref Vector3 moveVector = ref base.bodyInputs.moveVector; moveVector *= num; } if (((AgentOutput)(ref output)).lastPathUpdate > lastPathUpdate && !((AgentOutput)(ref output)).targetReachable && fallbackNodeStartAge + fallbackNodeDuration < ((EntityState)this).fixedAge) { ((Agent)(ref broadNavigationAgent)).goalPosition = ((BaseAIState)this).PickRandomNearbyReachablePosition(); ((Agent)(ref broadNavigationAgent)).InvalidatePath(); } lastPathUpdate = ((AgentOutput)(ref output)).lastPathUpdate; } public override BodyInputs GenerateBodyInputs(in BodyInputs previousBodyInputs) { //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_0086: Unknown result type (might be due to invalid IL or missing references) base.bodyInputs.pressSkill1 = false; base.bodyInputs.pressSkill2 = false; base.bodyInputs.pressSkill3 = false; base.bodyInputs.pressSkill4 = false; base.bodyInputs.pressSprint = false; base.bodyInputs.pressActivateEquipment = false; base.bodyInputs.desiredAimDirection = Vector3.zero; Target aimTarget = ((BaseAIState)this).ai.skillDriverEvaluation.aimTarget; if (aimTarget != null) { ((BaseAIState)this).AimAt(ref base.bodyInputs, aimTarget); } ((BaseAIState)this).ModifyInputsForJumpIfNeccessary(ref base.bodyInputs); return base.bodyInputs; } } public class FollowLeader : BaseAIState { public GameObject leader; private float aiUpdateTimer; protected Vector3 myBodyFootPosition; private float lastPathUpdate; private float fallbackNodeStartAge; private readonly float fallbackNodeDuration = 4f; public static float hardTrailDistance = 16f; public static float minTrailDistance = 8f; public static float trailHeight = 10f; public static float targetReachedDistance = 5f; private Vector3 targetTrailPosition; public override void OnEnter() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) ((BaseAIState)this).OnEnter(); if (Object.op_Implicit((Object)(object)((BaseAIState)this).ai)) { Agent broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; AgentOutput output = ((Agent)(ref broadNavigationAgent)).output; lastPathUpdate = ((AgentOutput)(ref output)).lastPathUpdate; broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; ((Agent)(ref broadNavigationAgent)).InvalidatePath(); } targetTrailPosition = Vector2.op_Implicit(Random.insideUnitCircle * Random.Range(minTrailDistance, hardTrailDistance)); if (!Object.op_Implicit((Object)(object)leader) && Object.op_Implicit((Object)(object)((BaseAIState)this).ai.master.minionOwnership.ownerMaster)) { leader = ((BaseAIState)this).ai.master.minionOwnership.ownerMaster.GetBodyObject(); } fallbackNodeStartAge = float.NegativeInfinity; ((BaseAIState)this).ai.currentEnemy.Reset(); GlobalEventManager.onServerDamageDealt += CopyLeaderTarget; } public override void OnExit() { ((BaseAIState)this).OnExit(); GlobalEventManager.onServerDamageDealt -= CopyLeaderTarget; } private void CopyLeaderTarget(DamageReport damageReport) { if ((Object)(object)damageReport.attacker == (Object)(object)leader) { ((BaseAIState)this).ai.currentEnemy.gameObject = ((Component)damageReport.victim).gameObject; ((BaseAIState)this).ai.currentEnemy.bestHurtBox = damageReport.victimBody.mainHurtBox; } } private bool IsCombatDriver(AISkillDriver driver) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 if (!Object.op_Implicit((Object)(object)driver)) { return false; } return ((int)driver.skillSlot != -1) | (driver.maxDistance != float.PositiveInfinity); } public override void FixedUpdate() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown ((BaseAIState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((BaseAIState)this).ai) && Object.op_Implicit((Object)(object)((BaseAIState)this).body)) { if (IsCombatDriver(((BaseAIState)this).ai.skillDriverEvaluation.dominantSkillDriver)) { ((EntityState)this).outer.SetNextState((EntityState)new Combat()); } aiUpdateTimer -= Time.fixedDeltaTime; UpdateFootPosition(); if (aiUpdateTimer <= 0f) { aiUpdateTimer = BaseAIState.cvAIUpdateInterval.value; UpdateAI(BaseAIState.cvAIUpdateInterval.value); } } } protected void UpdateFootPosition() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) myBodyFootPosition = ((BaseAIState)this).body.footPosition; Agent broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; ((Agent)(ref broadNavigationAgent)).currentPosition = myBodyFootPosition; } protected void UpdateAI(float deltaTime) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: 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_01ac: 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_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) _ = ((BaseAIState)this).ai.skillDriverEvaluation; base.bodyInputs.moveVector = Vector3.zero; float num = 1f; if (!Object.op_Implicit((Object)(object)((BaseAIState)this).body) || !Object.op_Implicit((Object)(object)((BaseAIState)this).bodyInputBank)) { return; } Vector3 position = ((BaseAIState)this).bodyTransform.position; Agent broadNavigationAgent = ((BaseAIState)this).ai.broadNavigationAgent; AgentOutput output = ((Agent)(ref broadNavigationAgent)).output; if (Object.op_Implicit((Object)(object)leader)) { Vector3 val = leader.transform.position; Vector3 val2 = leader.transform.position - position; if (((Vector3)(ref val2)).magnitude <= hardTrailDistance) { val += targetTrailPosition; } val2 = val - ((BaseAIState)this).body.footPosition; bool flag = ((Vector3)(ref val2)).magnitude < targetReachedDistance; if (((BaseAIState)this).body.isFlying || !Object.op_Implicit((Object)(object)((BaseAIState)this).body.characterMotor)) { val.y += trailHeight; } if (fallbackNodeStartAge + fallbackNodeDuration < ((EntityState)this).fixedAge) { ((BaseAIState)this).ai.SetGoalPosition((Vector3?)val); } Vector3 targetPosition = (Vector3)(((??)((AgentOutput)(ref output)).nextPosition) ?? myBodyFootPosition); ((BaseAIState)this).ai.localNavigator.targetPosition = targetPosition; ((BaseAIState)this).ai.localNavigator.allowWalkOffCliff = true; ((BaseAIState)this).ai.localNavigator.Update(deltaTime); base.bodyInputs.moveVector = ((!flag) ? ((BaseAIState)this).ai.localNavigator.moveVector : Vector3.zero); ref Vector3 moveVector = ref base.bodyInputs.moveVector; moveVector *= num; } if (((AgentOutput)(ref output)).lastPathUpdate > lastPathUpdate && !((AgentOutput)(ref output)).targetReachable && fallbackNodeStartAge + fallbackNodeDuration < ((EntityState)this).fixedAge) { ((Agent)(ref broadNavigationAgent)).goalPosition = ((BaseAIState)this).PickRandomNearbyReachablePosition(); ((Agent)(ref broadNavigationAgent)).InvalidatePath(); } lastPathUpdate = ((AgentOutput)(ref output)).lastPathUpdate; } public override BodyInputs GenerateBodyInputs(in BodyInputs previousBodyInputs) { //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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) base.bodyInputs.pressSkill1 = false; base.bodyInputs.pressSkill2 = false; base.bodyInputs.pressSkill3 = false; base.bodyInputs.pressSkill4 = false; base.bodyInputs.pressSprint = false; base.bodyInputs.pressActivateEquipment = false; base.bodyInputs.desiredAimDirection = Vector3.zero; base.bodyInputs.desiredAimDirection = base.bodyInputs.moveVector; ((BaseAIState)this).ModifyInputsForJumpIfNeccessary(ref base.bodyInputs); return base.bodyInputs; } } } namespace EntityStates.Agarthan { internal class Bite : BasicMeleeAttack { public override void OnEnter() { ((BasicMeleeAttack)this).OnEnter(); base.swingEffectPrefab = Bite.biteEffectPrefab; base.hitEffectPrefab = Bite.hitEffectPrefab; ((EntityState)this).PlayCrossfade("Gesture", "Bite", "Bite.playbackRate", base.duration, 0.05f); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class Spit : BaseSkillState { public static float baseDuration; public static float baseDurToSpit; private float duration; private float durToSpit; private bool isSpitting; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; durToSpit = baseDurToSpit / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture, Override", "StandUp"); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!isSpitting && Time.fixedDeltaTime >= durToSpit) { isSpitting = true; ((EntityState)this).PlayAnimation("Gesture, Override", "StandSpit"); } if (Time.fixedDeltaTime >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("Gesture, Override", "SpitExit"); } } } namespace EntityStates.AffixStorm { public class DeathState : BaseState { public class AffixStormStrikeOrb : GenericDamageOrb, IOrbFixedUpdateBehavior { private Vector3 lastKnownTargetPosition; public override void Begin() { ((GenericDamageOrb)this).Begin(); ((Orb)this).duration = orbDuration; } public void FixedUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((Orb)this).target)) { lastKnownTargetPosition = ((Component)((Orb)this).target).transform.position; } } public override GameObject GetOrbEffect() { return LegacyResourcesAPI.Load("Prefabs/Effects/OrbEffects/LightningStrikeOrbEffect"); } public override void OnArrival() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: 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_009b: 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00c9: Unknown result type (might be due to invalid IL or missing references) EffectManager.SpawnEffect(LegacyResourcesAPI.Load("Prefabs/Effects/ImpactEffects/LightningStrikeImpact"), new EffectData { origin = lastKnownTargetPosition }, true); new BlastAttack { attacker = base.attacker, baseDamage = base.damageValue, baseForce = 0f, bonusForce = Vector3.down * 3000f, crit = base.isCrit, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)16777216), falloffModel = (FalloffModel)1, inflictor = null, position = lastKnownTargetPosition, procChainMask = base.procChainMask, procCoefficient = 0f, radius = 3f, teamIndex = base.teamIndex }.Fire(); } } public static GameObject spawnEffectPrefab; public static GameObject spawnBrightEffectPrefab; private static float baseDuration = 0.3f; private static float searchRadius = 32f; private static float damageCoefficient = 3f; private static float percentHealthDamage = 0.15f; private static float bodySearchRadiusCoefficient = 5f; private static float intervalVariance = 0.5f; private static int baseTargets = 3; private static float orbDuration = 0.5f; private float durationFromBody; private float fireInterval; private float searchRadiusFromBody; private int targetsFromBody; private Queue targetQueue; private float fireTimer; private TeamIndex killerTeamIndex; private GameObject killer; public override void OnEnter() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_0089: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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_018c: 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_0198: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); float num = Mathf.Max(((EntityState)this).characterBody.radius, 1f); Util.PlayAttackSpeedSound("Play_golem_laser_fire", ((EntityState)this).gameObject, 2f); if (Object.op_Implicit((Object)(object)spawnEffectPrefab)) { GameObject val = spawnEffectPrefab; if (SS2.Storm.brightStages.Contains(DirectorAPI.GetStageEnumFromSceneDef(Stage.instance.sceneDef))) { val = spawnBrightEffectPrefab; } EffectManager.SpawnEffect(val, new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = num }, false); } if (Object.op_Implicit((Object)(object)((EntityState)this).sfxLocator) && ((EntityState)this).sfxLocator.barkSound != "") { Util.PlaySound(((EntityState)this).sfxLocator.barkSound, ((EntityState)this).gameObject); } if (NetworkServer.active) { killer = ((EntityState)this).healthComponent.lastHitAttacker; killerTeamIndex = TeamComponent.GetObjectTeam(killer); searchRadiusFromBody = num * bodySearchRadiusCoefficient + searchRadius; targetsFromBody = baseTargets + Mathf.RoundToInt(num - 1f); durationFromBody = (float)Mathf.RoundToInt(num) * baseDuration; fireInterval = durationFromBody / (float)targetsFromBody; TeamMask none = TeamMask.none; ((TeamMask)(ref none)).AddTeam(((EntityState)this).teamComponent.teamIndex); HurtBox[] hurtBoxes = new SphereSearch { origin = ((EntityState)this).characterBody.corePosition, radius = searchRadiusFromBody, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, queryTriggerInteraction = (QueryTriggerInteraction)0 }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(none).OrderCandidatesByDistance() .FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); targetQueue = new Queue(); foreach (HurtBox val2 in hurtBoxes) { if ((Object)(object)val2.healthComponent != (Object)(object)((EntityState)this).healthComponent) { targetQueue.Enqueue(val2); } if (targetQueue.Count >= targetsFromBody) { break; } } } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { EntityState.Destroy((Object)(object)((Component)modelTransform).gameObject); } } public override void FixedUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody)) { ((EntityState)this).rigidbody.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (NetworkServer.active) { fireTimer -= Time.fixedDeltaTime; if (fireTimer <= 0f) { float num = fireInterval * intervalVariance; fireTimer += Random.Range(fireInterval - num, fireInterval); FireLightning(); } if (((EntityState)this).fixedAge >= durationFromBody || targetQueue.Count == 0) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } } private void FireLightning() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Invalid comparison between Unknown and I4 //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) if (targetQueue.Count != 0) { TeamIndex val = killerTeamIndex; if ((int)val == -1) { val = (TeamIndex)0; } HurtBox target = targetQueue.Dequeue(); float damageValue = ((EntityState)this).characterBody.damage * damageCoefficient + ((EntityState)this).characterBody.healthComponent.fullHealth * percentHealthDamage; OrbManager.instance.AddOrb((Orb)(object)new AffixStormStrikeOrb { attacker = killer, damageColorIndex = (DamageColorIndex)0, teamIndex = val, damageValue = damageValue, isCrit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), procChainMask = default(ProcChainMask), damageType = DamageTypeCombo.op_Implicit((DamageType)16777216), procCoefficient = 0f, target = target }); } } public override void OnExit() { ((EntityState)this).OnExit(); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } public class SpawnState : BaseState { public static float duration = 0.5f; public static GameObject spawnBrightEffectPrefab; public static GameObject spawnEffectPrefab; public override void OnEnter() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown ((BaseState)this).OnEnter(); if (Object.op_Implicit((Object)(object)spawnEffectPrefab)) { GameObject val = spawnEffectPrefab; if (SS2.Storm.brightStages.Contains(DirectorAPI.GetStageEnumFromSceneDef(Stage.instance.sceneDef))) { val = spawnBrightEffectPrefab; } EffectManager.SpawnEffect(val, new EffectData { origin = ((EntityState)this).characterBody.corePosition, scale = ((EntityState)this).characterBody.radius }, false); } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 0.6f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matLightningSpawn", SS2Bundle.Equipments); obj.AddToCharacterModel(((Component)modelTransform).GetComponent()); TemporaryOverlayInstance obj2 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj2.duration = 0.7f; obj2.animateShaderAlpha = true; obj2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj2.destroyComponentOnEnd = true; obj2.originalMaterial = SS2Assets.LoadAsset("matLightningSpawnExpanded", SS2Bundle.Equipments); obj2.AddToCharacterModel(((Component)modelTransform).GetComponent()); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } } namespace EntityStates.AffixEmpyrean { public class SpawnState : BaseState { private Animator animator; private AimAnimator aimAnimator; public static float duration = 2.95f; public static GameObject spawnEffectPrefab; public override void OnEnter() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_014a: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0114: 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_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Expected O, but got Unknown ((BaseState)this).OnEnter(); float num = float.PositiveInfinity; float num2 = float.NegativeInfinity; float num3 = float.PositiveInfinity; float num4 = float.NegativeInfinity; HurtBox[] hurtBoxes = ((EntityState)this).characterBody.hurtBoxGroup.hurtBoxes; foreach (HurtBox val in hurtBoxes) { Bounds bounds = val.collider.bounds; if (((Bounds)(ref bounds)).min.x < num) { bounds = val.collider.bounds; num = ((Bounds)(ref bounds)).min.x; } bounds = val.collider.bounds; if (((Bounds)(ref bounds)).max.x > num2) { bounds = val.collider.bounds; num2 = ((Bounds)(ref bounds)).max.x; } bounds = val.collider.bounds; if (((Bounds)(ref bounds)).min.z < num3) { bounds = val.collider.bounds; num3 = ((Bounds)(ref bounds)).min.z; } bounds = val.collider.bounds; if (((Bounds)(ref bounds)).max.z > num4) { bounds = val.collider.bounds; num4 = ((Bounds)(ref bounds)).max.z; } } num -= ((EntityState)this).characterBody.corePosition.x; num2 -= ((EntityState)this).characterBody.corePosition.x; num3 -= ((EntityState)this).characterBody.corePosition.z; num4 -= ((EntityState)this).characterBody.corePosition.z; float num5 = Mathf.Max(new float[4] { num, num2, num3, num4 }); num5 = Mathf.Max(num5, 1f); int itemCount = ((EntityState)this).characterBody.inventory.GetItemCount(SS2Content.Items.BoostCharacterSize); num5 *= 1f + (float)itemCount / 100f; animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { ((EntityState)this).PlayAnimation("Body", "Idle"); animator.Play("Idle", animator.GetLayerIndex("Body"), 0.5f); animator.SetBool("isGrounded", true); animator.SetFloat("aimPitchCycle", 0.5f); animator.SetFloat("aimYawCycle", 0.5f); } aimAnimator = ((EntityState)this).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = false; } if (NetworkServer.active && Object.op_Implicit((Object)(object)spawnEffectPrefab)) { EffectManager.SpawnEffect(spawnEffectPrefab, new EffectData { origin = (((EntityState)this).characterBody.isFlying ? ((EntityState)this).characterBody.corePosition : ((EntityState)this).characterBody.footPosition), scale = num5 }, true); } CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 0x4000); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 3f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.Linear(0f, 0.3f, 1f, 1f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matRainbowSpawnOverlay2", SS2Bundle.Equipments); obj.AddToCharacterModel(((Component)modelTransform).gameObject.GetComponent()); PrintController component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!Object.op_Implicit((Object)(object)animator)) { animator = ((EntityState)this).GetModelAnimator(); } if (Object.op_Implicit((Object)(object)animator)) { ((Behaviour)animator).enabled = false; } if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0081: 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) ((EntityState)this).OnExit(); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 0.3f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = SS2Assets.LoadAsset("matRainbowSpawnOverlayBright", SS2Bundle.Equipments); obj.AddToCharacterModel(((Component)modelTransform).gameObject.GetComponent()); } CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & 0x4000); if (Object.op_Implicit((Object)(object)animator)) { ((Behaviour)animator).enabled = true; } if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = true; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } } namespace EntityStates.Acrid { public class CorrodingSpit : BaseSkillState { public GameObject effectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/MuzzleflashCroco.prefab").WaitForCompletion(); [SerializeField] public float baseDuration = 2f; [SerializeField] public float damageCoefficient = 0.7f; [SerializeField] public float force = 20f; [SerializeField] public string attackString; [SerializeField] public float recoilAmplitude; [SerializeField] public float bloom; private float duration; public override void OnEnter() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_00df: 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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Ray aimRay = ((BaseState)this).GetAimRay(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(duration + 2f, false); ((EntityState)this).PlayAnimation("Gesture, Mouth", "FireSpit", "FireSpit.playbackRate", duration, 0f); Util.PlaySound(attackString, ((EntityState)this).gameObject); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -1.5f * recoilAmplitude, -0.25f * recoilAmplitude, 0.25f * recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(bloom); string text = "MouthMuzzle"; if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false); } if (((EntityState)this).isAuthority) { FireProjectileInfo val = new FireProjectileInfo { damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)0), projectilePrefab = SS2.Survivors.Acrid.corrodingSpitProjectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * damageCoefficient, force = force, crit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master) }; ProjectileManager.instance.FireProjectile(val); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.AcidBug { public class AcidBugMain : FlyState { private static float turnSpeed = 360f; private static float turnSmoothTime = 0.1f; private static float minY = -0.6f; private static float maxY = 0.6f; private Vector3 targetRotationVelocity; public override void FixedUpdate() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) ((FlyState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { Vector3 forward = ((EntityState)this).transform.forward; Vector3 val = ((EntityState)this).inputBank.aimDirection; val.y = Mathf.Clamp(val.y, minY, maxY); val = ((Vector3)(ref val)).normalized; Vector3 val2 = Vector3.SmoothDamp(forward, val, ref targetRotationVelocity, turnSmoothTime, turnSpeed); ((EntityState)this).rigidbody.MoveRotation(Util.QuaternionSafeLookRotation(val2)); ((EntityState)this).rigidbody.angularVelocity = Vector3.zero; } } } public class Dash : BaseSkillState { private static float minDistance = 6f; private static float maxDistance = 18f; private static float baseDuration = 0.25f; private static float minPauseDuration = 0.05f; private static float maxPauseDuration = 0.25f; private static int maxRepeats = 1; private static float repeatPercentChance = 40f; private static float repeatDistanceCoefficient = 0.5f; private static float spreadAngle = 45f; private static string enterSoundString; public static GameObject effectPrefab; private float duration; private float pauseDuration; private float speed; private bool shouldRepeat; private Vector3 dashVector; public int repeatCount; private bool isRepeat => repeatCount > 0; public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void OnSerialize(NetworkWriter writer) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) writer.Write(duration); writer.Write(dashVector); } public override void OnDeserialize(NetworkReader reader) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) duration = reader.ReadSingle(); dashVector = reader.ReadVector3(); } public override void OnEnter() { //IL_00f4: 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_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_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_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: 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_01dd: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (((EntityState)this).isAuthority) { duration = baseDuration; float num = Random.Range(minDistance, maxDistance); bool num2 = Random.Range(0f, 1f) > 0.5f; if (isRepeat) { num *= repeatDistanceCoefficient; } speed = num / duration; Vector3 val = ((EntityState)this).transform.right; if (!num2) { val *= -1f; } dashVector = Util.ApplySpread(val, 0f, spreadAngle, 1f, 1f, 0f, 0f); shouldRepeat = repeatCount < maxRepeats && Util.CheckRoll(repeatPercentChance, 0f, (CharacterMaster)null); pauseDuration = Random.Range(minPauseDuration, maxPauseDuration); } Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { Vector3 val2 = new Vector3(((EntityState)this).transform.forward.x, 0f, ((EntityState)this).transform.forward.z); Vector3 normalized = ((Vector3)(ref val2)).normalized; Vector3 val3 = Vector3.Cross(Vector3.up, normalized); float num3 = Vector3.Dot(dashVector, normalized); float num4 = Vector3.Dot(dashVector, val3); modelAnimator.SetFloat("dashForwardSpeed", num3); modelAnimator.SetFloat("dashRightSpeed", num4); } ((EntityState)this).PlayAnimation("FullBody, Override", "Dash", "Dash.playbackRate", duration, 0f); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectData val4 = new EffectData { origin = ((EntityState)this).transform.position, rotation = Util.QuaternionSafeLookRotation(dashVector), start = ((EntityState)this).transform.forward }; EffectManager.SpawnEffect(effectPrefab, val4, false); } ((EntityState)this).rigidbody.collisionDetectionMode = (CollisionDetectionMode)2; } public override void OnExit() { ((EntityState)this).rigidbody.collisionDetectionMode = (CollisionDetectionMode)0; ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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) ((EntityState)this).FixedUpdate(); if (!((EntityState)this).isAuthority) { return; } if (((EntityState)this).fixedAge < duration) { ((EntityState)this).rigidbodyMotor.AddDisplacement(dashVector * speed * Time.fixedDeltaTime); ((EntityState)this).rigidbody.angularVelocity = Vector3.zero; ((EntityState)this).rigidbody.MoveRotation(Util.QuaternionSafeLookRotation(((EntityState)this).inputBank.aimDirection)); } if (((EntityState)this).fixedAge >= duration + pauseDuration) { if (shouldRepeat) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Dash { repeatCount = repeatCount + 1 }); } else { ((EntityState)this).outer.SetNextStateToMain(); } } } } public class DeathState : GenericCharacterDeath { public class RigidbodyCollisionListener : MonoBehaviour { public DeathState deathState; private void OnCollisionEnter(Collision collision) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) DeathState obj = deathState; ContactPoint contact = collision.GetContact(0); Vector3 point = ((ContactPoint)(ref contact)).point; contact = collision.GetContact(0); obj.OnImpact(point, ((ContactPoint)(ref contact)).normal); } } public static GameObject initialExplosionEffect; public static GameObject deathExplosionEffect; private static string initialSoundString; private static string deathSoundString = "Play_jellyfish_death"; private static float extraForce = 140f; private static float forceMultiplier = 3f; private static float wallSplatAngle = 30f; private static float groundNormalOffset = 0f; private static float deathDuration = 8f; private static float extraGravity = 0.33f; private RigidbodyCollisionListener rigidbodyCollisionListener; public override bool shouldAutoDestroy => false; public override void OnEnter() { //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_0086: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Invalid comparison between Unknown and I4 ((GenericCharacterDeath)this).OnEnter(); Util.PlaySound(initialSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { ((Behaviour)((EntityState)this).rigidbodyMotor).enabled = false; ((EntityState)this).rigidbody.useGravity = true; ((EntityState)this).rigidbody.collisionDetectionMode = (CollisionDetectionMode)1; rigidbodyCollisionListener = ((EntityState)this).gameObject.AddComponent(); if (Object.op_Implicit((Object)(object)rigidbodyCollisionListener)) { rigidbodyCollisionListener.deathState = this; } AcidBugForceCollector acidBugForceCollector = default(AcidBugForceCollector); if (NetworkServer.active && ((EntityState)this).TryGetComponent(ref acidBugForceCollector)) { PhysForceInfo val = PhysForceInfo.Create(); ((PhysForceInfo)(ref val)).resetVelocity = true; Vector3 val2 = acidBugForceCollector.force * forceMultiplier; Vector3 force = acidBugForceCollector.force; val.force = val2 + ((Vector3)(ref force)).normalized * extraForce; ((EntityState)this).healthComponent.TakeDamageForce(val); } } if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyDirection)) { ((Behaviour)((EntityState)this).rigidbodyDirection).enabled = false; } if (Object.op_Implicit((Object)(object)initialExplosionEffect) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { EffectManager.SpawnEffect(initialExplosionEffect, new EffectData { origin = ((EntityState)this).characterBody.corePosition }, false); } Transform val3 = ((BaseState)this).FindModelChild("WingFX"); if (Object.op_Implicit((Object)(object)val3)) { ((Component)val3).gameObject.SetActive(false); } Transform val4 = ((BaseState)this).FindModelChild("WingMesh"); if (Object.op_Implicit((Object)(object)val4)) { ((Component)val4).gameObject.SetActive(true); } if ((int)DamageTypeCombo.op_Implicit(((EntityState)this).healthComponent.killingDamageType) == int.MinValue) { ((GenericCharacterDeath)this).DestroyModel(); ((GenericCharacterDeath)this).DestroyBodyAsapServer(); } } private void OnImpact(Vector3 hitPoint, Vector3 hitNormal) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_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_00be: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator) && Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { ((Behaviour)((EntityState)this).modelLocator).enabled = false; Vector3 val = hitPoint + hitNormal * groundNormalOffset; Quaternion val2 = Quaternion.FromToRotation(Vector3.up, hitNormal) * ((GenericCharacterDeath)this).cachedModelTransform.rotation; ((GenericCharacterDeath)this).cachedModelTransform.SetPositionAndRotation(val, val2); } if (Vector3.Angle(((EntityState)this).transform.forward, Vector3.up) > wallSplatAngle) { ((EntityState)this).PlayAnimation("Body", "SplatWall"); } else { ((EntityState)this).PlayAnimation("Body", "SplatGround"); } if (Object.op_Implicit((Object)(object)deathExplosionEffect)) { Object.Instantiate(deathExplosionEffect, ((EntityState)this).characterBody.corePosition, Util.QuaternionSafeLookRotation(hitNormal)).transform.parent = ((GenericCharacterDeath)this).cachedModelTransform; } Explode(); } public override void FixedUpdate() { //IL_0021: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody)) { ((EntityState)this).rigidbody.AddForce(Physics.gravity * extraGravity, (ForceMode)5); Quaternion val = Util.QuaternionSafeLookRotation(-((EntityState)this).rigidbody.velocity); ((EntityState)this).rigidbody.MoveRotation(val); } if (((EntityState)this).fixedAge > deathDuration) { Explode(); } } } public void Explode() { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } public override void OnExit() { if (Object.op_Implicit((Object)(object)rigidbodyCollisionListener)) { EntityState.Destroy((Object)(object)rigidbodyCollisionListener); } Util.PlaySound(deathSoundString, ((EntityState)this).gameObject); ((GenericCharacterDeath)this).OnExit(); } } public class FireAcid : BaseState { public static GameObject chargeEffectPrefab; public static GameObject projectilePrefab; public static GameObject muzzleEffectPrefab; private static float minSpeed = 70f; private static float maxSpeed = 120f; private static float minSpreadCoefficient = 0.5f; private static float minSpread = 0.5f; private static float maxSpread = 8f; private static float spreadYaw = 3f; private static float spreadPitch = 1f; private static int projectileCount = 3; private static string enterSoundString = "ChirrFireSpitBomb"; private static string attackSoundString = "ChirrFireSpitBomb"; private string muzzleName = "Muzzle"; private static float baseDuration = 1.1f; private static float fireTime = 0.55f; private static float damageCoefficient = 1.33f; private static float force = 100f; private static float selfAwayForce = 11f; private static float selfUpForce = 11f; private float duration; private GameObject chargeEffect; private bool hasFired; private float chargeDuration => duration * fireTime; public override void OnEnter() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).rigidbodyMotor.moveVector = Vector3.zero; Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); Transform val = ((BaseState)this).FindModelChild("Muzzle"); if (Object.op_Implicit((Object)(object)val)) { chargeEffect = Object.Instantiate(chargeEffectPrefab, val.position, val.rotation); chargeEffect.transform.parent = val; ScaleParticleSystemDuration component = chargeEffectPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = chargeDuration; } } ((BaseState)this).StartAimMode(2f, false); ((EntityState)this).PlayAnimation("FullBody, Override", "FireAcid", "FireAcid.playbackRate", duration, 0f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).fixedAge >= chargeDuration) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_019d: 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_01a6: Unknown result type (might be due to invalid IL or missing references) hasFired = true; Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleName, false); if (Object.op_Implicit((Object)(object)chargeEffect)) { EntityState.Destroy((Object)(object)chargeEffect); } Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; if (((EntityState)this).isAuthority) { Vector3 val = -1f * direction * selfAwayForce; val += Vector3.up * selfUpForce; ((EntityState)this).rigidbody.AddForce(val, (ForceMode)0); Transform val2 = ((BaseState)this).FindModelChild("Muzzle"); bool crit = ((BaseState)this).RollCrit(); for (int i = 0; i < projectileCount; i++) { float num = (float)i / (float)projectileCount; float num2 = Mathf.Lerp(minSpread, maxSpread * minSpreadCoefficient, num); float num3 = Mathf.Lerp(minSpread, maxSpread, num); Vector3 val3 = Util.ApplySpread(direction, num2, num3, spreadYaw, spreadPitch, 0f, 0f); float speedOverride = Random.Range(minSpeed, maxSpeed); FireProjectileInfo val4 = new FireProjectileInfo { projectilePrefab = projectilePrefab, position = (Object.op_Implicit((Object)(object)val2) ? val2.position : ((Ray)(ref aimRay)).origin), rotation = Util.QuaternionSafeLookRotation(val3), owner = ((EntityState)this).gameObject, damage = base.damageStat * damageCoefficient, force = force, crit = crit }; ((FireProjectileInfo)(ref val4)).speedOverride = speedOverride; FireProjectileInfo val5 = val4; ProjectileManager.instance.FireProjectile(val5); } } } public override void OnExit() { if (Object.op_Implicit((Object)(object)chargeEffect)) { EntityState.Destroy((Object)(object)chargeEffect); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class HurtState : HurtStateFlyer { public override void OnEnter() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) ((HurtStateFlyer)this).OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { ((EntityState)this).rigidbodyMotor.moveVector = Vector3.zero; } } } public class SpawnState : GenericCharacterSpawnState { public override void OnEnter() { ((GenericCharacterSpawnState)this).OnEnter(); Transform val = ((BaseState)this).FindModelChild("WingFX"); if (Object.op_Implicit((Object)(object)val)) { ((Component)val).gameObject.SetActive(true); } Transform val2 = ((BaseState)this).FindModelChild("WingMesh"); if (Object.op_Implicit((Object)(object)val2)) { ((Component)val2).gameObject.SetActive(false); } } } } namespace EntityStates.AcidBug.Mine { public class Arming : EntityState { private static float duration = 0.45f; private ProjectileStickOnImpact stickOnImpact; public override void OnEnter() { ((EntityState)this).OnEnter(); stickOnImpact = ((EntityState)this).GetComponent(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (NetworkServer.active) { if (Object.op_Implicit((Object)(object)stickOnImpact) && (Object)(object)stickOnImpact.stuckBody != (Object)null) { base.outer.SetNextState((EntityState)(object)new PreDetonate()); } else if (((EntityState)this).fixedAge >= duration) { base.outer.SetNextState((EntityState)(object)new WaitForTarget()); } } } } public class WaitForTarget : EntityState { private ProjectileSphereTargetFinder targetFinder; private ProjectileTargetComponent targetComponent; private static float triggerRadius = 7f; private static float maxDuration = 5f; public override void OnEnter() { ((EntityState)this).OnEnter(); if (NetworkServer.active) { targetComponent = ((EntityState)this).GetComponent(); targetFinder = ((EntityState)this).GetComponent(); ((Behaviour)targetFinder).enabled = true; targetFinder.lookRange = triggerRadius; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (NetworkServer.active && ((Object)(object)targetComponent.target != (Object)null || ((EntityState)this).fixedAge >= maxDuration)) { base.outer.SetNextState((EntityState)(object)new PreDetonate()); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)targetFinder)) { ((Behaviour)targetFinder).enabled = false; } ((EntityState)this).OnExit(); } } public class PreDetonate : BaseState { private static float warningRadius = 10f; private static float duration = 0.75f; private static string enterSoundString = ""; private static float minEmission = 0.1f; private static float maxEmission = 1f; private Renderer modelRenderer; private MaterialPropertyBlock propertyBlock; public override void OnEnter() { //IL_004b: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Base", "Detonate", "Detonate.playbackRate", duration, 0f); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); Transform val = ((BaseState)this).FindModelChild("Warning"); if (Object.op_Implicit((Object)(object)val)) { val.localScale = Vector3.one * warningRadius; ObjectScaleCurve val2 = default(ObjectScaleCurve); if (((Component)val).TryGetComponent(ref val2)) { val2.timeMax = duration; } ((Component)val).gameObject.SetActive(true); } Transform val3 = ((BaseState)this).FindModelChild("AcidBalls"); Renderer val4 = default(Renderer); if (Object.op_Implicit((Object)(object)val3) && ((Component)val3).TryGetComponent(ref val4)) { propertyBlock = new MaterialPropertyBlock(); modelRenderer = val4; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)modelRenderer)) { float num = ((EntityState)this).fixedAge / duration; float num2 = Mathf.Lerp(minEmission, maxEmission, num); modelRenderer.GetPropertyBlock(propertyBlock); propertyBlock.SetFloat("_EmPower", num2); modelRenderer.SetPropertyBlock(propertyBlock); } if (NetworkServer.active && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Detonate()); } } } public class Detonate : EntityState { public static GameObject explosionEffectPrefab; private static float blastRadius = 10f; private static float damageCoefficient = 3f; private static float force = 300f; public override void OnEnter() { ((EntityState)this).OnEnter(); if (NetworkServer.active) { Explode(); } } private void Explode() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008f: 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown ProjectileDamage component = ((EntityState)this).GetComponent(); new BlastAttack { procChainMask = ((EntityState)this).projectileController.procChainMask, procCoefficient = ((EntityState)this).projectileController.procCoefficient, attacker = ((EntityState)this).projectileController.owner, inflictor = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).projectileController.teamFilter.teamIndex, procCoefficient = ((EntityState)this).projectileController.procCoefficient, baseDamage = component.damage * damageCoefficient, baseForce = force, falloffModel = (FalloffModel)3, crit = component.crit, radius = blastRadius, position = ((EntityState)this).transform.position, damageColorIndex = component.damageColorIndex, damageType = { damageSource = (DamageSource)1 } }.Fire(); if (Object.op_Implicit((Object)(object)explosionEffectPrefab)) { EffectManager.SpawnEffect(explosionEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position, rotation = ((EntityState)this).transform.rotation, scale = blastRadius }, true); } EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } } namespace Starstorm2.Cores.States.Wayfarer { internal class CloakState : BaseSkillState { public static float baseDuration = 3f; private Animator animator; private float duration; private bool hasCloaked; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayCrossfade("FullBody, Override", "Cloak", "Cloak.playbackRate", duration, 0.2f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasCloaked && (double)animator.GetFloat("Cloak.active") > 0.5) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.Cloak, 10f); hasCloaked = true; } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace Starstorm2.Components { public class WhiteFlagDisplayPrider : MonoBehaviour { [SerializeField] private ItemDisplay display; [SerializeField] private MeshRenderer displayFlagRenderer; private void OnEnable() { if (WhiteFlag.usePrideEdits) { CharacterModel componentInParent = ((Component)this).GetComponentInParent(); object master; if (componentInParent == null) { master = null; } else { CharacterBody body = componentInParent.body; master = ((body != null) ? body.master : null); } Material flagMaterial = PrideHelper.GetFlagMaterial((CharacterMaster)master); display.rendererInfos[0].defaultMaterial = flagMaterial; ((Renderer)displayFlagRenderer).material = flagMaterial; } } } } namespace Characters.Knight { public class SpawnPassive : MonoBehaviour { private void Start() { ((Component)this).GetComponent().FindSkill("passive").ExecuteIfReady(); } private void Update() { } } } namespace SS2 { [RequireComponent(typeof(CombatDirector))] public class AmbushBehavior : NetworkBehaviour, IInteractable { private static bool debug; public static float sceneDirectorMonsterCreditSubtractionCoefficient = 0.75f; private static float maxRage = 100f; public float radius = 50f; public Transform debugIndicator; [Header("Rage Values")] public float passiveRageGain = 0.5f; public float rageGainAtEdge = 6.67f; public float rageGainAtCenter = 33f; public float rageOnKill = 33f; public float rageOnInteract = 75f; [Header("Large Monsters")] public CombatDirector largeMonsterDirector; public int baseLargeMonsterCredit = 75; public int minLargeMonsters = 1; public int maxLargeMonsters = 4; [Header("Small Monsters")] public CombatDirector smallMonsterDirector; public int baseSmallMonsterCredit = 75; public int minSmallMonsters = 5; public int maxSmallMonsters = 9; private float currentRage; private CharacterBody currentTarget; private DirectorCard chosenSmallCard; private DirectorCard chosenLargeCard; public GameObject spawnPositionEffectPrefab; public GameObject activatorEffectPrefab; private Xoroshiro128Plus rng; private bool active = true; private float largeMonsterCredit => (float)baseLargeMonsterCredit * Stage.instance.entryDifficultyCoefficient; private float smallMonsterCredit => (float)baseSmallMonsterCredit * Stage.instance.entryDifficultyCoefficient; private float totalMonsterCredit => smallMonsterCredit + largeMonsterCredit; [InitDuringStartupPhase(/*Could not decode attribute arguments.*/)] private static void Init() { SS2Log.Info("Initializing AmbushBehavior", 16, "Init"); SceneDirector.onPrePopulateMonstersSceneServer += OnPrePopulateMonstersSceneServer; TeleporterInteraction.onTeleporterBeginChargingGlobal += OnTeleporterBeginCharging; } [ConCommand(/*Could not decode attribute arguments.*/)] private static void CCToggleDebug(ConCommandArgs args) { debug = !debug; Debug.Log((object)("Ambush debugging is now " + (debug ? "ON" : "OFF"))); } private static void OnPrePopulateMonstersSceneServer(SceneDirector sceneDirector) { foreach (AmbushBehavior instances in InstanceTracker.GetInstancesList()) { sceneDirector.ReduceMonsterCredits(Mathf.RoundToInt(instances.totalMonsterCredit * sceneDirectorMonsterCreditSubtractionCoefficient)); } } private static void OnTeleporterBeginCharging(TeleporterInteraction teleporterInteraction) { if (!NetworkServer.active) { return; } foreach (AmbushBehavior instances in InstanceTracker.GetInstancesList()) { instances.SetActive(newActive: false); } } private void Awake() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown InstanceTracker.Add(this); if (NetworkServer.active) { ((Behaviour)largeMonsterDirector).enabled = false; ((Behaviour)smallMonsterDirector).enabled = false; rng = new Xoroshiro128Plus((ulong)Run.instance.stageRng.nextUint); } } private void Start() { if (NetworkServer.active) { chosenSmallCard = SelectMonsterCard(smallMonsterCredit, maxSmallMonsters, minSmallMonsters); chosenLargeCard = SelectMonsterCard(largeMonsterCredit, maxLargeMonsters, minLargeMonsters); } } private void OnDestroy() { InstanceTracker.Remove(this); } private void OnEnable() { GlobalEventManager.OnInteractionsGlobal += OnInteractionGlobal; GlobalEventManager.onCharacterDeathGlobal += OnCharacterDeathGlobal; } private void OnDisable() { GlobalEventManager.OnInteractionsGlobal -= OnInteractionGlobal; GlobalEventManager.onCharacterDeathGlobal -= OnCharacterDeathGlobal; } public void SetActive(bool newActive) { active = newActive; } private void FixedUpdate() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && active) { float fixedDeltaTime = Time.fixedDeltaTime; AddRage(passiveRageGain * fixedDeltaTime); if (CheckPlayersInRadius(fixedDeltaTime) && (Object)(object)currentTarget != (Object)null && currentRage >= maxRage) { AmbushActivation(currentTarget); } } if (Object.op_Implicit((Object)(object)debugIndicator)) { debugIndicator.localScale = Vector3.one * radius; ((Component)debugIndicator).gameObject.SetActive(debug && active); } } private void AddRage(float rage) { currentRage = Mathf.Clamp(currentRage + rage, 0f, maxRage); } private bool IsPointInRadius(Vector3 position) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)this).transform.position - position; return ((Vector3)(ref val)).sqrMagnitude <= radius * radius; } private bool CheckPlayersInRadius(float deltaTime) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) ReadOnlyCollection teamMembers = TeamComponent.GetTeamMembers((TeamIndex)1); CharacterBody val = null; float num = float.PositiveInfinity; bool flag = false; foreach (TeamComponent item in teamMembers) { CharacterBody body = item.body; if (Object.op_Implicit((Object)(object)body) && body.isPlayerControlled && IsPointInRadius(body.footPosition)) { flag = true; Vector3 val2 = ((Component)this).transform.position - body.footPosition; float magnitude = ((Vector3)(ref val2)).magnitude; if (num > magnitude) { num = magnitude; val = item.body; } } } if (flag) { float num2 = Mathf.Clamp01(num / radius); float num3 = Mathf.Lerp(rageGainAtCenter, rageGainAtEdge, num2); AddRage(num3 * deltaTime); } if ((Object)(object)currentTarget == (Object)null || !IsPointInRadius(currentTarget.footPosition)) { currentTarget = val; } return flag; } private void OnInteractionGlobal(Interactor interactor, IInteractable interactable, GameObject interactableObject) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = default(CharacterBody); if (active && ((Component)interactor).TryGetComponent(ref val) && IsPointInRadius(val.footPosition)) { currentTarget = val; AddRage(rageOnInteract); } } private void OnCharacterDeathGlobal(DamageReport damageReport) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (active && Object.op_Implicit((Object)(object)damageReport.attackerBody) && IsPointInRadius(damageReport.attackerBody.footPosition)) { currentTarget = damageReport.attackerBody; AddRage(rageOnKill); } } private DirectorCard SelectMonsterCard(float monsterCredit, int maxMonsters, int minMonsters) { WeightedSelection val = Util.CreateReasonableDirectorCardSpawnList(monsterCredit, maxMonsters, minMonsters); if (val.Count == 0) { return null; } return val.Evaluate(rng.nextNormalizedFloat); } [Server] private void AmbushActivation(CharacterBody activator) { //IL_00f4: 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_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Expected O, but got Unknown //IL_01cb: 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_01d7: 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_01e2: 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_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void SS2.AmbushBehavior::AmbushActivation(RoR2.CharacterBody)' called on client"); return; } SetActive(newActive: false); smallMonsterDirector.currentSpawnTarget = (Object.op_Implicit((Object)(object)activator) ? ((Component)activator).gameObject : ((Component)this).gameObject); ActivateCombatDirector(largeMonsterDirector, largeMonsterCredit, chosenLargeCard); ActivateCombatDirector(smallMonsterDirector, smallMonsterCredit, chosenSmallCard); GameObject prefab = chosenLargeCard.GetSpawnCard().prefab; CharacterMaster val = ((prefab != null) ? prefab.GetComponent() : null); CharacterBody val2 = null; if (Object.op_Implicit((Object)(object)val)) { GameObject bodyPrefab = val.bodyPrefab; val2 = ((bodyPrefab != null) ? bodyPrefab.GetComponent() : null); } GameObject prefab2 = chosenSmallCard.GetSpawnCard().prefab; CharacterMaster val3 = ((prefab2 != null) ? prefab2.GetComponent() : null); CharacterBody val4 = null; if (Object.op_Implicit((Object)(object)val3)) { GameObject bodyPrefab2 = val3.bodyPrefab; val4 = ((bodyPrefab2 != null) ? bodyPrefab2.GetComponent() : null); } if ((Object)(object)val4 == (Object)null || (Object)(object)val2 == (Object)null || val4.bodyIndex == val2.bodyIndex) { CharacterBody val5 = val4 ?? val2; if (Object.op_Implicit((Object)(object)val5)) { SubjectFormatChatMessage val6 = new SubjectFormatChatMessage(); ((SubjectChatMessage)val6).subjectAsCharacterBody = activator; ((SubjectChatMessage)val6).baseToken = "SS2_AMBUSH_MESSAGE_SINGLE"; val6.paramTokens = new string[1] { val5.baseNameToken }; Chat.SendBroadcastChat((ChatMessageBase)(object)val6); } } else { SubjectFormatChatMessage val6 = new SubjectFormatChatMessage(); ((SubjectChatMessage)val6).subjectAsCharacterBody = activator; ((SubjectChatMessage)val6).baseToken = "SS2_AMBUSH_MESSAGE_DOUBLE"; val6.paramTokens = new string[2] { val4.baseNameToken, val2.baseNameToken }; Chat.SendBroadcastChat((ChatMessageBase)(object)val6); } EffectManager.SpawnEffect(spawnPositionEffectPrefab, new EffectData { origin = ((Component)this).transform.position, rotation = Quaternion.identity, scale = 1f }, true); EffectData val7 = new EffectData { origin = ((Component)this).transform.position, rotation = Quaternion.identity, scale = 1f }; val7.SetNetworkedObjectReference(((Component)activator).gameObject); EffectManager.SpawnEffect(activatorEffectPrefab, val7, true); } private void ActivateCombatDirector(CombatDirector director, float monsterCredit, DirectorCard directorCard) { ((Behaviour)director).enabled = true; director.monsterCredit += monsterCredit; director.OverrideCurrentMonsterCard(directorCard); director.monsterSpawnTimer = 0f; } public string GetContextString([NotNull] Interactor activator) { return ""; } public Interactability GetInteractability([NotNull] Interactor activator) { return (Interactability)0; } public void OnInteractionBegin([NotNull] Interactor activator) { throw new NotImplementedException(); } public bool ShouldIgnoreSpherecastForInteractibility([NotNull] Interactor activator) { return false; } public bool ShouldShowOnScanner() { return false; } public bool ShouldProximityHighlight() { return false; } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } public override void PreStartClient() { } } public class ApplyRandomForceOnStart : MonoBehaviour { public Vector3 minLocalForce; public Vector3 maxLocalForce; private void Start() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) Rigidbody component = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { float num = Random.Range(0f, 1f); Vector3 val = Vector3.Lerp(minLocalForce, maxLocalForce, num); component.AddRelativeForce(val); } } } public static class AttackerOverrideManager { public static Dictionary attackerToOverride = new Dictionary(); [SystemInitializer(new Type[] { })] private static void Init() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown HealthComponent.TakeDamage += new hook_TakeDamage(OverrideTakeDamage); GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(OverrideOnHitEnemy); GlobalEventManager.OnHitAll += new hook_OnHitAll(OverrideOnHitAll); } public static void AddOverride(GameObject self, GameObject overrider) { attackerToOverride.Add(self, overrider); } public static void RemoveOverride(GameObject self) { attackerToOverride.Remove(self); } private static void OverrideOnHitAll(orig_OnHitAll orig, GlobalEventManager self, DamageInfo damageInfo, GameObject hitObject) { if (attackerToOverride.Count > 0 && Object.op_Implicit((Object)(object)damageInfo.attacker) && attackerToOverride.TryGetValue(damageInfo.attacker, out var value)) { if (Object.op_Implicit((Object)(object)value)) { damageInfo.attacker = value; } else { SS2Log.Error("AttackerOverrideManager: " + ((object)damageInfo.attacker)?.ToString() + " has an override but newAttacker is null!", 37, "OverrideOnHitAll"); } } orig.Invoke(self, damageInfo, hitObject); } private static void OverrideOnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { if (attackerToOverride.Count > 0 && Object.op_Implicit((Object)(object)damageInfo.attacker) && attackerToOverride.TryGetValue(damageInfo.attacker, out var value)) { if (Object.op_Implicit((Object)(object)value)) { damageInfo.attacker = value; } else { SS2Log.Error("AttackerOverrideManager: " + ((object)damageInfo.attacker)?.ToString() + " has an override but newAttacker is null!", 51, "OverrideOnHitEnemy"); } } orig.Invoke(self, damageInfo, victim); } private static void OverrideTakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { if (attackerToOverride.Count > 0 && Object.op_Implicit((Object)(object)damageInfo.attacker) && attackerToOverride.TryGetValue(damageInfo.attacker, out var value)) { if (Object.op_Implicit((Object)(object)value)) { damageInfo.attacker = value; } else { SS2Log.Error("AttackerOverrideManager: " + ((object)damageInfo.attacker)?.ToString() + " has an override but newAttacker is null!", 65, "OverrideTakeDamage"); } } orig.Invoke(self, damageInfo); } } [RequireComponent(typeof(GenericOwnership))] public class BeamController : NetworkBehaviour { [Serializable] public class OnTickUnityEvent : UnityEvent { } public OnTickUnityEvent onTickServer; public Transform startPointTransform; public Transform endPointTransform; public float tickInterval = 1f; public bool tickOnStart; public bool breakOnTargetFullyHealed; public LineRenderer lineRenderer; public float lingerAfterBrokenDuration; [SyncVar(hook = "OnSyncTarget")] private SS2HurtBoxReference netTarget; private float stopwatchServer; private bool broken; private SS2HurtBoxReference previousHurtBoxReference; private HurtBox cachedHurtBox; private float scaleFactorVelocity; private float maxLineWidth = 0.3f; private float smoothTime = 0.1f; private float scaleFactor; public GenericOwnership ownership { get; private set; } public HurtBox target { get { return cachedHurtBox; } [Server] set { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void SS2.BeamController::set_target(RoR2.HurtBox)' called on client"); return; } NetworknetTarget = SS2HurtBoxReference.FromHurtBox(value); UpdateCachedHurtBox(); } } public SS2HurtBoxReference NetworknetTarget { get { return netTarget; } [param: In] set { ref SS2HurtBoxReference reference = ref netTarget; if (NetworkServer.localClientActive && !((NetworkBehaviour)this).syncVarHookGuard) { ((NetworkBehaviour)this).syncVarHookGuard = true; OnSyncTarget(value); ((NetworkBehaviour)this).syncVarHookGuard = false; } ((NetworkBehaviour)this).SetSyncVar(value, ref reference, 1u); } } public static event Action onBeamStartGlobal; private void Awake() { ownership = ((Component)this).GetComponent(); startPointTransform.SetParent((Transform)null, true); endPointTransform.SetParent((Transform)null, true); if (tickOnStart) { stopwatchServer = tickInterval; } } public override void OnStartClient() { ((NetworkBehaviour)this).OnStartClient(); UpdateCachedHurtBox(); } private void Start() { BeamController.onBeamStartGlobal?.Invoke(this); } private void OnDestroy() { if (Object.op_Implicit((Object)(object)startPointTransform)) { Object.Destroy((Object)(object)((Component)startPointTransform).gameObject); } if (Object.op_Implicit((Object)(object)endPointTransform)) { Object.Destroy((Object)(object)((Component)endPointTransform).gameObject); } } private void OnEnable() { InstanceTracker.Add(this); } private void OnDisable() { InstanceTracker.Remove(this); } private void LateUpdate() { UpdateBeamVisuals(); } private void OnSyncTarget(SS2HurtBoxReference newValue) { NetworknetTarget = newValue; UpdateCachedHurtBox(); } private void FixedUpdate() { if (NetworkServer.active) { FixedUpdateServer(); } } private void FixedUpdateServer() { if (!Object.op_Implicit((Object)(object)cachedHurtBox)) { BreakServer(); } else if (tickInterval > 0f) { stopwatchServer += Time.fixedDeltaTime; while (stopwatchServer >= tickInterval) { stopwatchServer -= tickInterval; OnTickServer(); } } } private void OnTickServer() { if (!Object.op_Implicit((Object)(object)cachedHurtBox) || !Object.op_Implicit((Object)(object)cachedHurtBox.healthComponent)) { BreakServer(); } else { ((UnityEvent)onTickServer)?.Invoke(this); } } private void UpdateCachedHurtBox() { if (!previousHurtBoxReference.Equals(netTarget)) { cachedHurtBox = netTarget.ResolveHurtBox(); previousHurtBoxReference = netTarget; } } public static bool BeamAlreadyExists(GameObject owner, HurtBox target) { return BeamAlreadyExists(owner, target.healthComponent); } public static bool BeamAlreadyExists(GameObject owner, HealthComponent targetHealthComponent) { List instancesList = InstanceTracker.GetInstancesList(); int i = 0; for (int count = instancesList.Count; i < count; i++) { BeamController beamController = instancesList[i]; HurtBox val = beamController.target; if ((Object)(object)(((Object)(object)val != (Object)null) ? val.healthComponent : null) == (Object)(object)targetHealthComponent && (Object)(object)beamController.ownership.ownerObject == (Object)(object)owner) { return true; } } return false; } public static int GetBeamCountForOwner(GameObject owner) { int num = 0; List instancesList = InstanceTracker.GetInstancesList(); int i = 0; for (int count = instancesList.Count; i < count; i++) { if ((Object)(object)instancesList[i].ownership.ownerObject == (Object)(object)owner) { num++; } } return num; } private void UpdateBeamVisuals() { //IL_005d: 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_0078: 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_00a1: Unknown result type (might be due to invalid IL or missing references) float num = (Object.op_Implicit((Object)(object)target) ? 1f : 0f); scaleFactor = Mathf.SmoothDamp(scaleFactor, num, ref scaleFactorVelocity, smoothTime); Vector3 localScale = default(Vector3); ((Vector3)(ref localScale))..ctor(scaleFactor, scaleFactor, scaleFactor); startPointTransform.SetPositionAndRotation(((Component)this).transform.position, ((Component)this).transform.rotation); startPointTransform.localScale = localScale; if (Object.op_Implicit((Object)(object)cachedHurtBox)) { endPointTransform.position = cachedHurtBox.healthComponent.body.corePosition; } endPointTransform.localScale = localScale; lineRenderer.widthMultiplier = scaleFactor * maxLineWidth; } [Server] public void BreakServer() { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void SS2.BeamController::BreakServer()' called on client"); } else if (!broken) { broken = true; target = null; ((Component)this).transform.SetParent((Transform)null); ownership.ownerObject = null; Object.Destroy((Object)(object)((Component)this).gameObject, lingerAfterBrokenDuration); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { GeneratedNetworkCode._WriteSS2HurtBoxReference_None(writer, netTarget); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & 1) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } GeneratedNetworkCode._WriteSS2HurtBoxReference_None(writer, netTarget); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { netTarget = GeneratedNetworkCode._ReadSS2HurtBoxReference_None(reader); return; } int num = (int)reader.ReadPackedUInt32(); if ((num & 1) != 0) { OnSyncTarget(GeneratedNetworkCode._ReadSS2HurtBoxReference_None(reader)); } } public override void PreStartClient() { } } public class BeamChain : MonoBehaviour { public struct BeamPoint { public float age; public Vector3 startPos; public Vector3 position; public Transform target; public GameObject effectInstance; } public LineRenderer lineRenderer; public GameObject pointEffectPrefab; public string pointSpawnSoundString = "Play_engi_seekerMissile_lockOn"; public float newPointLerp = 0.1f; public Transform startTransform; public Transform endTransform; private List beamPoints; private void Awake() { beamPoints = new List(); beamPoints.Add(new BeamPoint { target = startTransform, age = float.PositiveInfinity }); beamPoints.Add(new BeamPoint { target = endTransform, age = float.PositiveInfinity }); UpdateBeamPositions(0f); } private void Update() { CleanList(); UpdateBeamPositions(Time.deltaTime); } public void CleanList() { for (int num = beamPoints.Count - 1; num >= 0; num--) { if (!Object.op_Implicit((Object)(object)beamPoints[num].target)) { RemoveAt(num); } } } public void RemoveAt(int index) { BeamPoint beamPoint = beamPoints[index]; if (Object.op_Implicit((Object)(object)beamPoint.effectInstance)) { Object.Destroy((Object)(object)beamPoint.effectInstance); } beamPoints.RemoveAt(index); } public void AddTarget(Transform transform) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) Vector3 position = transform.position; float num = float.PositiveInfinity; BeamPoint beamPoint = beamPoints[0]; BeamPoint beamPoint2 = beamPoints[beamPoints.Count - 1]; int num2 = 0; if (beamPoints.Count > 2) { for (int i = 0; i < beamPoints.Count; i++) { Vector3 val = beamPoints[i].position - position; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; beamPoint2 = beamPoint; beamPoint = beamPoints[i]; num2 = i; } } } Vector3 val2 = (beamPoint.position - beamPoint2.position) / 2f + beamPoint2.position; BeamPoint item = new BeamPoint { startPos = val2, target = transform }; if (Object.op_Implicit((Object)(object)pointEffectPrefab)) { item.effectInstance = Object.Instantiate(pointEffectPrefab, val2, Quaternion.identity); } int index = Mathf.Clamp(num2, 1, beamPoints.Count - 1); beamPoints.Insert(index, item); PointSoundManager.EmitSoundLocal((AkEventIdArg)pointSpawnSoundString, ((Component)this).transform.position); } private void UpdateBeamPositions(float deltaTime) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) int count = beamPoints.Count; Vector3[] array = (Vector3[])(object)new Vector3[count]; lineRenderer.positionCount = count; for (int i = 0; i < count; i++) { BeamPoint value = beamPoints[i]; value.age += deltaTime; Vector3 val = (value.position = Vector3.Lerp(value.startPos, ((Component)value.target).transform.position, value.age / newPointLerp)); if (Object.op_Implicit((Object)(object)value.effectInstance)) { value.effectInstance.transform.position = val; } array[i] = val; beamPoints[i] = value; } lineRenderer.SetPositions(array); } private void OnDestroy() { for (int num = beamPoints.Count - 1; num >= 0; num--) { RemoveAt(num); } } } public class CustomLightningOrb : Orb { public GameObject orbEffectPrefab; public float duration = 0.033f; public bool canProcGadget; public bool canBounceOnSameTarget; public float damageValue; public GameObject attacker; public GameObject inflictor; public int bouncesRemaining; public List bouncedObjects; public TeamIndex teamIndex; public bool isCrit; public ProcChainMask procChainMask; public float procCoefficient = 1f; public DamageColorIndex damageColorIndex; public float range = 20f; public float damageCoefficientPerBounce = 1f; public DamageType damageType; private BullseyeSearch search; public override void Begin() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown ((Orb)this).duration = duration; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(orbEffectPrefab, val, true); } public override void OnArrival() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ee: 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_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_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: 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_02df: Unknown result type (might be due to invalid IL or missing references) //IL_030a: 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_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)base.target)) { return; } HealthComponent healthComponent = base.target.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { DamageInfo val = new DamageInfo(); val.damage = damageValue; val.attacker = attacker; val.inflictor = inflictor; val.force = Vector3.zero; val.crit = isCrit; val.procChainMask = procChainMask; val.procCoefficient = procCoefficient; val.position = ((Component)base.target).transform.position; val.damageColorIndex = damageColorIndex; val.damageType = DamageTypeCombo.op_Implicit(damageType); healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)healthComponent).gameObject); } bouncedObjects.Add(base.target.healthComponent); if (bouncesRemaining > 0) { if (bouncedObjects != null && canBounceOnSameTarget) { bouncedObjects.Clear(); } HurtBox val2 = PickNextTarget(((Component)base.target).transform.position, healthComponent); if (Object.op_Implicit((Object)(object)val2)) { CustomLightningOrb customLightningOrb = new CustomLightningOrb(); customLightningOrb.duration = duration; customLightningOrb.canProcGadget = canProcGadget; customLightningOrb.canBounceOnSameTarget = canBounceOnSameTarget; customLightningOrb.search = search; ((Orb)customLightningOrb).origin = ((Component)base.target).transform.position; ((Orb)customLightningOrb).target = val2; customLightningOrb.attacker = attacker; customLightningOrb.inflictor = inflictor; customLightningOrb.teamIndex = teamIndex; customLightningOrb.damageValue = damageValue * damageCoefficientPerBounce; customLightningOrb.bouncesRemaining = bouncesRemaining - 1; customLightningOrb.isCrit = isCrit; customLightningOrb.bouncedObjects = bouncedObjects; customLightningOrb.procChainMask = procChainMask; customLightningOrb.procCoefficient = procCoefficient; customLightningOrb.damageColorIndex = damageColorIndex; customLightningOrb.damageCoefficientPerBounce = damageCoefficientPerBounce; customLightningOrb.range = range; customLightningOrb.damageType = damageType; customLightningOrb.orbEffectPrefab = orbEffectPrefab; OrbManager.instance.AddOrb((Orb)(object)customLightningOrb); return; } } if (canProcGadget) { HashSet hashSet = new HashSet(); for (int i = 0; i < bouncedObjects.Count; i++) { hashSet.Add(bouncedObjects[i]); } int count = hashSet.Count; HurtBox target = PickNextTarget(((Component)base.target).transform.position, base.target.healthComponent); ErraticGadget.GadgetLightningOrb gadgetLightningOrb = new ErraticGadget.GadgetLightningOrb(); gadgetLightningOrb.search = search; ((Orb)gadgetLightningOrb).origin = ((Component)base.target).transform.position; ((Orb)gadgetLightningOrb).target = target; gadgetLightningOrb.attacker = attacker; gadgetLightningOrb.inflictor = inflictor; gadgetLightningOrb.teamIndex = teamIndex; gadgetLightningOrb.damageValue = damageValue * damageCoefficientPerBounce; gadgetLightningOrb.bouncesRemaining = count; gadgetLightningOrb.isCrit = isCrit; gadgetLightningOrb.bouncedObjects = new List(); gadgetLightningOrb.procChainMask = procChainMask; gadgetLightningOrb.procCoefficient = procCoefficient; gadgetLightningOrb.damageColorIndex = damageColorIndex; gadgetLightningOrb.damageCoefficientPerBounce = damageCoefficientPerBounce; gadgetLightningOrb.range = range; gadgetLightningOrb.damageType = damageType; gadgetLightningOrb.canBounceOnSameTarget = canBounceOnSameTarget; OrbManager.instance.AddOrb((Orb)(object)gadgetLightningOrb); EffectManager.SimpleEffect(ErraticGadget._procEffectPrefab, ((Component)base.target).transform.position, Quaternion.identity, true); } } public HurtBox PickNextTarget(Vector3 position, HealthComponent currentVictim) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) if (search == null) { search = new BullseyeSearch(); } float num = range; if (Object.op_Implicit((Object)(object)currentVictim) && Object.op_Implicit((Object)(object)currentVictim.body)) { bouncedObjects.Add(currentVictim); num += currentVictim.body.radius; } search.searchOrigin = position; search.searchDirection = Vector3.zero; search.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref search.teamMaskFilter)).RemoveTeam(teamIndex); search.filterByLoS = false; search.sortMode = (SortMode)1; search.maxDistanceFilter = num; search.RefreshCandidates(); HurtBox val = (from v in search.GetResults() where !bouncedObjects.Contains(v.healthComponent) select v).FirstOrDefault(); if (Object.op_Implicit((Object)(object)val) && val.healthComponent.alive) { bouncedObjects.Add(val.healthComponent); } return val; } } public class DetachParticlesOnDestroyAndEndEmission : MonoBehaviour { public ParticleSystem[] particleSystems; private void OnDisable() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_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) ParticleSystem[] array = particleSystems; foreach (ParticleSystem val in array) { if (Object.op_Implicit((Object)(object)val)) { MainModule main = val.main; EmissionModule emission = val.emission; ((MainModule)(ref main)).stopAction = (ParticleSystemStopAction)2; ((EmissionModule)(ref emission)).enabled = false; val.Stop(); ((Component)val).transform.SetParent((Transform)null); } } } } public class EliteEventMissionController : NetworkBehaviour { private class OnBossKilledServer : MonoBehaviour, IOnKilledServerReceiver { public PickupIndex drop = PickupIndex.none; public void OnKilledServer(DamageReport damageReport) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) if (drop == PickupIndex.none) { return; } int participatingPlayerCount = Run.instance.participatingPlayerCount; if (participatingPlayerCount > 1) { float num = 360f / (float)participatingPlayerCount; Vector3 val = Quaternion.AngleAxis((float)Random.Range(0, 360), Vector3.up) * (Vector3.up * 40f + Vector3.forward * 5f); Quaternion val2 = Quaternion.AngleAxis(num, Vector3.up); PickupIndex val3 = PickupCatalog.FindPickupIndex(SS2Content.Items.ShardStorm.itemIndex); int num2 = 0; while (num2 < participatingPlayerCount) { PickupDropletController.CreatePickupDroplet(val3, damageReport.victimBody.corePosition, val); num2++; val = val2 * val; } } else { PickupDropletController.CreatePickupDroplet(drop, damageReport.victimBody.corePosition, Vector3.up * 20f); } } } private class EliteObjectiveTracker : ObjectiveTracker { private int eliteKills = -1; private int requiredEliteKills = 25; public override bool shouldConsiderComplete => IsComplete(); public override string GenerateString() { EliteEventMissionController eliteEventMissionController = (EliteEventMissionController)(object)base.sourceDescriptor.source; eliteKills = eliteEventMissionController.currentEliteKills; requiredEliteKills = eliteEventMissionController.requiredEliteKills; return $"elite kills heehaw: {(float)eliteEventMissionController.currentEliteKills / (float)eliteEventMissionController.requiredEliteKills * 100f}%"; } private bool IsComplete() { if (eliteKills == -1) { return ((ObjectiveTracker)this).shouldConsiderComplete; } return eliteKills >= requiredEliteKills; } public override bool IsDirty() { return ((EliteEventMissionController)(object)base.sourceDescriptor.source).currentEliteKills != eliteKills; } } private class OnDestroyCallback : MonoBehaviour { public Action onDestroy; private void OnDestroy() { onDestroy?.Invoke(); } } [CompilerGenerated] private sealed class <>c__DisplayClass38_0 { public CombatDirector self; internal void b__1() { allCombatDirectors.Remove(self); } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Awake <>9__38_0; internal void b__38_0(orig_Awake orig, CombatDirector self) { <>c__DisplayClass38_0 CS$<>8__locals4 = new <>c__DisplayClass38_0 { self = self }; orig.Invoke(CS$<>8__locals4.self); if (NetworkServer.active) { allCombatDirectors.Add(CS$<>8__locals4.self); OnDestroyCallback onDestroyCallback = ((Component)CS$<>8__locals4.self).gameObject.AddComponent(); onDestroyCallback.onDestroy = (Action)Delegate.Combine(onDestroyCallback.onDestroy, (Action)delegate { allCombatDirectors.Remove(CS$<>8__locals4.self); }); } } } public EquipmentDef bossEliteEquipment; public ItemDef bossDrop; public string eliteEquipmentAddress; public EquipmentDef eliteEquipment; public Transform eliteParticles; public int baseBossCredit = 12; public float maxDuration = 180f; public float bossWaitDuration = 3f; [SyncVar] public int requiredEliteKills = 25; [NonSerialized] [SyncVar] public int currentEliteKills; [NonSerialized] [SyncVar] public bool hasStarted; private BuffIndex eliteBuffIndex; private GameplayEvent gameplayEvent; private CombatDirector bossDirector; private CombatSquad bossSquad; private DirectorCard chosenBossCard; private float stopwatch; private float bossWaitStopwatch; private bool hasSpawnedBoss; private Dictionary directorToOriginalEliteBias = new Dictionary(); private static List allCombatDirectors = new List(); private float bossCredit => (float)baseBossCredit * Stage.instance.entryDifficultyCoefficient; public int NetworkrequiredEliteKills { get { return requiredEliteKills; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref requiredEliteKills, 1u); } } public int NetworkcurrentEliteKills { get { return currentEliteKills; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref currentEliteKills, 2u); } } public bool NetworkhasStarted { get { return hasStarted; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref hasStarted, 4u); } } private void Awake() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)eliteEquipment) && !string.IsNullOrWhiteSpace(eliteEquipmentAddress)) { eliteEquipment = Addressables.LoadAssetAsync((object)eliteEquipmentAddress).WaitForCompletion(); if (Object.op_Implicit((Object)(object)eliteEquipment) && Object.op_Implicit((Object)(object)eliteEquipment.passiveBuffDef)) { eliteBuffIndex = eliteEquipment.passiveBuffDef.buffIndex; } else { SS2Log.Error("Invalid Equipment " + eliteEquipmentAddress, 60, "Awake"); } } } private void Start() { if (NetworkServer.active) { gameplayEvent = ((Component)this).GetComponent(); bossDirector = ((Component)this).GetComponent(); bossSquad = ((Component)this).GetComponent(); ((UnityEvent)(object)bossDirector.onSpawnedServer).AddListener((UnityAction)OnBossSpawned); bossSquad.onDefeatedServer += OnBossDefeatedServer; WeightedSelection val = Util.CreateReasonableDirectorCardSpawnList(bossCredit, 1, 1); if (val.Count > 0) { chosenBossCard = val.Evaluate(bossDirector.rng.nextNormalizedFloat); } else { SS2Log.Error("Failed to find reasonable DirectorCard. too bad so sad. bossCredit = " + bossCredit, 81, "Start"); } StartEvent(); } } public void OnEnable() { ObjectivePanelController.collectObjectiveSources += EliteObjective; TeleporterInteraction.onTeleporterBeginChargingGlobal += OnTeleporterBeginChargingGlobal; } private void OnDisable() { if (hasStarted) { StopEvent(); } ObjectivePanelController.collectObjectiveSources -= EliteObjective; TeleporterInteraction.onTeleporterBeginChargingGlobal -= OnTeleporterBeginChargingGlobal; } public void StartEvent() { NetworkhasStarted = true; foreach (CombatDirector allCombatDirector in allCombatDirectors) { ((UnityEvent)(object)allCombatDirector.onSpawnedServer).AddListener((UnityAction)OnSpawnedServer); } GlobalEventManager.onCharacterDeathGlobal += OnCharacterDeathGlobal; gameplayEvent.StartEvent(); } public void StopEvent() { NetworkhasStarted = false; foreach (CombatDirector allCombatDirector in allCombatDirectors) { ((UnityEvent)(object)allCombatDirector.onSpawnedServer).RemoveListener((UnityAction)OnSpawnedServer); } GlobalEventManager.onCharacterDeathGlobal -= OnCharacterDeathGlobal; gameplayEvent.EndEvent(); } private void FixedUpdate() { if (!NetworkServer.active) { return; } if (hasStarted) { stopwatch += Time.fixedDeltaTime; if (!hasSpawnedBoss && stopwatch >= maxDuration) { StopEvent(); } else if (!hasSpawnedBoss && currentEliteKills >= requiredEliteKills) { bossWaitStopwatch += Time.fixedDeltaTime; if (bossWaitStopwatch > bossWaitDuration) { SpawnBoss(); } } else { bossWaitStopwatch = 0f; } } else { stopwatch = 0f; } } public void SpawnBoss() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_00ca: Unknown result type (might be due to invalid IL or missing references) hasSpawnedBoss = true; ((Behaviour)bossDirector).enabled = true; CombatDirector obj = bossDirector; obj.monsterCredit += bossCredit; bossDirector.OverrideCurrentMonsterCard(chosenBossCard); bossDirector.monsterSpawnTimer = 0f; CharacterMaster component = chosenBossCard.spawnCard.prefab.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.bodyPrefab.GetComponent())) { EventTextRequest val = new EventTextRequest { eventToken = "yooooooooooo mama " + Util.GetBestBodyName(component.bodyPrefab), eventColor = bossEliteEquipment.passiveBuffDef.buffColor, textDuration = 6f }; GameplayEventTextController.instance.EnqueueNewTextRequest(val, true); } } public void OnBossSpawned(GameObject masterObject) { //IL_0016: 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_00be: Invalid comparison between Unknown and I4 //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) Inventory component = masterObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.SetEquipmentIndex(bossEliteEquipment.equipmentIndex); int num = Mathf.Max(Run.instance.loopClearCount, 0); component.GiveItemPermanent(SS2Content.Items.BoostCharacterSize, 100); component.GiveItemPermanent(SS2Content.Items.MaxHealthPerMinute, 2 + Run.instance.stageClearCount * num * num * (1 + EtherealBehavior.instance.etherealStagesCompleted)); } CharacterBody body = masterObject.GetComponent().GetBody(); body.baseMaxHealth = Mathf.Max(body.maxHealth, 2100f); body.baseDamage = 20f; body.PerformAutoCalculateLevelStats(); NetMessageExtensions.Send((INetMessage)(object)new FriendManager.SyncBaseStats(body), (NetworkDestination)1); if (Object.op_Implicit((Object)(object)bossDrop) && (int)bossDrop.itemIndex != -1) { ((Component)body).gameObject.AddComponent().drop = PickupCatalog.FindPickupIndex(bossDrop.itemIndex); } else { SS2Log.Error("Elite Event " + ((Object)this).name + " has no boss drop", 198, "OnBossSpawned"); } } private void OnBossDefeatedServer() { StopEvent(); } private void OnCharacterDeathGlobal(DamageReport damageReport) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 //IL_0010: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected I4, but got Unknown if ((int)damageReport.victimTeamIndex != 1 && damageReport.victimBody.HasBuff(eliteBuffIndex)) { HullClassification hullClassification = damageReport.victimBody.hullClassification; switch ((int)hullClassification) { case 0: NetworkcurrentEliteKills = currentEliteKills + 1; break; case 1: NetworkcurrentEliteKills = currentEliteKills + 2; break; case 2: NetworkcurrentEliteKills = currentEliteKills + 3; break; } } } private void OnTeleporterBeginChargingGlobal(TeleporterInteraction obj) { StopEvent(); } public void OnSpawnedServer(GameObject masterObject) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) Inventory component = masterObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.GiveItemPermanent(SS2Content.Items.MultiElite, 1); component.SetEquipmentIndex(eliteEquipment.equipmentIndex, false); int num = component.GetItemCountPermanent(Items.BoostDamage) - 10; if (num > 0) { component.GiveItemPermanent(Items.BoostDamage, num); } int num2 = component.GetItemCountPermanent(Items.BoostHp) - 10; if (num2 > 0) { component.GiveItemPermanent(Items.BoostDamage, num2); } } } private void EliteObjective(CharacterMaster master, List dest) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) if (hasStarted && requiredEliteKills > currentEliteKills) { dest.Add(new ObjectiveSourceDescriptor { master = master, objectiveType = typeof(EliteObjectiveTracker), source = (Object)(object)this }); } } [SystemInitializer(new Type[] { })] private static void Init() { //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_001f: Expected O, but got Unknown object obj = <>c.<>9__38_0; if (obj == null) { hook_Awake val = delegate(orig_Awake orig, CombatDirector self) { orig.Invoke(self); if (NetworkServer.active) { allCombatDirectors.Add(self); OnDestroyCallback onDestroyCallback = ((Component)self).gameObject.AddComponent(); onDestroyCallback.onDestroy = (Action)Delegate.Combine(onDestroyCallback.onDestroy, (Action)delegate { allCombatDirectors.Remove(self); }); } }; <>c.<>9__38_0 = val; obj = (object)val; } CombatDirector.Awake += (hook_Awake)obj; } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.WritePackedUInt32((uint)requiredEliteKills); writer.WritePackedUInt32((uint)currentEliteKills); writer.Write(hasStarted); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & 1) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.WritePackedUInt32((uint)requiredEliteKills); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 2) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.WritePackedUInt32((uint)currentEliteKills); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 4) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(hasStarted); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { requiredEliteKills = (int)reader.ReadPackedUInt32(); currentEliteKills = (int)reader.ReadPackedUInt32(); hasStarted = reader.ReadBoolean(); return; } int num = (int)reader.ReadPackedUInt32(); if ((num & 1) != 0) { requiredEliteKills = (int)reader.ReadPackedUInt32(); } if ((num & 2) != 0) { currentEliteKills = (int)reader.ReadPackedUInt32(); } if ((num & 4) != 0) { hasStarted = reader.ReadBoolean(); } } public override void PreStartClient() { } } public class EventDirector : NetworkBehaviour { public class EventTimeline { public List events = new List(); public float viability; public bool AddEvent(GameObject eventPrefab, float startTime, float endTime = float.PositiveInfinity, bool canStartDuringTeleporterEvent = false) { events.Add(new EventInfo(eventPrefab, startTime, endTime, canStartDuringTeleporterEvent)); return true; } } public class EventInfo { public GameObject eventPrefab; public FixedTimeStamp startTime; public FixedTimeStamp endTime; public bool hasStarted; public bool canStartDuringTeleporterEvent; public EventInfo(GameObject eventPrefab, float startTime, float endTime, bool canStartDuringTeleporterEvent) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_0026: 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) this.eventPrefab = eventPrefab; this.startTime = FixedTimeStamp.now + startTime; this.endTime = this.startTime + endTime; this.canStartDuringTeleporterEvent = canStartDuringTeleporterEvent; hasStarted = false; } } public static EventDirector instance; public EventSelection currentEventSelection; private bool finalStage; private bool simulacrumRun; public EventTimeline currentTimeline; public float eliteEventChance; public int stagesUntilInvasion = 5; private Dictionary eventsToMostRecentStage = new Dictionary(); public Xoroshiro128Plus rng { get; private set; } public WeightedSelection availableNemesisSpawnCards { get; private set; } private void OnEnable() { Stage.onStageStartGlobal += OnStageStartGlobal; instance = this; } private void OnDisable() { Stage.onStageStartGlobal -= OnStageStartGlobal; instance = null; } private void OnStageStartGlobal(Stage stage) { //IL_003b: 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_006f: Expected O, but got Unknown if (NetworkServer.active) { stagesUntilInvasion--; currentEventSelection = EventSelection.GetEventSelectionForStage(stage); finalStage = stage.sceneDef.stageOrder == 6; simulacrumRun = GameModeCatalog.GetGameModeName(Run.instance.gameModeIndex) == "InfiniteTowerRun"; rng = new Xoroshiro128Plus((ulong)Run.instance.stageRng.nextUint); currentTimeline = CreateEventTimeline(); } } public void PickEventTimeline() { } public EventTimeline CreateEventTimeline() { //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) EventTimeline timeline = new EventTimeline(); if ((Object)(object)currentEventSelection == (Object)null || Run.instance.stageClearCount == 0) { return timeline; } float num = 0f; if (TryAddNemesisInvader(ref timeline)) { num += 45f; } bool flag = !finalStage || (finalStage && ConfiguredVariable.op_Implicit((ConfiguredVariable)(object)Events.EnableMoon2EliteEvents)); if (ConfiguredVariable.op_Implicit((ConfiguredVariable)(object)SS2Config.enableBeta) && flag) { WeightedSelection val = currentEventSelection.GenerateEliteEventWeightedSelection(); if (EtherealBehavior.instance.runIsEthereal) { eliteEventChance += 17.5f; } if (val.Count > 0) { if (Util.CheckRoll(eliteEventChance, 0f, (CharacterMaster)null)) { eliteEventChance = 25f; EventCard eventCard = val.Evaluate(rng.nextNormalizedFloat); float startTime = Random.Range(30f, 120f); timeline.AddEvent(eventCard.eventPrefab, startTime); num += 45f; } else { eliteEventChance += 25f; } } int num2 = Random.Range(0, 1 + Run.instance.loopClearCount); if (num2 > 0) { float num3 = 0f; WeightedSelection val2 = currentEventSelection.GenerateMiscEventWeightedSelection(); if (val2.Count > 0) { for (int i = 0; i < num2; i++) { int num4 = val2.EvaluateToChoiceIndex(rng.nextNormalizedFloat); EventCard value = val2.GetChoice(num4).value; val2.RemoveChoice(num4); num3 += Random.Range(90f, 300f); timeline.AddEvent(value.eventPrefab, num3); } } } } bool flag2 = !finalStage || (finalStage && ConfiguredVariable.op_Implicit((ConfiguredVariable)(object)Events.EnableMoon2Storms)); bool flag3 = !simulacrumRun || (simulacrumRun && ConfiguredVariable.op_Implicit((ConfiguredVariable)(object)Events.EnableSimulacrumStorms)); if (Run.instance.stageClearCount >= 1 && currentEventSelection.canStorm && flag2 && flag3) { float num5 = Random.Range(120f, 360f) + num; GameObject obj = Object.Instantiate(SS2Assets.LoadAsset("StormController", SS2Bundle.Events)); obj.GetComponent().stormStartTime = FixedTimeStamp.now + num5; NetworkServer.Spawn(obj); } return timeline; } private bool IsTeleporterIdle() { return !Object.op_Implicit((Object)(object)TeleporterInteraction.instance) | (Object.op_Implicit((Object)(object)TeleporterInteraction.instance) && TeleporterInteraction.instance.isIdle); } public bool TryAddNemesisInvader(ref EventTimeline timeline) { if (SS2Util.GetItemCountForPlayers(SS2Content.Items.VoidRock) > 0 && stagesUntilInvasion <= 0) { WeightedSelection val = new WeightedSelection(8); NemesisSpawnCard[] readonlySpawnCards = NemesisCatalog.readonlySpawnCards; foreach (NemesisSpawnCard nemesisSpawnCard in readonlySpawnCards) { if (SS2Util.GetItemCountForPlayers(nemesisSpawnCard.itemDef) == 0) { val.AddChoice(nemesisSpawnCard, 1f); } } availableNemesisSpawnCards = val; if (val.Count == 0) { return false; } if (Object.op_Implicit((Object)(object)val.Evaluate(rng.nextNormalizedFloat))) { timeline.AddEvent(SS2Assets.LoadAsset("NemesisInvasionEventController", SS2Bundle.Events), 3f); stagesUntilInvasion = 3; return true; } SS2Log.Error("null NemesisSpawnCard", 168, "TryAddNemesisInvader"); } return false; } private void FixedUpdate() { if (currentTimeline == null || currentTimeline.events == null || !NetworkServer.active || !Object.op_Implicit((Object)(object)Stage.instance) || currentTimeline.events.Count == 0) { return; } for (int i = 0; i < currentTimeline.events.Count; i++) { EventInfo eventInfo = currentTimeline.events[i]; bool flag = eventInfo.canStartDuringTeleporterEvent || IsTeleporterIdle(); if (!eventInfo.hasStarted && ((FixedTimeStamp)(ref eventInfo.startTime)).hasPassed && flag) { eventInfo.hasStarted = true; StartEvent(eventInfo.eventPrefab); } if (eventInfo.hasStarted && ((FixedTimeStamp)(ref eventInfo.endTime)).hasPassed) { EndEvent(); } } } private void StartEvent(GameObject eventPrefab) { if (Object.op_Implicit((Object)(object)eventPrefab)) { if (!eventsToMostRecentStage.ContainsKey(eventPrefab)) { eventsToMostRecentStage.Add(eventPrefab, Run.instance.stageClearCount); } eventsToMostRecentStage[eventPrefab] = Run.instance.stageClearCount; NetworkServer.Spawn(Object.Instantiate(eventPrefab)); } } private void EndEvent() { } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } public override void PreStartClient() { } } public class NemesisCatalog { private static List externalSpawnCards = new List(); private static List externalMasterNames = new List(); private static NemesisSpawnCard[] allSpawnCards; public static NemesisSpawnCard[] readonlySpawnCards => allSpawnCards; [SystemInitializer(new Type[] { typeof(MasterCatalog) })] private static void Init() { FromNames(); allSpawnCards = SS2Assets.LoadAllAssets(SS2Bundle.All); ArrayUtils.Join(allSpawnCards, externalSpawnCards.ToArray()); } private static void FromNames() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) foreach (string externalMasterName in externalMasterNames) { string text = ((!externalMasterName.EndsWith("Body")) ? externalMasterName : externalMasterName.Remove(externalMasterName.Length - 3)); if (!externalMasterName.EndsWith("Master")) { _ = text + "Master"; } MasterIndex val = MasterCatalog.FindMasterIndex(externalMasterName); if (val == MasterIndex.none) { val = MasterCatalog.FindMasterIndex(externalMasterName.EndsWith("MonsterMaster") ? text : (text + "MonsterMaster")); } GameObject masterPrefab = MasterCatalog.GetMasterPrefab(val); if (Object.op_Implicit((Object)(object)masterPrefab)) { AddNemesisInvader(masterPrefab); continue; } SS2Log.Error("NemesisCatalog.FromNames: Could not find master prefab \"" + externalMasterName + "\". Nemesis invasion was not added.", 294, "FromNames"); break; } } public static void AddNemesisInvader(string masterName) { externalMasterNames.Add(masterName); } public static void AddNemesisInvader(GameObject masterPrefab, ItemDef itemDef = null, NemesisSpawnCard.SkillOverride[] skillOverrides = null, SerializableEntityStateType spawnState = default(SerializableEntityStateType)) { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)masterPrefab)) { SS2Log.Error("NemesisCatalog.AddNemesisInvader(GameObject): Null master prefab. Nemesis invasion was not added.", 308, "AddNemesisInvader"); return; } CharacterBody val = default(CharacterBody); if (masterPrefab.TryGetComponent(ref val)) { SS2Log.Error($"NemesisCatalog.AddNemesisInvader(GameObject): Expected a CharacterMaster component, but {masterPrefab} is a body prefab. Nemesis invasion was not added.", 313, "AddNemesisInvader"); return; } CharacterMaster val2 = default(CharacterMaster); if (!masterPrefab.TryGetComponent(ref val2)) { SS2Log.Error($"NemesisCatalog.AddNemesisInvader(GameObject): Did not find a CharacterMaster component for {masterPrefab}. Nemesis invasion was not added.", 318, "AddNemesisInvader"); return; } CharacterBody val3 = default(CharacterBody); if (!Object.op_Implicit((Object)(object)val2.bodyPrefab) || !val2.bodyPrefab.TryGetComponent(ref val3)) { SS2Log.Error($"NemesisCatalog.AddNemesisInvader(GameObject): {masterPrefab} did not have a valid body prefab. Nemesis invasion was not added.", 323, "AddNemesisInvader"); return; } NemesisSpawnCard nemesisSpawnCard = ScriptableObject.CreateInstance(); ((SpawnCard)nemesisSpawnCard).prefab = masterPrefab; ((SpawnCard)nemesisSpawnCard).hullSize = val3.hullClassification; ((SpawnCard)nemesisSpawnCard).nodeGraphType = (GraphType)(val3.isFlying ? 1 : 0); nemesisSpawnCard.itemDef = itemDef; if (skillOverrides != null) { nemesisSpawnCard.skillOverrides = skillOverrides; } if (((SerializableEntityStateType)(ref spawnState)).stateType != null) { nemesisSpawnCard.overrideSpawnState = spawnState; } externalSpawnCards.Add(nemesisSpawnCard); } } public class FlashingEffectIntensity : MonoBehaviour { public Light[] lights = (Light[])(object)new Light[0]; public PostProcessVolume[] pps = (PostProcessVolume[])(object)new PostProcessVolume[0]; private float intensity; private void Awake() { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) intensity = Mathf.Clamp01(SS2Config.FlashingEffectsIntensity / 100f); LightIntensityCurve val = default(LightIntensityCurve); for (int i = 0; i < lights.Length; i++) { if (((Component)lights[i]).TryGetComponent(ref val)) { val.maxIntensity = lights[i].intensity * intensity; } Light obj = lights[i]; obj.intensity *= intensity; } PostProcessDuration val2 = default(PostProcessDuration); for (int j = 0; j < pps.Length; j++) { if (((Component)pps[j]).TryGetComponent(ref val2)) { Keyframe[] array = ArrayUtils.Clone(val2.ppWeightCurve.keys); for (int k = 0; k < array.Length; k++) { Keyframe val3 = array[k]; ((Keyframe)(ref val3)).value = ((Keyframe)(ref val3)).value * intensity; array[k] = val3; } val2.ppWeightCurve.keys = array; } PostProcessVolume obj2 = pps[j]; obj2.weight *= intensity; } } } public class FriendManager : NetworkBehaviour { public class SyncBaseStats : INetMessage, ISerializableObject { private NetworkInstanceId bodyNetId; private float maxHealth; private float regen; private float maxShield; private float movementSpeed; private float acceleration; private float jumpPower; private float damage; private float attackSpeed; private float crit; private float armor; private float visionDistance; private int jumpCount; public void Serialize(NetworkWriter writer) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) writer.Write(bodyNetId); writer.Write(maxHealth); writer.Write(regen); writer.Write(maxShield); writer.Write(movementSpeed); writer.Write(acceleration); writer.Write(jumpPower); writer.Write(damage); writer.Write(attackSpeed); writer.Write(crit); writer.Write(armor); writer.Write(visionDistance); writer.Write(jumpCount); } public void Deserialize(NetworkReader reader) { //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) bodyNetId = reader.ReadNetworkId(); maxHealth = reader.ReadSingle(); regen = reader.ReadSingle(); maxShield = reader.ReadSingle(); movementSpeed = reader.ReadSingle(); acceleration = reader.ReadSingle(); jumpPower = reader.ReadSingle(); damage = reader.ReadSingle(); attackSpeed = reader.ReadSingle(); crit = reader.ReadSingle(); armor = reader.ReadSingle(); visionDistance = reader.ReadSingle(); jumpCount = reader.ReadInt32(); } public void OnReceived() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { GameObject val = Util.FindNetworkObject(bodyNetId); if (!Object.op_Implicit((Object)(object)val)) { SS2Log.Warning($"{typeof(SyncBaseStats).FullName}: Could not retrieve GameObject with network ID {bodyNetId}", 151, "OnReceived"); } CharacterBody component = val.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { SS2Log.Warning($"{typeof(SyncBaseStats).FullName}: Retrieved GameObject {val} but the GameObject does not have a CharacterBody", 156, "OnReceived"); return; } component.baseMaxHealth = maxHealth; component.baseRegen = regen; component.baseMaxShield = maxShield; component.baseMoveSpeed = movementSpeed; component.baseAcceleration = acceleration; component.baseJumpPower = jumpPower; component.baseDamage = damage; component.baseAttackSpeed = attackSpeed; component.baseCrit = crit; component.baseArmor = armor; component.baseVisionDistance = visionDistance; component.baseJumpCount = jumpCount; component.PerformAutoCalculateLevelStats(); SS2Log.Info($"Synced base stats of {component}", 173, "OnReceived"); } } public SyncBaseStats() { } public SyncBaseStats(CharacterBody body) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) NetworkIdentity component = ((Component)body).GetComponent(); bodyNetId = component.netId; maxHealth = body.baseMaxHealth; regen = body.baseRegen; maxShield = body.baseMaxShield; movementSpeed = body.baseMoveSpeed; acceleration = body.baseAcceleration; jumpPower = body.baseJumpPower; damage = body.baseDamage; attackSpeed = body.baseAttackSpeed; crit = body.baseCrit; armor = body.baseArmor; visionDistance = body.baseVisionDistance; jumpCount = body.baseJumpCount; } } public static FriendManager instance; private static int kRpcRpcSetupFriend; private static int kRpcRpcSetupNemBoss; private static int kRpcRpcAddStock; [SystemInitializer(new Type[] { })] private static void Init() { Run.onRunStartGlobal += delegate(Run run) { if (NetworkServer.active) { instance = Object.Instantiate(SS2Assets.LoadAsset("FriendManager", SS2Bundle.Base), ((Component)run).transform).GetComponent(); NetworkServer.Spawn(((Component)instance).gameObject); } }; } private void Start() { ((Component)this).transform.SetParent(((Component)Run.instance).transform); } [ClientRpc] public void RpcSetupFriend(GameObject masterObject, bool unfriend, bool isScepter) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) CharacterMaster component = masterObject.GetComponent(); if (!unfriend) { if (isScepter) { Object.DontDestroyOnLoad((Object)(object)component); } return; } CharacterBody body = component.GetBody(); if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.teamComponent.indicator)) { Object.Destroy((Object)(object)body.teamComponent.indicator); } if (Object.op_Implicit((Object)(object)Stage.instance)) { SceneManager.MoveGameObjectToScene(((Component)component).gameObject, ((Component)Stage.instance).gameObject.scene); } } [ClientRpc] public void RpcSetupNemBoss(GameObject bodyObject, string prefabName) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown CharacterBody component = bodyObject.GetComponent(); GameObject val = SS2Assets.LoadAsset(prefabName, SS2Bundle.Events); GameObject effect; if (Object.op_Implicit((Object)(object)val)) { effect = Object.Instantiate(val, component.corePosition, Quaternion.identity, component.coreTransform); component.master.onBodyDeath.AddListener(new UnityAction(RemoveEffect)); } else { SS2Log.Warning("No effect prefab for " + component.GetDisplayName(), 63, "RpcSetupNemBoss"); } ((Component)component).gameObject.AddComponent(); if (Object.op_Implicit((Object)(object)component.mainHurtBox)) { CapsuleCollider component2 = ((Component)component.mainHurtBox).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.height = 4f; component2.radius = 4f; } } void RemoveEffect() { Object.Destroy((Object)(object)effect); } } [ClientRpc] public void RpcAddStock(GameObject bodyObject, int skillSlot, int count, bool obeyMaxStock) { if (!Util.HasEffectiveAuthority(bodyObject)) { return; } GenericSkill skill = bodyObject.GetComponent().GetSkill((SkillSlot)(sbyte)skillSlot); if (Object.op_Implicit((Object)(object)skill)) { skill.stock += count; if (obeyMaxStock && skill.stock > skill.maxStock) { skill.stock = skill.maxStock; } } } private void UNetVersion() { } protected static void InvokeRpcRpcSetupFriend(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcSetupFriend called on server."); } else { ((FriendManager)(object)obj).RpcSetupFriend(reader.ReadGameObject(), reader.ReadBoolean(), reader.ReadBoolean()); } } protected static void InvokeRpcRpcSetupNemBoss(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcSetupNemBoss called on server."); } else { ((FriendManager)(object)obj).RpcSetupNemBoss(reader.ReadGameObject(), reader.ReadString()); } } protected static void InvokeRpcRpcAddStock(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcAddStock called on server."); } else { ((FriendManager)(object)obj).RpcAddStock(reader.ReadGameObject(), (int)reader.ReadPackedUInt32(), (int)reader.ReadPackedUInt32(), reader.ReadBoolean()); } } public void CallRpcSetupFriend(GameObject masterObject, bool unfriend, bool isScepter) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcSetupFriend called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcSetupFriend); val.Write(((Component)this).GetComponent().netId); val.Write(masterObject); val.Write(unfriend); val.Write(isScepter); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcSetupFriend"); } public void CallRpcSetupNemBoss(GameObject bodyObject, string prefabName) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcSetupNemBoss called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcSetupNemBoss); val.Write(((Component)this).GetComponent().netId); val.Write(bodyObject); val.Write(prefabName); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcSetupNemBoss"); } public void CallRpcAddStock(GameObject bodyObject, int skillSlot, int count, bool obeyMaxStock) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcAddStock called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcAddStock); val.Write(((Component)this).GetComponent().netId); val.Write(bodyObject); val.WritePackedUInt32((uint)skillSlot); val.WritePackedUInt32((uint)count); val.Write(obeyMaxStock); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcAddStock"); } static FriendManager() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown kRpcRpcSetupFriend = 1435315478; NetworkBehaviour.RegisterRpcDelegate(typeof(FriendManager), kRpcRpcSetupFriend, new CmdDelegate(InvokeRpcRpcSetupFriend)); kRpcRpcSetupNemBoss = -314324309; NetworkBehaviour.RegisterRpcDelegate(typeof(FriendManager), kRpcRpcSetupNemBoss, new CmdDelegate(InvokeRpcRpcSetupNemBoss)); kRpcRpcAddStock = 72653626; NetworkBehaviour.RegisterRpcDelegate(typeof(FriendManager), kRpcRpcAddStock, new CmdDelegate(InvokeRpcRpcAddStock)); NetworkCRC.RegisterBehaviour("FriendManager", 0); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } public override void PreStartClient() { } } public class LampCameraPullAttachment : NetworkBehaviour { public class LampPostProcessDuration : MonoBehaviour { public float inWeight; public PostProcessVolume ppVolume; public static AnimationCurve ppWeightCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); public static float maxDuration = 1f; private float stopwatch; private void Update() { stopwatch += Time.deltaTime; UpdatePostProccess(); } private void Awake() { ppVolume = ((Component)this).GetComponent(); inWeight = ppVolume.weight; UpdatePostProccess(); } private void UpdatePostProccess() { float num = Mathf.Clamp01(stopwatch / maxDuration); ppVolume.weight = inWeight * ppWeightCurve.Evaluate(num); if (num == 1f) { Object.Destroy((Object)(object)((Component)((Component)ppVolume).transform.parent).gameObject); } } } public PostProcessVolume ppVolume; public float ppDuration = 1f; public float ppMaxAngle = 180f; public AnimationCurve ppWeightCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); public AnimationCurve ppAngleWeightCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); public float expireDuration = 1f; [SyncVar] public GameObject target; [SyncVar] public bool alive; private NetworkedBodyAttachment bodyAttachment; private float expireTimer; private List lamps = new List(); private float ppStopwatch; private static bool log; private NetworkInstanceId ___targetNetId; public GameObject Networktarget { get { return target; } [param: In] set { ((NetworkBehaviour)this).SetSyncVarGameObject(value, ref target, 1u, ref ___targetNetId); } } public bool Networkalive { get { return alive; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref alive, 2u); } } public static void AddPullToBody(GameObject bodyObject, LampCameraPullController controller, float duration) { LampCameraPullAttachment lampCameraPullAttachment = GetAttachmentForBody(bodyObject); if (!Object.op_Implicit((Object)(object)lampCameraPullAttachment)) { lampCameraPullAttachment = Object.Instantiate(SS2Assets.LoadAsset("LampCameraPullAttachment", SS2Bundle.Monsters)).GetComponent(); ((Component)lampCameraPullAttachment).GetComponent().AttachToGameObjectAndSpawn(bodyObject, (string)null); } lampCameraPullAttachment.AddPull(controller, duration); } public static LampCameraPullAttachment GetAttachmentForBody(GameObject bodyObject) { List instancesList = InstanceTracker.GetInstancesList(); for (int i = 0; i < instancesList.Count; i++) { LampCameraPullAttachment lampCameraPullAttachment = instancesList[i]; if ((Object)(object)lampCameraPullAttachment.bodyAttachment.attachedBodyObject == (Object)(object)bodyObject) { return lampCameraPullAttachment; } } return null; } private void Awake() { bodyAttachment = ((Component)this).GetComponent(); } private void Start() { ((Component)this).GetComponent().targetCharacter = bodyAttachment.attachedBodyObject; } private void OnEnable() { InstanceTracker.Add(this); } private void OnDisable() { InstanceTracker.Remove(this); if (Object.op_Implicit((Object)(object)ppVolume)) { ((Component)ppVolume).transform.parent.SetParent((Transform)null); ((Component)ppVolume).gameObject.AddComponent(); } } public void AddPull(LampCameraPullController lamp, float duration) { expireTimer = duration; if (!lamps.Contains(lamp)) { lamps.Add(lamp); } } private void FixedUpdate() { if (NetworkServer.active) { ServerFixedUpdate(); } } private void ServerFixedUpdate() { expireTimer -= Time.fixedDeltaTime; if (expireTimer <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } SelectLampServer(); if (Object.op_Implicit((Object)(object)target) && Object.op_Implicit((Object)(object)bodyAttachment.attachedBody) && Object.op_Implicit((Object)(object)bodyAttachment.attachedBody.master) && bodyAttachment.attachedBody.master.aiComponents.Length != 0) { bodyAttachment.attachedBody.master.aiComponents[0].currentEnemy.gameObject = target; } } private void SelectLampServer() { for (int i = 0; i < lamps.Count; i++) { if (Object.op_Implicit((Object)(object)lamps[i])) { Networktarget = ((Component)lamps[i]).gameObject; } } } private void Update() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)bodyAttachment.attachedBody) && Object.op_Implicit((Object)(object)ppVolume) && Object.op_Implicit((Object)(object)target)) { ppStopwatch += Time.deltaTime; float num = Mathf.Clamp01(ppStopwatch / ppDuration); float num2 = ppWeightCurve.Evaluate(num); Ray aimRay = bodyAttachment.attachedBody.inputBank.GetAimRay(); float num3 = Mathf.Clamp01(Vector3.Angle(target.transform.position - ((Ray)(ref aimRay)).origin, ((Ray)(ref aimRay)).direction) / ppMaxAngle); float num4 = ppAngleWeightCurve.Evaluate(num3); ppVolume.weight = num2 * num4; if (log) { SS2Log.Debug($"Lamp pp (time){num2} * (angle){num4}", 156, "Update"); } } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(target); writer.Write(alive); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & 1) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(target); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 2) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(alive); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) if (initialState) { ___targetNetId = reader.ReadNetworkId(); alive = reader.ReadBoolean(); return; } int num = (int)reader.ReadPackedUInt32(); if ((num & 1) != 0) { target = reader.ReadGameObject(); } if ((num & 2) != 0) { alive = reader.ReadBoolean(); } } public override void PreStartClient() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkInstanceId)(ref ___targetNetId)).IsEmpty()) { Networktarget = ClientScene.FindLocalObject(___targetNetId); } } } public class LampCameraPullController : MonoBehaviour { public float maxDistance = 80f; public float cycleInterval = 0.2f; public BuffDef buffDef; public float buffDuration = 0.3f; private BullseyeSearch bullseyeSearch = new BullseyeSearch(); private List cycleTargets = new List(); private FixedTimeStamp previousCycle = FixedTimeStamp.negativeInfinity; private int cycleIndex; private TeamComponent teamComponent; private LoopSoundDef activeLoopDef; private void Awake() { teamComponent = ((Component)this).GetComponent(); } private void FixedUpdate() { if (NetworkServer.active) { ServerFixedUpdate(); } } private void ServerFixedUpdate() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Clamp01(((FixedTimeStamp)(ref previousCycle)).timeSince / cycleInterval); int num2 = ((num == 1f) ? cycleTargets.Count : Mathf.FloorToInt((float)cycleTargets.Count * num)); Vector3 position = ((Component)this).transform.position; RaycastHit val2 = default(RaycastHit); while (cycleIndex < num2) { HurtBox val = cycleTargets[cycleIndex]; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.healthComponent)) { CharacterBody body = val.healthComponent.body; if (CanTarget(body)) { Vector3 corePosition = body.corePosition; if (!Physics.Linecast(position, corePosition, ref val2, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { DebuffBodyServer(body); } } } cycleIndex++; } if (((FixedTimeStamp)(ref previousCycle)).timeSince >= cycleInterval) { previousCycle = FixedTimeStamp.now; cycleIndex = 0; cycleTargets.Clear(); SearchForTargets(cycleTargets); } } private bool CanTarget(CharacterBody body) { return true; } private void SearchForTargets(List dest) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) bullseyeSearch.searchOrigin = ((Component)this).transform.position; bullseyeSearch.minAngleFilter = 0f; bullseyeSearch.maxAngleFilter = 180f; bullseyeSearch.maxDistanceFilter = maxDistance; bullseyeSearch.filterByDistinctEntity = true; bullseyeSearch.sortMode = (SortMode)1; bullseyeSearch.viewer = null; bullseyeSearch.RefreshCandidates(); dest.AddRange(bullseyeSearch.GetResults()); } private void DebuffBodyServer(CharacterBody body) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (body.bodyIndex != Lamp.BodyIndex && body.bodyIndex != LampBoss.BodyIndex && (Object)(object)((Component)body).gameObject != (Object)(object)((Component)this).gameObject) { body.AddTimedBuff(buffDef, buffDuration); } if (FriendlyFireManager.ShouldSplashHitProceed(body.healthComponent, teamComponent.teamIndex)) { LampCameraPullAttachment.AddPullToBody(((Component)body).gameObject, this, buffDuration); } } } [RequireComponent(typeof(BaseAI))] public class LampCustomTarget : MonoBehaviour { public float searchInterval = 1f; private BaseAI ai; private BullseyeSearch search = new BullseyeSearch(); private float searchTimer; private void Awake() { ai = ((Component)this).GetComponent(); } private void FixedUpdate() { if (NetworkServer.active) { FixedUpdateServer(); } } private void FixedUpdateServer() { searchTimer -= Time.fixedDeltaTime; if (searchTimer <= 0f) { searchTimer += searchInterval; SearchForTarget(); } } private void SearchForTarget() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //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_009e: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)ai.body)) { return; } Ray aimRay = ai.bodyInputBank.GetAimRay(); search.viewer = ai.body; search.filterByDistinctEntity = true; search.filterByLoS = false; search.maxDistanceFilter = float.PositiveInfinity; search.minDistanceFilter = 0f; search.maxAngleFilter = 360f; search.searchDirection = ((Ray)(ref aimRay)).direction; search.searchOrigin = ((Ray)(ref aimRay)).origin; search.sortMode = (SortMode)1; search.queryTriggerInteraction = (QueryTriggerInteraction)0; search.teamMaskFilter = TeamMask.allButNeutral; search.RefreshCandidates(); search.FilterOutGameObject(((Component)ai.body).gameObject); IEnumerable results = search.GetResults(); HurtBox val = null; foreach (HurtBox item in results) { if (TargetFilter(item)) { if (!Object.op_Implicit((Object)(object)val)) { val = item; } if (!item.healthComponent.body.HasBuff(SS2Content.Buffs.bdLampBuff)) { val = item; break; } } } if (Object.op_Implicit((Object)(object)val)) { ai.SetCustomTargetGameObject(((Component)val.healthComponent).gameObject); } } private bool TargetFilter(HurtBox hurtBox) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) CharacterBody body = hurtBox.healthComponent.body; if (Object.op_Implicit((Object)(object)body.master) && body.bodyIndex != LampBoss.BodyIndex) { return body.bodyIndex != Lamp.BodyIndex; } return false; } } public class AnimEquip : MonoBehaviour { public Transform equip; public Transform unequip; private int equipped = -1; public void EquipKnife(int equip) { if (equip != equipped) { equipped = equip; bool flag = equip == 1; if (Object.op_Implicit((Object)(object)this.equip)) { ((Component)this.equip).gameObject.SetActive(flag); } if (Object.op_Implicit((Object)(object)unequip)) { ((Component)unequip).gameObject.SetActive(!flag); } } } } public class NemSpawnPrefabBehavior : NetworkBehaviour { public int maxPurchaseCount = 1; public int purchaseCount; private float refreshTimer; private bool waitingForRefresh; [SerializeField] public PurchaseInteraction purchaseInteraction; public void Start() { Debug.Log((object)"starting nem spawn prefab behavior"); purchaseInteraction = ((Component)this).GetComponent(); ((UnityEvent)(object)purchaseInteraction.onPurchase).AddListener((UnityAction)Emerge); if ((Object)(object)purchaseInteraction == (Object)null) { Debug.Log((object)"pi null"); } else { Debug.Log((object)"pi set"); } } public void FixedUpdate() { if (waitingForRefresh) { refreshTimer -= Time.fixedDeltaTime; if (refreshTimer <= 0f && purchaseCount < maxPurchaseCount) { Debug.Log((object)"set to avaliable"); purchaseInteraction.SetAvailable(true); waitingForRefresh = false; } } } [Server] public void Emerge(Interactor interactor) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void SS2.NemSpawnPrefabBehavior::Emerge(RoR2.Interactor)' called on client"); return; } Debug.Log((object)"killing self"); if (NetworkServer.active) { purchaseInteraction.SetAvailable(false); waitingForRefresh = true; purchaseCount++; refreshTimer = 2f; Debug.Log((object)"i should be dead by now!!!"); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } public override void PreStartClient() { } } public class PedestalBehavior : NetworkBehaviour { public PickupDropTable dropTable; public Transform dropTransform; public PickupDisplay pickupDisplay; public Vector3 dropVelocity; [SyncVar(hook = "OnSyncPickupIndex")] private int pickupIndex; private PickupPickerController pickupPickerController; private Interactor interactor; private Xoroshiro128Plus rng; private ItemTier currentTier; public UniquePickup pickup { get; set; } public int NetworkpickupIndex { get { return pickupIndex; } [param: In] set { ref int reference = ref pickupIndex; if (NetworkServer.localClientActive && !((NetworkBehaviour)this).syncVarHookGuard) { ((NetworkBehaviour)this).syncVarHookGuard = true; OnSyncPickupIndex(value); ((NetworkBehaviour)this).syncVarHookGuard = false; } ((NetworkBehaviour)this).SetSyncVar(value, ref reference, 1u); } } private void Awake() { pickupPickerController = ((Component)this).GetComponent(); } private void Start() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown if (NetworkServer.active) { rng = new Xoroshiro128Plus(Run.instance.treasureRng.nextUlong); GenerateNewPickupServer(); } if (NetworkClient.active) { UpdatePickupDisplay(); } } [Server] public void GenerateNewPickupServer() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void SS2.PedestalBehavior::GenerateNewPickupServer()' called on client"); return; } UniquePickup val = UniquePickup.none; if (Object.op_Implicit((Object)(object)dropTable)) { val = dropTable.GeneratePickup(rng); } SetPickup(val.pickupIndex.value); } private void SetPickup(int newPickupIndex) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Invalid comparison between Unknown and I4 //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) UniquePickup val = default(UniquePickup); ((UniquePickup)(ref val))..ctor(new PickupIndex(newPickupIndex)); UniquePickup val2 = pickup; if (((UniquePickup)(ref val2)).Equals(val)) { return; } pickup = val; currentTier = (ItemTier)5; PickupDef pickupDef = PickupCatalog.GetPickupDef(pickup.pickupIndex); if (pickupDef != null && (int)pickupDef.itemIndex != -1) { ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex); if (Object.op_Implicit((Object)(object)itemDef)) { currentTier = itemDef.tier; } } UpdatePickupDisplay(); } private void OnSyncPickupIndex(int newPickupIndex) { SetPickup(newPickupIndex); if (NetworkClient.active) { UpdatePickupDisplay(); } } private void UpdatePickupDisplay() { //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) if (Object.op_Implicit((Object)(object)pickupDisplay)) { PickupDisplay obj = pickupDisplay; UniquePickup val = pickup; obj.SetPickup(ref val, false); } } public void SetOptionsFromInteractor(Interactor activator) { //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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)activator)) { return; } CharacterBody component = ((Component)activator).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } Inventory inventory = component.inventory; if (!Object.op_Implicit((Object)(object)inventory)) { return; } interactor = activator; List