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 FortunesFromTheScrapyard v1.0.4
FortunesFromTheScrapyard.dll
Decompiled a day ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AK.Wwise; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EmotesAPI; using EntityStates; using EntityStates.BrotherMonster; using EntityStates.Cloaker; using EntityStates.Commando.CommandoWeapon; using EntityStates.Duke; using EntityStates.Wrecker.Components; using FortunesFromTheScrapyard; using FortunesFromTheScrapyard.Characters.DukeDecoy; using FortunesFromTheScrapyard.Characters.DukeDecoy.Components; using FortunesFromTheScrapyard.Items; using FortunesFromTheScrapyard.Monsters.Gardener; using FortunesFromTheScrapyard.Ricochet; using FortunesFromTheScrapyard.Survivors.Cloaker; using FortunesFromTheScrapyard.Survivors.Duke; using FortunesFromTheScrapyard.Survivors.Duke.Components; using FortunesFromTheScrapyard.Survivors.Duke.Skills; using FortunesFromTheScrapyard.Survivors.Wrecker; using HG; using HG.Reflection; using IL.RoR2; using JetBrains.Annotations; using KinematicCharacterController; using MSU; using MSU.Config; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using On.RoR2; using R2API; using R2API.AddressReferencedAssets; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.ScriptableObjects; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.Items; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2BepInExPack.GameAssetPaths; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.UI; [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyCompany("FortunesFromTheScrapyard")] [assembly: AssemblyProduct("FortunesFromTheScrapyard")] [assembly: AssemblyTitle("FortunesFromTheScrapyard")] [assembly: AssemblyInformationalVersion("1.0.0+d6e62047db9cf7875be288bb97f483538ddd9492")] [assembly: AssemblyConfiguration("Mystical")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [Embedded] [CompilerGenerated] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace EntityStates.Wrecker { public class CrashoutFire : BaseSkillState { public float baseDuration = 0.25f; private float duration; private bool hasFired; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(duration, true); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).fixedAge >= duration / 2f) { hasFired = true; Fire(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public 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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_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_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_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_013a: 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_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0184: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); if (NetworkServer.active) { BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = TeamMask.all; val.maxAngleFilter = 60f; val.maxDistanceFilter = 26f; val.searchOrigin = ((Ray)(ref aimRay)).origin; val.searchDirection = ((Ray)(ref aimRay)).direction; val.sortMode = (SortMode)1; val.filterByLoS = true; val.filterByDistinctEntity = true; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); TeamIndex team = ((BaseState)this).GetTeam(); IEnumerable<HurtBox> enumerable = from hurtBox in val.GetResults() where Util.IsValid((Object)(object)hurtBox) && FriendlyFireManager.ShouldSplashHitProceed(hurtBox.healthComponent, team) select hurtBox; foreach (HurtBox item in enumerable) { DamageInfo val2 = new DamageInfo { attacker = ((EntityState)this).gameObject, damage = 6f * ((BaseState)this).damageStat, crit = ((BaseState)this).RollCrit(), position = ((Component)item).transform.position, procCoefficient = 1f, damageType = (DamageTypeCombo.op_Implicit((DamageType)32) | DamageTypeCombo.GenericPrimary) }; Vector3 val3 = ((Component)item).transform.position - ((EntityState)this).transform.position; Vector3 val4 = ((Vector3)(ref val3)).normalized * 1500f; val3 = ((Ray)(ref aimRay)).direction; val2.force = val4 + ((Vector3)(ref val3)).normalized * 1500f; val2.canRejectForce = false; DamageInfo val5 = val2; if (Object.op_Implicit((Object)(object)item.healthComponent)) { item.healthComponent.TakeDamage(val5); GlobalEventManager.instance.OnHitEnemy(val5, ((Component)item.healthComponent).gameObject); } } } if (((EntityState)this).isAuthority) { float num = (((EntityState)this).characterMotor.isGrounded ? 2000f : (-2500f)); Vector3 val6 = (((EntityState)this).characterMotor.isGrounded ? ((EntityState)this).characterDirection.forward : ((Ray)(ref aimRay)).direction); ((EntityState)this).characterMotor.ApplyForce(val6 * num, false, false); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class CrashoutWindup : BaseSkillState { public AimRequest aimRequest; public float baseDuration = 0.75f; private float duration; private float halfBonusAttackSpeedStat; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; halfBonusAttackSpeedStat = (((BaseState)this).attackSpeedStat - 1f) * 0.5f + 1f; ((EntityState)this).healthComponent.AddBarrierAuthority(((EntityState)this).healthComponent.fullCombinedHealth * 0.2f); ((BaseState)this).StartAimMode(duration, false); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = GetAimType(); } } public AimRequest GetAimType() { //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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_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_00da: Expected O, but got Unknown CharacterCameraParamsData data = ((EntityState)this).cameraTargetParams.cameraParams.data; ref Vector3 value = ref data.idealLocalCameraPos.value; value += new Vector3(-2.5f, -0.5f, -1f); Debug.LogWarning((object)(data.fov.value + " FOV | " + data.fov.alpha + " ALPHA")); CameraParamsOverrideHandle overrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(new CameraParamsOverrideRequest { cameraParamsData = data, priority = 0.1f }, baseDuration / 3f / halfBonusAttackSpeedStat); return new AimRequest((AimType)4, (Action<AimRequest>)delegate { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).cameraTargetParams.RemoveParamsOverride(overrideHandle, baseDuration / 3f / halfBonusAttackSpeedStat); }); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = false; if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { EntityStateMachine outer = ((EntityState)this).outer; CrashoutFire crashoutFire = new CrashoutFire(); ((BaseSkillState)crashoutFire).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; outer.SetNextState((EntityState)(object)crashoutFire); } } public override void OnExit() { AimRequest obj = aimRequest; if (obj != null) { obj.Dispose(); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class Explode : BaseSkillState { public static float baseDuration = 0.75f; public static float blastRadius = 13f; public static float blastProcCoefficient = 1f; public static float blastDamageCoefficient = 3f; public static float blastForce = 700f; public static Vector3 blastBonusForce = new Vector3(0f, 0f, 0f); public static int maxBursts = 3; private float duration; private int burstsFired; private float timer; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Fire(); } public void Fire() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_0098: 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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_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_0108: 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_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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Expected O, but got Unknown burstsFired++; ((EntityState)this).PlayCrossfade("Gesture, Override", "Explode", "Secondary.playbackRate", duration, duration * 0.05f); BlastAttack val = new BlastAttack(); val.attacker = ((EntityState)this).gameObject; val.baseDamage = ((EntityState)this).characterBody.damage * blastDamageCoefficient; val.baseForce = blastForce * (float)burstsFired; val.bonusForce = blastBonusForce; val.crit = ((BaseState)this).RollCrit(); val.damageType = DamageTypeCombo.op_Implicit((DamageType)0); DamageAPI.AddModdedDamageType(val, WreckerSurvivor.WreckerExplode); val.falloffModel = (FalloffModel)0; val.procCoefficient = blastProcCoefficient; val.radius = blastRadius * (float)burstsFired; val.position = ((EntityState)this).gameObject.transform.position; val.attackerFiltering = (AttackerFiltering)2; val.teamIndex = ((EntityState)this).teamComponent.teamIndex; val.Fire(); EffectManager.SpawnEffect(BrokenHeadphones.headphonesShockwavePrefab, new EffectData { origin = ((EntityState)this).characterBody.corePosition, rotation = Quaternion.identity, scale = 0.6f * (float)burstsFired }, true); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); timer += Time.fixedDeltaTime; if (timer >= duration && burstsFired < maxBursts) { timer = 0f; Fire(); } if (((EntityState)this).isAuthority && burstsFired == maxBursts) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)3; } } public class MainState : GenericCharacterMain { private Animator animator; public LocalUser localUser; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); animator = ((BaseCharacterMain)this).modelAnimator; FindLocalUser(); } private void FindLocalUser() { if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return; } foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody) { localUser = readOnlyLocalUsers; break; } } } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)animator)) { bool flag = false; if (!((EntityState)this).characterBody.outOfDanger || !((EntityState)this).characterBody.outOfCombat) { flag = true; } animator.SetBool("inCombat", flag); if (((BaseState)this).isGrounded) { animator.SetFloat("airBlend", 0f); } else { animator.SetFloat("airBlend", 1f); } } } public override void ProcessJump() { //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: 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_022b: Expected O, but got Unknown //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Expected O, but got Unknown //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Expected O, but got Unknown if (!((BaseCharacterMain)this).hasCharacterMotor) { return; } bool flag = false; bool flag2 = false; if (!base.jumpInputReceived || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || ((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.maxJumpCount) { return; } int itemCount = ((EntityState)this).characterBody.inventory.GetItemCount(Items.JumpBoost); float num = 1f; float num2 = 1f; if (((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.baseJumpCount) { flag = true; num = 1.5f; num2 = 1.5f; } else if (itemCount > 0 && ((EntityState)this).characterBody.isSprinting) { float num3 = ((EntityState)this).characterBody.acceleration * ((EntityState)this).characterMotor.airControl; if (((EntityState)this).characterBody.moveSpeed > 0f && num3 > 0f) { flag2 = true; float num4 = Mathf.Sqrt(10f * (float)itemCount / num3); float num5 = ((EntityState)this).characterBody.moveSpeed / num3; num = (num4 + num5) / num5; } } GenericCharacterMain.ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, num, num2, false); if (((BaseCharacterMain)this).hasModelAnimator) { int layerIndex = ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("Body"); if (layerIndex >= 0) { if (((EntityState)this).characterBody.isSprinting) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("SprintJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else if (flag) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("BonusJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Jump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } } } if (flag) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/FeatherEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition }, true); } else if (((EntityState)this).characterMotor.jumpCount > 0) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/CharacterLandImpact"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = ((EntityState)this).characterBody.radius }, true); } if (flag2) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/BoostJumpEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity) }, true); } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.jumpCount++; } } public class SoundScape : BaseSkillState { private float baseDuration = 0.5f; private static float baseSoundWaveDamageCoefficient = 6f; public GameObject soundWave => WreckerSurvivor.soundWave; public override void OnEnter() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).PlayCrossfade("Gesture, Override", "BeatDrop", "Special.playbackRate", baseDuration * 2f, baseDuration * 0.05f); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = WreckerSurvivor.soundWave, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * baseSoundWaveDamageCoefficient, force = 0f, crit = ((BaseState)this).RollCrit() }; ProjectileManager.instance.FireProjectile(val); if (!((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 4f); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= baseDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } } public class ThrowDisk : GenericProjectileBaseState { public static float baseDuration = 0.2f; public static float baseDelayDuration = 0.3f * baseDuration; public static float diskDamageCoefficent = 4f; public GameObject disk = WreckerSurvivor.diskPrefab; public WreckerController wreckerController; private ChildLocator childLocator; public override void OnEnter() { wreckerController = ((EntityState)this).gameObject.GetComponent<WreckerController>(); base.attackSoundString = "sfx_wrecker_diskthrow"; base.baseDuration = baseDuration; base.baseDelayBeforeFiringProjectile = baseDelayDuration; base.force = 0f; base.projectilePitchBonus = -3.5f; ((EntityState)this).PlayCrossfade("Gesture, Override", "DiskThrow", "Utility.playbackRate", base.duration * 5f, 0.05f); ((GenericProjectileBaseState)this).OnEnter(); if (((EntityState)this).isAuthority && !((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 4f); } } public override void FireProjectile() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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) if (((EntityState)this).isAuthority) { Ray val = ((BaseState)this).GetAimRay(); val = ((GenericProjectileBaseState)this).ModifyProjectileAimRay(val); ((Ray)(ref val)).direction = Util.ApplySpread(((Ray)(ref val)).direction, 0f, 0f, 1f, 1f, 0f, base.projectilePitchBonus); ProjectileManager.instance.FireProjectile(disk, ((Ray)(ref val)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * diskDamageCoefficent, base.force, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } public override void FixedUpdate() { ((GenericProjectileBaseState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= base.duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((GenericProjectileBaseState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0011: 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_0014: Unknown result type (might be due to invalid IL or missing references) if (base.firedProjectile) { return (InterruptPriority)1; } return (InterruptPriority)2; } public override void PlayAnimation(float duration) { if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelAnimator())) { ((EntityState)this).PlayAnimation("Gesture, Override", "DiskThrow", "Secondary.playbackRate", base.duration * 2f, 0f); } } } public class WreckerFireAR : BaseSkillState { public static float damageCoefficient = WreckerSurvivor.basePrimaryDamage; public static float procCoefficient = 1f; public static float baseDuration = 0.1f; public static float baseFullDuration = 1.2f; public static float force = 200f; public static float recoil = 1.2f; public static float range = 2000f; public static GameObject tracerEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/TracerGoldGat"); public static GameObject critTracerEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/TracerCaptainShotgun"); public static int maxShotsPerBurst = 4; private int shotsFired; private float duration; private float fullDuration; private string muzzleString; private bool isCrit; private float timer; protected virtual float _damageCoefficient => damageCoefficient; protected virtual GameObject tracerPrefab => isCrit ? critTracerEffectPrefab : tracerEffectPrefab; public virtual string shootSoundString => "Play_commando_R"; public virtual FalloffModel falloff => (FalloffModel)1; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fullDuration = baseFullDuration / ((BaseState)this).attackSpeedStat; muzzleString = "GunMuzzle"; isCrit = ((BaseState)this).RollCrit(); ((EntityState)this).characterBody.SetAimTimer(2f); Fire(); ((EntityState)this).PlayCrossfade("Gesture, Override", "FireAR", "Primary.playbackRate", duration * 5f, duration * 0.05f); } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayCrossfade("Gesture, Override", "PrimaryIdle", "Primary.playbackRate", duration, duration * 0.05f); } private void Fire() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_0090: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_012a: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_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_0160: 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_0172: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown shotsFired++; EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); Util.PlaySound(shootSoundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoil, -1f * recoil, -0.5f * recoil, 0.5f * recoil); BulletAttack val = 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 = falloff, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle * 2.1f, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerPrefab, spreadPitchScale = 1f, spreadYawScale = 1f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab }; val.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(0.75f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); timer += Time.fixedDeltaTime; if (timer >= duration && shotsFired < maxShotsPerBurst) { timer = 0f; ((EntityState)this).characterBody.SetAimTimer(2f); Fire(); ((EntityState)this).PlayCrossfade("Gesture, Override", "FireAR", "Primary.playbackRate", duration * 5f, duration * 0.05f); } if (((EntityState)this).fixedAge >= fullDuration && shotsFired == maxShotsPerBurst && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_001b: 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_001e: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).fixedAge >= fullDuration) { return (InterruptPriority)0; } return (InterruptPriority)1; } } } namespace EntityStates.Wrecker.Components { public class PassiveDamageController : MonoBehaviour { public CharacterBody attackerBody; public CharacterBody characterBody; private GameObject victim; private CharacterBody victimBody; private HealthComponent victimMoveSpeed; private void Awake() { characterBody = ((Component)this).GetComponent<CharacterBody>(); } private void Start() { } private void FixedUpdate() { } } [RequireComponent(typeof(BuffWard))] [RequireComponent(typeof(ProjectileSimple))] [RequireComponent(typeof(SphereCollider))] public class SoundScapeController : MonoBehaviour { private SphereCollider collider; private BuffWard buffWard; private ProjectileSimple projectileSimple; private Transform areaIndicator; private float baseColliderRadius; private float baseBuffWardRadius; private Vector3 baseAreaIndicator; private float startValue; private float endValue; public void Awake() { collider = ((Component)this).GetComponent<SphereCollider>(); buffWard = ((Component)this).GetComponent<BuffWard>(); projectileSimple = ((Component)this).GetComponent<ProjectileSimple>(); } public void Start() { //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) baseColliderRadius = collider.radius; baseBuffWardRadius = buffWard.radius; baseAreaIndicator = areaIndicator.localScale; collider.radius = 0f; buffWard.radius = 0f; Keyframe[] keys = projectileSimple.velocityOverLifetime.GetKeys(); startValue = ((Keyframe)(ref keys[0])).value; endValue = ((Keyframe)(ref keys[1])).value; } public void FixedUpdate() { float num = buffWard.radiusCoefficientCurve.Evaluate(projectileSimple.stopwatch); collider.radius = baseColliderRadius * num; buffWard.radius = baseBuffWardRadius * num; projectileSimple.SetForwardSpeed(6f * (1f - num)); } } public class SoundWaveController : MonoBehaviour { private float timer = 0f; private int maxProjectiles = 5; private int currentProjectiles; private float interval = 0.05f; private ProjectileController projectileController; private SphereCollider sphereCollider; private BuffWard buffWard; public GameObject soundScape => WreckerSurvivor.soundScape; private void Start() { projectileController = ((Component)this).gameObject.GetComponent<ProjectileController>(); buffWard = soundScape.GetComponent<BuffWard>(); buffWard.radius = 2.5f; sphereCollider = soundScape.gameObject.GetComponent<SphereCollider>(); sphereCollider.radius = 2.5f; currentProjectiles = maxProjectiles; } private void FixedUpdate() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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) timer += Time.fixedDeltaTime; if (timer >= interval && currentProjectiles > 0) { FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = soundScape, position = ((Component)this).gameObject.transform.position, rotation = ((Component)this).gameObject.transform.rotation, owner = projectileController.owner }; ProjectileManager.instance.FireProjectile(val); currentProjectiles--; BuffWard obj = buffWard; obj.radius += 2.5f; SphereCollider obj2 = sphereCollider; obj2.radius += 2.5f; interval *= 1.5f; timer -= interval; } else if (currentProjectiles <= 0) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class WreckerController : MonoBehaviour { } } namespace EntityStates.Gardener { public class GardenerBarrage : BaseSkillState { private float stopwatch; private float missileStopwatch = 0f; public static float baseDuration = 4f; public static string muzzleString = "FaceMissileCenter"; public float missileSpawnFrequency = 2f; public static float missileSpawnDelay = 0f; public static float missileForce = 1000f; public static float damageCoefficient = 1f; public static float maxSpread = 90f; public static GameObject projectilePrefab = GardenerMonster.wispProjectilePrefab; public static GameObject muzzleflashPrefab; public static string jarEffectChildLocatorString; public static string jarOpenSoundString; public static string jarCloseSoundString; public static GameObject jarOpenEffectPrefab; public static GameObject jarCloseEffectPrefab; private ChildLocator childLocator; private static int BeginGravekeeperBarrageStateHash = Animator.StringToHash("BeginGravekeeperBarrage"); private static int EndGravekeeperBarrageStateHash = Animator.StringToHash("EndGravekeeperBarrage"); private bool isAnimate; private bool isFirst = true; private bool isLast = false; private Transform jarTransform; public override void OnEnter() { ((BaseState)this).OnEnter(); missileSpawnFrequency *= ((BaseState)this).attackSpeedStat; missileStopwatch -= missileSpawnDelay; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { childLocator = ((Component)modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)childLocator)) { jarTransform = childLocator.FindChild("Jar"); } } EffectManager.SimpleMuzzleFlash(jarOpenEffectPrefab, ((EntityState)this).gameObject, jarEffectChildLocatorString, false); Util.PlaySound(jarOpenSoundString, ((EntityState)this).gameObject); ((EntityState)this).characterBody.SetAimTimer(baseDuration + 2f); isAnimate = true; } private void FireBlob(Ray projectileRay, float bonusPitch, float bonusYaw) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) ((Ray)(ref projectileRay)).direction = Util.ApplySpread(((Ray)(ref projectileRay)).direction, 0f, maxSpread, 1f, 1f, 0f, 0f); Vector2 insideUnitCircle = Random.insideUnitCircle; ((Ray)(ref projectileRay)).origin = ((Ray)(ref projectileRay)).origin + new Vector3(insideUnitCircle.x, 0f, insideUnitCircle.y); if (NetworkServer.active) { ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref projectileRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref projectileRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, missileForce, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_018c: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); float deltaTime = ((EntityState)this).GetDeltaTime(); stopwatch += deltaTime; missileStopwatch += deltaTime; if (stopwatch >= baseDuration - 2f / missileSpawnFrequency) { isLast = true; } if (missileStopwatch >= 1f / missileSpawnFrequency) { missileStopwatch -= 1f / missileSpawnFrequency; if (isAnimate) { if (isFirst) { isFirst = false; ((EntityState)this).PlayCrossfade("FullBody, Override", "PrimaryLoop", "Primary.playbackRate", 2f / missileSpawnFrequency, 0.5f / missileSpawnFrequency); } else if (isLast) { ((EntityState)this).PlayCrossfade("FullBody, Override", "PrimaryEnd", "Primary.playbackRate", 2f / missileSpawnFrequency, 0.1f / missileSpawnFrequency); } else { ((EntityState)this).PlayCrossfade("FullBody, Override", "PrimaryLoop", "Primary.playbackRate", 2f / missileSpawnFrequency, 0.1f / missileSpawnFrequency); } isAnimate = false; } else { isAnimate = true; } if (Object.op_Implicit((Object)(object)((EntityState)this).transform)) { Ray projectileRay = default(Ray); ((Ray)(ref projectileRay)).origin = jarTransform.position; Ray aimRay = ((BaseState)this).GetAimRay(); ((Ray)(ref projectileRay)).direction = ((Ray)(ref aimRay)).direction; float num = 1000f; RaycastHit val = default(RaycastHit); if (Physics.Raycast(((BaseState)this).GetAimRay(), ref val, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { ((Ray)(ref projectileRay)).direction = ((RaycastHit)(ref val)).point - ((EntityState)this).transform.position; } FireBlob(projectileRay, 60f, 60f); } } if (stopwatch >= baseDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } } namespace EntityStates.Duke { public class DukeBaseMeleeAttack : BaseSkillState { public static float baseDuration = 4f; private float timer; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); timer += Time.fixedDeltaTime; if (((EntityState)this).isAuthority) { if (((EntityState)this).inputBank.skill2.down || ((EntityState)this).inputBank.skill3.down || ((EntityState)this).inputBank.skill4.down) { timer = 0f; } if ((timer >= baseDuration || ((EntityState)this).skillLocator.primary.stock == 0) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Reload()); } } } 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)0; } } public class EnterReload : BaseSkillState { public static float baseDuration = 4f; private float timer = 0f; public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); timer += Time.fixedDeltaTime; if ((timer >= baseDuration || ((EntityState)this).skillLocator.primary.stock == 0) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Reload()); } } 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 FanTheHammer : BaseSkillState { public static float baseProcCoefficient = 1f; public static float baseWindupDuration = 0.5f; public static float baseDurationPerShot = 0.25f; public static float baseForce = 600f; public static int bulletCount = 1; public static float baseBulletSpread = 10f; public static float baseBulletRadius = 0.2f; public static float baseBulletRecoil = 4f; public static float baseBulletRange = 999f; public static float baseSelfForce = 200f; public static GameObject tracerEffectPrefab = DukeSurvivor.dukeTracer; public static GameObject empoweredTracerEffectPrefab = DukeSurvivor.dukeTracerCrit; private uint soundID; private GameObject spinInstance; private bool fourthShot; private bool freeBullet; private float duration; private float windupDuration; private float perShotDuration; private string muzzleString; private bool isCrit; private float damageCoefficient; private float procCoefficient; private float force; private float bulletSpread; private float bulletRadius; private float bulletRecoil; private float bulletRange; private float selfForce; private bool hasFiredAllShots; private DamageType damageType = (DamageType)0; private DukeController dukeController; private int maxShotCount; private float shotTimer; private bool disabledSound; protected GameObject tracerPrefab = tracerEffectPrefab; public FalloffModel falloff = (FalloffModel)1; public virtual string shootSoundString => fourthShot ? "Play_railgunner_R_fire" : "Play_railgunner_m2_alt_fire"; public override void OnEnter() { //IL_00cd: 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_00dd: 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_01a6: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).skillLocator.primary.stock = ((EntityState)this).skillLocator.primary.maxStock; dukeController = ((EntityState)this).gameObject.GetComponent<DukeController>(); damageCoefficient = DukeSurvivor.baseFanDamageCoefficient * (1f + dukeController.attackSpeedConversion); procCoefficient = baseProcCoefficient; force = baseForce; bulletSpread = baseBulletSpread; bulletRadius = baseBulletRadius; bulletRecoil = baseBulletRecoil / 4f / ((BaseState)this).attackSpeedStat; bulletRange = baseBulletRange; selfForce = baseSelfForce; freeBullet = false; fourthShot = false; isCrit = ((BaseState)this).RollCrit(); falloff = (FalloffModel)1; damageType = DamageTypeCombo.op_Implicit(DamageTypeCombo.GenericSpecial); maxShotCount = ((EntityState)this).skillLocator.primary.GetBaseMaxStock() + ((EntityState)this).characterBody.GetBuffCount(FFTSContent.Buffs.bdDukeFreeShot); soundID = Util.PlayAttackSpeedSound("sfx_duke_pistol_spin", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (Object.op_Implicit((Object)(object)spinInstance)) { Object.Destroy((Object)(object)spinInstance); } spinInstance = Object.Instantiate<GameObject>(DukeSurvivor.dukePistolSpinEffect); spinInstance.transform.parent = ((EntityState)this).GetModelChildLocator().FindChild("Weapon"); spinInstance.transform.localRotation = Quaternion.Euler(new Vector3(0f, 90f, 0f)); spinInstance.transform.localPosition = Vector3.zero; windupDuration = baseWindupDuration / ((BaseState)this).attackSpeedStat; perShotDuration = baseDurationPerShot / ((BaseState)this).attackSpeedStat; duration = (float)maxShotCount * perShotDuration + windupDuration; Animator modelAnimator = ((EntityState)this).GetModelAnimator(); bool flag = modelAnimator.GetBool("isMoving"); bool flag2 = modelAnimator.GetBool("isGrounded"); if (!flag && flag2) { ((EntityState)this).PlayCrossfade("FullBody, Override", "DeployFan", "Special.playbackRate", windupDuration, 0.05f); } else { ((EntityState)this).PlayCrossfade("Gesture, Override", "DeployFan", "Special.playbackRate", windupDuration, 0.05f); } } public override void OnExit() { if (!disabledSound) { AkSoundEngine.StopPlayingID(soundID); Object.Destroy((Object)(object)spinInstance); } Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { } ((EntityState)this).OnExit(); } private void Fire() { //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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_0148: 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_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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_01c8: 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_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)dukeController)) { } Animator modelAnimator = ((EntityState)this).GetModelAnimator(); bool flag = modelAnimator.GetBool("isMoving"); bool flag2 = modelAnimator.GetBool("isGrounded"); if (!flag && flag2) { ((EntityState)this).PlayCrossfade("FullBody, Override", "ShootFan", "Special.playbackRate", windupDuration, 0.05f); } else { ((EntityState)this).PlayCrossfade("Gesture, Override", "ShootFan", "Special.playbackRate", windupDuration, 0.05f); } Util.PlaySound(shootSoundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-0.4f * bulletRecoil, -0.8f * bulletRecoil, -0.3f * bulletRecoil, 0.3f * bulletRecoil); BulletAttack val = new BulletAttack { aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit(damageType), falloffModel = falloff, maxDistance = bulletRange, force = force, hitMask = LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.noCollision)).mask)), minSpread = 0f, maxSpread = 0f, isCrit = isCrit, owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = bulletRadius, sniper = false, stopperMask = (LayerMask)(fourthShot ? ((LayerIndex)(ref LayerIndex.world)).mask : default(LayerMask)), weapon = null, tracerEffectPrefab = tracerPrefab, spreadPitchScale = 1f, spreadYawScale = 1f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FireBarrage.hitEffectPrefab, HitEffectNormal = false }; if (isCrit) { DamageAPI.AddModdedDamageType(val, DukeSurvivor.DukeFourthShot); } val.minSpread = 0f; val.maxSpread = 0f; val.bulletCount = 1u; val.Fire(); ((EntityState)this).characterMotor.ApplyForce(((Ray)(ref aimRay)).direction * (0f - selfForce), false, false); ResetShot(); } ((EntityState)this).characterBody.AddSpreadBloom(2.5f); } public void ResetShot() { //IL_0094: 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) damageCoefficient = DukeSurvivor.baseFanDamageCoefficient * (1f + dukeController.attackSpeedConversion); procCoefficient = baseProcCoefficient; force = baseForce; bulletSpread = baseBulletSpread; bulletRadius = baseBulletRadius; bulletRecoil = baseBulletRecoil / 4f / ((BaseState)this).attackSpeedStat; bulletRange = baseBulletRange; selfForce = baseSelfForce; freeBullet = false; fourthShot = false; isCrit = ((BaseState)this).RollCrit(); falloff = (FalloffModel)1; damageType = (DamageType)0; } public override void FixedUpdate() { //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: 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) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= windupDuration && ((EntityState)this).skillLocator.primary.stock > 0) { if (!disabledSound) { AkSoundEngine.StopPlayingID(soundID); Object.Destroy((Object)(object)spinInstance); } shotTimer += Time.fixedDeltaTime; if (shotTimer >= perShotDuration) { shotTimer = 0f; ((EntityState)this).characterBody.SetAimTimer(2f); muzzleString = "GunMuzzle"; if (NetworkServer.active && ((EntityState)this).characterBody.HasBuff(FFTSContent.Buffs.bdDukeFreeShot)) { freeBullet = true; ((EntityState)this).characterBody.ClearTimedBuffs(FFTSContent.Buffs.bdDukeFreeShot); } if ((float)((EntityState)this).skillLocator.primary.stock == 1f || freeBullet) { fourthShot = true; isCrit = true; force *= 2f; bulletRadius *= 2f; bulletRecoil *= 2f; selfForce *= 2f; falloff = (FalloffModel)0; damageType = (DamageType)(damageType | 0x80000); } tracerPrefab = (isCrit ? empoweredTracerEffectPrefab : tracerEffectPrefab); Fire(); GenericSkill primary = ((EntityState)this).skillLocator.primary; int stock = primary.stock; primary.stock = stock - 1; } } if (((EntityState)this).isAuthority && ((EntityState)this).skillLocator.primary.stock <= 0) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_001b: 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_001e: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).fixedAge >= duration) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class Flourish : BaseSkillState { private float baseDuration = 0.15f; public float speedCoefficient = 10f; private Vector3 dashVector; private Transform modelTransform; private Quaternion slideRotation; private int originalLayer; public GameObject selfOnHitOverlayEffectPrefab => Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercDashHitOverlay.prefab").WaitForCompletion(); private Vector3 dashVelocity => dashVector * ((BaseState)this).moveSpeedStat * speedCoefficient; public override void OnEnter() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_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_00aa: 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_00ec: 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_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: 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_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0236: 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_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility.buffIndex); } Util.PlaySound("Play_merc_shift_start", ((EntityState)this).gameObject); Animator modelAnimator = ((EntityState)this).GetModelAnimator(); modelTransform = ((EntityState)this).GetModelTransform(); Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); dashVector = ((Vector3)(ref val)).normalized; originalLayer = ((EntityState)this).gameObject.layer; ((EntityState)this).gameObject.layer = LayerIndex.GetAppropriateFakeLayerForTeam(((EntityState)this).teamComponent.teamIndex).intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = Vector3.zero; Vector3 val2 = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : dashVector); Vector3 val3 = Vector3.Cross(Vector3.up, val2); float num = Vector3.Dot(dashVector, val2); float num2 = Vector3.Dot(dashVector, val3); modelAnimator.SetFloat("dashF", num); modelAnimator.SetFloat("dashR", num2); slideRotation = Quaternion.LookRotation(dashVector, ((EntityState)this).characterDirection.forward); ((EntityState)this).PlayCrossfade("FullBody, Override", "Dash", "Utility.playbackRate", baseDuration, baseDuration * 0.15f); if (Object.op_Implicit((Object)(object)BaseSlideState.slideEffectPrefab) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { Vector3 val4 = ((EntityState)this).characterBody.corePosition; Quaternion val5 = Quaternion.identity; Transform val6 = ((BaseState)this).FindModelChild("Base"); if (Object.op_Implicit((Object)(object)val6)) { val4 = val6.position; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { val5 = Util.QuaternionSafeLookRotation(slideRotation * ((EntityState)this).characterDirection.forward, Vector3.up); } EffectManager.SimpleEffect(BaseSlideState.slideEffectPrefab, val4, val5, false); } if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance val7 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val7.duration = 0.7f; val7.animateShaderAlpha = true; val7.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val7.destroyComponentOnEnd = true; val7.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matMercEnergized"); val7.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>()); } } public override void FixedUpdate() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashVelocity * Time.fixedDeltaTime; ((EntityState)this).characterBody.isSprinting = true; if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= baseDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { if (((EntityState)this).characterBody.HasBuff(FFTSContent.Buffs.bdDukeFreeShot)) { ((EntityState)this).characterBody.ClearTimedBuffs(FFTSContent.Buffs.bdDukeFreeShot); } ((EntityState)this).characterBody.AddTimedBuff(FFTSContent.Buffs.bdDukeFreeShot, 5f); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility.buffIndex); } ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); Util.PlaySound("Play_merc_shift_end", ((EntityState)this).gameObject); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class KineticReplicator : GenericProjectileBaseState { public float baseDuration = 0.5f; public float baseDelayDuration = 0.05f; public static GameObject mine = DukeSurvivor.damageShareMine; public DukeController dukeController; public override void OnEnter() { dukeController = ((EntityState)this).gameObject.GetComponent<DukeController>(); base.attackSoundString = "sfx_duke_fire_mine"; base.baseDuration = baseDuration; base.baseDelayBeforeFiringProjectile = baseDelayDuration; base.damageCoefficient = base.damageCoefficient; base.force = 120f; base.projectilePitchBonus = -3.5f; ((GenericProjectileBaseState)this).OnEnter(); } public override void FireProjectile() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_002f: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound(base.attackSoundString, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray val = ((BaseState)this).GetAimRay(); val = ((GenericProjectileBaseState)this).ModifyProjectileAimRay(val); ((Ray)(ref val)).direction = Util.ApplySpread(((Ray)(ref val)).direction, 0f, 0f, 1f, 1f, 0f, base.projectilePitchBonus); ProjectileManager.instance.FireProjectile(mine, ((Ray)(ref val)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction), ((EntityState)this).gameObject, 0f, 0f, false, (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)DamageTypeCombo.GenericSecondary); } } public override void FixedUpdate() { ((GenericProjectileBaseState)this).FixedUpdate(); } 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 override void PlayAnimation(float duration) { if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelAnimator())) { ((EntityState)this).PlayCrossfade("LeftArm, Additive", "ThrowKinetic", "Secondary.playbackRate", base.duration * 2f, base.duration * 0.05f); } } } public class MainState : GenericCharacterMain { private Animator animator; public LocalUser localUser; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); animator = ((BaseCharacterMain)this).modelAnimator; FindLocalUser(); } private void FindLocalUser() { if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return; } foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody) { localUser = readOnlyLocalUsers; break; } } } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)animator)) { bool flag = false; if (!((EntityState)this).characterBody.outOfDanger || !((EntityState)this).characterBody.outOfCombat) { flag = true; } animator.SetBool("inCombat", flag); if (((BaseState)this).isGrounded) { animator.SetFloat("airBlend", 0f); } else { animator.SetFloat("airBlend", 1f); } } if (((EntityState)this).isAuthority && !((EntityState)this).characterMotor.isGrounded) { } } private void CheckEmote(KeyCode keybind, EntityState state) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(keybind) && !localUser.isUIFocused) { ((EntityState)this).outer.SetInterruptState(state, (InterruptPriority)0); } } public override void ProcessJump() { //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: 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_022b: Expected O, but got Unknown //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Expected O, but got Unknown //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Expected O, but got Unknown if (!((BaseCharacterMain)this).hasCharacterMotor) { return; } bool flag = false; bool flag2 = false; if (!base.jumpInputReceived || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || ((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.maxJumpCount) { return; } int itemCount = ((EntityState)this).characterBody.inventory.GetItemCount(Items.JumpBoost); float num = 1f; float num2 = 1f; if (((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.baseJumpCount) { flag = true; num = 1.5f; num2 = 1.5f; } else if (itemCount > 0 && ((EntityState)this).characterBody.isSprinting) { float num3 = ((EntityState)this).characterBody.acceleration * ((EntityState)this).characterMotor.airControl; if (((EntityState)this).characterBody.moveSpeed > 0f && num3 > 0f) { flag2 = true; float num4 = Mathf.Sqrt(10f * (float)itemCount / num3); float num5 = ((EntityState)this).characterBody.moveSpeed / num3; num = (num4 + num5) / num5; } } GenericCharacterMain.ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, num, num2, false); if (((BaseCharacterMain)this).hasModelAnimator) { int layerIndex = ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("Body"); if (layerIndex >= 0) { if (((EntityState)this).characterBody.isSprinting) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("SprintJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else if (flag) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("BonusJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Jump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } } } if (flag) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/FeatherEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition }, true); } else if (((EntityState)this).characterMotor.jumpCount > 0) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/CharacterLandImpact"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = ((EntityState)this).characterBody.radius }, true); } if (flag2) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/BoostJumpEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity) }, true); } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.jumpCount++; } } public class PretentiousMimicry : BaseSkillState { private DukeController dukeController; private float duration = 0.5f; public override void OnEnter() { dukeController = ((EntityState)this).gameObject.GetComponent<DukeController>(); ((BaseState)this).OnEnter(); ((EntityState)this).PlayCrossfade("Gesture, Override", "DeployDecoy", 0.05f); Fire(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_008f: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { MasterSummon val = new MasterSummon(); val.masterPrefab = FortunesFromTheScrapyard.Characters.DukeDecoy.DukeDecoy.DukeDecoyMaster; val.masterPrefab.GetComponent<CharacterMaster>().bodyPrefab.GetComponent<DukeDecoyExplosion>().ownerBody = ((EntityState)this).characterBody; val.ignoreTeamMemberLimit = true; val.teamIndexOverride = ((EntityState)this).teamComponent.teamIndex; val.summonerBodyObject = ((EntityState)this).gameObject; val.position = ((EntityState)this).characterBody.previousPosition; val.rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterBody.characterDirection.forward); val.inventoryToCopy = ((EntityState)this).characterBody.inventory; CharacterMaster val2 = val.Perform(); } } 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 QuickStep : BasicMeleeAttack { public float speedCoefficient = 10f; public float refundPerHit = 2.5f; private bool hasHit; private Vector3 dashVector; private Transform modelTransform; private Quaternion slideRotation; private int originalLayer; public static GameObject swingPrefab => Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercAssaulterEffect.prefab").WaitForCompletion(); public static GameObject selfOnHitOverlayEffectPrefab => Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercDashHitOverlay.prefab").WaitForCompletion(); private Vector3 dashVelocity => dashVector * ((BaseState)this).moveSpeedStat * speedCoefficient; public override void OnEnter() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_017a: 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_019f: 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_01a4: 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_01ab: 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_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) base.hitPauseDuration = 0.1f; base.ignoreAttackSpeed = true; base.scaleHitPauseDurationAndVelocityWithAttackSpeed = false; base.forceForwardVelocity = false; base.shorthopVelocityFromHit = 0f; base.swingEffectMuzzleString = "Quickstep"; base.swingEffectPrefab = swingPrefab; base.forceVector = Vector3.zero; base.hitEffectPrefab = FireBarrage.hitEffectPrefab; base.procCoefficient = 1f; base.pushAwayForce = 200f; base.hitBoxGroupName = "Quickstep"; base.baseDuration = 0.15f; base.damageCoefficient = 0f; ((BasicMeleeAttack)this).OnEnter(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility.buffIndex); } Util.PlaySound("Play_merc_shift_start", ((EntityState)this).gameObject); Animator modelAnimator = ((EntityState)this).GetModelAnimator(); modelTransform = ((EntityState)this).GetModelTransform(); Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); dashVector = ((Vector3)(ref val)).normalized; originalLayer = ((EntityState)this).gameObject.layer; ((EntityState)this).gameObject.layer = LayerIndex.GetAppropriateFakeLayerForTeam(((EntityState)this).teamComponent.teamIndex).intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = Vector3.zero; Vector3 val2 = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : dashVector); Vector3 val3 = Vector3.Cross(Vector3.up, val2); float num = Vector3.Dot(dashVector, val2); float num2 = Vector3.Dot(dashVector, val3); modelAnimator.SetFloat("dashF", num); modelAnimator.SetFloat("dashR", num2); slideRotation = Quaternion.LookRotation(dashVector, ((EntityState)this).characterDirection.forward); ((EntityState)this).PlayCrossfade("FullBody, Override", "Dash", 0.1f); if (Object.op_Implicit((Object)(object)BaseSlideState.slideEffectPrefab) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { Vector3 val4 = ((EntityState)this).characterBody.corePosition; Quaternion val5 = Quaternion.identity; Transform val6 = ((BaseState)this).FindModelChild("Base"); if (Object.op_Implicit((Object)(object)val6)) { val4 = val6.position; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { val5 = Util.QuaternionSafeLookRotation(slideRotation * ((EntityState)this).characterDirection.forward, Vector3.up); } EffectManager.SimpleEffect(BaseSlideState.slideEffectPrefab, val4, val5, false); } if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance val7 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val7.duration = 0.7f; val7.animateShaderAlpha = true; val7.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val7.destroyComponentOnEnd = true; val7.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matMercEnergized"); val7.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>()); } ((EntityState)this).characterDirection.forward = ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized; } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); overlapAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)32); overlapAttack.damage = base.damageCoefficient * ((BaseState)this).damageStat; } public override void AuthorityFixedUpdate() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityFixedUpdate(); if (!((BasicMeleeAttack)this).authorityInHitPause) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashVelocity * Time.fixedDeltaTime; ((EntityState)this).characterBody.isSprinting = true; } } public override void OnMeleeHitAuthority() { //IL_005f: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown ((BasicMeleeAttack)this).OnMeleeHitAuthority(); if (!hasHit) { hasHit = true; ((EntityState)this).skillLocator.utility.RunRecharge(refundPerHit); } float num = base.hitPauseDuration / ((BaseState)this).attackSpeedStat; if (Object.op_Implicit((Object)(object)selfOnHitOverlayEffectPrefab) && num > 1f / 30f) { EffectData val = new EffectData { origin = ((EntityState)this).transform.position, genericFloat = base.hitPauseDuration / ((BaseState)this).attackSpeedStat }; val.SetNetworkedObjectReference(((EntityState)this).gameObject); EffectManager.SpawnEffect(selfOnHitOverlayEffectPrefab, val, true); } } public override void OnExit() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).skillLocator.primary.stock == 0) { GenericSkill primary = ((EntityState)this).skillLocator.primary; int stock = primary.stock; primary.stock = stock + 1; } else if (NetworkServer.active) { if (((EntityState)this).characterBody.HasBuff(FFTSContent.Buffs.bdDukeFreeShot)) { ((EntityState)this).characterBody.ClearTimedBuffs(FFTSContent.Buffs.bdDukeFreeShot); } ((EntityState)this).characterBody.AddTimedBuff(FFTSContent.Buffs.bdDukeFreeShot, 5f); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility.buffIndex); } ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); Util.PlaySound("Play_merc_shift_end", ((EntityState)this).gameObject); ((BasicMeleeAttack)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class Reload : BaseSkillState { public static float baseDuration = 2f; private float duration; private bool hasGivenStock; private bool disabledSound; private uint soundID; private DukeController dukeController; public override void OnEnter() { dukeController = ((EntityState)this).gameObject.GetComponent<DukeController>(); ((BaseState)this).OnEnter(); duration = (dukeController.speedUpReloadTime ? (baseDuration / 2f / ((BaseState)this).attackSpeedStat) : (baseDuration / ((BaseState)this).attackSpeedStat)); ((EntityState)this).PlayCrossfade("Gesture, Override", "Reload", duration * 0.25f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration / 2f && !disabledSound) { disabledSound = true; AkSoundEngine.StopPlayingID(soundID); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { Util.PlaySound("sfx_duke_gun_catch", ((EntityState)this).gameObject); GiveStock(); ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); if (!disabledSound) { AkSoundEngine.StopPlayingID(soundID); } } private void GiveStock() { if (!hasGivenStock) { ((EntityState)this).skillLocator.primary.stock = ((EntityState)this).skillLocator.primary.GetBaseMaxStock(); } } 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 Salvo : BaseSkillState { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static ModifyOutgoingDamageCallback <>9__39_0; internal void <Fire>b__39_0(BulletAttack _bulletAttack, ref BulletHit hitInfo, DamageInfo damageInfo) { CharacterBody val = null; if (Object.op_Implicit((Object)(object)hitInfo.hurtBox) && Object.op_Implicit((Object)(object)hitInfo.hitHurtBox)) { val = hitInfo.hitHurtBox.hurtBoxGroup.mainHurtBox.healthComponent.body; } if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); DukeDecoyExplosion dukeDecoyExplosion = default(DukeDecoyExplosion); if (((Component)val).gameObject.TryGetComponent<DukeDecoyExplosion>(ref dukeDecoyExplosion) && (Object)(object)dukeDecoyExplosion.ownerBody == (Object)(object)component) { dukeDecoyExplosion.SetValuesAndKillDecoy(damageInfo.damage / component.damage, damageInfo.crit); } } } } public static float baseProcCoefficient = 1f; public static float baseShootDuration = 0.1f; public static float baseDuration = 1.25f; public static float baseForce = 600f; public static int bulletCount = 1; public static float baseBulletSpread = 0f; public static float baseBulletRadius = 0.4f; public static float baseBulletRecoil = 2f; public static float baseBulletRange = 999f; public static float baseSelfForce = 750f; public static GameObject tracerEffectPrefab = DukeSurvivor.dukeTracer; public static GameObject empoweredTracerEffectPrefab = DukeSurvivor.dukeTracerCrit; private Vector3 ricochetPoint; private bool fourthShot; priv