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 Belmont v1.0.8
plugins/rob-Belmont/BelmontMod.dll
Decompiled 3 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AncientScepter; using BelmontMod.Content; using BelmontMod.Content.Components; using BelmontMod.Content.Enemies; using BelmontMod.Content.Misc; using BelmontMod.Content.Objective; using BelmontMod.Content.Survivors; using BelmontMod.Modules; using BelmontMod.Modules.Achievements; using BelmontMod.SkillStates; using BelmontMod.SkillStates.BaseStates; using BelmontMod.SkillStates.Belmont; using BelmontMod.SkillStates.Belmont.Melee; using BelmontMod.SkillStates.Belmont.Subweapon; using BelmontMod.SkillStates.Belmont.Whip; using BelmontMod.SkillStates.Emote; using BelmontMod.SkillStates.Gargoyle; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.BrotherMonster; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using EntityStates.Croco; using EntityStates.Huntress; using Grumpy; using HG; using HG.BlendableTypes; using HunkMod.Modules; using JetBrains.Annotations; using KinematicCharacterController; using MaterialHud; using On.RoR2; using On.RoR2.CharacterSpeech; using On.RoR2.UI; using On.RoR2.UI.MainMenu; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using Rewired.ComponentControls.Effects; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CameraModes; using RoR2.CharacterAI; using RoR2.CharacterSpeech; using RoR2.ContentManagement; using RoR2.HudOverlay; using RoR2.Navigation; using RoR2.Networking; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2.UI.MainMenu; using TMPro; using ThreeEyedGames; using Unity.Jobs; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BelmontMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+af4ff1d319f4daa5100b3c4722b2430da4be22ca")] [assembly: AssemblyProduct("BelmontMod")] [assembly: AssemblyTitle("BelmontMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] public class RocketRotation : MonoBehaviour { private Rigidbody rb; private void Awake() { rb = ((Component)this).GetComponent<Rigidbody>(); } private void FixedUpdate() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)this).transform; Vector3 velocity = rb.velocity; transform.rotation = Util.QuaternionSafeLookRotation(((Vector3)(ref velocity)).normalized); } } public class StupidFuckingBullshit : MonoBehaviour { public ParticleSystem faggot; private void Awake() { faggot = ((Component)this).GetComponentInChildren<ParticleSystem>(); ((Component)faggot).transform.SetParent((Transform)null); } private void FixedUpdate() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) ((Component)faggot).transform.SetPositionAndRotation(((Component)this).transform.position, ((Component)this).transform.rotation); } } internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } internal enum BelmontCameraParams { DEFAULT, AIM, EMOTE, FAR } internal class BodyInfo { internal string sourceBody = ""; internal string bodyName = ""; internal string bodyNameToken = ""; internal string subtitleNameToken = ""; internal Color bodyColor = Color.white; public Vector3 modelBasePosition = new Vector3(0f, -0.9f, 0f); public Vector3 aimOrigin = new Vector3(0f, 1.4f, 0f); public Vector3 cameraPivot = new Vector3(0f, 1.59f, 0f); internal Texture characterPortrait = null; internal GameObject crosshair = null; internal GameObject podPrefab = null; internal float maxHealth = 100f; internal float healthGrowth = 2f; internal float healthRegen = 0f; internal float shield = 0f; internal float shieldGrowth = 0f; internal float moveSpeed = 7f; internal float moveSpeedGrowth = 0f; internal float acceleration = 80f; internal float jumpPower = 15f; internal float jumpPowerGrowth = 0f; internal float damage = 12f; internal float attackSpeed = 1f; internal float attackSpeedGrowth = 0f; internal float armor = 0f; internal float armorGrowth = 0f; internal float crit = 1f; internal float critGrowth = 0f; internal int jumpCount = 1; } internal class CustomRendererInfo { internal string childName; internal Material material; internal bool ignoreOverlays; } internal class SkillDefInfo { public string skillName; public string skillNameToken; public string skillDescriptionToken; public string[] keywordTokens = new string[0]; public Sprite icon; public SerializableEntityStateType activationState; public InterruptPriority interruptPriority; public string activationStateMachineName; public float baseRechargeInterval; public int baseMaxStock = 1; public int rechargeStock = 1; public int requiredStock = 1; public int stockToConsume = 1; public bool isCombatSkill = true; public bool canceledFromSprinting; public bool forceSprintDuringState; public bool cancelSprintingOnActivation = true; public bool beginSkillCooldownOnSkillEnd; public bool fullRestockOnAssign = true; public bool resetCooldownTimerOnUse; public bool mustKeyPress; public SkillDefInfo() { } public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName, InterruptPriority interruptPriority, bool isCombatSkill, float baseRechargeInterval) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) this.skillName = skillName; this.skillNameToken = skillNameToken; this.skillDescriptionToken = skillDescriptionToken; icon = skillIcon; this.activationState = activationState; this.activationStateMachineName = activationStateMachineName; this.interruptPriority = interruptPriority; this.isCombatSkill = isCombatSkill; this.baseRechargeInterval = baseRechargeInterval; } public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName = "Weapon", bool agile = false) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) this.skillName = skillName; this.skillNameToken = skillNameToken; this.skillDescriptionToken = skillDescriptionToken; icon = skillIcon; this.activationState = activationState; this.activationStateMachineName = activationStateMachineName; interruptPriority = (InterruptPriority)0; isCombatSkill = true; baseRechargeInterval = 0f; requiredStock = 0; stockToConsume = 0; cancelSprintingOnActivation = !agile; if (agile) { keywordTokens = new string[1] { "KEYWORD_AGILE" }; } } } namespace BelmontMod { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.rob.Belmont", "Belmont", "1.0.8")] public class MainPlugin : BaseUnityPlugin { [CompilerGenerated] private sealed class <BodyCatalog_Init>d__17 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public orig_Init orig; public MainPlugin <>4__this; private IEnumerator<GameObject> <>s__1; private GameObject <body>5__2; private KinematicCharacterMotor <motor>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <BodyCatalog_Init>d__17(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = null; <body>5__2 = null; <motor>5__3 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = orig.Invoke(); <>1__state = 1; return true; case 1: <>1__state = -1; <>s__1 = BodyCatalog.allBodyPrefabs.GetEnumerator(); try { while (<>s__1.MoveNext()) { <body>5__2 = <>s__1.Current; if (Object.op_Implicit((Object)(object)<body>5__2)) { <motor>5__3 = <body>5__2.GetComponent<KinematicCharacterMotor>(); if (Object.op_Implicit((Object)(object)<motor>5__3)) { <motor>5__3.playerCharacter = true; } <motor>5__3 = null; } <body>5__2 = null; } } finally { if (<>s__1 != null) { <>s__1.Dispose(); } } <>s__1 = null; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const string MODUID = "com.rob.Belmont"; public const string MODNAME = "Belmont"; public const string MODVERSION = "1.0.8"; public const string developerPrefix = "ROB"; public static MainPlugin instance; public static List<HurtBox> hurtboxesList = new List<HurtBox>(); public static bool scepterInstalled => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); public static bool rooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); public static bool hunkInstalled => Chainloader.PluginInfos.ContainsKey("com.rob.Hunk"); public static bool riskUIInstalled { get { if (Chainloader.PluginInfos.ContainsKey("bubbet.riskui") && RiskUIEnabled()) { return true; } return false; } } private void Awake() { instance = this; Files.PluginInfo = ((BaseUnityPlugin)this).Info; Config.myConfig = ((BaseUnityPlugin)this).Config; Log.Init(((BaseUnityPlugin)this).Logger); Config.ReadConfig(); BelmontAssets.PopulateAssets(); CameraParams.InitializeParams(); States.RegisterStates(); Projectiles.RegisterProjectiles(); new LanguageTokens(); ItemDisplays.PopulateDisplays(); NetworkingAPI.RegisterMessageType<SyncTreasureChestAnimation>(); NetworkingAPI.RegisterMessageType<SyncMorningStarOverlay>(); NetworkingAPI.RegisterMessageType<SyncRelicGainSound>(); NetworkingAPI.RegisterMessageType<SyncSoulOrbOverlay>(); NetworkingAPI.RegisterMessageType<SyncBelmontGainWeapon>(); new Belmont().CreateCharacter(); new Gargoyle().CreateCharacter(); new GreatGargoyle().CreateCharacter(); Hook(); new ContentPacks().Initialize(); ContentManager.onContentPacksAssigned += LateSetup; } private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj) { Belmont.SetItemDisplays(); } private void Hook() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); HurtBox.OnEnable += new hook_OnEnable(HurtBox_OnEnable); HurtBox.OnDisable += new hook_OnDisable(HurtBox_OnDisable); BodyCatalog.Init += new hook_Init(BodyCatalog_Init); } [IteratorStateMachine(typeof(<BodyCatalog_Init>d__17))] private IEnumerator BodyCatalog_Init(orig_Init orig) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <BodyCatalog_Init>d__17(0) { <>4__this = this, orig = orig }; } private void HurtBox_OnEnable(orig_OnEnable orig, HurtBox self) { orig.Invoke(self); hurtboxesList.Add(self); } private void HurtBox_OnDisable(orig_OnDisable orig, HurtBox self) { orig.Invoke(self); hurtboxesList.Remove(self); } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && self.HasBuff(Belmont.superSprintBuff)) { self.moveSpeed += 12f; } } public static float GetICBMDamageMult(CharacterBody body) { float num = 1f; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory)) { int itemCount = body.inventory.GetItemCount(Items.MoreMissile); int num2 = itemCount - 1; if (num2 > 0) { num += (float)num2 * 0.5f; } } return num; } private static bool RiskUIEnabled() { return false; } } } namespace BelmontMod.SkillStates { public class FuckMyAss : GenericCharacterDeath { public override bool shouldAutoDestroy => false; public override void OnEnter() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_00cb: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).OnEnter(); Vector3 val = Vector3.up * 3f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { val += ((EntityState)this).characterMotor.velocity; ((Behaviour)((EntityState)this).characterMotor).enabled = false; } if (!Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { return; } RagdollController component = ((Component)((GenericCharacterDeath)this).cachedModelTransform).GetComponent<RagdollController>(); if (!Object.op_Implicit((Object)(object)component)) { return; } Transform[] bones = component.bones; foreach (Transform val2 in bones) { if (Object.op_Implicit((Object)(object)val2)) { ((Component)val2).gameObject.layer = LayerIndex.ragdoll.intVal; ((Component)val2).gameObject.SetActive(true); } } component.BeginRagdoll(val); } public override void PlayDeathAnimation(float crossfadeDuration = 0.1f) { } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge > 4f) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)9; } } } namespace BelmontMod.SkillStates.Gargoyle { public class ChargeFireball : BaseSkillState { public float baseDuration = 1f; private float duration; private GameObject chargeInstance; private bool success; private EffectManagerHelper _emh_chargeInstance; public override void Reset() { ((BaseState)this).Reset(); duration = 0f; chargeInstance = null; _emh_chargeInstance = null; } public override void OnEnter() { //IL_00ce: 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_00ac: 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) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); Transform modelTransform = ((EntityState)this).GetModelTransform(); Util.PlaySound("sfx_gargoyle_charge_blast", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("MouthMuzzle"); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)BelmontAssets.gargoyleChargeEffectPrefab)) { if (!EffectManager.ShouldUsePooledEffect(BelmontAssets.gargoyleChargeEffectPrefab)) { chargeInstance = Object.Instantiate<GameObject>(BelmontAssets.gargoyleChargeEffectPrefab, val.position, val.rotation); } else { _emh_chargeInstance = EffectManager.GetAndActivatePooledEffect(BelmontAssets.gargoyleChargeEffectPrefab, val.position, val.rotation); chargeInstance = ((Component)_emh_chargeInstance).gameObject; } chargeInstance.transform.parent = val; ScaleParticleSystemDuration component2 = chargeInstance.GetComponent<ScaleParticleSystemDuration>(); if (Object.op_Implicit((Object)(object)component2)) { component2.newDuration = duration; } } } } ((EntityState)this).PlayCrossfade("Head, Override", "ChargeFireball", "Fireball.playbackRate", duration, 0.1f); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)chargeInstance)) { if (!EffectManager.UsePools) { EntityState.Destroy((Object)(object)chargeInstance); return; } if ((Object)(object)_emh_chargeInstance != (Object)null && _emh_chargeInstance.OwningPool != null) { ((GenericPool<EffectManagerHelper>)(object)_emh_chargeInstance.OwningPool).ReturnObject(_emh_chargeInstance); return; } if ((Object)(object)_emh_chargeInstance != (Object)null) { } EntityState.Destroy((Object)(object)chargeInstance); } if (!success) { ((EntityState)this).PlayAnimation("Head, Override", "BufferEmpty"); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(0.5f); if (((EntityState)this).fixedAge >= duration) { success = true; if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ThrowFireball()); } } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class ChargeHellfire : BaseSkillState { public float baseDuration = 1f; private float duration; private GameObject chargeInstance; private EffectManagerHelper _emh_chargeInstance; public override void Reset() { ((BaseState)this).Reset(); duration = 0f; chargeInstance = null; _emh_chargeInstance = null; } public override void OnEnter() { //IL_00ce: 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_00ac: 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) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(2f, false); Transform modelTransform = ((EntityState)this).GetModelTransform(); Util.PlaySound("sfx_gargoyle_charge_blast", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("MouthMuzzle2"); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)BelmontAssets.megaChargeEffectPrefab)) { if (!EffectManager.ShouldUsePooledEffect(BelmontAssets.megaChargeEffectPrefab)) { chargeInstance = Object.Instantiate<GameObject>(BelmontAssets.megaChargeEffectPrefab, val.position, val.rotation); } else { _emh_chargeInstance = EffectManager.GetAndActivatePooledEffect(BelmontAssets.megaChargeEffectPrefab, val.position, val.rotation); chargeInstance = ((Component)_emh_chargeInstance).gameObject; } chargeInstance.transform.parent = val; ScaleParticleSystemDuration component2 = chargeInstance.GetComponent<ScaleParticleSystemDuration>(); if (Object.op_Implicit((Object)(object)component2)) { component2.newDuration = duration; } } } } ((EntityState)this).PlayCrossfade("Head, Override", "ChargeFireball", "Fireball.playbackRate", duration, 0.1f); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)chargeInstance)) { if ((Object)(object)_emh_chargeInstance != (Object)null && _emh_chargeInstance.OwningPool != null) { ((GenericPool<EffectManagerHelper>)(object)_emh_chargeInstance.OwningPool).ReturnObject(_emh_chargeInstance); } else { EntityState.Destroy((Object)(object)chargeInstance); } chargeInstance = null; _emh_chargeInstance = null; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.SetAimTimer(0.5f); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ThrowHellfire()); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class DeathState : GenericCharacterDeath { private bool hasDied; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); Util.PlaySound("vo_gargoyle_death", ((EntityState)this).gameObject); ModelLocator modelLocator = ((EntityState)this).modelLocator; if (Object.op_Implicit((Object)(object)modelLocator) && !Config.boingBoing.Value) { Transform modelTransform = modelLocator.modelTransform; if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val.duration = 1f; val.destroyComponentOnEnd = true; val.originalMaterial = BelmontAssets.morningStarExplosionOverlay; val.inspectorCharacterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); val.alphaCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1.5f); val.animateShaderAlpha = true; } } } public override void FixedUpdate() { //IL_005a: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).fixedAge >= 1f && NetworkServer.active && !hasDied) { hasDied = true; GameObject val = BelmontAssets.morningStarExplosionEffect; if (Config.useHunkExplosion.Value && MainPlugin.hunkInstalled) { val = GetHunkExplosion(); } EffectManager.SpawnEffect(val, new EffectData { origin = ((EntityState)this).characterBody.corePosition, scale = 8f }, true); ((GenericCharacterDeath)this).DestroyBodyAsapServer(); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override void OnExit() { ((GenericCharacterDeath)this).DestroyModel(); ((GenericCharacterDeath)this).OnExit(); } private GameObject GetHunkExplosion() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) if (!MainPlugin.hunkInstalled) { return Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniExplosionVFX.prefab").WaitForCompletion(); } return HunkAssets.flameExplosionEffect; } } public class GreatDeath : GenericCharacterDeath { private bool hasDied; public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); Util.PlaySound("vo_bluefangs_death", ((EntityState)this).gameObject); ModelLocator modelLocator = ((EntityState)this).modelLocator; if (Object.op_Implicit((Object)(object)modelLocator)) { Transform modelTransform = modelLocator.modelTransform; if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val.duration = 1f; val.destroyComponentOnEnd = true; val.originalMaterial = BelmontAssets.morningStarExplosionOverlay; val.inspectorCharacterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); val.alphaCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 3f); val.animateShaderAlpha = true; } } } public override void FixedUpdate() { //IL_005a: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).fixedAge >= 1f && NetworkServer.active && !hasDied) { hasDied = true; GameObject val = BelmontAssets.morningStarExplosionEffect; if (Config.useHunkExplosion.Value && MainPlugin.hunkInstalled) { val = GetHunkExplosion(); } EffectManager.SpawnEffect(val, new EffectData { origin = ((EntityState)this).characterBody.corePosition, scale = 16f }, true); ((GenericCharacterDeath)this).DestroyBodyAsapServer(); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override void OnExit() { ((GenericCharacterDeath)this).DestroyModel(); ((GenericCharacterDeath)this).OnExit(); } private GameObject GetHunkExplosion() { if (!MainPlugin.hunkInstalled) { return BelmontAssets.morningStarExplosionEffect; } return HunkAssets.grenadeExplosionEffect; } } public class GreatSpawn : GenericCharacterSpawnState { public override void OnEnter() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown ((GenericCharacterSpawnState)this).OnEnter(); base.duration = 2f; ((EntityState)this).PlayAnimation("Body", "Spawn", "Spawn.playbackRate", base.duration, 0f); Util.PlaySound("sfx_bluefangs_spawn", ((EntityState)this).gameObject); EffectManager.SpawnEffect(BelmontAssets.greatGargoyleSpawnEffect, new EffectData { origin = ((EntityState)this).transform.position + Vector3.up * -0.5f, rotation = Quaternion.identity, scale = 1f }, false); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) && NetworkServer.active) { ((EntityState)this).characterBody.inventory.GiveItem(Items.UseAmbientLevel, 1); ((EntityState)this).characterBody.inventory.GiveItem(Items.TeleportWhenOob, 1); } } } public class GroundPound : BaseSkillState { public float duration = 2.77f; private bool hasPounded; private bool hasFired; private bool hasSnarled; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlaySound("vo_bluefangs_snarl", ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("FullBody, Override", "GroundPound", "Action.playbackRate", duration, 0.1f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasSnarled && ((EntityState)this).fixedAge >= 0.27f * duration) { hasSnarled = true; Util.PlaySound("vo_bluefangs_attack", ((EntityState)this).gameObject); } if (!hasPounded && ((EntityState)this).fixedAge >= 0.3f * duration) { hasPounded = true; FirePound(); } if (!hasFired && ((EntityState)this).fixedAge >= 0.65f * duration) { hasFired = true; FireFlames(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void FirePound() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_00a6: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown Vector3 position = ((BaseState)this).FindModelChild("GroundPoundPoint").position; EffectManager.SpawnEffect(BelmontAssets.groundPunchEffectPrefab, new EffectData { origin = position, scale = 1f, rotation = Quaternion.identity }, false); Util.PlaySound("sfx_belmont_ground_impact", ((EntityState)this).gameObject); if (!((EntityState)this).isAuthority) { return; } float num = 16f; ((BaseState)this).AddRecoil(-1f * num, -2f * num, -0.5f * num, 0.5f * num); BlastAttack val = new BlastAttack(); val.radius = 8f; val.procCoefficient = 1f; val.position = position; val.attacker = ((EntityState)this).gameObject; val.crit = ((BaseState)this).RollCrit(); val.baseDamage = ((BaseState)this).damageStat * 2.5f; val.falloffModel = (FalloffModel)0; val.baseForce = 600f; val.bonusForce = Vector3.up * 600f; val.teamIndex = TeamComponent.GetObjectTeam(val.attacker); val.damageType = DamageTypeCombo.op_Implicit((DamageType)32) | DamageTypeCombo.GenericPrimary; val.attackerFiltering = (AttackerFiltering)2; HitPoint[] array = val.CollectHits(); if (array.Length != 0) { HitPoint[] array2 = array; foreach (HitPoint val2 in array2) { EffectManager.SpawnEffect(BelmontAssets.kickImpactEffect, new EffectData { origin = val2.hitPosition, scale = 1f }, true); } } val.Fire(); } private void FireFlames() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_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) GameObject flamePillarProjectile = Projectiles.flamePillarProjectile; Vector3 position = ((BaseState)this).FindModelChild("GroundPoundPoint").position; if (((EntityState)this).isAuthority) { ProjectileManager instance = ProjectileManager.instance; Ray aimRay = ((BaseState)this).GetAimRay(); instance.FireProjectile(flamePillarProjectile, position, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * 0.9f, 500f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)7; } } public class Slash : BaseMeleeAttack { private GameObject swingEffectInstance; public override void OnEnter() { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) hitboxName = "Slash"; damageCoefficient = 4f; pushForce = 200f; baseDuration = 1.5f; baseEarlyExitTime = 2f; attackRecoil = 2f / ((BaseState)this).attackSpeedStat; hitHopVelocity = 6.5f / ((BaseState)this).attackSpeedStat; attackStartTime = 0.335f; attackEndTime = 0.45f; hitStopDuration = 0.3f; smoothHitstop = true; swingSoundString = "sfx_belmont_swing_sword"; hitSoundString = ""; impactSound = BelmontAssets.gargoyleImpactSoundEvent.index; hitEffectPrefab = BelmontAssets.whipCritImpactEffect; swingEffectPrefab = BelmontAssets.critSwingEffect; muzzleString = "SlashMuzzle"; damageType = DamageTypeCombo.GenericPrimary; base.OnEnter(); Util.PlaySound("vo_gargoyle_attack", ((EntityState)this).gameObject); } protected override void PlaySwingEffect() { Util.PlaySound(swingSoundString, ((EntityState)this).gameObject); if (!Object.op_Implicit((Object)(object)swingEffectPrefab)) { return; } Transform val = ((BaseState)this).FindModelChild(muzzleString); if (Object.op_Implicit((Object)(object)val)) { swingEffectInstance = Object.Instantiate<GameObject>(swingEffectPrefab, val); ScaleParticleSystemDuration component = swingEffectInstance.GetComponent<ScaleParticleSystemDuration>(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = component.initialDuration; } } } protected override void TriggerHitStop() { base.TriggerHitStop(); if (Object.op_Implicit((Object)(object)swingEffectInstance)) { ScaleParticleSystemDuration component = swingEffectInstance.GetComponent<ScaleParticleSystemDuration>(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = 20f; } } } protected override void ClearHitStop() { base.ClearHitStop(); if (Object.op_Implicit((Object)(object)swingEffectInstance)) { ScaleParticleSystemDuration component = swingEffectInstance.GetComponent<ScaleParticleSystemDuration>(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = component.initialDuration; } } } protected override void PlayAttackAnimation() { ((EntityState)this).PlayCrossfade("Gesture, Override", "Slash", "Slash.playbackRate", duration, 0.1f); } protected override void SetNextState() { } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (stopwatch >= 0.85f * duration) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class SpawnDive : GenericCharacterSpawnState { private int step; private Vector3 startPosition; private Vector3 targetPosition; private float stopwatch; public override void OnEnter() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterSpawnState)this).OnEnter(); base.duration = 1f; ((EntityState)this).PlayAnimation("Body", "Spawn2", "Spawn.playbackRate", base.duration, 0f); Util.PlaySound("sfx_gargoyle_dive", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { startPosition = ((EntityState)this).transform.position + new Vector3(0f, 15f, 0f); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(startPosition, true); targetPosition = Helpers.GetRandomNode() + new Vector3(0f, 0.25f, 0f); CharacterDirection characterDirection = ((EntityState)this).characterDirection; Vector3 val = targetPosition - ((EntityState)this).transform.position; characterDirection.moveVector = ((Vector3)(ref val)).normalized; } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) && NetworkServer.active) { ((EntityState)this).characterBody.inventory.GiveItem(Items.UseAmbientLevel, 1); ((EntityState)this).characterBody.inventory.GiveItem(Items.TeleportWhenOob, 1); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } 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_0054: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) stopwatch += Time.fixedDeltaTime; switch (step) { case 0: if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterMotor.rootMotion = Vector3.zero; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(startPosition, true); } if (stopwatch >= base.duration) { ((EntityState)this).PlayAnimation("Body", "SpawnDive"); if (Random.value > 0.25f) { Util.PlaySound("vo_gargoyle_dive", ((EntityState)this).gameObject); } base.duration = Util.Remap(Vector3.Distance(((EntityState)this).transform.position, targetPosition), 0f, 500f, 0.5f, 4f); stopwatch = 0f; ((EntityState)this).fixedAge = 0f; step++; } break; case 1: if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterMotor.rootMotion = Vector3.zero; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(Vector3.Lerp(startPosition, targetPosition, Util.Remap(stopwatch, 0f, base.duration, 0f, 1f)), true); } if (stopwatch >= base.duration) { ((EntityState)this).PlayAnimation("Body", "DiveLanding"); Util.PlaySound("sfx_gargoyle_landing", ((EntityState)this).gameObject); base.duration = 0.8f; stopwatch = 0f; ((EntityState)this).fixedAge = 0f; step++; } break; case 2: if (((EntityState)this).isAuthority && stopwatch >= base.duration) { ((EntityState)this).outer.SetNextStateToMain(); } break; } ((GenericCharacterSpawnState)this).FixedUpdate(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)9; } } public class SpawnState : GenericCharacterSpawnState { public override void OnEnter() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown ((GenericCharacterSpawnState)this).OnEnter(); base.duration = 1.5f; ((EntityState)this).PlayAnimation("Body", "Spawn", "Spawn.playbackRate", base.duration, 0f); Util.PlaySound("sfx_gargoyle_spawn", ((EntityState)this).gameObject); EffectManager.SpawnEffect(BelmontAssets.gargoyleSpawnEffect, new EffectData { origin = ((EntityState)this).transform.position + Vector3.up * -0.5f, rotation = Quaternion.identity, scale = 1f }, false); } } public class ThrowFireball : BaseSkillState { public float baseDuration = 0.5f; public float force = 100f; public float damageCoefficient = 3f; private float duration; public override void OnEnter() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(0.5f); ((EntityState)this).PlayAnimation("Head, Override", "ThrowFireball", "Fireball.playbackRate", duration, 0f); Util.PlaySound("sfx_gargoyle_fire_blast", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/FireballsOnHit/MuzzleflashFireMeatBall.prefab").WaitForCompletion(), ((EntityState)this).gameObject, "MouthMuzzle", false); FireProjectile(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public void FireProjectile() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).isAuthority) { return; } Ray aimRay = ((BaseState)this).GetAimRay(); if (!((EntityState)this).characterBody.isPlayerControlled) { BullseyeSearch val = new BullseyeSearch { teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()), filterByLoS = false, searchOrigin = ((Ray)(ref aimRay)).origin, searchDirection = Random.onUnitSphere, sortMode = (SortMode)1, maxDistanceFilter = 80f, maxAngleFilter = 360f }; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); List<HurtBox> source = val.GetResults().ToList(); HurtBox val2 = source.FirstOrDefault(); if (Object.op_Implicit((Object)(object)val2)) { Vector3 val3 = ((Component)val2).transform.position - ((Ray)(ref aimRay)).origin; ((Ray)(ref aimRay)).direction = ((Vector3)(ref val3)).normalized; } } GameObject gargoyleFireball = Projectiles.gargoyleFireball; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) && ((EntityState)this).characterBody.inventory.GetItemCount(Items.MoreMissile) > 0) { float iCBMDamageMult = MainPlugin.GetICBMDamageMult(((EntityState)this).characterBody); Vector3 val4 = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction); Vector3 val5 = Vector3.Cross(((Ray)(ref aimRay)).direction, val4); Vector3 val6 = Quaternion.AngleAxis(-1.5f, val5) * ((Ray)(ref aimRay)).direction; Quaternion val7 = Quaternion.AngleAxis(1.5f, val5); Ray val8 = default(Ray); ((Ray)(ref val8))..ctor(((Ray)(ref aimRay)).origin, val6); for (int i = 0; i < 3; i++) { ProjectileManager.instance.FireProjectile(gargoyleFireball, ((Ray)(ref val8)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val8)).direction), ((EntityState)this).gameObject, iCBMDamageMult * ((BaseState)this).damageStat * damageCoefficient, force, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 65f, (DamageTypeCombo?)null); ((Ray)(ref val8)).direction = val7 * ((Ray)(ref val8)).direction; } } else { ProjectileManager.instance.FireProjectile(gargoyleFireball, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, force, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 65f, (DamageTypeCombo?)null); } } } public class ThrowHellfire : BaseSkillState { public float baseDuration = 0.5f; public float force = 100f; public float damageCoefficient = 0.9f; private float duration; public override void OnEnter() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(0.5f); ((EntityState)this).PlayAnimation("Head, Override", "ThrowFireball", "Fireball.playbackRate", duration, 0f); Util.PlaySound("sfx_gargoyle_fire_blast", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/FireballsOnHit/MuzzleflashFireMeatBall.prefab").WaitForCompletion(), ((EntityState)this).gameObject, "MouthMuzzle2", false); FireProjectile(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public void FireProjectile() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).isAuthority) { return; } Ray aimRay = ((BaseState)this).GetAimRay(); if (!((EntityState)this).characterBody.isPlayerControlled) { BullseyeSearch val = new BullseyeSearch { teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()), filterByLoS = false, searchOrigin = ((Ray)(ref aimRay)).origin, searchDirection = Random.onUnitSphere, sortMode = (SortMode)1, maxDistanceFilter = 80f, maxAngleFilter = 360f }; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); List<HurtBox> source = val.GetResults().ToList(); HurtBox val2 = source.FirstOrDefault(); if (Object.op_Implicit((Object)(object)val2)) { Vector3 val3 = ((Component)val2).transform.position - ((Ray)(ref aimRay)).origin; ((Ray)(ref aimRay)).direction = ((Vector3)(ref val3)).normalized; } } GameObject megaFireball = Projectiles.megaFireball; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) && ((EntityState)this).characterBody.inventory.GetItemCount(Items.MoreMissile) > 0) { float iCBMDamageMult = MainPlugin.GetICBMDamageMult(((EntityState)this).characterBody); Vector3 val4 = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction); Vector3 val5 = Vector3.Cross(((Ray)(ref aimRay)).direction, val4); Vector3 val6 = Quaternion.AngleAxis(-1.5f, val5) * ((Ray)(ref aimRay)).direction; Quaternion val7 = Quaternion.AngleAxis(1.5f, val5); Ray val8 = default(Ray); ((Ray)(ref val8))..ctor(((Ray)(ref aimRay)).origin, val6); for (int i = 0; i < 3; i++) { ProjectileManager.instance.FireProjectile(megaFireball, ((Ray)(ref val8)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val8)).direction), ((EntityState)this).gameObject, iCBMDamageMult * ((BaseState)this).damageStat * damageCoefficient, force, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 80f, (DamageTypeCombo?)null); ((Ray)(ref val8)).direction = val7 * ((Ray)(ref val8)).direction; } } else { ProjectileManager.instance.FireProjectile(megaFireball, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, force, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 80f, (DamageTypeCombo?)null); } } } } namespace BelmontMod.SkillStates.Emote { public class BaseEmote : BaseState { private CameraParamsOverrideHandle camOverrideHandle; private Animator animator; private ChildLocator childLocator; private float duration; private uint activePlayID; public LocalUser localUser; public override void OnEnter() { //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) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); childLocator = ((EntityState)this).GetModelChildLocator(); FindLocalUser(); ((EntityState)this).characterBody.hideCrosshair = true; camOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, BelmontCameraParams.EMOTE); } private void FindLocalUser() { if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return; } foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody) { localUser = readOnlyLocalUsers; break; } } } protected void PlayEmote(string animString, string soundString = "", float animDuration = 0f) { PlayEmote(animString, soundString, ((EntityState)this).GetModelAnimator(), animDuration); } protected void PlayEmote(string animString, string soundString, Animator animator, float animDuration = 0f) { if (animDuration >= 0f && duration != 0f) { animDuration = duration; } if (duration > 0f) { EntityState.PlayAnimationOnAnimator(animator, "Emote, Override", animString, "Emote.playbackRate", animDuration, 0f); } else { animator.SetFloat("Emote.playbackRate", 1f); EntityState.PlayAnimationOnAnimator(animator, "Emote, Override", animString); } if (!string.IsNullOrEmpty(soundString)) { activePlayID = Util.PlaySound(soundString, ((EntityState)this).gameObject); } } public override void Update() { ((EntityState)this).Update(); if (((EntityState)this).isAuthority) { CheckEmote<Rest>(Config.restKey); CheckEmote<Taunt>(Config.tauntKey); CheckEmote<Dance>(Config.danceKey); } } private void CheckEmote(KeyCode keybind, EntityState state) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(keybind) && !localUser.isUIFocused) { ((EntityState)this).outer.SetInterruptState(state, (InterruptPriority)0); } } private void CheckEmote<T>(ConfigEntry<KeyboardShortcut> keybind) where T : EntityState, new() { if (Config.GetKeyPressed(keybind)) { FindLocalUser(); if (localUser != null && !localUser.isUIFocused) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new T(), (InterruptPriority)0); } } } public override void FixedUpdate() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); bool flag = false; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { flag = true; } if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { if (((EntityState)this).inputBank.skill1.down) { flag = true; } if (((EntityState)this).inputBank.skill2.down) { flag = true; } if (((EntityState)this).inputBank.skill3.down) { flag = true; } if (((EntityState)this).inputBank.skill4.down) { flag = true; } if (((EntityState)this).inputBank.moveVector != Vector3.zero) { flag = true; } } if (duration > 0f && ((EntityState)this).fixedAge >= duration) { flag = true; } if (flag && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0045: 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) ((EntityState)this).OnExit(); ((EntityState)this).characterBody.hideCrosshair = false; ((EntityState)this).PlayAnimation("Emote, Override", "BufferEmpty"); if (activePlayID != 0) { AkSoundEngine.StopPlayingID(activePlayID); } ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.5f); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)0; } } public class Dance : BaseEmote { public override void OnEnter() { base.OnEnter(); PlayEmote("Dance"); } public override void OnExit() { base.OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform)) { BelmontAnimationEvents component = ((Component)((EntityState)this).modelLocator.modelTransform).GetComponent<BelmontAnimationEvents>(); if (Object.op_Implicit((Object)(object)component)) { component.EndTrails(); } } } } public class Rest : BaseEmote { public override void OnEnter() { base.OnEnter(); PlayEmote("Rest", "", 1.5f); } } public class Taunt : BaseEmote { public override void OnEnter() { base.OnEnter(); PlayEmote("Taunt", "", 1.5f); } } } namespace BelmontMod.SkillStates.Belmont { public class BaseBelmontSkillState : BaseSkillState { protected BelmontController belmont; protected virtual bool turningAllowed => true; protected virtual bool normalizeModel => false; protected virtual bool HasItem(ItemDef itemDef) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory)) { return ((EntityState)this).characterBody.inventory.GetItemCount(itemDef) > 0; } return false; } public override void OnEnter() { ValidateControllerReference(); ((BaseState)this).OnEnter(); if (!turningAllowed) { ((EntityState)this).characterDirection.turnSpeed = 0f; } if (normalizeModel) { ((EntityState)this).modelLocator.normalizeToFloor = true; } } public override void OnExit() { ((EntityState)this).OnExit(); if (!turningAllowed) { ((EntityState)this).characterDirection.turnSpeed = belmont.baseTurnSpeed; } if (normalizeModel) { ((EntityState)this).modelLocator.normalizeToFloor = false; } } protected void ValidateControllerReference() { belmont = ((EntityState)this).gameObject.GetComponent<BelmontController>(); } } public class BaseBelmontState : BaseState { protected BelmontController belmont; protected virtual bool HasItem(ItemDef itemDef) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory)) { return ((EntityState)this).characterBody.inventory.GetItemCount(itemDef) > 0; } return false; } public override void OnEnter() { ValidateControllerReference(); ((BaseState)this).OnEnter(); } protected void ValidateControllerReference() { belmont = ((EntityState)this).gameObject.GetComponent<BelmontController>(); } } internal class CarryPot { } public class Falling : BaseBelmontSkillState { public Vector3 overrideVelocity = Vector3.zero; protected Vector3 slipVector = Vector3.zero; private float stopwatch; private float previousAirControl; private bool shouldCancel; public override void OnEnter() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0038: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: 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_00d2: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: 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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: 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_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); slipVector = ((Vector3)(ref val)).normalized; previousAirControl = ((EntityState)this).characterMotor.airControl; ((EntityState)this).characterMotor.airControl = BaseLeap.airControl; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); Util.PlaySound("sfx_hunk_airdodge", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.isSprinting = true; direction.y = Mathf.Max(direction.y, 1.05f * BaseLeap.minimumY); Vector3 val2 = slipVector * (0.5f * BaseLeap.aimVelocity) * 12f; Vector3 val3 = Vector3.up * 0.75f * BaseLeap.upwardVelocity; Vector3 val4 = direction * (0.75f * BaseLeap.aimVelocity) * 12f; val4.x = 0f; val4.z = 0f; val = new Vector3(direction.x, 0f, direction.z); Vector3 val5 = ((Vector3)(ref val)).normalized * (1.1f * BaseLeap.forwardVelocity); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = val2 + val4 + val3 + val5; } if (overrideVelocity != Vector3.zero) { ((EntityState)this).characterMotor.velocity = overrideVelocity; } if (overrideVelocity.y >= 15f) { shouldCancel = true; } } public override void OnExit() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) base.OnExit(); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).characterMotor.airControl = previousAirControl; belmont.shouldCancelFreefall = false; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (belmont.shouldCancelFreefall) { if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } ((EntityState)this).PlayAnimation("FullBody, Override Soft", "BufferEmpty"); return; } if (stopwatch >= 0.1f && ((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded) { SetNextState(); } if (stopwatch >= 0.25f && shouldCancel && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } protected virtual void SetNextState() { ((EntityState)this).outer.SetNextState((EntityState)(object)new Roll()); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class MainState : GenericCharacterMain { private Animator animator; public LocalUser localUser; private BelmontController belmont; private MomentumController momentumController; private float groundSprintTimer; private bool wasSuperSprinting; private bool wasGrounded2; private bool isSliding; private GameObject slideEffectInstance; private uint slidePlayID; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); animator = ((BaseCharacterMain)this).modelAnimator; belmont = ((EntityState)this).GetComponent<BelmontController>(); momentumController = ((EntityState)this).GetComponent<MomentumController>(); FindLocalUser(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator)) { ((EntityState)this).characterBody.modelLocator.normalizeToFloor = false; } } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator)) { ((EntityState)this).characterBody.modelLocator.normalizeToFloor = false; } AkSoundEngine.StopPlayingID(slidePlayID); } public override void FixedUpdate() { //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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Expected O, but got Unknown //IL_021b: 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_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) if (belmont.isSwinging) { ((EntityState)this).inputBank.moveVector = Vector3.zero; } ((GenericCharacterMain)this).FixedUpdate(); if (((EntityState)this).inputBank.moveVector != Vector3.zero && ((EntityState)this).characterBody.isSprinting) { if (((BaseState)this).isGrounded) { groundSprintTimer += Time.fixedDeltaTime; } else if (groundSprintTimer >= 1f && wasGrounded2) { Util.PlaySound("sfx_belmont_jump", ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Body", "SprintJump", 0.05f); ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 6f); } } else { groundSprintTimer = 0f; } if (((EntityState)this).characterBody.outOfCombatStopwatch <= 0.1f) { groundSprintTimer = 0f; } wasGrounded2 = ((BaseState)this).isGrounded; if (Object.op_Implicit((Object)(object)animator)) { bool flag = false; if (!((EntityState)this).characterBody.outOfDanger || !((EntityState)this).characterBody.outOfCombat) { flag = true; } animator.SetBool("inCombat", flag); if (((BaseState)this).isGrounded) { animator.SetFloat("airBlend", 0f); } else { animator.SetFloat("airBlend", 1f); } animator.SetFloat("aimDir", ((EntityState)this).inputBank.aimDirection.y); } if (belmont.hasWingedBoots) { if (groundSprintTimer >= 1f) { if (!wasSuperSprinting) { Util.PlaySound("sfx_dante_sprint", ((EntityState)this).gameObject); EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterDirection.forward); val.origin = ((EntityState)this).characterBody.corePosition; EffectManager.SpawnEffect(BelmontAssets.dashEffectSimple, val, true); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(BelmontMod.Content.Survivors.Belmont.superSprintBuff); } } wasSuperSprinting = true; animator.SetBool("isSuperSprinting", true); } else { if (NetworkServer.active && wasSuperSprinting) { ((EntityState)this).characterBody.RemoveBuff(BelmontMod.Content.Survivors.Belmont.superSprintBuff); } wasSuperSprinting = false; animator.SetBool("isSuperSprinting", false); } wasGrounded2 = ((BaseState)this).isGrounded; HandleHover(); } belmont.wingedBootsActive = wasSuperSprinting; HandleSlide(); } private void HandleSlide() { if (groundSprintTimer >= 1f) { momentumController.shouldCalc = true; if (momentumController.desiredMomentum >= 0.5f) { isSliding = true; } else { isSliding = false; } } else { isSliding = false; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator)) { ((EntityState)this).characterBody.modelLocator.normalizeToFloor = isSliding; } animator.SetBool("isSliding", isSliding); if (isSliding) { if (!Object.op_Implicit((Object)(object)slideEffectInstance)) { if (Object.op_Implicit((Object)(object)SlideState.slideEffectPrefab)) { slideEffectInstance = Object.Instantiate<GameObject>(SlideState.slideEffectPrefab, ((BaseState)this).FindModelChild("Root")); } slidePlayID = Util.PlaySound("sfx_dante_slide_loop", ((EntityState)this).gameObject); } } else { if (Object.op_Implicit((Object)(object)slideEffectInstance)) { EntityState.Destroy((Object)(object)slideEffectInstance); } AkSoundEngine.StopPlayingID(slidePlayID); } } private void HandleHover() { } public override void Update() { ((GenericCharacterMain)this).Update(); if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded) { CheckEmote<Rest>(Config.restKey); CheckEmote<Taunt>(Config.tauntKey); CheckEmote<Dance>(Config.danceKey); } } private bool HasItem(ItemDef itemDef) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory)) { return ((EntityState)this).characterBody.inventory.GetItemCount(itemDef) > 0; } return false; } private void CheckEmote(KeyCode keybind, EntityState state) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(keybind) && !localUser.isUIFocused) { ((EntityState)this).outer.SetInterruptState(state, (InterruptPriority)0); } } private void CheckEmote<T>(ConfigEntry<KeyboardShortcut> keybind) where T : EntityState, new() { if (Config.GetKeyPressed(keybind)) { FindLocalUser(); if (localUser != null && !localUser.isUIFocused) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new T(), (InterruptPriority)0); } } } private void FindLocalUser() { if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return; } foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody) { localUser = readOnlyLocalUsers; break; } } } public override void ProcessJump() { //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Expected O, but got Unknown //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0355: 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_0367: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Expected O, but got Unknown //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: 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_03c5: Expected O, but got Unknown //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) if (!((BaseCharacterMain)this).hasCharacterMotor) { return; } bool flag = false; bool flag2 = false; if (!base.jumpInputReceived || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || ((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.maxJumpCount) { return; } groundSprintTimer = 0f; Util.PlaySound("sfx_belmont_jump", ((EntityState)this).gameObject); int itemCount = ((EntityState)this).characterBody.inventory.GetItemCount(Items.JumpBoost); float num = 1f; float num2 = 1f; if (((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.baseJumpCount) { flag = true; num = 1.5f; num2 = 1.5f; } else if (itemCount > 0 && ((EntityState)this).characterBody.isSprinting) { float num3 = ((EntityState)this).characterBody.acceleration * ((EntityState)this).characterMotor.airControl; if (((EntityState)this).characterBody.moveSpeed > 0f && num3 > 0f) { flag2 = true; float num4 = Mathf.Sqrt(10f * (float)itemCount / num3); float num5 = ((EntityState)this).characterBody.moveSpeed / num3; num = (num4 + num5) / num5; } } if (wasSuperSprinting) { float num6 = ((EntityState)this).characterBody.acceleration * ((EntityState)this).characterMotor.airControl; if (((EntityState)this).characterBody.moveSpeed > 0f && num6 > 0f) { flag2 = true; float num7 = Mathf.Sqrt(10f / num6); float num8 = ((EntityState)this).characterBody.moveSpeed / num6; num = (num7 + num8) / num8; } } GenericCharacterMain.ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, num, num2, false); if (((BaseCharacterMain)this).hasModelAnimator) { int layerIndex = ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("Body"); if (layerIndex >= 0) { if (((EntityState)this).characterBody.isSprinting) { if (Config.alternateAnimations.Value) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("ShitJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("SprintJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } } else if (Config.alternateAnimations.Value) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("ShitJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else if (((EntityState)this).characterMotor.jumpCount == 0) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Jump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Jump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } } } if (flag) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/FeatherEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition }, true); } else if (((EntityState)this).characterMotor.jumpCount > 0) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/CharacterLandImpact"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = ((EntityState)this).characterBody.radius }, true); } if (flag2) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/BoostJumpEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity) }, true); } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.jumpCount++; if (Object.op_Implicit((Object)(object)animator)) { float num9 = ((CharacterAnimatorWalkParamCalculator)(ref ((BaseCharacterMain)this).animatorWalkParamCalculator)).animatorWalkSpeed.y; float num10 = ((CharacterAnimatorWalkParamCalculator)(ref ((BaseCharacterMain)this).animatorWalkParamCalculator)).animatorWalkSpeed.x; if ((Mathf.Abs(num9) <= 0.45f && Mathf.Abs(num10) <= 0.45f) || ((EntityState)this).inputBank.moveVector == Vector3.zero) { num9 = 0f; num10 = 0f; } if (Mathf.Abs(num9) > Mathf.Abs(num10)) { num9 = ((!(num9 > 0f)) ? (-1f) : 1f); num10 = 0f; } else if (Mathf.Abs(num9) < Mathf.Abs(num10)) { num10 = ((!(num10 > 0f)) ? (-1f) : 1f); num9 = 0f; } animator.SetFloat("forwardSpeedCached", num10); animator.SetFloat("rightSpeedCached", num9); } } } public class Roll : BaseBelmontSkillState { protected Vector3 slipVector = Vector3.zero; public float duration = 1.1f; private bool peepee; private float coeff = 12f; protected override bool turningAllowed => false; protected override bool normalizeModel => true; public override void OnEnter() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0038: 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) base.OnEnter(); Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); slipVector = ((Vector3)(ref val)).normalized; ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((EntityState)this).PlayCrossfade("FullBody, Override Soft", "Roll", "Landing.playbackRate", duration * 1.2f, 0.05f); Util.PlaySound("sfx_belmont_landing", ((EntityState)this).gameObject); Util.PlaySound("sfx_belmont_cloth_foley", ((EntityState)this).gameObject); } public override void FixedUpdate() { //IL_009d: 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_00ae: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) if (peepee && ((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.jumpCount = 0; if (((ButtonState)(ref ((EntityState)this).inputBank.jump)).justPressed) { ((EntityState)this).PlayCrossfade("FullBody, Override", "BufferEmpty", 0.05f); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).outer.SetNextStateToMain(); return; } } else { ((EntityState)this).characterMotor.jumpCount = ((EntityState)this).characterBody.maxJumpCount; } ((EntityState)this).FixedUpdate(); ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterMotor.rootMotion = slipVector * (coeff * Time.fixedDeltaTime) * Mathf.Cos(((EntityState)this).fixedAge / duration * (MathF.PI / 2f)); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.forward = slipVector; } if (belmont.shouldCancelFreefall) { if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } ((EntityState)this).PlayAnimation("FullBody, Override Soft", "BufferEmpty"); return; } if (!peepee && ((EntityState)this).fixedAge >= 0.4f * duration) { peepee = true; coeff = 4f; ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); } if (((EntityState)this).fixedAge >= 0.55f * duration && ((EntityState)this).inputBank.moveVector != Vector3.zero) { ((EntityState)this).GetModelAnimator().SetTrigger("shouldCancel"); if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } else { if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } ((EntityState)this).inputBank.moveVector = Vector3.zero; } } public virtual void DampenVelocity() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.75f; } public override void OnExit() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) DampenVelocity(); ((EntityState)this).characterMotor.jumpCount = 0; base.OnExit(); if (((EntityState)this).isAuthority && ((EntityState)this).inputBank.moveVector != Vector3.zero) { ((EntityState)this).characterBody.isSprinting = true; } belmont.shouldCancelFreefall = false; if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.KillMoveSpeed, 0.25f); ((EntityState)this).characterBody.AddTimedBuff(Buffs.KillMoveSpeed, 0.375f); ((EntityState)this).characterBody.AddTimedBuff(Buffs.KillMoveSpeed, 0.5f); ((EntityState)this).characterBody.AddTimedBuff(Buffs.KillMoveSpeed, 0.625f); ((EntityState)this).characterBody.AddTimedBuff(Buffs.KillMoveSpeed, 0.75f); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (peepee) { return (InterruptPriority)0; } return (InterruptPriority)7; } } } namespace BelmontMod.SkillStates.Belmont.Whip { public class Crack : BaseBelmontSkillState { public HurtBox targetHurtbox; public float damageCoefficient = 7f; public float baseDuration = 1.9f; private float duration; private bool hasFired = false; private bool hasPlayedSound = false; private float targetTimer; private bool isCrit; private bool whipWasActive; private int swingIndex; private bool hasMorningStar; private float attackRecoil = 2f; private float attackTime = 0.32f; private bool isZap; private bool hasFagSoul => false; private bool zapReady => false; private Vector3 targetPosition { get { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing referen