Decompiled source of MrPopo v1.0.4

Dragon Ball Z/Popo.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using DBZUtils;
using EntityStates;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Dragonyck")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Popo")]
[assembly: AssemblyTitle("Popo")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Popo;

internal class Assets
{
	public static AssetBundle MainAssetBundle;

	public static void PopulateAssets()
	{
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Popo.popoassets"))
			{
				MainAssetBundle = AssetBundle.LoadFromStream(stream);
			}
		}
	}
}
internal class Hook
{
	internal static void Hooks()
	{
	}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.DragonyckMrPopo", "MrPopo", "1.0.4")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
public class MainPlugin : BaseUnityPlugin
{
	public const string MODUID = "com.DragonyckMrPopo";

	public const string MODNAME = "MrPopo";

	public const string VERSION = "1.0.4";

	public const string SURVIVORNAME = "Mr. Popo";

	public const string SURVIVORNAMEKEY = "POPO";

	public const string SURVIVOR2NAME = "Mr. Popo (2nd Form)";

	public const string SURVIVOR2NAMEKEY = "POPO2";

	public const string SWOLESURVIVORNAME = "Mr. Swolo";

	public const string SWOLESURVIVORNAMEKEY = "SWOLO";

	public const string SWOLESURVIVORNAME1 = "Mr. Swolo (SSJ)";

	public const string SWOLESURVIVORNAMEKEY1 = "SWOLOSSJ";

	public const string SWOLESURVIVORNAME2 = "Mr. Swolo (SSJ2)";

	public const string SWOLESURVIVORNAMEKEY2 = "SWOLOSSJ2";

	public const string SWOLESURVIVORNAME3 = "Mr. Swolo (SSJ3)";

	public const string SWOLESURVIVORNAMEKEY3 = "SWOLOSSJ3";

	public const string SWOLESURVIVORNAMEB = "Mr. Swolo (SSB)";

	public const string SWOLESURVIVORNAMEKEYB = "SWOLOSSJB";

	private static List<string> powerupBodyList = new List<string> { "Mr. PopoBody", "Mr. Popo (2nd Form)Body", "Mr. SwoloBody", "Mr. Swolo (SSJ)Body", "Mr. Swolo (SSJ2)Body", "Mr. Swolo (SSJ3)Body", "Mr. Swolo (SSB)Body" };

	private void Awake()
	{
		Assets.PopulateAssets();
		Prefabs.CreatePrefabs();
		RegisterStates();
		CreateBaseSurvivor();
		CreatePowerupSurvivor("popo2nd", "Mr. Popo (2nd Form)", "POPO2", 1.1f);
		CreatePowerupSurvivor("swolo", "Mr. Swolo", "SWOLO", 1.2f);
		CreatePowerupSurvivor("swoloSSJ", "Mr. Swolo (SSJ)", "SWOLOSSJ", 1.4f);
		CreatePowerupSurvivor("swoloSSJ2", "Mr. Swolo (SSJ2)", "SWOLOSSJ2", 1.6f);
		CreatePowerupSurvivor("swoloSSJ3", "Mr. Swolo (SSJ3)", "SWOLOSSJ3", 1.8f);
		CreatePowerupSurvivor("swoloSSB", "Mr. Swolo (SSB)", "SWOLOSSJB", 2f);
		Hook.Hooks();
	}

	private static void AddHitBoxes(Transform parent)
	{
		//IL_0016: 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)
		GameObject val = Utils.CreateHitbox("Punch", parent, new Vector3(4.5f, 4.5f, 4.8f));
		val.transform.localPosition = new Vector3(0f, 1.3f, 1f);
	}

	private void RegisterStates()
	{
		//IL_0003: 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_0013: 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_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		bool flag = default(bool);
		ContentAddition.AddEntityState<DashState1h>(ref flag);
		ContentAddition.AddEntityState<FireDashKamehameha>(ref flag);
		ContentAddition.AddEntityState<ChargeDashKamehameha>(ref flag);
		ContentAddition.AddEntityState<ChargeDashKamehameha>(ref flag);
		ContentAddition.AddEntityState<DashState2h>(ref flag);
		ContentAddition.AddEntityState<DashDealKamehamehaFireState>(ref flag);
		ContentAddition.AddEntityState<KiBlast>(ref flag);
		ContentAddition.AddEntityState<RayBlast>(ref flag);
		ContentAddition.AddEntityState<FinalDualKamehameha>(ref flag);
		ContentAddition.AddEntityState<BeastKamehameha>(ref flag);
		OrbAPI.AddOrb(typeof(PopoSuccOrb));
		LanguageAPI.Add("POPO_PASSIVE_NAME", "Energy Absorption");
		LanguageAPI.Add("POPO_PASSIVE_DESCRIPTION", "Absorb a nearby projectile every <style=cIsUtility>1s</style> <style=cStack>(*Level)</style> and gain <color=#41D2EF>+5 Ki</color>.");
	}

	internal static void CreateBaseSurvivor()
	{
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Unknown result type (might be due to invalid IL or missing references)
		//IL_019e: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_020f: Unknown result type (might be due to invalid IL or missing references)
		//IL_022c: Unknown result type (might be due to invalid IL or missing references)
		//IL_023f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0254: Unknown result type (might be due to invalid IL or missing references)
		//IL_025e: Expected O, but got Unknown
		//IL_025e: Expected O, but got Unknown
		//IL_0275: Unknown result type (might be due to invalid IL or missing references)
		//IL_028a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0294: Expected O, but got Unknown
		//IL_0294: Expected O, but got Unknown
		//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ca: Expected O, but got Unknown
		//IL_02ca: Expected O, but got Unknown
		//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0300: Expected O, but got Unknown
		//IL_0300: Expected O, but got Unknown
		//IL_0317: Unknown result type (might be due to invalid IL or missing references)
		//IL_032c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0336: Expected O, but got Unknown
		//IL_0336: Expected O, but got Unknown
		//IL_034d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0362: Unknown result type (might be due to invalid IL or missing references)
		//IL_036c: Expected O, but got Unknown
		//IL_036c: Expected O, but got Unknown
		//IL_0383: Unknown result type (might be due to invalid IL or missing references)
		//IL_0398: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a2: Expected O, but got Unknown
		//IL_03a2: Expected O, but got Unknown
		//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d8: Expected O, but got Unknown
		//IL_03d8: Expected O, but got Unknown
		//IL_03ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_0404: Unknown result type (might be due to invalid IL or missing references)
		//IL_040e: Expected O, but got Unknown
		//IL_040e: Expected O, but got Unknown
		//IL_0425: Unknown result type (might be due to invalid IL or missing references)
		//IL_043a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0444: Expected O, but got Unknown
		//IL_0444: Expected O, but got Unknown
		//IL_045b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0470: Unknown result type (might be due to invalid IL or missing references)
		//IL_047a: Expected O, but got Unknown
		//IL_047a: Expected O, but got Unknown
		//IL_0491: Unknown result type (might be due to invalid IL or missing references)
		//IL_04a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_04b0: Expected O, but got Unknown
		//IL_04b0: Expected O, but got Unknown
		//IL_04c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_04dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_04e6: Expected O, but got Unknown
		//IL_04e6: Expected O, but got Unknown
		//IL_04fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0512: Unknown result type (might be due to invalid IL or missing references)
		//IL_051c: Expected O, but got Unknown
		//IL_051c: Expected O, but got Unknown
		//IL_0533: Unknown result type (might be due to invalid IL or missing references)
		//IL_0545: Unknown result type (might be due to invalid IL or missing references)
		//IL_054f: Expected O, but got Unknown
		//IL_054f: Expected O, but got Unknown
		//IL_0566: Unknown result type (might be due to invalid IL or missing references)
		//IL_057b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0585: Expected O, but got Unknown
		//IL_0585: Expected O, but got Unknown
		//IL_058f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0591: Unknown result type (might be due to invalid IL or missing references)
		//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_05bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_065e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0663: Unknown result type (might be due to invalid IL or missing references)
		//IL_06b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0704: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>("popo");
		SurvivorDef val2 = default(SurvivorDef);
		CharacterBody val3 = DBZSurvivors.SetupNewDBZSurvivor(val, "Mr. Popo", ref val2);
		((Component)val3).gameObject.AddComponent<PopoSuccBehaviour>();
		((Object)val3).name = "Mr. PopoBody";
		val3.baseNameToken = "POPO_NAME";
		val3.subtitleNameToken = "POPO_SUBTITLE";
		val3.bodyFlags = (BodyFlags)16;
		val3.rootMotionInMainState = false;
		val3.mainRootSpeed = 0f;
		val3.baseMaxHealth = 110f;
		val3.levelMaxHealth = 33f;
		val3.baseRegen = 1.5f;
		val3.levelRegen = 0.2f;
		val3.baseMaxShield = 0f;
		val3.levelMaxShield = 0f;
		val3.baseMoveSpeed = 7f;
		val3.levelMoveSpeed = 0f;
		val3.baseAcceleration = 110f;
		val3.baseJumpPower = 15f;
		val3.levelJumpPower = 0f;
		val3.baseDamage = 12f;
		val3.levelDamage = 2.4f;
		val3.baseAttackSpeed = 1f;
		val3.levelAttackSpeed = 0f;
		val3.baseCrit = 1f;
		val3.levelCrit = 0f;
		val3.baseArmor = 20f;
		val3.levelArmor = 0f;
		val3.baseJumpCount = 2;
		val3.sprintingSpeedMultiplier = 1.45f;
		val3.wasLucky = false;
		val3.hideCrosshair = false;
		val3.hullClassification = (HullClassification)0;
		val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("popo").texture;
		val3.isChampion = false;
		val3.currentVehicle = null;
		val3.skinIndex = 0u;
		val3.bodyColor = new Color(0.1803922f, 0.1568628f, 0.1803922f);
		val3.aimOriginTransform.localPosition = new Vector3(0f, 1f, 0f);
		((Component)val3).gameObject.GetComponent<ModelLocator>().modelBaseTransform.localPosition = new Vector3(0f, -0.97f, 0f);
		ConfigFile val4 = Utils.CreateConfig(val3);
		((Component)val3).GetComponent<KiBehaviour>().hasPowerup = true;
		DBZSurvivorDef val5 = ScriptableObject.CreateInstance<DBZSurvivorDef>();
		val5.vfxColor = (VFXColor)(-1);
		val5.config = val4;
		val5.powerupBodyList = powerupBodyList;
		val5.memory = new PowerupMemory
		{
			spentKiCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Ki Spent", "Coefficient"), 0.0025f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			baseKillCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Base Kill", "Coefficient"), 1f, new ConfigDescription("FinalValue = xKillCoeff * baseKillCoefficient * powerupCount", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			regularKillCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Regular Enemy Kill", "Coefficient"), 0.01f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			eliteKillCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Elite Kill", "Coefficient"), 0.02f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			bossKillCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Boss Kill", "Coefficient"), 0.035f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			baseItemCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Base Item", "Coefficient"), 1f, new ConfigDescription("FinalValue = xItemCoeff * baseItemCoefficient * powerupCount", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			whiteItemCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: White Item", "Coefficient"), 0.001f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			greenItemCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Green Item", "Coefficient"), 0.002f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			bossItemCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Boss Item", "Coefficient"), 0.003f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			redItemCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Red Item", "Coefficient"), 0.0035f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			lunarItemMaxCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Lunar Item Max Coefficient", "Coefficient"), 0.004f, new ConfigDescription("Random chance between 0 and this value.", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			moddedTierItemCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Ki Spent", "Coefficient"), 0.0025f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			baseDamageDealtCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Damage Dealt", "Coefficient"), 5E-07f, new ConfigDescription("FinalValue = xDamageDealt * baseDamageCoefficient * powerupCount. Item procs count towards powerup gains.", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			baseDamageTakenCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Damage Taken", "Coefficient"), 5E-06f, new ConfigDescription("FinalValue = xDamageTaken * baseDamageCoefficient * powerupCount", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			requiredKillsForBonus = val4.Bind<int>(new ConfigDefinition("Powerup: Required Kills For Bonus Gain", "Kills"), 100, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			bonusBasedOnRequiredKills = val4.Bind<float>(new ConfigDefinition("Powerup: Bonus Based On Required Kills", "Bonus"), 0.0025f, new ConfigDescription("FinalValue = bonusBasedOnRequiredKills * powerupCount", (AcceptableValueBase)null, Array.Empty<object>())).Value
		};
		DBZSurvivorCatalog.AddDBZSurvivorDef(val3.baseNameToken, val5);
		EntityStateMachine component = ((Component)val3).GetComponent<EntityStateMachine>();
		component.mainStateType = new SerializableEntityStateType(typeof(DBZCharacterMain));
		string text = "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > ";
		string text2 = "..and so he left.";
		string text3 = "..and so he vanished.";
		LanguageAPI.Add("POPO_NAME", "Mr. Popo");
		LanguageAPI.Add("POPO_DESCRIPTION", text);
		LanguageAPI.Add("POPO_SUBTITLE", "");
		LanguageAPI.Add("POPO_OUTRO", text2);
		LanguageAPI.Add("POPO_FAIL", text3);
		val2.primaryColor = val3.bodyColor;
		val2.desiredSortPosition = 12f;
		SkillLocator component2 = ((Component)val3).gameObject.GetComponent<SkillLocator>();
		AddPassive(component2);
		AddPrimary(component2);
		AddSecondary("POPO", component2, "_M2_NAME", "Dash One-Handed Kamehameha", "_M2_DESCRIPTION", "<style=cIsUtility>Evade</style> backwards twice then charge up a powerful single-handed Kamehameha for <style=cIsDamage>90% damage</style>.", new SerializableEntityStateType(typeof(DashState1h)));
		AddKiBlastSwitch(component2);
		AddUtility(component2);
		AddSpecial("POPO", component2, "_SPEC_NAME", "Kamehameha", "_SPEC_DESCRIPTION", "Charge up a powerful single-handed Kamehameha for <style=cIsDamage>120% damage</style>.", new SerializableEntityStateType(typeof(BaseKamehamehaState)));
		DBZAimIndicator val6 = ((Component)val3).gameObject.AddComponent<DBZAimIndicator>();
		AddHitBoxes(val.transform);
	}

	internal static void CreatePowerupSurvivor(string modelName, string survivorName, string survivorNameKey, float statMultValue)
	{
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Expected O, but got Unknown
		//IL_0050: Expected O, but got Unknown
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01da: Unknown result type (might be due to invalid IL or missing references)
		//IL_01df: Unknown result type (might be due to invalid IL or missing references)
		//IL_0217: Unknown result type (might be due to invalid IL or missing references)
		//IL_021c: Unknown result type (might be due to invalid IL or missing references)
		//IL_022d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0232: Unknown result type (might be due to invalid IL or missing references)
		//IL_0256: Unknown result type (might be due to invalid IL or missing references)
		//IL_0269: Unknown result type (might be due to invalid IL or missing references)
		//IL_027e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0288: Expected O, but got Unknown
		//IL_0288: Expected O, but got Unknown
		//IL_029f: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_02be: Expected O, but got Unknown
		//IL_02be: Expected O, but got Unknown
		//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f4: Expected O, but got Unknown
		//IL_02f4: Expected O, but got Unknown
		//IL_030b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0320: Unknown result type (might be due to invalid IL or missing references)
		//IL_032a: Expected O, but got Unknown
		//IL_032a: Expected O, but got Unknown
		//IL_0341: Unknown result type (might be due to invalid IL or missing references)
		//IL_0356: Unknown result type (might be due to invalid IL or missing references)
		//IL_0360: Expected O, but got Unknown
		//IL_0360: Expected O, but got Unknown
		//IL_0377: Unknown result type (might be due to invalid IL or missing references)
		//IL_038c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0396: Expected O, but got Unknown
		//IL_0396: Expected O, but got Unknown
		//IL_03ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_03cc: Expected O, but got Unknown
		//IL_03cc: Expected O, but got Unknown
		//IL_03e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_03f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0402: Expected O, but got Unknown
		//IL_0402: Expected O, but got Unknown
		//IL_0419: Unknown result type (might be due to invalid IL or missing references)
		//IL_042e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0438: Expected O, but got Unknown
		//IL_0438: Expected O, but got Unknown
		//IL_044f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0464: Unknown result type (might be due to invalid IL or missing references)
		//IL_046e: Expected O, but got Unknown
		//IL_046e: Expected O, but got Unknown
		//IL_0485: Unknown result type (might be due to invalid IL or missing references)
		//IL_049a: Unknown result type (might be due to invalid IL or missing references)
		//IL_04a4: Expected O, but got Unknown
		//IL_04a4: Expected O, but got Unknown
		//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_04da: Expected O, but got Unknown
		//IL_04da: Expected O, but got Unknown
		//IL_04f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_0506: Unknown result type (might be due to invalid IL or missing references)
		//IL_0510: Expected O, but got Unknown
		//IL_0510: Expected O, but got Unknown
		//IL_0527: Unknown result type (might be due to invalid IL or missing references)
		//IL_053c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0546: Expected O, but got Unknown
		//IL_0546: Expected O, but got Unknown
		//IL_055d: Unknown result type (might be due to invalid IL or missing references)
		//IL_056f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0579: Expected O, but got Unknown
		//IL_0579: Expected O, but got Unknown
		//IL_0590: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_05af: Expected O, but got Unknown
		//IL_05af: Expected O, but got Unknown
		//IL_05b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_05bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_067b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0689: Unknown result type (might be due to invalid IL or missing references)
		//IL_06e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0737: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cf5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cfa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d0b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d1c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d26: Expected O, but got Unknown
		//IL_0d26: Expected O, but got Unknown
		//IL_076b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0779: Unknown result type (might be due to invalid IL or missing references)
		//IL_07d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0827: Unknown result type (might be due to invalid IL or missing references)
		//IL_085b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0869: Unknown result type (might be due to invalid IL or missing references)
		//IL_08c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0917: Unknown result type (might be due to invalid IL or missing references)
		//IL_094b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0959: Unknown result type (might be due to invalid IL or missing references)
		//IL_09b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a07: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a3b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a49: Unknown result type (might be due to invalid IL or missing references)
		//IL_0aa8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0af7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b2b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b41: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ba8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bdd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c1f: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>(modelName);
		SurvivorDef val2 = default(SurvivorDef);
		CharacterBody val3 = DBZSurvivors.SetupNewDBZSurvivor(val, survivorName, ref val2);
		((Component)val3).gameObject.AddComponent<PopoSuccBehaviour>();
		ConfigFile val4 = Utils.CreateConfig(val3);
		float value = val4.Bind<float>(new ConfigDefinition("Powerup: Stat Multiplier", "Multiplier"), statMultValue, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value;
		((Object)val3).name = survivorName + "Body";
		val3.baseNameToken = survivorNameKey + "_NAME";
		val3.subtitleNameToken = survivorNameKey + "_SUBTITLE";
		val3.bodyFlags = (BodyFlags)16;
		val3.rootMotionInMainState = false;
		val3.mainRootSpeed = 0f;
		val3.baseMaxHealth = 110f * value;
		val3.levelMaxHealth = 33f * value;
		val3.baseRegen = 1.5f * value;
		val3.levelRegen = 0.2f * value;
		val3.baseMaxShield = 0f;
		val3.levelMaxShield = 0f;
		val3.baseMoveSpeed = 7f;
		val3.levelMoveSpeed = 0f;
		val3.baseAcceleration = 110f;
		val3.baseJumpPower = 15f;
		val3.levelJumpPower = 0f;
		val3.baseDamage = 12f * value;
		val3.levelDamage = 2.4f * value;
		val3.baseAttackSpeed = 1f;
		val3.levelAttackSpeed = 0f;
		val3.baseCrit = 1f * value;
		val3.levelCrit = 0f;
		val3.baseArmor = 20f * value;
		val3.levelArmor = 0f;
		val3.baseJumpCount = 2;
		val3.sprintingSpeedMultiplier = 1.45f;
		val3.wasLucky = false;
		val3.hideCrosshair = false;
		val3.hullClassification = (HullClassification)0;
		val3.isChampion = false;
		val3.currentVehicle = null;
		val3.skinIndex = 0u;
		val3.bodyColor = new Color(0.1803922f, 0.1568628f, 0.1803922f);
		KiBehaviour component = ((Component)val3).GetComponent<KiBehaviour>();
		component.hasPowerup = true;
		component.maxKiValue = 1f * value;
		EntityStateMachine component2 = ((Component)val3).GetComponent<EntityStateMachine>();
		component2.initialStateType = new SerializableEntityStateType(typeof(BasePowerupSpawnState));
		component2.mainStateType = new SerializableEntityStateType(typeof(DBZCharacterMain));
		DBZSurvivorDef val5 = ScriptableObject.CreateInstance<DBZSurvivorDef>();
		val5.config = val4;
		val5.powerupBodyList = powerupBodyList;
		val5.memory = new PowerupMemory
		{
			spentKiCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Ki Spent", "Coefficient"), 0.0025f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			baseKillCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Base Kill", "Coefficient"), 1f, new ConfigDescription("FinalValue = xKillCoeff * baseKillCoefficient * powerupCount", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			regularKillCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Regular Enemy Kill", "Coefficient"), 0.01f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			eliteKillCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Elite Kill", "Coefficient"), 0.02f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			bossKillCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Boss Kill", "Coefficient"), 0.035f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			baseItemCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Base Item", "Coefficient"), 1f, new ConfigDescription("FinalValue = xItemCoeff * baseItemCoefficient * powerupCount", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			whiteItemCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: White Item", "Coefficient"), 0.001f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			greenItemCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Green Item", "Coefficient"), 0.002f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			bossItemCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Boss Item", "Coefficient"), 0.003f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			redItemCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Red Item", "Coefficient"), 0.0035f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			lunarItemMaxCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Lunar Item Max Coefficient", "Coefficient"), 0.004f, new ConfigDescription("Random chance between 0 and this value.", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			moddedTierItemCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Ki Spent", "Coefficient"), 0.0025f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			baseDamageDealtCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Damage Dealt", "Coefficient"), 5E-07f, new ConfigDescription("FinalValue = xDamageDealt * baseDamageCoefficient * powerupCount. Item procs count towards powerup gains.", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			baseDamageTakenCoefficient = val4.Bind<float>(new ConfigDefinition("Powerup: Damage Taken", "Coefficient"), 5E-06f, new ConfigDescription("FinalValue = xDamageTaken * baseDamageCoefficient * powerupCount", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			requiredKillsForBonus = val4.Bind<int>(new ConfigDefinition("Powerup: Required Kills For Bonus Gain", "Kills"), 100, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())).Value,
			bonusBasedOnRequiredKills = val4.Bind<float>(new ConfigDefinition("Powerup: Bonus Based On Required Kills", "Bonus"), 0.0025f, new ConfigDescription("FinalValue = bonusBasedOnRequiredKills * powerupCount", (AcceptableValueBase)null, Array.Empty<object>())).Value
		};
		val3.aimOriginTransform.localPosition = new Vector3(0f, 1f, 0f);
		SkillLocator component3 = ((Component)val3).gameObject.GetComponent<SkillLocator>();
		switch (survivorName)
		{
		case "Mr. Popo (2nd Form)":
			((Component)val3).gameObject.GetComponent<ModelLocator>().modelBaseTransform.localPosition = new Vector3(0f, -1.05f, 0f);
			val5.vfxColor = (VFXColor)(-1);
			val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("popo2").texture;
			val2.desiredSortPosition = 12.1f;
			AddPassive(component3);
			AddPrimary(component3);
			AddSecondary("Mr. Popo (2nd Form)", component3, "_M2_NAME", "Dash Dual Kamehameha", "_M2_DESCRIPTION", "<style=cIsUtility>Evade</style> backwards twice then charge up two powerful single-handed Kamehameha for <style=cIsDamage>60% damage</style> each.", new SerializableEntityStateType(typeof(DashState2h)));
			AddKiBlastSwitch(component3);
			AddUtility(component3);
			AddSpecial("Mr. Popo (2nd Form)", component3, "_SPEC_NAME", "Charge Kamehameha", "_SPEC_DESCRIPTION", "Charge a powerful Kamehameha for <style=cIsDamage>120%-360% damage</style>.", new SerializableEntityStateType(typeof(KamehamehaChargeState)));
			break;
		case "Mr. Swolo":
			((Component)val3).gameObject.GetComponent<ModelLocator>().modelBaseTransform.localPosition = new Vector3(0f, -0.68f, 0f);
			val5.vfxColor = (VFXColor)1;
			val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("swolo").texture;
			val2.desiredSortPosition = 12.2f;
			AddPassive(component3);
			AddPrimary(component3);
			AddSecondary("Mr. Swolo", component3, "_M2_NAME", "Final Dual Kamehameha", "_M2_DESCRIPTION", "Charge up two powerful single-handed Kamehameha for <style=cIsDamage>80% damage</style> each.", new SerializableEntityStateType(typeof(FinalDualKamehameha)));
			AddKiBlastSwitch(component3);
			AddUtility(component3);
			AddSpecial("Mr. Swolo", component3, "_SPEC_NAME", "3X Kamehameha", "_SPEC_DESCRIPTION", "Charge a powerful Kamehameha for <style=cIsDamage>150%-450% damage</style>.", new SerializableEntityStateType(typeof(Kamehameha3XChargeState)));
			break;
		case "Mr. Swolo (SSJ)":
			((Component)val3).gameObject.GetComponent<ModelLocator>().modelBaseTransform.localPosition = new Vector3(0f, -0.68f, 0f);
			val5.vfxColor = (VFXColor)1;
			val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("swoloSSJ").texture;
			val2.desiredSortPosition = 12.3f;
			AddPassive(component3);
			AddPrimary(component3);
			AddSecondary("Mr. Swolo (SSJ)", component3, "_M2_NAME", "Final Dual Kamehameha", "_M2_DESCRIPTION", "Charge up two powerful single-handed Kamehameha for <style=cIsDamage>80% damage</style> each.", new SerializableEntityStateType(typeof(FinalDualKamehameha)));
			AddKiBlastSwitch(component3);
			AddUtility(component3);
			AddSpecial("Mr. Swolo (SSJ)", component3, "_SPEC_NAME", "10X Kamehameha", "_SPEC_DESCRIPTION", "Charge a powerful Kamehameha for <style=cIsDamage>150%-1500% damage</style>.", new SerializableEntityStateType(typeof(Kamehameha10XChargeState)));
			break;
		case "Mr. Swolo (SSJ2)":
			((Component)val3).gameObject.GetComponent<ModelLocator>().modelBaseTransform.localPosition = new Vector3(0f, -0.68f, 0f);
			val5.vfxColor = (VFXColor)1;
			val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("swoloSSJ2").texture;
			val2.desiredSortPosition = 12.4f;
			AddPassive(component3);
			AddPrimary(component3);
			AddSecondary("Mr. Swolo (SSJ2)", component3, "_M2_NAME", "Final Dual Kamehameha", "_M2_DESCRIPTION", "Charge up two powerful single-handed Kamehameha for <style=cIsDamage>80% damage</style> each.", new SerializableEntityStateType(typeof(FinalDualKamehameha)));
			AddKiBlastSwitch(component3);
			AddUtility(component3);
			AddSpecial("Mr. Swolo (SSJ2)", component3, "_SPEC_NAME", "10X Kamehameha", "_SPEC_DESCRIPTION", "Charge a powerful Kamehameha for <style=cIsDamage>150%-1500% damage</style>.", new SerializableEntityStateType(typeof(Kamehameha10XChargeState)));
			break;
		case "Mr. Swolo (SSJ3)":
			((Component)val3).gameObject.GetComponent<ModelLocator>().modelBaseTransform.localPosition = new Vector3(0f, -0.68f, 0f);
			val5.vfxColor = (VFXColor)1;
			val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("swoloSSJ3").texture;
			val2.desiredSortPosition = 12.5f;
			AddPassive(component3);
			AddPrimary(component3);
			AddSecondary("Mr. Swolo (SSJ3)", component3, "_M2_NAME", "Final Dual Kamehameha", "_M2_DESCRIPTION", "Charge up two powerful single-handed Kamehameha for <style=cIsDamage>80% damage</style> each.", new SerializableEntityStateType(typeof(FinalDualKamehameha)));
			AddKiBlastSwitch(component3);
			AddUtility(component3);
			AddSpecial("Mr. Swolo (SSJ3)", component3, "_SPEC_NAME", "10X Kamehameha", "_SPEC_DESCRIPTION", "Charge a powerful Kamehameha for <style=cIsDamage>150%-1500% damage</style>.", new SerializableEntityStateType(typeof(Kamehameha10XChargeState)));
			break;
		case "Mr. Swolo (SSB)":
			((Component)val3).gameObject.GetComponent<ModelLocator>().modelBaseTransform.localPosition = new Vector3(0f, -0.85f, 0f);
			component.hasPowerup = false;
			val5.vfxColor = (VFXColor)0;
			val5.powerupBodyList = null;
			val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("swoloSSJB").texture;
			val2.desiredSortPosition = 12.6f;
			AddPassive(component3);
			AddPrimary(component3);
			AddSecondary("Mr. Swolo (SSB)", component3, "_M2_NAME", "100X Beast Kamehameha", "_M2_DESCRIPTION", "Quickly charge a powerful Kamehameha for <style=cIsDamage>300%-1500% damage</style>.", new SerializableEntityStateType(typeof(BeastKamehameha)), "special");
			AddSwitch("Mr. Swolo (SSB)", component3, "ALT_M2_NAME", "Ray Blast", "ALT_M2_DESCRIPTION", "Instantly shock an enemy for <style=cIsDamage>150%</style> damage.", new SerializableEntityStateType(typeof(RayBlast)), "ray");
			AddUtility(component3);
			AddSpecial("Mr. Swolo (SSB)", component3, "_SPEC_NAME", "Beast Genkidama", "_SPEC_DESCRIPTION", "Charge a extremely powerful sphere of pure life energy by consuming nearby life energy for <style=cIsDamage>250%</style> damage, then release it. It explodes on collision, dealing all the damage it gathered at once in a large radius.", new SerializableEntityStateType(typeof(BaseGenkidamaState)), "genkidama");
			break;
		}
		DBZSurvivorCatalog.AddDBZSurvivorDef(val3.baseNameToken, val5);
		string text = "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > ";
		string text2 = "..and so he left, the beast unleashed.";
		string text3 = "..and so he vanished, to be revived by Shenlong once more.";
		LanguageAPI.Add(survivorNameKey + "_NAME", survivorName);
		LanguageAPI.Add(survivorNameKey + "_DESCRIPTION", text);
		LanguageAPI.Add(survivorNameKey + "_SUBTITLE", "The Beast Within");
		LanguageAPI.Add(survivorNameKey + "_OUTRO", text2);
		LanguageAPI.Add(survivorNameKey + "_FAIL", text3);
		val2.primaryColor = val3.bodyColor;
		val2.hidden = val4.Bind<bool>(new ConfigDefinition("Hidden Survivor", "Hidden"), true, new ConfigDescription("Hide in Character Select", (AcceptableValueBase)null, Array.Empty<object>())).Value;
		DBZAimIndicator val6 = ((Component)val3).gameObject.AddComponent<DBZAimIndicator>();
		AddHitBoxes(val.transform);
	}

	private static void AddPassive(SkillLocator component)
	{
		component.passiveSkill.enabled = true;
		component.passiveSkill.skillNameToken = "POPO_PASSIVE_NAME";
		component.passiveSkill.skillDescriptionToken = "POPO_PASSIVE_DESCRIPTION";
		component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("passive");
	}

	private static void AddPrimary(SkillLocator skillLocator)
	{
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_0116: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Expected O, but got Unknown
		//IL_0139: Unknown result type (might be due to invalid IL or missing references)
		//IL_013a: Unknown result type (might be due to invalid IL or missing references)
		DBZSkillDef val = ScriptableObject.CreateInstance<DBZSkillDef>();
		LanguageAPI.Add("POPO_M1", "Fierce Fist");
		((SkillDef)val).activationStateMachineName = "Weapon";
		((SkillDef)val).activationState = new SerializableEntityStateType(typeof(DBZMeleeSkillState));
		((SkillDef)val).baseMaxStock = 0;
		((SkillDef)val).baseRechargeInterval = 0f;
		((SkillDef)val).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)val).canceledFromSprinting = false;
		((SkillDef)val).fullRestockOnAssign = true;
		((SkillDef)val).interruptPriority = (InterruptPriority)0;
		((SkillDef)val).isCombatSkill = true;
		((SkillDef)val).mustKeyPress = false;
		((SkillDef)val).cancelSprintingOnActivation = true;
		((SkillDef)val).rechargeStock = 0;
		((SkillDef)val).requiredStock = 0;
		((SkillDef)val).stockToConsume = 0;
		((SkillDef)val).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("m1");
		((SkillDef)val).skillDescriptionToken = "DBZ_MELEE_SKILL_DESCRIPTION";
		((SkillDef)val).skillName = "POPO_M1";
		((SkillDef)val).skillNameToken = "POPO_M1";
		ContentAddition.AddSkillDef((SkillDef)(object)val);
		skillLocator.primary = ((Component)skillLocator).gameObject.AddComponent<GenericSkill>();
		SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
		val2.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)skillLocator.primary, "_skillFamily", val2);
		SkillFamily skillFamily = skillLocator.primary.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val3 = new Variant
		{
			skillDef = (SkillDef)(object)val
		};
		((Variant)(ref val3)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null);
		variants[0] = val3;
		ContentAddition.AddSkillFamily(skillFamily);
	}

	private static void AddSecondary(string survivorNameKey, SkillLocator skillLocator, string nameKey, string Name, string descriptionKey, string Description, SerializableEntityStateType state, string spriteName = "m2")
	{
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: 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_0151: Unknown result type (might be due to invalid IL or missing references)
		//IL_015b: Expected O, but got Unknown
		//IL_015c: Unknown result type (might be due to invalid IL or missing references)
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		LanguageAPI.Add(survivorNameKey + nameKey, Name);
		LanguageAPI.Add(survivorNameKey + descriptionKey, Description);
		DBZSkillDef val = ScriptableObject.CreateInstance<DBZSkillDef>();
		((SkillDef)val).activationStateMachineName = "NoMovement";
		((SkillDef)val).activationState = state;
		((SkillDef)val).baseMaxStock = 1;
		((SkillDef)val).baseRechargeInterval = 6f;
		((SkillDef)val).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)val).canceledFromSprinting = false;
		((SkillDef)val).fullRestockOnAssign = true;
		((SkillDef)val).interruptPriority = (InterruptPriority)0;
		((SkillDef)val).isCombatSkill = true;
		((SkillDef)val).mustKeyPress = false;
		((SkillDef)val).cancelSprintingOnActivation = true;
		((SkillDef)val).rechargeStock = 1;
		((SkillDef)val).requiredStock = 1;
		((SkillDef)val).stockToConsume = 1;
		((SkillDef)val).icon = Assets.MainAssetBundle.LoadAsset<Sprite>(spriteName);
		((SkillDef)val).skillDescriptionToken = survivorNameKey + descriptionKey;
		((SkillDef)val).skillName = survivorNameKey + nameKey;
		((SkillDef)val).skillNameToken = survivorNameKey + nameKey;
		val.kiCost = 0.2f;
		val.isSwitch = true;
		((SkillDef)val).keywordTokens = val.newKeywordTokens;
		ContentAddition.AddSkillDef((SkillDef)(object)val);
		skillLocator.secondary = ((Component)skillLocator).gameObject.AddComponent<GenericSkill>();
		SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
		val2.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)skillLocator.secondary, "_skillFamily", val2);
		SkillFamily skillFamily = skillLocator.secondary.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val3 = new Variant
		{
			skillDef = (SkillDef)(object)val
		};
		((Variant)(ref val3)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null);
		variants[0] = val3;
		ContentAddition.AddSkillFamily(skillFamily);
	}

	private static void AddKiBlastSwitch(SkillLocator skillLocator, string spriteName = "m2alt")
	{
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: Unknown result type (might be due to invalid IL or missing references)
		//IL_0130: Unknown result type (might be due to invalid IL or missing references)
		//IL_013a: Expected O, but got Unknown
		//IL_013b: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Unknown result type (might be due to invalid IL or missing references)
		DBZSkillDef val = ScriptableObject.CreateInstance<DBZSkillDef>();
		((SkillDef)val).activationStateMachineName = "Slide";
		((SkillDef)val).activationState = new SerializableEntityStateType(typeof(KiBlast));
		((SkillDef)val).baseMaxStock = 1;
		((SkillDef)val).baseRechargeInterval = 0.4f;
		((SkillDef)val).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)val).canceledFromSprinting = false;
		((SkillDef)val).fullRestockOnAssign = true;
		((SkillDef)val).interruptPriority = (InterruptPriority)0;
		((SkillDef)val).isCombatSkill = true;
		((SkillDef)val).mustKeyPress = false;
		((SkillDef)val).cancelSprintingOnActivation = false;
		((SkillDef)val).rechargeStock = 1;
		((SkillDef)val).requiredStock = 1;
		((SkillDef)val).stockToConsume = 1;
		((SkillDef)val).icon = Assets.MainAssetBundle.LoadAsset<Sprite>(spriteName);
		((SkillDef)val).skillDescriptionToken = "DBZ_KIBLAST_SKILL_DESCRIPTION";
		((SkillDef)val).skillName = "DBZ_KIBLAST_SKILL_NAME";
		((SkillDef)val).skillNameToken = "DBZ_KIBLAST_SKILL_NAME";
		val.kiCost = 0.05f;
		val.isSwitch = true;
		val.isAimBased = true;
		((SkillDef)val).keywordTokens = val.newKeywordTokens;
		ContentAddition.AddSkillDef((SkillDef)(object)val);
		GenericSkill val2 = ((Component)skillLocator).gameObject.AddComponent<GenericSkill>();
		SkillFamily val3 = ScriptableObject.CreateInstance<SkillFamily>();
		val3.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)val2, "_skillFamily", val3);
		SkillFamily skillFamily = val2.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val4 = new Variant
		{
			skillDef = (SkillDef)(object)val
		};
		((Variant)(ref val4)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null);
		variants[0] = val4;
		ContentAddition.AddSkillFamily(skillFamily);
		SkillSwitchBehaviour val5 = ((Component)skillLocator).gameObject.AddComponent<SkillSwitchBehaviour>();
		val5.secondarySkillDefList = new List<SkillDef>
		{
			skillLocator.secondary.skillFamily.variants[0].skillDef,
			(SkillDef)(object)val
		};
	}

	private static void AddSwitch(string survivorNameKey, SkillLocator skillLocator, string nameKey, string Name, string descriptionKey, string Description, SerializableEntityStateType state, string spriteName = "m2alt")
	{
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: 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_0149: Unknown result type (might be due to invalid IL or missing references)
		//IL_0153: Expected O, but got Unknown
		//IL_0154: Unknown result type (might be due to invalid IL or missing references)
		//IL_0156: Unknown result type (might be due to invalid IL or missing references)
		LanguageAPI.Add(survivorNameKey + nameKey, Name);
		LanguageAPI.Add(survivorNameKey + descriptionKey, Description);
		DBZSkillDef val = ScriptableObject.CreateInstance<DBZSkillDef>();
		((SkillDef)val).activationStateMachineName = "Slide";
		((SkillDef)val).activationState = state;
		((SkillDef)val).baseMaxStock = 1;
		((SkillDef)val).baseRechargeInterval = 0.4f;
		((SkillDef)val).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)val).canceledFromSprinting = false;
		((SkillDef)val).fullRestockOnAssign = true;
		((SkillDef)val).interruptPriority = (InterruptPriority)0;
		((SkillDef)val).isCombatSkill = true;
		((SkillDef)val).mustKeyPress = false;
		((SkillDef)val).cancelSprintingOnActivation = false;
		((SkillDef)val).rechargeStock = 1;
		((SkillDef)val).requiredStock = 1;
		((SkillDef)val).stockToConsume = 1;
		((SkillDef)val).icon = Assets.MainAssetBundle.LoadAsset<Sprite>(spriteName);
		((SkillDef)val).skillDescriptionToken = survivorNameKey + descriptionKey;
		((SkillDef)val).skillName = survivorNameKey + nameKey;
		((SkillDef)val).skillNameToken = survivorNameKey + nameKey;
		val.kiCost = 0.05f;
		val.isSwitch = true;
		val.isAimBased = true;
		((SkillDef)val).keywordTokens = val.newKeywordTokens;
		ContentAddition.AddSkillDef((SkillDef)(object)val);
		GenericSkill val2 = ((Component)skillLocator).gameObject.AddComponent<GenericSkill>();
		SkillFamily val3 = ScriptableObject.CreateInstance<SkillFamily>();
		val3.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)val2, "_skillFamily", val3);
		SkillFamily skillFamily = val2.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val4 = new Variant
		{
			skillDef = (SkillDef)(object)val
		};
		((Variant)(ref val4)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null);
		variants[0] = val4;
		ContentAddition.AddSkillFamily(skillFamily);
		SkillSwitchBehaviour val5 = ((Component)skillLocator).gameObject.AddComponent<SkillSwitchBehaviour>();
		val5.secondarySkillDefList = new List<SkillDef>
		{
			skillLocator.secondary.skillFamily.variants[0].skillDef,
			(SkillDef)(object)val
		};
	}

	private static void AddUtility(SkillLocator skillLocator, string spriteName = "utility")
	{
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: Unknown result type (might be due to invalid IL or missing references)
		//IL_0121: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Expected O, but got Unknown
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_012d: Unknown result type (might be due to invalid IL or missing references)
		DBZSkillDef val = ScriptableObject.CreateInstance<DBZSkillDef>();
		((SkillDef)val).activationStateMachineName = "NoMovement";
		((SkillDef)val).activationState = new SerializableEntityStateType(typeof(BaseKiState));
		((SkillDef)val).baseMaxStock = 0;
		((SkillDef)val).baseRechargeInterval = 0f;
		((SkillDef)val).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)val).canceledFromSprinting = false;
		((SkillDef)val).fullRestockOnAssign = true;
		((SkillDef)val).interruptPriority = (InterruptPriority)0;
		((SkillDef)val).isCombatSkill = true;
		((SkillDef)val).mustKeyPress = false;
		((SkillDef)val).cancelSprintingOnActivation = true;
		((SkillDef)val).rechargeStock = 0;
		((SkillDef)val).requiredStock = 0;
		((SkillDef)val).stockToConsume = 0;
		((SkillDef)val).icon = Assets.MainAssetBundle.LoadAsset<Sprite>(spriteName);
		((SkillDef)val).skillDescriptionToken = "DBZ_KICHARGE_DESCRIPTION";
		((SkillDef)val).skillName = "DBZ_KICHARGE_NAME";
		((SkillDef)val).skillNameToken = "DBZ_KICHARGE_NAME";
		val.isKiCharge = true;
		ContentAddition.AddSkillDef((SkillDef)(object)val);
		skillLocator.utility = ((Component)skillLocator).gameObject.AddComponent<GenericSkill>();
		SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
		val2.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)skillLocator.utility, "_skillFamily", val2);
		SkillFamily skillFamily = skillLocator.utility.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val3 = new Variant
		{
			skillDef = (SkillDef)(object)val
		};
		((Variant)(ref val3)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null);
		variants[0] = val3;
		ContentAddition.AddSkillFamily(skillFamily);
	}

	private static void AddSpecial(string survivorNameKey, SkillLocator skillLocator, string nameKey, string Name, string descriptionKey, string Description, SerializableEntityStateType state, string spriteName = "special")
	{
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0132: Unknown result type (might be due to invalid IL or missing references)
		//IL_014a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0154: Expected O, but got Unknown
		//IL_0155: Unknown result type (might be due to invalid IL or missing references)
		//IL_0156: Unknown result type (might be due to invalid IL or missing references)
		LanguageAPI.Add(survivorNameKey + nameKey, Name);
		LanguageAPI.Add(survivorNameKey + descriptionKey, Description);
		DBZSkillDef val = ScriptableObject.CreateInstance<DBZSkillDef>();
		((SkillDef)val).activationStateMachineName = "NoMovement";
		((SkillDef)val).activationState = state;
		((SkillDef)val).baseMaxStock = 1;
		((SkillDef)val).baseRechargeInterval = 12f;
		((SkillDef)val).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)val).canceledFromSprinting = false;
		((SkillDef)val).fullRestockOnAssign = true;
		((SkillDef)val).interruptPriority = (InterruptPriority)0;
		((SkillDef)val).isCombatSkill = true;
		((SkillDef)val).mustKeyPress = false;
		((SkillDef)val).cancelSprintingOnActivation = true;
		((SkillDef)val).rechargeStock = 1;
		((SkillDef)val).requiredStock = 1;
		((SkillDef)val).stockToConsume = 1;
		((SkillDef)val).icon = Assets.MainAssetBundle.LoadAsset<Sprite>(spriteName);
		((SkillDef)val).skillDescriptionToken = survivorNameKey + descriptionKey;
		((SkillDef)val).skillName = survivorNameKey + nameKey;
		((SkillDef)val).skillNameToken = survivorNameKey + nameKey;
		val.kiCost = 0.55f;
		((SkillDef)val).keywordTokens = val.newKeywordTokens;
		ContentAddition.AddSkillDef((SkillDef)(object)val);
		skillLocator.special = ((Component)skillLocator).gameObject.AddComponent<GenericSkill>();
		SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
		val2.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)skillLocator.special, "_skillFamily", val2);
		SkillFamily skillFamily = skillLocator.special.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val3 = new Variant
		{
			skillDef = (SkillDef)(object)val
		};
		((Variant)(ref val3)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null);
		variants[0] = val3;
		ContentAddition.AddSkillFamily(skillFamily);
	}
}
internal class DashState2h : DashState1h
{
	public override void FixedUpdate()
	{
		base.FixedUpdate();
		if (Object.op_Implicit((Object)(object)((BaseDBZSkillState)this).eventBehaviour) && ((BaseDBZSkillState)this).eventBehaviour.nextState)
		{
			((BaseDBZSkillState)this).eventBehaviour.nextState = false;
			if (((EntityState)this).isAuthority)
			{
				SetState();
			}
		}
	}

	protected override void SetState()
	{
		((EntityState)this).outer.SetNextState((EntityState)(object)new DashDealKamehamehaFireState());
	}
}
internal class DashDealKamehamehaFireState : DualKamehamehaFireState
{
	public override void OnEnter()
	{
		((BeamFire)this).damageCoefficient = 0.9f;
		((EntityState)this).GetComponent<DBZSkillBehaviour>().float1 = ((BeamFire)this).damageCoefficient;
		((DualKamehamehaFireState)this).OnEnter();
	}
}
internal class DashState1h : BaseDBZSkillState
{
	private float duration = 1.8f;

	private Vector3 blinkVector = Vector3.zero;

	private float speedCoefficient = 400f;

	private bool canTP;

	protected virtual void PlayAnimation()
	{
		((EntityState)this).PlayAnimation("FullBody, Override", "Beam1h", "M2", duration);
	}

	public override void OnEnter()
	{
		//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_00a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
		((BaseDBZSkillState)this).OnEnter();
		base.skillBehaviour.aimRay = ((BaseState)this).GetAimRay();
		((BaseDBZSkillState)this).AdjustModelForwardAimVector();
		if (Object.op_Implicit((Object)(object)base.animator))
		{
			base.animator.SetBool("beamOver", false);
		}
		PlayAnimation();
		if (Object.op_Implicit((Object)(object)base.eventBehaviour))
		{
			base.eventBehaviour.dashCount = 0;
			base.eventBehaviour.stopDash = false;
		}
		if (Object.op_Implicit((Object)(object)base.skillBehaviour) && Object.op_Implicit((Object)(object)base.kiBehaviour))
		{
			base.skillBehaviour.SetExecutableSkills(1);
			base.skillBehaviour.aimRay = ((BaseState)this).GetAimRay();
			blinkVector = ((EntityState)this).characterDirection.moveVector;
		}
	}

	protected virtual void SetState()
	{
		((EntityState)this).outer.SetNextState((EntityState)(object)new ChargeDashKamehameha());
	}

	public override void FixedUpdate()
	{
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_00ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0106: Unknown result type (might be due to invalid IL or missing references)
		//IL_010b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0155: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0166: Unknown result type (might be due to invalid IL or missing references)
		//IL_016c: Unknown result type (might be due to invalid IL or missing references)
		//IL_017d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0182: Unknown result type (might be due to invalid IL or missing references)
		//IL_0187: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if (!Object.op_Implicit((Object)(object)base.eventBehaviour))
		{
			return;
		}
		if (base.eventBehaviour.dashCount > 0 && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
		{
			DBZSkillEventHandler eventBehaviour = base.eventBehaviour;
			eventBehaviour.dashCount--;
			RaycastHit val = default(RaycastHit);
			canTP = Physics.Raycast(((EntityState)this).characterBody.corePosition, -((EntityState)this).characterDirection.forward, ref val, 18f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask));
			AkSoundEngine.PostEvent(Sounds.Play_DBZ_Common_Shunpo, ((EntityState)this).gameObject);
			EffectManager.SimpleEffect(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Brother/BrotherDashEffect.prefab").WaitForCompletion(), ((EntityState)this).characterBody.footPosition, Quaternion.identity, false);
			if (!canTP && ((EntityState)this).isAuthority)
			{
				TeleportHelper.TeleportBody(((EntityState)this).characterBody, ((EntityState)this).characterBody.footPosition + -((EntityState)this).characterDirection.forward * 18f);
			}
		}
		if (!base.eventBehaviour.stopDash)
		{
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterMotor.velocity = Vector3.zero;
				CharacterMotor characterMotor = ((EntityState)this).characterMotor;
				characterMotor.rootMotion += blinkVector * (speedCoefficient * Time.fixedDeltaTime);
			}
		}
		else
		{
			SetState();
		}
	}
}
internal class ChargeDashKamehameha : BaseKamehamehaState
{
	public override void OnEnter()
	{
		((BeamBaseState)this).damageCoefficient = 0.9f;
		((BaseKamehamehaState)this).OnEnter();
		((BaseDBZSkillState)this).animator.SetBool("chargeOver", false);
	}

	public override void OnExit()
	{
		((BeamBaseState)this).OnExit();
		((BaseDBZSkillState)this).animator.SetBool("chargeOver", true);
	}

	protected override void SetState()
	{
		((EntityState)this).outer.SetNextState((EntityState)(object)new FireDashKamehameha());
	}

	protected override void PlayAnimation()
	{
	}
}
internal class FireDashKamehameha : KamehamehaFireState
{
	public override void OnEnter()
	{
		((BeamFire)this).beamMuzzle = "beamMuzzle1h";
		((BeamFire)this).beamRadius = 2f;
		((KamehamehaFireState)this).OnEnter();
	}
}
internal class KiBlast : BaseKiBlastState
{
	public override void OnEnter()
	{
		DBZSkillBehaviour component = ((EntityState)this).GetComponent<DBZSkillBehaviour>();
		component.bool1 = !component.bool1;
		if (component.bool1)
		{
			base.animName = "KiBlastR";
			base.muzzleString = "muzzleHandR";
		}
		else
		{
			base.animName = "KiBlastL";
			base.muzzleString = "muzzleHandL";
		}
		((BaseKiBlastState)this).OnEnter();
	}
}
internal class RayBlast : BaseKiBlastState
{
	private int count = 16;

	public override void OnEnter()
	{
		base.chargeID = Sounds.Play_DBZ_Common_RayBlast_Impact;
		base.fireID = 0u;
		base.muzzleFlashPrefab = Prefabs.KiBlastMuzzleFlashRed;
		base.muzzleString = "muzzleHnadL";
		base.baseDamageCoefficient = 1.5f;
		((BaseKiBlastState)this).OnEnter();
	}

	protected override void Fire()
	{
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Expected O, but got Unknown
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_008f: Expected O, but got Unknown
		//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ed: 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_0130: Unknown result type (might be due to invalid IL or missing references)
		//IL_013b: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0142: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		//IL_0149: Unknown result type (might be due to invalid IL or missing references)
		//IL_0150: Unknown result type (might be due to invalid IL or missing references)
		//IL_0155: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0163: Expected O, but got Unknown
		if (Object.op_Implicit((Object)(object)base.target))
		{
			int num = 0;
			while (num < count)
			{
				num++;
				EffectData val = new EffectData
				{
					origin = ((BaseState)this).FindModelChild("muzzleHandL").position,
					genericFloat = 0.35f
				};
				val.SetHurtBoxReference(base.target);
				EffectManager.SpawnEffect(Prefabs.rayBlastEffect, val, true);
			}
			EffectData val2 = new EffectData
			{
				origin = base.target.GetComponent<CharacterBody>().corePosition
			};
			val2.SetHurtBoxReference(base.target);
			EffectManager.SpawnEffect(Prefabs.rayBlastImpactEffect, val2, false);
			HealthComponent component = base.target.GetComponent<HealthComponent>();
			if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.body) && NetworkServer.active)
			{
				DamageInfo val3 = new DamageInfo
				{
					attacker = ((EntityState)this).gameObject,
					inflictor = ((EntityState)this).gameObject,
					damage = ((EntityState)this).characterBody.damage * base.baseDamageCoefficient * (float)Mathf.Clamp(((EntityState)this).characterBody.inventory.GetItemCount(Items.SecondarySkillMagazine), 1, 99),
					procCoefficient = 0f,
					damageType = (DamageType)0,
					damageColorIndex = (DamageColorIndex)0,
					position = component.body.corePosition,
					rejected = false
				};
				component.TakeDamage(val3);
			}
		}
	}
}
internal class FinalDualKamehameha : DualKamehamehaBaseState
{
	private bool canPlay;

	private float stopwatch;

	protected override void PlayChargeVFX()
	{
	}

	protected override void PlaySound()
	{
	}

	public override void OnEnter()
	{
		base.baseDamageCoefficient = 0.8f;
		((DualKamehamehaBaseState)this).OnEnter();
	}

	public override void FixedUpdate()
	{
		((DualKamehamehaBaseState)this).FixedUpdate();
		if (Object.op_Implicit((Object)(object)((BaseDBZSkillState)this).eventBehaviour) && ((BaseDBZSkillState)this).eventBehaviour.charge)
		{
			((BaseDBZSkillState)this).eventBehaviour.charge = false;
			canPlay = true;
			EffectManager.SimpleMuzzleFlash(Prefabs.chargeFXCyan, ((EntityState)this).gameObject, "muzzleHandR", false);
			EffectManager.SimpleMuzzleFlash(Prefabs.chargeFXCyan, ((EntityState)this).gameObject, "muzzleHandL", false);
			AkSoundEngine.PostEvent(((BeamBaseState)this).chargeSFX, ((EntityState)this).gameObject);
		}
		if (canPlay)
		{
			stopwatch += Time.fixedDeltaTime;
			if (stopwatch >= 0.05f)
			{
				canPlay = false;
				AkSoundEngine.PostEvent(((BeamBaseState)this).chargeSFX, ((EntityState)this).gameObject);
			}
		}
	}
}
internal class BeastKamehameha : Kamehameha100XChargeState
{
	protected override bool ButtonReleased()
	{
		return false;
	}
}
internal class PopoSuccOrb : Orb
{
	public float speed;

	public override void Begin()
	{
		//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_001c: 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_0034: Expected O, but got Unknown
		((Orb)this).duration = ((Orb)this).distanceToTarget / speed;
		EffectData val = new EffectData
		{
			origin = base.origin,
			genericFloat = ((Orb)this).duration
		};
		val.SetHurtBoxReference(base.target);
		EffectManager.SpawnEffect(Prefabs.popoSuccEffect, val, true);
	}

	public override void OnArrival()
	{
		if (Object.op_Implicit((Object)(object)base.target) && Object.op_Implicit((Object)(object)base.target.healthComponent))
		{
			KiBehaviour component = ((Component)base.target.healthComponent).gameObject.GetComponent<KiBehaviour>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.AddKi(0.05f);
				AkSoundEngine.PostEvent(Sounds.Play_DBZ_Common_Consume, ((Component)base.target.healthComponent).gameObject);
			}
		}
	}
}
internal class PopoSuccBehaviour : MonoBehaviour
{
	private CharacterBody body;

	private float stopwatch;

	private float maxDistance = 10f;

	private float delay => 1f / Mathf.Clamp(Mathf.Clamp(Object.op_Implicit((Object)(object)body) ? body.level : 1f, 1f, 30f) / 6f, 1f, 5f);

	private void OnEnable()
	{
		body = ((Component)this).GetComponent<CharacterBody>();
	}

	private void FixedUpdate()
	{
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_0132: Unknown result type (might be due to invalid IL or missing references)
		//IL_0137: Unknown result type (might be due to invalid IL or missing references)
		//IL_014b: Unknown result type (might be due to invalid IL or missing references)
		//IL_014d: Unknown result type (might be due to invalid IL or missing references)
		stopwatch += Time.fixedDeltaTime;
		if (!(stopwatch >= delay))
		{
			return;
		}
		Vector3 val = (Object.op_Implicit((Object)(object)body) ? body.corePosition : ((Component)this).transform.position);
		TeamIndex val2 = (TeamIndex)((!Object.op_Implicit((Object)(object)body)) ? 1 : ((int)body.teamComponent.teamIndex));
		List<ProjectileController> instancesList = InstanceTracker.GetInstancesList<ProjectileController>();
		List<ProjectileController> list = new List<ProjectileController>();
		int i = 0;
		for (int count = instancesList.Count; i < count; i++)
		{
			ProjectileController val3 = instancesList[i];
			if (!val3.cannotBeDeleted && val3.teamFilter.teamIndex != val2 && Vector3.Distance(((Component)val3).transform.position, val) <= maxDistance)
			{
				list.Add(val3);
			}
		}
		int j = 0;
		for (int count2 = list.Count; j < count2; j++)
		{
			ProjectileController val4 = list[j];
			if (Object.op_Implicit((Object)(object)val4))
			{
				stopwatch = 0f;
				Vector3 position = ((Component)val4).transform.position;
				if (NetworkServer.active)
				{
					PopoSuccOrb popoSuccOrb = new PopoSuccOrb
					{
						origin = position,
						target = (Object.op_Implicit((Object)(object)body) ? body.mainHurtBox : null),
						speed = 25f
					};
					OrbManager.instance.AddOrb((Orb)(object)popoSuccOrb);
				}
				Object.Destroy((Object)(object)((Component)val4).gameObject);
				break;
			}
		}
	}
}
internal class Prefabs
{
	internal static GameObject getBlackEffect;

	internal static void CreatePrefabs()
	{
		//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_00dc: Unknown result type (might be due to invalid IL or missing references)
		getBlackEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathBombGhost.prefab").WaitForCompletion(), "GetBlack", false);
		Object.Destroy((Object)(object)getBlackEffect.GetComponent<ShakeEmitter>());
		Object.Destroy((Object)(object)getBlackEffect.GetComponent<ProjectileGhostController>());
		ParticleSystemRenderer[] componentsInChildren = getBlackEffect.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val in componentsInChildren)
		{
			string name = ((Object)val).name;
			switch (name)
			{
			default:
				if (!(name == "Vacuum Stars, Distortion"))
				{
					continue;
				}
				break;
			case "Vacuum Stars":
			case "Vacuum Stars, Trails":
			case "Vacuum Radial":
				break;
			}
			Object.Destroy((Object)(object)((Component)val).gameObject);
		}
		Light componentInChildren = getBlackEffect.GetComponentInChildren<Light>();
		((Component)componentInChildren).transform.position = new Vector3(0f, 1f, 0f);
		componentInChildren.range = 99999f;
		Utils.RegisterEffect(getBlackEffect, 3f, "", true, true);
	}
}
internal class Sounds
{
	public static readonly uint Sound;
}
internal class GetBlack : BaseDBZSkillState
{
	private float duration = 0.7f;

	private bool gotBlack;

	public override void OnEnter()
	{
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		((BaseDBZSkillState)this).OnEnter();
		base.animator.SetBool("beamOver", false);
		((EntityState)this).PlayAnimation("FullBody, Override", "Loop 0");
		Object.Destroy((Object)(object)((Component)((EntityState)this).GetModelTransform()).GetComponent<CharacterModel>());
		SkinnedMeshRenderer[] componentsInChildren = ((Component)((EntityState)this).GetModelTransform()).GetComponentsInChildren<SkinnedMeshRenderer>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			((Renderer)componentsInChildren[i]).material.shader = Addressables.LoadAssetAsync<Shader>((object)"RoR2/Base/Shaders/HGStandard.shader").WaitForCompletion();
			((Renderer)componentsInChildren[i]).material.shaderKeywords = null;
		}
	}

	public override void FixedUpdate()
	{
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).fixedAge >= duration && !gotBlack)
		{
			base.animator.SetBool("beamOver", true);
			EffectManager.SimpleMuzzleFlash(Prefabs.getBlackEffect, ((EntityState)this).gameObject, "muzzleHandL", false);
			gotBlack = true;
		}
	}
}