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 Caeli Imperium v0.13.3
plugins/CaeliImperium.dll
Decompiled 5 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using System.Text; using System.Xml.Linq; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using BrynzaAPI; using CaeliImperium; using CaeliImperium.Bodies; using CaeliImperium.Components; using CaeliImperium.Components.Doomguy; using CaeliImperium.Components.FirstPerson; using CaeliImperium.Components.MonsterChest; using CaeliImperium.Components.Refinery; using CaeliImperium.Configs; using CaeliImperium.Interactables; using CaeliImperium.ItemBehaviours; using CaeliImperium.Items; using CaeliImperium.Misc; using CaeliImperium.ModCompatibilities; using CaeliImperium.NetworkMessages; using CaeliImperium.ScriptableObjects; using CaeliImperiumEntityStates; using CaeliImperiumEntityStates.BomberWisp; using CaeliImperiumEntityStates.ClaySwordsman; using CaeliImperiumEntityStates.Doomguy; using CaeliImperiumEntityStates.MonsterChest; using CaeliImperiumScriptableObjects; using EnemiesReturns.ModdedEntityStates.ArcherBugs; using EnemiesReturns.ModdedEntityStates.Colossus.HeadLaserBarrage; using EnemiesReturns.ModdedEntityStates.Colossus.RockClap; using EnemiesReturns.ModdedEntityStates.Colossus.Stomp; using EnemiesReturns.ModdedEntityStates.Ifrit.Pillar; using EnemiesReturns.ModdedEntityStates.Ifrit.Pillar.Enemy; using EnemiesReturns.ModdedEntityStates.LynxTribe.Archer; using EnemiesReturns.ModdedEntityStates.LynxTribe.Hunter.Lunge; using EnemiesReturns.ModdedEntityStates.LynxTribe.Scout; using EnemiesReturns.ModdedEntityStates.LynxTribe.Shaman; using EnemiesReturns.ModdedEntityStates.LynxTribe.Totem; using EnemiesReturns.ModdedEntityStates.MechanicalSpider.DoubleShot; using EnemiesReturns.ModdedEntityStates.MechanicalSpider.DoubleShot.Enemy; using EnemiesReturns.ModdedEntityStates.SandCrab.Snip; using EnemiesReturns.ModdedEntityStates.Spitter; using EnemiesReturns.ModdedEntityStates.Swift.Dive; using EnemyAbilities.Abilities.Child; using EnemyAbilities.Abilities.ExtractorUnit; using EnemyAbilities.Abilities.Vulture; using EntityStates; using EntityStates.BeetleGuardMonster; using EntityStates.BeetleMonster; using EntityStates.BeetleQueenMonster; using EntityStates.Bell.BellWeapon; using EntityStates.Bison; using EntityStates.BrotherMonster; using EntityStates.ClayBoss; using EntityStates.ClayBruiserMonster; using EntityStates.Commando.CommandoWeapon; using EntityStates.FlyingVermin.Weapon; using EntityStates.GolemMonster; using EntityStates.GrandParentBoss; using EntityStates.GreaterWispMonster; using EntityStates.Gup; using EntityStates.Halcyonite; using EntityStates.HermitCrab; using EntityStates.ImpMonster; using EntityStates.LemurianBruiserMonster; using EntityStates.LemurianMonster; using EntityStates.Lynx2Monster; using EntityStates.LynxAmbusher; using EntityStates.MiniMushroom; using EntityStates.MinorConstruct.Weapon; using EntityStates.ParentMonster; using EntityStates.RoboBallBoss.Weapon; using EntityStates.ShrineHalcyonite; using EntityStates.Vermin.Weapon; using EntityStates.Vulture.Weapon; using EntityStates.Wisp1Monster; using EntityStates.WorkerUnit; using HG; using HG.Reflection; using HarmonyLib; using IL.EntityStates.ChampRush.SpawnOrb; using IL.EntityStates.Missions.ChampRush; using IL.RoR2; using IL.RoR2.CharacterAI; using IL.RoR2.Skills; using IL.RoR2.UI; using JetBrains.Annotations; using KinematicCharacterController; using LeTai.Asset.TranslucentImage; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using On.EntityStates; using On.EntityStates.Bell.BellWeapon; using On.EntityStates.ShrineHalcyonite; using On.RoR2; using On.RoR2.CharacterAI; using On.RoR2.Projectile; using On.RoR2.Skills; using On.RoR2.UI; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.SpawnCardCloning; using R2API.Utils; using Rewired; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.Hologram; using RoR2.HudOverlay; using RoR2.Items; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2.UI.SkinControllers; using RoR2BepInExPack.GameAssetPathsBetter; using RoR2BepInExPack.Utilities; using TMPro; using Unity; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering.PostProcessing; using UnityEngine.SceneManagement; using UnityEngine.UI; [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: OptIn] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyInformationalVersion("1.0.0+3f8c41ec32b8dfc1665f028a89964745cf60a109")] [assembly: AssemblyProduct("CaeliImperium")] [assembly: AssemblyTitle("CaeliImperium")] [assembly: AssemblyCompany("CaeliImperium")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [CompilerGenerated] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace CaeliImperiumScriptableObjects { public class DoomguyAcceleratorSkillDef : DoomguySkillDef { public class AcceleratorSkillInstanceData : BaseSkillInstanceData { public float maxCharge; public float chargeCoefficient; public float charge; public float chargeLossTimer; } public float maxCharge = 100f; public float chargeCoefficient = 1f; public float chargeLossPerSecond = 1f; public float chargeGraceDuration = 2f; public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new AcceleratorSkillInstanceData { chargeCoefficient = chargeCoefficient, maxCharge = maxCharge }; } public override void OnFixedUpdate([NotNull] GenericSkill skillSlot, float deltaTime) { ((SkillDef)this).OnFixedUpdate(skillSlot, deltaTime); if (skillSlot.skillInstanceData == null || !(skillSlot.skillInstanceData is AcceleratorSkillInstanceData acceleratorSkillInstanceData)) { return; } if (acceleratorSkillInstanceData.chargeLossTimer >= chargeGraceDuration) { if (acceleratorSkillInstanceData.charge > 0f) { acceleratorSkillInstanceData.charge -= chargeLossPerSecond * Time.fixedDeltaTime; if (acceleratorSkillInstanceData.charge < 0f) { acceleratorSkillInstanceData.charge = 0f; } } } else { acceleratorSkillInstanceData.chargeLossTimer += Time.fixedDeltaTime; } } public static float GetTotalCharge(SkillLocator skillLocator) { float num = 0f; if (skillLocator.allSkills == null) { return num; } GenericSkill[] allSkills = skillLocator.allSkills; foreach (GenericSkill val in allSkills) { if (Object.op_Implicit((Object)(object)val) && val.skillInstanceData != null && val.skillInstanceData is AcceleratorSkillInstanceData acceleratorSkillInstanceData) { num += acceleratorSkillInstanceData.charge; } } return num; } public static void AddCharge(GenericSkill genericSkill, float charge) { if (genericSkill.skillInstanceData != null && genericSkill.skillInstanceData is AcceleratorSkillInstanceData acceleratorSkillInstanceData) { acceleratorSkillInstanceData.charge += charge * acceleratorSkillInstanceData.chargeCoefficient; acceleratorSkillInstanceData.charge = Mathf.Clamp(acceleratorSkillInstanceData.charge, 0f, acceleratorSkillInstanceData.maxCharge); acceleratorSkillInstanceData.chargeLossTimer = 0f; } } public static void RemoveAllCharge(GenericSkill genericSkill) { if (genericSkill.skillInstanceData != null && genericSkill.skillInstanceData is AcceleratorSkillInstanceData acceleratorSkillInstanceData) { acceleratorSkillInstanceData.charge = 0f; } } } } namespace CaeliImperiumEntityStates { public abstract class BaseCaeliImperiumState : BaseSkillState { public override void OnEnter() { ((BaseState)this).OnEnter(); UpdateValues(); } public virtual void UpdateValues() { } } public class FireAtomicBeam : BaseState { public static float maxDamageMultiplier = 50f; public static float dotDuration = 5f; public int stack; public float charge; 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_0016: 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_0027: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown Ray aimRay = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = 0f, damage = ((EntityState)this).characterBody.damage * CaeliImperiumUtils.ConvertAmplificationPercentageIntoReductionPercentage(charge, maxDamageMultiplier), force = 0f, tracerEffectPrefab = null, hitEffectPrefab = null, isCrit = ((BaseState)this).RollCrit(), radius = 2f, smartCollision = true, trajectoryAimAssistMultiplier = FirePistol2.trajectoryAimAssistMultiplier, damageType = DamageTypeCombo.GenericSpecial, hitCallback = new HitCallback(IrradiateOnHit) }.Fire(); } bool IrradiateOnHit(BulletAttack bulletAttack, ref BulletHit hitInfo) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)hitInfo.hitHurtBox)) { InflictDotInfo val = new InflictDotInfo { attackerObject = ((EntityState)this).gameObject, victimObject = ((Component)hitInfo.hitHurtBox.healthComponent).gameObject, totalDamage = ((EntityState)this).characterBody.damage, damageMultiplier = stack, duration = dotDuration, dotIndex = CaeliImperiumContent.Buffs.IrradiatedDotIndex }; DotController.InflictDot(ref val); } return BulletAttack.DefaultHitCallbackImplementation(bulletAttack, ref hitInfo); } } } public class FireSkullGun : BaseState { public int stack; public override void OnEnter() { ((BaseState)this).OnEnter(); Fire(); if (((EntityState)this).isAuthority) { ((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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_010b: 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) Ray aimRay = ((BaseState)this).GetAimRay(); Util.PlaySound(FirePistol2.firePistolSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)FirePistol2.muzzleEffectPrefab)) { EffectData val = new EffectData { origin = ((Ray)(ref aimRay)).origin, rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction) }; EffectManager.SpawnEffect(FirePistol2.muzzleEffectPrefab, val, true); } if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = 0f, damage = base.damageStat * (float)stack, force = 0f, tracerEffectPrefab = FirePistol2.tracerEffectPrefab, hitEffectPrefab = FirePistol2.hitEffectPrefab, isCrit = ((BaseState)this).RollCrit(), radius = 0.1f, smartCollision = true, trajectoryAimAssistMultiplier = FirePistol2.trajectoryAimAssistMultiplier, damageType = DamageTypeCombo.GenericPrimary }.Fire(); } } } } namespace CaeliImperiumEntityStates.Test { public class LassoTest : BaseSkillState { public static float lassoUpdatePerSecond = 60f; public static float targetUpdatePerSecond = 60f; public static float maxDistance = 60f; public static float targetMaxAngle = 60f; public static int lassoMaxUpdates = 60; public static float lassoSpeed = 1f; public static float lassoAngle = 90f; public static float lassoPull = 1f; public BullseyeSearch bullseyeSearch; public LassoController lassoController; public HurtBox hurtBox; public override void OnEnter() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //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_0020: 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_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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0069: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Ray aimRay = ((BaseState)this).GetAimRay(); bullseyeSearch = new BullseyeSearch { maxDistanceFilter = maxDistance, maxAngleFilter = targetMaxAngle, searchDirection = ((Ray)(ref aimRay)).direction, searchOrigin = ((Ray)(ref aimRay)).origin, sortMode = (SortMode)2, teamMaskFilter = TeamMask.all }; ((TeamMask)(ref bullseyeSearch.teamMaskFilter)).RemoveTeam(((BaseState)this).GetTeam()); bullseyeSearch.RefreshCandidates(); bullseyeSearch.FilterOutGameObject(((EntityState)this).gameObject); hurtBox = bullseyeSearch.GetResults().FirstOrDefault(); if (!Object.op_Implicit((Object)(object)hurtBox)) { if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } return; } lassoController = ((EntityState)this).gameObject.AddComponent<LassoController>(); lassoController.angle = lassoAngle; lassoController.speed = lassoSpeed; lassoController.origin = ((Ray)(ref aimRay)).origin; lassoController.direction = ((Ray)(ref aimRay)).direction; lassoController.target = ((Component)hurtBox).transform.position; lassoController.maxUpdates = lassoMaxUpdates; lassoController.updatesPerSecond = lassoUpdatePerSecond; } public override void FixedUpdate() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((EntityState)this).FixedUpdate(); if (!Object.op_Implicit((Object)(object)lassoController) || !Object.op_Implicit((Object)(object)hurtBox)) { if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } return; } Ray aimRay = ((BaseState)this).GetAimRay(); lassoController.direction = ((Ray)(ref aimRay)).direction; lassoController.origin = ((Ray)(ref aimRay)).origin; lassoController.target = ((Component)hurtBox).transform.position; if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority()) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0071: 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_009c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); if (!Object.op_Implicit((Object)(object)lassoController)) { return; } if (Object.op_Implicit((Object)(object)lassoController.hitHurtbox)) { CharacterBody val = lassoController.hitHurtbox.healthComponent?.body; if (Object.op_Implicit((Object)(object)val)) { if (Object.op_Implicit((Object)(object)val.characterMotor)) { CharacterMotor characterMotor = val.characterMotor; PhysForceInfo val2 = CreatePhysForceInfo(); characterMotor.ApplyForceImpulse(ref val2); } else if (Object.op_Implicit((Object)(object)val.rigidbody)) { RigidBodyExtensions.AddForceWithInfo(val.rigidbody, CreatePhysForceInfo()); } } } EntityState.Destroy((Object)(object)lassoController); } public PhysForceInfo CreatePhysForceInfo() { //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_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_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_009b: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); PhysForceInfo result = default(PhysForceInfo); ((PhysForceInfo)(ref result)).disableAirControlUntilCollision = true; float num = lassoPull; float num2 = Vector3.Angle(-((Ray)(ref aimRay)).direction, lassoController.endAngle); Vector3 val = ((Ray)(ref aimRay)).direction + lassoController.endAngle; result.force = num * (num2 * ((Vector3)(ref val)).normalized); ((PhysForceInfo)(ref result)).massIsOne = true; ((PhysForceInfo)(ref result)).resetVelocity = true; ((PhysForceInfo)(ref result)).respectKnockupImmune = true; ((PhysForceInfo)(ref result)).ignoreGroundStick = true; ((PhysForceInfo)(ref result)).doNotExceed = false; return result; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace CaeliImperiumEntityStates.MonsterChest { public class Eat : MonsterChestBaseState { public static float duration = 1f; private static int EatStateHash = Animator.StringToHash("Eat"); private static int EatParamHash = Animator.StringToHash("Eat.playbackRate"); public override void OnEnter() { base.OnEnter(); ((EntityState)this).PlayAnimation("Base", EatStateHash, EatParamHash, duration); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Idle()); } } } public class Idle : MonsterChestBaseState { } public class MonsterChestBaseState : BaseState { public PickupPickerController pickupPickerController; public MonsterChestController monsterChestController; public bool _impatient; public virtual bool enableInteraction => true; public override void OnEnter() { ((BaseState)this).OnEnter(); _impatient = false; pickupPickerController = ((EntityState)this).GetComponent<PickupPickerController>(); monsterChestController = ((EntityState)this).GetComponent<MonsterChestController>(); if (NetworkServer.active) { pickupPickerController.SetAvailable(enableInteraction); } } } public class Spew : MonsterChestBaseState { public static float duration = 1f; public static float dropUpVelocityStrength = 16f; public static float dropForwardVelocityStrength = 16f; private static int SpewStateHash = Animator.StringToHash("Spew"); private static int SpewParamHash = Animator.StringToHash("Spew.playbackRate"); public override bool enableInteraction => false; public override void OnEnter() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_0099: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); ((EntityState)this).PlayAnimation("Base", SpewStateHash, SpewParamHash, duration); if (NetworkServer.active && Object.op_Implicit((Object)(object)monsterChestController) && monsterChestController.expectItem) { UniquePickup pickup = default(UniquePickup); ((UniquePickup)(ref pickup))..ctor(new PickupIndex(PickupCatalog.FindPickupIndex((ItemIndex)monsterChestController.expectedItemIndex).value)); CreatePickupInfo val = new CreatePickupInfo { position = ((EntityState)this).transform.position }; ((CreatePickupInfo)(ref val)).pickup = pickup; CreatePickupInfo val2 = val; PickupDropletController.CreatePickupDroplet(val2, val2.position, Vector3.up * dropUpVelocityStrength + ((EntityState)this).transform.forward * dropForwardVelocityStrength); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { Object.Destroy((Object)(object)((EntityState)this).gameObject); } } } } namespace CaeliImperiumEntityStates.Doomguy { public class Dash : DoomguyMainState { public static float baseSpeed = 48f; public static float baseDashDuration = 0.2f; public static float baseDuration = 0.6f; public static float dashRadius = 5f; public Vector3 direction; public float speed; public float dashDuration; public float duration; public bool sprintInputBuffer; public bool stoppedDashing; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); Util.PlaySound("Play_DoomTDA_Player_Dash", ((EntityState)this).gameObject); ((GenericCharacterMain)this).GatherInputs(); DestroyNearbyProjectilesAndGainSpecialSpearStocks(); SetValues(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(DoomguyEvents.Dodge, duration); } } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); if (((EntityState)this).isAuthority && sprintInputBuffer && Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { ((EntityState)this).inputBank.rawSprintInput.down = true; } } public void DestroyNearbyProjectilesAndGainSpecialSpearStocks() { //IL_0019: 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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).isAuthority) { return; } Collider[] array = Physics.OverlapSphere(((EntityState)this).transform.position, dashRadius, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.projectile)).mask) | LayerMask.op_Implicit(CommonMasks.characterBodies), (QueryTriggerInteraction)0); int num = 0; Collider[] array2 = array; foreach (Collider val in array2) { Transform root = ((Component)val).transform.root; ProjectileController component = ((Component)root).GetComponent<ProjectileController>(); if (Object.op_Implicit((Object)(object)component)) { ProjectileDamage component2 = ((Component)component).GetComponent<ProjectileDamage>(); if (!Object.op_Implicit((Object)(object)component2)) { continue; } bool flag = component2.damageColorIndex == DoomguyEvents.ParriableDamageColor; if (!component.cannotBeDeleted || flag) { if (flag) { num++; } if (NetworkServer.active) { EntityState.Destroy((Object)(object)((Component)component2).gameObject); } else { DestroyNetworkObjectNetMessage.SendToServer(((NetworkBehaviour)component).netId); } } } else { CharacterBody component3 = ((Component)root).GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component3) && component3.HasBuff(DoomguyEvents.PrepareParriableAttackCount)) { num++; } } } DoomguySpecialSpearSkillDef.RechargeStocksForSpecialSpearSkills(((EntityState)this).characterBody, num); DoomguyRechargeSpecialSpearSkillsNetMessage.SendToClients(num, ((NetworkBehaviour)((EntityState)this).characterBody).netId); } public void SetValues() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) direction = ((GenericCharacterMain)this).moveVector; speed = baseSpeed; dashDuration = baseDashDuration; DoomguyComponent bishopComponent = ((IDoomguyState)this).bishopComponent; duration = baseDuration / (Object.op_Implicit((Object)(object)bishopComponent) ? bishopComponent.moveSpeedCoof : 1f); } public override void FixedUpdate() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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) ((GenericCharacterMain)this).FixedUpdate(); if (((EntityState)this).isAuthority) { if (((EntityState)this).fixedAge < dashDuration) { ((BaseState)(object)this).SetVelocity(Vector3.zero); ((BaseState)(object)this).AddRootMotion(direction * speed * Time.fixedDeltaTime); } else if (!stoppedDashing) { ((BaseState)(object)this).SetVelocity(direction * (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.walkSpeed : ((EntityState)this).characterBody.moveSpeed)); stoppedDashing = true; } if (!sprintInputBuffer && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((ButtonState)(ref ((EntityState)this).inputBank.rawSprintInput)).justPressed) { sprintInputBuffer = true; } if (!(((EntityState)this).fixedAge < duration)) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class DoomguyMainState : GenericCharacterMain, IDoomguyState { } public abstract class DoomguyMeleeState : DoomguyState { public BulletAttack bulletAttack; public Ray ray; public float damage; public float duration; public bool stopMoving; public HurtBox target; public bool hitConfirmed; public Vector3 moveDirection; public bool hasStock; public bool berserked; public bool targetIsStaggered; public bool wasStaggeredOnHit; public float addDuration; public float flyToTargetSpeed; public abstract float damageCoefficient { get; } public abstract float procCoefficient { get; } public abstract float minSpread { get; } public abstract float maxSpread { get; } public abstract float baseDuration { get; } public abstract bool allowTrajectoryAimAssist { get; } public abstract uint bulletCount { get; } public abstract DamageType damageType { get; } public abstract DamageTypeExtended damageTypeExtended { get; } public abstract FalloffModel falloffModel { get; } public abstract float force { get; } public abstract float radius { get; } public abstract float trajectoryAimAssistMultiplier { get; } public abstract bool smartCollision { get; } public abstract float maxDistance { get; } public abstract PhysForceFlags physForceFlags { get; } public abstract float backoffVelocity { get; } public abstract float minFlyToTargetSpeed { get; } public abstract float findTargetDistance { get; } public abstract float regularFindTargetDistance { get; } public abstract float findTargetRadius { get; } public abstract bool giveEmpowermentOnExecute { get; } public virtual bool canFly => true; public override void OnEnter() { ((BaseState)this).OnEnter(); SetValues(); if (((EntityState)this).isAuthority) { FindTarget(); CreateBulletAttack(); } } public virtual void SetValues() { //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) damage = damageCoefficient * ((EntityState)this).characterBody.damage; duration = baseDuration / ((EntityState)this).characterBody.attackSpeed; ray = ((BaseState)this).GetAimRay(); berserked = DoomguyComponent.HasBerserk(); hasStock = Object.op_Implicit((Object)(object)((BaseSkillState)this).activatorSkillSlot) && ((BaseSkillState)this).activatorSkillSlot.stock > 0; flyToTargetSpeed = minFlyToTargetSpeed; } public virtual void FindTarget() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) float num = findTargetRadius + TrajectoryAimAssist.GetAimAssistRadius(((EntityState)this).gameObject); GetColliders(num, findTargetDistance, out var atleastOneStaggered, out var validColliders, out var validAndStaggeredColliders); if (!atleastOneStaggered && !hasStock && !berserked) { GetColliders(num, regularFindTargetDistance, out atleastOneStaggered, out validColliders, out validAndStaggeredColliders); } Collider closestColliderOnLine = CaeliImperiumUtils.GetClosestColliderOnLine(atleastOneStaggered ? validAndStaggeredColliders : validColliders, ((Ray)(ref ray)).direction, ((Ray)(ref ray)).origin); if (Object.op_Implicit((Object)(object)closestColliderOnLine)) { target = ((Component)closestColliderOnLine).GetComponent<HurtBox>(); targetIsStaggered = atleastOneStaggered; } if (Object.op_Implicit((Object)(object)target)) { Vector3 val = ((Component)target).transform.position - ((EntityState)this).transform.position; moveDirection = ((Vector3)(ref val)).normalized; flyToTargetSpeed = Mathf.Max(flyToTargetSpeed, ((Vector3)(ref val)).magnitude / duration); } else { moveDirection = Vector3.zero; } } private void GetColliders(float radius, float distance, out bool atleastOneStaggered, out List<Collider> validColliders, out List<Collider> validAndStaggeredColliders) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_00fe: Unknown result type (might be due to invalid IL or missing references) validColliders = new List<Collider>(); validAndStaggeredColliders = new List<Collider>(); atleastOneStaggered = false; Collider[] array = Physics.OverlapCapsule(((Ray)(ref ray)).origin, ((Ray)(ref ray)).origin + ((Ray)(ref ray)).direction * distance, radius, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask), (QueryTriggerInteraction)0); if (array == null || array.Length == 0) { return; } Collider[] array2 = array; foreach (Collider val in array2) { HurtBox component = ((Component)val).GetComponent<HurtBox>(); if (!Object.op_Implicit((Object)(object)component)) { continue; } HealthComponent healthComponent = component.healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent) || (Object)(object)((EntityState)this).healthComponent == (Object)(object)healthComponent) { continue; } CharacterBody body = healthComponent.body; if (!Object.op_Implicit((Object)(object)body) || (Object.op_Implicit((Object)(object)body.teamComponent) && !TeamManager.IsTeamEnemy(body.teamComponent.teamIndex, ((BaseState)this).GetTeam()))) { continue; } validColliders.Add(val); if (body.HasBuff(DoomguyEvents.Stagger)) { validAndStaggeredColliders.Add(val); if (!atleastOneStaggered) { atleastOneStaggered = true; } } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { AuthorityFixedUpdate(); } } public virtual void AuthorityFixedUpdate() { UpdateBulletAttack(); FireBulletAttack(); FlyToTarget(); if (!(((EntityState)this).fixedAge < duration + addDuration)) { ((EntityState)this).outer.SetNextStateToMain(); } } public virtual void FlyToTarget() { //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_00a2: 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_00ba: 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) if (Object.op_Implicit((Object)(object)target) && Object.op_Implicit((Object)(object)target.healthComponent) && target.healthComponent.alive && moveDirection != Vector3.zero && !stopMoving && canFly) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && ((EntityState)this).characterMotor.isGrounded && Object.op_Implicit((Object)(object)((BaseCharacterController)((EntityState)this).characterMotor).Motor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } ((BaseState)(object)this).SetVelocity(Vector3.zero); ((BaseState)(object)this).AddRootMotion(moveDirection * flyToTargetSpeed * Time.fixedDeltaTime); } } public virtual void CreateBulletAttack() { //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_0013: 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_008b: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_00f6: 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_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown //IL_0159: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) BulletAttack val = new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref ray)).origin, aimVector = ((Ray)(ref ray)).direction, minSpread = minSpread, maxSpread = maxSpread, damage = damage, allowTrajectoryAimAssist = allowTrajectoryAimAssist, bulletCount = bulletCount, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit(damageType), damageTypeExtended, ((BaseSkillState)(object)this).GetDamageSource((DamageSource)1)), falloffModel = falloffModel, force = force, isCrit = ((BaseState)this).RollCrit(), trajectoryAimAssistMultiplier = trajectoryAimAssistMultiplier, radius = radius, smartCollision = smartCollision, maxDistance = maxDistance, physForceFlags = physForceFlags, procCoefficient = procCoefficient, stopperMask = ((LayerIndex)(ref LayerIndex.ui)).mask, hitMask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }; val.hitCallback = new HitCallback(HitCallback); val.filterCallback = new FilterCallback(FilterCallback); bulletAttack = val; Extensions.SetIgnoreHitTargets(bulletAttack, true); DamageAPI.AddModdedDamageType(bulletAttack, DoomguyEvents.GloryKillDamageType); if (berserked) { DamageAPI.AddModdedDamageType(bulletAttack, DoomguyEvents.BerserkedDamageType); } } public virtual bool FilterCallback(BulletAttack bulletAttack, ref BulletHit hitInfo) { if (hitConfirmed || (Object.op_Implicit((Object)(object)target) && Object.op_Implicit((Object)(object)target.healthComponent) && Object.op_Implicit((Object)(object)hitInfo.hitHurtBox) && Object.op_Implicit((Object)(object)hitInfo.hitHurtBox.healthComponent) && (Object)(object)hitInfo.hitHurtBox.healthComponent != (Object)(object)target.healthComponent)) { return false; } return BulletAttack.DefaultFilterCallbackImplementation(bulletAttack, ref hitInfo); } public virtual bool HitCallback(BulletAttack bulletAttack, ref BulletHit hitInfo) { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) if (hitConfirmed) { return false; } HurtBox hitHurtBox = hitInfo.hitHurtBox; if (!Object.op_Implicit((Object)(object)hitHurtBox)) { return BulletAttack.DefaultHitCallbackImplementation(bulletAttack, ref hitInfo); } HealthComponent healthComponent = hitHurtBox.healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent) || !Object.op_Implicit((Object)(object)healthComponent.body)) { return BulletAttack.DefaultHitCallbackImplementation(bulletAttack, ref hitInfo); } PreMeleeHit(bulletAttack, ref hitInfo, healthComponent); bool flag = BulletAttack.DefaultHitCallbackImplementation(bulletAttack, ref hitInfo); if (flag && Object.op_Implicit((Object)(object)target) && Object.op_Implicit((Object)(object)healthComponent) && Object.op_Implicit((Object)(object)healthComponent.body.teamComponent) && TeamManager.IsTeamEnemy(healthComponent.body.teamComponent.teamIndex, ((BaseState)this).GetTeam())) { OnMeleeHit(bulletAttack, ref hitInfo, healthComponent); } return flag; } public virtual void PreMeleeHit(BulletAttack bulletAttack, ref BulletHit hitInfo, HealthComponent victimHealthComponent) { wasStaggeredOnHit = victimHealthComponent.body.HasBuff(DoomguyEvents.Stagger); } public virtual void OnMeleeHit(BulletAttack bulletAttack, ref BulletHit hitInfo, HealthComponent victimHealthComponent) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) stopMoving = true; hitConfirmed = true; Vector3 velocity = moveDirection * -1f * backoffVelocity; ((BaseState)(object)this).SetVelocity(velocity); bool flag = false; if (wasStaggeredOnHit || berserked) { if (giveEmpowermentOnExecute) { ((IDoomguyState)this).RechargeSpecialSpearStocks(); } flag = true; } else if (hasStock) { ((BaseSkillState)this).activatorSkillSlot.DeductStock(1); flag = true; } if (flag) { ((EntityState)this).characterBody.OnSkillActivated(((BaseSkillState)this).activatorSkillSlot); } } public virtual void UpdateBulletAttack() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_002d: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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) if (bulletAttack != null) { ray = ((BaseState)this).GetAimRay(); Vector3 val; if (!Object.op_Implicit((Object)(object)target)) { val = Vector3.zero; } else { Vector3 val2 = ((Component)target).transform.position - ((EntityState)this).transform.position; val = ((Vector3)(ref val2)).normalized; } moveDirection = val; bulletAttack.origin = ((Ray)(ref ray)).origin; bulletAttack.aimVector = ((moveDirection == Vector3.zero) ? ((Ray)(ref ray)).direction : moveDirection); } } public virtual void FireBulletAttack() { if (bulletAttack != null) { bulletAttack.Fire(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)((((EntityState)this).fixedAge > duration) ? 1 : 2); } } public abstract class DoomguyRightWeaponState : DoomguyState { public abstract float durationForStateModification { get; } public abstract float fixedAgeForStateModification { get; } public override void ModifyNextState(EntityState nextState) { ((EntityState)this).ModifyNextState(nextState); if (nextState is DoomguyMeleeState doomguyMeleeState) { doomguyMeleeState.addDuration = Mathf.Max(durationForStateModification - fixedAgeForStateModification, 0f); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class DoomguyState : BaseSkillState, IDoomguyState { } public class ExitAccelerator : DoomguyRightWeaponState { public static float damageCoefficient = 5f; public static float procCoefficient = 1f; public static float minSpread = 0f; public static float maxSpread = 0f; public static float baseDuration = 0.5f; public static bool allowTrajectoryAimAssist = false; public static uint bulletCount = 1u; public static DamageType damageType = (DamageType)8; public static DamageTypeExtended damageTypeExtended = (DamageTypeExtended)0; public static FalloffModel falloffModel = (FalloffModel)0; public static float force = 900f; public static float selfVelocity = 18f; public static float radius = 5f; public static float trajectoryAimAssistMultiplier = 0.75f; public static bool smartCollision = true; public static float maxDistance = 6f; public static PhysForceFlags physForceFlags = (PhysForceFlags)0; public static float minVerticalRecoil = -0.4f; public static float maxVerticalRecoil = -0.8f; public static float maxHorizontalRecoil = -0.3f; public static float minHorizontalRecoil = 0.3f; public static float spreadBloom = 1.5f; public static float shakeFrequency = 12f; public static float shakeDuration = 0.7f; public static float shakeRadius = 6f; public static float shakeAmplitude = 2f; public bool supercharge; public float duration; public float damage; public EntityState nextState; public bool alreadyExit; public override float durationForStateModification => duration; public override float fixedAgeForStateModification => ((EntityState)this).fixedAge; public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(supercharge); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); supercharge = reader.ReadBoolean(); } public override void OnEnter() { ((BaseState)this).OnEnter(); SetValues(); ((IDoomguyState)this).PlayFirstPersonCrossfade("RightArm, Override", "ExitAccelerator", "rightArm.playbackRate", 1f, 0.05f, durationIsMultiplier: true); if (((EntityState)this).isAuthority && nextState != null && ((object)nextState).GetType() != typeof(Idle)) { ((EntityState)this).outer.SetNextState(nextState); alreadyExit = true; } if (supercharge) { Fire(); } } public void SetValues() { damage = damageCoefficient * ((EntityState)this).characterBody.damage; duration = baseDuration / ((EntityState)this).characterBody.attackSpeed; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration) && !alreadyExit) { ((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_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_00ef: 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_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011c: 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_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((BaseState)this).AddRecoil(minVerticalRecoil, maxVerticalRecoil, minHorizontalRecoil, maxHorizontalRecoil); Util.PlaySound("Play_DoomTDA_Accelerator_Heatblast", ((EntityState)this).gameObject); ((IDoomguyState)this).Shake(shakeDuration, shakeRadius, shakeFrequency, shakeAmplitude); if (((EntityState)this).isAuthority) { ((BaseState)(object)this).AddVelocity(((Ray)(ref aimRay)).direction * -1f * selfVelocity); if (Object.op_Implicit((Object)(object)((BaseSkillState)this).activatorSkillSlot)) { DoomguyAcceleratorSkillDef.RemoveAllCharge(((BaseSkillState)this).activatorSkillSlot); } BulletAttack val = new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = minSpread, maxSpread = maxSpread, damage = damage, muzzleName = "Muzzle", allowTrajectoryAimAssist = allowTrajectoryAimAssist, bulletCount = bulletCount, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit(damageType), damageTypeExtended, ((BaseSkillState)(object)this).GetDamageSource((DamageSource)1)), falloffModel = falloffModel, force = force, tracerEffectPrefab = FirePistol2.tracerEffectPrefab, isCrit = ((BaseState)this).RollCrit(), trajectoryAimAssistMultiplier = trajectoryAimAssistMultiplier, radius = radius, hitEffectPrefab = FirePistol2.hitEffectPrefab, smartCollision = smartCollision, maxDistance = maxDistance, physForceFlags = physForceFlags, procCoefficient = procCoefficient, stopperMask = ((LayerIndex)(ref LayerIndex.ui)).mask, hitMask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }; val.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); } } } public interface IDoomguyState { FirstPersonCameraController firstPersonCameraController => FirstPersonCameraController.instance; Transform muzzle { get { BaseState val = (BaseState)((this is BaseState) ? this : null); if (val == null) { return null; } CharacterBody characterBody = ((EntityState)val).characterBody; if (Object.op_Implicit((Object)(object)characterBody)) { if (Object.op_Implicit((Object)(object)characterBody.aimOriginTransform)) { return characterBody.aimOriginTransform; } return characterBody.transform; } return ((EntityState)val).transform; } } DoomguyComponent bishopComponent { get { BaseState val = (BaseState)((this is BaseState) ? this : null); if (val == null) { return null; } return ((EntityState)val).GetComponent<DoomguyComponent>(); } } Animator GetFirstPersonAnimator() { if (!Object.op_Implicit((Object)(object)firstPersonCameraController)) { return null; } return firstPersonCameraController.animator; } void PlayFirstPersonCrossfade(string layerName, string animationStateName, string playbackRateParam, float duration, float crossfadeDuration, bool durationIsMultiplier) { if (Condition()) { firstPersonCameraController.animator.PlayCrossfade(layerName, animationStateName, playbackRateParam, duration, crossfadeDuration, durationIsMultiplier); } } void PlayFirstPersonCrossfade(string layerName, int animationStateNameHash, int playbackRateParamHash, float duration, float crossfadeDuration, bool durationIsMultiplier) { if (Condition()) { firstPersonCameraController.animator.PlayCrossfade(layerName, animationStateNameHash, playbackRateParamHash, duration, crossfadeDuration, durationIsMultiplier); } } void PlayFirstPersonCrossfade(string layerName, string animationStateName, float crossfadeDuration) { if (Condition()) { firstPersonCameraController.animator.PlayCrossfade(layerName, animationStateName, crossfadeDuration); } } void PlayFirstPersonCrossfade(string layerName, int animationStateHash, float crossfadeDuration) { if (Condition()) { firstPersonCameraController.animator.PlayCrossfade(layerName, animationStateHash, crossfadeDuration); } } void MuzzleFlash() { BaseState val = (BaseState)((this is BaseState) ? this : null); if (val != null && ((EntityState)val).isAuthority && ((EntityState)val).characterBody.isPlayerControlled && Object.op_Implicit((Object)(object)DoomguyFirstPersonCameraController.instance)) { DoomguyFirstPersonCameraController.instance.Shoot(); } } private bool Condition() { BaseState val = (BaseState)((this is BaseState) ? this : null); if (val == null) { return false; } if (!((EntityState)val).isAuthority || !((EntityState)val).characterBody.isPlayerControlled || !Object.op_Implicit((Object)(object)firstPersonCameraController) || !Object.op_Implicit((Object)(object)firstPersonCameraController.animator)) { return false; } return true; } HashSet<GenericSkill> GetGenericSkillsWithSpecialSpear() { BaseState val = (BaseState)((this is BaseState) ? this : null); return (val != null) ? DoomguySpecialSpearSkillDef.GetGenericSkills(((EntityState)val).characterBody) : null; } void RechargeSpecialSpearStocks(int amount) { BaseState val = (BaseState)((this is BaseState) ? this : null); if (val != null) { DoomguySpecialSpearSkillDef.RechargeStocksForSpecialSpearSkills(((EntityState)val).characterBody, amount); } } void RechargeSpecialSpearStocks() { BaseState val = (BaseState)((this is BaseState) ? this : null); if (val != null) { DoomguySpecialSpearSkillDef.RechargeStocksForSpecialSpearSkills(((EntityState)val).characterBody); } } void Shake(float duration, float radius, float frequency, float amplitude) { if (Object.op_Implicit((Object)(object)bishopComponent)) { bishopComponent.Shake(duration, radius, frequency, amplitude); } } } public class PrepareSpearSpecial : DoomguyState { public Animator animator; public OverlayController overlayController; public override void OnEnter() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound("Play_DoomTDA_Spear_Throw_Enter", ((EntityState)this).gameObject); animator = ((IDoomguyState)this).GetFirstPersonAnimator(); if (Object.op_Implicit((Object)(object)animator)) { animator.AddInteger("spearPrepare"); } OverlayCreationParams val = new OverlayCreationParams { prefab = DoomguyEvents.SpearCrosshair, childLocatorEntry = "CrosshairExtras" }; overlayController = HudOverlayManager.AddOverlay(((EntityState)this).gameObject, val); } public override void OnExit() { ((EntityState)this).OnExit(); Util.PlaySound("Play_DoomTDA_Spear_Throw_Exit", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)animator)) { animator.SubstractInteger("spearPrepare"); } if (overlayController != null) { HudOverlayManager.RemoveOverlay(overlayController); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((BaseState)this).StartAimMode(2f, false); if (!((EntityState)this).isAuthority) { return; } if (!Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (!Object.op_Implicit((Object)(object)((BaseSkillState)this).activatorSkillSlot) || !Object.op_Implicit((Object)(object)((BaseSkillState)this).activatorSkillSlot.skillDef) || ((BaseSkillState)this).activatorSkillSlot.skillDef.HasRequiredStockAndDelay(((BaseSkillState)this).activatorSkillSlot)) { if (((ButtonState)(ref ((EntityState)this).inputBank.skill1)).justPressed) { DeductStock(); ((EntityState)this).characterBody.OnSkillActivated(((BaseSkillState)this).activatorSkillSlot); EntityStateMachine outer = ((EntityState)this).outer; SpearThrow spearThrow = new SpearThrow(); ((BaseSkillState)spearThrow).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; outer.SetNextState((EntityState)(object)spearThrow); } if (((ButtonState)(ref ((EntityState)this).inputBank.skill3)).justPressed) { DeductStock(); ((EntityState)this).characterBody.OnSkillActivated(((BaseSkillState)this).activatorSkillSlot); EntityStateMachine outer2 = ((EntityState)this).outer; SpearSlam spearSlam = new SpearSlam(); ((BaseSkillState)spearSlam).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; outer2.SetNextState((EntityState)(object)spearSlam); } } if (!((BaseSkillState)this).IsKeyDownAuthority()) { ((EntityState)this).outer.SetNextStateToMain(); } } private void DeductStock() { if (Object.op_Implicit((Object)(object)((BaseSkillState)this).activatorSkillSlot)) { ((BaseSkillState)this).activatorSkillSlot.DeductStock(((BaseSkillState)this).activatorSkillSlot.skillDef.requiredStock); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Punch : DoomguyMeleeState { public static float _damageCoefficient = 1f; public static float _damageCoefficientCombo = 8f; public static float _damageCoefficientStagger = 10f; public static float _damageCoefficientBerserk = 40f; public static float _maxDamageCoefficient = 7f; public static float _procCoefficient = 1f; public static float _minSpread = 0f; public static float _maxSpread = 0f; public static float _baseDuration = 0.4f; public static bool _allowTrajectoryAimAssist = false; public static uint _bulletCount = 1u; public static DamageType _damageType = (DamageType)0; public static DamageTypeExtended _damageTypeExtended = (DamageTypeExtended)0; public static FalloffModel _falloffModel = (FalloffModel)0; public static float _force = 300f; public static float _radius = 2f; public static float _trajectoryAimAssistMultiplier = 0f; public static bool _smartCollision = true; public static float _maxDistance = 2f; public static PhysForceFlags _physForceFlags = (PhysForceFlags)0; public static float _backoffVelocity = 24f; public static float _flyToTargetSpeed = 96f; public static float _findTargetDistance = 128f; public static float _findTargetRadius = 3f; public static float _regularFindTargetDistance = 8f; public static float leftPunchTimerSet = 1f; public static int maxComboBuff = 2; public override float damageCoefficient => _damageCoefficient; public override float procCoefficient => _procCoefficient; public override float minSpread => _minSpread; public override float maxSpread => _maxSpread; public override float baseDuration => _baseDuration; public override bool allowTrajectoryAimAssist => _allowTrajectoryAimAssist; public override uint bulletCount => _bulletCount; public override DamageType damageType => _damageType; public override DamageTypeExtended damageTypeExtended => _damageTypeExtended; public override FalloffModel falloffModel => _falloffModel; public override float force => _force; public override float radius => _radius; public override float trajectoryAimAssistMultiplier => _trajectoryAimAssistMultiplier; public override bool smartCollision => _smartCollision; public override float maxDistance => _maxDistance; public override PhysForceFlags physForceFlags => _physForceFlags; public override float backoffVelocity => _backoffVelocity; public override float minFlyToTargetSpeed => _flyToTargetSpeed; public override float findTargetDistance => _findTargetDistance; public override float findTargetRadius => _findTargetRadius; public override bool giveEmpowermentOnExecute => true; public override float regularFindTargetDistance => _regularFindTargetDistance; public override void OnEnter() { base.OnEnter(); bool flag = false; if (Object.op_Implicit((Object)(object)((IDoomguyState)this).bishopComponent)) { if (((IDoomguyState)this).bishopComponent.leftHandPunchTimer > 0f) { ((IDoomguyState)this).bishopComponent.leftHandPunchTimer = 0f; flag = true; } else { ((IDoomguyState)this).bishopComponent.leftHandPunchTimer = leftPunchTimerSet; } } ((IDoomguyState)this).PlayFirstPersonCrossfade(flag ? "LeftArm, Override" : "RightArm, Override", "PunchStart", flag ? "leftArm.playbackRate" : "rightArm.playbackRate", ((BaseState)this).attackSpeedStat, 0.05f, durationIsMultiplier: true); ((IDoomguyState)this).PlayFirstPersonCrossfade((!flag) ? "LeftArm, Override" : "RightArm, Override", "Idle", (!flag) ? "leftArm.playbackRate" : "rightArm.playbackRate", ((BaseState)this).attackSpeedStat, 0.05f, durationIsMultiplier: true); } public override void PreMeleeHit(BulletAttack bulletAttack, ref BulletHit hitInfo, HealthComponent victimHealthComponent) { base.PreMeleeHit(bulletAttack, ref hitInfo, victimHealthComponent); if (wasStaggeredOnHit) { bulletAttack.damage = ((EntityState)this).characterBody.damage * _damageCoefficientStagger; return; } if (berserked) { bulletAttack.damage = ((EntityState)this).characterBody.damage * _damageCoefficientBerserk; } if (hasStock) { bulletAttack.damage = ((EntityState)this).characterBody.damage * _damageCoefficientCombo; } } public override void OnMeleeHit(BulletAttack bulletAttack, ref BulletHit hitInfo, HealthComponent victimHealthComponent) { base.OnMeleeHit(bulletAttack, ref hitInfo, victimHealthComponent); Util.PlaySound((wasStaggeredOnHit || berserked || hasStock) ? "Play_DoomTDA_Punch_Combo" : "Play_DoomTDA_Punch", ((EntityState)this).gameObject); } } public class ShootAccelerator : DoomguyRightWeaponState, IModifyNextRefState { public static float damageCoefficient = 0.5f; public static float superchargeDamageCoefficient = 1.25f; public static float procCoefficient = 1f; public static float baseDuration = 0.08f; public static float durationMultiplierWhenOrbiting = 0.7f; public static bool allowTrajectoryAimAssist = true; public static float spread = 1f; public static float chargePerShot = 3.3333333f; public static float chargeNeededForSupercharge = 100f; public static DamageType damageType = (DamageType)0; public static DamageTypeExtended damageTypeExtended = (DamageTypeExtended)0; public static FalloffModel falloffModel = (FalloffModel)0; public static float force = 0f; public static float radius = 0.1f; public static float trajectoryAimAssistMultiplier = 1f; public static float minVerticalRecoil = -0.4f; public static float maxVerticalRecoil = -0.8f; public static float maxHorizontalRecoil = -0.3f; public static float minHorizontalRecoil = 0.3f; public static float spreadBloom = 0.5f; public static float shakeFrequency = 12f; public static float shakeDuration = 0.4f; public static float shakeRadius = 3f; public static float shakeAmplitude = 0.1f; public static Vector3 offsetRayOrigin = new Vector3(0.5f, -0.2894f, 0.5f); public float damage; public float duration; public float stopwatch; public int shotCount; public float charge; public bool supercharged; public bool supercharge => charge >= chargeNeededForSupercharge; public override float durationForStateModification => duration; public override float fixedAgeForStateModification => stopwatch; public override void OnEnter() { ((BaseState)this).OnEnter(); SetValues(); Fire(); } public override void OnExit() { ((EntityState)this).OnExit(); if (supercharged) { Util.PlaySound("Stop_DoomTDA_Accelerator_Fire_Loop", ((EntityState)this).gameObject); } } public void SetValues() { duration = baseDuration / ((EntityState)this).characterBody.attackSpeed; if (((EntityState)this).characterBody.HasBuff(DoomguyEvents.SpearOrbitLockOn)) { duration *= durationMultiplierWhenOrbiting; } if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator)) { charge = DoomguyAcceleratorSkillDef.GetTotalCharge(((EntityState)this).skillLocator); } damage = (supercharge ? superchargeDamageCoefficient : damageCoefficient) * ((EntityState)this).characterBody.damage; if (!supercharged && supercharge) { supercharged = true; Util.PlaySound("Play_DoomTDA_Accelerator_Adrenaline_Activate", ((EntityState)this).gameObject); Util.PlaySound("Play_DoomTDA_Accelerator_Fire_Loop", ((EntityState)this).gameObject); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += ((EntityState)this).GetDeltaTime(); if (stopwatch >= duration) { stopwatch = 0f; SetValues(); Fire(); } if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority()) { ((EntityState)this).outer.SetNextStateToMain(); } } public void Fire() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016e: 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_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: 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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: 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_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0212: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0134: 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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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) shotCount++; ((IDoomguyState)this).PlayFirstPersonCrossfade("RightArm, Override", "FireAccelerator", "rightArm.playbackRate", 1f, 0.05f, durationIsMultiplier: true); Util.PlaySound("Play_DoomTDA_Accelerator_Fire", ((EntityState)this).gameObject); Util.PlaySound(supercharge ? "Play_DoomTDA_Accelerator_Fire_Supercharge" : "Play_DoomTDA_Accelerator_Fire_Stabilizer", ((EntityState)this).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((BaseState)this).AddRecoil(minVerticalRecoil, maxVerticalRecoil, minHorizontalRecoil, maxHorizontalRecoil); ((IDoomguyState)this).Shake(shakeDuration, shakeRadius, shakeFrequency, shakeAmplitude); ((IDoomguyState)this).MuzzleFlash(); if (Object.op_Implicit((Object)(object)((BaseSkillState)this).activatorSkillSlot)) { DoomguyAcceleratorSkillDef.AddCharge(((BaseSkillState)this).activatorSkillSlot, chargePerShot); } if (((EntityState)this).isAuthority) { Quaternion val = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); CameraRigController cameraRigController = ((EntityState)this).characterBody.GetCameraRigController(); if (Object.op_Implicit((Object)(object)cameraRigController)) { Vector3 val2 = val * offsetRayOrigin; ((Ray)(ref aimRay)).origin = ((Ray)(ref aimRay)).origin + val2; Vector3 val3 = cameraRigController.crosshairWorldPosition - ((Ray)(ref aimRay)).origin; ((Ray)(ref aimRay)).direction = ((Vector3)(ref val3)).normalized; } ((Ray)(ref aimRay)).direction = DoomguyEvents.AcceleratorBulletPattern.GetAimRay(((EntityState)this).characterBody, ((Ray)(ref aimRay)).direction, spread); FireProjectileInfo val4 = new FireProjectileInfo { projectilePrefab = DoomguyEvents.AcceleratorPlasmaProjectile, damage = damage, crit = ((BaseState)this).RollCrit(), damageColorIndex = (DamageColorIndex)0, force = force, damageTypeOverride = new DamageTypeCombo(DamageTypeCombo.op_Implicit(damageType), damageTypeExtended, ((BaseSkillState)(object)this).GetDamageSource((DamageSource)1)), owner = ((EntityState)this).gameObject, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction) }; if (allowTrajectoryAimAssist) { TrajectoryAimAssist.ApplyTrajectoryAimAssist(ref aimRay, ref val4, trajectoryAimAssistMultiplier); } ProjectileManager.instance.FireProjectile(val4); ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); } } public void ModifyNextRefState(ref EntityState entityState) { ExitAccelerator exitAccelerator = new ExitAccelerator(); ((BaseSkillState)exitAccelerator).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; exitAccelerator.supercharge = supercharge; exitAccelerator.nextState = entityState; entityState = (EntityState)(object)exitAccelerator; } } public class ShootShotgun : DoomguyRightWeaponState { public static float damageCoefficient = 1.2f; public static float procCoefficient = 1f; public static float minSpread = 15f; public static float maxSpread = 15f; public static float baseDuration = 0.8f; public static float durationMultiplierWhenOrbiting = 0.7f; public static bool allowTrajectoryAimAssist = true; public static uint bulletCount = 5u; public static DamageType damageType = (DamageType)0; public static DamageTypeExtended damageTypeExtended = (DamageTypeExtended)0; public static FalloffModel falloffModel = (FalloffModel)4; public static float force = 0f; public static float radius = 0.1f; public static float trajectoryAimAssistMultiplier = 0.75f; public static bool smartCollision = true; public static float maxDistance = 256f; public static PhysForceFlags physForceFlags = (PhysForceFlags)0; public static float minVerticalRecoil = -0.4f; public static float maxVerticalRecoil = -0.8f; public static float maxHorizontalRecoil = -0.3f; public static float minHorizontalRecoil = 0.3f; public static float spreadBloom = 1.5f; public static float shakeFrequency = 12f; public static float shakeDuration = 0.7f; public static float shakeRadius = 6f; public static float shakeAmplitude = 0.3f; public float damage; public float duration; public override float durationForStateModification => duration; public override float fixedAgeForStateModification => ((EntityState)this).fixedAge; public override void OnEnter() { ((BaseState)this).OnEnter(); SetValues(); Fire(); } public void SetValues() { damage = damageCoefficient * ((EntityState)this).characterBody.damage; duration = baseDuration / ((EntityState)this).characterBody.attackSpeed; if (((EntityState)this).characterBody.HasBuff(DoomguyEvents.SpearOrbitLockOn)) { duration *= durationMultiplierWhenOrbiting; } } 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_0009: 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_009c: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_0112: 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_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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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_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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Expected O, but got Unknown Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((BaseState)this).AddRecoil(minVerticalRecoil, maxVerticalRecoil, minHorizontalRecoil, maxHorizontalRecoil); ((IDoomguyState)this).PlayFirstPersonCrossfade("RightArm, Override", "FireShotgun", "rightArm.playbackRate", 1f, 0.05f, durationIsMultiplier: true); ((IDoomguyState)this).MuzzleFlash(); Util.PlaySound("Play_DoomTDA_CombatShotgun_Fire", ((EntityState)this).gameObject); ((IDoomguyState)this).Shake(shakeDuration, shakeRadius, shakeFrequency, shakeAmplitude); if (((EntityState)this).isAuthority) { BulletAttack val = new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = minSpread, maxSpread = maxSpread, damage = damage, muzzleName = "Muzzle", allowTrajectoryAimAssist = allowTrajectoryAimAssist, bulletCount = bulletCount, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit(damageType), damageTypeExtended, ((BaseSkillState)(object)this).GetDamageSource((DamageSource)1)), falloffModel = falloffModel, force = force, tracerEffectPrefab = FirePistol2.tracerEffectPrefab, isCrit = ((BaseState)this).RollCrit(), trajectoryAimAssistMultiplier = trajectoryAimAssistMultiplier, radius = radius, hitEffectPrefab = FirePistol2.hitEffectPrefab, smartCollision = smartCollision, maxDistance = maxDistance, physForceFlags = physForceFlags, procCoefficient = procCoefficient }; Extensions.SetBulletPatternDef(val, DoomguyEvents.ShotgunBulletPattern); val.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class SpearOrbit : DoomguyMainState { public static float baseDuration = 3f; public static float baseDurationAddition = 7f; public static float cameraUpdateLerpDuration = 0.1f; public static float lockOnDistance = 12f; public static float pullSpeedCoefficient = 2f; public static float orbitSpeedCoefficient = 2f; public static float strafeSpeedCoefficient = 2f; public static float distanceToTargetUntilExit = 2f; public static float distanceBetweenTargetWhenLockon = 24f; public static float speedAtWhichYouFlyTowardsThatDistance = 24f; public NetworkInstanceId hitBodyNetId; public CharacterBody targetBody; public HurtBox targetHurtbox; public float duration; public float durationAddition; public bool startedLockOn; public bool orbitToTheRight; public bool finishedDeserializing; public Vector3 previousLookVector; public float pullSpeed; public float strafeSpeed; public float orbitSpeed; public Vector3? finalVector; public CameraOverride cameraOverride; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); SetValues(); Util.PlaySound("Play_DoomTDA_Spear_ThrowOrbit_Impact", ((EntityState)this).gameObject); Extensions.AddClientBuff(((EntityState)this).characterBody, Buffs.Nullified, 1); } public void SetValues() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) duration = baseDuration; pullSpeed = ((EntityState)this).characterBody.moveSpeed * pullSpeedCoefficient; strafeSpeed = ((EntityState)this).characterBody.moveSpeed * strafeSpeedCoefficient; orbitSpeed = ((EntityState)this).characterBody.moveSpeed * orbitSpeedCoefficient; durationAddition = baseDurationAddition; finishedDeserializing = true; targetBody = hitBodyNetId.GetCharacterBody(); if (Object.op_Implicit((Object)(object)targetBody)) { targetHurtbox = targetBody.mainHurtBox; } } public override void OnExit() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnExit(); Extensions.RemoveClientBuff(((EntityState)this).characterBody, Buffs.Nullified, 1); if (((EntityState)this).isAuthority) { EndLockOn(); if (finalVector.HasValue) { ((BaseState)(object)this).SetVelocity(finalVector.Value); } } } public override void FixedUpdate() { //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_001e: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0220: 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_0386: 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_029a: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: 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_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).FixedUpdate(); Vector3? val = null; Vector3? val2 = null; Vector3 val3 = Vector3.zero; Vector3 val4 = Vector3.zero; Vector3 val5; if (Object.op_Implicit((Object)(object)targetHurtbox)) { val = targetHurtb