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 HUNK v1.0.21
HunkMod.dll
Decompiled 7 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using DanteMod.Content.Components; using DanteMod.Content.Survivors; using DanteMod.Modules; using EntityStates; using EntityStates.AI; using EntityStates.AI.Walker; using EntityStates.AcidLarva; using EntityStates.BeetleGuardMonster; using EntityStates.BeetleMonster; using EntityStates.Bison; using EntityStates.BrotherMonster; using EntityStates.ClayBruiser.Weapon; using EntityStates.ClayGrenadier; using EntityStates.Commando.CommandoWeapon; using EntityStates.Croco; using EntityStates.Drone.DroneWeapon; using EntityStates.FalseSonBoss; using EntityStates.GlobalSkills.LunarDetonator; using EntityStates.GlobalSkills.LunarNeedle; using EntityStates.GolemMonster; using EntityStates.JellyfishMonster; using EntityStates.LemurianBruiserMonster; using EntityStates.Mage.Weapon; using EntityStates.MiniMushroom; using EntityStates.Missions.BrotherEncounter; using EntityStates.ParentMonster; using EntityStates.SurvivorPod; using EntityStates.VoidInfestor; using HG; using HG.BlendableTypes; using HunkMod; using HunkMod.Modules; using HunkMod.Modules.Achievements; using HunkMod.Modules.AchievementsRedux; using HunkMod.Modules.Artifacts; using HunkMod.Modules.Components; using HunkMod.Modules.Components.UI; using HunkMod.Modules.Enemies; using HunkMod.Modules.Misc; using HunkMod.Modules.Objectives; using HunkMod.Modules.Survivors; using HunkMod.Modules.Weapons; using HunkMod.Modules.Weapons.Grenade; using HunkMod.SkillStates; using HunkMod.SkillStates.BaseStates; using HunkMod.SkillStates.C4; using HunkMod.SkillStates.Emote; using HunkMod.SkillStates.Helicopter; using HunkMod.SkillStates.Hunk; using HunkMod.SkillStates.Hunk.Cling; using HunkMod.SkillStates.Hunk.Counter; using HunkMod.SkillStates.Hunk.Grenade; using HunkMod.SkillStates.Hunk.Pod; using HunkMod.SkillStates.Hunk.Weapon.ATM; using HunkMod.SkillStates.Hunk.Weapon.ATM2; using HunkMod.SkillStates.Hunk.Weapon.AssaultRifle; using HunkMod.SkillStates.Hunk.Weapon.BlueRose; using HunkMod.SkillStates.Hunk.Weapon.BroomHC; using HunkMod.SkillStates.Hunk.Weapon.Colt; using HunkMod.SkillStates.Hunk.Weapon.Flamethrower; using HunkMod.SkillStates.Hunk.Weapon.GoldenGun; using HunkMod.SkillStates.Hunk.Weapon.GrappleGun; using HunkMod.SkillStates.Hunk.Weapon.GrenadeLauncher; using HunkMod.SkillStates.Hunk.Weapon.M19; using HunkMod.SkillStates.Hunk.Weapon.M3; using HunkMod.SkillStates.Hunk.Weapon.MGL; using HunkMod.SkillStates.Hunk.Weapon.MUP; using HunkMod.SkillStates.Hunk.Weapon.Magnum; using HunkMod.SkillStates.Hunk.Weapon.Minigun; using HunkMod.SkillStates.Hunk.Weapon.Railgun; using HunkMod.SkillStates.Hunk.Weapon.Revolver; using HunkMod.SkillStates.Hunk.Weapon.RocketLauncher; using HunkMod.SkillStates.Hunk.Weapon.SMG; using HunkMod.SkillStates.Hunk.Weapon.SSG; using HunkMod.SkillStates.Hunk.Weapon.ScanGun; using HunkMod.SkillStates.Hunk.Weapon.Shotgun; using HunkMod.SkillStates.Hunk.Weapon.Slugger; using HunkMod.SkillStates.Hunk.Weapon.Sparkshot; using HunkMod.SkillStates.Hunk.Weapon.StreetSweeper; using HunkMod.SkillStates.Nemesis; using HunkMod.SkillStates.Nemesis.Biomass; using HunkMod.SkillStates.Nemesis.Charge; using HunkMod.SkillStates.Nemesis.Execution; using HunkMod.SkillStates.Nemesis.Leap; using HunkMod.SkillStates.Nemesis.Melee; using HunkMod.SkillStates.Nemesis.Tentacle; using HunkMod.SkillStates.Parasite; using HunkMod.SkillStates.Virus; using JetBrains.Annotations; using KinematicCharacterController; using MaterialHud; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates; using On.EntityStates.AI; using On.EntityStates.AcidLarva; using On.EntityStates.BeetleGuardMonster; using On.EntityStates.BeetleMonster; using On.EntityStates.Bison; using On.EntityStates.BrotherMonster; using On.EntityStates.ClayBruiser.Weapon; using On.EntityStates.ClayGrenadier; using On.EntityStates.GlobalSkills.LunarDetonator; using On.EntityStates.GlobalSkills.LunarNeedle; using On.EntityStates.GolemMonster; using On.EntityStates.JellyfishMonster; using On.EntityStates.LemurianBruiserMonster; using On.EntityStates.MiniMushroom; using On.EntityStates.Missions.BrotherEncounter; using On.EntityStates.ParentMonster; using On.RoR2; using On.RoR2.CameraModes; using On.RoR2.Projectile; using On.RoR2.UI; using On.RoR2.UI.LogBook; using On.RoR2.UI.MainMenu; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using Rewired; using Rewired.ComponentControls.Effects; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CameraModes; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.HudOverlay; using RoR2.Items; using RoR2.Navigation; using RoR2.Networking; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2.UI.MainMenu; using RobItems.Content; using TMPro; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } internal class BodyInfo { internal string bodyName = ""; internal string bodyNameToken = ""; internal string subtitleNameToken = ""; internal Color bodyColor = Color.white; internal Texture characterPortrait; internal GameObject crosshair; internal GameObject podPrefab; internal float maxHealth = 100f; internal float healthGrowth = 2f; internal float healthRegen; internal float shield; internal float shieldGrowth; internal float moveSpeed = 7f; internal float moveSpeedGrowth; internal float acceleration = 80f; internal float jumpPower = 15f; internal float jumpPowerGrowth; internal float damage = 12f; internal float attackSpeed = 1f; internal float attackSpeedGrowth; internal float armor; internal float armorGrowth; internal float crit = 1f; internal float critGrowth; internal int jumpCount = 1; } internal class CustomRendererInfo { internal string childName; internal Material material; internal bool ignoreOverlays; } internal enum HunkCameraParams { DEFAULT, AIM, AIM_SNIPER, AIM_NEMI, MELEE, EMOTE, FAR } [CreateAssetMenu(fileName = "wpn", menuName = "ScriptableObjects/WeaponDef", order = 1)] public class HunkWeaponDef : ScriptableObject { public enum AnimationSet { Pistol, SMG, Rocket, Unarmed, Throwable, PistolAlt, Railgun, Jacket } [Header("General")] public string nameToken = ""; public string descriptionToken = ""; public Sprite icon; public GameObject crosshairPrefab; public int magSize = 8; public float magPickupMultiplier = 1f; public int startingMags = 1; public float reloadDuration = 2.4f; public string ammoName = ""; public bool allowAutoReload = true; public bool exposeWeakPoints = true; public bool roundReload; public bool canPickUpAmmo = true; public bool isInfinite; public bool hasCrosshair = true; [Header("Skills")] public SkillDef primarySkillDef; [Header("Visuals")] public GameObject modelPrefab; public AnimationSet animationSet = AnimationSet.SMG; public bool storedOnBack = true; public bool storedOnHolster; public string aimSoundString = "sfx_hunk_smg_aim"; public string equipSoundString = "sfx_hunk_equip_smg"; [Header("UI")] public float damageFillValue; public float rangefillValue; public float fireRateFillValue; public float reloadFillValue; public float accuracyFillValue; [HideInInspector] public ushort index; [HideInInspector] public ItemDef itemDef; public static HunkWeaponDef CreateWeaponDefFromInfo(HunkWeaponDefInfo weaponDefInfo) { HunkWeaponDef obj = (HunkWeaponDef)(object)ScriptableObject.CreateInstance(typeof(HunkWeaponDef)); ((Object)obj).name = weaponDefInfo.nameToken; obj.nameToken = weaponDefInfo.nameToken; obj.descriptionToken = weaponDefInfo.descriptionToken; obj.icon = weaponDefInfo.icon; obj.crosshairPrefab = weaponDefInfo.crosshairPrefab; obj.magSize = weaponDefInfo.magSize; obj.magPickupMultiplier = weaponDefInfo.magPickupMultiplier; obj.startingMags = weaponDefInfo.startingMags; obj.reloadDuration = weaponDefInfo.reloadDuration; obj.ammoName = weaponDefInfo.ammoName; obj.primarySkillDef = weaponDefInfo.primarySkillDef; obj.modelPrefab = weaponDefInfo.modelPrefab; obj.animationSet = weaponDefInfo.animationSet; obj.storedOnBack = weaponDefInfo.storedOnBack; obj.storedOnHolster = weaponDefInfo.storedOnHolster; obj.damageFillValue = weaponDefInfo.damageFillValue; obj.rangefillValue = weaponDefInfo.rangefillValue; obj.fireRateFillValue = weaponDefInfo.fireRateFillValue; obj.reloadFillValue = weaponDefInfo.reloadFillValue; obj.accuracyFillValue = weaponDefInfo.accuracyFillValue; obj.aimSoundString = weaponDefInfo.aimSoundString; obj.equipSoundString = weaponDefInfo.equipSoundString; return obj; } public HunkWeaponDef CloneWeapon(bool addToCatalog = true) { HunkWeaponDef hunkWeaponDef = Object.Instantiate<HunkWeaponDef>(this); HunkWeaponCatalog.AddWeapon(hunkWeaponDef, addItem: false); ContentAddition.AddItemDef(hunkWeaponDef.itemDef); return hunkWeaponDef; } } [Serializable] public struct HunkWeaponDefInfo { public string nameToken; public string descriptionToken; public Sprite icon; public GameObject crosshairPrefab; public int magSize; public float magPickupMultiplier; public int startingMags; public float reloadDuration; public string ammoName; public SkillDef primarySkillDef; public GameObject modelPrefab; public HunkWeaponDef.AnimationSet animationSet; public bool storedOnBack; public bool storedOnHolster; public float damageFillValue; public float rangefillValue; public float fireRateFillValue; public float reloadFillValue; public float accuracyFillValue; public string aimSoundString; public string equipSoundString; } internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [CreateAssetMenu(fileName = "peanits", menuName = "ScriptableObjects/WeaponDef", order = 1)] public class NemesisMutationDef : ScriptableObject { [Header("General")] public string nameToken = ""; public string descriptionToken = ""; public Texture icon; public int requiredLevel; [HideInInspector] public ushort index; public static NemesisMutationDef CreateMutationDef(string nameString, string descString, int requiredLevel = 1, Texture icon = null) { NemesisMutationDef nemesisMutationDef = (NemesisMutationDef)(object)ScriptableObject.CreateInstance(typeof(NemesisMutationDef)); ((Object)nemesisMutationDef).name = nameString; nemesisMutationDef.nameToken = nameString; nemesisMutationDef.descriptionToken = descString; nemesisMutationDef.requiredLevel = requiredLevel; nemesisMutationDef.icon = icon; if ((Object)(object)nemesisMutationDef.icon == (Object)null) { nemesisMutationDef.icon = HunkAssets.mainAssetBundle.LoadAsset<Texture>("texNemesisPortrait"); } NemesisMutationCatalog.AddMutation(nemesisMutationDef); return nemesisMutationDef; } } public class SkillDefInfo { public string skillName; public string skillNameToken; public string skillDescriptionToken; public string[] keywordTokens = new string[0]; public Sprite skillIcon; public SerializableEntityStateType activationState; public InterruptPriority interruptPriority; public string activationStateMachineName; public float baseRechargeInterval; public int baseMaxStock = 1; public int rechargeStock = 1; public int requiredStock = 1; public int stockToConsume = 1; public bool isCombatSkill = true; public bool canceledFromSprinting; public bool forceSprintDuringState; public bool cancelSprintingOnActivation = true; public bool beginSkillCooldownOnSkillEnd; public bool fullRestockOnAssign = true; public bool resetCooldownTimerOnUse; public bool mustKeyPress; public SkillDefInfo() { } public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName, InterruptPriority interruptPriority, bool isCombatSkill, float baseRechargeInterval) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) this.skillName = skillName; this.skillNameToken = skillNameToken; this.skillDescriptionToken = skillDescriptionToken; this.skillIcon = skillIcon; this.activationState = activationState; this.activationStateMachineName = activationStateMachineName; this.interruptPriority = interruptPriority; this.isCombatSkill = isCombatSkill; this.baseRechargeInterval = baseRechargeInterval; } public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName = "Weapon", bool agile = false) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) this.skillName = skillName; this.skillNameToken = skillNameToken; this.skillDescriptionToken = skillDescriptionToken; this.skillIcon = skillIcon; this.activationState = activationState; this.activationStateMachineName = activationStateMachineName; interruptPriority = (InterruptPriority)0; isCombatSkill = true; baseRechargeInterval = 0f; requiredStock = 0; stockToConsume = 0; cancelSprintingOnActivation = !agile; if (agile) { keywordTokens = new string[1] { "KEYWORD_AGILE" }; } } } public class StupidFuckingBullshit : MonoBehaviour { public ParticleSystem faggot; private void Awake() { faggot = ((Component)this).GetComponentInChildren<ParticleSystem>(); ((Component)faggot).transform.SetParent((Transform)null); } private void FixedUpdate() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) ((Component)faggot).transform.SetPositionAndRotation(((Component)this).transform.position, ((Component)this).transform.rotation); } private void OnDisable() { if (Object.op_Implicit((Object)(object)faggot)) { ((Component)faggot).gameObject.SetActive(false); } } private void OnEnable() { if (Object.op_Implicit((Object)(object)faggot)) { ((Component)faggot).gameObject.SetActive(true); } } } namespace HunkMod { public static class HunkWeaponCatalog { public static Dictionary<string, HunkWeaponDef> weaponDrops = new Dictionary<string, HunkWeaponDef>(); public static HunkWeaponDef[] weaponDefs = new HunkWeaponDef[0]; public static List<ItemDef> itemDefs = new List<ItemDef>(0); public static void AddWeapon(HunkWeaponDef weaponDef, bool addItem = true) { Array.Resize(ref weaponDefs, weaponDefs.Length + 1); int num = weaponDefs.Length - 1; weaponDef.index = (ushort)num; weaponDefs[num] = weaponDef; weaponDef.index = (ushort)num; if (addItem) { itemDefs.Add(weaponDef.itemDef); } Debug.Log((object)("Added " + weaponDef.nameToken + " to Hunk weapon catalog with index: " + weaponDef.index)); } public static void AddWeaponDrop(string bodyName, HunkWeaponDef weaponDef, bool autoComplete = true) { if (autoComplete) { if (!bodyName.Contains("Body")) { bodyName += "Body"; } if (!bodyName.Contains("(Clone)")) { bodyName += "(Clone)"; } } weaponDrops.Add(bodyName, weaponDef); } public static HunkWeaponDef GetWeaponFromIndex(int index) { return weaponDefs[index]; } } [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.*/)] [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.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.rob.Hunk", "Hunk", "1.0.21")] public class MainPlugin : BaseUnityPlugin { [CompilerGenerated] private static class <>O { public static StatHookEventHandler <0>__RecalculateStatsAPI_GetStatCoefficients; public static hook_OnEnable <1>__HurtBox_OnEnable; public static hook_OnDisable <2>__HurtBox_OnDisable; public static hook_Awake <3>__ProjectileGhostController_Awake; } public const string MODUID = "com.rob.Hunk"; public const string MODNAME = "Hunk"; public const string MODVERSION = "1.0.21"; public const string developerPrefix = "ROB"; public static MainPlugin instance; public static bool badaBingBadaBoom; public static bool hasInitLate; public static bool rocketTrigger; public static bool spawnedNemesisCase; public static bool spawnedCrystalSkull; public static bool spawnedCorpse; public static bool scepterInstalled => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); public static bool rooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); public static bool hunkHudInstalled => Chainloader.PluginInfos.ContainsKey("com.public_ParticleSystem.HunkHud"); public static bool robItemsInstalled => Chainloader.PluginInfos.ContainsKey("com.rob.RobItems"); public static bool danteInstalled => Chainloader.PluginInfos.ContainsKey("com.rob.Dante"); public static bool riskUIInstalled { get { if (Chainloader.PluginInfos.ContainsKey("bubbet.riskui") && RiskUIEnabled()) { return true; } return false; } } public static bool greenAlienHeadInstalled => Chainloader.PluginInfos.ContainsKey("com.Borbo.GreenAlienHead"); public static bool qolChestsInstalled => Chainloader.PluginInfos.ContainsKey("Faust.QoLChests"); public static bool emptyChestsInstalled => Chainloader.PluginInfos.ContainsKey("com.Elysium.ECBG"); public static bool dragonyckInstalled => Chainloader.PluginInfos.ContainsKey("com.Dragonyck.InteractablesBeGone"); public static bool unlockAllInstalled => Chainloader.PluginInfos.ContainsKey("com.xoxfaby.UnlockAll"); public static bool moreShrinesInstalled => Chainloader.PluginInfos.ContainsKey("com.evaisa.moreshrines"); public static bool ss2Installed => Chainloader.PluginInfos.ContainsKey("com.evaisa.moreshrines"); public static bool cleanerHudInstalled => Chainloader.PluginInfos.ContainsKey("AAAHIFU.CleanerHud"); public static bool infernoInstalled => Chainloader.PluginInfos.ContainsKey("HIFU.Inferno"); public static bool scrollableLobbyInstalled => Chainloader.PluginInfos.ContainsKey("com.KingEnderBrine.ScrollableLobbyUI"); private void Awake() { instance = this; Config.myConfig = ((BaseUnityPlugin)this).Config; Log.Init(((BaseUnityPlugin)this).Logger); Config.ReadConfig(); HunkAssets.PopulateAssets(); CameraParams.InitializeParams(); States.RegisterStates(); Projectiles.RegisterProjectiles(); Tokens.AddTokens(); ItemDisplays.PopulateDisplays(); CreateWeapons(); new Hunk().CreateCharacter(); new Parasite().CreateCharacter(); new Nemesis().CreateCharacter(); new Helicopter().CreateCharacter(); new Contamination(); new Pursuer(); if (Config.playableNemesis.Value) { new StrikeTeam(); } NetworkingAPI.RegisterMessageType<SyncWeapon>(); NetworkingAPI.RegisterMessageType<SyncOverlay>(); NetworkingAPI.RegisterMessageType<SyncStoredWeapon>(); NetworkingAPI.RegisterMessageType<SyncDecapitation>(); NetworkingAPI.RegisterMessageType<SyncGrenade>(); NetworkingAPI.RegisterMessageType<SyncAmmoPickup>(); NetworkingAPI.RegisterMessageType<SyncGunDrop>(); NetworkingAPI.RegisterMessageType<SyncGunDrop2>(); NetworkingAPI.RegisterMessageType<SyncGunSwap>(); NetworkingAPI.RegisterMessageType<SyncVirus>(); NetworkingAPI.RegisterMessageType<SyncCombatStopwatch>(); NetworkingAPI.RegisterMessageType<SyncWeaponCaseOpen>(); NetworkingAPI.RegisterMessageType<SyncHeadshot>(); NetworkingAPI.RegisterMessageType<SyncCaseItem>(); NetworkingAPI.RegisterMessageType<SyncTemplarExplosion>(); NetworkingAPI.RegisterMessageType<SyncTVirus>(); NetworkingAPI.RegisterMessageType<SyncTVirusOverlay>(); NetworkingAPI.RegisterMessageType<SyncCVirus>(); NetworkingAPI.RegisterMessageType<SyncCVirusOverlay>(); NetworkingAPI.RegisterMessageType<SyncUroboros>(); NetworkingAPI.RegisterMessageType<SyncUrododge>(); NetworkingAPI.RegisterMessageType<SyncHunkTarget>(); NetworkingAPI.RegisterMessageType<SyncTerminalAnimation>(); NetworkingAPI.RegisterMessageType<SyncStarsBoxAnimation>(); NetworkingAPI.RegisterMessageType<SyncStarsBadgeStep>(); NetworkingAPI.RegisterMessageType<SyncGainBiomass>(); Hook(); new ContentPacks().Initialize(); ContentManager.onContentPacksAssigned += LateSetup; } private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj) { Hunk.SetItemDisplays(); } private void CreateWeapons() { new SMG().Init(); new M19().Init(); new MUP().Init(); new BroomHC().Init(); new Magnum().Init(); new Shotgun().Init(); new Slugger().Init(); new M3().Init(); new StreetSweeper().Init(); new RocketLauncher().Init(); new ATM().Init(); new ATM2().Init(); new Revolver().Init(); new Flamethrower().Init(); new GrenadeLauncher().Init(); new MGL().Init(); new GoldenGun().Init(); new BlueRose().Init(); new AssaultRifle().Init(); new Railgun().Init(); new Minigun().Init(); new Colt().Init(); new Sparkshot().Init(); new SSG().Init(); new RiotShield().Init(); new ScanGun().Init(); new GrappleGun().Init(); new Frag().Init(); new Flashbang().Init(); new StickyBomb().Init(); new Behemoth().Init(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static bool RiskUIEnabled() { return RiskUIPlugin.Enabled.Value; } private void Hook() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //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_007b: Expected O, but got Unknown object obj = <>O.<0>__RecalculateStatsAPI_GetStatCoefficients; if (obj == null) { StatHookEventHandler val = RecalculateStatsAPI_GetStatCoefficients; <>O.<0>__RecalculateStatsAPI_GetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; object obj2 = <>O.<1>__HurtBox_OnEnable; if (obj2 == null) { hook_OnEnable val2 = HurtBox_OnEnable; <>O.<1>__HurtBox_OnEnable = val2; obj2 = (object)val2; } HurtBox.OnEnable += (hook_OnEnable)obj2; object obj3 = <>O.<2>__HurtBox_OnDisable; if (obj3 == null) { hook_OnDisable val3 = HurtBox_OnDisable; <>O.<2>__HurtBox_OnDisable = val3; obj3 = (object)val3; } HurtBox.OnDisable += (hook_OnDisable)obj3; object obj4 = <>O.<3>__ProjectileGhostController_Awake; if (obj4 == null) { hook_Awake val4 = ProjectileGhostController_Awake; <>O.<3>__ProjectileGhostController_Awake = val4; obj4 = (object)val4; } ProjectileGhostController.Awake += (hook_Awake)obj4; } private static void ProjectileGhostController_Awake(orig_Awake orig, ProjectileGhostController self) { if (Object.op_Implicit((Object)(object)self)) { ((Component)self).gameObject.AddComponent<HunkProjectileTracker>().ghost = self; } orig.Invoke(self); } private static void HurtBox_OnEnable(orig_OnEnable orig, HurtBox self) { orig.Invoke(self); InstanceTracker.Add<HurtBox>(self); } private static void HurtBox_OnDisable(orig_OnDisable orig, HurtBox self) { orig.Invoke(self); InstanceTracker.Remove<HurtBox>(self); } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody self, StatHookEventArgs args) { if (self.HasBuff(Hunk.immobilizedBuff)) { args.moveSpeedRootCount++; } if (self.HasBuff(Hunk.bulletTimeBuff)) { args.baseAttackSpeedAdd += 1f; } if (self.HasBuff(Hunk.hunkFreefallBuff)) { args.baseMoveSpeedAdd += 6f; } if (!Object.op_Implicit((Object)(object)self.inventory)) { return; } int itemCount = self.inventory.GetItemCount(Hunk.gVirus); if (itemCount > 0) { args.armorAdd += ((float)itemCount - 4f) * 2.5f; args.baseAttackSpeedAdd += (float)itemCount * 0.075f; args.baseDamageAdd += (float)itemCount * 1.75f; for (int i = 0; i < itemCount; i++) { args.moveSpeedTotalMult /= 1.05f; } } if (self.inventory.GetItemCount(Hunk.tVirus) > 0) { args.armorAdd -= 10f; } int num = self.inventory.GetItemCount(Hunk.gVirusSample) + self.inventory.GetItemCount(Hunk.tVirusSample) + self.inventory.GetItemCount(Hunk.cVirusSample) + self.inventory.GetItemCount(Hunk.uroborosSample); if (num > 0) { args.baseRegenAdd += (float)num * 0.5f; args.armorAdd += (float)num * 2f; } if (self.baseNameToken == Nemesis.bodyNameToken && self.isPlayerControlled) { NemesisController component = ((Component)self).GetComponent<NemesisController>(); if (Object.op_Implicit((Object)(object)component) && component.biomass >= 100) { args.damageTotalMult *= 1.2f; } } } public static float GetICBMDamageMult(CharacterBody body) { float num = 1f; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory)) { int num2 = body.inventory.GetItemCount(Items.MoreMissile) - 1; if (num2 > 0) { num += (float)num2 * 0.5f; } } return num; } } public static class NemesisMutationCatalog { public static NemesisMutationDef[] mutationDefs = new NemesisMutationDef[0]; public static void AddMutation(NemesisMutationDef mutationDef) { Array.Resize(ref mutationDefs, mutationDefs.Length + 1); int num = mutationDefs.Length - 1; mutationDefs[num] = mutationDef; mutationDef.index = (ushort)num; Debug.Log((object)("Added " + mutationDef.nameToken + " to Nemesis mutation catalog with index: " + mutationDef.index)); } public static NemesisMutationDef GetMutation(int index) { return mutationDefs[index]; } } } namespace HunkMod.SkillStates { public class FaceplantDeath : GenericCharacterDeath { public override bool shouldAutoDestroy => false; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((Behaviour)((EntityState)this).characterMotor).enabled = false; } } public override void PlayDeathAnimation(float crossfadeDuration = 0.1f) { } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge > 4f) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)5; } } public class FuckMyAss : GenericCharacterDeath { public override bool shouldAutoDestroy => false; public override void OnEnter() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_001d: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).OnEnter(); GameObject val = new GameObject("FUCK OFFFFFFF"); val.transform.position = ((EntityState)this).transform.position; Util.PlaySound("sfx_hunk_death", val); Object.Destroy((Object)(object)val, 8f); EntityState.Destroy((Object)(object)((Component)((EntityState)this).modelLocator.modelTransform).gameObject); } public override void PlayDeathAnimation(float crossfadeDuration = 0.1f) { } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge > 4f) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)5; } } } namespace HunkMod.SkillStates.Virus { public class Death : GenericCharacterDeath { private bool hasDied; public override void FixedUpdate() { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected O, but got Unknown //IL_00c8: 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_0010: 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack { radius = 8f, procCoefficient = 0.01f, position = ((EntityState)this).characterBody.corePosition, attacker = ((EntityState)this).gameObject, crit = false, baseDamage = ((BaseState)this).damageStat * 2f, falloffModel = (FalloffModel)2, baseForce = 4000f, bonusForce = Vector3.up * 600f }; val.teamIndex = TeamComponent.GetObjectTeam(val.attacker); val.damageType = DamageTypeCombo.op_Implicit((DamageType)131072); val.attackerFiltering = (AttackerFiltering)2; val.Fire(); } GameObject val2 = new GameObject("FUCK OFFFFFFF"); val2.transform.position = ((EntityState)this).transform.position; Util.PlaySound("sfx_hunk_grenade_explosion", val2); Object.Destroy((Object)(object)val2, 8f); ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active && !hasDied) { hasDied = true; EffectManager.SimpleImpactEffect(HunkAssets.bloodExplosionEffect, ((EntityState)this).characterBody.corePosition, Vector3.up, true); EffectManager.SimpleImpactEffect(HunkAssets.cVirusExplosion, ((EntityState)this).characterBody.corePosition, Vector3.up, true); ((GenericCharacterDeath)this).DestroyBodyAsapServer(); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override void OnExit() { ((GenericCharacterDeath)this).DestroyModel(); ((GenericCharacterDeath)this).OnExit(); } } } namespace HunkMod.SkillStates.Parasite { public class Death : GenericCharacterDeath { private bool hasDied; public override void FixedUpdate() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).fixedAge > Death.deathDelay && NetworkServer.active && !hasDied) { hasDied = true; if (Object.op_Implicit((Object)(object)((Component)((EntityState)this).characterBody.master).GetComponent<KeycardHolder>())) { PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(HunkMod.Modules.Survivors.Hunk.gVirusSample.itemIndex), ((EntityState)this).characterBody.corePosition + Vector3.up * 0.5f, Vector3.up * 20f); } EffectManager.SimpleImpactEffect(Death.deathEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.up, true); ((GenericCharacterDeath)this).DestroyBodyAsapServer(); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override void OnExit() { ((GenericCharacterDeath)this).DestroyModel(); ((GenericCharacterDeath)this).OnExit(); } } public class Infest : BaseState { private Transform targetTransform; private GameObject infestVfxInstance; private OverlapAttack attack; private List<HurtBox> victimsStruck = new List<HurtBox>(); public override void OnEnter() { //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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: 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_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_022f: 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_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_027c: 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_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).PlayAnimation("Base", "Infest"); Util.PlaySound(Infest.enterSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)Infest.enterEffectPrefab)) { EffectManager.SimpleImpactEffect(Infest.enterEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.up, false); } if (Object.op_Implicit((Object)(object)Infest.infestVfxPrefab)) { infestVfxInstance = Object.Instantiate<GameObject>(Infest.infestVfxPrefab, ((EntityState)this).transform.position, Quaternion.identity); infestVfxInstance.transform.parent = ((EntityState)this).transform; } HitBoxGroup hitBoxGroup = null; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Infest"); } attack = new OverlapAttack(); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = Infest.infestDamageCoefficient * base.damageStat; attack.hitEffectPrefab = null; attack.hitBoxGroup = hitBoxGroup; attack.isCrit = ((BaseState)this).RollCrit(); attack.damageType = DamageTypeCombo.op_Implicit((DamageType)32); attack.damageColorIndex = (DamageColorIndex)9; BullseyeSearch val = new BullseyeSearch { viewer = ((EntityState)this).characterBody, teamMaskFilter = TeamMask.allButNeutral }; ((TeamMask)(ref val.teamMaskFilter)).RemoveTeam(((EntityState)this).characterBody.teamComponent.teamIndex); val.sortMode = (SortMode)1; val.minDistanceFilter = 0f; val.maxDistanceFilter = Infest.searchMaxDistance; val.searchOrigin = ((EntityState)this).inputBank.aimOrigin; val.searchDirection = ((EntityState)this).inputBank.aimDirection; val.maxAngleFilter = Infest.searchMaxAngle; val.filterByLoS = true; val.RefreshCandidates(); HurtBox val2 = val.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val2)) { targetTransform = ((Component)val2).transform; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { Vector3 position = targetTransform.position; float velocityInitialSpeed = Infest.velocityInitialSpeed; Vector3 val3 = position - ((EntityState)this).transform.position; Vector2 val4 = default(Vector2); ((Vector2)(ref val4))..ctor(val3.x, val3.z); float magnitude = ((Vector2)(ref val4)).magnitude; float num = Trajectory.CalculateInitialYSpeed(magnitude / velocityInitialSpeed, val3.y); Vector3 val5 = new Vector3(val4.x / magnitude * velocityInitialSpeed, num, val4.y / magnitude * velocityInitialSpeed); ((EntityState)this).characterMotor.velocity = val5; ((EntityState)this).characterMotor.disableAirControlUntilCollision = true; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterDirection.forward = val5; } } } public override void FixedUpdate() { //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //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_0041: 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_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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)targetTransform) && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { Vector3 val = targetTransform.position - ((EntityState)this).transform.position; Vector3 velocity = Vector3.RotateTowards(((EntityState)this).characterMotor.velocity, val, Infest.velocityTurnRate * Time.fixedDeltaTime * (MathF.PI / 180f), 0f); ((EntityState)this).characterMotor.velocity = velocity; if (NetworkServer.active && attack.Fire(victimsStruck)) { for (int i = 0; i < victimsStruck.Count; i++) { HealthComponent healthComponent = victimsStruck[i].healthComponent; CharacterBody body = healthComponent.body; CharacterMaster master = body.master; if (healthComponent.alive && (Object)(object)master != (Object)null && !body.isPlayerControlled && !((Enum)body.bodyFlags).HasFlag((Enum)(object)(BodyFlags)2)) { ((Component)body).gameObject.AddComponent<VirusHandler>(); BaseAI component = ((Component)master).GetComponent<BaseAI>(); if (Object.op_Implicit((Object)(object)component)) { component.enemyAttention = 0f; component.ForceAcquireNearestEnemyIfNoCurrentEnemy(); } Object.DestroyImmediate((Object)(object)((Component)((EntityState)this).characterBody.master).GetComponent<KeycardHolder>()); ((EntityState)this).healthComponent.Suicide((GameObject)null, (GameObject)null, DamageTypeCombo.op_Implicit((DamageType)0)); if (Object.op_Implicit((Object)(object)Infest.successfulInfestEffectPrefab)) { EffectManager.SimpleImpactEffect(Infest.successfulInfestEffectPrefab, ((EntityState)this).transform.position, Vector3.up, false); } break; } } } } if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterMotor.velocity; } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && ((EntityState)this).characterMotor.isGrounded && ((EntityState)this).fixedAge > 0.1f) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)infestVfxInstance)) { EntityState.Destroy((Object)(object)infestVfxInstance); } ((EntityState)this).OnExit(); } } } namespace HunkMod.SkillStates.Nemesis { public class AirDash : MainState { public override void OnEnter() { bufferAirDash = true; base.OnEnter(); } } public class AltChargedJumpState : BaseNemesisMain { public float charge; private float minPower = 28f; private float maxPower = 52f; private float duration = 0.65f; private bool hasJumped; private Animator animator; public override void OnEnter() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); animator = ((EntityState)this).GetModelAnimator(); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.25f; PlayAnimation(); ((Behaviour)((EntityState)this).modelLocator).enabled = false; } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); ((Behaviour)((EntityState)this).modelLocator).enabled = true; } public override void UpdateAnimationParameters() { } protected virtual void PlayAnimation() { if (Object.op_Implicit((Object)(object)animator)) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); if (animator.GetLayerIndex("Body") >= 0) { ((EntityState)this).PlayAnimation("Body", "AltJump"); } } } public override void FixedUpdate() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).FixedUpdate(); if (((EntityState)this).fixedAge >= 0.75f * duration) { if (!hasJumped) { hasJumped = true; Jump(); PlaySound(); } } else if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.moveDirection *= 0.2f; } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } else if (((BaseCharacterMain)this).hasModelAnimator && ((BaseCharacterMain)this).characterAnimParamAvailability.isGrounded) { ((BaseCharacterMain)this).modelAnimator.SetBool(AnimationParameters.isGrounded, false); } } public override void ProcessJump() { } protected virtual void Jump() { //IL_0031: 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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) ((Behaviour)((EntityState)this).modelLocator).enabled = true; ((EntityState)this).characterBody.isSprinting = true; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.jumpCount++; if (((EntityState)this).inputBank.moveVector == Vector3.zero) { float num = Util.Remap(charge, 0.2f, 1f, minPower, maxPower); ((EntityState)this).characterMotor.velocity = new Vector3(0f, num * 1.5f, 0f); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); animator.SetFloat("jumpType", 0f); } else { Vector3 val = ((EntityState)this).characterMotor.moveDirection; val.y = 0f; float magnitude = ((Vector3)(ref val)).magnitude; if (magnitude > 0f) { val /= magnitude; } Vector3 velocity = val * ((EntityState)this).characterBody.moveSpeed * (5.5f + charge); velocity.y = Util.Remap(charge, 0.2f, 1f, minPower * 0.75f, maxPower * 0.75f); ((EntityState)this).characterMotor.velocity = velocity; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); animator.SetFloat("jumpType", (float)(1 + Random.Range(0, 2))); } SpawnEffect(); } protected virtual void SpawnEffect() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown EffectManager.SpawnEffect(HunkAssets.nemAirDashEffect, new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity), scale = 1f }, true); } protected virtual void PlaySound() { Util.PlaySound("sfx_nemesis_jump_big", ((EntityState)this).gameObject); } } public class BaseMelee : BaseNemesisSkillState { public int swingIndex; protected bool isCancelled; protected string hitboxName = "Sword"; protected DamageType damageType; protected List<ModdedDamageType> moddedDamageTypeHolder = new List<ModdedDamageType>(); protected float damageCoefficient = 3.5f; protected float procCoefficient = 1f; protected float pushForce = 300f; protected Vector3 bonusForce = Vector3.zero; protected float baseDuration = 1f; protected float attackStartTime = 0.2f; protected float attackEndTime = 0.4f; protected float baseEarlyExitTime = 0.4f; protected float hitStopDuration = 0.012f; protected float attackRecoil = 0.75f; protected float hitHopVelocity = 4f; protected bool smoothHitstop; protected string swingSoundString = ""; protected string hitSoundString = ""; protected string muzzleString = "SwingCenter"; protected GameObject swingEffectPrefab; protected GameObject hitEffectPrefab; protected NetworkSoundEventIndex impactSound; private float earlyExitTime; public float duration; private bool hasFired; private float hitPauseTimer; protected OverlapAttack attack; private bool inHitPause; private bool hasHopped; protected float stopwatch; protected Animator animator; private HitStopCachedState hitStopCachedState; private Vector3 storedVelocity; protected bool isCrit; protected List<HurtBox> hitResults = new List<HurtBox>(); public override void OnEnter() { base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; earlyExitTime = baseEarlyExitTime; hasFired = false; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; isCrit = ((BaseState)this).RollCrit(); PlayAttackAnimation(); InitializeAttack(); } protected virtual void InitializeAttack() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) HitBoxGroup hitBoxGroup = null; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName); } attack = new OverlapAttack(); attack.damageType = DamageTypeCombo.op_Implicit(damageType); foreach (ModdedDamageType item in moddedDamageTypeHolder) { DamageAPI.AddModdedDamageType(attack, item); } moddedDamageTypeHolder.Clear(); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = damageCoefficient * ((BaseState)this).damageStat; attack.procCoefficient = procCoefficient; attack.hitEffectPrefab = hitEffectPrefab; attack.forceVector = bonusForce; attack.pushAwayForce = pushForce; attack.hitBoxGroup = hitBoxGroup; attack.isCrit = isCrit; attack.impactSound = impactSound; } protected virtual void FireShuriken() { PrimarySkillShurikenBehavior component = ((EntityState)this).GetComponent<PrimarySkillShurikenBehavior>(); if (Object.op_Implicit((Object)(object)component)) { component.OnSkillActivated(((EntityState)this).skillLocator.primary); } } protected virtual void PlayAttackAnimation() { ((EntityState)this).PlayCrossfade("Gesture, Override", "Slash" + (1 + swingIndex), "Fist.playbackRate", duration, 0.05f); } public override void OnExit() { if (!hasFired && !((EntityState)this).inputBank.skill2.down && !isCancelled) { FireAttack(); } if (inHitPause) { ClearHitStop(); } base.OnExit(); } public void CancelAttack() { isCancelled = true; } protected virtual void PlaySwingEffect() { EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } protected virtual void OnHitEnemyAuthority(int amount) { Util.PlaySound(hitSoundString, ((EntityState)this).gameObject); if (!hasHopped) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hitHopVelocity); } hasHopped = true; } if (!inHitPause) { TriggerHitStop(); } } protected virtual void TriggerHitStop() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) storedVelocity = ((EntityState)this).characterMotor.velocity; hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "Fist.playbackRate"); hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat; inHitPause = true; } protected virtual void FireAttack() { if (!hasFired) { hasFired = true; Util.PlayAttackSpeedSound(swingSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); PlaySwingEffect(); if (((EntityState)this).isAuthority) { base.AddRecoil2(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil); } } if (((EntityState)this).isAuthority) { hitResults.Clear(); if (attack.Fire(hitResults)) { OnHitEnemyAuthority(hitResults.Count); } } } protected virtual void SetNextState() { int num = ((swingIndex == 0) ? 1 : 0); ((EntityState)this).outer.SetNextState((EntityState)(object)new BaseMelee { swingIndex = num }); } public override void FixedUpdate() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (isCancelled) { return; } hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer <= 0f && inHitPause) { ClearHitStop(); } if (!inHitPause) { stopwatch += Time.fixedDeltaTime; } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat("Fist.playbackRate", 0f); } } if (stopwatch >= duration * attackStartTime && stopwatch <= duration * attackEndTime) { FireAttack(); } if (stopwatch >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } else if (stopwatch >= duration * earlyExitTime && ((EntityState)this).isAuthority && ((EntityState)this).inputBank.skill1.down) { if (!hasFired) { FireAttack(); } SetNextState(); } } protected virtual void ClearHitStop() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); inHitPause = false; ((EntityState)this).characterMotor.velocity = storedVelocity; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(swingIndex); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); swingIndex = reader.ReadInt32(); } } public class BaseNemesisBodyState : MainState { public override void HandleMovements() { } public override void ProcessJump() { } public override bool CanExecuteSkill(GenericSkill skillSlot) { return false; } } public class BaseNemesisMain : GenericCharacterMain { protected NemesisController nemesis; public override void OnEnter() { //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) nemesis = ((EntityState)this).GetComponent<NemesisController>(); nemesis.jumpController.landingStopwatch = 0f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((BaseState)this).attackSpeedStat = ((EntityState)this).characterBody.attackSpeed; ((BaseState)this).damageStat = ((EntityState)this).characterBody.damage; ((BaseState)this).critStat = ((EntityState)this).characterBody.crit; ((BaseState)this).moveSpeedStat = ((EntityState)this).characterBody.moveSpeed; } ((BaseCharacterMain)this).modelAnimator = ((EntityState)this).GetModelAnimator(); ((BaseCharacterMain)this).rootMotionAccumulator = ((EntityState)this).GetModelRootMotionAccumulator(); if (Object.op_Implicit((Object)(object)((BaseCharacterMain)this).rootMotionAccumulator)) { ((BaseCharacterMain)this).rootMotionAccumulator.ExtractRootMotion(); } ((EntityState)this).GetBodyAnimatorSmoothingParameters(ref ((BaseCharacterMain)this).smoothingParameters); ((BaseCharacterMain)this).previousPosition = ((EntityState)this).transform.position; ((BaseCharacterMain)this).hasCharacterMotor = Object.op_Implicit((Object)(object)((EntityState)this).characterMotor); ((BaseCharacterMain)this).hasCharacterDirection = Object.op_Implicit((Object)(object)((EntityState)this).characterDirection); ((BaseCharacterMain)this).hasCharacterBody = Object.op_Implicit((Object)(object)((EntityState)this).characterBody); ((BaseCharacterMain)this).hasRailMotor = Object.op_Implicit((Object)(object)((EntityState)this).railMotor); ((BaseCharacterMain)this).hasCameraTargetParams = Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams); ((BaseCharacterMain)this).hasSkillLocator = Object.op_Implicit((Object)(object)((EntityState)this).skillLocator); ((BaseCharacterMain)this).hasModelAnimator = Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator); ((BaseCharacterMain)this).hasInputBank = Object.op_Implicit((Object)(object)((EntityState)this).inputBank); ((BaseCharacterMain)this).hasRootMotionAccumulator = Object.op_Implicit((Object)(object)((BaseCharacterMain)this).rootMotionAccumulator); if (!Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator)) { return; } ((BaseCharacterMain)this).characterAnimParamAvailability = CharacterAnimParamAvailability.FromAnimator(((BaseCharacterMain)this).modelAnimator); ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("Body"); if (((BaseCharacterMain)this).characterAnimParamAvailability.isGrounded) { ((BaseCharacterMain)this).wasGrounded = ((BaseState)this).isGrounded; } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { base.aimAnimator = ((Component)modelTransform).GetComponent<AimAnimator>(); if (Object.op_Implicit((Object)(object)base.aimAnimator)) { ((Behaviour)base.aimAnimator).enabled = true; } } base.hasAimAnimator = Object.op_Implicit((Object)(object)base.aimAnimator); } } public class BaseNemesisSkillState : BaseSkillState { private Animator _animator; private NemesisController _nemesis; protected virtual bool turningAllowed => true; protected virtual bool normalizeModel => false; protected NemesisController nemesis { get { if (!Object.op_Implicit((Object)(object)_nemesis)) { _nemesis = ((EntityState)this).GetComponent<NemesisController>(); } return _nemesis; } } public virtual void AddRecoil2(float x1, float x2, float y1, float y2) { if (Config.enableRecoil.Value) { ((BaseState)this).AddRecoil(x1, x2, y1, y2); } } public override void OnEnter() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) nemesis.jumpController.landingStopwatch = 0f; _animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).OnEnter(); if (!turningAllowed) { ((EntityState)this).characterDirection.turnSpeed = 0f; ((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterDirection.forward; } if (normalizeModel) { ((EntityState)this).modelLocator.normalizeToFloor = true; } } public override void FixedUpdate() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!turningAllowed) { ((EntityState)this).characterDirection.turnSpeed = 0f; ((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterDirection.forward; } if (Object.op_Implicit((Object)(object)_animator)) { if (((BaseState)this).isGrounded) { _animator.SetFloat("airBlend", 0f); } else { _animator.SetFloat("airBlend", 1f); } } } public override void OnExit() { ((EntityState)this).OnExit(); if (!turningAllowed) { ((EntityState)this).characterDirection.turnSpeed = nemesis.baseTurnSpeed; } if (normalizeModel) { ((EntityState)this).modelLocator.normalizeToFloor = false; } } } public class ChargedJumpState : BaseNemesisMain { public float charge; private float minPower = 24f; private float maxPower = 40f; private float duration = 0.2f; private bool hasJumped; private Animator animator; public override void OnEnter() { //IL_0029: 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_0038: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); animator = ((EntityState)this).GetModelAnimator(); animator.SetTrigger("forceCancel"); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.25f; PlayAnimation(); ((Behaviour)((EntityState)this).modelLocator).enabled = false; } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); ((Behaviour)((EntityState)this).modelLocator).enabled = true; } public override void UpdateAnimationParameters() { } protected virtual void PlayAnimation() { if (Object.op_Implicit((Object)(object)animator)) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).PlayAnimation("Body", "Jump"); animator.SetFloat("jumpType", ((Vector3)(ref ((EntityState)this).inputBank.moveVector)).magnitude); } } public override void FixedUpdate() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).FixedUpdate(); if (((EntityState)this).fixedAge >= 0.4f * duration) { if (!hasJumped) { hasJumped = true; Jump(); PlaySound(); } } else if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.moveDirection *= 0.2f; } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } else if (((BaseCharacterMain)this).hasModelAnimator && ((BaseCharacterMain)this).characterAnimParamAvailability.isGrounded) { ((BaseCharacterMain)this).modelAnimator.SetBool(AnimationParameters.isGrounded, false); } } public override void ProcessJump() { } protected virtual void Jump() { //IL_0031: 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) ((Behaviour)((EntityState)this).modelLocator).enabled = true; ((EntityState)this).characterBody.isSprinting = true; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.jumpCount++; Vector3 val = ((EntityState)this).characterMotor.moveDirection; val.y = 0f; float magnitude = ((Vector3)(ref val)).magnitude; if (magnitude > 0f) { val /= magnitude; } Vector3 velocity = val * ((EntityState)this).characterBody.moveSpeed * (3f + charge); velocity.y = Util.Remap(charge, 0.2f, 1f, minPower, maxPower) * 1.35f; ((EntityState)this).characterMotor.velocity = velocity; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); SpawnEffect(); } protected virtual void SpawnEffect() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown EffectManager.SpawnEffect(HunkAssets.nemAirDashEffect, new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity), scale = 1f }, true); } protected virtual void PlaySound() { Util.PlaySound("sfx_nemesis_jump_big", ((EntityState)this).gameObject); } } public class ChargeFist : BaseNemesisSkillState { public float baseDuration = 0.8f; private float duration; public override void OnEnter() { base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; base.nemesis.forceNoSprint = true; ((EntityState)this).PlayCrossfade("Gesture, Override", "ChargeFist", "Fist.playbackRate", duration, 0.1f); Util.PlaySound("sfx_nemesis_grunt", ((EntityState)this).gameObject); } public override void OnExit() { base.OnExit(); base.nemesis.forceNoSprint = false; ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); } public override void FixedUpdate() { base.FixedUpdate(); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; ((EntityState)this).characterBody.SetAimTimer(0.1f); if (((EntityState)this).fixedAge >= duration) { if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill1.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new SlamFist()); } else if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= 2f * duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new SlamFist()); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class Death : GenericCharacterDeath { private bool hasDied; private bool poopoo; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); ((EntityState)this).PlayAnimation("FullBody, Override", "Leap"); } public override void FixedUpdate() { //IL_0038: 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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown ((GenericCharacterDeath)this).FixedUpdate(); if (!poopoo && ((EntityState)this).fixedAge >= 0.5f) { poopoo = true; Util.PlaySound("sfx_nemesis_jump_big", ((EntityState)this).gameObject); EffectManager.SpawnEffect(HunkAssets.nemAirDashEffect, new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(Vector3.up), scale = 1f }, false); } if (NetworkServer.active && !hasDied && ((EntityState)this).fixedAge >= 2f) { hasDied = true; ((GenericCharacterDeath)this).DestroyBodyAsapServer(); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override void OnExit() { ((GenericCharacterDeath)this).DestroyModel(); ((GenericCharacterDeath)this).OnExit(); } } public class Enrage : BaseNemesisSkillState { public float baseDuration = 4.5f; private float duration; public override void OnEnter() { base.OnEnter(); duration = baseDuration; ((EntityState)this).PlayCrossfade("FullBody, Override", "Roar", "Roar.playbackRate", duration, 0.1f); Util.PlaySound("sfx_nemesis_roar", ((EntityState)this).gameObject); base.nemesis.enrageTimer = 20f; } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } public class Knockdown : BaseNemesisSkillState { public float baseDuration = 30f; private float duration; private uint playID; public override void OnEnter() { //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); duration = baseDuration; if (base.nemesis.knockdownCount > 0) { duration /= 1f + (float)base.nemesis.knockdownCount * 0.5f; } base.nemesis.knockdownCount++; ((EntityState)this).PlayCrossfade("FullBody, Override", "Knockdown", 0.1f); Util.PlaySound("sfx_nemesis_roar_soft", ((EntityState)this).gameObject); base.nemesis.iFrames = 31f; playID = Util.PlaySound("sfx_nemesis_heal_loop", ((EntityState)this).gameObject); if (!((EntityState)this).characterBody.isPlayerControlled) { if (!base.nemesis.hasDroppedCase) { base.nemesis.hasDroppedCase = true; base.nemesis.DropCase(); } CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.baseMaxHealth *= 2f; CharacterBody characterBody2 = ((EntityState)this).characterBody; characterBody2.baseMoveSpeed *= 1.2f; CharacterBody characterBody3 = ((EntityState)this).characterBody; characterBody3.baseDamage *= 1.2f; CharacterBody characterBody4 = ((EntityState)this).characterBody; characterBody4.baseArmor *= 1.5f; if (((EntityState)this).characterBody.baseMoveSpeed >= 9f) { ((EntityState)this).characterBody.baseMoveSpeed = 9f; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) && ((EntityState)this).characterBody.inventory.currentEquipmentIndex == Equipment.EliteVoidEquipment.equipmentIndex) { ((EntityState)this).characterBody.inventory.SetEquipment(EquipmentState.empty, (uint)((EntityState)this).characterBody.inventory.activeEquipmentSlot); CharacterBody characterBody5 = ((EntityState)this).characterBody; characterBody5.bodyFlags = (BodyFlags)(characterBody5.bodyFlags & -1025); ((EntityState)this).characterBody.teamComponent.teamIndex = (TeamIndex)2; } } else { base.nemesis.iFrames = 8f; duration = 5f; Util.PlaySound("sfx_nemesis_revive", ((EntityState)this).gameObject); ModelLocator modelLocator = ((EntityState)this).modelLocator; if (Object.op_Implicit((Object)(object)modelLocator)) { Transform modelTransform = modelLocator.modelTransform; if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); obj.duration = 2f; obj.destroyComponentOnEnd = true; obj.originalMaterial = HunkAssets.ravagerMat; obj.inspectorCharacterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); obj.alphaCurve = AnimationCurve.EaseInOut(0f, 30f, 1f, 0f); obj.animateShaderAlpha = true; } } } base.nemesis.biomass = 0; ((EntityState)this).characterBody.RecalculateStats(); } public override void FixedUpdate() { base.FixedUpdate(); ((EntityState)this).healthComponent.health = ((EntityState)this).healthComponent.fullHealth; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (((EntityState)this).characterBody.HasBuff(Buffs.VoidFogStrong) || ((EntityState)this).characterBody.HasBuff(Buffs.VoidFogMild)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new LeapToTarget()); } else { ((EntityState)this).outer.SetNextState((EntityState)(object)new KnockdownEnd()); } } } public override void OnExit() { base.OnExit(); AkSoundEngine.StopPlayingID(playID); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)5; } } public class KnockdownEnd : BaseNemesisSkillState { public float baseDuration = 1.5f; private float duration; public override void OnEnter() { base.OnEnter(); duration = baseDuration; base.nemesis.iFrames = duration; if (Object.op_Implicit((Object)(object)base.nemesis.target) && Object.op_Implicit((Object)(object)base.nemesis.target.inventory) && base.nemesis.target.inventory.GetItemCount(HunkMod.Modules.Survivors.Hunk.starsBadge) > 0) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Death()); return; } ((EntityState)this).PlayCrossfade("FullBody, Override", "KnockdownEnd", "Knockdown.playbackRate", duration, 0.05f); Util.PlaySound("sfx_nemesis_heal", ((EntityState)this).gameObject); } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (((EntityState)this).characterBody.isPlayerControlled) { ((EntityState)this).outer.SetNextStateToMain(); } else { ((EntityState)this).outer.SetNextState((EntityState)(object)new Enrage()); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)5; } } public class MainState : BaseNemesisMain { public bool bufferAirDash; private float airDashStopwatch; private Vector3 dashVector; private Vector3 wallDir; private Vector3 wallPos; private GameObject lastObjectVaulted; private bool isWallRunning; private Transform modelBase; private float superSprintTimer; private OverlapAttack chargeAttack; private HitBoxGroup hitboxGroup; private float chargeCooldown; private float _lastYSpeed; private bool wasGrounded2; private NemesisJumpController jumpController; public override void OnEnter() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); jumpController = ((EntityState)this).GetComponent<NemesisJumpController>(); modelBase = ((EntityState)this).GetModelTransform(); if (!Object.op_Implicit((Object)(object)hitboxGroup)) { Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { hitboxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Charge"); } } chargeAttack = new OverlapAttack(); chargeAttack.attacker = ((EntityState)this).gameObject; chargeAttack.inflictor = ((EntityState)this).gameObject; chargeAttack.teamIndex = (TeamIndex)(-1); chargeAttack.damage = 1f * ((BaseState)this).damageStat; chargeAttack.hitEffectPrefab = HunkAssets.kickImpactEffect; chargeAttack.impactSound = HunkAssets.punchImpactSoundDef.index; chargeAttack.forceVector = Vector3.up * 200f; chargeAttack.isCrit = false; chargeAttack.pushAwayForce = 4000f; chargeAttack.hitBoxGroup = hitboxGroup; chargeAttack.attackerFiltering = (AttackerFiltering)2; chargeAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)0); } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); ((Behaviour)((EntityState)this).modelLocator).enabled = true; if (nemesis.isCharging) { ((EntityState)this).characterBody.sprintingSpeedMultiplier = 2.85f; ((EntityState)this).characterBody.RecalculateStats(); } nemesis.isCharging = false; } public override void FixedUpdate() { //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0108: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0198: 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_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Expected O, but got Unknown //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || !Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { return; } if (!((BaseState)this).isGrounded && ((EntityState)this).characterMotor.velocity.y <= -5f) { _lastYSpeed = ((EntityState)this).characterMotor.velocity.y; } if (((BaseState)this).isGrounded && !wasGrounded2) { Landing(_lastYSpeed); } wasGrounded2 = ((BaseState)this).isGrounded; if (Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator)) { if (Object.op_Implicit((Object)(object)nemesis) && Object.op_Implicit((Object)(object)nemesis.grabbedEnemy)) { ((BaseCharacterMain)this).modelAnimator.SetFloat("clingBlend", 1f); } else { ((BaseCharacterMain)this).modelAnimator.SetFloat("clingBlend", 0f); } ((BaseCharacterMain)this).modelAnimator.SetBool("wallCling", isWallRunning); } if (isWallRunning) { Vector3 val = wallPos + wallDir * jumpController.wallOffset; ((EntityState)this).characterBody.isSprinting = false; ((EntityState)this).characterDirection.moveVector = wallDir; ((EntityState)this).characterDirection.forward = wallDir; ((EntityState)this).characterMotor.velocity = Vector3.zero; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(val, true); ((Behaviour)((EntityState)this).modelLocator).enabled = false; ((EntityState)this).transform.position = val; ((Component)modelBase).transform.position = val; ((Component)modelBase).transform.rotation = Util.QuaternionSafeLookRotation(wallPos - ((Component)modelBase).transform.position); } else { ((Behaviour)((EntityState)this).modelLocator).enabled = true; } if (airDashStopwatch > 0f) { HandleAirDash(); } if (((EntityState)this).characterBody.isPlayerControlled) { if (((EntityState)this).characterBody.isSprinting && ((BaseState)this).isGrounded) { superSprintTimer += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)nemesis.grabbedEnemy)) { superSprintTimer = 0f; } if (superSprintTimer >= 3f) { if (!nemesis.isCharging) { ((EntityState)this).characterBody.sprintingSpeedMultiplier = 4.25f; ((EntityState)this).characterBody.RecalculateStats(); } nemesis.isCharging = true; if (chargeCooldown <= 0f) { chargeCooldown = 0.33f; chargeAttack = new OverlapAttack(); chargeAttack.attacker = ((EntityState)this).gameObject; chargeAttack.inflictor = ((EntityState)this).gameObject; chargeAttack.teamIndex = (TeamIndex)(-1); chargeAttack.damage = 3f * ((BaseState)this).damageStat; chargeAttack.hitEffectPrefab = HunkAssets.kickImpactEffect; chargeAttack.impactSound = HunkAssets.punchImpactSoundDef.index; chargeAttack.forceVector = Vector3.up * 20f; chargeAttack.isCrit = false; chargeAttack.pushAwayForce = 4000f; chargeAttack.hitBoxGroup = hitboxGroup; chargeAttack.attackerFiltering = (AttackerFiltering)2; chargeAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)0); chargeAttack.Fire((List<HurtBox>)null); } } else { if (nemesis.isCharging) { ((EntityState)this).characterBody.sprintingSpeedMultiplier = 2.85f; ((EntityState)this).characterBody.RecalculateStats(); } nemesis.isCharging = false; } } else { if (nemesis.isCharging) { ((EntityState)this).characterBody.sprintingSpeedMultiplier = 2.85f; ((EntityState)this).characterBody.RecalculateStats(); } superSprintTimer = 0f; nemesis.isCharging = false; } ((BaseCharacterMain)this).modelAnimator.SetBool("isSuperSprinting", nemesis.isCharging); } HandleExtraMovement(); HandleGravityBoost(); UpdateAnimationParameters2(); ((GenericCharacterMain)this).FixedUpdate(); airDashStopwatch -= Time.fixedDeltaTime; chargeCooldown -= Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && !((BaseState)this).isGrounded && bufferAirDash) { AirDash(); } if (Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator)) { ((BaseCharacterMain)this).modelAnimator.SetFloat("jumpCharge", jumpController.jumpCharge); } if (((BaseState)this).isGrounded) { lastObjectVaulted = null; } } private void HandleGravityBoost() { if (!((BaseState)this).isGrounded && !((EntityState)this).characterMotor.disableAirControlUntilCollision) { if (((EntityState)this).characterMotor.velocity.y <= -8f) { ((EntityState)this).characterMotor.velocity.y += -70f * Time.fixedDeltaTime; } else { ((EntityState)this).characterMotor.velocity.y += -45f * Time.fixedDeltaTime; } } } protected void Landing(float speed) { if (speed <= -90f) { HeavyLanding(); } else if (speed <= -30f) { MediumLanding(speed >= -70f); } } protected virtual void HeavyLanding() { //IL_0026: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).PlayAnimation("FullBody, Override", "LandingHeavy"); jumpController.landingStopwatch = 1.3f; ((EntityState)this).characterMotor.velocity = Vector3.zero; Util.PlaySound("sfx_nemesis_landing_heavy", ((EntityState)this).gameObject); _lastYSpeed = 0f; EffectManager.SpawnEffect(HunkAssets.nemLandingImpactHeavy, new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Quaternion.identity, scale = 1f }, true); new BlastAttack { attacker = ((EntityState)this).gameObject, procChainMask = default(ProcChainMask), impactEffect = (EffectIndex)(-1), losType = (LoSType)0, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)33), procCoefficient = 1f, bonusForce = Vector3.up * 800f, baseForce = 0f, baseDamage = 4f * ((BaseState)this).damageStat, falloffModel = (FalloffModel)0, radius = 4f, position = ((EntityState)this).transform.position, attackerFiltering = (AttackerFiltering)2, teamIndex = ((BaseState)this).GetTeam(), inflictor = ((EntityState)this).gameObject, crit = false }.Fire(); } protected virtual void MediumLanding(bool allowCancel) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (