Decompiled source of HUNK v2.4.4
HunkMod.dll
Decompiled 3 days 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.Collections.ObjectModel; using System.Diagnostics; 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 EntityStates; 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.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.VoidInfestor; using HG; using HG.BlendableTypes; using HunkMod; using HunkMod.Modules; using HunkMod.Modules.Achievements; 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.Hunk; using HunkMod.SkillStates.Hunk.Cling; using HunkMod.SkillStates.Hunk.Counter; using HunkMod.SkillStates.Hunk.Grenade; 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.Charge; using HunkMod.SkillStates.Nemesis.Leap; using HunkMod.SkillStates.Nemesis.Melee; using HunkMod.SkillStates.Parasite; using HunkMod.SkillStates.Virus; using JetBrains.Annotations; using KinematicCharacterController; using MaterialHud; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates; 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.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 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.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("HunkMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("HunkMod")] [assembly: AssemblyTitle("HunkMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] 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); } } internal enum HunkCameraParams { DEFAULT, AIM, AIM_SNIPER, MELEE, EMOTE } 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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) ((Component)faggot).transform.SetPositionAndRotation(((Component)this).transform.position, ((Component)this).transform.rotation); } } [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 = null; public GameObject crosshairPrefab = null; 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 = false; public bool canPickUpAmmo = true; public bool isInfinite = false; 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 = false; 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 hunkWeaponDef = (HunkWeaponDef)(object)ScriptableObject.CreateInstance(typeof(HunkWeaponDef)); ((Object)hunkWeaponDef).name = weaponDefInfo.nameToken; hunkWeaponDef.nameToken = weaponDefInfo.nameToken; hunkWeaponDef.descriptionToken = weaponDefInfo.descriptionToken; hunkWeaponDef.icon = weaponDefInfo.icon; hunkWeaponDef.crosshairPrefab = weaponDefInfo.crosshairPrefab; hunkWeaponDef.magSize = weaponDefInfo.magSize; hunkWeaponDef.magPickupMultiplier = weaponDefInfo.magPickupMultiplier; hunkWeaponDef.startingMags = weaponDefInfo.startingMags; hunkWeaponDef.reloadDuration = weaponDefInfo.reloadDuration; hunkWeaponDef.ammoName = weaponDefInfo.ammoName; hunkWeaponDef.primarySkillDef = weaponDefInfo.primarySkillDef; hunkWeaponDef.modelPrefab = weaponDefInfo.modelPrefab; hunkWeaponDef.animationSet = weaponDefInfo.animationSet; hunkWeaponDef.storedOnBack = weaponDefInfo.storedOnBack; hunkWeaponDef.storedOnHolster = weaponDefInfo.storedOnHolster; hunkWeaponDef.damageFillValue = weaponDefInfo.damageFillValue; hunkWeaponDef.rangefillValue = weaponDefInfo.rangefillValue; hunkWeaponDef.fireRateFillValue = weaponDefInfo.fireRateFillValue; hunkWeaponDef.reloadFillValue = weaponDefInfo.reloadFillValue; hunkWeaponDef.accuracyFillValue = weaponDefInfo.accuracyFillValue; hunkWeaponDef.aimSoundString = weaponDefInfo.aimSoundString; hunkWeaponDef.equipSoundString = weaponDefInfo.equipSoundString; return hunkWeaponDef; } 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 class BodyInfo { internal string bodyName = ""; internal string bodyNameToken = ""; internal string subtitleNameToken = ""; internal Color bodyColor = Color.white; internal Texture characterPortrait = null; internal GameObject crosshair = null; internal GameObject podPrefab = null; internal float maxHealth = 100f; internal float healthGrowth = 2f; internal float healthRegen = 0f; internal float shield = 0f; internal float shieldGrowth = 0f; internal float moveSpeed = 7f; internal float moveSpeedGrowth = 0f; internal float acceleration = 80f; internal float jumpPower = 15f; internal float jumpPowerGrowth = 0f; internal float damage = 12f; internal float attackSpeed = 1f; internal float attackSpeedGrowth = 0f; internal float armor = 0f; internal float armorGrowth = 0f; internal float crit = 1f; internal float critGrowth = 0f; internal int jumpCount = 1; } internal class CustomRendererInfo { internal string childName; internal Material material; internal bool ignoreOverlays; } 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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) //IL_0075: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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) 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" }; } } } namespace HunkMod { [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", "2.4.4")] [R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI", "DirectorAPI", "LoadoutAPI", "UnlockableAPI", "NetworkingAPI", "RecalculateStatsAPI" })] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.rob.Hunk"; public const string MODNAME = "Hunk"; public const string MODVERSION = "2.4.4"; public const string developerPrefix = "ROB"; public static MainPlugin instance; public static bool badaBingBadaBoom = false; public static bool hasInitLate = false; public static bool rocketTrigger = false; public static bool spawnedNemesisCase = false; public static bool spawnedCorpse = false; public static List<HurtBox> hurtboxesList = new List<HurtBox>(); public static List<HunkProjectileTracker> projectileList = new List<HunkProjectileTracker>(); public static bool scepterInstalled => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); public static bool rooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); 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"); private void Awake() { //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) 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 Contamination(); new Pursuer(); 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>(); Hook(); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/EliteIce/AffixWhiteDelayEffect.prefab").WaitForCompletion().AddComponent<HunkProjectileTracker>(); 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 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(); } private static bool RiskUIEnabled() { return RiskUIPlugin.Enabled.Value; } private void Hook() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); HurtBox.OnEnable += new hook_OnEnable(HurtBox_OnEnable); HurtBox.OnDisable += new hook_OnDisable(HurtBox_OnDisable); ProjectileGhostController.Awake += new hook_Awake(ProjectileGhostController_Awake); } private 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 void HurtBox_OnEnable(orig_OnEnable orig, HurtBox self) { orig.Invoke(self); hurtboxesList.Add(self); } private void HurtBox_OnDisable(orig_OnDisable orig, HurtBox self) { orig.Invoke(self); hurtboxesList.Remove(self); } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); if (!Object.op_Implicit((Object)(object)self)) { return; } if (self.HasBuff(Hunk.immobilizedBuff)) { self.moveSpeed = 0f; } if (self.HasBuff(Hunk.bulletTimeBuff)) { self.attackSpeed += 1f; } if (!Object.op_Implicit((Object)(object)self.inventory)) { return; } int itemCount = self.inventory.GetItemCount(Hunk.gVirus); if (itemCount > 0) { self.armor += (float)(itemCount - 4) * 2.5f; self.attackSpeed += (float)itemCount * 0.075f; self.damage += (float)itemCount * 1.75f; for (int i = 0; i < itemCount; i++) { self.moveSpeed /= 1.05f; } } if (self.inventory.GetItemCount(Hunk.tVirus) > 0) { self.armor -= 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) { self.regen += (float)num * 0.5f; self.armor += (float)num * 2f; } } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { } public static float GetICBMDamageMult(CharacterBody body) { float num = 1f; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory)) { int itemCount = body.inventory.GetItemCount(Items.MoreMissile); int num2 = itemCount - 1; if (num2 > 0) { num += (float)num2 * 0.5f; } } return num; } } 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]; } } } namespace HunkMod.SkillStates { public class FuckMyAss : GenericCharacterDeath { public override bool shouldAutoDestroy => false; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)7; } } } namespace HunkMod.SkillStates.Virus { public class Death : GenericCharacterDeath { private bool hasDied; public override void FixedUpdate() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //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_0063: 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_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_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_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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack(); val.radius = 8f; val.procCoefficient = 0.01f; val.position = ((EntityState)this).characterBody.corePosition; val.attacker = ((EntityState)this).gameObject; val.crit = false; val.baseDamage = ((BaseState)this).damageStat * 2f; val.falloffModel = (FalloffModel)2; val.baseForce = 4000f; val.bonusForce = Vector3.up * 600f; val.teamIndex = TeamComponent.GetObjectTeam(val.attacker); val.damageType = DamageTypeCombo.op_Implicit((DamageType)131072); val.attackerFiltering = (AttackerFiltering)2; val.Fire(); } Util.PlaySound("sfx_hunk_grenade_explosion", ((EntityState)this).gameObject); ((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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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) ((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_0045: 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_0073: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_0113: 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_0165: 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_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: 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_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0275: 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_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: 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(); val.viewer = ((EntityState)this).characterBody; val.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 = default(Vector3); ((Vector3)(ref val5))..ctor(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_0031: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_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) //IL_0077: 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_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: 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_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0191: 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) ((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 = ((EntityState)this).characterMotor.velocity; velocity = Vector3.RotateTowards(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 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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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(); } public override void UpdateAnimationParameters() { } protected virtual void PlayAnimation() { if (Object.op_Implicit((Object)(object)animator)) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); int layerIndex = animator.GetLayerIndex("Body"); if (layerIndex >= 0) { ((EntityState)this).PlayAnimation("Body", "AltJump"); } } } public override void FixedUpdate() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_00e7: Unknown result type (might be due to invalid IL or missing references) ((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); float y = Util.Remap(charge, 0.2f, 1f, minPower * 0.75f, maxPower * 0.75f); velocity.y = y; ((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_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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) //IL_002e: 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_0044: 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", ((EntityState)this).gameObject); } } public class BaseMelee : BaseNemesisSkillState { public int swingIndex; protected bool isCancelled; protected string hitboxName = "Sword"; protected DamageType damageType = (DamageType)0; 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 = false; 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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) 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_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0085: 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) 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_0003: 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) //IL_002d: 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)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 BaseNemesisMain : GenericCharacterMain { protected NemesisController nemesis; public override void OnEnter() { //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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) nemesis = ((EntityState)this).GetComponent<NemesisController>(); 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); int layerIndex = ((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_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) _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_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) ((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)) { } } 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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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(); } public override void UpdateAnimationParameters() { } protected virtual void PlayAnimation() { if (Object.op_Implicit((Object)(object)animator)) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); int layerIndex = animator.GetLayerIndex("Body"); if (layerIndex >= 0) { ((EntityState)this).PlayAnimation("Body", "JumpHigh"); } } } public override void FixedUpdate() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) ((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); float num = Util.Remap(charge, 0.2f, 1f, minPower, maxPower); velocity.y = num * 1.35f; ((EntityState)this).characterMotor.velocity = velocity; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); SpawnEffect(); } protected virtual void SpawnEffect() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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) //IL_002e: 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_0044: 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", ((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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)3; } } public class Death : GenericCharacterDeath { private bool hasDied; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); ((EntityState)this).PlayAnimation("FullBody, Override", "Leap"); } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active && !hasDied && ((EntityState)this).fixedAge >= 1f) { 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)3; } } public class Knockdown : BaseNemesisSkillState { public float baseDuration = 30f; private float duration; private uint playID; public override void OnEnter() { //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: 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) 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.attackSpeed *= 1.2f; if (((EntityState)this).characterBody.baseMoveSpeed >= 7f) { ((EntityState)this).characterBody.baseMoveSpeed = 7f; } 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 characterBody4 = ((EntityState)this).characterBody; characterBody4.bodyFlags = (BodyFlags)(characterBody4.bodyFlags & -1025); ((EntityState)this).characterBody.teamComponent.teamIndex = (TeamIndex)2; } } else { base.nemesis.iFrames = 6f; duration = 5f; } ((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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)7; } } public class KnockdownEnd : BaseNemesisSkillState { public float baseDuration = 1.5f; private float duration; public override void OnEnter() { base.OnEnter(); duration = baseDuration; base.nemesis.iFrames = duration; ((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) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Enrage()); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)7; } } public class MainState : BaseNemesisMain { private float freeJumpStopwatch; private float hopStopwatch; private float landingStopwatch; private float airDashStopwatch; private float wallSwapCooldown; private float jumpCharge; private Vector3 dashVector; private Vector3 wallDir; private GameObject lastObjectVaulted; private GameObject leftChargeEffect; private GameObject rightChargeEffect; private GameObject chargeMaxEffect; private ParticleSystem leftWallSlideEffect; private ParticleSystem rightWallSlideEffect; private ParticleSystem wallRunEffect; private bool isJumpCharged; private bool isWallRunning; private Transform core; private Transform chest; private Transform modelBase; private float superSprintTimer; private float runTransition; private float _lastYSpeed; private bool wasGrounded2; public override void OnEnter() { //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) base.OnEnter(); modelBase = ((EntityState)this).GetModelTransform(); chest = ((BaseState)this).FindModelChild("Chest"); core = chest; leftChargeEffect = ((Component)((BaseState)this).FindModelChild("JumpChargeL")).gameObject; rightChargeEffect = ((Component)((BaseState)this).FindModelChild("JumpChargeR")).gameObject; chargeMaxEffect = ((Component)((BaseState)this).FindModelChild("ChargeMaxEffect")).gameObject; Material trailMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidSurvivor/matVoidSurvivorBlasterFireCorrupted2.mat").WaitForCompletion(); leftChargeEffect.GetComponent<ParticleSystemRenderer>().trailMaterial = trailMaterial; rightChargeEffect.GetComponent<ParticleSystemRenderer>().trailMaterial = trailMaterial; chargeMaxEffect.GetComponent<ParticleSystemRenderer>().trailMaterial = trailMaterial; if (Object.op_Implicit((Object)(object)((BaseState)this).FindModelChild("WallSlideEffectL"))) { leftWallSlideEffect = ((Component)((BaseState)this).FindModelChild("WallSlideEffectL")).gameObject.GetComponent<StupidFuckingBullshit>().faggot; rightWallSlideEffect = ((Component)((BaseState)this).FindModelChild("WallSlideEffectR")).gameObject.GetComponent<StupidFuckingBullshit>().faggot; wallRunEffect = ((Component)((BaseState)this).FindModelChild("WallRunEffect")).gameObject.GetComponent<StupidFuckingBullshit>().faggot; rightWallSlideEffect.Stop(); leftWallSlideEffect.Stop(); } } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); if (isWallRunning) { EndWallRun(); } } public override void FixedUpdate() { //IL_0155: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //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_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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: 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; bool flag = isWallRunning; if (isWallRunning) { ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).characterDirection.moveVector = wallDir; ((EntityState)this).characterDirection.forward = wallDir; ((EntityState)this).characterMotor.velocity = Quaternion.AngleAxis(-90f, ((Component)modelBase).transform.right) * ((EntityState)this).inputBank.moveVector * ((EntityState)this).characterBody.moveSpeed * 0.75f; HandleWallSlideEffects(); } else { core.position = ((Component)chest).transform.position; if (Object.op_Implicit((Object)(object)rightWallSlideEffect)) { rightWallSlideEffect.Stop(); } if (Object.op_Implicit((Object)(object)leftWallSlideEffect)) { leftWallSlideEffect.Stop(); } } if (airDashStopwatch > 0f) { HandleAirDash(); } if (((EntityState)this).characterBody.isSprinting && ((BaseState)this).isGrounded && !((EntityState)this).characterBody.outOfCombat) { superSprintTimer += Time.fixedDeltaTime; } else { superSprintTimer = 0f; } HandleTurning(); HandleExtraMovement(); HandleGravityBoost(); UpdateAnimationParameters2(); if (Object.op_Implicit((Object)(object)nemesis)) { nemesis.isInLanding = landingStopwatch > 0f; } ((GenericCharacterMain)this).FixedUpdate(); hopStopwatch -= Time.fixedDeltaTime; landingStopwatch -= Time.fixedDeltaTime; freeJumpStopwatch -= Time.fixedDeltaTime; airDashStopwatch -= Time.fixedDeltaTime; wallSwapCooldown -= Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { if (true) { if (((EntityState)this).inputBank.jump.down) { jumpCharge = Mathf.Clamp01(jumpCharge + Time.fixedDeltaTime); } else { if (((ButtonState)(ref ((EntityState)this).inputBank.jump)).justReleased) { ReleaseJump(); } jumpCharge = 0f; } } else { jumpCharge = 0f; if (((EntityState)this).inputBank.jump.down && ((BaseState)this).isGrounded) { ReleaseJump(); } } if (!((BaseState)this).isGrounded && ((ButtonState)(ref ((EntityState)this).inputBank.skill3)).justPressed) { AirDash(); } } if (landingStopwatch >= 0f) { if (((BaseCharacterMain)this).hasCharacterMotor) { ((EntityState)this).characterMotor.moveDirection = Vector3.zero; } ((EntityState)this).characterDirection.moveVector = modelBase.forward; } if (Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator)) { ((BaseCharacterMain)this).modelAnimator.SetFloat("jumpCharge", jumpCharge); } if (Object.op_Implicit((Object)(object)leftChargeEffect)) { leftChargeEffect.SetActive(jumpCharge > 0f); } if (Object.op_Implicit((Object)(object)rightChargeEffect)) { rightChargeEffect.SetActive(jumpCharge > 0f); } if (Object.op_Implicit((Object)(object)chargeMaxEffect)) { chargeMaxEffect.SetActive(jumpCharge >= 1f); } if (jumpCharge >= 1f) { if (!isJumpCharged) { Util.PlaySound("sfx_nemesis_spark", ((EntityState)this).gameObject); } isJumpCharged = true; } else { isJumpCharged = false; } if (((BaseState)this).isGrounded) { lastObjectVaulted = null; } if (!isWallRunning && flag) { EndWallRun(); } } private void HandleGravityBoost() { if (!((BaseState)this).isGrounded) { if (((EntityState)this).characterMotor.velocity.y <= -8f) { ((EntityState)this).characterMotor.velocity.y += -70f * Time.fixedDeltaTime; } else { ((EntityState)this).characterMotor.velocity.y += -45f * Time.fixedDeltaTime; } } } private void EndWallRun() { if (Object.op_Implicit((Object)(object)rightWallSlideEffect)) { rightWallSlideEffect.Stop(); } if (Object.op_Implicit((Object)(object)leftWallSlideEffect)) { leftWallSlideEffect.Stop(); } if (Object.op_Implicit((Object)(object)wallRunEffect)) { wallRunEffect.Stop(); } } protected void HandleTurning() { if (!isWallRunning && !(airDashStopwatch >= 0.2f)) { } } protected virtual void ReleaseJump() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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) if (!Physics.CheckSphere(((EntityState)this).transform.position, 2f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)) && freeJumpStopwatch <= 0f && !((BaseState)this).isGrounded) { jumpCharge = 0f; return; } if (jumpCharge <= 0.2f) { nemesis.currentAirDashes = 0; ((EntityState)this).outer.SetNextState((EntityState)(object)new SmallHop()); return; } nemesis.currentAirDashes = 0; if (((EntityState)this).inputBank.moveVector == Vector3.zero) { ((EntityState)this).outer.SetNextState((EntityState)(object)new AltChargedJumpState { charge = jumpCharge }); } else { ((EntityState)this).outer.SetNextState((EntityState)(object)new ChargedJumpState { charge = jumpCharge }); } } protected void Landing(float speed) { if (speed <= -85f) { HeavyLanding(); } else if (speed <= -45f) { MediumLanding(); } } protected virtual void HeavyLanding() { //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) //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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0140: 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) ((EntityState)this).PlayAnimation("FullBody, Override", "LandingHeavy"); landingStopwatch = 1.3f; ((EntityState)this).characterMotor.velocity = Vector3.zero; Util.PlaySound("sfx_nemesis_heavy_landing", ((EntityState)this).gameObject); _lastYSpeed = 0f; EffectManager.SpawnEffect(HunkAssets.nemLandingImpactHeavy, new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Quaternion.identity, scale = 1f }, true); Result val = 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() { //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_0039: 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_0045: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown ((EntityState)this).PlayAnimation("FullBody, Override", "LandingMedium"); landingStopwatch = 0.65f; _lastYSpeed = 0f; EffectManager.SpawnEffect(HunkAssets.nemLandingImpact, new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Quaternion.identity, scale = 1f }, true); } public override void ProcessJump() { } protected void HandleExtraMovement() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: 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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) if (((BaseCharacterMain)this).hasCharacterBody && ((EntityState)this).characterBody.isSprinting) { RaycastHit val = default(RaycastHit); GameObject val2 = null; if (isWallRunning) { if (((BaseState)this).isGrounded) { isWallRunning = false; } else if (wallSwapCooldown < 0f && Physics.Raycast(((EntityState)this).transform.position, ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized, ref val, 1f, 1 << LayerMask.NameToLayer("World"))) { wallDir = -((RaycastHit)(ref val)).normal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(((RaycastHit)(ref val)).point + ((RaycastHit)(ref val)).normal * 0.75f, true); wallSwapCooldown = 0.25f; } else if (Physics.Raycast(((EntityState)this).transform.position + ((EntityState)this).characterMotor.velocity * Time.fixedDeltaTime, ((EntityState)this).characterDirection.forward, ref val, 2.4f, 1 << LayerMask.NameToLayer("World"))) { wallDir = -((RaycastHit)(ref val)).normal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(((RaycastHit)(ref val)).point + ((RaycastHit)(ref val)).normal * 0.75f, true); } else { MediumVault(); } } else { if (!Physics.Raycast(((EntityState)this).transform.position + new Vector3(0f, 0.2f, 0f), ((EntityState)this).inputBank.moveVector, ref val, 2.4f, 1 << LayerMask.NameToLayer("World"))) { return; } val2 = ((Component)((RaycastHit)(ref val)).collider).gameObject; bool flag = true; if ((Object)(object)lastObjectVaulted != (Object)null && (Object)(object)((Component)((RaycastHit)(ref val)).collider).gameObject == (Object)(object)lastObjectVaulted) { flag = false; } if (!Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref val)).collider).gameObject)) { return; } if (Physics.Raycast(((EntityState)this).transform.position + new Vector3(0f, 0.5f, 0f), ((Vector3)(ref ((EntityState)this).inputBank.moveVector)).normalized, ref val, 2.6f, 1 << LayerMask.NameToLayer("World"))) { if (Physics.Raycast(((EntityState)this).transform.position + new Vector3(0f, 1f, 0f), ((Vector3)(ref ((EntityState)this).inputBank.moveVector)).normalized, ref val, 2.6f, 1 << LayerMask.NameToLayer("World"))) { if (Physics.Raycast(((EntityState)this).transform.position + new Vector3(0f, 2.5f, 0f), ((Vector3)(ref ((EntityState)this).inputBank.moveVector)).normalized, ref val, 2.6f, 1 << LayerMask.NameToLayer("World"))) { if (!isWallRunning) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); nemesis.currentAirDashes = 0; ((EntityState)this).PlayCrossfade("FullBody, Override", "WallRun", 0.05f); wallDir = -((RaycastHit)(ref val)).normal; } airDashStopwatch = 0f; isWallRunning = true; return; } if (flag) { Vault(val2); return; } } if (flag) { MediumVault(val2); } } else if (flag) { SmallVault(val2); } } } else { if (isWallRunning) { MediumVault(); } isWallRunning = false; } } protected void UpdateAnimationParameters2() { if (hopStopwatch > 0f) { ((BaseCharacterMain)this).modelAnimator.SetBool("isGrounded", false); } if (landingStopwatch >= 0f) { ((BaseCharacterMain)this).modelAnimator.SetBool("isMoving", false); } ((BaseCharacterMain)this).modelAnimator.SetBool("isWallRunning", isWallRunning); } protected virtual void PlayParkourAction() { if (!(hopStopwatch > 0f)) { int num = Random.Range(0, 3); ((BaseCharacterMain)this).modelAnimator.SetFloat("parkour", (float)num); ((BaseCharacterMain)this).modelAnimator.SetBool("isGrounded", false); hopStopwatch = 0.1f; ((EntityState)this).PlayCrossfade("FullBody, Override", "ParkourAction", 0.05f); } } private void SmallVault(GameObject targetObject = null) { nemesis.currentAirDashes = 0; isWallRunning = false; airDashStopwatch = 0f; if (Object.op_Implicit((Object)(object)targetObject)) { lastObjectVaulted = targetObject; } ((EntityState)this).characterMotor.velocity.y = 1.4f * ((EntityState)this).characterBody.jumpPower; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); freeJumpStopwatch = 0.25f; PlayParkourAction(); } private void MediumVault(GameObject targetObject = null) { nemesis.currentAirDashes = 0; isWallRunning = false; airDashStopwatch = 0f; if (Object.op_Implicit((Object)(object)targetObject)) { lastObjectVaulted = targetObject; } ((EntityState)this).characterMotor.velocity.y = 1.8f * ((EntityState)this).characterBody.jumpPower; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); freeJumpStopwatch = 0.4f; PlayParkourAction(); } private void Vault(GameObject targetObject = null) { //IL_0037: 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_0046: Unknown result type (might be due to invalid IL or missing references) nemesis.currentAirDashes = 0; isWallRunning = false; airDashStopwatch = 0f; if (Object.op_Implicit((Object)(object)targetObject)) { lastObjectVaulted = targetObject; } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.8f; ((EntityState)this).characterMotor.velocity.y = 1.4f * ((EntityState)this).characterBody.jumpPower; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); freeJumpStopwatch = 0.4f; PlayParkourAction(); } private void AirDash() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_00eb: Unknown result type (might be due to inv