Decompiled source of Vegeta v1.4.2

PlayableVegeta.dll

Decompiled a week ago
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;

[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("PlayableVegeta")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyProduct("PlayableVegeta")]
[assembly: AssemblyTitle("PlayableVegeta")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NS_Vegeta;

public class MajinHandler : CharacterModComponent
{
	private static bool s_majinModeActive;

	private static bool s_majinModeRequested;

	private static bool s_majinModeLost;

	private static bool s_refuseVoiceDone_0;

	private static bool s_refuseVoiceDone_1;

	private static bool s_refuseVoiceDone_2;

	private static bool s_majinDebuffsDisabled;

	private bool m_majinModeActive;

	private readonly int MIN_MASTERY_FOR_MAJIN = 22;

	private readonly int MAX_MASTERY_FOR_MAJIN = 32;

	private readonly int MIN_MASTERY_FOR_BREAKOUT = 48;

	private const string m_firstTimeMajinTransformationStateName = "Majin_Transform_0";

	private const string m_majinSufferAnimationStateName = "Majin_Suffer_0";

	private const string m_majinBreakoutAnimationStateName = "Majin_Breakout_0";

	private TransformationHandler m_transformationHandler;

	private float m_buttonHeldTimer;

	private const float MIN_TIME_ACCEPT = 3f;

	private const float MIN_FADE_VALUE = 0f;

	private const float MAX_FADE_VALUE = 0.4f;

	private float m_currentAlphaFadeValue;

	private float m_targetAlphaFadeValue;

	private float m_currentAlphaChangeSpeedMult;

	private float m_timeSpentBlinded;

	private const string m_bsbName = "MajinBonus";

	private float m_sufferTimer;

	private const float MIN_SUFFER_TIME_DELAY = 20f;

	private const float MAX_SUFFER_TIME_DELAY = 40f;

	private uint m_currentMajinBreakoutSoundEvent;

	public bool GetMajinModeActive()
	{
		return m_majinModeActive;
	}

	public bool GetsMajinDebuffsDisabled()
	{
		return s_majinDebuffsDisabled;
	}

	public static void ResetStaticValues()
	{
		MainPlugin.DebugLog("MajinHandler::ResetStaticValues() Called");
		s_majinModeActive = false;
		s_majinModeRequested = false;
		s_majinModeLost = false;
		s_refuseVoiceDone_0 = false;
		s_refuseVoiceDone_1 = false;
		s_refuseVoiceDone_2 = false;
		s_majinDebuffsDisabled = false;
	}

	public override void Init()
	{
		m_transformationHandler = ((Component)this).GetComponent<TransformationHandler>();
		if ((Object)(object)m_transformationHandler != (Object)null)
		{
			if (((NetworkComponent)this).IsAuthority())
			{
				ResetSufferTimer();
			}
			((CharacterModComponent)this).Init();
		}
	}

	protected override bool InitUI()
	{
		if (UIManager.Get().FindHUDUIElement("UI_Majin") is UI_Majin uI_Majin && uI_Majin.Init(this))
		{
			return true;
		}
		return false;
	}

	protected override void InternalUpdate()
	{
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
		if (!((NetworkComponent)this).IsAuthority())
		{
			return;
		}
		if (MainPlugin.DEBUG_MODE && Input.GetKeyDown((KeyCode)110))
		{
			m_sufferTimer = 0f;
		}
		if (CanRequestMajinMode())
		{
			if (!s_majinModeRequested)
			{
				s_majinModeRequested = true;
				MainPlugin.GetPopUpTextHandler().AddNewPopUpText("An evil power tries to control you", false);
				PopUpTextHandler popUpTextHandler = MainPlugin.GetPopUpTextHandler();
				string[] obj = new string[5] { "Hold ", null, null, null, null };
				KeyCode value = MainPlugin.Config_TransformKey.Value;
				obj[1] = ((object)(KeyCode)(ref value)).ToString();
				obj[2] = " for ";
				obj[3] = 3f.ToString("n0");
				obj[4] = " seconds to accept it";
				popUpTextHandler.AddNewPopUpText(string.Concat(obj), false);
			}
			else if (!s_majinModeLost && ((CharacterModComponent)this).IsInMainState())
			{
				if (Input.GetKey(MainPlugin.Config_TransformKey.Value))
				{
					m_buttonHeldTimer += Time.deltaTime;
				}
				else
				{
					m_buttonHeldTimer = 0f;
				}
			}
		}
		else if (CanNoLongerRequestMajinMode() && !s_majinModeLost)
		{
			s_majinModeLost = true;
			MainPlugin.GetPopUpTextHandler().AddNewPopUpText("The evil power fades away...", false);
		}
		if (m_majinModeActive && !s_majinDebuffsDisabled)
		{
			m_sufferTimer -= Time.deltaTime;
			m_sufferTimer = Mathf.Clamp(m_sufferTimer, 0f, 40f);
			if (m_sufferTimer == 0f && CanTriggerSuffer())
			{
				if (m_transformationHandler.GetTotalMasteryLevels() > MIN_MASTERY_FOR_BREAKOUT)
				{
					s_majinDebuffsDisabled = true;
					MainPlugin.DebugLog("Majin power debuffs disabled!");
					TriggerMajinBreakout();
				}
				else
				{
					TriggerSuffer(0.4f, babidiCommand: true);
				}
			}
		}
		CheckStaticMajinMode();
		CheckMajinMode();
	}

	private bool CanTriggerSuffer()
	{
		if (((CharacterModComponent)this).CanBeStunned())
		{
			return ((CharacterModComponent)this).GetCharacterBody().healthComponent.alive;
		}
		return false;
	}

	private void TriggerMajinBreakout()
	{
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Expected O, but got Unknown
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Unknown result type (might be due to invalid IL or missing references)
		((Component)this).GetComponent<NetworkHandler>().PlaySoundNetworked(((Component)this).gameObject, BaseSounds.kicharge_start, 100, false);
		m_currentMajinBreakoutSoundEvent = MainPlugin.PlaySoundEvent(((Component)this).gameObject, BaseSounds.kicharge_loop, 100);
		((Component)this).GetComponent<NetworkHandler>().PlaySoundNetworked(((Component)this).gameObject, VegetaSounds.vgt_majin_reject_FINAL, 100, true);
		TransformationCutsceneState val = new TransformationCutsceneState();
		val.cutsceneTime = 8f;
		val.forceToGround = true;
		((CharacterModComponent)this).GetEntityStateMachine().SetState((EntityState)(object)val);
		((Component)this).GetComponent<NetworkHandler>().ApplyBuffNetworked(((Component)this).gameObject, Buffs.Immune.buffIndex, 10f);
		((Component)this).GetComponent<NetworkHandler>().PlayAnimationNetworked(((CharacterModComponent)this).GetCharacterDirection(), "Majin_Breakout_0", 0.1f, 0, false);
		((Component)this).GetComponent<NetworkHandler>().PlayAnimationNetworked(((CharacterModComponent)this).GetCharacterDirection(), "UpperIdle", 0f, 1, false);
		MainPlugin.CreateCameraShake(((Component)this).transform.position, 6.3f, 100f, 0.35f, 180f, 0f, false);
		MainPlugin.SpawnFX(BaseAssets.EmpoweredKiChargeFX, ((Component)this).transform.position, Quaternion.identity, 6.3f);
		((MonoBehaviour)this).Invoke("PostMajinBreakout", 6.3f);
	}

	private void ResetSufferTimer()
	{
		m_sufferTimer = Random.Range(20f, 40f);
	}

	private void TriggerSuffer(float fadeInSpeedMult, bool babidiCommand)
	{
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Expected O, but got Unknown
		ResetSufferTimer();
		MainPlugin.PlayVoiceSoundEvent(((Component)this).gameObject, VegetaSounds.vgt_majin_pains, 100);
		if (babidiCommand)
		{
			MainPlugin.PlayVoiceSoundEvent(((Component)this).gameObject, VegetaSounds.vgt_babidi_commands, 100);
			TransformationCutsceneState val = new TransformationCutsceneState();
			val.cutsceneTime = 2.1f;
			val.forceToGround = false;
			((CharacterModComponent)this).GetEntityStateMachine().SetState((EntityState)(object)val);
			((Component)this).GetComponent<NetworkHandler>().PlayAnimationNetworked(((CharacterModComponent)this).GetCharacterDirection(), ((CharacterModComponent)this).GetCharacterMotor().isGrounded ? "UpperIdle" : "Idle", 0.1f, ((CharacterModComponent)this).GetCharacterMotor().isGrounded ? 1 : 0, false);
			((Component)this).GetComponent<NetworkHandler>().PlayAnimationNetworked(((CharacterModComponent)this).GetCharacterDirection(), "Majin_Suffer_0", 0.1f, (!((CharacterModComponent)this).GetCharacterMotor().isGrounded) ? 1 : 0, false);
		}
		SetTargetFadeValue(0.4f, fadeInSpeedMult);
		((MonoBehaviour)this).Invoke("TryVegetaReject", 3f);
	}

	private void TryVegetaReject()
	{
		if (!s_refuseVoiceDone_2 && m_transformationHandler.GetTotalMasteryLevels() > Mathf.RoundToInt(Mathf.Lerp((float)MAX_MASTERY_FOR_MAJIN, (float)MIN_MASTERY_FOR_BREAKOUT, 0.9f)))
		{
			s_refuseVoiceDone_2 = true;
			MainPlugin.PlayVoiceSoundEvent(((Component)this).gameObject, VegetaSounds.vgt_majin_reject_2, 100);
		}
		else if (!s_refuseVoiceDone_1 && m_transformationHandler.GetTotalMasteryLevels() > Mathf.RoundToInt(Mathf.Lerp((float)MAX_MASTERY_FOR_MAJIN, (float)MIN_MASTERY_FOR_BREAKOUT, 0.7f)))
		{
			s_refuseVoiceDone_1 = true;
			MainPlugin.PlayVoiceSoundEvent(((Component)this).gameObject, VegetaSounds.vgt_majin_reject_1, 100);
		}
		else if (!s_refuseVoiceDone_0 && m_transformationHandler.GetTotalMasteryLevels() > Mathf.RoundToInt(Mathf.Lerp((float)MAX_MASTERY_FOR_MAJIN, (float)MIN_MASTERY_FOR_BREAKOUT, 0.4f)))
		{
			s_refuseVoiceDone_0 = true;
			MainPlugin.PlayVoiceSoundEvent(((Component)this).gameObject, VegetaSounds.vgt_majin_reject_0, 100);
		}
	}

	private void PostMajinBreakout()
	{
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		((Component)this).GetComponent<NetworkHandler>().PlaySoundNetworked(((Component)this).gameObject, BaseSounds.transformation, 100, false);
		MainPlugin.StopSoundEvent(ref m_currentMajinBreakoutSoundEvent);
		MainPlugin.SpawnFX(VegetaAssets.BigBangAttackExplosionFX, ((Component)this).transform.position, Quaternion.identity, 3f);
		MainPlugin.CreateCameraShake(((Component)this).transform.position, 2.5f, 100f, 0.65f, 180f, 0f, true);
		((MonoBehaviour)this).Invoke("PostMajinBreakoutMessage", 1.5f);
	}

	private void PostMajinBreakoutMessage()
	{
		MainPlugin.GetPopUpTextHandler().AddNewPopUpText("The evil vanishes, but the power remains...", false);
	}

	private bool CanRequestMajinMode()
	{
		if (m_transformationHandler.GetTotalMasteryLevels() > MIN_MASTERY_FOR_MAJIN)
		{
			return m_transformationHandler.GetTotalMasteryLevels() < MAX_MASTERY_FOR_MAJIN;
		}
		return false;
	}

	private bool CanNoLongerRequestMajinMode()
	{
		if (m_transformationHandler.GetTotalMasteryLevels() > MAX_MASTERY_FOR_MAJIN)
		{
			return !s_majinModeActive;
		}
		return false;
	}

	private void CheckMajinMode()
	{
		if (s_majinModeActive && !m_majinModeActive)
		{
			m_majinModeActive = true;
			OnMajinModeActivated();
		}
	}

	private void OnMajinModeActivated()
	{
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_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_00ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
		VegetaCharacterModelSwap vegetaCharacterModelSwap = ((CharacterModComponent)this).GetCharacterModelSwap() as VegetaCharacterModelSwap;
		if ((Object)(object)vegetaCharacterModelSwap != (Object)null)
		{
			vegetaCharacterModelSwap.EnableMajinMark(enable: true);
		}
		BonusStatBundle val = default(BonusStatBundle);
		((BonusStatBundle)(ref val))..ctor("MajinBonus", (GameObject)null, 0f);
		BonusStat val2 = new BonusStat("damage", 0f, KingUtil.PercentToMult(50f));
		((BonusStatBundle)(ref val)).AddBonusStat(ref val2);
		val2 = new BonusStat("armor", 0f, KingUtil.PercentToMult(50f));
		((BonusStatBundle)(ref val)).AddBonusStat(ref val2);
		val2 = new BonusStat("moveSpeed", 0f, KingUtil.PercentToMult(20f));
		((BonusStatBundle)(ref val)).AddBonusStat(ref val2);
		val2 = new BonusStat("attackSpeed", 0f, KingUtil.PercentToMult(20f));
		((BonusStatBundle)(ref val)).AddBonusStat(ref val2);
		((Component)this).GetComponent<BonusStatHandler>().AddBonusStatBundle(val);
		((CharacterModComponent)this).GetCharacterModelSwap().ChangeLoopingAura(VegetaAssets.Aura_Majin_FX, (ETransformationType)1, Vector3.zero);
	}

	private void OnMajinFirstActivated()
	{
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Expected O, but got Unknown
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
		TriggerSuffer(0.3f, babidiCommand: false);
		MainPlugin.PlayVoiceSoundEvent(((Component)this).gameObject, VegetaSounds.vgt_babidi_laugh, 100);
		TransformationCutsceneState val = new TransformationCutsceneState();
		val.cutsceneTime = 4f;
		val.forceToGround = false;
		val.lerpingZoomCam = true;
		((CharacterModComponent)this).GetEntityStateMachine().SetState((EntityState)(object)val);
		((Component)this).GetComponent<NetworkHandler>().PlayAnimationNetworked(((CharacterModComponent)this).GetCharacterDirection(), "Majin_Transform_0", 0.1f, 0, false);
		((Component)this).GetComponent<NetworkHandler>().PlayAnimationNetworked(((CharacterModComponent)this).GetCharacterDirection(), "UpperIdle", 0f, 1, false);
		((Component)this).GetComponent<NetworkHandler>().ApplyBuffNetworked(((Component)this).gameObject, Buffs.Immune.buffIndex, 4f);
		MainPlugin.CreateCameraShake(((Component)this).transform.position, 3.8f, 100f, 0.25f, 180f, 0f, false);
		((MonoBehaviour)this).Invoke("OnMajinFirstActivatedTransformed", 2.6f);
	}

	private void OnMajinFirstActivatedTransformed()
	{
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		((Component)this).GetComponent<NetworkHandler>().PlaySoundNetworked(((Component)this).gameObject, BaseSounds.transformation, 100, false);
		GameObject val = MainPlugin.SpawnFX(VegetaAssets.AuraStart_Majin_FX, ((Component)this).transform.position, Quaternion.identity, 3f);
		if (Object.op_Implicit((Object)(object)val))
		{
			val.transform.SetParent(((Component)this).transform.root);
		}
		((MonoBehaviour)this).Invoke("OnMajinFirstActivatedTransformedMessage", 2.5f);
	}

	private void OnMajinFirstActivatedTransformedMessage()
	{
		MainPlugin.GetPopUpTextHandler().AddNewPopUpText("Majin power gained...", false);
		MainPlugin.GetPopUpTextHandler().AddNewPopUpText("But at a price...", false);
	}

	private void CheckStaticMajinMode()
	{
		if (CanTriggerSuffer() && ((CharacterModComponent)this).IsInMainState() && m_buttonHeldTimer > 3f && !s_majinModeActive)
		{
			s_majinModeActive = true;
			OnMajinFirstActivated();
		}
	}

	private void OnGUI()
	{
		if (((NetworkComponent)this).IsAuthority() && MainPlugin.ShowInGameUI)
		{
			UpdateMajinActivationUI();
		}
	}

	private void UpdateMajinActivationUI()
	{
		//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_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: 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_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: 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_00f9: Unknown result type (might be due to invalid IL or missing references)
		if (!m_majinModeActive)
		{
			return;
		}
		m_currentAlphaFadeValue = Mathf.Lerp(m_currentAlphaFadeValue, m_targetAlphaFadeValue, Time.deltaTime * m_currentAlphaChangeSpeedMult);
		if (m_currentAlphaFadeValue > 0.01f)
		{
			Rect val = new Rect(MainPlugin.GetScreenSizeScaled(new Vector2(0f, 0f)), MainPlugin.GetScreenSizeScaled(new Vector2(1f, 1f)));
			Rect val2 = default(Rect);
			((Rect)(ref val2))..ctor(MainPlugin.GetScreenSizeScaled(new Vector2(0f, 0f)), MainPlugin.GetScreenSizeScaled(new Vector2(1f, 1f)));
			GUI.DrawTexture(val, (Texture)(object)BaseAssets.Black_Background.texture, (ScaleMode)0, true, 0f, new Color(1f, 1f, 1f, m_currentAlphaFadeValue), 0f, 0f);
			GUI.DrawTexture(val2, (Texture)(object)VegetaAssets.Babidi_Scare.texture, (ScaleMode)2, true, 0f, new Color(1f, 1f, 1f, m_currentAlphaFadeValue), 0f, 0f);
		}
		if (m_currentAlphaFadeValue >= 0.3f)
		{
			m_timeSpentBlinded += Time.deltaTime;
			if (m_timeSpentBlinded > 0.5f)
			{
				SetTargetFadeValue(0f, 2f);
			}
		}
		else
		{
			m_timeSpentBlinded = 0f;
		}
	}

	private void SetTargetFadeValue(float targetValue, float fadeSpeed)
	{
		m_targetAlphaFadeValue = targetValue;
		m_currentAlphaChangeSpeedMult = fadeSpeed;
	}

	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 VegetaCharacterModelSwap : CharacterModelSwapBase
{
	protected Transform m_currentMajinMark;

	private const string MAJIN_MARK_NAME = "MAJIN_MARK";

	protected override GameObject GetCharacterAssetPrefab()
	{
		return VegetaAssets.LocalAssetBundle.LoadAsset<GameObject>(VegetaCharacterRegistration.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(VegetaCharacterRegistration.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, VegetaSounds.vgt_vegeta_select, 100);
	}

	protected override void InitAdditionalParts(Transform currentSkinTransform)
	{
		m_currentMajinMark = MainPlugin.FindTransformRecursive(currentSkinTransform, ((CharacterModelSwapBase)this).GetSkinTransformName() + "_MAJIN_MARK");
		EnableMajinMark(enable: false);
	}

	public void EnableMajinMark(bool enable)
	{
		if ((Object)(object)m_currentMajinMark != (Object)null)
		{
			((Component)m_currentMajinMark).gameObject.SetActive(enable);
		}
	}

	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 VegetaDuoSkillHandler : DuoSkillHandler
{
	protected override uint GetRequestSoundID()
	{
		return VegetaSounds.vgt_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 VegetaNetworkHandler : NetworkComponent
{
	private void UNetVersion()
	{
	}

	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 VegetaTransformationData : CharacterTransformationData
{
	public override string GetTransformationSkillName(string transformationSkillNameID)
	{
		switch (transformationSkillNameID)
		{
		case "TSuperSaiyan":
			return BigBangAttackSkill.SkillName;
		case "TAscendedSuperSaiyan":
			return "Final Flash";
		case "TSuperSaiyan2":
			return FinalExplosionSkill.SkillName;
		case "TSuperSaiyan3":
			return "Final Flash";
		case "TSuperSaiyanGod3":
		case "TSuperSaiyanGod":
			return "Prominence Flash";
		case "TSuperSaiyanBlue":
		case "TSuperSaiyanBlue3":
			return NiagraPummelSkill.SkillName;
		case "TSuperSaiyanBlueEvolved":
		case "TSuperSaiyanBlueEvolved3":
			return FullPowerFinalExplosionSkill.SkillName;
		case "TSuperSaiyan4":
			return "Final Shine Attack";
		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_0069: Unknown result type (might be due to invalid IL or missing references)
		TModifier transformationModifier = ((CharacterTransformationData)this).GetTransformationModifier();
		((TModifier)(ref transformationModifier)).AddElement("m_damagePercentBonus", KingUtil.PercentToMult(10f), 1f);
		((TModifier)(ref transformationModifier)).AddElement("m_armorPercentBonus", KingUtil.PercentToMult(10f), 1f);
		((TModifier)(ref transformationModifier)).AddElement("m_chargeMultMod", 0.1f, 1f);
		((TModifier)(ref transformationModifier)).AddElement("m_totalMasteryLevelsToUnlock", 0f, 1.25f);
		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 VegetaTransformationHandler : TransformationHandler
{
	protected override void OnTransformedFirstTime(MainTransformationState mTState)
	{
		if (mTState != null)
		{
			uint num = 0u;
			switch (((TransformationState)mTState).GetName())
			{
			case "Super Saiyan":
				num = VegetaSounds.vgt_first_ssj;
				break;
			case "Ascended Super Saiyan":
				num = VegetaSounds.vgt_first_assj;
				break;
			case "Super Saiyan God":
				num = VegetaSounds.vgt_first_ssg;
				break;
			case "Super Saiyan Blue":
				num = VegetaSounds.vgt_first_ssb;
				break;
			case "Super Saiyan Blue Evolved":
				num = VegetaSounds.vgt_first_ssbe;
				break;
			case "Super Saiyan 4":
				num = VegetaSounds.vgt_first_ssj4;
				break;
			}
			((CharacterModComponent)this).GetNetworkHandler().PlaySoundNetworked(((Component)this).gameObject, num, 100, true);
		}
	}

	protected override void OnStartTransforming(MainTransformationState mTState)
	{
		((CharacterModComponent)this).GetNetworkHandler().PlaySoundNetworked(((Component)this).gameObject, VegetaSounds.vgt_medium_yell, 100, true);
	}

	protected override float GetMasteryTimeExperienceMult()
	{
		return ((TransformationHandler)this).GetMasteryTimeExperienceMult() * 2f;
	}

	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 DuoFinalKamehamehaSkill_Vegeta : DuoFinalKamehamehaSkill
{
	private bool spawnedChargeFX;

	private GameObject m_chargeFX_0;

	private GameObject m_chargeFX_1;

	public override void OnEnter()
	{
		((DuoFinalKamehamehaSkill)this).OnEnter();
		_ = ((EntityState)this).isAuthority;
	}

	public override void Update()
	{
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		((DuoFinalKamehamehaSkill)this).Update();
		if (!spawnedChargeFX && ((EntityState)this).fixedAge > 2.1f)
		{
			spawnedChargeFX = true;
			SpawnChargeFX();
		}
		if ((Object)(object)m_chargeFX_0 != (Object)null && (Object)(object)m_chargeFX_1 != (Object)null)
		{
			m_chargeFX_0.transform.position = ((CharacterModSkillState)this).GetLeftHandBonePosition();
			m_chargeFX_1.transform.position = ((CharacterModSkillState)this).GetRightHandBonePosition();
		}
		_ = ((EntityState)this).isAuthority;
	}

	public override void OnExit()
	{
		((DuoFinalKamehamehaSkill)this).OnExit();
		DestroyChargeFX();
		_ = ((EntityState)this).isAuthority;
	}

	private void SpawnChargeFX()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_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)
		m_chargeFX_0 = MainPlugin.SpawnFX(VegetaAssets.FinalFlashChargeFX, Vector3.zero, Quaternion.identity, -1f);
		m_chargeFX_1 = MainPlugin.SpawnFX(VegetaAssets.FinalFlashChargeFX, Vector3.zero, Quaternion.identity, -1f);
	}

	private void DestroyChargeFX()
	{
		if ((Object)(object)m_chargeFX_0 != (Object)null)
		{
			EntityState.Destroy((Object)(object)m_chargeFX_0);
		}
		if ((Object)(object)m_chargeFX_1 != (Object)null)
		{
			EntityState.Destroy((Object)(object)m_chargeFX_1);
		}
	}
}
public class DuoGalickGunSkill_Vegeta : DuoGalickGunSkill
{
	public override void OnEnter()
	{
		((DuoGalickGunSkill)this).OnEnter();
		MainPlugin.PlayVoiceSoundEvent(((EntityState)this).gameObject, VegetaSounds.vgt_galickgun_voices, 100);
	}

	public override void Update()
	{
		((DuoGalickGunSkill)this).Update();
	}

	public override void OnExit()
	{
		((DuoGalickGunSkill)this).OnExit();
		MainPlugin.PlayVoiceSoundEvent(((EntityState)this).gameObject, VegetaSounds.vgt_long_yell, 100);
	}
}
public class VegetaMeleeStrikeSkill : MeleeStrikeSkill
{
	public static string GetSkillDescription()
	{
		return MeleeStrikeSkill.GetBaseSkillDescription();
	}

	protected override string ConstructMeleeAttackAnimName(int num)
	{
		if (num < 10)
		{
			return $"VGT_BAS_BONE|VGT_BAS_BONE|VGT_ATC_00{num}|VGT_ATC_00{num}_Layer0";
		}
		return $"VGT_BAS_BONE|VGT_BAS_BONE|VGT_ATC_0{num}|VGT_ATC_0{num}_Layer0";
	}

	protected override uint GetSwingVoiceSoundID(int voiceIdx)
	{
		uint result = 0u;
		switch (voiceIdx)
		{
		case 0:
			result = VegetaSounds.vgt_primary_swing_voices_0;
			break;
		case 1:
			result = VegetaSounds.vgt_primary_swing_voices_1;
			break;
		case 2:
			result = VegetaSounds.vgt_primary_swing_voices_2;
			break;
		}
		return result;
	}

	protected override void InitMeleeAttackData()
	{
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00df: Unknown result type (might be due to invalid IL or missing references)
		//IL_0106: Unknown result type (might be due to invalid IL or missing references)
		//IL_010b: Unknown result type (might be due to invalid IL or missing references)
		base.m_meleeAttacks = (NewMeleeAttackData[])(object)new NewMeleeAttackData[6]
		{
			new NewMeleeAttackData(((MeleeStrikeSkill)this).ConstructMeleeAttackAnimStateName(0), ((MeleeStrikeSkill)this).ConstructMeleeAttackAnimName(6), 0, BaseSounds.primary_swing_0, 0, 0.33f, 0.15f, false),
			new NewMeleeAttackData(((MeleeStrikeSkill)this).ConstructMeleeAttackAnimStateName(1), ((MeleeStrikeSkill)this).ConstructMeleeAttackAnimName(7), 0, BaseSounds.primary_swing_1, 1, 0.32f, 0.05f, true),
			new NewMeleeAttackData(((MeleeStrikeSkill)this).ConstructMeleeAttackAnimStateName(2), ((MeleeStrikeSkill)this).ConstructMeleeAttackAnimName(10), 0, BaseSounds.primary_swing_2, 2, 0.38f, 0.08f, false),
			new NewMeleeAttackData(((MeleeStrikeSkill)this).ConstructMeleeAttackAnimStateName(3), ((MeleeStrikeSkill)this).ConstructMeleeAttackAnimName(5), 0, BaseSounds.primary_swing_1, 1, 0.3f, 0.15f, true),
			new NewMeleeAttackData(((MeleeStrikeSkill)this).ConstructMeleeAttackAnimStateName(4), ((MeleeStrikeSkill)this).ConstructMeleeAttackAnimName(3), 0, BaseSounds.primary_swing_0, 0, 0.39f, 0.15f, false),
			new NewMeleeAttackData(((MeleeStrikeSkill)this).ConstructMeleeAttackAnimStateName(5), ((MeleeStrikeSkill)this).ConstructMeleeAttackAnimName(4), 0, BaseSounds.primary_swing_1, 1, 0.29f, 0.05f, true)
		};
	}

	protected override void LockHipPosition()
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		((CharacterModSkillState)this).m_characterModelSwap.SetLockHipPosition(true, new Vector3(0f, 0.75f, 0f), true);
	}
}
public class ContinuousEnergyBlastSkill : CharacterModSkillState
{
	private string FireAnimationStateName = "ContinuousEnergyBlast_Skill_0";

	public const string SkillName = "Continuous Energy Blast";

	public const float SkillDamageMult = 1.2f;

	public const float SkillMinimumDuration = 1f;

	public const string KiblastProjectileName = "YellowKiBlastProjectile";

	public const float ProjectileSpeed = 110f;

	public const float ProjectileSpread = 2.5f;

	public const float ProjectileCollisionRadius = 0.8f;

	private Transform m_handRightBone;

	private Transform m_handLeftBone;

	public static float BaseKiCost = 10f;

	public static float KiCostPerSecond = 18f;

	private float m_baseAttackTime = 0.22f;

	private float m_attackTimer;

	public static string GetSkillDescription()
	{
		return string.Format(MainPlugin.CreateKiCostDescription(BaseKiCost.ToString("n0")) + "\nConcentrate and rapidly fire Ki Blasts, Dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamage()) + " with each one!\n" + MainPlugin.ColorText("Holding this skill drains ", "#03f4fc") + MainPlugin.ColorText(KiCostPerSecond + " Ki ", "#03bcff") + MainPlugin.ColorText("per second.", "#03f4fc"));
	}

	public static string GetDisplayBaseDamage()
	{
		return 120.00001f.ToString();
	}

	private bool HasValidHandBones()
	{
		if ((Object)(object)m_handRightBone != (Object)null)
		{
			return (Object)(object)m_handLeftBone != (Object)null;
		}
		return false;
	}

	private Vector3 GetCentreHandsPosition()
	{
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		if (HasValidHandBones())
		{
			return (((Component)m_handRightBone).transform.position + ((Component)m_handLeftBone).transform.position) / 2f;
		}
		return Vector3.zero;
	}

	private void FireKiblast()
	{
		//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_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_0105: Unknown result type (might be due to invalid IL or missing references)
		//IL_0112: Unknown result type (might be due to invalid IL or missing references)
		//IL_0113: Unknown result type (might be due to invalid IL or missing references)
		//IL_012a: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0149: Unknown result type (might be due to invalid IL or missing references)
		//IL_0173: Unknown result type (might be due to invalid IL or missing references)
		//IL_0175: Unknown result type (might be due to invalid IL or missing references)
		//IL_017d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0182: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		Vector3 centreHandsPosition = GetCentreHandsPosition();
		Quaternion val = Util.QuaternionSafeLookRotation(((CharacterModSkillState)this).GetAimRayDirection());
		val *= Quaternion.Euler(Random.Range(-2.5f, 2.5f), Random.Range(-2.5f, 2.5f), Random.Range(-2.5f, 2.5f));
		GameObject projectilePrefab = ProjectileCatalog.GetProjectilePrefab(ProjectileCatalog.FindProjectileIndex("YellowKiBlastProjectile"));
		if ((Object)(object)projectilePrefab != (Object)null)
		{
			ProjectileManager.instance.FireProjectile(projectilePrefab, centreHandsPosition, val, ((EntityState)this).gameObject, ((BaseState)this).damageStat * 1.2f, 1f, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, 110f, (DamageTypeCombo?)null);
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((Component)((EntityState)this).characterBody).gameObject, BaseSounds.kiblast_fire, 100, false);
		}
		Vector3 aimRayDirection = ((CharacterModSkillState)this).GetAimRayDirection();
		aimRayDirection.y = 0f;
		Quaternion val2 = Quaternion.LookRotation(aimRayDirection, Vector3.up) * Quaternion.Euler(0f, 0f, 0f);
		((CharacterModSkillState)this).GetNetworkHandler().SpawnFXNetworked(VegetaAssets.YellowKiBlastFireFX, centreHandsPosition, val2, 1f, -1f, false);
		MainPlugin.SpawnFX(VegetaAssets.YellowKiBlastFireFX, centreHandsPosition, val2, 1f).transform.SetParent(((EntityState)this).transform);
		Wave val3 = default(Wave);
		val3.amplitude = 0.12f;
		val3.frequency = 50f;
		val3.cycleOffset = 0f;
		Wave val4 = val3;
		ShakeEmitter.CreateSimpleShakeEmitter(((EntityState)this).transform.position, val4, 0.1f, 100f, true);
	}

	public override void OnEnter()
	{
		((CharacterModSkillState)this).OnEnter();
		if (((EntityState)this).isAuthority)
		{
			m_handRightBone = ((EntityState)this).characterDirection.modelAnimator.GetBoneTransform((HumanBodyBones)18);
			m_handLeftBone = ((EntityState)this).characterDirection.modelAnimator.GetBoneTransform((HumanBodyBones)17);
			base.m_allowHover = true;
			base.m_skillAttackSpeedCap = 8f;
			((CharacterModSkillState)this).PlaySkillAnimation(FireAnimationStateName, 0f, 1, true, true);
			((BaseState)this).StartAimMode(1f, true);
			m_attackTimer = 0.4f;
		}
	}

	public override void Update()
	{
		((EntityState)this).Update();
		if (((EntityState)this).isAuthority)
		{
			((CharacterModSkillState)this).ProcessMainStateMovement(true);
			if (m_attackTimer <= 0f)
			{
				m_attackTimer = m_baseAttackTime / ((EntityState)this).characterBody.attackSpeed;
				FireKiblast();
				((BaseState)this).StartAimMode(m_attackTimer, true);
			}
			else
			{
				m_attackTimer -= Time.deltaTime;
			}
			((CharacterModSkillState)this).GetKiHandler().AddCurrentKi((0f - KiCostPerSecond) * Time.deltaTime);
			if (((CharacterModSkillState)this).GetKiHandler().GetCurrentKi() <= 0f)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}
	}

	public override void FixedUpdate()
	{
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).isAuthority)
		{
			base.m_characterModelSwap.SetChestTargetLookAt(((EntityState)this).transform.position + ((CharacterModSkillState)this).GetAimRayDirection() * 10f);
			if (((EntityState)this).fixedAge > 1f && !((EntityState)this).inputBank.skill2.down)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}
	}

	public override void OnExit()
	{
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).OnExit();
		if (((EntityState)this).isAuthority)
		{
			((CharacterModSkillState)this).PlaySkillAnimation("UpperIdle", 0f, 1, true, true);
			((CharacterModSkillState)this).ResetMainStateMovement();
			base.m_characterModelSwap.SetChestTargetLookAt(Vector3.zero);
		}
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		return (InterruptPriority)7;
	}
}
public class SledgehammerSkill : CharacterModSkillState
{
	public const string SkillName = "Rising Sledgehammer";

	private float m_currentAnimationTime;

	private const string m_animationStateNameP1 = "Sledgehammer_Skill_0";

	private const string m_animationNameP1 = "VGT_BAS_BONE|VGT_BAS_BONE|VGT_ATC_011|VGT_ATC_011_Layer0";

	private const string m_animationStateNameP2 = "Sledgehammer_Skill_1";

	private const string m_animationNameP2 = "SledgehammerAnim";

	private TargetTracker m_targetTracker;

	private const float m_SkillDamageMult_P1 = 4f;

	private const float m_SkillDamageMult_P2 = 11f;

	private const float m_hitRadius = 3.5f;

	private const float groundedForwardOffset = 1f;

	private const float groundedMaxYDiff = 3f;

	private const float groundedCoef = 1f;

	public const float BaseKiCost = 30f;

	private const float m_hitTimePercentP1 = 0.33f;

	private const float m_hitTimePercentP2 = 0.31f;

	private bool m_p1HitDone;

	private bool m_p2Started;

	private bool m_p2HitDone;

	private List<HurtBox> m_possibleHitTargets = new List<HurtBox>();

	private HurtBox m_hitTarget;

	private float m_p1HitTime;

	private float m_p2StartTime;

	private const float m_timeDelayForP2 = 0.4f;

	private Vector3 m_offsetPositionForP2 = Vector3.zero;

	private bool m_hadTarget;

	public static string GetSkillDescription()
	{
		return string.Format(MainPlugin.CreateKiCostDescription(30f.ToString()) + "\nStrike and launch enemies upwards, dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamageP1()) + "!\nHolding the button follows-up with an additional downward strike, knocking-down enemies and dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamageP2()) + "!\n");
	}

	public override void OnEnter()
	{
		//IL_00de: Unknown result type (might be due to invalid IL or missing references)
		((CharacterModSkillState)this).OnEnter();
		base.m_animationSpeedMulti = 0.75f;
		base.m_skillAttackSpeedCap = 3f;
		if (((EntityState)this).isAuthority)
		{
			m_targetTracker = ((EntityState)this).GetComponent<TargetTracker>();
			base.m_skillAttackSpeedCap = 3f;
			((CharacterModSkillState)this).AddGravityDisableCounter();
			m_currentAnimationTime = ((CharacterModSkillState)this).GetAnimationTime("VGT_BAS_BONE|VGT_BAS_BONE|VGT_ATC_011|VGT_ATC_011_Layer0");
			((CharacterModSkillState)this).PlaySkillAnimation("Sledgehammer_Skill_0", 0.1f, 0, true, true);
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, BaseSounds.primary_swing_0, 100, false);
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, VegetaSounds.vgt_primary_swing_voices_1, 80, true);
			((CharacterModSkillState)this).TryMoveTowardsTarget(m_targetTracker, 28f, 14f, 10f, true, 0.33f);
			((BaseState)this).StartAimMode(m_currentAnimationTime, true);
		}
		base.m_characterModelSwap.SetLockHipPosition(true, new Vector3(0f, 0.75f, 0f), true);
	}

	public override void FixedUpdate()
	{
		((EntityState)this).FixedUpdate();
	}

	public override void Update()
	{
		//IL_0228: Unknown result type (might be due to invalid IL or missing references)
		//IL_022e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0233: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0130: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0142: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_0148: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0164: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).Update();
		if (!((EntityState)this).isAuthority)
		{
			return;
		}
		if (!m_p1HitDone)
		{
			if (((EntityState)this).fixedAge > m_currentAnimationTime * 0.33f)
			{
				m_p1HitDone = true;
				((CharacterModSkillState)this).EnableCollisions(false);
				ApplyDamageP1(4f);
				SpawnSwingFX(270);
				m_p1HitTime = ((EntityState)this).fixedAge;
			}
		}
		else if (((EntityState)this).fixedAge > m_p1HitTime + 0.4f * (1f / ((EntityState)this).characterBody.attackSpeed))
		{
			if (!m_p2Started)
			{
				if (((EntityState)this).inputBank.skill2.down)
				{
					m_p2Started = true;
					m_p2StartTime = ((EntityState)this).fixedAge;
					foreach (HurtBox possibleHitTarget in m_possibleHitTargets)
					{
						if (possibleHitTarget.healthComponent.alive)
						{
							m_hitTarget = possibleHitTarget;
							break;
						}
					}
					if ((Object)(object)m_hitTarget != (Object)null)
					{
						float num = Mathf.Pow(m_hitTarget.volume, 0.25f);
						Vector3 zero = Vector3.zero;
						m_offsetPositionForP2 = new Vector3(0f, num, 0f) + zero;
						((CharacterModSkillState)this).DoTeleport(Vector3.zero, ((Component)m_hitTarget).transform.position + m_offsetPositionForP2, 0f);
						((MonoBehaviour)base.m_characterModelSwap).Invoke("RemoveHideBodyCounter", 0.1f);
						m_currentAnimationTime = ((CharacterModSkillState)this).GetAnimationTime("SledgehammerAnim");
						((CharacterModSkillState)this).PlaySkillAnimation("Sledgehammer_Skill_1", 0.1f, 0, true, true);
						((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, BaseSounds.primary_swing_2, 100, false);
						((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, VegetaSounds.vgt_primary_swing_voices_2, 100, true);
						((BaseState)this).StartAimMode(m_currentAnimationTime, true);
						m_hadTarget = true;
					}
				}
			}
			else if ((Object)(object)m_hitTarget != (Object)null)
			{
				if (!m_p2HitDone)
				{
					((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(((Component)m_hitTarget).transform.position + m_offsetPositionForP2, true);
				}
				if (((EntityState)this).fixedAge - m_p2StartTime > m_currentAnimationTime * 0.31f && !m_p2HitDone)
				{
					m_p2HitDone = true;
					ApplyDamageP2(m_hitTarget, 11f);
					SpawnSwingFX(90);
				}
			}
		}
		if (!m_p1HitDone)
		{
			return;
		}
		bool flag = false;
		if ((Object)(object)m_hitTarget == (Object)null)
		{
			if (((EntityState)this).fixedAge > m_currentAnimationTime * 0.9f)
			{
				flag = true;
			}
		}
		else if (m_p2Started && m_p2HitDone && ((EntityState)this).fixedAge - m_p2StartTime > m_currentAnimationTime * 0.95f)
		{
			flag = true;
		}
		if (flag)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	public static string GetDisplayBaseDamageP1()
	{
		return 400f.ToString();
	}

	public static string GetDisplayBaseDamageP2()
	{
		return 1100f.ToString();
	}

	private void ApplyDamageP1(float dmgMult)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		Collider[] array = CollectEnemies(3.5f, ((EntityState)this).transform.position + ((EntityState)this).characterDirection.forward * 1f, 3f);
		if (ColliderDamage(array, dmgMult, 1f, 1f))
		{
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, BaseSounds.hits_medium, 100, false);
			((EntityState)this).characterMotor.velocity = Vector3.zero;
		}
	}

	private void ApplyDamageP2(HurtBox hurtBoxToDamage, float dmgMult)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		Collider[] array = CollectEnemies(3.5f, ((EntityState)this).transform.position + ((EntityState)this).characterDirection.forward * 1f, 3f);
		Collider[] array2 = (Collider[])(object)new Collider[array.Length + 1];
		array.CopyTo(array2, 0);
		array2[^1] = ((Component)hurtBoxToDamage).GetComponent<Collider>();
		if (ColliderDamage(array2, dmgMult, 1f, -2.5f))
		{
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, BaseSounds.hits_large, 100, false);
			MainPlugin.CreateCameraShake(((EntityState)this).transform.position, 0.5f, 100f, 1f, 180f, 0f, true);
			((EntityState)this).characterMotor.velocity = Vector3.zero;
		}
	}

	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, float yAxisMult)
	{
		//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_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_012a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b0: 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_0197: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f3: 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)32);
				float num = 2800f;
				num *= yAxisMult;
				float mass = ((Component)hurtBox2.healthComponent).GetComponent<Rigidbody>().mass;
				num *= mass / 100f;
				if (hurtBox2.healthComponent.body.isChampion)
				{
					num = 0f;
				}
				val.force = new Vector3(0f, 1f, 0f) * num;
				((CharacterModSkillState)this).GetNetworkHandler().ApplyDamageNetworked(val, ((Component)hurtBox2.healthComponent).gameObject);
				m_possibleHitTargets.Add(hurtBox2);
				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;
	}

	private void SpawnSwingFX(int rotVal)
	{
		//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_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		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)rotVal);
		((CharacterModSkillState)this).GetNetworkHandler().SpawnFXNetworked(BaseAssets.PrimaryAttackFX, position, val, 2f, -1f, false);
		MainPlugin.SpawnFX(BaseAssets.PrimaryAttackFX, position, val, 2f).transform.SetParent(((EntityState)this).transform);
	}

	public override void OnExit()
	{
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		if (((EntityState)this).isAuthority)
		{
			((CharacterModSkillState)this).PlaySkillAnimation("Idle", 0.1f, 0, true, true);
			((CharacterModSkillState)this).RemoveGravityDisableCounter();
		}
		((CharacterModSkillState)this).EnableCollisions(true);
		base.m_characterModelSwap.SetLockHipPosition(false, default(Vector3), true);
		((EntityState)this).OnExit();
	}

	private void TryGiveKi()
	{
		bool flag = false;
		if ((Object)(object)m_hitTarget != (Object)null)
		{
			if (!m_hitTarget.healthComponent.alive)
			{
				flag = true;
			}
		}
		else if (m_hadTarget)
		{
			flag = true;
		}
		if (flag)
		{
			((CharacterModSkillState)this).GetKiHandler().AddCurrentKi(30f);
		}
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		return (InterruptPriority)0;
	}
}
public class GalaxyBreakerSkill : BaseBeamChargeSkillState
{
	public const string SkillName = "Galaxy Breaker";

	public const float skillBaseDamageMult = 36f;

	public const float skillDamagePerChargeMult = 16f;

	public const float BaseKiCost = 100f;

	private GameObject m_chargeFX;

	private GameObject m_chargeFX2;

	private ShakeEmitter m_currentShake;

	protected override void InitSkillValues()
	{
		//IL_0156: Unknown result type (might be due to invalid IL or missing references)
		//IL_015b: Unknown result type (might be due to invalid IL or missing references)
		//IL_018b: Unknown result type (might be due to invalid IL or missing references)
		base.m_beamChargeValues.chargeAnimationStateName = "GalaxyBreaker_Skill_0";
		base.m_beamChargeValues.beamMinChargeTime = 2f;
		base.m_beamChargeValues.addBSB = true;
		base.m_beamChargeValues.bsb_baseArmorAdd = 400f;
		base.m_beamChargeValues.beamChargeSoundEventID = VegetaSounds.vgt_galaxybreaker_charge;
		base.m_beamChargeValues.beamChargeVoiceSoundEventID = VegetaSounds.vgt_galaxybreaker_charge_voices;
		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 = 1.8f;
		base.m_beamFireValuesToSend.beamBaseRange = 100f;
		base.m_beamFireValuesToSend.beamBaseRadius = 3.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 = VegetaAssets.GalaxyBreakerFX;
		base.m_beamFireValuesToSend.beamFireSoundID = VegetaSounds.vgt_galaxybreaker_fire;
		base.m_beamFireValuesToSend.beamFireVoiceSoundID = VegetaSounds.vgt_long_yell;
		base.m_beamFireValuesToSend.fireAnimationStateName = "GalaxyBreaker_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()
	{
		return !((EntityState)this).inputBank.skill4.down;
	}

	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!\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 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_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		((BaseBeamChargeSkillState)this).OnEnter();
		m_chargeFX = MainPlugin.SpawnFX(BaseAssets.KiChargeFX, ((EntityState)this).transform.position, Quaternion.identity, -1f);
		m_chargeFX2 = MainPlugin.SpawnFX(VegetaAssets.GalaxyBreakerChargeFX, ((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);
		}
		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_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: 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;
			KichargeSkill.ModifyKiChargeColor(((CharacterModSkillState)this).GetTransformationHandler(), m_chargeFX);
		}
		if ((Object)(object)m_chargeFX2 != (Object)null)
		{
			m_chargeFX2.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);
		}
	}

	public override void FixedUpdate()
	{
		((BaseBeamChargeSkillState)this).FixedUpdate();
	}

	public override void OnExit()
	{
		((BaseBeamChargeSkillState)this).OnExit();
		if ((Object)(object)m_chargeFX != (Object)null)
		{
			EntityState.Destroy((Object)(object)m_chargeFX);
		}
		if ((Object)(object)m_chargeFX2 != (Object)null)
		{
			EntityState.Destroy((Object)(object)m_chargeFX2);
		}
		if ((Object)(object)m_currentShake != (Object)null)
		{
			Object.Destroy((Object)(object)m_currentShake);
		}
		_ = ((EntityState)this).isAuthority;
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		return (InterruptPriority)7;
	}
}
public class GalickGunSkill : BaseBeamChargeSkillState
{
	public const string SkillName = "Galick Gun";

	public const float skillBaseDamageMult = 15f;

	public const float skillDamageChargeAddMult = 8f;

	public const float BaseKiCost = 40f;

	protected override void InitSkillValues()
	{
		//IL_0171: Unknown result type (might be due to invalid IL or missing references)
		//IL_0176: Unknown result type (might be due to invalid IL or missing references)
		base.m_beamChargeValues.chargeAnimationStateName = "GalickGun_Skill_0";
		base.m_beamChargeValues.beamMinChargeTime = 1.5f;
		base.m_beamChargeValues.addBSB = true;
		base.m_beamChargeValues.bsb_baseArmorAdd = 35f;
		base.m_beamChargeValues.bsb_multMovementSpeed = 0.5f;
		base.m_beamChargeValues.beamChargeSoundEventID = BaseSounds.galickgun_charge;
		base.m_beamChargeValues.beamChargeVoiceSoundEventID = VegetaSounds.vgt_galickgun_voices;
		base.m_beamChargeValues.chargeFX = VegetaAssets.GalickGunChargeFX;
		base.m_beamChargeValues.baseKiDrainPerSecond = 15f;
		base.m_beamChargeValues.addKiDrainPerSecond = 30f;
		base.m_beamFireValuesToSend.beamDuration = 2f;
		base.m_beamFireValuesToSend.beamBaseRange = 75f;
		base.m_beamFireValuesToSend.beamRangePerCharge = 20f;
		base.m_beamFireValuesToSend.beamBaseRadius = 1.4f;
		base.m_beamFireValuesToSend.beamRadiusChargeAdd = 0.33f;
		base.m_beamFireValuesToSend.beamBaseDamageMult = 15f;
		base.m_beamFireValuesToSend.beamDamageChargeAddMult = 8f;
		base.m_beamFireValuesToSend.beamCoeff = 1f;
		base.m_beamFireValuesToSend.beamFX = VegetaAssets.GalickGunFX;
		base.m_beamFireValuesToSend.beamFireSoundID = VegetaSounds.vgt_galickgun_fire;
		base.m_beamFireValuesToSend.beamFireVoiceSoundID = VegetaSounds.vgt_long_yell;
		base.m_beamFireValuesToSend.fireAnimationStateName = "GalickGun_Skill_1";
		base.m_beamFireValuesToSend.fireChestRotationOffset = new Vector3(0f, 90f, 0f);
	}

	protected override bool ChildCanFireBeam()
	{
		return !((EntityState)this).inputBank.skill4.down;
	}

	public static string GetSkillDescription()
	{
		return string.Format(MainPlugin.CreateKiCostDescription(40f.ToString("n0")) + "\nCharge and unleash a Galick Gun, Dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamage()) + " per second whilst the blast is active! \nConsume additional Ki and increase damage by " + MainPlugin.CreateDamageDescription(GetDisplayDamagePerCharge()) + " per second of charging!\n" + MainPlugin.ColorText("Ki consumption gradually increases the longer you charge!", "#03f4fc"));
	}

	public static string GetDisplayBaseDamage()
	{
		return 1500f.ToString();
	}

	public static string GetDisplayDamagePerCharge()
	{
		return 800f.ToString();
	}

	public override void OnEnter()
	{
		((BaseBeamChargeSkillState)this).OnEnter();
		if (((EntityState)this).isAuthority)
		{
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, BaseSounds.prepare_move_0, 100, false);
		}
	}

	public override void Update()
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		((BaseBeamChargeSkillState)this).Update();
		if (((EntityState)this).isAuthority)
		{
			Vector3 aimRayDirection = ((CharacterModSkillState)this).GetAimRayDirection();
			aimRayDirection = MainPlugin.RotateAroundPoint(Vector3.zero, aimRayDirection, Quaternion.Euler(0f, 90f, 0f));
			((CharacterModSkillState)this).m_characterModelSwap.SetChestTargetLookAt(((EntityState)this).transform.position + aimRayDirection * 10f);
		}
	}

	public override void FixedUpdate()
	{
		((BaseBeamChargeSkillState)this).FixedUpdate();
	}

	public override void OnExit()
	{
		((BaseBeamChargeSkillState)this).OnExit();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		return (InterruptPriority)7;
	}
}
public class BigBangAttackSkill : CharacterModSkillState
{
	public static string SkillName = "Big Bang Attack";

	public const string ProjectileName = "BigBangAttackProjectile";

	public const float ProjectileCollisionRadius = 1.25f;

	public const float ProjectileExplosionCollisionRadius = 10f;

	public const float kiblastBaseDamageMult = 16f;

	public float kiblastProjectileSpeed = 100f;

	public float kiblastCoeff = 1f;

	public float SkillDuration = 1.8f;

	private Transform m_handRightBone;

	private Transform m_handLeftBone;

	public const int BaseKiCost = 60;

	private bool m_hasFired;

	private bool m_hasSpawnedChargeFX;

	private GameObject m_chargeFX;

	private bool HasValidHandBones()
	{
		if ((Object)(object)m_handRightBone != (Object)null)
		{
			return (Object)(object)m_handLeftBone != (Object)null;
		}
		return false;
	}

	public static string GetSkillDescription()
	{
		return string.Format(MainPlugin.CreateKiCostDescription(60.ToString()) + "\nUnleash an explosive ball of energy! \nExplodes on hit, Dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamage()) + "!\n");
	}

	public static string GetDisplayBaseDamage()
	{
		return 1600f.ToString();
	}

	public override void OnEnter()
	{
		//IL_004b: 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("BigBangAttack_Skill_0", 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();
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, VegetaSounds.vgt_bigbangattack_start, 100, false);
		}
		m_handRightBone = ((EntityState)this).characterDirection.modelAnimator.GetBoneTransform((HumanBodyBones)18);
		m_handLeftBone = ((EntityState)this).characterDirection.modelAnimator.GetBoneTransform((HumanBodyBones)17);
	}

	public override void FixedUpdate()
	{
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00de: Unknown result type (might be due to invalid IL or missing references)
		//IL_00df: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Unknown result type (might be due to invalid IL or missing references)
		//IL_0110: Unknown result type (might be due to invalid IL or missing references)
		//IL_0115: Unknown result type (might be due to invalid IL or missing references)
		//IL_011b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0120: Unknown result type (might be due to invalid IL or missing references)
		//IL_0131: Unknown result type (might be due to invalid IL or missing references)
		//IL_0136: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if ((Object)(object)m_chargeFX != (Object)null && (Object)(object)m_handRightBone != (Object)null)
		{
			m_chargeFX.transform.position = m_handRightBone.position;
		}
		if (!m_hasSpawnedChargeFX && ((EntityState)this).fixedAge > 0.75f)
		{
			m_hasSpawnedChargeFX = true;
			Vector3 position = m_handRightBone.position;
			m_chargeFX = MainPlugin.SpawnFX(VegetaAssets.BigBangAttackChargeFX, position, Quaternion.identity, 5f);
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, VegetaSounds.vgt_bigbangattack_charge, 100, false);
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, VegetaSounds.vgt_bigbangattack_voices, 70, true);
		}
		if (!((EntityState)this).isAuthority)
		{
			return;
		}
		((EntityState)this).characterMotor.velocity = Vector3.zero;
		if (!m_hasFired)
		{
			Vector3 aimRayDirection = ((CharacterModSkillState)this).GetAimRayDirection();
			aimRayDirection = MainPlugin.RotateAroundPoint(Vector3.zero, aimRayDirection, Quaternion.Euler(new Vector3(0f, 45f, 0f)));
			base.m_characterModelSwap.SetChestTargetLookAt(((EntityState)this).transform.position + aimRayDirection * 10f);
			((EntityState)this).characterDirection.moveVector = ((CharacterModSkillState)this).GetAimRayDirection();
			if (((EntityState)this).fixedAge > SkillDuration * 0.7f)
			{
				FireBigBangAttackProjectile();
				m_hasFired = true;
			}
		}
		if (((EntityState)this).fixedAge >= SkillDuration)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	private void FireBigBangAttackProjectile()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_0097: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0100: Unknown result type (might be due to invalid IL or missing references)
		//IL_0102: Unknown result type (might be due to invalid IL or missing references)
		//IL_0124: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		Vector3 position = m_handRightBone.position;
		Quaternion val = Util.QuaternionSafeLookRotation(((CharacterModSkillState)this).GetAimRayDirection());
		GameObject projectilePrefab = ProjectileCatalog.GetProjectilePrefab(ProjectileCatalog.FindProjectileIndex("BigBangAttackProjectile"));
		if ((Object)(object)projectilePrefab != (Object)null)
		{
			ProjectileManager.instance.FireProjectile(projectilePrefab, position, val, ((EntityState)this).gameObject, ((BaseState)this).damageStat * 16f, 1f, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, kiblastProjectileSpeed, (DamageTypeCombo?)null);
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, VegetaSounds.vgt_bigbangattack_fire, 100, false);
		}
		Vector3 aimRayDirection = ((CharacterModSkillState)this).GetAimRayDirection();
		aimRayDirection.y = 0f;
		Vector3 position2 = m_handRightBone.position;
		Quaternion val2 = Quaternion.LookRotation(aimRayDirection, Vector3.up) * Quaternion.Euler(0f, 0f, 0f);
		((CharacterModSkillState)this).GetNetworkHandler().SpawnFXNetworked(VegetaAssets.YellowKiBlastFireFX, position2, val2, 1f, -1f, false);
		MainPlugin.SpawnFX(VegetaAssets.YellowKiBlastFireFX, position2, val2, 1f).transform.SetParent(((EntityState)this).transform);
		MainPlugin.CreateCameraShake(((EntityState)this).transform.position, 0.25f, 50f, 1f, 180f, 0f, true);
	}

	public override void OnExit()
	{
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		if (((EntityState)this).isAuthority)
		{
			((CharacterModSkillState)this).PlaySkillAnimation("Idle", 0.1f, 0, true, true);
			base.m_characterModelSwap.SetChestTargetLookAt(Vector3.zero);
			((CharacterModSkillState)this).RemoveGravityDisableCounter();
			base.m_characterModelSwap.SetLockHipPosition(false, default(Vector3), true);
		}
		((EntityState)this).OnExit();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		return (InterruptPriority)7;
	}
}
public class FinalExplosionSkill : CharacterModSkillState
{
	public static string SkillName = "Final Explosion";

	public const float SkillBaseDamageMult = 25f;

	public float SkillCoeff = 1f;

	public const float SkillStartTime = 0.55f;

	public const float SkillExplosionStartTime = 10f;

	public const float SkillExplosionStartTimeFast = 3f;

	public const int BaseKiCost = 200;

	public const float DrainValuePercentPerSecond = 0.4f;

	private GameObject m_currentChargeFX;

	private GameObject m_currentExplosionFX;

	private const float ScaleGrowthPerSecond = 8.3f;

	private float m_currentScale = 1f;

	private const float HitTimerMax = 0.1f;

	private float m_hitTimer;

	private bool m_explosionStarted;

	private bool m_skillStarted;

	private bool m_screamStarted;

	private bool m_healthDraining;

	private float m_calculatedDamage;

	private const float CameraPositionGrowthScale = 1.15f;

	protected bool m_isLethal = true;

	protected bool m_fasterMode;

	protected virtual float GetCalculatedDrainCost()
	{
		return 0.4f * ((CharacterModSkillState)this).GetKiHandler().GetMaxKi();
	}

	protected virtual float GetScaleGrowthPerSecond()
	{
		return 8.3f;
	}

	protected virtual GameObject GetFinalExplosionChargeFX()
	{
		return VegetaAssets.FinalExplosionChargeFX;
	}

	protected virtual GameObject GetFinalExplosionExplosionFX()
	{
		return VegetaAssets.FinalExplosionExplodeFX;
	}

	protected virtual float GetSkillBaseDamageMult()
	{
		return 25f;
	}

	protected virtual float GetCameraPositionGrowthScale()
	{
		return 1.15f;
	}

	private float GetTotalSkillDuration()
	{
		return GetExplosionStartTime() + 7f;
	}

	private float GetExplosionDuration()
	{
		return GetTotalSkillDuration() - GetExplosionStartTime();
	}

	private float GetExplosionStartTime()
	{
		if (!m_fasterMode)
		{
			return 10f;
		}
		return 3f;
	}

	public static string GetSkillDescription()
	{
		return string.Format(MainPlugin.CreateKiCostDescription(200.ToString()) + "\nRelease a massively expanding explosion, Dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamage()) + " and\ndraining " + MainPlugin.ColorText(40f.ToString("n0") + "% of Max Ki", "#03bcff") + " per second!\n" + MainPlugin.ColorText("Once Ki reaches 0, Health is drained instead, Can be fatal...", "#FF0000"));
	}

	public static string GetDisplayBaseDamage()
	{
		return 2500f.ToString();
	}

	public override void OnEnter()
	{
		//IL_001c: 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_00e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		((CharacterModSkillState)this).OnEnter();
		base.m_characterModelSwap.SetLockHipPosition(true, new Vector3(0f, 1.1f, 0f), true);
		if (((EntityState)this).isAuthority)
		{
			base.m_canBeStunned = false;
			((CharacterModSkillState)this).PlaySkillAnimation("FinalExplosion_Skill_0", 0.1f, 0, true, true);
			((CharacterModSkillState)this).AddGravityDisableCounter();
			((CharacterModSkillState)this).GetNetworkHandler().ApplyBuffNetworked(((Component)((EntityState)this).characterBody).gameObject, Buffs.ArmorBoost.buffIndex, GetExplosionStartTime());
			m_calculatedDamage = ((BaseState)this).damageStat * GetSkillBaseDamageMult();
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, BaseSounds.prepare_move_1, 100, false);
			if (!m_fasterMode)
			{
				((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, VegetaSounds.vgt_finalexplosion_speech, 100, true);
			}
		}
		m_currentChargeFX = MainPlugin.SpawnFX(GetFinalExplosionChargeFX(), ((EntityState)this).transform.position + new Vector3(0f, 0.33f, 0f), Quaternion.identity, GetTotalSkillDuration() + 1f);
	}

	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)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).isAuthority)
		{
			((EntityState)this).characterMotor.velocity = Vector3.zero;
			((EntityState)this).characterMotor.rootMotion = Vector3.zero;
			if (((EntityState)this).fixedAge >= GetTotalSkillDuration())
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}
	}

	public override void Update()
	{
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0223: Unknown result type (might be due to invalid IL or missing references)
		//IL_0237: Unknown result type (might be due to invalid IL or missing references)
		//IL_023c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0241: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).Update();
		if (((EntityState)this).isAuthority)
		{
			if (m_hitTimer <= 0f)
			{
				Collider[] array = CollectEnemies(m_currentScale, ((EntityState)this).transform.position);
				if (array.Length != 0)
				{
					ColliderDamage(array, m_calculatedDamage * 0.1f, SkillCoeff);
				}
				if (((EntityState)this).fixedAge > GetExplosionStartTime())
				{
					if (m_healthDraining)
					{
						((CharacterModSkillState)this).GetKiHandler().SetCurrentKi(0f);
						DamageSelf();
					}
					else
					{
						((CharacterModSkillState)this).GetKiHandler().AddCurrentKi(0f - GetCalculatedDrainCost() * 0.1f);
						if (((CharacterModSkillState)this).GetKiHandler().GetCurrentKi() <= 0f)
						{
							m_healthDraining = true;
						}
					}
				}
				m_hitTimer = 0.1f;
			}
			else
			{
				m_hitTimer -= Time.deltaTime;
			}
			if (((EntityState)this).fixedAge > 0.55f && !m_skillStarted)
			{
				m_skillStarted = true;
				MainPlugin.CreateCameraShake(((EntityState)this).transform.position, GetExplosionStartTime(), 100f, 0.15f, 180f, 0f, false);
				((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, VegetaSounds.vgt_finalexplosion_charge, 100, false);
			}
			if (!m_screamStarted && ((EntityState)this).fixedAge > GetExplosionStartTime() - 1.3f)
			{
				m_screamStarted = true;
				((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, VegetaSounds.vgt_finalexplosion_scream, 100, true);
				((CharacterModSkillState)this).PlaySkillAnimation("FinalExplosion_Skill_1", 0.1f, 0, true, true);
			}
		}
		if (!(((EntityState)this).fixedAge > GetExplosionStartTime()))
		{
			return;
		}
		if (((EntityState)this).isAuthority)
		{
			m_currentScale += Time.deltaTime * GetScaleGrowthPerSecond();
		}
		if (!m_explosionStarted)
		{
			m_explosionStarted = true;
			if (((EntityState)this).isAuthority)
			{
				((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, VegetaSounds.vgt_finalexplosion_explode, 100, false);
			}
			MainPlugin.CreateCameraShake(((EntityState)this).transform.position, GetExplosionDuration(), 400f, 1f, 180f, 0f, false);
			m_currentExplosionFX = MainPlugin.SpawnFX(GetFinalExplosionExplosionFX(), ((EntityState)this).transform.position + new Vector3(0f, 0.33f, 0f), Quaternion.identity, GetExplosionDuration() + 1f);
		}
	}

	public override void OnExit()
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		base.m_characterModelSwap.SetLockHipPosition(false, default(Vector3), true);
		if (((EntityState)this).isAuthority)
		{
			((CharacterModSkillState)this).PlaySkillAnimation("Idle", 0.1f, 0, true, true);
			base.m_characterModelSwap.SetChestTargetLookAt(Vector3.zero);
			((CharacterModSkillState)this).RemoveGravityDisableCounter();
		}
		EntityState.Destroy((Object)(object)m_currentChargeFX);
		m_currentChargeFX = null;
		EntityState.Destroy((Object)(object)m_currentExplosionFX);
		m_currentExplosionFX = null;
		((EntityState)this).OnExit();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		return (InterruptPriority)7;
	}

	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 damage, 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_0103: Unknown result type (might be due to invalid IL or missing references)
		//IL_0108: Unknown result type (might be due to invalid IL or missing references)
		//IL_0148: Unknown result type (might be due to invalid IL or missing references)
		//IL_014d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0152: Unknown result type (might be due to invalid IL or missing references)
		//IL_0159: Unknown result type (might be due to invalid IL or missing references)
		//IL_015b: 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 = damage;
				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;
	}

	private void DamageSelf()
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Expected O, but got Unknown
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		DamageInfo val = new DamageInfo();
		val.damageType = DamageTypeCombo.op_Implicit((DamageType)2);
		if (!m_isLethal)
		{
			val.damageType |= DamageTypeCombo.op_Implicit((DamageType)1);
		}
		val.damage = GetCalculatedDrainCost() * 0.1f;
		val.attacker = null;
		val.procCoefficient = 0f;
		val.position = ((EntityState)this).transform.position;
		val.crit = ((BaseState)this).RollCrit();
		((CharacterModSkillState)this).GetNetworkHandler().ApplyDamageNetworked(val, ((Component)((EntityState)this).healthComponent).gameObject);
	}
}
public class FinalFlashSkill : BaseBeamChargeSkillState
{
	public const string SkillName = "Final Flash";

	public const float skillBaseDamageMult = 30f;

	public static float BaseKiCost = 120f;

	private bool m_hasSaidFiringVoice;

	protected bool m_sayStartVoice = true;

	protected override void InitSkillValues()
	{
		//IL_005f: 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)
		base.m_beamChargeValues.chargeAnimationStateName = "FinalFlash_Skill_0";
		base.m_beamChargeValues.chargeAnimationStateLayer = 0;
		base.m_beamChargeValues.beamMinChargeTime = 2.75f;
		base.m_beamChargeValues.addBSB = false;
		base.m_beamChargeValues.beamChargeSoundEventID = VegetaSounds.vgt_finalflash_charge;
		base.m_beamChargeValues.chargeFX = VegetaAssets.FinalFlashChargeFX;
		base.m_beamChargeValues.chargeEffectLocation = (EChargeEffectLocation)3;
		base.m_beamChargeValues.baseKiDrainPerSecond = 0f;
		base.m_beamChargeValues.addKiDrainPerSecond = 0f;
		base.m_beamChargeValues.canMoveDuringCharge = false;
		base.m_beamChargeValues.freezePositionDuringCharge = true;
		base.m_beamChargeValues.increaseChargeMultFromCharging = false;
		base.m_beamFireValuesToSend.beamDuration = 3f;
		base.m_beamFireValuesToSend.beamBaseRange = 200f;
		base.m_beamFireValuesToSend.beamBaseRadius = 2.33f;
		base.m_beamFireValuesToSend.beamBaseDamageMult = 30f;
		base.m_beamFireValuesToSend.fireAnimationStateName = "FinalFlash_Skill_1";
		base.m_beamFireValuesToSend.beamFX = VegetaAssets.FinalFlashFX;
		base.m_beamFireValuesToSend.fireBeamLocation = (EFireBeamLocation)2;
		base.m_beamFireValuesToSend.beamFireSoundID = VegetaSounds.vgt_finalflash_fire;
		base.m_beamFireValuesToSend.scaleBeamVisuals = false;
	}

	protected override bool ChildCanFireBeam()
	{
		return true;
	}

	public static string GetSkillDescription()
	{
		return string.Format(MainPlugin.CreateKiCostDescription(BaseKiCost.ToString("n0")) + "\nCharge up and unleash a devastating Final Flash, Dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamage()) + " per second whilst the blast is active!");
	}

	public static string GetDisplayBaseDamage()
	{
		return 3000f.ToString();
	}

	public static string GetDisplayMaxDamage()
	{
		return 3000f.ToString();
	}

	public override void OnEnter()
	{
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		((BaseBeamChargeSkillState)this).OnEnter();
		if (((EntityState)this).isAuthority)
		{
			((CharacterModSkillState)this).m_canBeStunned = false;
			MainPlugin.CreateCameraShake(((EntityState)this).transform.position, base.m_beamChargeValues.beamMinChargeTime, 200f, 0.25f, 180f, 0f, false);
			((CharacterModSkillState)this).GetNetworkHandler().ApplyBuffNetworked(((Component)((EntityState)this).characterBody).gameObject, Buffs.ArmorBoost.buffIndex, base.m_beamChargeValues.beamMinChargeTime + base.m_beamFireValuesToSend.beamDuration);
			if (m_sayStartVoice)
			{
				((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, VegetaSounds.vgt_final_flash_voices_start, 50, true);
			}
		}
	}

	public override void Update()
	{
		((BaseBeamChargeSkillState)this).Update();
		if (((EntityState)this).isAuthority && !m_hasSaidFiringVoice && ((EntityState)this).fixedAge > 2.15f)
		{
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, VegetaSounds.vgt_final_flash_voices, 100, true);
			m_hasSaidFiringVoice = true;
		}
	}

	public override void FixedUpdate()
	{
		((BaseBeamChargeSkillState)this).FixedUpdate();
	}

	public override void OnExit()
	{
		((BaseBeamChargeSkillState)this).OnExit();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		return (InterruptPriority)7;
	}
}
public class FinalShineAttackSkill : BaseBeamChargeSkillState
{
	public const string SkillName = "Final Shine Attack";

	public const float skillBaseDamageMult = 36f;

	public const float BaseKiCost = 80f;

	protected override void InitSkillValues()
	{
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_0139: Unknown result type (might be due to invalid IL or missing references)
		//IL_013e: Unknown result type (might be due to invalid IL or missing references)
		//IL_014a: Unknown result type (might be due to invalid IL or missing references)
		base.m_beamChargeValues.chargeAnimationStateName = "FinalShineAttack_Skill_0";
		base.m_beamChargeValues.beamMinChargeTime = 1.5f;
		base.m_beamChargeValues.addBSB = true;
		base.m_beamChargeValues.bsb_baseArmorAdd = 45f;
		base.m_beamChargeValues.bsb_multMovementSpeed = 0.5f;
		base.m_beamChargeValues.beamChargeSoundEventID = VegetaSounds.vgt_finalshineattack_charge;
		base.m_beamChargeValues.beamChargeVoiceSoundEventID = VegetaSounds.vgt_finalshineattack_charge_voice;
		base.m_beamChargeValues.chargeFX = VegetaAssets.FinalShineAttackChargeFX;
		base.m_beamChargeValues.chargeEffectLocation = (EChargeEffectLocation)1;
		base.m_beamChargeValues.increaseChargeMultFromCharging = false;
		base.m_beamFireValuesToSend.beamDuration = 2f;
		base.m_beamFireValuesToSend.beamBaseRange = 100f;
		base.m_beamFireValuesToSend.beamBaseRadius = 1.4f;
		base.m_beamFireValuesToSend.beamBaseDamageMult = 36f;
		base.m_beamFireValuesToSend.beamCoeff = 1f;
		base.m_beamFireValuesToSend.beamFX = VegetaAssets.FinalShineAttackFX;
		base.m_beamFireValuesToSend.beamFireSoundID = VegetaSounds.vgt_galickgun_fire;
		base.m_beamFireValuesToSend.beamFireVoiceSoundID = VegetaSounds.vgt_finalshineattack_fire_voice;
		base.m_beamFireValuesToSend.fireAnimationStateName = "FinalShineAttack_Skill_1";
		base.m_beamFireValuesToSend.fireChestRotationOffset = new Vector3(0f, 90f, 0f);
		base.m_beamFireValuesToSend.fireBeamLocation = (EFireBeamLocation)1;
	}

	protected override bool ChildCanFireBeam()
	{
		return true;
	}

	public static string GetSkillDescription()
	{
		return string.Format(MainPlugin.CreateKiCostDescription(80f.ToString("n0")) + "\nUnleash a powerful Final Shine Attack, Dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamage()) + " per second whilst the blast is active!");
	}

	public static string GetDisplayBaseDamage()
	{
		return 3600f.ToString();
	}

	public override void OnEnter()
	{
		((BaseBeamChargeSkillState)this).OnEnter();
		if (((EntityState)this).isAuthority)
		{
			((CharacterModSkillState)this).GetNetworkHandler().PlaySoundNetworked(((EntityState)this).gameObject, BaseSounds.prepare_move_0, 100, false);
		}
	}

	public override void Update()
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		((BaseBeamChargeSkillState)this).Update();
		if (((EntityState)this).isAuthority)
		{
			Vector3 aimRayDirection = ((CharacterModSkillState)this).GetAimRayDirection();
			aimRayDirection = MainPlugin.RotateAroundPoint(Vector3.zero, aimRayDirection, Quaternion.Euler(0f, -45f, 0f));
			((CharacterModSkillState)this).m_characterModelSwap.SetChestTargetLookAt(((EntityState)this).transform.position + aimRayDirection * 10f);
		}
	}

	public override void FixedUpdate()
	{
		((BaseBeamChargeSkillState)this).FixedUpdate();
	}

	public override void OnExit()
	{
		((BaseBeamChargeSkillState)this).OnExit();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		return (InterruptPriority)7;
	}
}
public class FullPowerFinalExplosionSkill : FinalExplosionSkill
{
	public new static string SkillName = "Full Power Final Explosion";

	public new const float SkillBaseDamageMult = 27f;

	public new const int BaseKiCost = 400;

	public new const float DrainValuePercentPerSecond = 0.2f;

	public const float CameraPositionGrowthScale = 2.3f;

	private const float ScaleGrowthPerSecond = 16.8f;

	public new static string GetSkillDescription()
	{
		return string.Format(MainPlugin.CreateKiCostDescription(400.ToString()) + "\nRelease a massively expanding explosion,  Dealing " + MainPlugin.CreateDamageDescription(GetDisplayBaseDamage()) + " and\ndraining " + MainPlugin.ColorText(20f.ToString("n0") + "% of Max Ki", "#03bcff") + " per second!\n" + MainPlugin.ColorText("Once Ki reaches 0, Health is drained instead, this version won't kill you...", "#FF0000"));
	}

	public new static string GetDisplayBaseDamage()
	{
		return 2700f.ToString();
	}

	public override void OnEnter()
	{
		m_fasterMode = true;
		base.OnEnter();
		if (((EntityState)this).isAuthority)
		{
			m_isLethal = false;
		}
	}

	public override void FixedUpdate()
	{
		base.FixedUpdate();
		_ = ((EntityState)this).isAuthority;
	}

	public override void Update()
	{
		base.Update();
		_ = ((EntityState)this).isAuthority;
	}

	public override void OnExit()
	{
		_ = ((EntityState)this).isAuthority;
		base.OnExit();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		return (InterruptPriority)7;
	}

	protected override float GetCalculatedDrainCost()
	{
		return 0.2f * ((CharacterModSkillState)this).GetKiHandler().GetMaxKi();
	}

	protected override float GetScaleGrowthPerSecond()
	{
		return 16.8f;
	}

	protected override GameObject GetFinalExplosionChargeFX()
	{
		return VegetaAssets.FullPowerFinalExplosionChargeFX;
	}

	protected override GameObject GetFinalExplosionExplosionFX()
	{
		return VegetaAssets.FullPowerFinalExplosionExplodeFX;
	}

	protected override float GetSkillBaseDamageMult()
	{
		return 27f;
	}

	protected override float GetCameraPositionGrowthScale()
	{
		return 2.3f;
	}
}
public class NiagraPummelSkill : CharacterModSkillState
{
	public static string SkillName = "Niagra Pummel";

	private static float m_damagePerHitPercent = KingUtil.PercentToMult(222);

	private const float m_finalHitDamageMult = 3f;

	private float groundedForwardOffset = 1f;

	private float groundedRadius = 2.5f;

	private float groundedMaxYDiff = 3f;

	private float groundedCoef = 0.75f;

	private float m_skillMovementSpeed = 21f;

	private float m_minTimeExecuting = 4f;

	private string m_startAnimName = "NiagraPummel_Skill_0";

	private string m_endAnimName = "NiagraPummel_Skill_1";

	private string m_loopAnimName = "RaidBlastAnimLoop";

	private float m_attackTimerMax = 0.1f;

	private float m_attackTimer;

	public static float BaseKiCost = 300f;

	private GameObject m_loopingFX;

	private bool m_shouldFinish;

	private float m_timeFinished;

	public const string m_bsbName = "NiagraPummelBonus";

	private const float m_baseArmorAdd = 200f;

	private bool m_appliedfinalHit;

	private const float m_startStrikeTime = 1f;

	private Vector3 m_endingDirection = Vector3.zero;

	private bool m_strikesStarted;

	private Transform m_handRightBone;

	private Transform m_handLeftBone;

	private GameObject m_handFX_right;

	private GameObject m_handFX_left;

	private float currentAnimDuration;

	private void ResetAttackTimer()
	{
		m_attackTimer = m_attackTimerMax;
	}

	publi