Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of ZBroly v1.0.4
ZBroly.dll
Decompiled 7 months agousing 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.Skills; using UnityEngine; [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("ZBroly")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ZBroly")] [assembly: AssemblyTitle("ZBroly")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace ZBroly { internal class Assets { public static AssetBundle MainAssetBundle; public static void PopulateAssets() { if ((Object)(object)MainAssetBundle == (Object)null) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("ZBroly.zbrolyassets"); MainAssetBundle = AssetBundle.LoadFromStream(stream); } using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("ZBroly.ZBroly.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.Dragonyck.ZBroly", "ZBroly", "1.0.4")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.ZBroly"; public const string MODNAME = "ZBroly"; public const string VERSION = "1.0.4"; public const string SURVIVORNAME = "ZBroly"; public const string SURVIVORNAMEKEY = "ZBROLY"; public const string SURVIVORNAME2 = "ZBroly (SSJ)"; public const string SURVIVORNAMEKEY2 = "ZBROLY2"; public const string SURVIVORNAME3 = "ZBroly (LSSJ)"; public const string SURVIVORNAMEKEY3 = "ZBROLY3"; public const string SURVIVORNAME4 = "ZBroly (LSSJ3)"; public const string SURVIVORNAMEKEY4 = "ZBROLY4"; private static List<string> powerupBodyList = new List<string> { "ZBrolyBody", "ZBroly (SSJ)Body", "ZBroly (LSSJ)Body", "ZBroly (LSSJ3)Body" }; private static float desiredSortPosition = 15f; private void Awake() { Assets.PopulateAssets(); Prefabs.CreatePrefabs(); CreateSurvivor(); LanguageAPI.Add("ZBROLY_M1", "Gigantic Assault"); CreatePowerupSurvivor("ZBrolySSJ", "ZBroly (SSJ)", "ZBROLY2", 1.5f); CreatePowerupSurvivor("ZBrolyLSJ", "ZBroly (LSSJ)", "ZBROLY3", 2f); CreatePowerupSurvivor("ZBrolyLSJ3", "ZBroly (LSSJ3)", "ZBROLY4", 3f); RegisterStates(); Hook.Hooks(); } internal static void CreateSurvivor() { //IL_004b: 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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Expected O, but got Unknown //IL_02b8: Expected O, but got Unknown //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_02ef: Expected O, but got Unknown //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Expected O, but got Unknown //IL_0326: Expected O, but got Unknown //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Expected O, but got Unknown //IL_035d: Expected O, but got Unknown //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Expected O, but got Unknown //IL_0394: Expected O, but got Unknown //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Expected O, but got Unknown //IL_03cb: 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_041a: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Expected O, but got Unknown //IL_0439: Expected O, but got Unknown //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Expected O, but got Unknown //IL_0470: Expected O, but got Unknown //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Expected O, but got Unknown //IL_04a7: Expected O, but got Unknown //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Expected O, but got Unknown //IL_04de: Expected O, but got Unknown //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Expected O, but got Unknown //IL_0515: Expected O, but got Unknown //IL_052d: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_054c: Expected O, but got Unknown //IL_054c: Expected O, but got Unknown //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Expected O, but got Unknown //IL_0583: Expected O, but got Unknown //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Expected O, but got Unknown //IL_05b7: Expected O, but got Unknown //IL_05cf: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: Expected O, but got Unknown //IL_05ee: Expected O, but got Unknown //IL_05f8: Unknown result type (might be due to invalid IL or missing references) //IL_05fa: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0626: 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_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_0768: Unknown result type (might be due to invalid IL or missing references) //IL_0772: Unknown result type (might be due to invalid IL or missing references) //IL_0790: Unknown result type (might be due to invalid IL or missing references) //IL_07a3: 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_07b6: Unknown result type (might be due to invalid IL or missing references) GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>("ZBroly"); ChildLocator component = val.GetComponent<ChildLocator>(); SurvivorDef val2 = default(SurvivorDef); CharacterBody val3 = DBZSurvivors.SetupNewDBZSurvivor(val, "ZBroly", ref val2); ((Object)val3).name = "ZBrolyBody"; val3.baseNameToken = "ZBROLY_NAME"; val3.subtitleNameToken = "ZBROLY_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.preferredPodPrefab = Prefabs.DBZPodPrefab; val3.bodyColor = new Color(0.63922f, 0.72157f, 0.09804f); ConfigFile val4 = Utils.CreateConfig(val3); KiBehaviour component2 = ((Component)val3).GetComponent<KiBehaviour>(); component2.hasPowerup = true; ((Component)val3).GetComponent<KiBehaviour>().passiveRegen = true; ((Component)val3).GetComponent<ModelLocator>().modelBaseTransform.GetChild(0).localPosition = new Vector3(0f, 2.4f, 0f); DBZSurvivorDef val5 = ScriptableObject.CreateInstance<DBZSurvivorDef>(); val5.attackVO = Sounds.Play_DBZ_Broly_ATKGrunt; val5.bossEncounterVO = Sounds.Play_DBZ_Broly_FinalBossEncounter; val5.bossKillVO = Sounds.Play_DBZ_Broly_BossKill; val5.heavyHitVO = Sounds.Play_DBZ_Broly_HeavyDMGGrunt; val5.killVO = Sounds.Play_DBZ_Broly_Kill; val5.lightHitVO = Sounds.Play_DBZ_Broly_LightDMGGrunt; val5.skillVO = Sounds.Play_DBZ_Broly_Skill; val5.deathVO = Sounds.Play_DBZ_Broly_Death; 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(CharacterMain)); 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("ZBROLY_NAME", "ZBroly"); LanguageAPI.Add("ZBROLY_DESCRIPTION", text); LanguageAPI.Add("ZBROLY_SUBTITLE", ""); LanguageAPI.Add("ZBROLY_OUTRO", text2); LanguageAPI.Add("ZBROLY_FAIL", text3); val2.primaryColor = val3.bodyColor; val2.displayPrefab = Utils.RemoveDither(val, "ZBrolyDisplay"); val2.desiredSortPosition = desiredSortPosition; SkillLocator component4 = ((Component)val3).GetComponent<SkillLocator>(); AddPrimary(component4); AddSecondary(component4, "DBZ_POWEREDSHELL_SKILL_NAME", "DBZ_POWEREDSHELL_SKILL_DESCRIPTION", Prefabs.poweredShellIcon, typeof(QuickEventProjectileState)); AddUtility(component4); AddSpecial(component4, "DBZ_SUPEREXPLOSIVEWAVE_NAME", "DBZ_SUPEREXPLOSIVEWAVE_DESCRIPTION", Prefabs.superexplosivewaveGREEN, typeof(Special)); AddHitBoxes(val.transform); Utils.CreateHitbox("GiganticRage", val.transform, Vector3.one * 8f).transform.localPosition = new Vector3(0f, 1.5f, 2f); DBZSurvivors.survivorSceneProps.Add(val, new TransformMemory { position = default(Vector3) }); } internal static void CreatePowerupSurvivor(string modelName, string survivorName, string survivorNameKey, float statMultValue) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_0044: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Expected O, but got Unknown //IL_0349: Expected O, but got Unknown //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Expected O, but got Unknown //IL_037f: Expected O, but got Unknown //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Expected O, but got Unknown //IL_03b5: Expected O, but got Unknown //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Expected O, but got Unknown //IL_03eb: Expected O, but got Unknown //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Expected O, but got Unknown //IL_0421: Expected O, but got Unknown //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Expected O, but got Unknown //IL_0457: Expected O, but got Unknown //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Expected O, but got Unknown //IL_048d: Expected O, but got Unknown //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Expected O, but got Unknown //IL_04c3: Expected O, but got Unknown //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Expected O, but got Unknown //IL_04f9: Expected O, but got Unknown //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Expected O, but got Unknown //IL_052f: Expected O, but got Unknown //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Unknown result type (might be due to invalid IL or missing references) //IL_0565: Expected O, but got Unknown //IL_0565: Expected O, but got Unknown //IL_057c: 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_059b: Expected O, but got Unknown //IL_059b: Expected O, but got Unknown //IL_05b2: Unknown result type (might be due to invalid IL or missing references) //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Expected O, but got Unknown //IL_05d1: Expected O, but got Unknown //IL_05e8: Unknown result type (might be due to invalid IL or missing references) //IL_05fd: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Expected O, but got Unknown //IL_0607: Expected O, but got Unknown //IL_061e: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Expected O, but got Unknown //IL_063a: Expected O, but got Unknown //IL_0651: Unknown result type (might be due to invalid IL or missing references) //IL_0666: Unknown result type (might be due to invalid IL or missing references) //IL_0670: Expected O, but got Unknown //IL_0670: Expected O, but got Unknown //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_067c: Unknown result type (might be due to invalid IL or missing references) //IL_06a5: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_09b2: Unknown result type (might be due to invalid IL or missing references) //IL_09b7: Unknown result type (might be due to invalid IL or missing references) //IL_09df: Unknown result type (might be due to invalid IL or missing references) //IL_09f0: Unknown result type (might be due to invalid IL or missing references) //IL_09fa: Expected O, but got Unknown //IL_09fa: Expected O, but got Unknown //IL_0a1b: Unknown result type (might be due to invalid IL or missing references) //IL_0a25: Unknown result type (might be due to invalid IL or missing references) //IL_08a5: 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); 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, 2.4f, 0f); KiBehaviour component = ((Component)val3).GetComponent<KiBehaviour>(); component.hasPowerup = true; component.maxKiValue = 1f * value; component.passiveRegenValue = 0.02f * value; component.passiveRegen = true; ((Component)val3).GetComponent<DBZSkillBehaviour>().baseSecondaryCost = 0.05f; EntityStateMachine component2 = ((Component)val3).GetComponent<EntityStateMachine>(); component2.initialStateType = new SerializableEntityStateType(typeof(BasePowerupSpawnState)); component2.mainStateType = new SerializableEntityStateType(typeof(CharacterMain)); CharacterDeathBehavior component3 = ((Component)val3).GetComponent<CharacterDeathBehavior>(); component3.deathState = new SerializableEntityStateType(typeof(DeathState)); DBZSurvivorDef val5 = ScriptableObject.CreateInstance<DBZSurvivorDef>(); val5.config = val4; val5.attackVO = Sounds.Play_DBZ_Broly_ATKGrunt; val5.bossEncounterVO = Sounds.Play_DBZ_Broly_FinalBossEncounter; val5.bossKillVO = Sounds.Play_DBZ_Broly_BossKill; val5.heavyHitVO = Sounds.Play_DBZ_Broly_HeavyDMGGrunt; val5.killVO = Sounds.Play_DBZ_Broly_Kill; val5.lightHitVO = Sounds.Play_DBZ_Broly_LightDMGGrunt; val5.skillVO = Sounds.Play_DBZ_Broly_Skill; val5.deathVO = Sounds.Play_DBZ_Broly_Death; val5.vfxColor = (VFXColor)2; 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 }; Transform child = ((Component)val3).GetComponent<ModelLocator>().modelBaseTransform.GetChild(0); child.localPosition = new Vector3(0f, 2.4f, 0f); SkillLocator component4 = ((Component)val3).GetComponent<SkillLocator>(); switch (survivorName) { case "ZBroly (SSJ)": val5.vfxColor = (VFXColor)4; AddPrimary(component4); AddSecondary(component4, "DBZ_CRUSHCANNON_SKILL_NAME", "DBZ_CRUSHCANNON_SKILL_DESCRIPTION", Prefabs.lightgrenadeGREEN, typeof(ChargeProjectileChargeState)); AddUtility(component4); AddSpecial(component4, "DBZ_GIGANTICRAGE_SKILL_NAME", "DBZ_GIGANTICRAGE_SKILL_DESCRIPTION", Assets.MainAssetBundle.LoadAsset<Sprite>("giganticRage"), typeof(GiganticRageState), "Idle1"); val2.desiredSortPosition = desiredSortPosition + 0.1f; val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait2").texture; break; case "ZBroly (LSSJ)": AddPrimary(component4); AddSecondary(component4, "DBZ_GIGANTICRAGE_SKILL_NAME", "DBZ_GIGANTICRAGE_SKILL_DESCRIPTION", Assets.MainAssetBundle.LoadAsset<Sprite>("giganticRage"), typeof(GiganticRageState), "Idle1"); AddUtility(component4); AddSpecial(component4, "DBZ_GIGANTICMETEOR_SKILL_NAME", "DBZ_GIGANTICMETEOR_SKILL_DESCRIPTION", Prefabs.giganticMeteorIcon, typeof(GiganticMeteor)); val2.desiredSortPosition = desiredSortPosition + 0.2f; val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait3").texture; break; case "ZBroly (LSSJ3)": AddPrimary(component4); AddSecondary(component4, "DBZ_GIGANTICMETEOR_SKILL_NAME", "DBZ_GIGANTICMETEOR_SKILL_DESCRIPTION", Prefabs.giganticMeteorIcon, typeof(GiganticMeteor)); AddUtility(component4); AddSpecial(component4, "DBZ_DUALGIGANTICMETEOR_SKILL_NAME", "DBZ_DUALGIGANTICMETEOR_SKILL_DESCRIPTION", Prefabs.doubleGiganticMeteorIcon, typeof(DoubleGiganticMeteor)); component.hasPowerup = false; val5.powerupBodyList = null; child.localPosition = new Vector3(0f, 2.7f, 0f); val2.desiredSortPosition = desiredSortPosition + 0.3f; val3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait4").texture; 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< ! > " + 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."; string text3 = "..and so he vanished."; 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.displayPrefab = Utils.RemoveDither(val, survivorName + "Display"); val2.hidden = val4.Bind<bool>(new ConfigDefinition("Hidden Survivor", "Hidden"), true, new ConfigDescription("Hide in Character Select", (AcceptableValueBase)null, Array.Empty<object>())).Value; AddHitBoxes(val.transform); Utils.CreateHitbox("GiganticRage", val.transform, Vector3.one * 5f); } 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) LanguageAPI.Add("ZBROLY_PASSIVE_NAME", "Passive"); LanguageAPI.Add("ZBROLY_M1", "Primary"); LanguageAPI.Add("ZBROLY_PASSIVE_DESCRIPTION", ""); LanguageAPI.Add("ZBROLY_M2", "Secondary"); LanguageAPI.Add("ZBROLY_M2_DESCRIPTION", ""); LanguageAPI.Add("ZBROLY_SPEC", "Special"); LanguageAPI.Add("ZBROLY_SPEC_DESCRIPTION", ""); bool flag = default(bool); ContentAddition.AddEntityState<Secondary>(ref flag); ContentAddition.AddEntityState<Special>(ref flag); ContentAddition.AddEntityState<SpecialFire>(ref flag); ContentAddition.AddEntityState<CharacterMain>(ref flag); } private static void AddPrimary(SkillLocator skillLocator) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0135: 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) SkillSwitchBehaviour val = ((Component)skillLocator).gameObject.AddComponent<SkillSwitchBehaviour>(); DBZSkillDef val2 = ScriptableObject.CreateInstance<DBZSkillDef>(); ((SkillDef)val2).activationStateMachineName = "Weapon"; ((SkillDef)val2).activationState = new SerializableEntityStateType(typeof(DBZMeleeSkillState)); ((SkillDef)val2).baseMaxStock = 0; ((SkillDef)val2).baseRechargeInterval = 0f; ((SkillDef)val2).beginSkillCooldownOnSkillEnd = true; ((SkillDef)val2).canceledFromSprinting = false; ((SkillDef)val2).fullRestockOnAssign = true; ((SkillDef)val2).interruptPriority = (InterruptPriority)0; ((SkillDef)val2).isCombatSkill = true; ((SkillDef)val2).mustKeyPress = false; ((SkillDef)val2).cancelSprintingOnActivation = true; ((SkillDef)val2).rechargeStock = 0; ((SkillDef)val2).requiredStock = 0; ((SkillDef)val2).stockToConsume = 0; ((SkillDef)val2).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("primary"); ((SkillDef)val2).skillDescriptionToken = "DBZ_MELEE_SKILL_DESCRIPTION"; ((SkillDef)val2).skillName = "ZBROLY_M1"; ((SkillDef)val2).skillNameToken = "ZBROLY_M1"; ContentAddition.AddSkillDef((SkillDef)(object)val2); skillLocator.primary = ((Component)skillLocator).gameObject.AddComponent<GenericSkill>(); SkillFamily val3 = ScriptableObject.CreateInstance<SkillFamily>(); val3.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)skillLocator.primary, "_skillFamily", val3); SkillFamily skillFamily = skillLocator.primary.skillFamily; Variant[] variants = skillFamily.variants; Variant val4 = new Variant { skillDef = (SkillDef)(object)val2 }; ((Variant)(ref val4)).viewableNode = new Node(((SkillDef)val2).skillNameToken, false, (Node)null); variants[0] = val4; ContentAddition.AddSkillFamily(skillFamily); } private static void AddSecondary(SkillLocator skillLocator, string nameToken, string descToken, Sprite sprite, Type type, string stateMachine = "NoMovement") { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Expected O, but got Unknown //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) SkillSwitchBehaviour component = ((Component)skillLocator).gameObject.GetComponent<SkillSwitchBehaviour>(); DBZSkillDef val = ScriptableObject.CreateInstance<DBZSkillDef>(); ((SkillDef)val).activationStateMachineName = stateMachine; ((SkillDef)val).activationState = new SerializableEntityStateType(type); ((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 = sprite; ((SkillDef)val).skillDescriptionToken = descToken; ((SkillDef)val).skillName = nameToken; ((SkillDef)val).skillNameToken = nameToken; val.kiCost = 0.2f; 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); if (nameToken == "DBZ_GIGANTICMETEOR_SKILL_NAME") { component.secondarySkillDefList = new List<SkillDef>(); component.secondarySkillDefList.Add((SkillDef)(object)val); val = ScriptableObject.CreateInstance<DBZSkillDef>(); ((SkillDef)val).activationStateMachineName = "Idle1"; ((SkillDef)val).activationState = new SerializableEntityStateType(typeof(GiganticRageState)); ((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>("giganticRage"); ((SkillDef)val).skillDescriptionToken = "DBZ_GIGANTICRAGE_SKILL_DESCRIPTION"; ((SkillDef)val).skillName = "DBZ_GIGANTICRAGE_SKILL_NAME"; ((SkillDef)val).skillNameToken = "DBZ_GIGANTICRAGE_SKILL_NAME"; val.isSwitch = true; val.kiCost = 0.2f; component.secondarySkillDefList.Add((SkillDef)(object)val); ContentAddition.AddSkillDef((SkillDef)(object)val); GenericSkill val4 = ((Component)skillLocator).gameObject.AddComponent<GenericSkill>(); val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)val4, "_skillFamily", val2); skillFamily = val4.skillFamily; Variant[] variants2 = skillFamily.variants; val3 = new Variant { skillDef = (SkillDef)(object)val }; ((Variant)(ref val3)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null); variants2[0] = val3; } } private static void AddUtility(SkillLocator skillLocator) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Expected O, but got Unknown //IL_0288: 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) SkillSwitchBehaviour component = ((Component)skillLocator).gameObject.GetComponent<SkillSwitchBehaviour>(); component.utilitySkillDefList = new List<SkillDef>(); 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; component.utilitySkillDefList.Add((SkillDef)(object)val); 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); val = ScriptableObject.CreateInstance<DBZSkillDef>(); ((SkillDef)val).activationStateMachineName = "Slide"; ((SkillDef)val).activationState = new SerializableEntityStateType(typeof(EnergyFieldState)); ((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 = false; ((SkillDef)val).rechargeStock = 0; ((SkillDef)val).requiredStock = 0; ((SkillDef)val).stockToConsume = 0; ((SkillDef)val).icon = Prefabs.fieldGreenIcon; ((SkillDef)val).skillDescriptionToken = "DBZ_ENERGYFIELD_SKILL_DESCRIPTION"; ((SkillDef)val).skillName = "DBZ_ENERGYFIELD_SKILL_NAME"; ((SkillDef)val).skillNameToken = "DBZ_ENERGYFIELD_SKILL_NAME"; val.isSwitch = true; component.utilitySkillDefList.Add((SkillDef)(object)val); ContentAddition.AddSkillDef((SkillDef)(object)val); GenericSkill val4 = ((Component)skillLocator).gameObject.AddComponent<GenericSkill>(); val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)val4, "_skillFamily", val2); skillFamily = val4.skillFamily; Variant[] variants2 = skillFamily.variants; val3 = new Variant { skillDef = (SkillDef)(object)val }; ((Variant)(ref val3)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null); variants2[0] = val3; } private static void AddSpecial(SkillLocator skillLocator, string nameToken, string descToken, Sprite sprite, Type type, string stateMachine = "NoMovement") { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) DBZSkillDef val = ScriptableObject.CreateInstance<DBZSkillDef>(); ((SkillDef)val).activationStateMachineName = stateMachine; ((SkillDef)val).activationState = new SerializableEntityStateType(type); ((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 = sprite; ((SkillDef)val).skillDescriptionToken = descToken; ((SkillDef)val).skillName = nameToken; ((SkillDef)val).skillNameToken = nameToken; val.kiCost = 0.55f; 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 Prefabs { internal static void CreatePrefabs() { } } internal class CharacterMain : DBZCharacterMain { } internal class Secondary : BeamBaseState { public override void OnEnter() { ((BeamBaseState)this).OnEnter(); } public override void FixedUpdate() { ((BeamBaseState)this).FixedUpdate(); } public override void OnExit() { ((BeamBaseState)this).OnExit(); } 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 Special : AnimEventBeam { protected override void SetNextState() { ((EntityState)this).outer.SetNextState((EntityState)(object)new SpecialFire()); } 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 SpecialFire : AnimEventBeamFire { protected override void SetBeamVFX() { ((BeamFire)this).beamVFX = Prefabs.beamFXGreen; } 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_DBZ_Broly_BM_PROJ_FIRE = 138774938u; public static readonly uint Play_DBZ_Broly_Skill = 719813295u; public static readonly uint Play_DBZ_Broly_Kill = 849892544u; public static readonly uint Play_DBZ_Broly_HeavyDMGGrunt = 900023071u; public static readonly uint Play_DBZ_Broly_GR_START = 994274522u; public static readonly uint Play_DBZ_Broly_Death = 1131012950u; public static readonly uint Play_DBZ_Broly_LightDMGGrunt = 1316871422u; public static readonly uint Play_DBZ_Broly_BM_PROJ_HIT = 1628223241u; public static readonly uint Play_DBZ_Broly_BM_Fire = 1649943162u; public static readonly uint Play_DBZ_Broly_ATKGrunt = 1678111780u; public static readonly uint Play_DBZ_Broly_Powerup = 2410957748u; public static readonly uint Play_DBZ_Broly_GR_FIRE = 2582106326u; public static readonly uint Play_DBZ_Broly_BossKill = 2993290007u; public static readonly uint Play_DBZ_Broly_Intro = 3306289462u; public static readonly uint Play_DBZ_Broly_Passive = 3399426583u; public static readonly uint Play_DBZ_Broly_FinalBossEncounter = 3474272650u; public static readonly uint Play_DBZ_Broly_BM_START = 3940999334u; } } namespace ZBroly.SkillStates { internal class GreenSuperExplosiveWave { } }