Decompiled source of Frieza v1.0.4

Frieza.dll

Decompiled 2 weeks 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 EntityStates.Commando;
using R2API;
using R2API.Utils;
using RoR2;
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.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Frieza")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Frieza")]
[assembly: AssemblyTitle("Frieza")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Frieza;

internal class Assets
{
	public static AssetBundle MainAssetBundle;

	public static void PopulateAssets()
	{
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Frieza.friezaassets");
			MainAssetBundle = AssetBundle.LoadFromStream(stream);
		}
		using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Frieza.Frieza.bnk");
		byte[] array = new byte[stream2.Length];
		stream2.Read(array, 0, array.Length);
		SoundBanks.Add(array);
	}
}
internal class Hook
{
	internal static void Hooks()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
	}

	internal static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
	{
	}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.DragonyckFrieza", "Frieza", "1.0.4")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
public class MainPlugin : BaseUnityPlugin
{
	public const string MODUID = "com.DragonyckFrieza";

	public const string MODNAME = "Frieza";

	public const string VERSION = "1.0.4";

	public const string SURVIVORNAME = "Frieza";

	public const string SURVIVORNAMEKEY = "FRIEZA";

	public const string SURVIVORNAME2 = "Frieza (2nd Form)";

	public const string SURVIVORNAMEKEY2 = "FRIEZA2";

	public const string SURVIVORNAME3 = "Frieza (3rd Form)";

	public const string SURVIVORNAMEKEY3 = "FRIEZA3";

	public const string SURVIVORNAME4 = "Frieza (Final Form)";

	public const string SURVIVORNAMEKEY4 = "FRIEZA4";

	public const string SURVIVORNAME5 = "Frieza (Full Power)";

	public const string SURVIVORNAMEKEY5 = "FRIEZA5";

	public const string SURVIVORNAME4G = "Frieza (Golden)";

	public const string SURVIVORNAMEKEY4G = "FRIEZA4G";

	public const string SURVIVORNAME4B = "Frieza (Black)";

	public const string SURVIVORNAMEKEY4B = "FRIEZA4B";

	private static List<string> powerupBodyList = new List<string> { "FriezaBody", "Frieza (2nd Form)Body", "Frieza (3rd Form)Body", "Frieza (Final Form)Body", "Frieza (Full Power)Body", "Frieza (Golden)Body", "Frieza (Black)Body" };

	private void Awake()
	{
		Assets.PopulateAssets();
		Prefabs.CreatePrefabs();
		RegisterStates();
		CreateSurvivor();
		CreatePowerupSurvivor("fr2", "Frieza (2nd Form)", "FRIEZA2", 2f);
		CreatePowerupSurvivor("fr3", "Frieza (3rd Form)", "FRIEZA3", 3f);
		CreatePowerupSurvivor("fr4", "Frieza (Final Form)", "FRIEZA4", 4f);
		CreatePowerupSurvivor("fr5", "Frieza (Full Power)", "FRIEZA5", 5f);
		CreatePowerupSurvivor("fr4G", "Frieza (Golden)", "FRIEZA4G", 6f);
		CreatePowerupSurvivor("fr4B", "Frieza (Black)", "FRIEZA4B", 7f);
		Hook.Hooks();
	}

	internal static void CreateSurvivor()
	{
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_017a: Unknown result type (might be due to invalid IL or missing references)
		//IL_01be: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0204: Unknown result type (might be due to invalid IL or missing references)
		//IL_022f: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d8: 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_030a: Unknown result type (might be due to invalid IL or missing references)
		//IL_031f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0329: Expected O, but got Unknown
		//IL_0329: 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_0378: Unknown result type (might be due to invalid IL or missing references)
		//IL_038d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0397: Expected O, but got Unknown
		//IL_0397: Expected O, but got Unknown
		//IL_03af: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ce: Expected O, but got Unknown
		//IL_03ce: Expected O, but got Unknown
		//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_03fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0405: Expected O, but got Unknown
		//IL_0405: Expected O, but got Unknown
		//IL_041d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0432: Unknown result type (might be due to invalid IL or missing references)
		//IL_043c: Expected O, but got Unknown
		//IL_043c: Expected O, but got Unknown
		//IL_0454: Unknown result type (might be due to invalid IL or missing references)
		//IL_0469: Unknown result type (might be due to invalid IL or missing references)
		//IL_0473: Expected O, but got Unknown
		//IL_0473: Expected O, but got Unknown
		//IL_048b: Unknown result type (might be due to invalid IL or missing references)
		//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_04aa: Expected O, but got Unknown
		//IL_04aa: Expected O, but got Unknown
		//IL_04c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_04e1: Expected O, but got Unknown
		//IL_04e1: Expected O, but got Unknown
		//IL_04f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_050e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0518: Expected O, but got Unknown
		//IL_0518: Expected O, but got Unknown
		//IL_0530: 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_0567: Unknown result type (might be due to invalid IL or missing references)
		//IL_057c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0586: Expected O, but got Unknown
		//IL_0586: Expected O, but got Unknown
		//IL_059e: Unknown result type (might be due to invalid IL or missing references)
		//IL_05b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_05bd: Expected O, but got Unknown
		//IL_05bd: Expected O, but got Unknown
		//IL_05d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_05ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_05f4: Expected O, but got Unknown
		//IL_05f4: Expected O, but got Unknown
		//IL_060c: Unknown result type (might be due to invalid IL or missing references)
		//IL_061e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0628: Expected O, but got Unknown
		//IL_0628: Expected O, but got Unknown
		//IL_0640: Unknown result type (might be due to invalid IL or missing references)
		//IL_0655: Unknown result type (might be due to invalid IL or missing references)
		//IL_065f: Expected O, but got Unknown
		//IL_065f: Expected O, but got Unknown
		//IL_0669: Unknown result type (might be due to invalid IL or missing references)
		//IL_066b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0692: Unknown result type (might be due to invalid IL or missing references)
		//IL_0697: Unknown result type (might be due to invalid IL or missing references)
		//IL_0749: Unknown result type (might be due to invalid IL or missing references)
		//IL_074e: Unknown result type (might be due to invalid IL or missing references)
		//IL_077e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0795: Unknown result type (might be due to invalid IL or missing references)
		//IL_079a: Unknown result type (might be due to invalid IL or missing references)
		//IL_07b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_07b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_07ba: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>("frieza");
		ChildLocator component = val.GetComponent<ChildLocator>();
		component.FindChild("base").localPosition = new Vector3(0.3f, 0f, -0.3f);
		SurvivorDef val2 = default(SurvivorDef);
		CharacterBody val3 = DBZSurvivors.SetupNewDBZSurvivor(val, "Frieza", ref val2);
		((Object)val3).name = "FriezaBody";
		val3.baseNameToken = "FRIEZA_NAME";
		val3.subtitleNameToken = "FRIEZA_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 = 1;
		val3.sprintingSpeedMultiplier = 1.45f;
		val3.wasLucky = false;
		val3.hideCrosshair = false;
		val3.hullClassification = (HullClassification)0;
		val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait").texture;
		val3.isChampion = false;
		val3.currentVehicle = null;
		val3.skinIndex = 0u;
		val3.bodyColor = new Color(0.63922f, 0.72157f, 0.09804f);
		val3.aimOriginTransform.localPosition = new Vector3(0f, 1f, 0f);
		val.GetComponent<CharacterModel>().body = val3;
		val.transform.localScale = Vector3.one * 1.7f;
		((Component)val3).GetComponent<ModelLocator>().modelBaseTransform.GetChild(0).localPosition = new Vector3(0f, 1.5f, 0f);
		ConfigFile val4 = Utils.CreateConfig(val3);
		KiBehaviour component2 = ((Component)val3).GetComponent<KiBehaviour>();
		component2.hasPowerup = true;
		((Component)val3).GetComponent<DBZSkillBehaviour>().baseSecondaryCost = 0.05f;
		DBZSurvivorDef val5 = ScriptableObject.CreateInstance<DBZSurvivorDef>();
		val5.attackVO = Sounds.Play_Frieza_ATK;
		val5.bossEncounterVO = Sounds.Play_Frieza_Encounter;
		val5.bossKillVO = Sounds.Play_Frieza_BossKill;
		val5.heavyHitVO = Sounds.Play_Frieza_HeavyDMG;
		val5.killVO = Sounds.Play_Frieza_Kill;
		val5.lightHitVO = Sounds.Play_Frieza_DMG;
		val5.skillVO = Sounds.Play_Frieza_Skill;
		val5.deathVO = Sounds.Play_Frieza_Death;
		val5.powerupVO = Sounds.Play_Frieza_Powerup;
		val5.vfxColor = (VFXColor)3;
		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 component3 = ((Component)val3).GetComponent<EntityStateMachine>();
		component3.mainStateType = new SerializableEntityStateType(typeof(DBZCharacterMain));
		string text = "<style=cSub>\r\n\r\n< ! > A glorious emperor and conqueror who believes he is above all lifeforms." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Like all characters in Dragonball, he can fly, it will cost Ki however." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Keep an eye on your Ki as you need it for most moves.  Use your melee or Ki Charge to replenish it." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > With his Golden and Black transformations, you can gain massive powerboosts as you fill up the transformation bar." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Fill up your transformation bar by beating enemies, using skills, and playing the game in general.";
		string text2 = "..and so he left, ready to conquer another planet.";
		string text3 = "..and so he vanished, sent back to Hell once more.";
		LanguageAPI.Add("FRIEZA_NAME", "Frieza");
		LanguageAPI.Add("FRIEZA_DESCRIPTION", text);
		LanguageAPI.Add("FRIEZA_SUBTITLE", "");
		LanguageAPI.Add("FRIEZA_OUTRO", text2);
		LanguageAPI.Add("FRIEZA_FAIL", text3);
		val2.primaryColor = val3.bodyColor;
		val2.desiredSortPosition = 14f;
		SkillSetup(((Component)val3).gameObject);
		AddHitBoxes(val.transform);
		DBZSurvivors.survivorSceneProps.Add(val, new TransformMemory
		{
			position = new Vector3(0.73f, 1.157f, 11.4f),
			rotation = Quaternion.Euler(0f, 345f, 0f)
		});
	}

	internal static void CreatePowerupSurvivor(string modelName, string survivorName, string survivorNameKey, float statMultValue)
	{
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Expected O, but got Unknown
		//IL_0072: Expected O, but got Unknown
		//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0201: Unknown result type (might be due to invalid IL or missing references)
		//IL_021b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0280: Unknown result type (might be due to invalid IL or missing references)
		//IL_0285: Unknown result type (might be due to invalid IL or missing references)
		//IL_0296: Unknown result type (might be due to invalid IL or missing references)
		//IL_029b: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0334: Unknown result type (might be due to invalid IL or missing references)
		//IL_0352: Unknown result type (might be due to invalid IL or missing references)
		//IL_0366: Unknown result type (might be due to invalid IL or missing references)
		//IL_037b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0385: Expected O, but got Unknown
		//IL_0385: Expected O, but got Unknown
		//IL_039d: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_03bc: Expected O, but got Unknown
		//IL_03bc: Expected O, but got Unknown
		//IL_03d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_03e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_03f3: Expected O, but got Unknown
		//IL_03f3: Expected O, but got Unknown
		//IL_040b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0420: Unknown result type (might be due to invalid IL or missing references)
		//IL_042a: Expected O, but got Unknown
		//IL_042a: Expected O, but got Unknown
		//IL_0442: Unknown result type (might be due to invalid IL or missing references)
		//IL_0457: Unknown result type (might be due to invalid IL or missing references)
		//IL_0461: Expected O, but got Unknown
		//IL_0461: Expected O, but got Unknown
		//IL_0479: Unknown result type (might be due to invalid IL or missing references)
		//IL_048e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0498: Expected O, but got Unknown
		//IL_0498: Expected O, but got Unknown
		//IL_04b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_04cf: Expected O, but got Unknown
		//IL_04cf: Expected O, but got Unknown
		//IL_04e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_04fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0506: Expected O, but got Unknown
		//IL_0506: Expected O, but got Unknown
		//IL_051e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0533: Unknown result type (might be due to invalid IL or missing references)
		//IL_053d: Expected O, but got Unknown
		//IL_053d: Expected O, but got Unknown
		//IL_0555: Unknown result type (might be due to invalid IL or missing references)
		//IL_056a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0574: Expected O, but got Unknown
		//IL_0574: Expected O, but got Unknown
		//IL_058c: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_05ab: Expected O, but got Unknown
		//IL_05ab: Expected O, but got Unknown
		//IL_05c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_05e2: Expected O, but got Unknown
		//IL_05e2: Expected O, but got Unknown
		//IL_05fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_060f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0619: Expected O, but got Unknown
		//IL_0619: Expected O, but got Unknown
		//IL_0631: Unknown result type (might be due to invalid IL or missing references)
		//IL_0646: Unknown result type (might be due to invalid IL or missing references)
		//IL_0650: Expected O, but got Unknown
		//IL_0650: Expected O, but got Unknown
		//IL_0668: Unknown result type (might be due to invalid IL or missing references)
		//IL_067a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0684: Expected O, but got Unknown
		//IL_0684: Expected O, but got Unknown
		//IL_069c: Unknown result type (might be due to invalid IL or missing references)
		//IL_06b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_06bb: Expected O, but got Unknown
		//IL_06bb: Expected O, but got Unknown
		//IL_06c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_074c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0756: Unknown result type (might be due to invalid IL or missing references)
		//IL_0781: Unknown result type (might be due to invalid IL or missing references)
		//IL_0797: Unknown result type (might be due to invalid IL or missing references)
		//IL_079c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b09: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b0e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b20: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b31: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b3b: Expected O, but got Unknown
		//IL_0b3b: Expected O, but got Unknown
		//IL_07da: Unknown result type (might be due to invalid IL or missing references)
		//IL_07e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_080f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0825: Unknown result type (might be due to invalid IL or missing references)
		//IL_082a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0868: Unknown result type (might be due to invalid IL or missing references)
		//IL_0872: Unknown result type (might be due to invalid IL or missing references)
		//IL_089d: Unknown result type (might be due to invalid IL or missing references)
		//IL_08d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_08e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_090d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0948: Unknown result type (might be due to invalid IL or missing references)
		//IL_0952: Unknown result type (might be due to invalid IL or missing references)
		//IL_097d: Unknown result type (might be due to invalid IL or missing references)
		//IL_098b: Unknown result type (might be due to invalid IL or missing references)
		//IL_09d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_09da: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a05: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a13: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>(modelName);
		ChildLocator component = val.GetComponent<ChildLocator>();
		component.FindChild("base").localPosition = new Vector3(0.3f, 0f, -0.3f);
		SurvivorDef val2 = default(SurvivorDef);
		CharacterBody val3 = DBZSurvivors.SetupNewDBZSurvivor(val, survivorName, ref val2);
		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 = 1;
		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.63922f, 0.72157f, 0.09804f);
		val3.aimOriginTransform.localPosition = new Vector3(0f, 1f, 0f);
		KiBehaviour component2 = ((Component)val3).GetComponent<KiBehaviour>();
		component2.hasPowerup = true;
		component2.maxKiValue = 1f * value;
		component2.passiveRegenValue = 0.02f * value;
		component2.passiveRegen = true;
		((Component)val3).GetComponent<DBZSkillBehaviour>().baseSecondaryCost = 0.05f;
		EntityStateMachine component3 = ((Component)val3).GetComponent<EntityStateMachine>();
		component3.initialStateType = new SerializableEntityStateType(typeof(BasePowerupSpawnState));
		component3.mainStateType = new SerializableEntityStateType(typeof(DBZCharacterMain));
		CharacterDeathBehavior component4 = ((Component)val3).GetComponent<CharacterDeathBehavior>();
		component4.deathState = new SerializableEntityStateType(typeof(DeathState));
		DBZSurvivorDef val5 = ScriptableObject.CreateInstance<DBZSurvivorDef>();
		val5.attackVO = Sounds.Play_Frieza_ATK;
		val5.bossEncounterVO = Sounds.Play_Frieza_Encounter;
		val5.bossKillVO = Sounds.Play_Frieza_BossKill;
		val5.heavyHitVO = Sounds.Play_Frieza_HeavyDMG;
		val5.killVO = Sounds.Play_Frieza_Kill;
		val5.lightHitVO = Sounds.Play_Frieza_DMG;
		val5.skillVO = Sounds.Play_Frieza_Skill;
		val5.deathVO = Sounds.Play_Frieza_Death;
		val5.powerupVO = Sounds.Play_Frieza_Powerup;
		val5.vfxColor = (VFXColor)3;
		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
		};
		switch (survivorName)
		{
		case "Frieza (2nd Form)":
			val2.desiredSortPosition = 14.1f;
			val.transform.localScale = Vector3.one * 2.5f;
			((Component)val3).GetComponent<ModelLocator>().modelBaseTransform.GetChild(0).localPosition = new Vector3(0f, 2.2f, 0f);
			((Component)val3).GetComponent<CameraTargetParams>().cameraParams = Addressables.LoadAssetAsync<CharacterCameraParams>((object)"RoR2/Base/Common/ccpStandardMelee.asset").WaitForCompletion();
			val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait2").texture;
			break;
		case "Frieza (3rd Form)":
			val2.desiredSortPosition = 14.2f;
			val.transform.localScale = Vector3.one * 2.5f;
			((Component)val3).GetComponent<ModelLocator>().modelBaseTransform.GetChild(0).localPosition = new Vector3(0f, 2.2f, 0f);
			((Component)val3).GetComponent<CameraTargetParams>().cameraParams = Addressables.LoadAssetAsync<CharacterCameraParams>((object)"RoR2/Base/Common/ccpStandardMelee.asset").WaitForCompletion();
			val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait3").texture;
			break;
		case "Frieza (Final Form)":
			val2.desiredSortPosition = 14.3f;
			val.transform.localScale = Vector3.one * 1.7f;
			((Component)val3).GetComponent<ModelLocator>().modelBaseTransform.GetChild(0).localPosition = new Vector3(0f, 1.5f, 0f);
			val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait4").texture;
			break;
		case "Frieza (Full Power)":
			val2.desiredSortPosition = 14.4f;
			val.transform.localScale = Vector3.one * 1.85f;
			((Component)val3).GetComponent<ModelLocator>().modelBaseTransform.GetChild(0).localPosition = new Vector3(0f, 1.7f, 0f);
			val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait5").texture;
			break;
		case "Frieza (Golden)":
			val2.desiredSortPosition = 14.5f;
			val.transform.localScale = Vector3.one * 1.7f;
			((Component)val3).GetComponent<ModelLocator>().modelBaseTransform.GetChild(0).localPosition = new Vector3(0f, 1.5f, 0f);
			val5.vfxColor = (VFXColor)4;
			val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait4g").texture;
			break;
		case "Frieza (Black)":
			val2.desiredSortPosition = 14.6f;
			component2.hasPowerup = false;
			val5.powerupBodyList = null;
			val.transform.localScale = Vector3.one * 1.7f;
			((Component)val3).GetComponent<ModelLocator>().modelBaseTransform.GetChild(0).localPosition = new Vector3(0f, 1.5f, 0f);
			val5.vfxColor = (VFXColor)6;
			val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait4b").texture;
			break;
		}
		DBZSurvivorCatalog.AddDBZSurvivorDef(val3.baseNameToken, val5);
		string text = "<style=cSub>\r\n\r\n< ! > A glorious emperor and conqueror who believes he is above all lifeforms." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Like all characters in Dragonball, he can fly, it will cost Ki however." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Keep an eye on your Ki as you need it for most moves.  Use your melee or Ki Charge to replenish it." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > With his Golden and Black transformations, you can gain massive powerboosts as you fill up the transformation bar." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Fill up your transformation bar by beating enemies, using skills, and playing the game in general.";
		string text2 = "..and so he left, ready to conquer another planet.";
		string text3 = "..and so he vanished, sent back to Hell once more.";
		LanguageAPI.Add(survivorNameKey + "_NAME", survivorName);
		LanguageAPI.Add(survivorNameKey + "_DESCRIPTION", text);
		LanguageAPI.Add(survivorNameKey + "_SUBTITLE", "");
		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;
		SkillSetup(((Component)val3).gameObject);
		AddHitBoxes(val.transform);
	}

	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(3.5f, 3.5f, 3.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)
		bool flag = default(bool);
		ContentAddition.AddEntityState<Secondary>(ref flag);
		ContentAddition.AddEntityState<SecondaryAlt>(ref flag);
		ContentAddition.AddEntityState<Special>(ref flag);
		ContentAddition.AddEntityState<SpecialAlt>(ref flag);
		LanguageAPI.Add("FRIEZA_M1", "Emperor's Fist");
		LanguageAPI.Add("FRIEZA_M2", "Ki Blast");
		LanguageAPI.Add("FRIEZA_M2_DESCRIPTION", "Fire rapid blasts of Ki for <style=cIsDamage>200%</style> damage.");
		LanguageAPI.Add("FRIEZAALT_M2", "Death Beam");
		LanguageAPI.Add("FRIEZAALT_M2_DESCRIPTION", "Fire a quick beam that pierces enemies for <style=cIsDamage>280%</style> damage.");
		LanguageAPI.Add("FRIEZA_SPEC", "Death Ball");
		LanguageAPI.Add("FRIEZA_SPEC_DESCRIPTION", "Launch a massive ball of energy that explodes on contact with an enemy for <style=cIsDamage>1400%</style> damage.");
		LanguageAPI.Add("FRIEZAALT_SPEC", "Death Slash");
		LanguageAPI.Add("FRIEZAALT_SPEC_DESCRIPTION", "Fires a fast, but short ranged, blade-shaped Ki Blast for <style=cIsDamage>900%</style> damage, and leaves a lingering field of damaging Ki along the path it traveled that deals <style=cIsDamage>1250%</style> damage.");
	}

	private static void SkillSetup(GameObject characterPrefab)
	{
		SkillDef switchSkillDef = null;
		SkillDef switchSkillDef2 = null;
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		AddPrimary(component);
		AddSecondary(component);
		AddUtility(component);
		AddSpecial(component, out switchSkillDef);
		AddSpecialAlt(component, out switchSkillDef2);
		SkillSwitchBehaviour val = characterPrefab.AddComponent<SkillSwitchBehaviour>();
		val.specialSkillDefList = new List<SkillDef> { switchSkillDef, switchSkillDef2 };
	}

	private static void AddPrimary(SkillLocator skillLocator)
	{
		//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_0106: Unknown result type (might be due to invalid IL or missing references)
		//IL_011e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0128: Expected O, but got Unknown
		//IL_0129: 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)
		DBZSkillDef val = ScriptableObject.CreateInstance<DBZSkillDef>();
		((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>("primary");
		((SkillDef)val).skillDescriptionToken = "DBZ_MELEE_SKILL_DESCRIPTION";
		((SkillDef)val).skillName = "FRIEZA_M1";
		((SkillDef)val).skillNameToken = "FRIEZA_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(SkillLocator skillLocator)
	{
		//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_011d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0135: Unknown result type (might be due to invalid IL or missing references)
		//IL_013f: Expected O, but got Unknown
		//IL_0140: Unknown result type (might be due to invalid IL or missing references)
		//IL_0141: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Unknown result type (might be due to invalid IL or missing references)
		//IL_016e: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0247: Unknown result type (might be due to invalid IL or missing references)
		//IL_025f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0269: Expected O, but got Unknown
		//IL_026a: Unknown result type (might be due to invalid IL or missing references)
		//IL_026b: Unknown result type (might be due to invalid IL or missing references)
		DBZSkillDef val = ScriptableObject.CreateInstance<DBZSkillDef>();
		((SkillDef)val).activationStateMachineName = "Slide";
		((SkillDef)val).activationState = new SerializableEntityStateType(typeof(Secondary));
		((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>("secondary");
		((SkillDef)val).skillDescriptionToken = "FRIEZA_M2_DESCRIPTION";
		((SkillDef)val).skillName = "FRIEZA_M2";
		((SkillDef)val).skillNameToken = "FRIEZA_M2";
		val.kiCost = 0.05f;
		((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);
		val = ScriptableObject.CreateInstance<DBZSkillDef>();
		((SkillDef)val).activationStateMachineName = "Slide";
		((SkillDef)val).activationState = new SerializableEntityStateType(typeof(SecondaryAlt));
		((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>("secondaryalt");
		((SkillDef)val).skillDescriptionToken = "FRIEZAALT_M2_DESCRIPTION";
		((SkillDef)val).skillName = "FRIEZAALT_M2";
		((SkillDef)val).skillNameToken = "FRIEZAALT_M2";
		val.kiCost = 0.05f;
		((SkillDef)val).keywordTokens = val.newKeywordTokens;
		ContentAddition.AddSkillDef((SkillDef)(object)val);
		Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
		Variant[] variants2 = skillFamily.variants;
		int num = skillFamily.variants.Length - 1;
		val3 = new Variant
		{
			skillDef = (SkillDef)(object)val
		};
		((Variant)(ref val3)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null);
		variants2[num] = val3;
	}

	private static void AddUtility(SkillLocator skillLocator)
	{
		//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_010d: 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_012f: Expected O, but got Unknown
		//IL_0130: 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)
		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>("utility");
		((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(SkillLocator skillLocator, out SkillDef switchSkillDef)
	{
		//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_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_013f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0149: Expected O, but got Unknown
		//IL_014a: Unknown result type (might be due to invalid IL or missing references)
		//IL_014b: Unknown result type (might be due to invalid IL or missing references)
		DBZSkillDef val = ScriptableObject.CreateInstance<DBZSkillDef>();
		((SkillDef)val).activationStateMachineName = "NoMovement";
		((SkillDef)val).activationState = new SerializableEntityStateType(typeof(Special));
		((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>("special");
		((SkillDef)val).skillDescriptionToken = "FRIEZA_SPEC_DESCRIPTION";
		((SkillDef)val).skillName = "FRIEZA_SPEC";
		((SkillDef)val).skillNameToken = "FRIEZA_SPEC";
		val.isSwitch = true;
		val.kiCost = 0.55f;
		((SkillDef)val).keywordTokens = val.newKeywordTokens;
		switchSkillDef = (SkillDef)(object)val;
		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);
	}

	private static void AddSpecialAlt(SkillLocator skillLocator, out SkillDef switchSkillDef)
	{
		//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 = "NoMovement";
		((SkillDef)val).activationState = new SerializableEntityStateType(typeof(SpecialAlt));
		((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>("specialalt");
		((SkillDef)val).skillDescriptionToken = "FRIEZAALT_SPEC_DESCRIPTION";
		((SkillDef)val).skillName = "FRIEZAALT_SPEC";
		((SkillDef)val).skillNameToken = "FRIEZAALT_SPEC";
		val.isSwitch = true;
		val.kiCost = 0.55f;
		((SkillDef)val).keywordTokens = val.newKeywordTokens;
		switchSkillDef = (SkillDef)(object)val;
		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);
	}
}
internal class Prefabs
{
	internal static void CreatePrefabs()
	{
	}
}
internal class Secondary : BaseDBZSkillState
{
	public float duration;

	public float baseDuration = 0.6f;

	public float minFireDuration;

	public float baseMinFireDuration = 0.13f;

	public bool fireProjectile = true;

	public GameObject projectilePrefab = Prefabs.deathBeamProjectile;

	public string animName = "KiBlast";

	public float damageCoefficient = 2f;

	private float stopwatch;

	public bool fireSecond = true;

	public override void OnEnter()
	{
		((BaseDBZSkillState)this).OnEnter();
		float num = Mathf.Clamp(((BaseState)this).attackSpeedStat, 1f, 28f);
		duration = baseDuration / num;
		minFireDuration = baseMinFireDuration / num;
		((EntityState)this).PlayAnimation("Gesture, Override", animName, "M2", duration, 0f);
		((BaseDBZSkillState)this).BaseSecondarySkillCast(0.05f);
		AkSoundEngine.PostEvent(Sounds.Play_DBZ_Common_DeathBeam_Charge, ((EntityState)this).gameObject);
	}

	public override void FixedUpdate()
	{
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if (Object.op_Implicit((Object)(object)base.skillBehaviour))
		{
			base.skillBehaviour.aimRay = ((BaseState)this).GetAimRay();
		}
		((BaseDBZSkillState)this).AdjustModelForwardAimVector();
		if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) && ((EntityState)this).fixedAge >= minFireDuration && fireProjectile)
		{
			AkSoundEngine.PostEvent(Sounds.Play_DBZ_Common_DeathBeam_Fire, ((EntityState)this).gameObject);
			fireProjectile = false;
			if (((EntityState)this).isAuthority)
			{
				ProjectileManager instance = ProjectileManager.instance;
				GameObject obj = projectilePrefab;
				Vector3 position = ((BaseState)this).FindModelChild("fingerMuzzle").position;
				Ray aimRay = ((BaseState)this).GetAimRay();
				instance.FireProjectile(obj, position, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * damageCoefficient * (float)Mathf.Clamp(((EntityState)this).characterBody.inventory.GetItemCount(Items.SecondarySkillMagazine), 1, 99), 40f, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null);
			}
		}
		if (!fireProjectile && fireSecond)
		{
			stopwatch += Time.fixedDeltaTime;
			if (stopwatch >= minFireDuration)
			{
				fireProjectile = true;
				fireSecond = false;
			}
		}
		if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	public override void OnExit()
	{
		((EntityState)this).OnExit();
		((BaseDBZSkillState)this).BaseSkillEnd();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)1;
	}
}
internal class SecondaryAlt : Secondary
{
	public override void OnEnter()
	{
		fireSecond = false;
		projectilePrefab = Prefabs.deathBeamProjectilePierce;
		baseDuration = 0.9f;
		damageCoefficient = 2.8f;
		baseMinFireDuration = 0.45f;
		animName = "DeathBeam";
		base.OnEnter();
	}
}
internal class Special : BaseDBZSkillState
{
	private float duration = 3f;

	public override void OnEnter()
	{
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		((BaseDBZSkillState)this).OnEnter();
		((EntityState)this).PlayAnimation("FullBody, Override", "DeathBall", "Special", duration, 0f);
		((BaseDBZSkillState)this).BaseSpecialSkillCast();
		if (Object.op_Implicit((Object)(object)base.skillBehaviour))
		{
			base.skillBehaviour.aimRay = ((BaseState)this).GetAimRay();
		}
		((BaseDBZSkillState)this).AdjustModelForwardAimVector();
		if (Object.op_Implicit((Object)(object)base.eventBehaviour))
		{
			base.eventBehaviour.sphereScale = false;
			base.eventBehaviour.fireSphere = false;
		}
		((BaseDBZSkillState)this).CameraZoomOut();
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.AddBuff(Prefabs.armorBoost);
		}
		AkSoundEngine.PostEvent(Sounds.Play_Frieza_Skill, ((EntityState)this).gameObject);
	}

	public override void FixedUpdate()
	{
		//IL_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
		if (Object.op_Implicit((Object)(object)base.eventBehaviour) && base.eventBehaviour.sphereScale && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory))
		{
			base.eventBehaviour.sphereScale = false;
			if (((EntityState)this).isAuthority)
			{
				ProjectileManager instance = ProjectileManager.instance;
				GameObject deathBallProjectile = Prefabs.deathBallProjectile;
				Vector3 position = ((BaseState)this).FindModelChild("sphereMuzzle").position;
				Ray aimRay = ((BaseState)this).GetAimRay();
				instance.FireProjectile(deathBallProjectile, position, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * 14f, 2000f, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null);
			}
		}
	}

	public override void OnExit()
	{
		((EntityState)this).OnExit();
		((BaseDBZSkillState)this).CameraZoomIn();
		((BaseDBZSkillState)this).BaseSkillEnd();
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.RemoveBuff(Prefabs.armorBoost);
		}
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)1;
	}
}
internal class SpecialAlt : BaseDBZSkillState
{
	private float duration = 1.2f;

	public override void OnEnter()
	{
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		((BaseDBZSkillState)this).OnEnter();
		((BaseDBZSkillState)this).BaseSpecialSkillCast();
		if (Object.op_Implicit((Object)(object)base.eventBehaviour))
		{
			base.eventBehaviour.fire = false;
		}
		if (Object.op_Implicit((Object)(object)base.skillBehaviour))
		{
			base.skillBehaviour.aimRay = ((BaseState)this).GetAimRay();
		}
		((BaseDBZSkillState)this).AdjustModelForwardAimVector();
		((EntityState)this).PlayAnimation("FullBody, Override", "DeathSlash", "Special", duration, 0f);
		AkSoundEngine.PostEvent(Sounds.Play_Frieza_Skill, ((EntityState)this).gameObject);
	}

	public override void FixedUpdate()
	{
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if (Object.op_Implicit((Object)(object)base.eventBehaviour) && base.eventBehaviour.fire && Object.op_Implicit((Object)(object)base.skillBehaviour))
		{
			EffectManager.SimpleMuzzleFlash(Prefabs.deathSlashSwingEffect, ((EntityState)this).gameObject, "swingMuzzle", false);
			AkSoundEngine.PostEvent(Sounds.Play_DBZ_Common_DeathSlash_Swing, ((EntityState)this).gameObject);
			base.eventBehaviour.fire = false;
			if (((EntityState)this).isAuthority)
			{
				ProjectileManager.instance.FireProjectile(Prefabs.deathSlashProjectile, ((BaseState)this).FindModelChild("fingerMuzzle").position, Util.QuaternionSafeLookRotation(((Ray)(ref base.skillBehaviour.aimRay)).direction), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * 9f, 900f, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null);
			}
		}
		if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	public override void OnExit()
	{
		((EntityState)this).OnExit();
		((BaseDBZSkillState)this).BaseSkillEnd();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)1;
	}
}
internal class Sounds
{
	public static readonly uint Play_Frieza_Powerup = 522895902u;

	public static readonly uint Play_Frieza_Skill = 1449129821u;

	public static readonly uint Play_Frieza_Death = 1679049732u;

	public static readonly uint Play_Frieza_BossKill = 1922828469u;

	public static readonly uint Play_Frieza_DMG = 2373962846u;

	public static readonly uint Play_Frieza_HeavyDMG = 2576302093u;

	public static readonly uint Play_Frieza_ATK = 2727131472u;

	public static readonly uint Play_Frieza_Encounter = 3103608553u;

	public static readonly uint Play_Frieza_Kill = 4170082998u;
}