Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Pyke v1.0.6
Pyke.dll
Decompiled a year ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using EntityStates; using EntityStates.Merc; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Utils; using RoR2; using RoR2.Achievements; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; [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("Dragonyck")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Pyke")] [assembly: AssemblyTitle("Pyke")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Pyke; public static class Achievements { [RegisterAchievement("PYKE_SKIN01UNLOCKABLE", "ACHIEVEMENT_PYKE_SKIN01UNLOCKABLE_UNLOCKABLE_ID", null, 10u, null)] public class Skin01Unlockable : BaseAchievement { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("PykeBody"); } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); Run.onClientGameOverGlobal += OnClientGameOverGlobal; } public override void OnBodyRequirementBroken() { Run.onClientGameOverGlobal -= OnClientGameOverGlobal; ((BaseAchievement)this).OnBodyRequirementBroken(); } private void OnClientGameOverGlobal(Run run, RunReport runReport) { if (Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin && ((BaseAchievement)this).meetsBodyRequirement) { ((BaseAchievement)this).Grant(); } } } [RegisterAchievement("PYKE_SKIN02UNLOCKABLE", "ACHIEVEMENT_PYKE_SKIN02UNLOCKABLE_UNLOCKABLE_ID", null, 10u, null)] public class Skin02Unlockable : BaseAchievement { private int progress; private bool waitingForKill; private float stopwatch; public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("PykeBody"); } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); RoR2Application.onFixedUpdate += FixedUpdate; SpecialExecute.onExecute += SpecialExecute_onExecute; } public override void OnBodyRequirementBroken() { ((BaseAchievement)this).OnBodyRequirementBroken(); RoR2Application.onFixedUpdate -= FixedUpdate; SpecialExecute.onExecute -= SpecialExecute_onExecute; } private void SpecialExecute_onExecute(SpecialExecute obj) { waitingForKill = true; progress++; stopwatch = 0f; } private void FixedUpdate() { if (waitingForKill) { stopwatch += Time.fixedDeltaTime; } else { stopwatch = 0f; } if (stopwatch >= 6f) { stopwatch = 0f; progress = 0; waitingForKill = false; } if (progress >= 20) { ((BaseAchievement)this).Grant(); } } } [RegisterAchievement("PYKE_SKIN03UNLOCKABLE", "ACHIEVEMENT_PYKE_SKIN03UNLOCKABLE_UNLOCKABLE_ID", null, 10u, null)] public class Skin03Unlockable : BasePerSurvivorClearGameMonsoonAchievement { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("PykeBody"); } } [RegisterAchievement("PYKE_SKIN04UNLOCKABLE", "ACHIEVEMENT_PYKE_SKIN04UNLOCKABLE_UNLOCKABLE_ID", null, 10u, null)] public class Skin04Unlockable : BaseAchievement { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("PykeBody"); } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); UtilityFire.onHit += UtilityFire_onHit; } private void UtilityFire_onHit(UtilityFire arg1, int count) { if (count >= 10) { ((BaseAchievement)this).Grant(); } } public override void OnBodyRequirementBroken() { UtilityFire.onHit -= UtilityFire_onHit; ((BaseAchievement)this).OnBodyRequirementBroken(); } } [RegisterAchievement("PYKE_SKIN05UNLOCKABLE", "ACHIEVEMENT_PYKE_SKIN05UNLOCKABLE_UNLOCKABLE_ID", null, 10u, null)] public class Skin05Unlockable : BaseAchievement { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("PykeBody"); } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); Run.onClientGameOverGlobal += OnClientGameOverGlobal; } public override void OnBodyRequirementBroken() { Run.onClientGameOverGlobal -= OnClientGameOverGlobal; ((BaseAchievement)this).OnBodyRequirementBroken(); } private void OnClientGameOverGlobal(Run run, RunReport runReport) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin && ((BaseAchievement)this).meetsBodyRequirement) { DifficultyIndex val = runReport.ruleBook.FindDifficulty(); if ((int)val == 1) { ((BaseAchievement)this).Grant(); } } } } [RegisterAchievement("PYKE_SKIN06UNLOCKABLE", "ACHIEVEMENT_PYKE_SKIN06UNLOCKABLE_UNLOCKABLE_ID", null, 10u, null)] public class Skin06Unlockable : BaseAchievement { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("PykeBody"); } public override void OnBodyRequirementMet() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((BaseAchievement)this).OnBodyRequirementMet(); HealthComponent.Suicide += new hook_Suicide(HealthComponent_Suicide); } private void HealthComponent_Suicide(orig_Suicide orig, HealthComponent self, GameObject killerOverride, GameObject inflictorOverride, DamageTypeCombo damageType) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, killerOverride, inflictorOverride, damageType); if (Object.op_Implicit((Object)(object)self.body) && ((Object)self.body).name.Contains("BrotherHurt") && (int)DamageTypeCombo.op_Implicit(damageType & DamageTypeCombo.op_Implicit((DamageType)64)) != 0 && ((BaseAchievement)this).meetsBodyRequirement) { ((BaseAchievement)this).Grant(); } } public override void OnBodyRequirementBroken() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HealthComponent.Suicide -= new hook_Suicide(HealthComponent_Suicide); ((BaseAchievement)this).OnBodyRequirementBroken(); } } internal static UnlockableDef Skin01Unlock; internal static UnlockableDef Skin02Unlock; internal static UnlockableDef Skin03Unlock; internal static UnlockableDef Skin04Unlock; internal static UnlockableDef Skin05Unlock; internal static UnlockableDef Skin06Unlock; public static void RegisterUnlockables() { Skin01Unlock = NewUnlockable<Skin03Unlockable>("SKIN01UNLOCKABLE", Assets.MainAssetBundle.LoadAsset<Sprite>("portraitSkin01"), "Pyke: Beginner", "As Pyke, the game or obliterate on any difficulty."); Skin02Unlock = NewUnlockable<Skin03Unlockable>("SKIN02UNLOCKABLE", Assets.MainAssetBundle.LoadAsset<Sprite>("portraitSkin02"), "Pyke: Calculated Executioner", "As Pyke, execute 20 enemies in a row using Death From Below."); Skin03Unlock = NewUnlockable<Skin03Unlockable>("SKIN03UNLOCKABLE", Assets.MainAssetBundle.LoadAsset<Sprite>("portraitSkin03"), "Pyke: Mastery", "As Pyke, beat the game or obliterate on Monsoon."); Skin04Unlock = NewUnlockable<Skin03Unlockable>("SKIN04UNLOCKABLE", Assets.MainAssetBundle.LoadAsset<Sprite>("portraitSkin04"), "Pyke: Stunning Performance", "As Pyke, stun 10 enemies with one use of Phantom Undertow."); Skin05Unlock = NewUnlockable<Skin03Unlockable>("SKIN05UNLOCKABLE", Assets.MainAssetBundle.LoadAsset<Sprite>("portraitSkin05"), "Pyke: Adept", "As Pyke, beat the game or obliterate on Rainstorm."); Skin06Unlock = NewUnlockable<Skin03Unlockable>("SKIN06UNLOCKABLE", Assets.MainAssetBundle.LoadAsset<Sprite>("portraitSkin06"), "Pyke: GGEZ", "As Pyke, kill the final boss with Death From Below."); } private static UnlockableDef NewUnlockable<T>(string AchievementIdentifier, Sprite Icon, string Title, string Description) where T : BaseAchievement { string text = "ACHIEVEMENT_PYKE_"; UnlockableDef val = ScriptableObject.CreateInstance<UnlockableDef>(); string langName = text + AchievementIdentifier + "_NAME"; string langDesc = text + AchievementIdentifier + "_DESCRIPTION"; LanguageAPI.Add(langName, Title); LanguageAPI.Add(langDesc, Description); Func<string> func = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString(langName), Language.GetString(langDesc) }); Type typeFromHandle = typeof(T); val.cachedName = text + AchievementIdentifier + "_UNLOCKABLE_ID"; val.getHowToUnlockString = func; val.getUnlockedString = func; val.achievementIcon = Icon; val.sortScore = 200; val.hidden = false; ContentAddition.AddUnlockableDef(val); return val; } } internal class Assets { public static AssetBundle MainAssetBundle; public static void PopulateAssets() { if ((Object)(object)MainAssetBundle == (Object)null) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Pyke.AssetBundle.pykeassets"); MainAssetBundle = AssetBundle.LoadFromStream(stream); } using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Pyke.Pyke.bnk"); byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } } internal class ExecuteIndicatorBehaviour : MonoBehaviour { private HealthComponent health; private GameObject indicator; private CharacterBody attacker; private Transform modelTransform; private bool isExecutable() { bool result = false; if (Object.op_Implicit((Object)(object)health) && Object.op_Implicit((Object)(object)attacker) && health.health <= attacker.damage * 4f + health.fullHealth * (SpecialExecute.executeThreshhold + attacker.crit / 100f)) { result = true; } return result; } public void SetCharacterBody(CharacterBody body) { if (Object.op_Implicit((Object)(object)body)) { attacker = body; } } private void OnEnable() { CharacterBody component = ((Component)this).GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent)) { health = component.healthComponent; ModelLocator component2 = ((Component)this).GetComponent<ModelLocator>(); if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.modelTransform)) { modelTransform = component2.modelTransform; } } } private void Update() { if (!Object.op_Implicit((Object)(object)indicator) && isExecutable() && Object.op_Implicit((Object)(object)modelTransform)) { indicator = Object.Instantiate<GameObject>(Prefabs.specialExecuteIndicator, ((Component)health.body.mainHurtBox).transform); } if (!isExecutable() && Object.op_Implicit((Object)(object)indicator)) { Object.Destroy((Object)(object)indicator); } if (Object.op_Implicit((Object)(object)health) && !health.alive && Object.op_Implicit((Object)(object)indicator)) { Object.Destroy((Object)(object)indicator); } } private void OnDisable() { if (Object.op_Implicit((Object)(object)indicator)) { Object.Destroy((Object)(object)indicator); } } } internal class PykeTracker : HuntressTracker { private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown base.indicator = new Indicator(((Component)this).gameObject, Prefabs.trackingIndicator); } } internal class Blank : MonoBehaviour { } internal class CharacterMain : GenericCharacterMain { private Animator animator; private BullseyeSearch targetFinder = new BullseyeSearch(); private Ray aimRay; internal static int skinIndex; private GameObject trail; private bool gotPassive; private float stopwatch; private float stopwatch2; private bool overlay; public override void OnEnter() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnEnter(); if (!Object.op_Implicit((Object)(object)trail)) { trail = Object.Instantiate<GameObject>(Prefabs.pykeEyeTrail, ((EntityState)this).GetModelChildLocator().FindChild("EyeMuzzle")); } animator = ((EntityState)this).GetModelAnimator(); aimRay = ((BaseState)this).GetAimRay(); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (!Object.op_Implicit((Object)(object)modelTransform)) { return; } CharacterModel component = ((Component)modelTransform).GetComponent<CharacterModel>(); if (!Object.op_Implicit((Object)(object)component)) { return; } ModelSkinController component2 = ((Component)component).GetComponent<ModelSkinController>(); if (Object.op_Implicit((Object)(object)component2)) { if (component2.skins[((EntityState)this).characterBody.skinIndex].nameToken == "PYKEBODY_DEFAULT_SKIN_NAME") { skinIndex = 0; } if (component2.skins[((EntityState)this).characterBody.skinIndex].nameToken == "PYKEBODY_SKIN03_SKIN_NAME") { skinIndex = 1; } if (component2.skins[((EntityState)this).characterBody.skinIndex].nameToken == "PYKEBODY_SKIN06_SKIN_NAME") { skinIndex = 2; } } } public override void FixedUpdate() { //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).FixedUpdate(); if (!overlay && ((EntityState)this).characterBody.hasCloakBuff) { overlay = true; Transform modelTransform = ((EntityState)this).GetModelTransform(); TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val.duration = 3f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = Assets.MainAssetBundle.LoadAsset<Material>("cloakMat"); val.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>()); ((EntityState)this).PlayAnimation("FullBody, Override", "Spell2Enter"); } if (overlay) { stopwatch2 += Time.fixedDeltaTime; if (stopwatch2 >= 3f) { stopwatch2 = 0f; overlay = false; } } animator.SetBool("Cloaked", ((EntityState)this).characterBody.hasCloakBuff); stopwatch += Time.fixedDeltaTime; if (!(stopwatch >= 0.1f) || !Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) || !((EntityState)this).skillLocator.special.IsReady()) { return; } stopwatch = 0f; BullseyeSearch val2 = new BullseyeSearch(); val2.searchOrigin = ((EntityState)this).characterBody.corePosition; val2.searchDirection = ((Ray)(ref aimRay)).direction; val2.maxDistanceFilter = 120f; val2.teamMaskFilter = TeamMask.GetUnprotectedTeams(((BaseState)this).GetTeam()); val2.sortMode = (SortMode)1; val2.RefreshCandidates(); val2.FilterOutGameObject(((EntityState)this).gameObject); List<HurtBox> list = val2.GetResults().ToList(); for (int i = 0; i < list.Count; i++) { GameObject gameObject = ((Component)list[i].healthComponent).gameObject; if (Object.op_Implicit((Object)(object)gameObject)) { ExecuteIndicatorBehaviour component = gameObject.GetComponent<ExecuteIndicatorBehaviour>(); if (!Object.op_Implicit((Object)(object)component)) { gameObject.AddComponent<ExecuteIndicatorBehaviour>().SetCharacterBody(((EntityState)this).characterBody); } } } } } 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 //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); DotController.AddDot += new hook_AddDot(DotController_AddDot); CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; } private static void GlobalEventManager_onServerDamageDealt(DamageReport damageReport) { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Invalid comparison between Unknown and I4 //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)damageReport.victim) || !Object.op_Implicit((Object)(object)damageReport.attackerBody) || !(damageReport.attackerBody.baseNameToken == "PYKE_NAME") || (int)DamageTypeCombo.op_Implicit((damageReport.damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)1)) | DamageTypeCombo.GenericSecondary) <= 0) { return; } EffectManager.SimpleEffect(Prefabs.pykeImpactEffect1, damageReport.damageInfo.position, Quaternion.identity, true); if (Object.op_Implicit((Object)(object)damageReport.victimBody)) { float num = 0f; RigidbodyMotor component = ((Component)damageReport.victim).GetComponent<RigidbodyMotor>(); if (Object.op_Implicit((Object)(object)damageReport.victim.body.characterMotor)) { num = damageReport.victim.body.characterMotor.mass; } else if (Object.op_Implicit((Object)(object)component)) { num = component.mass; } HealthComponent victim = damageReport.victim; Vector3 val = damageReport.attackerBody.transform.position - ((Component)damageReport.victim).transform.position; victim.TakeDamageForce(((Vector3)(ref val)).normalized * 40f * num, true, false); } } private static void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((Component)self).GetComponent<Blank>())) { if (NetworkServer.active) { self.healthComponent.Networkhealth = Math.Max(self.healthComponent.Networkhealth, 1f); } self.healthComponent.health = Math.Max(self.healthComponent.health, 1f); } } private static void DotController_AddDot(orig_AddDot orig, DotController self, GameObject attackerObject, float duration, DotIndex dotIndex, float damageMultiplier, uint? maxStacksFromAttacker, float? totalDamage, DotIndex? preUpgradeDotIndex) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, attackerObject, duration, dotIndex, damageMultiplier, maxStacksFromAttacker, totalDamage, preUpgradeDotIndex); if (!Object.op_Implicit((Object)(object)attackerObject) || !((Object)attackerObject).name.Contains("Pyke")) { return; } for (int i = 0; i < self.dotStackList.Count; i++) { if (self.dotStackList[i] != null) { self.dotStackList[i].damageType = DamageTypeCombo.op_Implicit((DamageType)1); } } } internal static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody body, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)((Component)body).GetComponent<Blank>()) && Object.op_Implicit((Object)(object)body.inventory)) { float num = 0.2f; float num2 = 0.5f; float num3 = 1f; int itemCount = body.inventory.GetItemCount(Items.FlatHealth); int itemCount2 = body.inventory.GetItemCount(Items.Pearl); int itemCount3 = body.inventory.GetItemCount(Items.Knurl); bool flag = body.HasBuff(Buffs.TonicBuff); args.baseHealthAdd -= (float)body.inventory.infusionBonus; args.baseDamageAdd += (float)body.inventory.infusionBonus * num2; if (body.hasCloakBuff) { args.regenMultAdd += 3f; } if (itemCount > 0) { args.baseHealthAdd -= (float)(25 * itemCount); args.baseDamageAdd += 25f * ((float)itemCount * num); } if (itemCount2 > 0) { args.healthMultAdd -= 0.1f * (float)itemCount2; args.damageMultAdd += 0.1f * ((float)itemCount2 * num3); } if (itemCount3 > 0) { args.baseHealthAdd -= (float)(40 * itemCount3); args.baseDamageAdd += 40f * ((float)itemCount3 * num); } if (flag) { args.healthMultAdd -= 0.5f; args.damageMultAdd += 0.5f * num; } } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Dragonyck.Pyke", "Pyke", "1.0.6")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.Pyke"; public const string MODNAME = "Pyke"; public const string VERSION = "1.0.6"; public const string SURVIVORNAME = "Pyke"; public const string SURVIVORNAMEKEY = "PYKE"; public static GameObject characterPrefab; public GameObject characterDisplay; public GameObject doppelganger; private static readonly Color characterColor = new Color(0.16471f, 0.28627f, 0.2549f); private void Awake() { Assets.PopulateAssets(); Achievements.RegisterUnlockables(); Prefabs.CreatePrefabs(); CreatePrefab(); RegisterStates(); RegisterCharacter(); CreateDoppelganger(); Hook.Hooks(); } private static GameObject CreateModel(GameObject main) { Object.Destroy((Object)(object)((Component)main.transform.Find("ModelBase")).gameObject); Object.Destroy((Object)(object)((Component)main.transform.Find("CameraPivot")).gameObject); Object.Destroy((Object)(object)((Component)main.transform.Find("AimOrigin")).gameObject); return Assets.MainAssetBundle.LoadAsset<GameObject>("model"); } internal static void CreatePrefab() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_008c: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: 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_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0415: 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_04cd: Unknown result type (might be due to invalid IL or missing references) //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_0693: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06d7: Unknown result type (might be due to invalid IL or missing references) //IL_06f9: Unknown result type (might be due to invalid IL or missing references) //IL_0909: Unknown result type (might be due to invalid IL or missing references) //IL_0962: Unknown result type (might be due to invalid IL or missing references) //IL_097e: Unknown result type (might be due to invalid IL or missing references) //IL_0988: Unknown result type (might be due to invalid IL or missing references) //IL_09b3: Unknown result type (might be due to invalid IL or missing references) //IL_0a7a: Unknown result type (might be due to invalid IL or missing references) //IL_0a7f: Unknown result type (might be due to invalid IL or missing references) //IL_0aad: Unknown result type (might be due to invalid IL or missing references) //IL_0ab2: Unknown result type (might be due to invalid IL or missing references) //IL_0adb: Unknown result type (might be due to invalid IL or missing references) //IL_0ae0: Unknown result type (might be due to invalid IL or missing references) //IL_0af1: Unknown result type (might be due to invalid IL or missing references) //IL_0af6: Unknown result type (might be due to invalid IL or missing references) //IL_0b1f: Unknown result type (might be due to invalid IL or missing references) //IL_0b24: Unknown result type (might be due to invalid IL or missing references) //IL_0b35: Unknown result type (might be due to invalid IL or missing references) //IL_0b3a: Unknown result type (might be due to invalid IL or missing references) characterPrefab = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody"), "PykeBody", true); characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true; characterPrefab.AddComponent<Blank>(); ((HuntressTracker)characterPrefab.AddComponent<PykeTracker>()).maxTrackingDistance = 60f; GameObject val = CreateModel(characterPrefab); GameObject val2 = new GameObject("ModelBase"); val2.transform.parent = characterPrefab.transform; val2.transform.localPosition = new Vector3(0f, -0.94f, 0f); val2.transform.localRotation = Quaternion.identity; val2.transform.localScale = new Vector3(1f, 1f, 1f); GameObject val3 = new GameObject("AimOrigin"); val3.transform.parent = val2.transform; val3.transform.localPosition = new Vector3(0f, 2f, 0f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = Vector3.one; Transform transform = val.transform; transform.parent = val2.transform; transform.localPosition = Vector3.zero; transform.localScale = new Vector3(1f, 1f, 1f); transform.localRotation = Quaternion.identity; CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>(); component.moveVector = Vector3.zero; component.targetTransform = val2.transform; component.overrideAnimatorForwardTransform = null; component.rootMotionAccumulator = null; component.modelAnimator = val.GetComponentInChildren<Animator>(); component.driveFromRootRotation = false; component.turnSpeed = 720f; CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>(); ((Object)component2).name = "PykeBody"; component2.baseNameToken = "PYKE_NAME"; component2.subtitleNameToken = "PYKE_SUBTITLE"; component2.bodyFlags = (BodyFlags)16; component2.rootMotionInMainState = false; component2.mainRootSpeed = 0f; component2.baseMaxHealth = 130f; component2.levelMaxHealth = 45f; component2.baseRegen = 1f; component2.levelRegen = 0.33f; component2.baseMaxShield = 0f; component2.levelMaxShield = 0f; component2.baseMoveSpeed = 7f; component2.levelMoveSpeed = 0f; component2.baseAcceleration = 110f; component2.baseJumpPower = 15f; component2.levelJumpPower = 0f; component2.baseDamage = 12f; component2.levelDamage = 2.4f; component2.baseAttackSpeed = 1f; component2.levelAttackSpeed = 0f; component2.baseCrit = 1f; component2.levelCrit = 0f; component2.baseArmor = 30f; component2.levelArmor = 0f; component2.baseJumpCount = 2; component2.sprintingSpeedMultiplier = 1.45f; component2.wasLucky = false; component2.hideCrosshair = false; component2.aimOriginTransform = val3.transform; component2.hullClassification = (HullClassification)0; component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait").texture; component2.isChampion = false; component2.currentVehicle = null; component2.skinIndex = 0u; component2.preferredPodPrefab = null; component2.bodyColor = characterColor; CharacterMotor component3 = characterPrefab.GetComponent<CharacterMotor>(); component3.walkSpeedPenaltyCoefficient = 1f; component3.characterDirection = component; component3.muteWalkMotion = false; component3.mass = 80f; component3.airControl = 0.25f; component3.disableAirControlUntilCollision = false; component3.generateParametersOnAwake = true; InputBankTest component4 = characterPrefab.GetComponent<InputBankTest>(); component4.moveVector = Vector3.zero; CameraTargetParams component5 = characterPrefab.GetComponent<CameraTargetParams>(); component5.cameraParams = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody").GetComponent<CameraTargetParams>().cameraParams; component5.cameraPivotTransform = null; component5.recoil = Vector2.zero; component5.dontRaycastToPivot = false; ModelLocator component6 = characterPrefab.GetComponent<ModelLocator>(); component6.modelTransform = transform; component6.modelBaseTransform = val2.transform; component6.dontReleaseModelOnDeath = false; component6.autoUpdateModelTransform = true; component6.dontDetatchFromParent = false; component6.noCorpse = false; component6.normalizeToFloor = false; component6.preserveModel = false; ChildLocator component7 = val.GetComponent<ChildLocator>(); CharacterModel val4 = val.AddComponent<CharacterModel>(); SkinnedMeshRenderer[] componentsInChildren = val.GetComponentsInChildren<SkinnedMeshRenderer>(); List<RendererInfo> list = new List<RendererInfo>(); for (int i = 0; i < componentsInChildren.Length; i++) { list.Add(new RendererInfo { renderer = (Renderer)(object)componentsInChildren[i], defaultMaterial = Utils.InstantiateMaterial(((Renderer)componentsInChildren[i]).material.mainTexture), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }); } RendererInfo[] array = list.ToArray(); val4.body = component2; val4.baseRendererInfos = array; val4.autoPopulateLightInfos = true; val4.invisibilityCount = 0; val4.temporaryOverlays = new List<TemporaryOverlayInstance>(); Reflection.SetFieldValue<SkinnedMeshRenderer>((object)val4, "mainSkinnedMeshRenderer", componentsInChildren[0]); GameObject gameObject = ((Component)characterPrefab.GetComponentInChildren<ModelLocator>().modelTransform).gameObject; CharacterModel component8 = gameObject.GetComponent<CharacterModel>(); ModelSkinController val5 = gameObject.AddComponent<ModelSkinController>(); ChildLocator component9 = gameObject.GetComponent<ChildLocator>(); LanguageAPI.Add("PYKEBODY_DEFAULT_SKIN_NAME", "Default"); LanguageAPI.Add("PYKEBODY_SKIN01_SKIN_NAME", "Sand Wraith"); LanguageAPI.Add("PYKEBODY_SKIN02_SKIN_NAME", "Blood Moon"); LanguageAPI.Add("PYKEBODY_SKIN03_SKIN_NAME", "PROJECT"); LanguageAPI.Add("PYKEBODY_SKIN04_SKIN_NAME", "PsyOps"); LanguageAPI.Add("PYKEBODY_SKIN05_SKIN_NAME", "Sentinel"); LanguageAPI.Add("PYKEBODY_SKIN06_SKIN_NAME", "Ashen Knight"); LanguageAPI.Add("PYKEBODY_SKIN07_SKIN_NAME", "Empyrean"); val5.skins = (SkinDef[])(object)new SkinDef[8] { Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "PYKEBODY_DEFAULT_SKIN_NAME", "base", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "PYKEBODY_SKIN01_SKIN_NAME", "skin01", array, Achievements.Skin01Unlock)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "PYKEBODY_SKIN02_SKIN_NAME", "skin02", array, Achievements.Skin02Unlock)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "PYKEBODY_SKIN03_SKIN_NAME", "skin03", array, Achievements.Skin03Unlock)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "PYKEBODY_SKIN04_SKIN_NAME", "skin04", array, Achievements.Skin04Unlock)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "PYKEBODY_SKIN05_SKIN_NAME", "skin05", array, Achievements.Skin05Unlock)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "PYKEBODY_SKIN06_SKIN_NAME", "skin06", array, Achievements.Skin06Unlock)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "PYKEBODY_SKIN07_SKIN_NAME", "skin07", array, Achievements.Skin06Unlock)) }; TeamComponent val6 = null; val6 = ((!((Object)(object)characterPrefab.GetComponent<TeamComponent>() != (Object)null)) ? characterPrefab.GetComponent<TeamComponent>() : characterPrefab.GetComponent<TeamComponent>()); val6.hideAllyCardDisplay = false; val6.teamIndex = (TeamIndex)(-1); HealthComponent component10 = characterPrefab.GetComponent<HealthComponent>(); component10.health = 130f; component10.shield = 0f; component10.barrier = 0f; component10.magnetiCharge = 0f; component10.body = null; component10.dontShowHealthbar = false; component10.globalDeathEventChanceCoefficient = 1f; characterPrefab.GetComponent<Interactor>().maxInteractionDistance = 3f; characterPrefab.GetComponent<InteractionDriver>().highlightInteractor = true; SfxLocator component11 = characterPrefab.GetComponent<SfxLocator>(); component11.deathSound = "Play_ui_player_death"; component11.barkSound = ""; component11.openSound = ""; component11.landingSound = "Play_char_land"; component11.fallDamageSound = "Play_char_land_fall_damage"; component11.aliveLoopStart = ""; component11.aliveLoopStop = ""; Rigidbody component12 = characterPrefab.GetComponent<Rigidbody>(); component12.mass = 100f; component12.drag = 0f; component12.angularDrag = 0f; component12.useGravity = false; component12.isKinematic = true; component12.interpolation = (RigidbodyInterpolation)0; component12.collisionDetectionMode = (CollisionDetectionMode)0; component12.constraints = (RigidbodyConstraints)0; CapsuleCollider component13 = characterPrefab.GetComponent<CapsuleCollider>(); ((Collider)component13).isTrigger = false; ((Collider)component13).material = null; KinematicCharacterMotor component14 = characterPrefab.GetComponent<KinematicCharacterMotor>(); component14.playerCharacter = true; component14.Capsule = component13; HurtBoxGroup val7 = val.AddComponent<HurtBoxGroup>(); HurtBox val8 = ((Component)val.GetComponentInChildren<CapsuleCollider>()).gameObject.AddComponent<HurtBox>(); ((Component)val8).gameObject.layer = LayerIndex.entityPrecise.intVal; val8.healthComponent = component10; val8.isBullseye = true; val8.damageModifier = (DamageModifier)0; val8.hurtBoxGroup = val7; val8.indexInGroup = 0; val7.hurtBoxes = (HurtBox[])(object)new HurtBox[1] { val8 }; val7.mainHurtBox = val8; val7.bullseyeCount = 1; Utils.CreateHitbox("Swing", component9.FindChild("SwingMuzzle"), new Vector3(6f, 5f, 6f)); Utils.CreateHitbox("Execute", component9.FindChild("CenterMuzzle"), Vector3.one * 10f); Utils.CreateHitbox("ShortHook", component9.FindChild("SwingMuzzle"), new Vector3(3.5f, 5f, 8.5f)); AimAnimator val9 = val.AddComponent<AimAnimator>(); val9.inputBank = component4; val9.directionComponent = component; val9.pitchRangeMax = 55f; val9.pitchRangeMin = -50f; val9.yawRangeMin = -44f; val9.yawRangeMax = 44f; val9.pitchGiveupRange = 30f; val9.yawGiveupRange = 10f; val9.giveupDuration = 8f; FootstepHandler val10 = val.AddComponent<FootstepHandler>(); val10.baseFootstepString = "Play_player_footstep"; val10.sprintFootstepOverrideString = ""; val10.enableFootstepDust = true; val10.footstepDustPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/GenericFootstepDust"); EntityStateMachine component15 = ((Component)component2).GetComponent<EntityStateMachine>(); component15.mainStateType = new SerializableEntityStateType(typeof(CharacterMain)); CharacterDeathBehavior component16 = characterPrefab.GetComponent<CharacterDeathBehavior>(); component16.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>(); component16.deathState = new SerializableEntityStateType(typeof(GenericCharacterDeath)); EntityStateMachine val11 = characterPrefab.AddComponent<EntityStateMachine>(); val11.customName = "Dash"; val11.initialStateType = new SerializableEntityStateType(typeof(Idle)); val11.mainStateType = new SerializableEntityStateType(typeof(Idle)); EntityStateMachine val12 = characterPrefab.AddComponent<EntityStateMachine>(); val12.customName = "Execute"; val12.initialStateType = new SerializableEntityStateType(typeof(Idle)); val12.mainStateType = new SerializableEntityStateType(typeof(Idle)); NetworkStateMachine component17 = ((Component)component2).GetComponent<NetworkStateMachine>(); List<EntityStateMachine> list2 = component17.stateMachines.ToList(); list2.Add(val11); list2.Add(val12); component17.stateMachines = list2.ToArray(); ContentAddition.AddBody(characterPrefab); } private void RegisterCharacter() { //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) characterDisplay = PrefabAPI.InstantiateClone(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "PykeDisplay", true); characterDisplay.AddComponent<NetworkIdentity>(); SkinDef[] skins = characterDisplay.GetComponentInChildren<ModelSkinController>().skins; for (int i = 0; i < skins.Length; i++) { RendererInfo[] rendererInfos = skins[i].rendererInfos; for (int j = 0; j < rendererInfos.Length; j++) { rendererInfos[j].defaultMaterial.shaderKeywords = null; } } string text = "Pyke is a high risk, high reward burst damage assassin who thrives on executing groups of low health targets.<style=cSub>\r\n\r\n< ! > Pyke can single enemies out by pulling them using the hold variation of his Bone Skewer." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Be sure to utilize Pykes passive to remain healthy and reposition for damage potential." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Learning to manipulate Pykes skills can make him very lethal. However misusing an Ult can lead to death. Be sure to use your kit to its fullest potential." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Death From Below will execute enemies under 10% max health. This effect stacks with Critical Hit Chance up to a maximum of 25% upon reaching 200% critical hit chance."; string text2 = "..and so he left, returning to the depths to seek revenge."; string text3 = "..and so he vanished, never to be seen again."; string text4 = "A renowned harpooner from the slaughter docks of Bilgewater, Pyke should have met his death in the belly of a gigantic jaull-fish… and yet, he returned. Now, stalking the dank alleys and backways of his former hometown, he uses his new supernatural gifts to bring a swift and gruesome end to those who make their fortune by exploiting others—and a city that prides itself on hunting monsters now finds a monster hunting them."; LanguageAPI.Add("PYKE_NAME", "Pyke"); LanguageAPI.Add("PYKE_DESCRIPTION", text); LanguageAPI.Add("PYKE_LORE", text4); LanguageAPI.Add("PYKE_SUBTITLE", "Bloodharbor Ripper"); LanguageAPI.Add("PYKE_OUTRO", text2); LanguageAPI.Add("PYKE_FAIL", text3); SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>(); val.cachedName = "PYKE_NAME"; val.unlockableDef = null; val.descriptionToken = "PYKE_DESCRIPTION"; val.primaryColor = characterColor; val.bodyPrefab = characterPrefab; val.displayPrefab = characterDisplay; val.outroFlavorToken = "PYKE_OUTRO"; val.desiredSortPosition = 22f; val.mainEndingEscapeFailureFlavorToken = "PYKE_FAIL"; ContentAddition.AddSurvivorDef(val); SkillSetup(); } private void RegisterStates() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) bool flag = default(bool); ContentAddition.AddEntityState<Primary>(ref flag); ContentAddition.AddEntityState<Secondary>(ref flag); ContentAddition.AddEntityState<Utility>(ref flag); ContentAddition.AddEntityState<UtilityFire>(ref flag); ContentAddition.AddEntityState<Special>(ref flag); ContentAddition.AddEntityState<SpecialAim>(ref flag); ContentAddition.AddEntityState<SpecialExecute>(ref flag); ContentAddition.AddEntityState<CharacterMain>(ref flag); } private void SkillSetup() { GenericSkill[] componentsInChildren = characterPrefab.GetComponentsInChildren<GenericSkill>(); foreach (GenericSkill val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } PassiveSetup(); PrimarySetup(); SecondarySetup(); UtilitySetup(); SpecialSetup(); } private void PassiveSetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("PYKE_PASSIVE_NAME", "Gift of the Drowned Ones"); LanguageAPI.Add("PYKE_PASSIVE_DESCRIPTION", "Whenever Pyke is invisible he gains <style=cIsHealing>3x health regen</style>. Pyke also converts 100% of bonus health into bonus damage."); LanguageAPI.Add("PYKE_PASSIVE_KEYWORD", ""); component.passiveSkill.enabled = true; component.passiveSkill.skillNameToken = "PYKE_PASSIVE_NAME"; component.passiveSkill.skillDescriptionToken = "PYKE_PASSIVE_DESCRIPTION"; component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("pykepassive"); component.passiveSkill.keywordToken = "PYKE_PASSIVE_KEYWORD"; } private void PrimarySetup() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0153: 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) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("PYKE_M1", "Bloodripper Slash"); LanguageAPI.Add("PYKE_M1_DESCRIPTION", "Pyke swings his knife dealing <style=cIsDamage>170% damage</style> and on the third successive hit Pyke triggers a bleed effect on his enemies and deals <style=cIsDamage>250% damage</style>."); SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(Primary)); val.activationStateMachineName = "Weapon"; val.baseMaxStock = 0; val.baseRechargeInterval = 0f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.fullRestockOnAssign = true; val.interruptPriority = (InterruptPriority)0; val.isCombatSkill = true; val.mustKeyPress = false; val.cancelSprintingOnActivation = false; val.rechargeStock = 0; val.requiredStock = 0; val.stockToConsume = 0; val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("pykea"); val.skillDescriptionToken = "PYKE_M1_DESCRIPTION"; val.skillName = "PYKE_M1"; val.skillNameToken = "PYKE_M1"; ContentAddition.AddSkillDef(val); component.primary = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.primary, "_skillFamily", val2); SkillFamily skillFamily = component.primary.skillFamily; Variant[] variants = skillFamily.variants; Variant val3 = new Variant { skillDef = val }; ((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[0] = val3; ContentAddition.AddSkillFamily(skillFamily); } private void SecondarySetup() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("PYKE_M2", "Bone Skewer"); LanguageAPI.Add("PYKE_M2_DESCRIPTION", "(Tap) Pyke Stabs enemies in front of him for <style=cIsDamage>200% damage</style> and deals bonus damage to low health targets." + Environment.NewLine + "(Hold) Pyke charges and throws his Bone skewer dealing <style=cIsDamage>100% damage</style> damage and pulling enemies hit toward him. This move can be charged for additional distance and damage."); SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(Secondary)); val.activationStateMachineName = "Slide"; val.baseMaxStock = 1; val.baseRechargeInterval = 3f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.fullRestockOnAssign = false; val.interruptPriority = (InterruptPriority)0; val.isCombatSkill = true; val.mustKeyPress = true; val.cancelSprintingOnActivation = true; val.rechargeStock = 1; val.requiredStock = 1; val.stockToConsume = 1; val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("pykeq"); val.skillDescriptionToken = "PYKE_M2_DESCRIPTION"; val.skillName = "PYKE_M2"; val.skillNameToken = "PYKE_M2"; ContentAddition.AddSkillDef(val); component.secondary = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.secondary, "_skillFamily", val2); SkillFamily skillFamily = component.secondary.skillFamily; Variant[] variants = skillFamily.variants; Variant val3 = new Variant { skillDef = val }; ((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[0] = val3; ContentAddition.AddSkillFamily(skillFamily); } private void UtilitySetup() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0153: 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) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("PYKE_UTIL", "Phantom Undertow"); LanguageAPI.Add("PYKE_UTIL_DESCRIPTION", "Pyke Dashes forward leaving behind a phantom that returns to him dealing <style=cIsDamage>250% damage</style>, stunning and weakening enemies in its path."); SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(Utility)); val.activationStateMachineName = "Dash"; val.baseMaxStock = 1; val.baseRechargeInterval = 5f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.fullRestockOnAssign = false; val.interruptPriority = (InterruptPriority)0; val.isCombatSkill = false; val.mustKeyPress = true; val.cancelSprintingOnActivation = false; val.rechargeStock = 1; val.requiredStock = 1; val.stockToConsume = 1; val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("pykee"); val.skillDescriptionToken = "PYKE_UTIL_DESCRIPTION"; val.skillName = "PYKE_UTIL"; val.skillNameToken = "PYKE_UTIL"; ContentAddition.AddSkillDef(val); component.utility = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.utility, "_skillFamily", val2); SkillFamily skillFamily = component.utility.skillFamily; Variant[] variants = skillFamily.variants; Variant val3 = new Variant { skillDef = val }; ((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[0] = val3; ContentAddition.AddSkillFamily(skillFamily); } private void SpecialSetup() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0153: 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) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("PYKE_SPEC", "Death From Below"); LanguageAPI.Add("PYKE_SPEC_DESCRIPTION", "Pyke blinks to target location and slashes enemies for <style=cIsDamage>400% damage</style>. Enemies below a 10% of their max health are executed. If an enemy is executed using Death from Below Pyke, becomes Invisible for 3 seconds and can recast Death from Below for 5 seconds."); HuntressTrackingSkillDef val = ScriptableObject.CreateInstance<HuntressTrackingSkillDef>(); ((SkillDef)val).activationState = new SerializableEntityStateType(typeof(SpecialAim)); ((SkillDef)val).activationStateMachineName = "Execute"; ((SkillDef)val).baseMaxStock = 1; ((SkillDef)val).baseRechargeInterval = 15f; ((SkillDef)val).beginSkillCooldownOnSkillEnd = true; ((SkillDef)val).canceledFromSprinting = false; ((SkillDef)val).fullRestockOnAssign = false; ((SkillDef)val).interruptPriority = (InterruptPriority)0; ((SkillDef)val).isCombatSkill = true; ((SkillDef)val).mustKeyPress = true; ((SkillDef)val).cancelSprintingOnActivation = false; ((SkillDef)val).rechargeStock = 1; ((SkillDef)val).requiredStock = 1; ((SkillDef)val).stockToConsume = 1; ((SkillDef)val).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("pyker"); ((SkillDef)val).skillDescriptionToken = "PYKE_SPEC_DESCRIPTION"; ((SkillDef)val).skillName = "PYKE_SPEC"; ((SkillDef)val).skillNameToken = "PYKE_SPEC"; ContentAddition.AddSkillDef((SkillDef)(object)val); component.special = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.special, "_skillFamily", val2); SkillFamily skillFamily = component.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 void CreateDoppelganger() { doppelganger = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/CommandoMonsterMaster"), "PykeMaster", true); ContentAddition.AddMaster(doppelganger); CharacterMaster component = doppelganger.GetComponent<CharacterMaster>(); component.bodyPrefab = characterPrefab; } } internal class Prefabs { internal static BuffDef passive; internal static GameObject specialIndicator; internal static GameObject specialExecuteIndicator; internal static GameObject dashMesh; internal static GameObject utilLineEffect; internal static GameObject M1SwingEffect; internal static GameObject pykeHookProjectile; internal static GameObject pykeHookProjectileGhost; internal static GameObject pykeEyeTrail; internal static GameObject pykeImpactEffectM1; internal static GameObject pykeImpactEffect1; internal static GameObject pykeImpactEffectUtil; internal static GameObject pykeSpecialImpactEffect; internal static GameObject pykeShortHookEffect; internal static GameObject pykeSpecialExplosionEffect; internal static GameObject pykeSpecialIndicatorEffect; internal static GameObject trackingIndicator; internal static Material specialOverlayMat; internal static Material[] ELineRendererMats; internal static void CreatePrefabs() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Expected O, but got Unknown //IL_01ff: 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_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: 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_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_0592: 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_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0676: Unknown result type (might be due to invalid IL or missing references) //IL_067b: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Unknown result type (might be due to invalid IL or missing references) //IL_06c3: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_0737: Unknown result type (might be due to invalid IL or missing references) //IL_0763: 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_0791: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07ae: Unknown result type (might be due to invalid IL or missing references) //IL_07d7: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) //IL_07f4: Unknown result type (might be due to invalid IL or missing references) //IL_0854: Unknown result type (might be due to invalid IL or missing references) //IL_0859: Unknown result type (might be due to invalid IL or missing references) //IL_0886: Unknown result type (might be due to invalid IL or missing references) //IL_088b: Unknown result type (might be due to invalid IL or missing references) //IL_08b8: Unknown result type (might be due to invalid IL or missing references) //IL_08bd: Unknown result type (might be due to invalid IL or missing references) //IL_08ea: Unknown result type (might be due to invalid IL or missing references) //IL_08ef: Unknown result type (might be due to invalid IL or missing references) //IL_091c: Unknown result type (might be due to invalid IL or missing references) //IL_0921: Unknown result type (might be due to invalid IL or missing references) //IL_09c0: Unknown result type (might be due to invalid IL or missing references) //IL_09c5: Unknown result type (might be due to invalid IL or missing references) //IL_0a0f: Unknown result type (might be due to invalid IL or missing references) //IL_0a14: Unknown result type (might be due to invalid IL or missing references) //IL_0a48: Unknown result type (might be due to invalid IL or missing references) //IL_0a4d: Unknown result type (might be due to invalid IL or missing references) //IL_0a7c: Unknown result type (might be due to invalid IL or missing references) //IL_0a81: Unknown result type (might be due to invalid IL or missing references) //IL_0ab5: Unknown result type (might be due to invalid IL or missing references) //IL_0aba: Unknown result type (might be due to invalid IL or missing references) //IL_0ae9: Unknown result type (might be due to invalid IL or missing references) //IL_0aee: Unknown result type (might be due to invalid IL or missing references) //IL_0b1d: Unknown result type (might be due to invalid IL or missing references) //IL_0b22: Unknown result type (might be due to invalid IL or missing references) //IL_0b45: Unknown result type (might be due to invalid IL or missing references) //IL_0b4a: Unknown result type (might be due to invalid IL or missing references) //IL_0b94: Unknown result type (might be due to invalid IL or missing references) //IL_0b99: Unknown result type (might be due to invalid IL or missing references) //IL_0bcd: Unknown result type (might be due to invalid IL or missing references) //IL_0bd2: Unknown result type (might be due to invalid IL or missing references) //IL_0c01: Unknown result type (might be due to invalid IL or missing references) //IL_0c06: Unknown result type (might be due to invalid IL or missing references) //IL_0c3a: Unknown result type (might be due to invalid IL or missing references) //IL_0c3f: Unknown result type (might be due to invalid IL or missing references) //IL_0c6e: Unknown result type (might be due to invalid IL or missing references) //IL_0c73: Unknown result type (might be due to invalid IL or missing references) //IL_0ca2: Unknown result type (might be due to invalid IL or missing references) //IL_0ca7: Unknown result type (might be due to invalid IL or missing references) //IL_0cca: Unknown result type (might be due to invalid IL or missing references) //IL_0ccf: Unknown result type (might be due to invalid IL or missing references) //IL_0d19: Unknown result type (might be due to invalid IL or missing references) //IL_0d1e: Unknown result type (might be due to invalid IL or missing references) //IL_0d52: Unknown result type (might be due to invalid IL or missing references) //IL_0d57: Unknown result type (might be due to invalid IL or missing references) //IL_0d86: Unknown result type (might be due to invalid IL or missing references) //IL_0d8b: Unknown result type (might be due to invalid IL or missing references) //IL_0dbf: Unknown result type (might be due to invalid IL or missing references) //IL_0dc4: Unknown result type (might be due to invalid IL or missing references) //IL_0df3: Unknown result type (might be due to invalid IL or missing references) //IL_0df8: Unknown result type (might be due to invalid IL or missing references) //IL_0e27: Unknown result type (might be due to invalid IL or missing references) //IL_0e2c: Unknown result type (might be due to invalid IL or missing references) //IL_0e4f: Unknown result type (might be due to invalid IL or missing references) //IL_0e54: Unknown result type (might be due to invalid IL or missing references) //IL_0e9e: Unknown result type (might be due to invalid IL or missing references) //IL_0ea3: Unknown result type (might be due to invalid IL or missing references) //IL_0ed7: Unknown result type (might be due to invalid IL or missing references) //IL_0edc: Unknown result type (might be due to invalid IL or missing references) //IL_0f0b: Unknown result type (might be due to invalid IL or missing references) //IL_0f10: Unknown result type (might be due to invalid IL or missing references) //IL_0f44: Unknown result type (might be due to invalid IL or missing references) //IL_0f49: Unknown result type (might be due to invalid IL or missing references) //IL_0f78: Unknown result type (might be due to invalid IL or missing references) //IL_0f7d: Unknown result type (might be due to invalid IL or missing references) //IL_0fac: Unknown result type (might be due to invalid IL or missing references) //IL_0fb1: Unknown result type (might be due to invalid IL or missing references) Shader shader = Addressables.LoadAssetAsync<Shader>((object)"RoR2/Base/Shaders/HGStandard.shader").WaitForCompletion(); Assets.MainAssetBundle.LoadAsset<Material>("base").shader = shader; passive = ScriptableObject.CreateInstance<BuffDef>(); ((Object)passive).name = "Gift of the Drowned Ones"; passive.iconSprite = Assets.MainAssetBundle.LoadAsset<Sprite>("pykew"); passive.buffColor = Color.white; passive.canStack = false; passive.isDebuff = false; passive.eliteDef = null; ContentAddition.AddBuffDef(passive); trackingIndicator = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressTrackingIndicator.prefab").WaitForCompletion(), "TrackingIndicator", false); SpriteRenderer[] componentsInChildren = trackingIndicator.GetComponentsInChildren<SpriteRenderer>(); foreach (SpriteRenderer val in componentsInChildren) { val.color = Color.red; } specialIndicator = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(), "PykeSpecialIndicator", true); specialIndicator.AddComponent<NetworkIdentity>(); Object.Instantiate<GameObject>(Assets.MainAssetBundle.LoadAsset<GameObject>("executeIcon"), specialIndicator.transform); Transform val2 = specialIndicator.transform.Find("Expander").Find("Sphere"); val2.localScale = Vector3.one * 12f; ((Component)val2).GetComponent<MeshFilter>().mesh = Assets.MainAssetBundle.LoadAsset<Mesh>("ultIndicatorMesh"); specialExecuteIndicator = Assets.MainAssetBundle.LoadAsset<GameObject>("ExecuteIndicator"); dashMesh = Assets.MainAssetBundle.LoadAsset<GameObject>("EIdleMesh"); dashMesh.AddComponent<NetworkIdentity>(); MeshRenderer component = dashMesh.GetComponent<MeshRenderer>(); ((Renderer)component).material = new Material(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/VFX/matGhostEffect.mat").WaitForCompletion()); ((Renderer)component).material.SetTexture("_MainTex", (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/DLC2/Child/texChildPrimaryStarCloud.png").WaitForCompletion()); PrefabAPI.RegisterNetworkPrefab(dashMesh); specialOverlayMat = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/EliteHaunted/matEliteHauntedOverlay.mat").WaitForCompletion(); utilLineEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/MajorAndMinorConstruct/LaserMajorConstruct.prefab").WaitForCompletion(), "PykeUtilityEffect", true); utilLineEffect.AddComponent<NetworkIdentity>(); ELineRendererMats = (Material[])(object)new Material[3]; ELineRendererMats[0] = Assets.MainAssetBundle.LoadAsset<Material>("matEWaterLine"); ELineRendererMats[1] = Assets.MainAssetBundle.LoadAsset<Material>("matEWaterLine2"); ELineRendererMats[2] = Assets.MainAssetBundle.LoadAsset<Material>("matEWaterLine3"); LineRenderer component2 = ((Component)utilLineEffect.transform.Find("LaserStart")).GetComponent<LineRenderer>(); component2.textureMode = (LineTextureMode)1; Transform[] componentsInChildren2 = ((Component)utilLineEffect.transform.Find("LaserStart")).GetComponentsInChildren<Transform>(); Transform[] componentsInChildren3 = ((Component)utilLineEffect.transform.Find("LaserEnd")).GetComponentsInChildren<Transform>(); Transform[] array = componentsInChildren2; foreach (Transform val3 in array) { if (((Object)val3).name != "LaserStart") { Object.Destroy((Object)(object)((Component)val3).gameObject); } } Transform[] array2 = componentsInChildren3; foreach (Transform val4 in array2) { if (((Object)val4).name != "LaserEnd") { Object.Destroy((Object)(object)((Component)val4).gameObject); } } Object.Destroy((Object)(object)((Component)utilLineEffect.transform.Find("LaserEnd")).GetComponent<ShakeEmitter>()); M1SwingEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("SwingFX"); Utils.RegisterEffect(M1SwingEffect, 1f); Material val5 = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Gravekeeper/matGravekeeperHookChain.mat").WaitForCompletion()); val5.mainTexture = Addressables.LoadAssetAsync<Texture>((object)"RoR2/Base/Common/VFX/ParticleMasks/texLightning3Mask.tif").WaitForCompletion(); val5.SetColor("_TintColor", new Color(0.30588f, 0.20784f, 0.14118f)); pykeHookProjectileGhost = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Gravekeeper/GravekeeperHookGhost.prefab").WaitForCompletion(), "PykeHookProjectileGhost", true); pykeHookProjectileGhost.AddComponent<NetworkIdentity>(); ((Renderer)((Component)pykeHookProjectileGhost.transform.Find("WinchHead").Find("Trail")).GetComponent<TrailRenderer>()).material = val5; Object.Destroy((Object)(object)((Component)pykeHookProjectileGhost.transform.Find("WinchHead").Find("WinchMesh")).gameObject); Object.Instantiate<GameObject>(Assets.MainAssetBundle.LoadAsset<GameObject>("blademodel"), pykeHookProjectileGhost.transform); pykeHookProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Gravekeeper/GravekeeperHookProjectileSimple.prefab").WaitForCompletion(), "PykeHookProjectile", true); Object.Destroy((Object)(object)pykeHookProjectile.GetComponent<AkEvent>()); pykeHookProjectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = pykeImpactEffect1; ProjectileController component3 = pykeHookProjectile.GetComponent<ProjectileController>(); component3.ghostPrefab = pykeHookProjectileGhost; ProjectileSimple component4 = pykeHookProjectile.GetComponent<ProjectileSimple>(); component4.lifetime = 0.6f; component4.desiredForwardSpeed = 30f; ContentAddition.AddProjectile(pykeHookProjectile); GameObject gameObject = ((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/Railgunner/RailgunnerPistolProjectileGhost.prefab").WaitForCompletion().transform.Find("Trail")).gameObject; Material val6 = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Brother/matBrotherEyeTrail.mat").WaitForCompletion(); val6.SetColor("_TintColor", new Color(0f, 0.3867925f, 0.2250429f)); pykeEyeTrail = PrefabAPI.InstantiateClone(gameObject, "PykeEyeTrail", true); pykeEyeTrail.AddComponent<NetworkIdentity>(); TrailRenderer component5 = pykeEyeTrail.GetComponent<TrailRenderer>(); ((Renderer)component5).material = val6; component5.startColor = new Color(0f, 0.3867925f, 0.2250429f); component5.time = 0.4f; component5.startWidth = 0.1f; component5.endWidth = 0.1f; component5.widthMultiplier = 0.1f; component5.minVertexDistance = 0.1f; component5.shadowBias = 0.5f; Color color = default(Color); ((Color)(ref color))..ctor(0f, 0.3867925f, 0.2250429f); pykeImpactEffectM1 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Junk/Bandit/OmniImpactExecuteBandit.prefab").WaitForCompletion(), "PykeSwingImpactEffect", true); pykeImpactEffectM1.transform.localScale = Vector3.one * 0.6f; pykeImpactEffectM1.AddComponent<NetworkIdentity>(); Utils.RecolorEffect(pykeImpactEffectM1, color); pykeImpactEffectM1.GetComponent<EffectComponent>().soundName = "Play_Pyke_BASE_M1HIT"; ContentAddition.AddEffect(pykeImpactEffectM1); pykeImpactEffect1 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ExecuteLowHealthElite/OmniImpactExecute.prefab").WaitForCompletion(), "PykeImpactEffect", true); pykeImpactEffect1.AddComponent<NetworkIdentity>(); Object.Destroy((Object)(object)pykeImpactEffect1.transform.Find("Scaled Hitspark 2 (Random Color)")); Utils.RecolorEffect(pykeImpactEffect1, color); pykeImpactEffect1.GetComponent<EffectComponent>().soundName = "Play_Pyke_BASE_QHIT"; ContentAddition.AddEffect(pykeImpactEffect1); pykeImpactEffectUtil = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Loader/OmniImpactVFXLoader.prefab").WaitForCompletion(), "PykeDashImpactEffect", true); pykeImpactEffectUtil.AddComponent<NetworkIdentity>(); Utils.RecolorEffect(pykeImpactEffectUtil, color); ContentAddition.AddEffect(pykeImpactEffectUtil); pykeSpecialImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/OmniImpactVFXSlashMerc.prefab").WaitForCompletion(), "PykeSpecialImpactEffect", true); pykeSpecialImpactEffect.AddComponent<NetworkIdentity>(); Utils.RecolorEffect(pykeSpecialImpactEffect, color); ContentAddition.AddEffect(pykeSpecialImpactEffect); pykeShortHookEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Loader/LoaderFistLoop.prefab").WaitForCompletion(), "PykeShortHookEffect", true); pykeShortHookEffect.AddComponent<NetworkIdentity>(); pykeShortHookEffect.AddComponent<DestroyOnTimer>().duration = 0.3f; ((Renderer)((Component)pykeShortHookEffect.transform.Find("Spinner").Find("Trail")).GetComponent<TrailRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/LifestealOnHit/matLifeStealOnHitAuraTrails.mat").WaitForCompletion(); ((Renderer)((Component)pykeShortHookEffect.transform.Find("LoaderLightning")).GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Imp/matImpPortalEffectEdge.mat").WaitForCompletion(); ((Renderer)((Component)pykeShortHookEffect.transform.Find("OmniBillboard")).GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/bazaar/matBazaarSeerDampcavesimple.mat").WaitForCompletion(); ((Renderer)((Component)pykeShortHookEffect.transform.Find("Sparks, Fast")).GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/Railgunner/matRailgunImpactSpikes.mat").WaitForCompletion(); ((Renderer)((Component)pykeShortHookEffect.transform.Find("Ring Billboards")).GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/bazaar/matBazaarSeerDampcavesimple.mat").WaitForCompletion(); Object.Destroy((Object)(object)((Component)pykeShortHookEffect.transform.Find("Dust")).gameObject); pykeSpecialIndicatorEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("ExecuteFX"); Transform parent = pykeSpecialIndicatorEffect.transform.Find("pos1"); Transform parent2 = pykeSpecialIndicatorEffect.transform.Find("pos2"); Transform parent3 = pykeSpecialIndicatorEffect.transform.Find("pos3"); Transform parent4 = pykeSpecialIndicatorEffect.transform.Find("pos4"); GameObject val7 = PrefabAPI.InstantiateClone(((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Gravekeeper/GravekeeperHookProjectileSimple.prefab").WaitForCompletion().transform.Find("StickEffect")).gameObject, "PykeSpecialExplosionEffect", false); ((Renderer)((Component)val7.transform.Find("Dust, Directional")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GreaterWisp/matGreaterWispRays.mat").WaitForCompletion(); ((Renderer)((Component)val7.transform.Find("Dust, Directional")).gameObject.GetComponent<ParticleSystemRenderer>()).material.mainTexture = (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/VFX/texOmniShockwave3Mask.png").WaitForCompletion(); ((Renderer)((Component)val7.transform.Find("Dust")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Loader/matOmniRing2Loader.mat").WaitForCompletion(); ((Renderer)((Component)val7.transform.Find("Dust")).gameObject.GetComponent<ParticleSystemRenderer>()).material.mainTexture = (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/VFX/texOmniHitspark1Mask.png").WaitForCompletion(); ((Renderer)((Component)val7.transform.Find("Debris")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GreaterWisp/matGreaterWispRays.mat").WaitForCompletion(); ((Renderer)((Component)val7.transform.Find("Flash")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GreaterWisp/matGreaterWispRays.mat").WaitForCompletion(); val7.transform.parent = parent; GameObject val8 = PrefabAPI.InstantiateClone(((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Gravekeeper/GravekeeperHookProjectileSimple.prefab").WaitForCompletion().transform.Find("StickEffect")).gameObject, "pykeSpecialExplosionEffect2", false); ((Renderer)((Component)val8.transform.Find("Dust, Directional")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GreaterWisp/matGreaterWispRays.mat").WaitForCompletion(); ((Renderer)((Component)val8.transform.Find("Dust, Directional")).gameObject.GetComponent<ParticleSystemRenderer>()).material.mainTexture = (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/VFX/texOmniShockwave3Mask.png").WaitForCompletion(); ((Renderer)((Component)val8.transform.Find("Dust")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Loader/matOmniRing2Loader.mat").WaitForCompletion(); ((Renderer)((Component)val8.transform.Find("Dust")).gameObject.GetComponent<ParticleSystemRenderer>()).material.mainTexture = (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/VFX/texOmniHitspark1Mask.png").WaitForCompletion(); ((Renderer)((Component)val8.transform.Find("Debris")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GreaterWisp/matGreaterWispRays.mat").WaitForCompletion(); ((Renderer)((Component)val8.transform.Find("Flash")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GreaterWisp/matGreaterWispRays.mat").WaitForCompletion(); val8.transform.parent = parent2; GameObject val9 = PrefabAPI.InstantiateClone(((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Gravekeeper/GravekeeperHookProjectileSimple.prefab").WaitForCompletion().transform.Find("StickEffect")).gameObject, "pykeSpecialExplosionEffect3", false); ((Renderer)((Component)val9.transform.Find("Dust, Directional")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GreaterWisp/matGreaterWispRays.mat").WaitForCompletion(); ((Renderer)((Component)val9.transform.Find("Dust, Directional")).gameObject.GetComponent<ParticleSystemRenderer>()).material.mainTexture = (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/VFX/texOmniShockwave3Mask.png").WaitForCompletion(); ((Renderer)((Component)val9.transform.Find("Dust")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Loader/matOmniRing2Loader.mat").WaitForCompletion(); ((Renderer)((Component)val9.transform.Find("Dust")).gameObject.GetComponent<ParticleSystemRenderer>()).material.mainTexture = (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/VFX/texOmniHitspark1Mask.png").WaitForCompletion(); ((Renderer)((Component)val9.transform.Find("Debris")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GreaterWisp/matGreaterWispRays.mat").WaitForCompletion(); ((Renderer)((Component)val9.transform.Find("Flash")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GreaterWisp/matGreaterWispRays.mat").WaitForCompletion(); val9.transform.parent = parent3; GameObject val10 = PrefabAPI.InstantiateClone(((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Gravekeeper/GravekeeperHookProjectileSimple.prefab").WaitForCompletion().transform.Find("StickEffect")).gameObject, "pykeSpecialExplosionEffect4", false); ((Renderer)((Component)val10.transform.Find("Dust, Directional")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GreaterWisp/matGreaterWispRays.mat").WaitForCompletion(); ((Renderer)((Component)val10.transform.Find("Dust, Directional")).gameObject.GetComponent<ParticleSystemRenderer>()).material.mainTexture = (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/VFX/texOmniShockwave3Mask.png").WaitForCompletion(); ((Renderer)((Component)val10.transform.Find("Dust")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Loader/matOmniRing2Loader.mat").WaitForCompletion(); ((Renderer)((Component)val10.transform.Find("Dust")).gameObject.GetComponent<ParticleSystemRenderer>()).material.mainTexture = (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/VFX/texOmniHitspark1Mask.png").WaitForCompletion(); ((Renderer)((Component)val10.transform.Find("Debris")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GreaterWisp/matGreaterWispRays.mat").WaitForCompletion(); ((Renderer)((Component)val10.transform.Find("Flash")).gameObject.GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GreaterWisp/matGreaterWispRays.mat").WaitForCompletion(); val10.transform.parent = parent4; Utils.RegisterEffect(pykeSpecialIndicatorEffect, 0.7f); } } internal class Primary : BaseSkillState { public enum ComboState { Attack1, Attack2, Attack3 } internal static float baseComboAttackDuration; internal static float baseFinisherAttackDuration; internal static float baseEarlyExitDuration; internal static string comboAttackSoundString; internal static string finisherAttackSoundString; internal static float comboDamageCoefficient = 1.7f; internal static float finisherDamageCoefficient = 2.5f; internal static float forceMagnitude; internal static float hitPauseDuration; internal static float selfForceMagnitude; internal static float slashPitch; private float stopwatch; private float attackDuration; private float earlyExitDuration; private Animator animator; private OverlapAttack overlapAttack; private float hitPauseTimer; private bool isInHitPause; private bool hasSwung; private bool hasHit; internal ComboState comboState; private Vector3 characterForward; private string slashChildName; private HitStopCachedState hitStopCachedState; public GameObject swingEffectPrefab = Prefabs.M1SwingEffect; public GameObject hitEffectPrefab; private string attackSoundString; private float swingtimer; private bool hop; public override void OnEnter() { //IL_018d: 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_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: 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) ((BaseState)this).OnEnter(); hop = true; stopwatch = 0f; earlyExitDuration = GroundLight.baseEarlyExitDuration / ((BaseState)this).attackSpeedStat; animator = ((EntityState)this).GetModelAnimator(); bool @bool = animator.GetBool("isMoving"); bool bool2 = animator.GetBool("isGrounded"); swingtimer = 0f; animator.SetFloat("Swing", 0f); Transform modelTransform = ((EntityState)this).GetModelTransform(); switch (CharacterMain.skinIndex) { case 0: attackSoundString = "Play_Pyke_BASE_M1SWING"; break; case 1: attackSoundString = "Play_Pyke_PROJECT_M1SWING"; break; case 2: attackSoundString = "Play_Pyke_ASHEN_M1SWING"; break; } switch (comboState) { case ComboState.Attack1: attackDuration = GroundLight.baseComboAttackDuration / ((BaseState)this).attackSpeedStat; overlapAttack = ((BaseState)this).InitMeleeOverlap(GroundLight.comboDamageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), "Swing"); if (@bool || !bool2) { ((EntityState)this).PlayAnimation("Gesture, Override", "Attack1", "M1", attackDuration, 0f); } else { ((EntityState)this).PlayAnimation("FullBody, Override", "Attack1", "M1", attackDuration, 0f); } hitEffectPrefab = Prefabs.pykeImpactEffectM1; swingEffectPrefab.transform.localScale = Vector3.one; slashChildName = "SwingMuzzle"; overlapAttack.damageType = DamageTypeCombo.GenericPrimary; break; case ComboState.Attack2: attackDuration = GroundLight.baseComboAttackDuration / ((BaseState)this).attackSpeedStat; overlapAttack = ((BaseState)this).InitMeleeOverlap(comboDamageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), "Swing"); if (@bool || !bool2) { ((EntityState)this).PlayAnimation("Gesture, Override", "Attack2", "M1", attackDuration, 0f); } else { ((EntityState)this).PlayAnimation("FullBody, Override", "Attack2", "M1", attackDuration, 0f); } hitEffectPrefab = Prefabs.pykeImpactEffectM1; swingEffectPrefab.transform.localScale = new Vector3(-1f, 1f, 1f); slashChildName = "SwingMuzzle"; overlapAttack.damageType = DamageTypeCombo.GenericPrimary; break; case ComboState.Attack3: attackDuration = GroundLight.baseFinisherAttackDuration / ((BaseState)this).attackSpeedStat; overlapAttack = ((BaseState)this).InitMeleeOverlap(finisherDamageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), "Swing"); if (@bool || !bool2) { ((EntityState)this).PlayAnimation("Gesture, Override", "Attack3", "M1", attackDuration, 0f); } else { ((EntityState)this).PlayAnimation("FullBody, Override", "Attack3", "M1", attackDuration, 0f); } hitEffectPrefab = Prefabs.pykeImpactEffectM1; swingEffectPrefab.transform.localScale = Vector3.one; slashChildName = "SwingMuzzle2"; overlapAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)1024) | DamageTypeCombo.GenericPrimary; break; } overlapAttack.hitEffectPrefab = hitEffectPrefab; } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); hitPauseTimer -= Time.fixedDeltaTime; swingtimer += Time.fixedDeltaTime; animator.SetFloat("Swing", swingtimer); if (((EntityState)this).isAuthority) { bool flag = ((BaseState)this).FireMeleeOverlap(overlapAttack, animator, "Swing", forceMagnitude, true); hasHit |= flag; if (flag) { if (hop && !((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 5f); hop = false; } if (!isInHitPause) { hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "M1"); hitPauseTimer = hitPauseDuration / ((BaseState)this).attackSpeedStat; isInHitPause = true; } } if (hitPauseTimer <= 0f && isInHitPause) { ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); isInHitPause = false; } } if (animator.GetFloat("Swing") > 0f && !hasSwung) { Util.PlayAttackSpeedSound(attackSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); HealthComponent healthComponent = ((EntityState)this).characterBody.healthComponent; CharacterDirection component = ((Component)((EntityState)this).characterBody).GetComponent<CharacterDirection>(); if (Object.op_Implicit((Object)(object)healthComponent) && NetworkServer.active) { healthComponent.TakeDamageForce(selfForceMagnitude * component.forward, true, false); } hasSwung = true; EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, slashChildName, false); } if (!isInHitPause) { stopwatch += Time.fixedDeltaTime; } else { ((EntityState)this).characterMotor.velocity = Vector3.zero; animator.SetFloat("M1", 0f); } if (((EntityState)this).isAuthority && stopwatch >= attackDuration - earlyExitDuration) { if (hasSwung || overlapAttack.Fire((List<HurtBox>)null)) { } if (((EntityState)this).inputBank.skill1.down && comboState != ComboState.Attack3) { Primary primary = new Primary(); primary.comboState = comboState + 1; ((EntityState)this).outer.SetNextState((EntityState)(object)primary); } else if (stopwatch >= attackDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } } 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; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write((byte)comboState); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); comboState = (ComboState)reader.ReadByte(); } } internal class Secondary : BaseSkillState { private float duration; private float baseDuration = 0.35f; private float distance; private Animator animator; private Ray aimRay; private float damageCoefficient = 2f; private float hookdmg = 1f; private HitBoxGroup hitBoxGroup; private uint shortCast; private uint throwCast; private uint charge; private ChildLocator childLocator; private uint ID; public override void OnEnter() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); childLocator = ((EntityState)this).GetModelChildLocator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelTransform())) { hitBoxGroup = Array.Find(((Component)((EntityState)this).GetModelTransform()).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "ShortHook"); } aimRay = ((BaseState)this).GetAimRay(); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayAnimation("Gesture, Override", "Spell1Charge"); animator.SetBool("Spell1Short", false); animator.SetBool("Spell1Throw", false); switch (CharacterMain.skinIndex) { case 0: shortCast = Sounds.Play_Pyke_BASE_QSHORT; charge = Sounds.Play_Pyke_BASE_QCAS; throwCast = Sounds.Play_Pyke_BASE_QTHROW; break; case 1: shortCast = Sounds.Play_Pyke_PROJECT_QSHORT; charge = Sounds.Play_Pyke_PROJECT_QCAS; throwCast = Sounds.Play_Pyke_PROJECT_QTHROW; break; case 2: shortCast = Sounds.Play_Pyke_ASHEN_QSHORT; charge = Sounds.Play_Pyke_ASHEN_QCAS; throwCast = Sounds.Play_Pyke_ASHEN_QTHROW; break; } ID = AkSoundEngine.PostEvent(charge, ((EntityState)this).gameObject); ((EntityState)this).characterBody.SetAimTimer(0f); } public override void FixedUpdate() { //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = false; if (!Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) || Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { } if (((EntityState)this).isAuthority) { if (((EntityState)this).inputBank.skill2.down) { distance += Time.fixedDeltaTime; } else if (distance <= 0.3f) { if (((EntityState)this).isAuthority) { Object.Instantiate<GameObject>(Prefabs.pykeShortHookEffect, childLocator.FindChild("HandR")); AkSoundEngine.StopPlayingID(ID); AkSoundEngine.PostEvent(shortCast, ((EntityState)this).gameObject); animator.SetBool("Spell1Short", true); bool flag = new OverlapAttack { procChainMask = default(ProcChainMask), procCoefficient = 1f, attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex, damage = ((BaseState)this).damageStat * damageCoefficient, forceVector = Vector3.back * 120f, hitEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ExecuteLowHealthElite/OmniImpactExecute.prefab").WaitForCompletion(), isCrit = ((BaseState)this).RollCrit(), damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)524296), maximumOverlapTargets = 9999999, hitBoxGroup = hitBoxGroup }.Fire((List<HurtBox>)null); ((EntityState)this).outer.SetNextStateToMain(); return; } } else if (((EntityState)this).isAuthority) { FireHook(); ((EntityState)this).outer.SetNextStateToMain(); return; } } if (distance >= 2f) { FireHook(); ((EntityState)this).outer.SetNextStateToMain(); } } private void FireHook() { //IL_0040: Unknown result type