Decompiled source of Trunks v1.2.1
PlayableTrunks.dll
Decompiled 3 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using EntityStates; using KinematicCharacterController; using NS_KingModUtilities; using R2API; using RoR2; using RoR2.CharacterAI; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; using UnityEngine.Networking; using UnityEngine.UI; using Xft; [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("PlayableTrunks")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyProduct("PlayableTrunks")] [assembly: AssemblyTitle("PlayableTrunks")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyVersion("1.0.0.0")] namespace NS_Trunks; public class LightSwordHandler : CharacterModComponent { private const string m_bsbName = "LightSwordBonus"; private float m_currentLightCharge; private const float m_maxLightCharge = 100f; public static float m_maxDamageMultBoost = KingUtil.PercentToMult(40f); public static float m_maxCritBoost = 30f; private float m_drainRate = 4f; private float m_buttonHeldTimer; private const float MIN_TIME_PRESS = 0.4f; private SwordHandler m_swordHandler; private bool m_lightSwordActive; private bool m_hopeSwordActive; public const float m_hopeSwordMult = 2f; private void SetLightCharge(float val) { float num = Mathf.Clamp(val, 0f, 100f); if (m_currentLightCharge != num) { m_currentLightCharge = num; OnLightChargeSet(); } } private void AddLightCharge(float val) { SetLightCharge(GetLightCharge() + val); } public float GetLightCharge() { return m_currentLightCharge; } public float GetLightChargeRatio() { return m_currentLightCharge / 100f; } public bool IsLightChargeFull() { return GetLightCharge() == 100f; } public bool IsLightChargeEmpty() { return GetLightCharge() == 0f; } public bool GetLightSwordActive() { return m_lightSwordActive; } public bool GetHopeSwordActive() { return m_hopeSwordActive; } private void OnLightChargeSet() { if (!GetLightSwordActive() && m_currentLightCharge == 100f) { MainPlugin.PlaySoundEvent(((Component)this).gameObject, TrunksSounds.trx_lightsword_full, 100); } } protected override bool InitUI() { if (UIManager.Get().FindHUDUIElement("UI_LightSword") is UI_LightSword uI_LightSword && uI_LightSword.Init(this)) { return true; } return false; } public override void Init() { ((CharacterModComponent)this).Init(); m_swordHandler = ((Component)this).GetComponent<SwordHandler>(); ((NetworkComponent)this).IsAuthority(); } protected override void InternalUpdate() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (((NetworkComponent)this).IsAuthority()) { if (((CharacterModComponent)this).IsInMainState()) { if (Input.GetKey(MainPlugin.Config_TransformKey.Value)) { m_buttonHeldTimer += Time.deltaTime; } else { m_buttonHeldTimer = 0f; } if (m_buttonHeldTimer > 0.4f) { TryActivateLightSword(); } } CheckLightSwordMode(); } if (MainPlugin.DEBUG_MODE && Input.GetKeyDown((KeyCode)106)) { if (IsLightChargeEmpty()) { AddLightCharge(100f); } else { AddLightCharge(-100f); } } } public void BoostLightCharge_Minor() { AddLightCharge(2f); } public void ActivateLightSword() { //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_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) m_lightSwordActive = true; m_swordHandler.SetSwordMode(ESwordMode.LIGHT); AddCharacterBuffs(); ((CharacterModComponent)this).GetNetworkHandler().PlaySoundNetworked(((Component)this).gameObject, TrunksSounds.trx_lightsword_activate, 100, false); ((CharacterModComponent)this).GetNetworkHandler().SpawnFXNetworked(TrunksAssets.LightSwordActivation, m_swordHandler.GetHeldSwordGO().transform.position, Quaternion.identity, 2f, -1f, false); MainPlugin.SpawnFX(TrunksAssets.LightSwordActivation, m_swordHandler.GetHeldSwordGO().transform.position, Quaternion.identity, 2f).transform.SetParent(m_swordHandler.GetHeldSwordGO().transform, true); } public void ActivateSwordOfHope() { m_lightSwordActive = true; m_hopeSwordActive = true; m_swordHandler.SetSwordMode(ESwordMode.HOPE); AddCharacterBuffs(2f); } private void TryActivateLightSword() { if (IsLightChargeFull() && !m_lightSwordActive && ((object)((CharacterModComponent)this).GetEntityStateMachine().state).GetType() != typeof(LightSwordCutsceneState)) { LightSwordCutsceneState lightSwordCutsceneState = new LightSwordCutsceneState(); lightSwordCutsceneState.cutsceneTime = 0.75f; ((CharacterModComponent)this).GetEntityStateMachine().SetState((EntityState)(object)lightSwordCutsceneState); } } private void CheckLightSwordMode() { if (m_lightSwordActive) { if (!((CharacterModComponent)this).IsInTransformingCutscene() && !(((CharacterModComponent)this).GetEntityStateMachine().state is SwordOfHopeSkill)) { AddLightCharge((0f - m_drainRate) * Time.deltaTime); } if (IsLightChargeEmpty()) { m_lightSwordActive = false; m_hopeSwordActive = false; m_swordHandler.SetSwordMode(ESwordMode.NORMAL); RemoveCharacterBuffs(); } } } private void AddCharacterBuffs(float mult = 1f) { //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_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_0058: Unknown result type (might be due to invalid IL or missing references) BonusStatBundle val = default(BonusStatBundle); ((BonusStatBundle)(ref val))..ctor("LightSwordBonus", (GameObject)null, 0f); BonusStat val2 = new BonusStat("damage", 0f, m_maxDamageMultBoost * mult); ((BonusStatBundle)(ref val)).AddBonusStat(ref val2); val2 = new BonusStat("crit", m_maxCritBoost * mult, 0f); ((BonusStatBundle)(ref val)).AddBonusStat(ref val2); ((Component)this).GetComponent<BonusStatHandler>().AddBonusStatBundle(val); } private void RemoveCharacterBuffs() { BonusStatHandler component = ((Component)this).GetComponent<BonusStatHandler>(); string text = "LightSwordBonus"; component.RemoveBonusStatBundle(ref text); } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool flag = ((CharacterModComponent)this).OnSerialize(writer, forceAll); bool flag2 = default(bool); return flag2 || flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { ((CharacterModComponent)this).OnDeserialize(reader, initialState); } } public enum ESwordMode { NORMAL, LIGHT, HOPE, COUNT } public class SwordHandler : CharacterModComponent { private GameObject m_Sword_Sheathed; private GameObject m_Sword_Held; private GameObject m_heldSword_hiltHandle; private GameObject m_heldSword_blade; private GameObject m_heldSword_light; private GameObject m_heldSword_hope; private ESwordMode m_currentSwordMode; private GameObject m_defaultSwordTrail; private GameObject m_lightSwordTrail; private GameObject m_hopeSwordTrail; public override void Init() { //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_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_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) ((CharacterModComponent)this).Init(); m_Sword_Sheathed = ((Component)MainPlugin.FindTransformRecursive(((CharacterModComponent)this).GetCharacterModelSwap().GetBodyModelTransform(), "Sheathe_Sword_Position")).gameObject; m_Sword_Held = ((Component)MainPlugin.FindTransformRecursive(((CharacterModComponent)this).GetCharacterModelSwap().GetBodyModelTransform(), "Hold_Sword_Position")).gameObject; m_heldSword_hiltHandle = ((Component)MainPlugin.FindTransformRecursive(GetHeldSwordGO().transform, "Sword_HiltHandle")).gameObject; m_heldSword_blade = ((Component)MainPlugin.FindTransformRecursive(GetHeldSwordGO().transform, "Sword_Blade")).gameObject; m_heldSword_light = ((Component)MainPlugin.FindTransformRecursive(GetHeldSwordGO().transform, "light_sword")).gameObject; m_heldSword_hope = ((Component)MainPlugin.FindTransformRecursive(GetHeldSwordGO().transform, "hope_sword")).gameObject; m_defaultSwordTrail = Object.Instantiate<GameObject>(TrunksAssets.default_sword_trail, Vector3.zero, Quaternion.identity); m_defaultSwordTrail.SetActive(false); m_lightSwordTrail = Object.Instantiate<GameObject>(TrunksAssets.light_sword_trail, Vector3.zero, Quaternion.identity); m_lightSwordTrail.SetActive(false); m_hopeSwordTrail = Object.Instantiate<GameObject>(TrunksAssets.hope_sword_trail, Vector3.zero, Quaternion.identity); m_hopeSwordTrail.SetActive(false); SetSwordMode(ESwordMode.NORMAL); SheatheSword(); } public void SetSwordMode(ESwordMode newMode) { m_currentSwordMode = newMode; m_heldSword_hiltHandle.SetActive(newMode == ESwordMode.NORMAL || newMode == ESwordMode.LIGHT); m_heldSword_blade.SetActive(newMode == ESwordMode.NORMAL || newMode == ESwordMode.LIGHT); m_heldSword_light.SetActive(newMode == ESwordMode.LIGHT); m_heldSword_hope.SetActive(newMode == ESwordMode.HOPE); bool isSheathed = !IsSwordHeld(); OnSwordHandlingChanged(in isSheathed); if (((NetworkComponent)this).IsAuthority()) { TrunksNetworkHandler component = ((Component)this).GetComponent<TrunksNetworkHandler>(); if ((Object)(object)component != (Object)null) { component.SetSwordModeNetworked(m_currentSwordMode); } } } public ESwordMode GetSwordMode() { return m_currentSwordMode; } public void SheatheSword() { if ((Object)(object)m_Sword_Sheathed != (Object)null && (Object)(object)m_Sword_Held != (Object)null) { if (m_Sword_Held.activeInHierarchy) { MainPlugin.PlaySoundEvent(((Component)this).gameObject, TrunksSounds.trx_sheathe_sword, 100); } m_Sword_Sheathed.SetActive(true); m_Sword_Held.SetActive(false); } bool isSheathed = true; OnSwordHandlingChanged(in isSheathed); } public void HoldSword() { if ((Object)(object)m_Sword_Sheathed != (Object)null && (Object)(object)m_Sword_Held != (Object)null) { if (m_Sword_Sheathed.activeInHierarchy) { MainPlugin.PlaySoundEvent(((Component)this).gameObject, TrunksSounds.trx_unsheathe_sword, 100); } m_Sword_Sheathed.SetActive(false); m_Sword_Held.SetActive(true); } bool isSheathed = false; OnSwordHandlingChanged(in isSheathed); } private bool IsSwordHeld() { return m_Sword_Held.activeInHierarchy; } private void OnSwordHandlingChanged(in bool isSheathed) { m_defaultSwordTrail.SetActive(!isSheathed && GetSwordMode() == ESwordMode.NORMAL); m_lightSwordTrail.SetActive(!isSheathed && GetSwordMode() == ESwordMode.LIGHT); m_hopeSwordTrail.SetActive(!isSheathed && GetSwordMode() == ESwordMode.HOPE); } public GameObject GetHeldSwordGO() { if ((Object)(object)m_Sword_Held != (Object)null) { return ((Component)m_Sword_Held.transform.GetChild(0)).gameObject; } return null; } public GameObject GetSheathedSwordGO() { if ((Object)(object)m_Sword_Sheathed != (Object)null) { return ((Component)m_Sword_Sheathed.transform.GetChild(0)).gameObject; } return null; } private void OnUpdateSwordTrails() { UpdateSwordTrail(ref m_defaultSwordTrail); UpdateSwordTrail(ref m_lightSwordTrail); UpdateSwordTrail(ref m_hopeSwordTrail); } private void UpdateSwordTrail(ref GameObject swordTrail) { //IL_002a: 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) if ((Object)(object)swordTrail != (Object)null && (Object)(object)m_Sword_Held != (Object)null) { swordTrail.transform.position = m_Sword_Held.transform.position; swordTrail.transform.rotation = m_Sword_Held.transform.rotation; } } protected override void InternalUpdate() { OnUpdateSwordTrails(); if (Input.GetKeyDown((KeyCode)257)) { SetSwordMode(ESwordMode.NORMAL); } if (Input.GetKeyDown((KeyCode)258)) { SetSwordMode(ESwordMode.LIGHT); } if (Input.GetKeyDown((KeyCode)259)) { SetSwordMode(ESwordMode.HOPE); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool flag = ((CharacterModComponent)this).OnSerialize(writer, forceAll); bool flag2 = default(bool); return flag2 || flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { ((CharacterModComponent)this).OnDeserialize(reader, initialState); } } public class TrunksCharacterModelSwap : CharacterModelSwapBase { protected override GameObject GetCharacterAssetPrefab() { return TrunksAssets.LocalAssetBundle.LoadAsset<GameObject>(TrunksCharacterRegistration.CharacterAssetPrefabName); } private void Start() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) base.m_skinCount = 2; ((CharacterModelSwapBase)this).InitCharacterModel(CharacterModDataManager.GetCharacterNameData(TrunksCharacterRegistration.CharacterName)); } protected override void SetEyebrowMaterial(Material newMat) { if (Object.op_Implicit((Object)(object)base.m_faceRenderer)) { Material[] materials = ((Renderer)base.m_faceRenderer).materials; materials[0] = newMat; materials[1] = newMat; RendererSetMaterialsExtension.SetMaterials((Renderer)(object)base.m_faceRenderer, materials, materials.Length); } } protected override void OnDisplayModelEnter() { //IL_000d: 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) ((CharacterModelSwapBase)this).OnDisplayModelEnter(); Transform transform = ((Component)this).transform; transform.rotation *= Quaternion.Euler(0f, -45f, 0f); MainPlugin.PlayVoiceSoundEvent(((Component)this).gameObject, TrunksSounds.trx_select_voice, 100); } protected override void InitAdditionalParts(Transform currentSkinTransform) { } protected override Material GetDefaultHairMaterial() { int currentSkinID = ((CharacterModelSwapBase)this).GetCurrentSkinID(); if (currentSkinID == 0 || currentSkinID != 1) { return BaseAssets.COL_LightBlue; } return TrunksAssets.TRX_COL_Pink; } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool flag = ((CharacterModelSwapBase)this).OnSerialize(writer, forceAll); bool flag2 = default(bool); return flag2 || flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { ((CharacterModelSwapBase)this).OnDeserialize(reader, initialState); } } public class TrunksDuoSkillHandler : DuoSkillHandler { protected override uint GetRequestSoundID() { return TrunksSounds.trx_request_voices; } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool flag = ((DuoSkillHandler)this).OnSerialize(writer, forceAll); bool flag2 = default(bool); return flag2 || flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { ((DuoSkillHandler)this).OnDeserialize(reader, initialState); } } public class TrunksNetworkHandler : NetworkComponent { private static int kCmdCmdSetSwordModeNetworked; private static int kRpcRpcSetSwordModeNetworked; [Command] private void CmdSetSwordModeNetworked(ESwordMode swordModeValue) { if (!((NetworkComponent)this).IsAuthority()) { ((Component)this).GetComponent<SwordHandler>().SetSwordMode(swordModeValue); } CallRpcSetSwordModeNetworked(swordModeValue); } [ClientRpc] private void RpcSetSwordModeNetworked(ESwordMode swordModeValue) { if (!((NetworkComponent)this).IsServer() && !((NetworkComponent)this).IsAuthority()) { ((Component)this).GetComponent<SwordHandler>().SetSwordMode(swordModeValue); } } public void SetSwordModeNetworked(ESwordMode swordModeValue) { if (((NetworkComponent)this).IsServer()) { CallRpcSetSwordModeNetworked(swordModeValue); } else { CallCmdSetSwordModeNetworked(swordModeValue); } } private void UNetVersion() { } protected static void InvokeCmdCmdSetSwordModeNetworked(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkServer.active) { Debug.LogError((object)"Command CmdSetSwordModeNetworked called on client."); } else { ((TrunksNetworkHandler)(object)obj).CmdSetSwordModeNetworked((ESwordMode)reader.ReadInt32()); } } public void CallCmdSetSwordModeNetworked(ESwordMode swordModeValue) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogError((object)"Command function CmdSetSwordModeNetworked called on server."); return; } if (((NetworkBehaviour)this).isServer) { CmdSetSwordModeNetworked(swordModeValue); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)5); val.WritePackedUInt32((uint)kCmdCmdSetSwordModeNetworked); val.Write(((Component)this).GetComponent<NetworkIdentity>().netId); val.Write((int)swordModeValue); ((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdSetSwordModeNetworked"); } protected static void InvokeRpcRpcSetSwordModeNetworked(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcSetSwordModeNetworked called on server."); } else { ((TrunksNetworkHandler)(object)obj).RpcSetSwordModeNetworked((ESwordMode)reader.ReadInt32()); } } public void CallRpcSetSwordModeNetworked(ESwordMode swordModeValue) { //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 RpcSetSwordModeNetworked called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcSetSwordModeNetworked); val.Write(((Component)this).GetComponent<NetworkIdentity>().netId); val.Write((int)swordModeValue); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcSetSwordModeNetworked"); } static TrunksNetworkHandler() { //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 kCmdCmdSetSwordModeNetworked = 2821620; NetworkBehaviour.RegisterCommandDelegate(typeof(TrunksNetworkHandler), kCmdCmdSetSwordModeNetworked, new CmdDelegate(InvokeCmdCmdSetSwordModeNetworked)); kRpcRpcSetSwordModeNetworked = -492123170; NetworkBehaviour.RegisterRpcDelegate(typeof(TrunksNetworkHandler), kRpcRpcSetSwordModeNetworked, new CmdDelegate(InvokeRpcRpcSetSwordModeNetworked)); NetworkCRC.RegisterBehaviour("TrunksNetworkHandler", 0); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool flag = ((NetworkComponent)this).OnSerialize(writer, forceAll); bool flag2 = default(bool); return flag2 || flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { ((NetworkComponent)this).OnDeserialize(reader, initialState); } } public class TrunksTransformationData : CharacterTransformationData { public override string GetTransformationSkillName(string transformationSkillNameID) { switch (transformationSkillNameID) { case "TSuperSaiyanGod3": case "TSuperSaiyanGod": case "TSuperSaiyan": return ChangeTheFutureSkill.SkillName; case "TSuperSaiyan3": case "TAscendedSuperSaiyan": return "Heat Dome Attack"; case "TUltraSuperSaiyan": return "Inexperienced Power Up"; case "TSuperSaiyan2": return "Masenko"; case "TSuperSaiyanBlue": case "TSuperSaiyanRage": case "TSuperSaiyanBlue3": return "Sword Of Hope"; default: return "None"; } } public override TModifier GetTransformationModifier() { //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_0039: Unknown result type (might be due to invalid IL or missing references) TModifier transformationModifier = ((CharacterTransformationData)this).GetTransformationModifier(); ((TModifier)(ref transformationModifier)).AddElement("m_damagePercentBonus", 0f - KingUtil.PercentToMult(10f), 1f); ((TModifier)(ref transformationModifier)).AddElement("m_totalMasteryLevelsToUnlock", 0f, 1.1f); return transformationModifier; } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool flag = ((CharacterTransformationData)this).OnSerialize(writer, forceAll); bool flag2 = default(bool); return flag2 || flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { ((CharacterTransformationData)this).OnDeserialize(reader, initialState); } } public class TrunksTransformationHandler : TransformationHandler { private LightSwordHandler m_lightSwordHandler; protected override void Start() { m_lightSwordHandler = ((Component)this).GetComponent<LightSwordHandler>(); } protected override void OnTransformedFirstTime(MainTransformationState mTState) { if (mTState != null) { uint num = 0u; switch (((TransformationState)mTState).GetName()) { case "Super Saiyan": num = TrunksSounds.trx_first_ssj_voice; break; case "Ascended Super Saiyan": num = TrunksSounds.trx_first_assj_voice; break; case "Ultra Super Saiyan": num = TrunksSounds.trx_first_ussj_voice; break; case "Super Saiyan 2": num = TrunksSounds.trx_first_ssj2_voice; break; } ((CharacterModComponent)this).GetNetworkHandler().PlaySoundNetworked(((Component)this).gameObject, num, 100, true); } } protected override void OnStartTransforming(MainTransformationState mTState) { ((CharacterModComponent)this).GetNetworkHandler().PlaySoundNetworked(((Component)this).gameObject, TrunksSounds.trx_transformation_voices, 100, true); } protected override void TriggerCutsceneTransformation(MainTransformationState mTState, int nextETransformationStateIdx) { if (((TransformationState)mTState).GetName() == "Super Saiyan Rage") { TriggerSuperSaiyanRageCutscene(mTState, nextETransformationStateIdx); } else { ((TransformationHandler)this).TriggerCutsceneTransformation(mTState, nextETransformationStateIdx); } } private void TriggerSuperSaiyanRageCutscene(MainTransformationState mTState, int tIndex) { //IL_0111: 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_013d: 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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown //IL_00bd: 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) float num = 7.5f; float num2 = 4.5f; if (mTState != null) { ((TransformationHandler)this).GetKiHandler().SetLockCurrentKi(true); ((TransformationHandler)this).ResetTransformations(true, true, true, true); base.m_delayedTransformationStateIdx = tIndex; if ((Object)(object)mTState.GetCutsceneStartAura() != (Object)null) { ((TransformationHandler)this).CreateStartAura(mTState.GetCutsceneStartAura()); ((CharacterModComponent)this).GetNetworkHandler().SpawnFXNetworked(mTState.GetCutsceneStartAura(), ((Component)this).transform.position, Quaternion.identity, 10f, -1f, false); } ((CharacterModComponent)this).GetNetworkHandler().PlaySoundNetworked(((Component)this).gameObject, BaseSounds.prepare_move_0, 100, false); ((CharacterModComponent)this).GetNetworkHandler().PlaySoundNetworked(((Component)this).gameObject, TrunksSounds.trx_transformation_ssrg_cutscene, 100, false); ((CharacterModComponent)this).GetNetworkHandler().ApplyBuffNetworked(((Component)((CharacterModComponent)this).GetCharacterBody()).gameObject, Buffs.Immune.buffIndex, num + 2f); ((CharacterModComponent)this).GetNetworkHandler().PlaySoundNetworked(((Component)this).gameObject, BaseSounds.rumble, 100, false); ((MonoBehaviour)this).Invoke("FakeTransformToSuperSaiyan", 2f); ((MonoBehaviour)this).Invoke("FakeTransformationSound", num2); ((MonoBehaviour)this).Invoke("DelayedCutsceneTransformInto", num2); } Wave val = default(Wave); val.amplitude = 0.1f; val.frequency = 180f; val.cycleOffset = 0f; Wave val2 = val; ShakeEmitter.CreateSimpleShakeEmitter(((Component)this).transform.position, val2, num - 0.65f, 200f, false); if ((Object)(object)((CharacterModComponent)this).GetCharacterDirection() != (Object)null) { ((CharacterModComponent)this).GetNetworkHandler().PlayAnimationNetworked(((CharacterModComponent)this).GetCharacterDirection(), "SuperSaiyanRage_Transform", 0.15f, 0, false); } TransformationCutsceneState val3 = new TransformationCutsceneState(); val3.cutsceneTime = num; val3.forceToGround = true; val3.OnExit_Delegate = (OnExit_DelegateDeclaration)Delegate.Combine((Delegate?)(object)val3.OnExit_Delegate, (Delegate?)new OnExit_DelegateDeclaration(OnSuperSaiyanRageCutsceneEnd)); ((CharacterModComponent)this).GetEntityStateMachine().SetState((EntityState)(object)val3); } private void OnSuperSaiyanRageCutsceneEnd() { ((TransformationHandler)this).GetKiHandler().SetLockCurrentKi(false); } private void FakeTransformationSound() { ((CharacterModComponent)this).GetNetworkHandler().PlaySoundNetworked(((Component)this).gameObject, BaseSounds.transformation, 100, false); } private void FakeTransformToSuperSaiyan() { ((TransformationHandler)this).TransformInto_Visual(TransformationBank.FindLoadedTransformation("Super Saiyan")); } public override bool AdditionalCheckForUniqueTransformationSkill(string skillName) { if (skillName == "Sword Of Hope") { if (!m_lightSwordHandler.GetHopeSwordActive()) { if (!m_lightSwordHandler.IsLightChargeFull()) { if (m_lightSwordHandler.GetLightSwordActive()) { return m_lightSwordHandler.GetLightChargeRatio() > 0.33f; } return false; } return true; } return false; } return true; } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool flag = ((TransformationHandler)this).OnSerialize(writer, forceAll); bool flag2 = default(bool); return flag2 || flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { ((TransformationHandler)this).OnDeserialize(reader, initialState); } } public class DuoGalickGunSkill_Trunks : DuoGalickGunSkill { public override void OnEnter() { ((DuoGalickGunSkill)this).OnEnter(); MainPlugin.PlayVoiceSoundEvent(((EntityState)this).gameObject, TrunksSounds.trx_duoskill_galickgun_voice, 100); } protected override Vector3 GetMoveToPositionOffset() { //IL_0001: 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) return ((DuoGalickGunSkill)this).GetMoveToPositionOffset() * -1f; } public override void Update() { ((DuoGalickGunSkill)this).Update(); } public override void OnExit() { ((DuoGalickGunSkill)this).OnExit(); MainPlugin.PlayVoiceSoundEvent(((EntityState)this).gameObject, TrunksSounds.trx_duoskill_galickgun_fire_voice, 100); } } public class LightSwordCutsceneState : CharacterModSkillState { public float cutsceneTime; public bool lerpingZoomCam; public bool instantZoomCam; private const string m_animState = "LightSwordActivation"; private float m_lightSwordTriggerTime = 0.1f; private bool m_triggerdLightSword; public override void OnEnter() { ((CharacterModSkillState)this).OnEnter(); ((EntityState)this).GetComponent<SwordHandler>().HoldSword(); if (((EntityState)this).isAuthority) { base.m_canBeStunned = false; _ = instantZoomCam; base.m_canBeStunned = false; ((CharacterModSkillState)this).PlaySkillAnimation("LightSwordActivation", 0.1f, 1, true, true); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { ((CharacterModSkillState)this).ProcessMainStateMovement(true); if (((EntityState)this).fixedAge > cutsceneTime) { ((EntityState)this).outer.SetNextStateToMain(); } else if (!m_triggerdLightSword && ((EntityState)this).fixedAge > m_lightSwordTriggerTime) { ((EntityState)this).GetComponent<LightSwordHandler>().ActivateLightSword(); m_triggerdLightSword = true; } } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).GetComponent<SwordHandler>().SheatheSword(); if (((EntityState)this).isAuthority) { ((CharacterModSkillState)this).PlaySkillAnimation("UpperIdle", 0.1f, 1, true, true); } } } public class TrunksMeleeStrikeSkillAlt : TrunksMeleeStrikeSkill { public new const string SkillName = "Sword Strike Alternate"; public override void OnEnter() { ((MeleeStrikeSkill)this).m_lockedMovement = false; base.OnEnter(); } public override void OnExit() { base.OnExit(); } public new static string GetSkillDescription(bool displayAutoMove) { return TrunksMeleeStrikeSkill.GetSkillDescription(displayAutoMove) + MainPlugin.ColorText("Free movement, but does not Auto-Move.", "#03f4fc"); } } public class TrunksMeleeStrikeSkill : MeleeStrikeSkill { public const string SkillName = "Sword Strike"; private const float m_skillDamage = 3.2f; private const float m_collisionForwardOffsetMult = 2f; private SwordHandler m_swordSheatheHandler; private LightSwordHandler m_lightSwordHandler; public override void OnEnter() { m_swordSheatheHandler = ((EntityState)this).GetComponent<SwordHandler>(); m_lightSwordHandler = ((EntityState)this).GetComponent<LightSwordHandler>(); if ((Object)(object)m_swordSheatheHandler != (Object)null) { m_swordSheatheHandler.HoldSword(); } ((MeleeStrikeSkill)this).OnEnter(); } public override void OnExit() { if ((Object)(object)m_swordSheatheHandler != (Object)null) { m_swordSheatheHandler.SheatheSword(); } ((MeleeStrikeSkill)this).OnExit(); } protected override float GetCollisionForwardOffsetMult() { return 2f; } protected override float GetCollisionRadius() { float num = ((MeleeStrikeSkill)this).GetCollisionRadius(); if (m_lightSwordHandler.GetHopeSwordActive()) { num *= 2f; } return num; } protected override bool ShowSwingFX() { return false; } protected override void OnDamageApplied() { ((MeleeStrikeSkill)this).OnDamageApplied(); if ((Object)(object)m_lightSwordHandler != (Object)null) { m_lightSwordHandler.BoostLightCharge_Minor(); } } public static string GetSkillDescription(bool displayAutoMove) { return MeleeStrikeSkill.CreateBaseSkillDescription(3.2f, displayAutoMove); } protected override string ConstructMeleeAttackAnimName(int num) { if (num < 10) { return string.Format("TRX_BAS_BONE|TRX_BAS_BONE|TRX_ATC_00{0}|Base Layer", num, num); } return string.Format("TRX_BAS_BONE|TRX_BAS_BONE|TRX_ATC_0{0}|Base Layer", num, num); } protected override uint GetSwingVoiceSoundID(int voiceIdx) { uint result = 0u; switch (voiceIdx) { case 0: result = TrunksSounds.trx_primary_swing_0; break; case 1: result = TrunksSounds.trx_primary_swing_1; break; case 2: result = TrunksSounds.trx_primary_swing_2; break; case 3: result = TrunksSounds.trx_primary_swing_3; break; case 4: result = TrunksSounds.trx_primary_swing_4; break; } return result; } protected override uint GetHitSound() { return TrunksSounds.trx_sword_hits; } protected override void InitMeleeAttackData() { GenerateMeleeAttackData(base.m_lockedMovement); } private void GenerateMeleeAttackData(bool isLocked) { //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_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_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_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_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) base.m_meleeAttacks = (NewMeleeAttackData[])(object)new NewMeleeAttackData[5] { new NewMeleeAttackData(((MeleeStrikeSkill)this).ConstructMeleeAttackAnimStateName(0), ((MeleeStrikeSkill)this).ConstructMeleeAttackAnimName(4), (!isLocked) ? 1 : 0, BaseSounds.primary_swing_0, 0, 0.19f, 0.15f, false), new NewMeleeAttackData(((MeleeStrikeSkill)this).ConstructMeleeAttackAnimStateName(1), ((MeleeStrikeSkill)this).ConstructMeleeAttackAnimName(5), (!isLocked) ? 1 : 0, BaseSounds.primary_swing_1, 1, 0.21f, 0.15f, true), new NewMeleeAttackData(((MeleeStrikeSkill)this).ConstructMeleeAttackAnimStateName(2), ((MeleeStrikeSkill)this).ConstructMeleeAttackAnimName(2), (!isLocked) ? 1 : 0, BaseSounds.primary_swing_0, 2, 0.33f, 0.15f, true), new NewMeleeAttackData(((MeleeStrikeSkill)this).ConstructMeleeAttackAnimStateName(3), ((MeleeStrikeSkill)this).ConstructMeleeAttackAnimName(5), (!isLocked) ? 1 : 0, BaseSounds.primary_swing_1, 3, 0.21f, 0.15f, false), new NewMeleeAttackData(((MeleeStrikeSkill)this).ConstructMeleeAttackAnimStateName(4), ((MeleeStrikeSkill)this).ConstructMeleeAttackAnimName(8), (!isLocked) ? 1 : 0, BaseSounds.primary_swing_0, 4, 0.14f, 0.15f, true) }; } protected override void LockHipPosition() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) ((CharacterModSkillState)this).GetCharacterModelSwap().SetLockHipPosition(true, new Vector3(0f, 1.15f, 0f), true); } } public class ShiningSwordAttackSkill : CharacterModSkillState { public static string SkillName = "Shining Sword Attack"; private static float m_damagePerHitPercent = KingUtil.PercentToMult(240); private static float m_finalBlastdamagePerHitPercent = KingUtil.PercentToMult(660); private float groundedForwardOffset = 1f; private float groundedRadius = 3f; private float fireBlastRadius = 6f; private float groundedMaxYDiff = 3f; private float groundedCoef = 0.75f; private float m_skillMovementSpeed = 12.5f; private float m_minTimeExecuting = 0.5f; private float m_dashTime = 0.25f; private string m_startAnimName = "ShiningSwordAttack_Dash"; private string m_attackAnimName = "ShiningSwordAttack_0"; private string m_attackAnimClipName = "ShiningSwordAttack_P1"; private string m_endAnimName = "ShiningSwordAttack_1"; private float m_attackTimerMax = 0.2f; private float m_attackTimer; public static float m_kiCostPercentPerSecond = 0.1f; public static float BaseKiCost = 30f; private bool m_shouldFinish; private bool m_shouldEarlyFinish; private bool m_startSlashing; private float m_timeFinished; private bool m_fireFinalBlast; public const string m_bsbName = "ShiningSwordAttackBonus"; private const float m_baseArmorAdd = 40f; private SwordHandler m_swordHandler; private LightSwordHandler m_lightSwordHandler; private Vector3 m_endingDirection; private float currentAnimDuration; private void ResetAttackTimer() { m_attackTimer = m_attackTimerMax; } protected float GetCollisionRadius() { float num = groundedRadius; if (m_lightSwordHandler.GetHopeSwordActive()) { num *= 2f; } return num; } public override void OnEnter() { //IL_009d: 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_0140: Unknown result type (might be due to invalid IL or missing references) ((CharacterModSkillState)this).OnEnter(); m_swordHandler = ((EntityState)this).GetComponent<SwordHandler>(); m_lightSwordHandler = ((EntityState)this).GetComponent<LightSwordHandler>(); base.m_animationSpeedMulti = 1f; base.m_skillAttackSpeedCap = 3f; if (((EntityState)this).isAuthority) { ((CharacterModSkillState)this).GetAnimationTime(m_attackAnimClipName); ((CharacterModSkillState)this).PlaySkillAnimation(m_startAnimName, 0f, 0, true, true); ((CharacterModSkillState)this).AddGravityDisableCounter(); ((CharacterModSkillState)this).TryMoveTowardsTarget(((EntityState)this).GetComponent<TargetTracker>(), 60f, 55f, 24f, false, 0.33f); ((CharacterModSkillState)this).GetNetworkHandler().ApplyBuffNetworked(((Component)((EntityState)this).characterBody).gameObject, Buffs.Immune.buffIndex, m_dashTime); BonusStatBundle val = default(BonusStatBundle); ((BonusStatBundle)(ref val))..ctor("ShiningSwordAttackBonus", (GameObject)null, 0f); BonusStat val2 = new BonusStat("armor", 40f, 0f); ((BonusStatBundle)(ref val)).AddBonusStat(ref val2); ((CharacterModSkillState)this).GetBonusStatHandler().AddBonusStatBundle(val); } else if ((Object)(object)m_swordHandler != (Object)null) { m_swordHandler.HoldSword(); } MainPlugin.PlaySoundEvent(((EntityState)this).gameObject, BaseSounds.movement_dash, 100); MainPlugin.PlayVoiceSoundEvent(((EntityState)this).gameObject, TrunksSounds.trx_shiningswordslash_voices, 40); ((CharacterModSkillState)this).GetCharacterModelSwap().SetLockHipPosition(true, new Vector3(0f, 1.15f, 0f), true); } private float GetAttackSpeedScale() { return 1f + (((EntityState)this).characterBody.attackSpeed - 1f) * 0.5f; } private void OnStartSlashing() { if (((EntityState)this).isAuthority) { ((CharacterModSkillState)this).GetAnimationTime(m_attackAnimClipName); ((CharacterModSkillState)this).PlaySkillAnimation(m_attackAnimName, 0.1f, 0, true, true); } if ((Object)(object)m_swordHandler != (Object)null) { m_swordHandler.HoldSword(); } } public override void Update() { //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0278: 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_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) ((EntityState)this).Update(); if (!m_shouldFinish) { if (((EntityState)this).fixedAge > m_dashTime) { if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = ((CharacterModSkillState)this).GetAimRayDirection() * (ShouldStopMoving() ? 0f : Mathf.Max(m_skillMovementSpeed, ((EntityState)this).characterBody.moveSpeed)); } if (!m_startSlashing) { if (!((EntityState)this).inputBank.skill2.down) { if (!m_shouldEarlyFinish && ((EntityState)this).isAuthority) { m_shouldEarlyFinish = true; ((EntityState)this).outer.SetNextStateToMain(); } } else { m_startSlashing = true; OnStartSlashing(); } } if (((EntityState)this).isAuthority && !m_shouldEarlyFinish) { if (m_attackTimer > 0f) { m_attackTimer -= Time.deltaTime * GetAttackSpeedScale(); } else { if (ApplyDamage(GetCollisionRadius(), m_damagePerHitPercent, TrunksSounds.trx_sword_hits, showSwingFX: false)) { m_lightSwordHandler.BoostLightCharge_Minor(); } ResetAttackTimer(); ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, BaseSounds.swings, 100, false); } } } else if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge > 0.1f && MainPlugin.MainStatePerformInputs_Hack(((EntityState)this).inputBank, ((EntityState)this).skillLocator, ((EntityState)this).outer, ((EntityState)this).isAuthority, true, false, true, true, true)) { return; } if (!((EntityState)this).isAuthority) { return; } ((BaseState)this).StartAimMode(1f, true); if (((EntityState)this).characterMotor.isGrounded) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } if (!m_shouldEarlyFinish) { if (((EntityState)this).fixedAge >= m_dashTime + m_minTimeExecuting) { float num = ((CharacterModSkillState)this).GetKiHandler().GetMaxKi() * m_kiCostPercentPerSecond * ((BaseSkillState)this).activatorSkillSlot.cooldownScale * Time.deltaTime; ((CharacterModSkillState)this).GetKiHandler().AddCurrentKi(0f - num); } if (((CharacterModSkillState)this).GetKiHandler().GetCurrentKi() <= 0f || (!((EntityState)this).inputBank.skill2.down && ((EntityState)this).fixedAge >= m_dashTime + m_minTimeExecuting)) { OnSkillFinish(); } } } else if (((EntityState)this).isAuthority) { float num2 = 0.8f; if (Time.time > m_timeFinished + 0.2f && !m_fireFinalBlast) { m_fireFinalBlast = true; OnFireFinalBlast(); } ((EntityState)this).characterMotor.velocity = Vector3.zero; if (Time.time > m_timeFinished + num2) { ((EntityState)this).outer.SetNextStateToMain(); } } } private void OnFireFinalBlast() { //IL_0001: 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_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_001b: 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_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_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_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_0082: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((CharacterModSkillState)this).GetLeftHandBonePosition() + m_endingDirection * 2f; ((CharacterModSkillState)this).GetNetworkHandler().SpawnFXNetworked(TrunksAssets.ShiningSwordAttack_Explode_FX, val, Quaternion.identity, 1f, -1f, false); EffectLayer[] componentsInChildren = MainPlugin.SpawnFX(TrunksAssets.ShiningSwordAttack_Explode_FX, val, Quaternion.identity, 1f).GetComponentsInChildren<EffectLayer>(); foreach (EffectLayer obj in componentsInChildren) { Vector3 aimRayDirection = ((CharacterModSkillState)this).GetAimRayDirection(); obj.OriVelocityAxis = ((Vector3)(ref aimRayDirection)).normalized; } MainPlugin.CreateCameraShake(((EntityState)this).transform.position, 0.4f, 100f, 1.25f, 180f, 0f, true); ApplyDamage(fireBlastRadius, m_finalBlastdamagePerHitPercent, BaseSounds.hits_medium, showSwingFX: false); ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, TrunksSounds.trx_shiningswordslash_fireblast, 100, false); } public static string GetDisplayBaseDamage() { return (m_damagePerHitPercent * 100f).ToString(); } public static string GetSkillDescription() { return string.Format(MainPlugin.CreateKiCostDescription(BaseKiCost.ToString()) + "\nDash towards a target and rapidly unleash a barrage of sword strikes! \nDealing " + MainPlugin.CreateDamageDescription((m_damagePerHitPercent * 100f).ToString()) + " for each one!\n" + MainPlugin.ColorText("Holding this skill drains ", "#03f4fc") + MainPlugin.ColorText(KingUtil.MultToPercent(m_kiCostPercentPerSecond) + "% Ki ", "#03bcff") + MainPlugin.ColorText("per second.", "#03f4fc") + "\nOnce released, unleash an additional energy blast, dealing " + MainPlugin.CreateDamageDescription((m_finalBlastdamagePerHitPercent * 100f).ToString()) + "!"); } private void OnSkillFinish() { //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_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) if ((Object)(object)m_swordHandler != (Object)null) { m_swordHandler.SheatheSword(); } m_shouldFinish = true; m_timeFinished = Time.time; ((BaseState)this).StartAimMode(0f, true); m_endingDirection = ((CharacterModSkillState)this).GetAimRayDirectionXZ(); ((EntityState)this).characterDirection.moveVector = m_endingDirection; ((CharacterModSkillState)this).PlaySkillAnimation(m_endAnimName, 0f, 0, true, true); } private bool ShouldStopMoving() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) Collider[] source = CollectEnemies(1f, ((EntityState)this).transform.position, groundedMaxYDiff); source.Where((Collider x) => (Object)(object)((Component)x).GetComponent<HurtBox>() != (Object)null); return source.Where((Collider x) => ((Component)x).GetComponent<HurtBox>().teamIndex != ((EntityState)this).teamComponent.teamIndex).Count() > 0; } private bool ApplyDamage(float collisionRadius, float damageMult, uint hitSoundID, bool showSwingFX) { //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_0097: 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_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_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_0058: Unknown result type (might be due to invalid IL or missing references) bool result = false; if (showSwingFX) { Vector3 aimRayDirection = ((CharacterModSkillState)this).GetAimRayDirection(); aimRayDirection.y = 0f; Vector3 position = ((EntityState)this).transform.position; Quaternion val = Quaternion.LookRotation(aimRayDirection, Vector3.up) * Quaternion.Euler(0f, 0f, (float)Random.Range(0, 360)); MainPlugin.SpawnFX(BaseAssets.PrimaryAttackFX, position, val, 2f).transform.SetParent(((EntityState)this).transform); } Collider[] array = CollectEnemies(collisionRadius, ((EntityState)this).transform.position + ((EntityState)this).characterDirection.forward * groundedForwardOffset, groundedMaxYDiff); if (ColliderDamage(array, damageMult, groundedCoef)) { MainPlugin.PlaySoundEvent(((Component)((EntityState)this).characterBody).gameObject, hitSoundID, 100); result = true; } return result; } private Collider[] CollectEnemies(float radius, Vector3 position, float maxYDiff) { //IL_0014: 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_001e: Unknown result type (might be due to invalid IL or missing references) LayerIndex entityPrecise = LayerIndex.entityPrecise; return (from x in Physics.OverlapSphere(position, radius, LayerMask.op_Implicit(((LayerIndex)(ref entityPrecise)).mask)) where Mathf.Abs(x.ClosestPoint(((EntityState)this).transform.position).y - ((EntityState)this).transform.position.y) <= maxYDiff select x).ToArray(); } private bool ColliderDamage(Collider[] array, float damageMulti, float coeff) { //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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //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_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0160: 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_00b0: Unknown result type (might be due to invalid IL or missing references) IEnumerable<Collider> enumerable = array.Where((Collider x) => (Object)(object)((Component)x).GetComponent<HurtBox>() != (Object)null); List<HurtBoxGroup> list = new List<HurtBoxGroup>(); foreach (Collider item in enumerable) { HurtBox hurtBox2 = ((Component)item).GetComponentInChildren<HurtBox>(); if (!((Object)(object)hurtBox2 == (Object)null) && !((Object)(object)hurtBox2.healthComponent == (Object)(object)((EntityState)this).healthComponent) && list.Where((HurtBoxGroup x) => (Object)(object)x == (Object)(object)hurtBox2.hurtBoxGroup).Count() <= 0 && (hurtBox2.teamIndex != ((EntityState)this).teamComponent.teamIndex || (int)FriendlyFireManager.friendlyFireMode != 0)) { _ = hurtBox2; list.Add(hurtBox2.hurtBoxGroup); DamageInfo val = new DamageInfo(); val.damage = ((BaseState)this).damageStat * damageMulti; val.attacker = ((EntityState)this).gameObject; val.procCoefficient = coeff; val.position = ((Component)hurtBox2).transform.position; val.crit = ((BaseState)this).RollCrit(); ((CharacterModSkillState)this).GetNetworkHandler().ApplyDamageNetworked(val, ((Component)hurtBox2.healthComponent).gameObject); Vector3 val2 = hurtBox2.collider.ClosestPoint(((EntityState)this).transform.position); MainPlugin.SpawnFX(BaseAssets.HitFX, val2, Quaternion.identity, 1f); } } if (list == null) { return false; } return list.Count() > 0; } public override void OnExit() { if (((EntityState)this).isAuthority) { ((CharacterModSkillState)this).PlaySkillAnimation("Idle", 0.15f, 0, true, true); ((CharacterModSkillState)this).RemoveGravityDisableCounter(); BonusStatHandler bonusStatHandler = ((CharacterModSkillState)this).GetBonusStatHandler(); string text = "ShiningSwordAttackBonus"; bonusStatHandler.RemoveBonusStatBundle(ref text); } ((MonoBehaviour)((CharacterModSkillState)this).GetCharacterModelSwap()).Invoke("ResetLockHipPosition", 0.15f); m_swordHandler.SheatheSword(); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)0; } } public class BurningAttackSkill : CharacterModSkillState { public static string SkillName = "Burning Attack"; public const string ProjectileName = "BurningAttackProjectile"; public const string ProjectileNameInvisibleBurn = "BurningAttackProjectileInvisibleBurn"; public const float ProjectileCollisionRadius = 0.9f; public const float ProjectileExplosionCollisionRadius = 10f; public const float kiblastBaseDamageMult = 17f; public float kiblastProjectileSpeed = 140f; public float kiblastCoeff = 1f; public float SkillDuration = 2.25f; public float FireSkillTime = 1.5f; public const int BaseKiCost = 50; private bool m_hasFired; private bool m_hasTriggeredVoice; private string m_skillAnimationName = "BurningAttack_Skill_0"; public static string GetSkillDescription() { return string.Format(MainPlugin.CreateKiCostDescription(50.ToString()) + "\nPerform a series of rapid arm movements, firing a flaming explosive ball of energy! \nExplodes on hit, Dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamage()) + "!\n"); } public static string GetDisplayBaseDamage() { return 1700f.ToString(); } public override void OnEnter() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) ((CharacterModSkillState)this).OnEnter(); if (((EntityState)this).isAuthority) { base.m_canBeStunned = false; base.m_allowHover = true; ((CharacterModSkillState)this).PlaySkillAnimation(m_skillAnimationName, 0.1f, 1, true, true); ((BaseState)this).StartAimMode(SkillDuration, true); base.m_characterModelSwap.SetLockHipPosition(true, new Vector3(0f, 1.1f, 0f), true); ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, TrunksSounds.trx_burningattack_start, 100, false); ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, TrunksSounds.trx_burningattack_start_voice, 40, true); } } public override void FixedUpdate() { //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_0100: 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_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_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_0099: 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_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) ((EntityState)this).FixedUpdate(); if (!m_hasTriggeredVoice && ((EntityState)this).fixedAge > FireSkillTime - 0.5f) { m_hasTriggeredVoice = true; ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, TrunksSounds.trx_burningattack_ready, 100, false); ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, TrunksSounds.trx_burningattack_voices, 50, true); } if (!((EntityState)this).isAuthority) { return; } if (!m_hasFired) { Vector3 aimRayDirection = ((CharacterModSkillState)this).GetAimRayDirection(); aimRayDirection = MainPlugin.RotateAroundPoint(Vector3.zero, aimRayDirection, Quaternion.Euler(new Vector3(0f, 180f, 0f))); base.m_characterModelSwap.SetChestTargetLookAt(((EntityState)this).transform.position + aimRayDirection * 10f); if (((EntityState)this).fixedAge > FireSkillTime) { FireProjectile(); m_hasFired = true; } ((CharacterModSkillState)this).ProcessMainStateMovement(true); } else { ((EntityState)this).characterDirection.moveVector = ((CharacterModSkillState)this).GetAimRayDirection(); ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (((EntityState)this).fixedAge >= SkillDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void FireProjectile() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, TrunksSounds.trx_shiningswordslash_fireblast, 100, false); MainPlugin.CreateCameraShake(((EntityState)this).transform.position, 0.25f, 50f, 1f, 180f, 0f, true); FireProjectile("BurningAttackProjectile", ((BaseState)this).damageStat * 17f, 1f, canCrit: true); for (int i = 0; i < 9; i++) { FireProjectile("BurningAttackProjectileInvisibleBurn", 0f, 0f, canCrit: false); } } private void FireProjectile(string projectileName, float damage, float force, bool canCrit) { //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_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_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) Vector3 rightHandBonePosition = ((CharacterModSkillState)this).GetRightHandBonePosition(); Quaternion val = Util.QuaternionSafeLookRotation(((CharacterModSkillState)this).GetAimRayDirection()); GameObject projectilePrefab = ProjectileCatalog.GetProjectilePrefab(ProjectileCatalog.FindProjectileIndex(projectileName)); if ((Object)(object)projectilePrefab != (Object)null) { ProjectileManager.instance.FireProjectile(projectilePrefab, rightHandBonePosition, val, ((EntityState)this).gameObject, damage, force, canCrit && Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, kiblastProjectileSpeed); } } public override void OnExit() { //IL_0021: 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_003a: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { ((CharacterModSkillState)this).PlaySkillAnimation("UpperIdle", 0.1f, 1, true, true); base.m_characterModelSwap.SetChestTargetLookAt(Vector3.zero); base.m_characterModelSwap.SetLockHipPosition(false, default(Vector3), true); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } public static void SetupBurningAttackProjectile() { GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/projectiles/MageLightningBombProjectile"), "BurningAttackProjectile"); OnProjectileDestroyComponent obj = val.AddComponent<OnProjectileDestroyComponent>(); obj.cameraShakeOnDestroy = true; obj.shakeDuration = 1.1f; obj.shakeRadius = 150f; obj.shakeAmplitude = 2f; obj.shakeDecayAmplitude = true; obj.shakeFrequency = 180f; obj.SoundIDToPlayOnDestroy = BaseSounds.explosion_0; obj.ExplosionFX = TrunksAssets.BurningAttackExplosionFX; MainPlugin.s_projectileRegistrationManager.InitProjectileImpactData(ref val, false, 0.9f, 10f, true, true); MainPlugin.s_projectileRegistrationManager.CreateNewProjectile("BurningAttackProjectile", (DamageType)128, val, TrunksAssets.BurningAttackProjectileGO, BaseAssets.BlankGO); } public static void SetupBurningAttackProjectile_InvisibleBurn() { GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/projectiles/MageLightningBombProjectile"), "BurningAttackProjectileInvisibleBurn"); OnProjectileDestroyComponent obj = val.AddComponent<OnProjectileDestroyComponent>(); obj.cameraShakeOnDestroy = false; obj.SoundIDToPlayOnDestroy = 0u; obj.ExplosionFX = null; MainPlugin.s_projectileRegistrationManager.InitProjectileImpactData(ref val, false, 0.9f, 10f, true, true); MainPlugin.s_projectileRegistrationManager.CreateNewProjectile("BurningAttackProjectileInvisibleBurn", (DamageType)128, val, BaseAssets.BlankGO, BaseAssets.BlankGO); } } public class SwiftMassacreSkill : CharacterModSkillState { private struct DamageRequest { public HurtBox hurtbox; public int timesHit; } private SwordHandler m_swordHandler; private string StartAnimationStateName = "Unsheathe"; private string EndAnimationStateName = "Sheathe"; public const string SkillName = "Swift Massacre"; public const float SkillDamageMult = 14f; public const float SkillDamagePerExtraHitMult = 1.2f; public const float SkillStartupTime = 0.3f; public const float SkillEndDuration = 0.6f; public const float SkillRange = 30f; private const float SkillDuration = 2f; private const float BonusSkillDuration = 1f; public const float BaseKiCost = 100f; public const float KiDrainPerSecond = 80f; private List<HurtBox> m_enemyList = new List<HurtBox>(); private const float m_baseAttackTimerMax = 0.16f; private float m_attackTimerMax = 0.16f; private float m_attackTimer; private bool m_attackingComplete; private bool m_successfulEnd; private float m_bonusDuration; private float m_timeCompleted; private float m_stunTimer; private const float m_stunTimerMax = 0.8f; private int m_targetsHit; private bool m_targetIncremented; private Vector3 m_startingPosition = Vector3.zero; private int m_maxNumberOfAttacks; private int m_numberOfAttacksPerTarget = 1; private int m_numberOfAttacksHit; private bool m_attackingStarted; private bool m_successfulStart; private DynamicArray<DamageRequest> m_damageRequests = new DynamicArray<DamageRequest>(); private LightSwordHandler m_lightSwordHandler; public static string GetSkillDescription() { return string.Format(MainPlugin.CreateKiCostDescription(100f.ToString("n0")) + "\nVanish at light speed and swiftly strike nearby enemies in front dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamage()) + "!\n" + MainPlugin.ColorText("Additional Damage is dealt when the same target is hit more than once.", "#03f4fc") + "\n" + MainPlugin.ColorText("Duration can be extended at the cost of ", "#03f4fc") + MainPlugin.ColorText(80f.ToString("n0") + " Ki", "#03bcff") + MainPlugin.ColorText(" per second!", "#03f4fc") + "\n" + MainPlugin.ColorText("The number of strikes scales off attack speed.", "#999999")); } public static string GetDisplayBaseDamage() { return 1400f.ToString(); } private void FindMoreTargets() { m_enemyList.AddRange(CollectEnemies(30f)); } public override void OnEnter() { ((CharacterModSkillState)this).OnEnter(); m_swordHandler = ((EntityState)this).GetComponent<SwordHandler>(); m_lightSwordHandler = ((EntityState)this).GetComponent<LightSwordHandler>(); if ((Object)(object)m_swordHandler != (Object)null) { m_swordHandler.HoldSword(); } if (!((EntityState)this).isAuthority) { ((MonoBehaviour)base.m_characterModelSwap).Invoke("AddHideBodyCounter", 0f); } if (((EntityState)this).isAuthority) { m_attackTimerMax /= ((EntityState)this).characterBody.attackSpeed; m_maxNumberOfAttacks = Mathf.FloorToInt(2f / m_attackTimerMax); ((CharacterModSkillState)this).PlaySkillAnimation(StartAnimationStateName, 0.1f, 1, true, true); base.m_canBeStunned = false; } } private void CalculateNumberOfAttacksPerTarget() { m_numberOfAttacksPerTarget = Mathf.FloorToInt((float)(m_maxNumberOfAttacks / m_enemyList.Count)); MainPlugin.DebugLog("CalculateNumberOfAttacksPerTarget(); m_numberOfAttacksPerTarget = " + m_numberOfAttacksPerTarget); } private float GetTotalDuration() { return 2.3f + m_bonusDuration; } public override void Update() { //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) ((EntityState)this).Update(); if (!((EntityState)this).isAuthority) { return; } if (!m_attackingComplete) { UpdateAttackingActive(); } else if (((EntityState)this).fixedAge > m_timeCompleted + 0.6f) { ((EntityState)this).outer.SetNextStateToMain(); } if (m_stunTimer <= 0f) { m_stunTimer = 0.8f; for (int i = 0; i < m_targetsHit; i++) { if (i < m_damageRequests.GetCount()) { StunEnemy(m_damageRequests.AccessElement(i).hurtbox); } } } else { m_stunTimer -= Time.deltaTime; } if (((EntityState)this).fixedAge < 0.3f || m_attackingComplete || !m_successfulStart) { ((CharacterModSkillState)this).ProcessMainStateMovement(true); } else { ((EntityState)this).characterMotor.velocity = Vector3.zero; } } private void OnAttackAttemptStarted() { //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_0062: Unknown result type (might be due to invalid IL or missing references) m_startingPosition = ((EntityState)this).transform.position; FindMoreTargets(); if (m_enemyList.Count > 0) { m_successfulStart = true; CalculateNumberOfAttacksPerTarget(); base.m_characterModelSwap.AddHideBodyCounter(); ((CharacterModSkillState)this).EnableCollisions(false); } if (m_successfulStart) { ((CharacterModSkillState)this).GetNetworkHandler().ApplyBuffNetworked(((Component)((EntityState)this).characterBody).gameObject, Buffs.HiddenInvincibility.buffIndex, 2.6f); ((CharacterModSkillState)this).AddGravityDisableCounter(); ((CharacterModSkillState)this).ResetMainStateMovement(); } } private void UpdateAttackingActive() { //IL_0384: 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_00cf: 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_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_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_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_0190: 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_01bd: 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) if (((EntityState)this).fixedAge >= 0.3f && ((EntityState)this).fixedAge < GetTotalDuration()) { if (!m_attackingStarted) { m_attackingStarted = true; OnAttackAttemptStarted(); } if (m_successfulStart) { if (m_attackTimer <= 0f) { if (m_enemyList.Count > 0) { HurtBox enemyHurtBox = m_enemyList[0]; if ((Object)(object)enemyHurtBox != (Object)null && enemyHurtBox.healthComponent.alive) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(((Component)enemyHurtBox).transform.position, !MainPlugin.IsInStage("bazaar")); Wave val = default(Wave); val.amplitude = 0.1f; val.frequency = 50f; val.cycleOffset = 0f; Wave val2 = val; ShakeEmitter.CreateSimpleShakeEmitter(((EntityState)this).transform.position, val2, 0.1f, 50f, true); ((CharacterModSkillState)this).GetNetworkHandler().SpawnFXNetworked(BaseAssets.HitFX, ((Component)enemyHurtBox).transform.position, Quaternion.identity, 1f, -1f, false); MainPlugin.SpawnFX(BaseAssets.HitFX, ((Component)enemyHurtBox).transform.position, Quaternion.identity, 1f); float num = Random.Range(0, 360); ((CharacterModSkillState)this).GetNetworkHandler().SpawnFXNetworked(BaseAssets.PrimaryAttackFX, ((Component)enemyHurtBox).transform.position, Quaternion.Euler(num, num, num), 1f, -1f, false); MainPlugin.SpawnFX(BaseAssets.PrimaryAttackFX, ((Component)enemyHurtBox).transform.position, Quaternion.Euler(num, num, num), 1f); ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, TrunksSounds.trx_sword_hits, 100, false); m_numberOfAttacksHit++; if (m_damageRequests != null) { int num2 = m_damageRequests.FindFirstElementIndex((Predicate<DamageRequest>)((DamageRequest x) => (Object)(object)x.hurtbox.hurtBoxGroup == (Object)(object)enemyHurtBox.hurtBoxGroup)); if (num2 == -1) { DamageRequest damageRequest = default(DamageRequest); damageRequest.hurtbox = enemyHurtBox; damageRequest.timesHit = 1; m_damageRequests.AddElement(damageRequest); } else { m_damageRequests.AccessElement(num2).timesHit++; } } if (!m_targetIncremented) { m_targetsHit++; m_targetIncremented = true; ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, BaseSounds.dodges, 100, false); } if (m_numberOfAttacksHit > m_numberOfAttacksPerTarget) { m_enemyList.RemoveAt(0); m_numberOfAttacksHit = 0; m_targetIncremented = false; } if ((Object)(object)m_lightSwordHandler != (Object)null) { m_lightSwordHandler.BoostLightCharge_Minor(); } m_attackTimer = m_attackTimerMax; m_stunTimer = 0f; } else { m_enemyList.RemoveAt(0); } } } else { m_attackTimer -= Time.deltaTime; } } } if (m_successfulStart && ((EntityState)this).inputBank.skill4.down && (m_enemyList.Count == 0 || ((EntityState)this).fixedAge >= GetTotalDuration())) { FindMoreTargets(); if (m_enemyList.Count > 0) { m_bonusDuration += 1f; CalculateNumberOfAttacksPerTarget(); ((CharacterModSkillState)this).GetNetworkHandler().ApplyBuffNetworked(((Component)((EntityState)this).characterBody).gameObject, Buffs.HiddenInvincibility.buffIndex, 1f); } } if (m_bonusDuration > 0f) { ((CharacterModSkillState)this).GetKiHandler().AddCurrentKi(-80f * Time.deltaTime); } if (((EntityState)this).fixedAge > GetTotalDuration() || (((EntityState)this).fixedAge > 0.3f && (m_enemyList.Count == 0 || !m_successfulStart)) || ((CharacterModSkillState)this).GetKiHandler().GetCurrentKi() == 0f || (m_bonusDuration > 0f && !((EntityState)this).inputBank.skill4.down)) { m_attackingComplete = true; OnSkillEnd(); } } public override void OnExit() { //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_012d: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); if ((Object)(object)m_swordHandler != (Object)null) { if (!((EntityState)this).isAuthority || m_successfulStart) { MainPlugin.SpawnFX(TrunksAssets.LightSwordActivation, m_swordHandler.GetHeldSwordGO().transform.position, Quaternion.identity, 2f).transform.SetParent(m_swordHandler.GetSheathedSwordGO().transform, true); } m_swordHandler.SheatheSword(); } ((MonoBehaviour)base.m_characterModelSwap).CancelInvoke("AddHideBodyCounter"); base.m_characterModelSwap.RemoveHideBodyCounter(); if (!((EntityState)this).isAuthority) { return; } for (int i = 0; i < m_targetsHit; i++) { if (i < m_damageRequests.GetCount() && (Object)(object)m_damageRequests.AccessElement(i).hurtbox != (Object)null) { DamageEnemy(m_damageRequests.AccessElement(i).hurtbox, 14f + (float)(m_damageRequests.AccessElement(i).timesHit - 1) * 1.2f, 1f); } } if (!m_successfulEnd) { ((CharacterModSkillState)this).RemoveGravityDisableCounter(); if (m_successfulStart) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(m_startingPosition, false); } } ((CharacterModSkillState)this).PlaySkillAnimation("UpperIdle", 0.15f, 1, true, true); ((CharacterModSkillState)this).PlaySkillAnimation("Idle", 0.15f, 0, true, true); ((CharacterModSkillState)this).EnableCollisions(true); } private void OnSkillEnd() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)base.m_characterModelSwap).CancelInvoke("AddHideBodyCounter"); base.m_characterModelSwap.RemoveHideBodyCounter(); if (((EntityState)this).isAuthority) { if (m_successfulStart && !MainPlugin.IsInStage("bazaar")) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(m_startingPosition, false); } ((CharacterModSkillState)this).PlaySkillAnimation(EndAnimationStateName, 0.1f, 1, true, true); m_timeCompleted = ((EntityState)this).fixedAge; if (m_successfulStart) { ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, BaseSounds.dodges, 100, false); ((CharacterModSkillState)this).RemoveGravityDisableCounter(); } } m_successfulEnd = true; } private List<HurtBox> CollectEnemies(float radius) { //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_0017: 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_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_0034: 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_010e: 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) List<HurtBox> list = new List<HurtBox>(); Vector3 val = m_startingPosition + ((CharacterModSkillState)this).GetAimRayDirection() * 30f / 2f; LayerIndex entityPrecise = LayerIndex.entityPrecise; IEnumerable<Collider> enumerable = from x in Physics.OverlapSphere(val, radius, LayerMask.op_Implicit(((LayerIndex)(ref entityPrecise)).mask)) where (Object)(object)((Component)x).GetComponent<HurtBox>() != (Object)null where ((Component)x).GetComponent<HurtBox>().healthComponent.alive select x; List<HurtBoxGroup> list2 = new List<HurtBoxGroup>(); foreach (Collider item in enumerable) { HurtBox hurtBox2 = ((Component)item).GetComponentInChildren<HurtBox>(); if (!((Object)(object)hurtBox2 == (Object)null) && !((Object)(object)hurtBox2.healthComponent == (Object)(object)((EntityState)this).healthComponent) && list2.Where((HurtBoxGroup x) => (Object)(object)x == (Object)(object)hurtBox2.hurtBoxGroup).Count() <= 0 && (hurtBox2.teamIndex != ((EntityState)this).teamComponent.teamIndex || (int)FriendlyFireManager.friendlyFireMode != 0)) { list2.Add(hurtBox2.hurtBoxGroup); list.Add(hurtBox2); } } return list; } private void StunEnemy(HurtBox hurtBox) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //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_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) if ((Object)(object)hurtBox != (Object)null && hurtBox.healthComponent.alive) { DamageInfo val = new DamageInfo(); val.damage = 0f; val.attacker = ((EntityState)this).gameObject; val.procCoefficient = 1f; val.position = ((Component)hurtBox).transform.position; val.crit = false; val.damageType = DamageTypeCombo.op_Implicit((DamageType)32); ((CharacterModSkillState)this).GetNetworkHandler().ApplyDamageNetworked(val, ((Component)hurtBox.healthComponent).gameObject); } } private void DamageEnemy(HurtBox hurtBox, float damageMulti, float coeff) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //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_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_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_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) if ((Object)(object)hurtBox != (Object)null && hurtBox.healthComponent.alive) { DamageInfo val = new DamageInfo(); val.damage = ((BaseState)this).damageStat * damageMulti; val.attacker = ((EntityState)this).gameObject; val.procCoefficient = coeff; val.position = ((Component)hurtBox).transform.position; val.crit = ((BaseState)this).RollCrit(); val.damageType = DamageTypeCombo.op_Implicit((DamageType)0); ((CharacterModSkillState)this).GetNetworkHandler().ApplyDamageNetworked(val, ((Component)hurtBox.healthComponent).gameObject); Vector3 val2 = hurtBox.collider.ClosestPoint(((EntityState)this).transform.position); MainPlugin.SpawnFX(BaseAssets.HitFX, val2, Quaternion.identity, 1f); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } public class ChangeTheFutureSkill : CharacterModSkillState { public static string SkillName = "Change The Future"; public const float SkillDamageMult = 10f; public float SkillDuration = 1f; public float FireSkillTime = 0.2f; private float m_skillCollisionRadius = 10f; private float m_skillForwardOffset = 3f; private float m_skillCoeff = 1f; public const int BaseKiCost = 100; private bool m_hasFired; private string m_skillAnimationName = "ChangeTheFuture_Skill_0"; private Vector3 m_startingDirection; public static string GetSkillDescription() { return string.Format(MainPlugin.CreateKiCostDescription(100.ToString()) + "\nQuickly fire a large explosion! \nDamaging all enemies in front, Dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamage()) + "!\n"); } public static string GetDisplayBaseDamage() { return 1000f.ToString(); } public override void OnEnter() { //IL_004c: 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_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) ((CharacterModSkillState)this).OnEnter(); if (((EntityState)this).isAuthority) { base.m_canBeStunned = false; ((CharacterModSkillState)this).PlaySkillAnimation(m_skillAnimationName, 0.1f, 0, true, true); ((BaseState)this).StartAimMode(SkillDuration, true); base.m_characterModelSwap.SetLockHipPosition(true, new Vector3(0f, 1.1f, 0f), true); ((CharacterModSkillState)this).AddGravityDisableCounter(); ((EntityState)this).characterDirection.moveVector = ((CharacterModSkillState)this).GetAimRayDirection(); m_startingDirection = ((CharacterModSkillState)this).GetAimRayDirectionXZ(); } MainPlugin.PlaySoundEvent(((EntityState)this).gameObject, BaseSounds.prepare_move_0, 100); } public override void FixedUpdate() { //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) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; if (!m_hasFired && ((EntityState)this).fixedAge > FireSkillTime) { FireBlast(); m_hasFired = true; } if (((EntityState)this).fixedAge >= SkillDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } } private void FireBlast() { //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_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_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_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_00bb: Unknown result type (might be due to invalid IL or missing references) ApplyDamage(); Vector3 val = ((CharacterModSkillState)this).GetRightHandBonePosition() + m_startingDirection * m_skillForwardOffset; ((CharacterModSkillState)this).GetNetworkHandler().SpawnFXNetworked(TrunksAssets.ChangeTheFuture_Explode_FX, val, Quaternion.identity, 1f, -1f, false); EffectLayer[] componentsInChildren = MainPlugin.SpawnFX(TrunksAssets.ChangeTheFuture_Explode_FX, val, Quaternion.identity, 1f).GetComponentsInChildren<EffectLayer>(); foreach (EffectLayer obj in componentsInChildren) { Vector3 aimRayDirectionXZ = ((CharacterModSkillState)this).GetAimRayDirectionXZ(); obj.OriVelocityAxis = ((Vector3)(ref aimRayDirectionXZ)).normalized; } ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, TrunksSounds.trx_changethefuture_fire, 100, false); ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, TrunksSounds.trx_changethefuture_fire_voices, 70, true); MainPlugin.CreateCameraShake(((EntityState)this).transform.position, 0.75f, 50f, 2f, 180f, 0f, true); } public override void OnExit() { //IL_002a: 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) if (((EntityState)this).isAuthority) { ((CharacterModSkillState)this).PlaySkillAnimation("Idle", 0.15f, 0, true, true); ((CharacterModSkillState)this).RemoveGravityDisableCounter(); base.m_characterModelSwap.SetLockHipPosition(false, default(Vector3), true); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } private void ApplyDamage() { //IL_000d: 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_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) Collider[] array = CollectEnemies(m_skillCollisionRadius, ((EntityState)this).transform.position + ((EntityState)this).characterDirection.forward * m_skillForwardOffset); if (ColliderDamage(array, 10f, m_skillCoeff)) { ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, BaseSounds.hits_large, 100, false); } } private Collider[] CollectEnemies(float radius, Vector3 position) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //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_000a: Unknown result type (might be due to invalid IL or missing references) LayerIndex entityPrecise = LayerIndex.entityPrecise; return Physics.OverlapSphere(position, radius, LayerMask.op_Implicit(((LayerIndex)(ref entityPrecise)).mask)); } private bool ColliderDamage(Collider[] array, float damageMulti, float coeff) { //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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //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_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0160: 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_00b0: Unknown result type (might be due to invalid IL or missing references) IEnumerable<Collider> enumerable = array.Where((Collider x) => (Object)(object)((Component)x).GetComponent<HurtBox>() != (Object)null); List<HurtBoxGroup> list = new List<HurtBoxGroup>(); foreach (Collider item in enumerable) { HurtBox hurtBox2 = ((Component)item).GetComponentInChildren<HurtBox>(); if (!((Object)(object)hurtBox2 == (Object)null) && !((Object)(object)hurtBox2.healthComponent == (Object)(object)((EntityState)this).healthComponent) && list.Where((HurtBoxGroup x) => (Object)(object)x == (Object)(object)hurtBox2.hurtBoxGroup).Count() <= 0 && (hurtBox2.teamIndex != ((EntityState)this).teamComponent.teamIndex || (int)FriendlyFireManager.friendlyFireMode != 0)) { _ = hurtBox2; list.Add(hurtBox2.hurtBoxGroup); DamageInfo val = new DamageInfo(); val.damage = ((BaseState)this).damageStat * damageMulti; val.attacker = ((EntityState)this).gameObject; val.procCoefficient = coeff; val.position = ((Component)hurtBox2).transform.position; val.crit = ((BaseState)this).RollCrit(); ((CharacterModSkillState)this).GetNetworkHandler().ApplyDamageNetworked(val, ((Component)hurtBox2.healthComponent).gameObject); Vector3 val2 = hurtBox2.collider.ClosestPoint(((EntityState)this).transform.position); MainPlugin.SpawnFX(BaseAssets.HitFX, val2, Quaternion.identity, 1f); } } if (list == null) { return false; } return list.Count() > 0; } } public class HeatDomeAttackSkill : BaseBeamChargeSkillState { public const string SkillName = "Heat Dome Attack"; public const float skillBaseDamageMult = 36f; public const float skillChargeAuraDamageMult = 3f; public const float skillChargeAuraRadius = 7f; public const float skillDamagePerChargeMult = 16f; public const float BaseKiCost = 100f; private GameObject m_chargeFX; private ShakeEmitter m_currentShake; private float m_auraDamageTimer; private const float m_auraDamageTimerMax = 0.1f; protected override void InitSkillValues() { //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) base.m_beamChargeValues.chargeAnimationStateLayer = 0; base.m_beamChargeValues.chargeAnimationStateName = "HeatDomeAttack_Skill_0"; base.m_beamChargeValues.beamMinChargeTime = 1.6f; base.m_beamChargeValues.addBSB = true; base.m_beamChargeValues.bsb_baseArmorAdd = 300f; base.m_beamChargeValues.beamChargeSoundEventID = TrunksSounds.trx_heatdomeattack_charge; base.m_beamChargeValues.chargeFX = null; base.m_beamChargeValues.baseKiDrainPerSecond = 50f; base.m_beamChargeValues.addKiDrainPerSecond = 50f; base.m_beamChargeValues.canMoveDuringCharge = false; base.m_beamChargeValues.canAimDuringCharge = false; base.m_beamFireValuesToSend.beamDuration = 3f; base.m_beamFireValuesToSend.beamBaseRange = 100f; base.m_beamFireValuesToSend.beamBaseRadius = 2.5f; base.m_beamFireValuesToSend.beamRadiusChargeAdd = 3.5f; base.m_beamFireValuesToSend.beamDamageChargeAddMult = 16f; base.m_beamFireValuesToSend.beamBaseDamageMult = 36f; base.m_beamFireValuesToSend.beamCoeff = 1f; base.m_beamFireValuesToSend.beamFX = TrunksAssets.HeatDomeAttackFX; base.m_beamFireValuesToSend.beamFireSoundID = BaseSounds.beam_fire_4; base.m_beamFireValuesToSend.beamFireVoiceSoundID = TrunksSounds.trx_heatdomeattack_fire_voices; base.m_beamFireValuesToSend.fireAnimationStateName = "HeatDomeAttack_Skill_1"; base.m_beamFireValuesToSend.forcedFireDirection = Vector3.up; base.m_beamFireValuesToSend.rotateChestToFiringDirection = false; base.m_beamFireValuesToSend.scaleBeamVisuals = true; base.m_beamFireValuesToSend.sendChargingCameraOffset = true; base.m_beamFireValuesToSend.fireBeamLocation = (EFireBeamLocation)3; } protected override bool ChildCanFireBeam() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return !Input.GetKey(MainPlugin.Config_UniqueSkillKey.Value); } public static string GetSkillDescription() { return string.Format(MainPlugin.CreateKiCostDescription(100f.ToString("n0")) + "\nGenerate immense power to fire an energy wave upwards, dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamage()) + " per second whilst the blast is active!\nBurn nearby enemies while charging, dealing " + MainPlugin.CreateDamageDescription(GetDisplayChargeAuraDamage()) + " per second!\nConsume additional Ki and increase damage by " + MainPlugin.CreateDamageDescription(GetDisplayDamagePerCharge()) + " and size per second of charging!\n" + MainPlugin.ColorText("Ki consumption gradually increases the longer you charge!", "#03f4fc")); } public static string GetDisplayBaseDamage() { return 3600f.ToString(); } public static string GetDisplayChargeAuraDamage() { return 300f.ToString(); } public static string GetDisplayDamagePerCharge() { return 1600f.ToString(); } 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_0098: 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) ((BaseBeamChargeSkillState)this).OnEnter(); m_chargeFX = MainPlugin.SpawnFX(TrunksAssets.HeatDomeAttackChargeFX, ((EntityState)this).transform.position, Quaternion.identity, -1f); if (((EntityState)this).isAuthority) { ((CharacterModSkillState)this).m_canBeStunned = false; ((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, BaseSounds.prepare_move_0, 100, false); ((CharacterModSkillState)this).GetNetworkHandler().ApplyBuffNetworked(((Component)((EntityState)this).characterBody).gameObject, Buffs.ArmorBoost.buffIndex, base.m_beamChargeValues.beamMinChargeTime); } MainPlugin.PlayVoiceSoundEvent(((EntityState)this).gameObject, TrunksSounds.trx_heatdomeattack_charge_voice, 50); m_currentShake = MainPlugin.CreateCameraShake(((EntityState)this).transform.position, 999f, 100f, 0.2f, 180f, 0f, false); } public override void Update() { //IL_0025: 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_0056: 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_0074: Unknown result type (might be due to invalid IL or missing references) ((BaseBeamChargeSkillState)this).Update(); if ((Object)(object)m_chargeFX != (Object)null) { m_chargeFX.transform.position = ((EntityState)this).transform.position; } if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; base.m_beamFireValuesToSend.customFireBeamLocation = ((EntityState)this).transform.position - new Vector3(0f, 0.5f, 0f); m_auraDamageTimer -= Time.deltaTime; m_auraDamageTimer = Mathf.Clamp(m_auraDamageTimer, 0f, 0.1f); if (m_auraDamageTimer <= 0f) { m_auraDamageTimer = 0.1f; ApplyDamage(7f, 0.3f, 0u); } } } public override void FixedUpdate() { ((BaseBeamChargeSkillState)this).FixedUpdate(); } public override void OnExit() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) ((BaseBeamChargeSkillState)this).OnExit(); if ((Object)(object)m_chargeFX != (Object)null) { Object.Destroy((Object)(object)m_chargeFX, base.m_beamFireValuesToSend.beamDuration + 0.07f); } if ((Object)(object)m_currentShake != (Object)null) { Object.Destroy((Object)(object)m_currentShake); } if (((EntityState)this).isAuthority) { ((CharacterModSkillState)this).GetNetworkHandler().ApplyBuffNetworked(((Component)((EntityState)this).characterBody).gameObject, Buffs.ArmorBoost.buffIndex, base.m_beamFireValuesToSend.beamDuration); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } private void ApplyDamage(float collisionRadius, float damageMult, uint hitSoundID) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) Collider[] array = CollectEnemies(collisionRadius, ((EntityState)this).transform.position); if (ColliderDamage(array, damageMult, 1f)) { MainPlugin.PlaySoundEvent(((Component)((EntityState)this).characterBody).gameObject, hitSoundID, 100); } } private Collider[] CollectEnemies(float radius, Vector3 position) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //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_000a: Unknown result type (might be due to invalid IL or missing references) LayerIndex entityPrecise = LayerIndex.entityPrecise; return Physics.OverlapSphere(position, radius, LayerMask.op_Implicit(((LayerIndex)(ref entityPrecise)).mask)); } private bool ColliderDamage(Collider[] array, float damageMulti, float coeff) { //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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //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_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_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_0171: 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_00b0: Unknown result type (might be due to invalid IL or missing references) IEnumerable<Collider> enumerable = array.Where((Collider x) => (Object)(object)((Component)x).GetComponent<HurtBox>() != (Object)null); List<HurtBoxGroup> list = new List<HurtBoxGroup>(); foreach (Collider item in enumerable) { HurtBox hurtBox2 = ((Component)item).GetComponentInChildren<HurtBox>(); if (!((Object)(object)hurtBox2 == (Object)null) && !((Object)(object)hurtBox2.healthComponent == (Object)(object)((EntityState)this).healthComponent) && list.Where((HurtBoxGroup x) => (Object)(object)x == (Object)(object)hurtBox2.hurtBoxGroup).Count() <= 0 && (hurtBox2.teamIndex != ((EntityState)this).teamComponent.teamIndex || (int)FriendlyFireManager.friendlyFireMode != 0)) { _ = hurtBox2; list.Add(hurtBox2.hurtBoxGroup); DamageInfo val = new DamageInfo(); val.damage = ((BaseState)this).damageStat * damageMulti; val.attacker = ((EntityState)this).gameObject; val.procCoefficient = coeff; val.position = ((Component)hurtBox2).transform.position; val.crit = ((BaseState)this).RollCrit(); val.damageType = DamageTypeCombo.op_Implicit((DamageType)160); ((CharacterModSkillState)this).GetNetworkHandler().ApplyDamageNetworked(val, ((Component)hurtBox2.healthComponent).gameObject); Vector3 val2 = hurtBox2.collider.ClosestPoint(((EntityState)this).transform.position); MainPlugin.SpawnFX(BaseAssets.HitFX, val2, Quaternion.identity, 1f); } } if (list == null) { return false; } return list.Count() > 0; } } public class MasenkoSkill : BaseBeamChargeSkillState { public const string SkillName = "Masenko"; public const float beamBaseDamageMult = 18.5f; public static float BaseKiCost = 70f; protected override void InitSkillValues() { //IL_0063: 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) base.m_beamChargeValues.addBSB = true; base.m_beamChargeValues.bsb_baseArmorAdd = 25f; b