Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of HenryMod v2.2.0
HenryMod.dll
Decompiled 2 years ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.ClayBruiser.Weapon; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using EntityStates.Croco; using EntityStates.Engi.EngiWeapon; using EntityStates.GolemMonster; using EntityStates.Huntress; using EntityStates.ImpMonster; using EntityStates.LemurianBruiserMonster; using EntityStates.Mage; using EntityStates.Merc; using EntityStates.NullifierMonster; using HG; using HG.BlendableTypes; using HenryMod.Modules; using HenryMod.Modules.Components; using HenryMod.Modules.Enemies; using HenryMod.Modules.Misc; using HenryMod.Modules.Survivors; using HenryMod.SkillStates; using HenryMod.SkillStates.BaseStates; using HenryMod.SkillStates.Bazooka; using HenryMod.SkillStates.Bazooka.Scepter; using HenryMod.SkillStates.Emotes; using HenryMod.SkillStates.Henry; using HenryMod.SkillStates.Henry.Frenzy; using HenryMod.SkillStates.Henry.Frenzy.Scepter; using HenryMod.SkillStates.Henry.Shotgun; using HenryMod.SkillStates.MrGreen; using HenryMod.SkillStates.Nemry; using HenryMod.SkillStates.Nemry.Beam; using HenryMod.SkillStates.Nemry.ChargeSlash; using HenryMod.SkillStates.Nemry.Stab; using HenryMod.SkillStates.Nemry.Torrent; using HenryMod.SkillStates.Stinger; using JetBrains.Annotations; using KinematicCharacterController; using MonoMod.RuntimeDetour; using On.RoR2; using On.RoR2.UI; using R2API; using R2API.Utils; using Rewired; using Rewired.Data; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CameraModes; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using UnityEngine; 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 = ".NET Standard 2.1")] [assembly: AssemblyCompany("HenryMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+77fc75f9a38794062f53a4a1eeada71f785c5dad")] [assembly: AssemblyProduct("HenryMod")] [assembly: AssemblyTitle("HenryMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] internal class BodyInfo { internal string bodyName = ""; internal string bodyNameToken = ""; internal string subtitleNameToken = ""; 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 Color bodyColor = Color.grey; internal Vector3 aimOriginPosition = new Vector3(0f, 1.8f, 0f); internal Vector3 modelBasePosition = new Vector3(0f, -0.92f, 0f); internal Vector3 cameraPivotPosition = new Vector3(0f, 1.6f, 0f); } internal class CustomRendererInfo { internal string childName; internal Material material; internal bool ignoreOverlays; } internal 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; } } namespace HenryMod { [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.HenryMod", "HenryMod", "2.1.2")] public class HenryPlugin : BaseUnityPlugin { public const string MODUID = "com.rob.HenryMod"; public const string MODNAME = "HenryMod"; public const string MODVERSION = "2.1.2"; public const string developerPrefix = "ROB"; public static bool starstormInstalled; public static bool scepterInstalled; public static HenryPlugin instance; private void Awake() { instance = this; if (Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm.Starstorm2")) { starstormInstalled = true; } if (Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter")) { scepterInstalled = true; } Asset.Initialize(); Config.ReadConfig(); States.RegisterStates(); Buffs.RegisterBuffs(); Projectiles.RegisterProjectiles(); Tokens.AddTokens(); ItemDisplays.PopulateDisplays(); new Henry().Initialize(); new ContentPacks().Initialize(); Hook(); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(LateSetup)); } private void LateSetup() { SurvivorBase.instance.SetItemDisplays(); } private void Hook() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self)) { if (self.HasBuff(Buffs.armorBuff)) { self.armor += 300f; } if (self.HasBuff(Buffs.frenzyBuff)) { self.attackSpeed += 5f; self.moveSpeed += 5f; self.regen += 8f; } if (self.HasBuff(Buffs.frenzyScepterBuff)) { self.attackSpeed += 6f; self.moveSpeed += 8f; self.regen += 12f; self.armor += 100f; } } } } } namespace HenryMod.SkillStates { public class FistBarrage : BaseMeleeAttack { private HenryFuryComponent furyComponent; public override void OnEnter() { //IL_001f: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) furyComponent = ((EntityState)this).gameObject.GetComponent<HenryFuryComponent>(); hitboxName = "Punch"; damageType = (DamageType)2; damageCoefficient = 2.4f; procCoefficient = 1f; pushForce = 100f; bonusForce = Vector3.zero; baseDuration = 0.8f; attackStartTime = 0.2f; attackEndTime = 0.4f; baseEarlyExitTime = 0.3f; hitStopDuration = 0.015f; attackRecoil = 0.75f; hitHopVelocity = 2f; swingSoundString = "HenryPunchSwing"; hitSoundString = ""; muzzleString = "SwingCenter"; swingEffectPrefab = Asset.fistBarrageEffect; hitEffectPrefab = Asset.punchImpactEffect; impactSound = Asset.punchHitSoundEvent.index; base.OnEnter(); } protected override void PlayAttackAnimation() { if (animator.GetBool("isGrounded")) { if (!animator.GetBool("isMoving")) { ((EntityState)this).PlayAnimation("FullBody, Override", "FastPunch" + (1 + swingIndex), "Punch.playbackRate", duration, 0f); } } else { ((EntityState)this).PlayAnimation("FullBody, Override", "FastPunch" + (1 + swingIndex), "FastPunch.playbackRate", duration, 0f); } ((EntityState)this).PlayAnimation("Gesture, Override", "FastPunch" + (1 + swingIndex), "FastPunch.playbackRate", duration, 0f); } protected override void PlaySwingEffect() { base.PlaySwingEffect(); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); if (Object.op_Implicit((Object)(object)furyComponent)) { furyComponent.AddFury(); } } protected override void SetNextState() { int num = swingIndex + 1; if (num == 3) { num = 1; } if (((BaseState)this).attackSpeedStat >= 5f) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FistBarrage { swingIndex = num }); } else { ((EntityState)this).outer.SetNextState((EntityState)(object)new PunchCombo { swingIndex = num }); } } public override void OnExit() { base.OnExit(); } } public class HenryMain : GenericCharacterMain { private Animator animator; private HenryController henryController; protected EntityStateMachine weaponStateMachine; public LocalUser localUser; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); henryController = ((EntityState)this).GetComponent<HenryController>(); localUser = LocalUserManager.readOnlyLocalUsersList[0]; EntityStateMachine[] components = ((EntityState)this).gameObject.GetComponents<EntityStateMachine>(); foreach (EntityStateMachine val in components) { if (Object.op_Implicit((Object)(object)val) && val.customName == "Weapon") { weaponStateMachine = val; } } } public override void Update() { //IL_0038: 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) ((GenericCharacterMain)this).Update(); if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded && !localUser.isUIFocused) { if (Input.GetKeyDown(Config.restKeybind.Value)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Rest(), (InterruptPriority)0); } else if (Input.GetKeyDown(Config.danceKeybind.Value)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Dance(), (InterruptPriority)0); } } } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)animator)) { float num = 1f; if (animator.GetBool("isGrounded")) { num = 0f; } animator.SetFloat("inAir", num); animator.SetBool("inCombat", !((EntityState)this).characterBody.outOfCombat || !((EntityState)this).characterBody.outOfDanger); } if (Object.op_Implicit((Object)(object)henryController)) { animator.SetBool("inBazooka", henryController.hasBazookaReady); if (henryController.hasBazookaReady) { ((EntityState)this).characterBody.isSprinting = false; ((BaseState)this).StartAimMode(0.5f, false); } } } } public class PunchCombo : BaseMeleeAttack { private HenryFuryComponent furyComponent; public override void OnEnter() { //IL_001f: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) furyComponent = ((EntityState)this).gameObject.GetComponent<HenryFuryComponent>(); hitboxName = "Punch"; damageType = (DamageType)2; damageCoefficient = 2.4f; procCoefficient = 1f; pushForce = 500f; bonusForce = Vector3.zero; baseDuration = 0.8f; attackStartTime = 0.2f; attackEndTime = 0.4f; baseEarlyExitTime = 0.3f; hitStopDuration = 0.015f; attackRecoil = 0.75f; hitHopVelocity = 6f; swingSoundString = "HenryPunchSwing"; hitSoundString = ""; muzzleString = ((swingIndex % 2 == 0) ? "SwingLeft" : "SwingRight"); swingEffectPrefab = Asset.punchSwingEffect; hitEffectPrefab = Asset.punchImpactEffect; impactSound = Asset.punchHitSoundEvent.index; base.OnEnter(); } protected override void PlayAttackAnimation() { if (animator.GetBool("isGrounded")) { if (!animator.GetBool("isMoving")) { ((EntityState)this).PlayCrossfade("FullBody, Override", "Punch" + (1 + swingIndex), "Punch.playbackRate", duration, 0.05f); } } else { ((EntityState)this).PlayCrossfade("FullBody, Override", "Punch" + (1 + swingIndex), "Punch.playbackRate", duration, 0.05f); } ((EntityState)this).PlayCrossfade("Gesture, Override", "Punch" + (1 + swingIndex), "Punch.playbackRate", duration, 0.05f); } protected override void PlaySwingEffect() { base.PlaySwingEffect(); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); if (Object.op_Implicit((Object)(object)furyComponent)) { furyComponent.AddFury(); } } protected override void SetNextState() { int num = swingIndex + 1; if (num == 3) { num = 1; } if (((BaseState)this).attackSpeedStat >= 5f) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FistBarrage { swingIndex = num }); } else { ((EntityState)this).outer.SetNextState((EntityState)(object)new PunchCombo { swingIndex = num }); } } public override void OnExit() { base.OnExit(); } } public class Roll : BaseSkillState { public static float baseDuration = 0.5f; public static float initialSpeedCoefficient = 5f; public static float finalSpeedCoefficient = 2.5f; public static float dodgeFOV = DodgeState.dodgeFOV; private float duration; private bool hasFrenzy; private Transform modelTransform; private float rollSpeed; private Vector3 forwardDirection; private Animator animator; private Vector3 previousPosition; private CharacterModel characterModel; private HurtBoxGroup hurtboxGroup; public override void OnEnter() { //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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_0114: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_00e5: 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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); modelTransform = ((EntityState)this).GetModelTransform(); hasFrenzy = ((EntityState)this).characterBody.HasBuff(Buffs.frenzyBuff) || ((EntityState)this).characterBody.HasBuff(Buffs.frenzyScepterBuff); duration = baseDuration; if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); hurtboxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>(); } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); forwardDirection = ((Vector3)(ref val)).normalized; } Vector3 val2 = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : forwardDirection); Vector3 val3 = Vector3.Cross(Vector3.up, val2); float num = Vector3.Dot(forwardDirection, val2); float num2 = Vector3.Dot(forwardDirection, val3); RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity.y = 0f; ((EntityState)this).characterMotor.velocity = forwardDirection * rollSpeed; } Vector3 val4 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero); previousPosition = ((EntityState)this).transform.position - val4; if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.armorBuff, 3f * baseDuration); ((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 0.5f * baseDuration); } string text = "HenryRoll"; if (hasFrenzy) { text = "NemryBlink"; HideModel(); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); duration = 0.25f; } else { ((EntityState)this).PlayAnimation("FullBody, Override", "Roll", "Roll.playbackRate", duration, 0f); } Util.PlaySound(text, ((EntityState)this).gameObject); } private void HideModel() { if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount++; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup val = hurtboxGroup; int hurtBoxesDeactivatorCounter = val.hurtBoxesDeactivatorCounter + 1; val.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } } private void ShowModel() { //IL_0008: 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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.1f; CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount--; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup val = hurtboxGroup; int hurtBoxesDeactivatorCounter = val.hurtBoxesDeactivatorCounter - 1; val.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } } private void CreateBlinkEffect(Vector3 origin) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //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_0013: Unknown result type (might be due to invalid IL or missing references) EffectData val = new EffectData(); val.rotation = Quaternion.identity; val.origin = origin; EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false); } private void RecalculateRollSpeed() { rollSpeed = ((BaseState)this).moveSpeedStat * Mathf.Lerp(initialSpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / baseDuration); } public override void FixedUpdate() { //IL_0036: 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_0049: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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) ((EntityState)this).FixedUpdate(); RecalculateRollSpeed(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.forward = forwardDirection; } Vector3 val = ((EntityState)this).transform.position - previousPosition; Vector3 normalized = ((Vector3)(ref val)).normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && normalized != Vector3.zero) { Vector3 val2 = normalized * rollSpeed; float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f); val2 = forwardDirection * num; val2.y = 0f; ((EntityState)this).characterMotor.velocity = val2; } previousPosition = ((EntityState)this).transform.position; if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); if (hasFrenzy) { ShowModel(); } ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; } public override void OnSerialize(NetworkWriter writer) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnSerialize(writer); writer.Write(forwardDirection); } public override void OnDeserialize(NetworkReader reader) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) ((BaseSkillState)this).OnDeserialize(reader); forwardDirection = reader.ReadVector3(); } } public class Shoot : BaseSkillState { public static float damageCoefficient = 4.2f; public static float procCoefficient = 1f; public static float baseDuration = 0.6f; public static float force = 800f; public static float recoil = 3f; public static float range = 256f; public static GameObject tracerEffectPrefab = Resources.Load<GameObject>("Prefabs/Effects/Tracers/TracerGoldGat"); private float duration; private float fireTime; private bool hasFired; private string muzzleString; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.2f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "Muzzle"; ((EntityState)this).PlayAnimation("LeftArm, Override", "ShootGun", "ShootGun.playbackRate", 1.8f, 0f); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_00ee: 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_0105: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; ((EntityState)this).characterBody.AddSpreadBloom(1.5f); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); Util.PlaySound("HenryShootPistol", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 0f, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 0f, spreadYawScale = 0f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } 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)2; } } public class ShootAlt : BaseSkillState { public static float damageCoefficient = 0.9f; public static float procCoefficient = 1f; public static float baseDuration = 0.3f; public static float force = 200f; public static float recoil = 1f; public static float range = 256f; public static GameObject tracerEffectPrefab = Resources.Load<GameObject>("Prefabs/Effects/Tracers/TracerCommandoDefault"); private float duration; private float fireTime; private bool hasFired; private string muzzleString; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.2f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "AltMuzzle"; ((EntityState)this).PlayAnimation("RightArm, Override", "ShootAltGun", "ShootAltGun.playbackRate", 3f * duration, 0f); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_00ee: 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_0105: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; ((EntityState)this).characterBody.AddSpreadBloom(0.5f); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); Util.PlaySound("HenryShootAltPistol", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 0f, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 0f, spreadYawScale = 0f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } 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)2; } } public class ShootUzi : BaseSkillState { public static float damageCoefficient = 0.75f; public static float procCoefficient = 0.75f; public static float baseDuration = 0.1f; public static float force = 100f; public static float recoil = 1.5f; public static float range = 256f; public static GameObject tracerEffectPrefab = Resources.Load<GameObject>("Prefabs/Effects/Tracers/TracerCommandoDefault"); private float duration; private string muzzleString; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "Muzzle"; ((EntityState)this).PlayAnimation("LeftArm, Override", "ShootUzi", "ShootGun.playbackRate", 5f * duration, 0f); Fire(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: 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_00be: 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_00c5: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0145: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.AddSpreadBloom(0.5f); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); Util.PlaySound("HenryShootUzi", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 8f, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 0.5f, spreadYawScale = 0.5f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new UziIdle()); } } 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)2; } } public class SlashCombo : BaseMeleeAttack { private HenryFuryComponent furyComponent; public override void OnEnter() { //IL_001f: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) furyComponent = ((EntityState)this).gameObject.GetComponent<HenryFuryComponent>(); hitboxName = "Sword"; damageType = (DamageType)0; damageCoefficient = 2.8f; procCoefficient = 1f; pushForce = 300f; bonusForce = Vector3.zero; baseDuration = 1f; attackStartTime = 0.2f; attackEndTime = 0.4f; baseEarlyExitTime = 0.4f; hitStopDuration = 0.012f; attackRecoil = 0.5f; hitHopVelocity = 4f; swingSoundString = "HenrySwordSwing"; hitSoundString = ""; muzzleString = ((swingIndex % 2 == 0) ? "SwingLeft" : "SwingRight"); swingEffectPrefab = Asset.swordSwingEffect; hitEffectPrefab = Asset.swordHitImpactEffect; impactSound = Asset.swordHitSoundEvent.index; base.OnEnter(); } protected override void PlayAttackAnimation() { base.PlayAttackAnimation(); } protected override void PlaySwingEffect() { base.PlaySwingEffect(); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); if (Object.op_Implicit((Object)(object)furyComponent)) { furyComponent.AddFury(); } } protected override void SetNextState() { int num = ((swingIndex == 0) ? 1 : 0); ((EntityState)this).outer.SetNextState((EntityState)(object)new SlashCombo { swingIndex = num }); } public override void OnExit() { base.OnExit(); } } public class ThrowBomb : BaseSkillState { public static float damageCoefficient = 16f; public static float procCoefficient = 1f; public static float baseDuration = 0.65f; public static float throwForce = 80f; private float duration; private float fireTime; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.35f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayAnimation("Gesture, Override", "ThrowBomb", "ThrowBomb.playbackRate", duration, 0f); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; Util.PlaySound("HenryBombThrow", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(Projectiles.bombPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 4000f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, throwForce); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } 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)2; } } } namespace HenryMod.SkillStates.Nemry { public class Burst : BaseNemrySkillState { public static float baseDuration = 0.2f; public static float damageCoefficient = 6.8f; public static float procCoefficient = 1f; public static float blastForce = 2500f; public static float pushForce = 100f; public static float recoil = 5f; protected Vector3 aimDirection; public override void OnEnter() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); ((BaseState)this).StartAimMode(0.5f, true); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); Fire(); SpendEnergy(10f, (SkillSlot)2); ((EntityState)this).PlayAnimation("Gesture, Override", "ShootGun", "ShootGun.playbackRate", baseDuration, 0f); } protected void Fire() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014f: 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_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); aimDirection = ((Ray)(ref aimRay)).direction; ((EntityState)this).characterBody.AddSpreadBloom(2f); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, "Muzzle", false); Util.PlaySound("HenryShootShotgun", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = -aimDirection * pushForce; ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); BlastAttack val = new BlastAttack(); val.radius = 10f; val.procCoefficient = 1f; val.position = ((Ray)(ref aimRay)).origin + 2f * ((Ray)(ref aimRay)).direction; val.attacker = ((EntityState)this).gameObject; val.crit = ((BaseState)this).RollCrit(); val.baseDamage = ((EntityState)this).characterBody.damage * damageCoefficient; val.falloffModel = (FalloffModel)0; val.baseForce = blastForce; val.teamIndex = TeamComponent.GetObjectTeam(val.attacker); val.damageType = DamageTypeCombo.op_Implicit((DamageType)32); val.attackerFiltering = (AttackerFiltering)2; Result val2 = val.Fire(); EffectData val3 = new EffectData(); val3.origin = ((Ray)(ref aimRay)).origin + 2f * ((Ray)(ref aimRay)).direction; val3.scale = 8f; EffectManager.SpawnEffect(Resources.Load<GameObject>("Prefabs/Effects/ImpactEffects/FusionCellExplosion"), val3, true); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= baseDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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) //IL_0031: 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) ((EntityState)this).OnExit(); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.2f; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); } 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)2; } } public class DodgeSlash : BaseSkillState { public static float duration = 0.6f; private float previousAirControl; public override void OnEnter() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //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_003c: 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_014e: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0161: 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_0071: 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_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) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00ad: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_00f2: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); previousAirControl = ((EntityState)this).characterMotor.airControl; ((EntityState)this).characterMotor.airControl = BaseLeap.airControl; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = -((Ray)(ref aimRay)).direction; if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; val.y = Mathf.Max(val.y, BaseLeap.minimumY); Vector3 val2 = ((Vector3)(ref val)).normalized * BaseLeap.aimVelocity * 10f; Vector3 val3 = Vector3.up * BaseLeap.upwardVelocity; Vector3 val4 = new Vector3(val.x, 0f, val.z); Vector3 val5 = ((Vector3)(ref val4)).normalized * BaseLeap.forwardVelocity; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = val2 + val3 + val5; ((EntityState)this).characterMotor.velocity.y *= 0.8f; if (((EntityState)this).characterMotor.velocity.y < 0f) { ((EntityState)this).characterMotor.velocity.y *= 0.1f; } } ((EntityState)this).characterDirection.moveVector = val; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); ((EntityState)this).PlayAnimation("FullBody, Override", "DodgeSlash", "DodgeSlash.playbackRate", duration, 0f); Util.PlayAttackSpeedSound(DodgeState.dodgeSoundString, ((EntityState)this).gameObject, 1.5f); } public override void OnExit() { //IL_000f: 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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).characterMotor.airControl = previousAirControl; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.9f; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((BaseState)this).StartAimMode(0.5f, false); 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)5; } } public class FlashStep : BaseNemrySkillState { public static float duration = 0.1f; private Transform modelTransform; private float stopwatch; private Vector3 blinkDestination = Vector3.zero; private Vector3 blinkStart = Vector3.zero; private Animator animator; private CharacterModel characterModel; private HurtBoxGroup hurtboxGroup; public override void OnEnter() { //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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_018f: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); Util.PlaySound("NemryBlink", ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { animator = ((Component)modelTransform).GetComponent<Animator>(); characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); hurtboxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount++; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup val = hurtboxGroup; int hurtBoxesDeactivatorCounter = val.hurtBoxesDeactivatorCounter + 1; val.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((Behaviour)((EntityState)this).characterMotor).enabled = false; } Vector3 val2 = ((EntityState)this).transform.position; if (Object.op_Implicit((Object)(object)tracker) && Object.op_Implicit((Object)(object)tracker.GetTrackingTarget())) { Vector3 position = ((Component)tracker.GetTrackingTarget()).transform.position; Ray aimRay = ((BaseState)this).GetAimRay(); val2 = position - 1.25f * ((Ray)(ref aimRay)).direction; val2.y = ((Component)tracker.GetTrackingTarget()).transform.position.y; } blinkDestination = ((EntityState)this).transform.position; blinkStart = ((EntityState)this).transform.position; blinkDestination = val2; blinkDestination += ((EntityState)this).transform.position - ((EntityState)this).characterBody.footPosition; CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); SpendEnergy(5f, (SkillSlot)2); } private void CreateBlinkEffect(Vector3 origin) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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) EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(blinkDestination - blinkStart); val.origin = origin; EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false); } private void SetPosition(Vector3 newPosition) { //IL_001c: 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) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(newPosition, Quaternion.identity, true); } } public override void FixedUpdate() { //IL_004d: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } SetPosition(Vector3.Lerp(blinkStart, blinkDestination, stopwatch / duration)); if (stopwatch >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound(BlinkState.endSoundString, ((EntityState)this).gameObject); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform) && Object.op_Implicit((Object)(object)BlinkState.destealthMaterial)) { TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)animator).gameObject); val.duration = 1f; val.destroyComponentOnEnd = true; val.originalMaterial = BlinkState.destealthMaterial; val.inspectorCharacterModel = ((Component)animator).gameObject.GetComponent<CharacterModel>(); val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.animateShaderAlpha = true; } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; obj.invisibilityCount--; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup val2 = hurtboxGroup; int hurtBoxesDeactivatorCounter = val2.hurtBoxesDeactivatorCounter - 1; val2.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((Behaviour)((EntityState)this).characterMotor).enabled = true; } ((EntityState)this).OnExit(); } } public class MainState : HenryMain { private CustomInputBank customInputBank; public override void OnEnter() { base.OnEnter(); customInputBank = ((EntityState)this).gameObject.GetComponent<CustomInputBank>(); } public override void Update() { base.Update(); if (((EntityState)this).isAuthority && !localUser.isUIFocused && Object.op_Implicit((Object)(object)customInputBank) && customInputBank.weaponSwapSkill.down) { weaponStateMachine.SetInterruptState((EntityState)(object)new WeaponSwap(), (InterruptPriority)1); } } public override void FixedUpdate() { base.FixedUpdate(); } } public class ShootGun : BaseNemrySkillState { public static float damageCoefficient = 0.9f; public static float boostedDamageCoefficient = 3.5f; public static float procCoefficient = 1f; public static float baseDuration = 0.6f; public static float force = 200f; public static float recoil = 1.5f; public static float range = 256f; public static float energyCost = 2.5f; public static GameObject tracerEffectPrefab = Resources.Load<GameObject>("Prefabs/Effects/Tracers/TracerEngiTurret"); private float duration; private float fireTime; private bool hasFired; private string muzzleString; private bool isBoosted; public override void OnEnter() { base.OnEnter(); duration = Shoot.baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.2f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "Muzzle"; isBoosted = false; if (energyComponent.SpendEnergy(energyCost, (SkillSlot)0)) { isBoosted = true; } ((EntityState)this).PlayAnimation("Gesture, Override", "ShootGun", "ShootGun.playbackRate", 1.5f * duration, 0f); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //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_00ae: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: 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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //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_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: 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_00e4: 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) if (hasFired) { return; } hasFired = true; ((EntityState)this).characterBody.AddSpreadBloom(1.5f); EffectManager.SimpleMuzzleFlash(Asset.muzzleFlashEnergy, ((EntityState)this).gameObject, muzzleString, false); string text = "NemryShootGun"; if (isBoosted) { text = "NemryShootEnergyAlt"; } Util.PlaySound(text, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); LayerMask stopperMask = CommonMasks.bullet; float num = damageCoefficient; FalloffModel falloffModel = (FalloffModel)1; GameObject energyTracer = tracerEffectPrefab; if (isBoosted) { num = boostedDamageCoefficient; stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask; falloffModel = (FalloffModel)0; energyTracer = Asset.energyTracer; } new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = num * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = falloffModel, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 0f, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = stopperMask, weapon = null, tracerEffectPrefab = energyTracer, spreadPitchScale = 0f, spreadYawScale = 0f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }.Fire(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } 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)1; } } public class SlashCombo : BaseMeleeAttack { private NemryEnergyComponent energyComponent; public override void OnEnter() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) hitboxName = "Sword"; damageType = (DamageType)0; damageCoefficient = 3.8f; procCoefficient = 1f; pushForce = 300f; bonusForce = Vector3.zero; baseDuration = 1f; attackStartTime = 0.2f; attackEndTime = 0.4f; baseEarlyExitTime = 0.4f; hitStopDuration = 0.012f; attackRecoil = 0.5f; hitHopVelocity = 4f; swingSoundString = "NemrySwordSwing"; hitSoundString = ""; muzzleString = ((swingIndex % 2 == 0) ? "SwingLeft" : "SwingRight"); swingEffectPrefab = Asset.nemSwordSwingEffect; hitEffectPrefab = Asset.nemSwordHitImpactEffect; impactSound = Asset.nemSwordHitSoundEvent.index; base.OnEnter(); energyComponent = ((EntityState)this).GetComponent<NemryEnergyComponent>(); } protected override void PlayAttackAnimation() { if (animator.GetBool("isGrounded")) { if (!animator.GetBool("isMoving")) { ((EntityState)this).PlayCrossfade("FullBody, Override", "Slash" + (1 + swingIndex), "Slash.playbackRate", duration, 0.05f); } } else { ((EntityState)this).PlayCrossfade("FullBody, Override", "Slash" + (1 + swingIndex), "Slash.playbackRate", duration, 0.05f); } ((EntityState)this).PlayCrossfade("Gesture, Override", "Slash" + (1 + swingIndex), "Slash.playbackRate", duration, 0.05f); } protected override void PlaySwingEffect() { base.PlaySwingEffect(); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); energyComponent.AddEnergy(20f); } protected override void SetNextState() { int num = swingIndex + 1; if (num == 3) { num = 1; } ((EntityState)this).outer.SetNextState((EntityState)(object)new SlashCombo { swingIndex = num }); } public override void OnExit() { base.OnExit(); } } public class SpawnState : BaseState { public static float duration = 3.6f; private CameraRigController cameraController; private bool initCamera; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayAnimation("Body", "Spawn"); Util.PlaySound(SpawnState.spawnSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((EntityState)this).GetAimAnimator())) { ((Behaviour)((EntityState)this).GetAimAnimator()).enabled = false; } animator.SetLayerWeight(animator.GetLayerIndex("AimPitch"), 0f); animator.SetLayerWeight(animator.GetLayerIndex("AimYaw"), 0f); EffectManager.SimpleMuzzleFlash(SpawnState.spawnEffectPrefab, ((EntityState)this).gameObject, "SpawnOrigin", false); } public override void FixedUpdate() { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!Object.op_Implicit((Object)(object)cameraController)) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.playerCharacterMasterController) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.playerCharacterMasterController.networkUser)) { cameraController = ((EntityState)this).characterBody.master.playerCharacterMasterController.networkUser.cameraRigController; } } else if (!initCamera) { initCamera = true; ((InstanceData)cameraController.cameraMode.camToRawInstanceData[UnityObjectWrapperKey<CameraRigController>.op_Implicit(cameraController)]).SetPitchYawFromLookVector(-((EntityState)this).characterDirection.forward); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).GetAimAnimator())) { ((Behaviour)((EntityState)this).GetAimAnimator()).enabled = true; } animator.SetLayerWeight(animator.GetLayerIndex("AimPitch"), 1f); animator.SetLayerWeight(animator.GetLayerIndex("AimYaw"), 1f); } } public class SpearStab : BaseMeleeAttack { public override void OnEnter() { //IL_0012: 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_003e: 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_00d2: Unknown result type (might be due to invalid IL or missing references) hitboxName = "Spear"; damageType = (DamageType)8388608; damageCoefficient = 1.6f; procCoefficient = 1f; pushForce = 250f; bonusForce = Vector3.zero; baseDuration = 0.8f; attackStartTime = 0.25f; attackEndTime = 0.35f; baseEarlyExitTime = 0.2f; hitStopDuration = 0.025f; attackRecoil = 1.25f; hitHopVelocity = 6f; swingSoundString = "HenrySwordSwing"; hitSoundString = ""; muzzleString = "SwingCenter"; swingEffectPrefab = Asset.spearSwingEffect; hitEffectPrefab = Asset.swordHitImpactEffect; impactSound = Asset.swordHitSoundEvent.index; base.OnEnter(); ((EntityState)this).characterBody.isSprinting = false; } public override void FixedUpdate() { base.FixedUpdate(); if (stopwatch <= duration * attackEndTime) { ((EntityState)this).characterBody.isSprinting = false; } } protected override void PlayAttackAnimation() { ((EntityState)this).PlayCrossfade("Gesture, Override", "Stab", "Stab.playbackRate", duration, 0.05f); } protected override void PlaySwingEffect() { base.PlaySwingEffect(); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); } protected override void SetNextState() { ((EntityState)this).outer.SetNextState((EntityState)(object)new SpearStab()); } public override void OnExit() { base.OnExit(); } } public class VoidBlast : BaseSkillState { public static float damageCoefficient = 4.5f; public static float procCoefficient = 1f; public static float baseDuration = 0.8f; public static float throwForce = 80f; private float duration; private float fireTime; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = ThrowBomb.baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.35f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayAnimation("Gesture, Override", "VoidBlast", "VoidBlast.playbackRate", duration, 0f); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) if (!hasFired) { hasFired = true; Util.PlaySound("HenryBombThrow", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(Projectiles.voidBlastPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, -2000f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, throwForce); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } 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)2; } } public class WeaponSwap : BaseNemrySkillState { public static float baseDuration = 0.4f; public static SkillDef gunPrimaryDef = HenryMod.Modules.Enemies.Nemry.gunPrimaryDef; public static SkillDef gunSecondaryDef = HenryMod.Modules.Enemies.Nemry.gunSecondaryDef; public static SkillDef gunUtilityDef = HenryMod.Modules.Enemies.Nemry.gunUtilityDef; public static SkillDef gunSpecialDef = HenryMod.Modules.Enemies.Nemry.gunSpecialDef; private float duration; private Animator animator; public override void OnEnter() { base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; if (duration <= 0.1f) { duration = 0.1f; } animator = ((EntityState)this).GetModelAnimator(); if (energyComponent.weaponMode == NemryEnergyComponent.WeaponMode.Sword) { ((EntityState)this).PlayAnimation("Gesture, Override", "GunMode", "WeaponSwap.playbackRate", duration, 0f); Util.PlaySound("NemryEquipGun", ((EntityState)this).gameObject); ((EntityState)this).characterBody._defaultCrosshairPrefab = Asset.LoadCrosshair("Standard"); ((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).skillLocator.primary, gunPrimaryDef, (SkillOverridePriority)4); ((EntityState)this).skillLocator.secondary.SetSkillOverride((object)((EntityState)this).skillLocator.secondary, gunSecondaryDef, (SkillOverridePriority)4); ((EntityState)this).skillLocator.utility.SetSkillOverride((object)((EntityState)this).skillLocator.utility, gunUtilityDef, (SkillOverridePriority)4); ((EntityState)this).skillLocator.special.SetSkillOverride((object)((EntityState)this).skillLocator.special, gunSpecialDef, (SkillOverridePriority)4); energyComponent.weaponMode = NemryEnergyComponent.WeaponMode.Gun; animator.SetLayerWeight(animator.GetLayerIndex("Body, Gun"), 1f); } else { ((EntityState)this).PlayAnimation("Gesture, Override", "SwordMode", "WeaponSwap.playbackRate", duration, 0f); Util.PlaySound("NemryEquipSword", ((EntityState)this).gameObject); ((EntityState)this).characterBody._defaultCrosshairPrefab = Asset.LoadCrosshair("SimpleDot"); ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).skillLocator.primary, gunPrimaryDef, (SkillOverridePriority)4); ((EntityState)this).skillLocator.secondary.UnsetSkillOverride((object)((EntityState)this).skillLocator.secondary, gunSecondaryDef, (SkillOverridePriority)4); ((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)((EntityState)this).skillLocator.utility, gunUtilityDef, (SkillOverridePriority)4); ((EntityState)this).skillLocator.special.UnsetSkillOverride((object)((EntityState)this).skillLocator.special, gunSpecialDef, (SkillOverridePriority)4); energyComponent.weaponMode = NemryEnergyComponent.WeaponMode.Sword; animator.SetLayerWeight(animator.GetLayerIndex("Body, Gun"), 0f); } } public override void FixedUpdate() { ((EntityState)this).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)2; } } } namespace HenryMod.SkillStates.Nemry.Torrent { public class TorrentAir : BaseNemrySkillState { public static GameObject bulletTracerEffectPrefab = Asset.energyTracer; public static float damageCoefficient = 2.1f; public static float baseFireInterval = 0.09f; public static float bulletRecoil = 0.5f; public static float hopHeight = 22f; public static float procCoefficient = 0.9f; public static float bulletForce = 150f; public static float baseStartDuration = 0.5f; private float startDuration; private float fireInterval; private float fireStopwatch; private string muzzleString; private int storedJumpCount; public override void OnEnter() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) storedJumpCount = ((EntityState)this).characterMotor.jumpCount; base.OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); fireInterval = baseFireInterval / ((BaseState)this).attackSpeedStat; startDuration = baseStartDuration / ((BaseState)this).attackSpeedStat; muzzleString = "Muzzle"; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.25f; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopHeight); ((EntityState)this).PlayAnimation("FullBody, Override", "AirTorrent", "Torrent.playbackRate", startDuration, 0f); } public override void OnExit() { ((EntityState)this).OnExit(); if (((EntityState)this).characterMotor.isGrounded) { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); } else { ((EntityState)this).PlayAnimation("FullBody, Override", "AirTorrentExit", "Torrent.playbackRate", 0.4f / ((BaseState)this).attackSpeedStat, 0f); } } private void FireBullet() { //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: 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_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0186: 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_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: 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_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_010c: 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) ((BaseState)this).AddRecoil(-2f * bulletRecoil, -3f * bulletRecoil, -1f * bulletRecoil, 1f * bulletRecoil); ((EntityState)this).characterBody.AddSpreadBloom(0.33f * bulletRecoil); EffectManager.SimpleMuzzleFlash(FireGrenades.effectPrefab, ((EntityState)this).gameObject, muzzleString, false); Util.PlaySound("NemryShootEnergyAlt", ((EntityState)this).gameObject); if (((EntityState)this).fixedAge >= startDuration) { ((EntityState)this).PlayAnimation("FullBody, Override", "AirTorrentLoop", "Torrent.playbackRate", fireInterval, 0f); } if (((EntityState)this).isAuthority) { float damage = damageCoefficient * ((BaseState)this).damageStat; Vector3 position = ((EntityState)this).GetModelChildLocator().FindChild(muzzleString).position; Vector3 aimVector = ((EntityState)this).GetModelChildLocator().FindChild(muzzleString).forward; if (((EntityState)this).fixedAge >= startDuration) { aimVector = Vector3.down; } Ray aimRay = ((BaseState)this).GetAimRay(); new BulletAttack { bulletCount = 1u, aimVector = aimVector, origin = position, damage = damage, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)0, maxDistance = 256f, force = bulletForce, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 5f, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.5f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = bulletTracerEffectPrefab, spreadPitchScale = 0.25f, spreadYawScale = 0.25f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = MinigunFire.bulletHitEffectPrefab, HitEffectNormal = MinigunFire.bulletHitEffectNormal }.Fire(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((BaseState)this).StartAimMode(0.2f, false); fireStopwatch -= Time.fixedDeltaTime;