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.12.1
plugins/CaeliImperium.dll
Decompiled 2 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.Refinery; using CaeliImperium.Configs; using CaeliImperium.Interactables; using CaeliImperium.ItemBehaviours; using CaeliImperium.Items; using CaeliImperium.NetworkMessages; using CaeliImperium.ScriptableObjects; using CaeliImperiumEntityStates; using CaeliImperiumEntityStates.BomberWisp; using CaeliImperiumEntityStates.ClaySwordsman; using CaeliImperiumEntityStates.MonsterChest; using CaeliImperiumEntityStates.Victor; using EntityStates; using EntityStates.ClayBruiserMonster; using EntityStates.Commando.CommandoWeapon; using EntityStates.Wisp1Monster; using HG; using HG.Reflection; using HarmonyLib; using IL.RoR2; 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 On.RoR2; 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.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2.UI.SkinControllers; 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: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyInformationalVersion("1.0.0+722b9ec7615c662fb2397d9c09276ec0c67812da")] [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: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [Embedded] [CompilerGenerated] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } 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.Victor { public class AimDownSpear : BaseState { public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlaySound("Play_Deadlock_Venator_Crossbow_Down", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } public class AimSecondary : BaseCaeliImperiumState { public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((BaseSkillState)this).activatorSkillSlot) && ((BaseSkillState)this).activatorSkillSlot is ExtraInputGenericSkill extraInputGenericSkill) { extraInputGenericSkill.HandleExtraSkills((BaseSkillState)(object)this); } if (!((BaseSkillState)this).IsKeyDownAuthority()) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class AimSpear : BaseSkillState { public static float velocitySmoothTime = 0.2f; public static float priority = 60f; public static float transitionDuration = 0.2f; public static CharacterCameraParams characterCameraParams; private CameraParamsOverrideHandle cameraParamsOverrideHandle; private static Vector3 velocityVelocity; public override void OnEnter() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound("Play_Deadlock_Venator_Crossbow_Up", ((EntityState)this).gameObject); Util.PlaySound("Play_Deadlock_Venator_Crossbow_Loop", ((EntityState)this).gameObject); cameraParamsOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(new CameraParamsOverrideRequest { cameraParamsData = characterCameraParams.data, priority = priority }, transitionDuration); } public override void FixedUpdate() { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_00ee: 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_010a: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!((EntityState)this).isAuthority) { return; } if (!((BaseSkillState)this).IsKeyDownAuthority()) { ((EntityState)this).outer.SetNextState((EntityState)(object)new AimDownSpear()); } if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((ButtonState)(ref ((EntityState)this).inputBank.skill1)).justPressed) { GenericSkill activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; if (activatorSkillSlot != null) { activatorSkillSlot.DeductStock(1); } EntityStateMachine outer = ((EntityState)this).outer; FireSpear fireSpear = new FireSpear(); ((BaseSkillState)fireSpear).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; outer.SetNextState((EntityState)(object)fireSpear); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.Lerp(((EntityState)this).characterMotor.velocity, Vector3.zero, ((EntityState)this).fixedAge / velocitySmoothTime); } else if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody)) { ((EntityState)this).rigidbody.velocity = Vector3.Lerp(((EntityState)this).characterMotor.velocity, ((EntityState)this).rigidbody.velocity, ((EntityState)this).fixedAge / velocitySmoothTime); } } public override void OnExit() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); Util.PlaySound("Stop_Deadlock_Venator_Crossbow_Up", ((EntityState)this).gameObject); Util.PlaySound("Stop_Deadlock_Venator_Crossbow_Loop", ((EntityState)this).gameObject); if (((CameraParamsOverrideHandle)(ref cameraParamsOverrideHandle)).isValid) { ((EntityState)this).cameraTargetParams.RemoveParamsOverride(cameraParamsOverrideHandle, transitionDuration); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class BloodTribute : BaseCaeliImperiumState { public static float damageCoefficient = 0.2f; public static float minHealthPercentageDamage = 1f; public static float maxHealthPercentageDamage = 5f; public static float timeToFullyCharge = 15f; public static float procCoefficient = 1f; public static float fireRateCoefficient = 3f; public static float force = 0f; public static float timeBeforeCanCancel = 0.3f; public static DamageType damageType = (DamageType)0; public static DamageTypeExtended damageTypeExtended = (DamageTypeExtended)0; public static FalloffModel falloffModel = (FalloffModel)0; public static PhysForceFlags physForceFlags; public static AttackerFiltering attackerFiltering = (AttackerFiltering)1; public static float radius = 9f; public float damage; public float fireRate; public float stopwatch; public float charge; public VictorBlastAttack victorBlastAttack; private uint soundId; public override void OnEnter() { base.OnEnter(); Util.PlaySound("Play_Deadlock_Victor_Aura_Start", ((EntityState)this).gameObject); Util.PlaySound("Play_Deadlock_Victor_Aura_Loop", ((EntityState)this).gameObject); soundId = Util.PlaySound("Play_Deadlock_Victor_Aura_Ramup", ((EntityState)this).gameObject); GlobalEventManager.onClientDamageNotified += GlobalEventManager_onClientDamageNotified; if (NetworkServer.active) { GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; } } private void GlobalEventManager_onClientDamageNotified(DamageDealtMessage obj) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)obj.attacker) && !((Object)(object)obj.attacker != (Object)(object)((EntityState)this).gameObject) && DamageAPI.HasModdedDamageType(obj, VictorEvents.SummonDeathAuraDamageType)) { CaeliImperiumPlugin.Log.LogMessage((object)"Working"); } } private void GlobalEventManager_onServerDamageDealt(DamageReport obj) { if (Object.op_Implicit((Object)(object)obj.attacker) && !((Object)(object)obj.attacker != (Object)(object)((EntityState)this).gameObject) && obj.damageInfo is VictorDamageInfo victorDamageInfo) { CaeliImperiumPlugin.Log.LogMessage((object)(((Object)obj.victim).name + " got hit with victor value: " + victorDamageInfo.reduceReviveCooldown)); } } public override void OnExit() { ((EntityState)this).OnExit(); Util.PlaySound("Play_Deadlock_Victor_Aura_End", ((EntityState)this).gameObject); Util.PlaySound("Stop_Deadlock_Victor_Aura_Loop", ((EntityState)this).gameObject); Util.PlaySound("Stop_Deadlock_Victor_Aura_Ramup", ((EntityState)this).gameObject); GlobalEventManager.onClientDamageNotified -= GlobalEventManager_onClientDamageNotified; if (NetworkServer.active) { GlobalEventManager.onServerDamageDealt -= GlobalEventManager_onServerDamageDealt; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float fixedDeltaTime = Time.fixedDeltaTime; stopwatch += fixedDeltaTime; float num = 1f / fireRate; if (stopwatch >= num) { int num2 = 0; while (stopwatch >= num) { num2++; stopwatch -= num; } UpdateValues(); Fire(num2); } if (((EntityState)this).fixedAge > timeBeforeCanCancel && ((EntityState)this).isAuthority && ((Object.op_Implicit((Object)(object)Extensions.GetSprintSkill(((EntityState)this).skillLocator)) && (Object)(object)Extensions.GetSprintSkill(((EntityState)this).skillLocator) == (Object)(object)((BaseSkillState)this).activatorSkillSlot) ? ((ButtonState)(ref ((EntityState)this).inputBank.sprint)).justPressed : ((BaseSkillState)this).IsKeyJustPressedAuthority())) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void UpdateValues() { //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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) base.UpdateValues(); fireRate = fireRateCoefficient * ((EntityState)this).characterBody.attackSpeed; damage = damageCoefficient * ((EntityState)this).characterBody.damage; float num = ((EntityState)this).fixedAge / timeToFullyCharge; if (Object.op_Implicit((Object)(object)((EntityState)this).healthComponent)) { damage += Mathf.Lerp(minHealthPercentageDamage, maxHealthPercentageDamage, num) / 100f * ((EntityState)this).healthComponent.fullCombinedHealth; } if (victorBlastAttack == null) { victorBlastAttack = new VictorBlastAttack { attacker = ((EntityState)this).gameObject, attackerFiltering = attackerFiltering, baseDamage = damage, baseForce = force, crit = ((BaseState)this).RollCrit(), damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit(damageType), damageTypeExtended, ((BaseSkillState)(object)this).GetDamageSource()), falloffModel = falloffModel, inflictor = ((EntityState)this).gameObject, losType = (LoSType)0, physForceFlags = physForceFlags, radius = radius, position = ((EntityState)this).transform.position, procCoefficient = procCoefficient, teamIndex = ((BaseState)this).GetTeam(), reduceReviveCooldown = 10f }; DamageAPI.AddModdedDamageType((BlastAttack)(object)victorBlastAttack, VictorEvents.SummonDeathAuraDamageType); } else { ((BlastAttack)victorBlastAttack).baseDamage = damage; ((BlastAttack)victorBlastAttack).baseForce = force; ((BlastAttack)victorBlastAttack).crit = ((BaseState)this).RollCrit(); ((BlastAttack)victorBlastAttack).radius = radius; ((BlastAttack)victorBlastAttack).position = ((EntityState)this).transform.position; ((BlastAttack)victorBlastAttack).teamIndex = ((BaseState)this).GetTeam(); victorBlastAttack.reduceReviveCooldown = 10f; } AkSoundEngine.SetRTPCValueByPlayingID("Volume_SFX", num * 100f, soundId); } public void Fire(int count) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown for (int i = 0; i < count; i++) { if (((EntityState)this).isAuthority) { ((BlastAttack)victorBlastAttack).Fire(); EffectData val = new EffectData { origin = ((BlastAttack)victorBlastAttack).position, scale = ((BlastAttack)victorBlastAttack).radius }; EffectManager.SpawnEffect(CommonAssets.igniteOnKillExplosionEffectPrefab, val, true); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FireSpear : BaseCaeliImperiumState { public static GameObject hitEffectPrefab; public static GameObject tracerEffectPrefab; public static float damageCoefficient = 9f; public static float procCoefficient = 1f; public static float baseDuration = 0.3f; public static DamageType damageType = (DamageType)0; public static DamageTypeExtended damageTypeExtended = (DamageTypeExtended)0; public static FalloffModel falloffModel = (FalloffModel)0; public static float force = 100f; public static float maxDistance = 1024f; public static float maxSpread = 0f; public static float minSpread = 0f; public static PhysForceFlags physForceFlags; public static float radius = 0.5f; public static uint bulletCount = 1u; public static float spreadBloom = 1.5f; public float damage; public float duration; public override void OnEnter() { base.OnEnter(); Fire(1u); } public override void UpdateValues() { base.UpdateValues(); duration = baseDuration / ((BaseState)this).attackSpeedStat; damage = damageCoefficient * ((BaseState)this).damageStat; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new AimDownSpear()); } } public void Fire(uint count) { //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_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_003d: 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_004b: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f2: 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_0108: 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_011b: Expected O, but got Unknown //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown Util.PlaySound("Play_Deadlock_Venator_Crossbow_Shoot", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); BulletAttack val = new BulletAttack { bulletCount = count * bulletCount, aimVector = ((Ray)(ref aimRay)).direction, allowTrajectoryAimAssist = true, damage = damage, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit(damageType), damageTypeExtended, ((BaseSkillState)(object)this).GetDamageSource((DamageSource)2)), falloffModel = falloffModel, force = force, hitEffectPrefab = hitEffectPrefab, isCrit = ((BaseState)this).RollCrit(), maxDistance = maxDistance, maxSpread = maxSpread, minSpread = minSpread, origin = ((Ray)(ref aimRay)).origin, owner = ((EntityState)this).gameObject, physForceFlags = physForceFlags, procCoefficient = procCoefficient, radius = radius, tracerEffectPrefab = tracerEffectPrefab, sniper = true }; val.hitCallback = (HitCallback)Delegate.Combine((Delegate?)(object)val.hitCallback, (Delegate?)new HitCallback(OnHit)); val.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); } } private bool OnHit(BulletAttack bulletAttack, ref BulletHit hitInfo) { if (hitInfo.isSniperHit) { Util.PlaySound("Play_Deadlock_Venator_Crossbow_Hit_Headshot", ((EntityState)this).gameObject); } else { Util.PlaySound("Play_Deadlock_Venator_Crossbow_Hit", ((EntityState)this).gameObject); } return false; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class FireSyringes : BaseCaeliImperiumState { public static GameObject hitEffectPrefab; public static GameObject tracerEffectPrefab; public static float damageCoefficient = 0.5f; public static float procCoefficient = 1f; public static float fireRateCoefficient = 6f; public static DamageType damageType = (DamageType)0; public static DamageTypeExtended damageTypeExtended = (DamageTypeExtended)0; public static FalloffModel falloffModel = (FalloffModel)1; public static float force = 100f; public static float maxDistance = 1024f; public static float maxSpread = 0f; public static float minSpread = 0f; public static PhysForceFlags physForceFlags; public static float radius = 0.5f; public static uint bulletCount = 1u; public static float spreadBloom = 0.5f; public float damage; public float fireRate; public float stopwatch; public override void OnEnter() { base.OnEnter(); Fire(1u); } public override void UpdateValues() { base.UpdateValues(); fireRate = fireRateCoefficient * ((EntityState)this).characterBody.attackSpeed; damage = damageCoefficient * ((EntityState)this).characterBody.damage; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float deltaTime = ((EntityState)this).GetDeltaTime(); stopwatch += deltaTime; float num = 1f / fireRate; if (stopwatch >= num) { uint num2 = 0u; while (stopwatch >= num) { num2++; stopwatch -= num; } Fire(num2); UpdateValues(); if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority()) { ((EntityState)this).outer.SetNextStateToMain(); } } } public void Fire(uint count) { //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_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_003d: 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_004b: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f2: 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_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Expected O, but got Unknown Util.PlaySound("Play_TF2_Medic_Syringe_Shot", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); BulletAttack val = new BulletAttack { bulletCount = count * bulletCount, aimVector = ((Ray)(ref aimRay)).direction, allowTrajectoryAimAssist = true, damage = damage, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit(damageType), damageTypeExtended, ((BaseSkillState)(object)this).GetDamageSource((DamageSource)1)), falloffModel = falloffModel, force = force, hitEffectPrefab = hitEffectPrefab, isCrit = ((BaseState)this).RollCrit(), maxDistance = maxDistance, maxSpread = maxSpread, minSpread = minSpread, origin = ((Ray)(ref aimRay)).origin, owner = ((EntityState)this).gameObject, physForceFlags = physForceFlags, procCoefficient = procCoefficient, radius = radius, tracerEffectPrefab = tracerEffectPrefab }; val.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class InjectSerum : BaseSkillState { public static float baseDuration = 0.3f; public const float audioDuration = 0.3f; public static float minBuffDuration = 10f; public static float maxBuffDuration = 100f; public float duration; private bool injected; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Util.PlayAttackSpeedSound("Play_Deadlock_Victor_Jumpstart", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat / (baseDuration / 0.3f)); } public override void FixedUpdate() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge < duration) { return; } if (!injected) { injected = true; float num = 500f; float num2 = 1000f; if (Object.op_Implicit((Object)(object)((BaseSkillState)this).activatorSkillSlot)) { VictorSkillDef.InstanceData instanceData = ((((BaseSkillState)this).activatorSkillSlot.skillInstanceData != null) ? (((BaseSkillState)this).activatorSkillSlot.skillInstanceData as VictorSkillDef.InstanceData) : null); if (instanceData != null) { num = instanceData.charge; instanceData.charge = 0f; num2 = instanceData.maxCharge; } } if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(VictorEvents.Serum.buffIndex, Mathf.Lerp(minBuffDuration, maxBuffDuration, num / num2)); } if (Object.op_Implicit((Object)(object)((EntityState)this).healthComponent)) { ((EntityState)this).healthComponent.lastHealTime = FixedTimeStamp.now; } } if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class PrepareBlade : BaseSkillState { public override void OnEnter() { ((BaseState)this).OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority()) { ((BaseSkillState)this).activatorSkillSlot.DeductStock(1); EntityStateMachine outer = ((EntityState)this).outer; SlashBlade slashBlade = new SlashBlade(); ((BaseSkillState)slashBlade).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; outer.SetNextState((EntityState)(object)slashBlade); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Reviving : BaseCaeliImperiumState { public static float timeToRevive = 3f; public const float audioTime = 3f; private uint soundId; public override void OnEnter() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); soundId = Util.PlaySound("Play_Deadlock_Victor_Reanimation_Start", ((EntityState)this).gameObject); float num = Util.CalculateAttackSpeedRtpcValue(timeToRevive / 3f); AkSoundEngine.SetRTPCValueByPlayingID("attackSpeed", num, soundId); if (NetworkServer.active) { CleanseSystem.CleanseBodyServer(((EntityState)this).characterBody, true, false, true, true, true, false); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (NetworkServer.active) { if (((EntityState)this).fixedAge >= timeToRevive) { ((EntityState)this).outer.SetNextStateToMain(); } if (Object.op_Implicit((Object)(object)((EntityState)this).healthComponent)) { float num = ((EntityState)this).fixedAge / timeToRevive; ((EntityState)this).healthComponent.Networkhealth = Mathf.Max(((EntityState)this).characterBody.maxHealth * num, 1f); ((EntityState)this).healthComponent.Networkshield = ((EntityState)this).characterBody.maxShield * num; } } } public override void OnExit() { ((EntityState)this).OnExit(); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).healthComponent)) { ((EntityState)this).healthComponent.Networkhealth = ((EntityState)this).characterBody.maxHealth; ((EntityState)this).healthComponent.Networkshield = ((EntityState)this).characterBody.maxShield; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } public class SlashBlade : BaseCaeliImperiumState { public static GameObject hitEffectPrefab; public static GameObject tracerEffectPrefab; public static float damageCoefficient = 2f; public static float procCoefficient = 1f; public static DamageType damageType = (DamageType)1056; public static DamageTypeExtended damageTypeExtended = (DamageTypeExtended)0; public static FalloffModel falloffModel = (FalloffModel)0; public static float force = 100f; public static float maxDistance = 3f; public static float maxSpread = 0f; public static float minSpread = 0f; public static PhysForceFlags physForceFlags; public static float radius = 3f; public static uint bulletCount = 1u; public static float speedCoefficient = 9f; public static float baseDuration = 0.5f; public static AnimationCurve speedCurve = CaeliImperiumUtils.QuadraticOut(0f, 0f, 1f, 1f); public static float rechargeCooldown = 2f; public static float rechargeCooldownReductionPerHit = 2f; public BulletAttack bulletAttack; public Vector3 dashDirection; public float speed; public float duration; public float damage; public int originalLayer; public float rechargeReduction; public override void OnEnter() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: 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_0123: 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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: 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_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: 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_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0215: 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_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Expected O, but got Unknown //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Expected O, but got Unknown //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Expected O, but got Unknown //IL_027d: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } originalLayer = ((EntityState)this).gameObject.layer; rechargeReduction = rechargeCooldown; ((EntityState)this).gameObject.layer = LayerIndex.GetAppropriateFakeLayerForTeam(((BaseState)this).GetTeam()).intVal; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; if (Object.op_Implicit((Object)(object)((BaseCharacterController)((EntityState)this).characterMotor).Motor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } } else if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody)) { ((EntityState)this).rigidbody.velocity = Vector3.zero; } if (((EntityState)this).isAuthority) { duration = baseDuration / ((BaseState)this).attackSpeedStat; speed = speedCoefficient * ((BaseState)this).attackSpeedStat * ((BaseState)this).moveSpeedStat; Ray aimRay = ((BaseState)this).GetAimRay(); dashDirection = ((Ray)(ref aimRay)).direction; bulletAttack = new BulletAttack { bulletCount = bulletCount, aimVector = ((Ray)(ref aimRay)).origin, allowTrajectoryAimAssist = false, damage = damage, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit(damageType), damageTypeExtended, ((BaseSkillState)(object)this).GetDamageSource((DamageSource)4)), falloffModel = falloffModel, force = force, hitEffectPrefab = hitEffectPrefab, isCrit = ((BaseState)this).RollCrit(), maxDistance = maxDistance, maxSpread = maxSpread, minSpread = minSpread, origin = ((Ray)(ref aimRay)).origin, owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, smartCollision = true, physForceFlags = physForceFlags, procCoefficient = procCoefficient, radius = radius, tracerEffectPrefab = tracerEffectPrefab, stopperMask = ((LayerIndex)(ref LayerIndex.ui)).mask, hitMask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }; BulletAttack obj = bulletAttack; obj.hitCallback = (HitCallback)Delegate.Combine((Delegate?)(object)obj.hitCallback, (Delegate?)new HitCallback(HitCallBack)); DamageAPI.AddModdedDamageType(bulletAttack, VictorEvents.GainGutsDamageType); Extensions.SetIgnoreHitTargets(bulletAttack, true); bulletAttack.Fire(); Util.PlaySound("Play_Deadlock_Shiv_Dash", ((EntityState)this).gameObject); } } private bool HitCallBack(BulletAttack bulletAttack, ref BulletHit hitInfo) { if (Object.op_Implicit((Object)(object)((BaseSkillState)this).activatorSkillSlot)) { GenericSkill activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; activatorSkillSlot.rechargeStopwatch += rechargeReduction; rechargeReduction /= rechargeCooldownReductionPerHit; } return false; } public override void FixedUpdate() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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_0078: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00c2: 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) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { UpdateValues(); bulletAttack.Fire(); float num = speedCurve.Evaluate(((EntityState)this).fixedAge / duration); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashDirection * speed * ((EntityState)this).GetDeltaTime() * num; ((EntityState)this).characterMotor.velocity = Vector3.zero; } else if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody)) { ((EntityState)this).rigidbody.velocity = dashDirection * speed * num; } if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { //IL_004b: 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_00a4: 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) ((EntityState)this).OnExit(); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } ((EntityState)this).gameObject.layer = originalLayer; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = dashDirection * ((EntityState)this).characterMotor.walkSpeed; if (Object.op_Implicit((Object)(object)((BaseCharacterController)((EntityState)this).characterMotor).Motor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); } } else if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbody)) { ((EntityState)this).rigidbody.velocity = dashDirection * ((EntityState)this).characterBody.moveSpeed; } } public override void UpdateValues() { //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) base.UpdateValues(); damage = damageCoefficient * ((EntityState)this).characterBody.damage; if (bulletAttack != null) { bulletAttack.damage = damage; bulletAttack.origin = ((EntityState)this).characterBody.aimOrigin; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } 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.ClaySwordsman { public class BaseClaySwordsmanState : BaseSkillState { public virtual Animator GetSwordAnimator() { ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); if (!Object.op_Implicit((Object)(object)modelChildLocator)) { return null; } Transform val = modelChildLocator.FindChild("Sword"); if (!Object.op_Implicit((Object)(object)val)) { return null; } return ((Component)val).GetComponent<Animator>(); } public virtual void PlayCrossfadeOnSword(string layerName, string animationStateName, float crossfadeDuration) { Animator swordAnimator = GetSwordAnimator(); if (Object.op_Implicit((Object)(object)swordAnimator)) { swordAnimator.PlayCrossfade(layerName, animationStateName, crossfadeDuration); } } public virtual void PlayCrossfadeOnSword(string layerName, int animationStateHash, float crossfadeDuration) { Animator swordAnimator = GetSwordAnimator(); if (Object.op_Implicit((Object)(object)swordAnimator)) { swordAnimator.PlayCrossfade(layerName, animationStateHash, crossfadeDuration); } } public virtual void PlayCrossfadeOnSword(string layerName, int animationStateNameHash, int playbackRateParamHash, float duration, float crossfadeDuration) { Animator swordAnimator = GetSwordAnimator(); if (Object.op_Implicit((Object)(object)swordAnimator)) { swordAnimator.PlayCrossfade(layerName, animationStateNameHash, playbackRateParamHash, duration, crossfadeDuration); } } public virtual void PlayCrossfadeOnSword(string layerName, string animationStateName, string playbackRateParam, float duration, float crossfadeDuration) { Animator swordAnimator = GetSwordAnimator(); if (Object.op_Implicit((Object)(object)swordAnimator)) { swordAnimator.PlayCrossfade(layerName, animationStateName, playbackRateParam, duration, crossfadeDuration); } } } public class BeginSwinging : BaseClaySwordsmanState { public static float baseDuration = 0.5f; public static float baseCrossfadeDuration = 0.02f; public float duration; public float crossfadeDuration; public float cachedAttackSpeed; public override void OnEnter() { ((BaseState)this).OnEnter(); cachedAttackSpeed = ((BaseState)this).attackSpeedStat; duration = baseDuration / cachedAttackSpeed; crossfadeDuration = baseCrossfadeDuration / cachedAttackSpeed; ((EntityState)this).PlayCrossfade("FullBody, Override", "SwingUp", "SwingUp.playbackRate", duration, crossfadeDuration); ((BaseState)this).StartAimMode(2f, false); } public override void FixedUpdate() { //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) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.moveVector = ((EntityState)this).inputBank.aimDirection; } if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { EntityStateMachine outer = ((EntityState)this).outer; Swing obj = new Swing { cachedAttackSpeed = cachedAttackSpeed }; ((BaseSkillState)obj).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; outer.SetNextState((EntityState)(object)obj); } } } public class Spawn : BaseState { public static float duration = 2f; public static string spawnSoundString = "Play_clayBruiser_spawn"; public static GameObject spawnEffectPrefab; public static string spawnEffectChildString = "Root"; public static float startingPrintBias = 1.3f; public static float maxPrintBias = 0f; public static float printDuration = 2f; public static float startingPrintHeight = 0.3f; public static float maxPrintHeight = 0.3f; private static int SpawnStateHash = Animator.StringToHash("Spawn"); private static int SpawnParamHash = Animator.StringToHash("Spawn.playbackRate"); public override void OnEnter() { ((BaseState)this).OnEnter(); EffectManager.SimpleMuzzleFlash(SpawnState.spawnEffectPrefab, ((EntityState)this).gameObject, spawnEffectChildString, false); Util.PlaySound(SpawnState.spawnSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Body", SpawnStateHash, SpawnParamHash, duration); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { PrintController orAddComponent = modelTransform.GetOrAddComponent<PrintController>(); orAddComponent.printTime = printDuration; ((Behaviour)orAddComponent).enabled = true; orAddComponent.startingPrintHeight = startingPrintHeight; orAddComponent.maxPrintHeight = maxPrintHeight; orAddComponent.startingPrintBias = startingPrintBias; orAddComponent.maxPrintBias = maxPrintBias; orAddComponent.disableWhenFinished = true; orAddComponent.printCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)9; } } public class Swing : BaseClaySwordsmanState { public static bool debug = true; public static float overlayAlpha = 2f; public static float debugDistance = 6f; public static float debugRadius = 0.5f; public static float baseDuration = 0.6f; public static float baseAttackDuration = 0.3f; public static float baseCrossfadeDuration = 0.01f; public static int maxSwings = 5; public static float damageCoefficient = 5f; public static float procCoefficient = 1f; public static AttackerFiltering attackerFiltering = (AttackerFiltering)0; public static DamageType damageType = (DamageType)0; public static DamageTypeExtended damageTypeExtended = (DamageTypeExtended)0; public static PhysForceFlags physForceFlags = (PhysForceFlags)0; public static float pushAwayForce = 100f; public float duration; public float attackDuration; public float crossfadeDuration; public float cachedAttackSpeed; public int swing; public HitBoxGroup hitBoxGroup; public OverlapAttack overlapAttack; public Ray aimRay; public TemporaryOverlayInstance temporaryOverlayInstance; public CharacterModel characterModel; public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(cachedAttackSpeed); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); cachedAttackSpeed = reader.ReadSingle(); } public override void OnEnter() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / cachedAttackSpeed; attackDuration = baseAttackDuration / cachedAttackSpeed; crossfadeDuration = baseCrossfadeDuration / cachedAttackSpeed; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); } aimRay = ((BaseState)this).GetAimRay(); GameObject target = GetTarget(); Vector3 val2; if (Object.op_Implicit((Object)(object)target)) { bool flag = swing == 0 || swing % 2 == 0; if (flag) { CharacterBody component = target.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { Vector3 val = target.transform.position + Extensions.GetPositionDelta(component) * attackDuration; val2 = val - ((Ray)(ref aimRay)).origin; } else { val2 = target.transform.position - ((Ray)(ref aimRay)).origin; } } else { val2 = target.transform.position - ((Ray)(ref aimRay)).origin; } AddOverlay(flag); } else { val2 = ((Ray)(ref aimRay)).direction * debugDistance; } if (debug) { Utils.CreateDebugCapsule(((Ray)(ref aimRay)).origin, ((Ray)(ref aimRay)).origin + val2, debugRadius, Color.red, duration); } ((Vector3)(ref val2)).Normalize(); ((Ray)(ref aimRay)).direction = val2; ((BaseState)this).StartAimMode(aimRay, 2f, true); ((EntityState)this).PlayAnimation("FullBody, Override", "SwingDown", "SwingDown.playbackRate", duration, 0f); hitBoxGroup = ((BaseState)this).FindHitBoxGroup("Sword"); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)hitBoxGroup)) { overlapAttack = new OverlapAttack { damage = ((EntityState)this).characterBody.damage * damageCoefficient, attacker = ((EntityState)this).gameObject, attackerFiltering = attackerFiltering, hitBoxGroup = hitBoxGroup, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit(damageType), damageTypeExtended, ((BaseSkillState)(object)this).GetDamageSource((DamageSource)1)), inflictor = ((EntityState)this).gameObject, isCrit = ((BaseState)this).RollCrit(), physForceFlags = physForceFlags, procCoefficient = procCoefficient, pushAwayForce = pushAwayForce, teamIndex = ((BaseState)this).GetTeam() }; } } public void AddOverlay(bool predict) { if (Object.op_Implicit((Object)(object)characterModel)) { temporaryOverlayInstance = TemporaryOverlayManager.AddOverlay(((Component)characterModel).gameObject); temporaryOverlayInstance.originalMaterial = (predict ? CaeliImperiumAssets.Predict : CaeliImperiumAssets.DoesntPredict); temporaryOverlayInstance.inspectorCharacterModel = characterModel; temporaryOverlayInstance.assignedCharacterModel = characterModel; temporaryOverlayInstance.AddToCharacterModel(characterModel); } } public GameObject GetTarget() { if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return null; } CharacterMaster master = ((EntityState)this).characterBody.master; if (!Object.op_Implicit((Object)(object)master)) { return null; } BaseAI[] aiComponents = master.aiComponents; if (aiComponents == null || aiComponents.Length == 0) { return null; } BaseAI val = aiComponents[0]; if (!Object.op_Implicit((Object)(object)val) || val.currentEnemy == null) { return null; } return val.currentEnemy.gameObject; } public override void FixedUpdate() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((BaseState)this).StartAimMode(aimRay, 2f, true); if (overlapAttack != null && ((EntityState)this).fixedAge < attackDuration) { overlapAttack.Fire((List<HurtBox>)null); } if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration)) { if (swing >= maxSwings) { ((EntityState)this).outer.SetNextStateToMain(); return; } EntityStateMachine outer = ((EntityState)this).outer; Swing obj = new Swing(); ((BaseSkillState)obj).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; obj.cachedAttackSpeed = cachedAttackSpeed; obj.swing = swing + 1; outer.SetNextState((EntityState)(object)obj); } } public override void OnExit() { ((EntityState)this).OnExit(); if (temporaryOverlayInstance != null) { temporaryOverlayInstance.RemoveFromCharacterModel(); TemporaryOverlayManager.RemoveOverlay(temporaryOverlayInstance.managerIndex); } } } } namespace CaeliImperiumEntityStates.BomberWisp { public class ChargeBomb : BaseSkillState { public static float baseDuration = 2f; public static float effectScale = 1f; public float duration; private Animator animator; public override void OnEnter() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound("Play_Silksong_Wisp_FlyLoop", ((EntityState)this).gameObject); duration = baseDuration / ((BaseState)this).attackSpeedStat; animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { animator.AddInteger("chargeCount"); } Transform val = ((BaseState)this).FindModelChild("Eye"); if (Object.op_Implicit((Object)(object)val)) { EffectData val2 = new EffectData { rootObject = ((Component)val).gameObject, rotation = val.rotation, scale = effectScale, genericFloat = duration }; EffectManager.SpawnEffect(BomberWisp2Events.Charging.index, val2, false); } } public override void OnExit() { ((EntityState)this).OnExit(); Util.PlaySound("Stop_Silksong_Wisp_FlyLoop", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)animator)) { animator.SubstractInteger("chargeCount"); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { EntityStateMachine outer = ((EntityState)this).outer; FireBomb fireBomb = new FireBomb(); ((BaseSkillState)fireBomb).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; outer.SetNextState((EntityState)(object)fireBomb); } } } public class DeathState : BaseSkillState { public static float projectileDamageCoefficient = 2f; public static float projectileForce = 3000f; public static float projectileVelocity = 15f; public static FalloffModel falloffModel = (FalloffModel)1; public static GameObject initialExplosion = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Wisp/WispDeath.prefab").WaitForCompletion(); public static float minExplosionDamageCoefficient => BomberWispConfigs.DeathStateMinExplosionDamageCoefficient.Value; public static float maxExplosionDamageCoefficient => BomberWispConfigs.DeathStateMaxExplosionDamageCoefficient.Value; public static float procCoefficient => BomberWispConfigs.DeathStateProcCoefficient.Value; public static float minExplosionForce => BomberWispConfigs.DeathStateMinExplosionForce.Value; public static float maxExplosionForce => BomberWispConfigs.DeathStateMaxExplosionForce.Value; public static float minRadius => BomberWispConfigs.DeathStateMinRadius.Value; public static float maxRadius => BomberWispConfigs.DeathStateMaxRadius.Value; public override void OnEnter() { //IL_00b3: 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_00bf: 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_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_00e1: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: 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_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Expected O, but got Unknown //IL_0343: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator)) { if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelBaseTransform)) { EntityState.Destroy((Object)(object)((Component)((EntityState)this).modelLocator.modelBaseTransform).gameObject); } if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform)) { EntityState.Destroy((Object)(object)((Component)((EntityState)this).modelLocator.modelTransform).gameObject); } } if (!EffectManager.ShouldUsePooledEffect(initialExplosion)) { Object.Instantiate<GameObject>(initialExplosion, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation); } else { EffectManager.SpawnEffect(initialExplosion, new EffectData { origin = ((EntityState)this).transform.position, rotation = ((EntityState)this).transform.rotation }, false); } if (NetworkServer.active) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } if (!((EntityState)this).isAuthority) { return; } GameObject val = ((EntityState)this).healthComponent.lastHitAttacker ?? ((EntityState)this).gameObject; int num = 0; float num2 = 0f; if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && ((EntityState)this).skillLocator.allSkills != null) { GenericSkill[] allSkills = ((EntityState)this).skillLocator.allSkills; foreach (GenericSkill val2 in allSkills) { if (!Object.op_Implicit((Object)(object)val2)) { continue; } EntityStateMachine stateMachine = val2.stateMachine; if (Object.op_Implicit((Object)(object)stateMachine) && stateMachine.state != null) { if (stateMachine.state is ChargeBomb chargeBomb) { num++; num2 += ((EntityState)chargeBomb).fixedAge / chargeBomb.duration; } if (stateMachine.state is SpawnPillar spawnPillar) { num++; num2 += ((EntityState)spawnPillar).fixedAge / spawnPillar.duration; } } } } if (num > 0) { BlastAttack val3 = new BlastAttack { attacker = val, attackerFiltering = (AttackerFiltering)0, baseDamage = ((BaseState)this).damageStat * Mathf.LerpUnclamped(minExplosionDamageCoefficient, maxExplosionDamageCoefficient, num2), baseForce = Mathf.LerpUnclamped(minExplosionForce, maxExplosionForce, num2), crit = ((EntityState)this).characterBody.RollCrit(), damageColorIndex = (DamageColorIndex)0, falloffModel = falloffModel, inflictor = ((Component)((EntityState)this).characterBody).gameObject, position = ((EntityState)this).transform.position, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, ((BaseSkillState)(object)this).GetDamageSource()), procCoefficient = procCoefficient, radius = Mathf.LerpUnclamped(minRadius, maxRadius, num2), teamIndex = TeamComponent.GetObjectTeam(val) }; val3.Fire(); EffectData val4 = new EffectData { origin = val3.position, scale = val3.radius }; CaeliImperiumPlugin.Log.LogMessage((object)"Spawning the effect without Scale"); EffectManager.SpawnEffect(BomberWisp2Events.Explosion.index, val4, true); } } } public class FireBomb : BaseSkillState { public static float minSpread = 25f; public static float maxSpread = 50f; public static float baseSpreadCoefficient = 0.2f; public static float maxProjectileDistance = 36f; public static float projectileDistanceMaxCoefficient = 1f; public static float projectileDistanceMinCoefficient = 0f; public static float maxTargetDistance = 24f; public static float targetDistanceCoefficient = 0.2f; public static float predictionMinCoefficient = 0f; public static float predictionMaxCoefficient = 0.2f; public float duration; public static float damageCoefficient => BomberWispConfigs.FireBombDamageCoefficient.Value; public static float procCoefficient => BomberWispConfigs.FireBombProcCoefficient.Value; public static float force => BomberWispConfigs.FireBombForce.Value; public static float baseDuration => BomberWispConfigs.FireBombBaseDuration.Value; public static float projectileSpeed => BomberWispConfigs.FireBombProjectileSpeed.Value; public static float timeToTarget => BomberWispConfigs.FireBombTimeToTarget.Value; public static bool customAIAiming => BomberWispConfigs.FireBombCustomAIAiming.Value; public static int minProjectilesForCustomAIAiming => BomberWispConfigs.FireBombMinProjectilesForCustomAIAiming.Value; public override void OnEnter() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: 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_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing