Decompiled source of Ravager v1.6.0
plugins/public_ParticleSystem-Ravager/RedGuyMod.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.CaptainDefenseMatrixItem; using EntityStates.Commando; using EntityStates.Huntress; using EntityStates.ImpMonster; using HG; using HG.BlendableTypes; using JetBrains.Annotations; using KinematicCharacterController; using Microsoft.CodeAnalysis; using On.RoR2; using On.RoR2.UI; using On.RoR2.UI.MainMenu; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using RedGuyMod.Content; using RedGuyMod.Content.Components; using RedGuyMod.Content.Survivors; using RedGuyMod.Modules; using RedGuyMod.Modules.Achievements; using RedGuyMod.SkillStates; using RedGuyMod.SkillStates.BaseStates; using RedGuyMod.SkillStates.Emote; using RedGuyMod.SkillStates.Ravager; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CameraModes; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.EntityLogic; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2.UI.MainMenu; using TMPro; using ThreeEyedGames; 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("RedGuyMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("RedGuyMod")] [assembly: AssemblyTitle("RedGuyMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } internal class BodyInfo { 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 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 RavagerCameraParams { DEFAULT, AIM, DRAG, SLAM, CLING, BEAM, FAR, EMOTE } [CreateAssetMenu(fileName = "rsd", menuName = "ScriptableObjects/RavagerSkinDef", order = 1)] public class RavagerSkinDef : ScriptableObject { public string nameToken = ""; public Texture iconOverride; public GameObject basicSwingEffectPrefab; public GameObject bigSwingEffectPrefab; public GameObject leapEffectPrefab; public GameObject slashEffectPrefab; public GameObject bloodOrbEffectPrefab; public GameObject bloodBombEffectPrefab; public GameObject bloodRushActivationEffectPrefab; public Material bloodOrbOverlayMaterial; public Material bloodRushOverlayMaterial; public string consumeSoundString = ""; public string healSoundString = ""; public bool useAltAnimSet = false; public Material electricityMat; public Material swordElectricityMat; public Color glowColor = Color.red; } 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); } } internal class SkillDefInfo { public string skillName; public string skillNameToken; public string skillDescriptionToken; public string[] keywordTokens = new string[0]; public Sprite baseIcon; public Sprite empoweredIcon; 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, Sprite skillIcon2, SerializableEntityStateType activationState, string activationStateMachineName, InterruptPriority interruptPriority, bool isCombatSkill, float baseRechargeInterval) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) this.skillName = skillName; this.skillNameToken = skillNameToken; this.skillDescriptionToken = skillDescriptionToken; baseIcon = skillIcon; empoweredIcon = skillIcon2; 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, Sprite skillIcon2, SerializableEntityStateType activationState, string activationStateMachineName = "Weapon", bool agile = false) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) this.skillName = skillName; this.skillNameToken = skillNameToken; this.skillDescriptionToken = skillDescriptionToken; baseIcon = skillIcon; empoweredIcon = skillIcon2; 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" }; } } } 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); } } namespace RedGuyMod { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.rob.Ravager", "Ravager", "1.6.0")] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.rob.Ravager"; public const string MODNAME = "Ravager"; public const string MODVERSION = "1.6.0"; 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"); private void Awake() { instance = this; Files.PluginInfo = ((BaseUnityPlugin)this).Info; Config.myConfig = ((BaseUnityPlugin)this).Config; Log.Init(((BaseUnityPlugin)this).Logger); Config.ReadConfig(); Assets.PopulateAssets(); CameraParams.InitializeParams(); States.RegisterStates(); Projectiles.RegisterProjectiles(); new LanguageTokens(); ItemDisplays.PopulateDisplays(); NetworkingAPI.RegisterMessageType<SyncBloodWell>(); NetworkingAPI.RegisterMessageType<SyncOrbOverlay>(); NetworkingAPI.RegisterMessageType<SyncRevive>(); new RedGuy().CreateCharacter(); Hook(); new ContentPacks().Initialize(); ContentManager.onContentPacksAssigned += LateSetup; } private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj) { RedGuy.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 CharacterModel.UpdateOverlays += new hook_UpdateOverlays(CharacterModel_UpdateOverlays); CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); HurtBox.OnEnable += new hook_OnEnable(HurtBox_OnEnable); HurtBox.OnDisable += new hook_OnDisable(HurtBox_OnDisable); } 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)) { if (self.HasBuff(RedGuy.grabbedBuff)) { self.damage = 0f; } if (self.HasBuff(RedGuy.clingDefendBuff)) { self.armor += 500f; } if (self.HasBuff(RedGuy.bloodRushBuff)) { self.moveSpeed += 4f; } } } private void CharacterModel_UpdateOverlays(orig_UpdateOverlays orig, CharacterModel self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body) && self.body.baseNameToken == RedGuy.bodyNameToken) { RedGuyController component = ((Component)self.body).GetComponent<RedGuyController>(); if (Object.op_Implicit((Object)(object)component) && component.draining && !Object.op_Implicit((Object)(object)((Component)self.body).GetComponent<RavagerOverlayTracker>())) { RavagerOverlayTracker ravagerOverlayTracker = ((Component)self.body).gameObject.AddComponent<RavagerOverlayTracker>(); ravagerOverlayTracker.body = self.body; TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)self).gameObject); val.duration = float.PositiveInfinity; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.animateShaderAlpha = true; val.destroyComponentOnEnd = true; val.originalMaterial = Assets.bloodOverlayMat; val.AddToCharacterModel(self); ravagerOverlayTracker.overlay = val; ravagerOverlayTracker.penis = component; } } } public static float GetICBMDamageMult(CharacterBody body) { float num = 1f; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory)) { int num2 = body.inventory.GetItemCountEffective(Items.MoreMissile) - 1; if (num2 > 0) { num += (float)num2 * 0.5f; } } return num; } } internal static class RavagerSkinCatalog { internal static RavagerSkinDef[] skinDefs = new RavagerSkinDef[0]; internal static void AddSkin(RavagerSkinDef skinDef) { Array.Resize(ref skinDefs, skinDefs.Length + 1); int num = skinDefs.Length - 1; skinDefs[num] = skinDef; } internal static RavagerSkinDef GetSkin(int index) { return skinDefs[index]; } internal static RavagerSkinDef GetSkin(string nameToken) { for (int i = 0; i < skinDefs.Length; i++) { if (Object.op_Implicit((Object)(object)skinDefs[i]) && skinDefs[i].nameToken == nameToken) { return skinDefs[i]; } } return skinDefs[0]; } } } namespace RedGuyMod.SkillStates { public class ConsumedDeath : GenericCharacterDeath { public override void OnEnter() { if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform)) { Object.Destroy((Object)(object)((Component)((EntityState)this).modelLocator.modelTransform).gameObject); } ((GenericCharacterDeath)this).OnEnter(); } } 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_00dc: 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; Transform[] array = bones; foreach (Transform val2 in array) { 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_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; } } } namespace RedGuyMod.SkillStates.Ravager { public class BaseRavagerSkillState : BaseSkillState { protected RedGuyController penis; protected bool empowered; public override void OnEnter() { RefreshEmpoweredState(); ((BaseState)this).OnEnter(); if (Object.op_Implicit((Object)(object)penis) && penis.draining && penis.passive.isAltBloodWell) { penis.meter -= 10f; } } protected void RefreshEmpoweredState() { if (!Object.op_Implicit((Object)(object)penis)) { penis = ((EntityState)this).gameObject.GetComponent<RedGuyController>(); } if (Object.op_Implicit((Object)(object)penis)) { empowered = penis.draining; } } } public class BaseRavagerState : BaseState { protected RedGuyController penis; public override void OnEnter() { penis = ((EntityState)this).gameObject.GetComponent<RedGuyController>(); ((BaseState)this).OnEnter(); } } public class Blink : BaseRavagerState { public float duration = 0.15f; public float speedCoefficient = 10f; public float healthCostFraction = 0.05f; private Transform modelTransform; private float stopwatch; private Vector3 blinkVector = Vector3.zero; private CharacterModel characterModel; private HurtBoxGroup hurtboxGroup; public override void OnEnter() { //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0158: 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_0175: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); Util.PlaySound(BlinkState.beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); hurtboxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel val = characterModel; int invisibilityCount = val.invisibilityCount; val.invisibilityCount = invisibilityCount + 1; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup obj = hurtboxGroup; int invisibilityCount = obj.hurtBoxesDeactivatorCounter; obj.hurtBoxesDeactivatorCounter = invisibilityCount + 1; } blinkVector = GetBlinkVector(); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).healthComponent) && !penis.draining) { DamageInfo val2 = new DamageInfo(); val2.damage = ((EntityState)this).healthComponent.combinedHealth * healthCostFraction; val2.position = ((EntityState)this).characterBody.corePosition; val2.force = Vector3.zero; val2.damageColorIndex = (DamageColorIndex)0; val2.crit = false; val2.attacker = null; val2.inflictor = null; val2.damageType = DamageTypeCombo.op_Implicit((DamageType)3); val2.procCoefficient = 0f; val2.procChainMask = default(ProcChainMask); ((EntityState)this).healthComponent.TakeDamage(val2); } } protected virtual Vector3 GetBlinkVector() { //IL_0007: 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_000f: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).inputBank.aimDirection; } private void CreateBlinkEffect(Vector3 origin) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(blinkVector); val.origin = origin; EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false); } public override void FixedUpdate() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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_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_0079: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += blinkVector * (((BaseState)this).moveSpeedStat * speedCoefficient * Time.fixedDeltaTime); } if (stopwatch >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).outer.destroying) { CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val.duration = 0.6f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Imp/matImpDissolve.mat").WaitForCompletion(); val.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>()); } } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel val2 = characterModel; int invisibilityCount = val2.invisibilityCount; val2.invisibilityCount = invisibilityCount - 1; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup obj = hurtboxGroup; int invisibilityCount = obj.hurtBoxesDeactivatorCounter; obj.hurtBoxesDeactivatorCounter = invisibilityCount - 1; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class BlinkBig : WallJumpBig { public float charge; private Transform modelTransform; private CharacterModel characterModel; public override void OnEnter() { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) duration = 0.35f; base.OnEnter(); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel val = characterModel; int invisibilityCount = val.invisibilityCount; val.invisibilityCount = invisibilityCount + 1; } ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).healthComponent) && charge > 0f) { DamageInfo val2 = new DamageInfo(); val2.damage = ((EntityState)this).healthComponent.fullCombinedHealth * Util.Remap(charge, 0f, 1f, 0f, 0.1f); val2.position = ((EntityState)this).characterBody.corePosition; val2.force = Vector3.zero; val2.damageColorIndex = (DamageColorIndex)0; val2.crit = false; val2.attacker = null; val2.inflictor = null; val2.damageType = DamageTypeCombo.op_Implicit((DamageType)3); val2.procCoefficient = 0f; val2.procChainMask = default(ProcChainMask); ((EntityState)this).healthComponent.TakeDamage(val2); } } public override void OnExit() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Expected O, but got Unknown //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((EntityState)this).PlayAnimation("FullBody, Override Soft", "Blink"); Util.PlaySound("sfx_ravager_sonido", ((EntityState)this).gameObject); base.OnExit(); EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(-jumpDir); val.origin = Util.GetCorePosition(((EntityState)this).gameObject); EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false); if (!((BaseState)this).isGrounded) { ((EntityState)this).characterMotor.velocity = Vector3.up * 10f; } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel val2 = characterModel; int invisibilityCount = val2.invisibilityCount; val2.invisibilityCount = invisibilityCount - 1; } if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance val3 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val3.duration = 0.5f; val3.animateShaderAlpha = true; val3.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val3.destroyComponentOnEnd = true; val3.originalMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Imp/matImpDissolve.mat").WaitForCompletion(); val3.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>()); } if (charge >= 1f && penis.draining) { if (((EntityState)this).isAuthority) { Result val4 = new BlastAttack { attacker = ((EntityState)this).gameObject, procChainMask = default(ProcChainMask), impactEffect = (EffectIndex)(-1), losType = (LoSType)0, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)32), procCoefficient = 1f, bonusForce = 400f * Vector3.up, baseForce = 2000f, baseDamage = 6f * ((BaseState)this).damageStat, falloffModel = (FalloffModel)0, radius = 16f, position = ((EntityState)this).characterBody.corePosition, attackerFiltering = (AttackerFiltering)2, teamIndex = ((BaseState)this).GetTeam(), inflictor = ((EntityState)this).gameObject, crit = ((BaseState)this).RollCrit() }.Fire(); } Util.PlaySound("sfx_ravager_explosion", ((EntityState)this).gameObject); EffectManager.SpawnEffect(penis.skinDef.bloodRushActivationEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position + Vector3.up * 1.8f, rotation = Quaternion.identity, scale = 1f }, false); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)3; } } public class BossGrab : BaseRavagerSkillState { public HealthComponent target; private int step; private float stopwatch; private float duration; public override void OnEnter() { base.OnEnter(); ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 24f); penis.RefreshBlink(); Util.PlaySound("sfx_ravager_grab", ((EntityState)this).gameObject); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } ((EntityState)this).PlayAnimation("FullBody, Override", "GrabBoss"); if (Object.op_Implicit((Object)(object)target)) { ForceFlinch(target.body); } } public override void FixedUpdate() { //IL_0152: 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_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; ((BaseState)this).StartAimMode(0.5f, false); switch (step) { case 0: if (((BaseState)this).isGrounded) { if (((EntityState)this).characterMotor.velocity.y <= -8f) { ((EntityState)this).characterMotor.velocity.y += -125f * Time.fixedDeltaTime; } else { ((EntityState)this).characterMotor.velocity.y += -60f * Time.fixedDeltaTime; } Util.PlaySound("sfx_ravager_landing", ((EntityState)this).gameObject); EffectManager.SpawnEffect(Assets.groundImpactEffect, new EffectData { origin = ((EntityState)this).transform.position, rotation = Quaternion.identity, scale = 1f }, false); step++; stopwatch = 0f; duration = 3.2f; ((EntityState)this).PlayAnimation("FullBody, Override", "GrabBossLand", "Grab.playbackRate", duration, 0f); } break; case 1: ((EntityState)this).characterMotor.velocity = Vector3.zero; if (stopwatch >= 0.76f * duration) { step++; ThrowTarget(); } break; case 2: ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).isAuthority && stopwatch >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } break; } } public override void OnExit() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((EntityState)this).OnExit(); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } if (Object.op_Implicit((Object)(object)target)) { ((Component)target).GetComponent<GrabController>().Throw(((EntityState)this).characterDirection.forward, ((EntityState)this).characterBody.corePosition + ((EntityState)this).characterDirection.forward * 1.5f); } } public void ThrowTarget() { //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) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) ((Component)target).GetComponent<GrabController>().Throw(((EntityState)this).characterDirection.forward, ((EntityState)this).characterBody.corePosition + ((EntityState)this).characterDirection.forward * 1.5f); ((Component)target).gameObject.AddComponent<SlamComponent>().attackerBody = ((EntityState)this).characterBody; target = 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; } protected virtual void ForceFlinch(CharacterBody body) { if (!Util.HasEffectiveAuthority(((Component)body).gameObject)) { return; } EntityStateMachine[] components = ((Component)target).GetComponents<EntityStateMachine>(); EntityStateMachine[] array = components; foreach (EntityStateMachine val in array) { if (val.customName == "Body") { val.SetNextState((EntityState)(object)new FakeStun { duration = 3.2f }); } else { val.SetNextStateToMain(); } } } } public class BossGrabAlt : BaseRavagerSkillState { public HealthComponent target; public float damageCoefficient; public bool shouldThrow; private int step; private float stopwatch; private float duration; private CameraParamsOverrideHandle camParamsOverrideHandle; public override void OnEnter() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 24f); penis.RefreshBlink(); Util.PlaySound("sfx_ravager_grab", ((EntityState)this).gameObject); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.ArmorBoost); } camParamsOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, RavagerCameraParams.FAR); penis.holdingBoss = true; ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((EntityState)this).PlayAnimation("FullBody, Override", "GrabBoss"); } public override void FixedUpdate() { //IL_00c7: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; ((BaseState)this).StartAimMode(0.5f, false); switch (step) { case 0: if (((EntityState)this).characterMotor.velocity.y <= -8f) { ((EntityState)this).characterMotor.velocity.y += -45f * Time.fixedDeltaTime; } else { ((EntityState)this).characterMotor.velocity.y += -30f * Time.fixedDeltaTime; } if (((BaseState)this).isGrounded) { Util.PlaySound("sfx_ravager_landing", ((EntityState)this).gameObject); EffectManager.SpawnEffect(Assets.bossSlamImpact, new EffectData { origin = ((EntityState)this).transform.position, rotation = Quaternion.identity, scale = 1f }, false); step++; stopwatch = 0f; duration = 0.6f; ((EntityState)this).PlayAnimation("FullBody, Override", "GrabBossLandAlt", "Grab.playbackRate", duration, 0f); if (((EntityState)this).isAuthority) { Result val = new BlastAttack { attacker = ((EntityState)this).gameObject, procChainMask = default(ProcChainMask), impactEffect = (EffectIndex)(-1), losType = (LoSType)0, damageColorIndex = (DamageColorIndex)5, damageType = (DamageTypeCombo.op_Implicit((DamageType)32) | DamageTypeCombo.GenericSpecial), procCoefficient = 1f, bonusForce = DashGrab.upForce * Vector3.up, baseForce = DashGrab.launchForce, baseDamage = damageCoefficient * ((BaseState)this).damageStat, falloffModel = (FalloffModel)0, radius = 20f, position = ((Component)target.body.mainHurtBox).transform.position, attackerFiltering = (AttackerFiltering)2, teamIndex = ((BaseState)this).GetTeam(), inflictor = ((EntityState)this).gameObject, crit = ((BaseState)this).RollCrit() }.Fire(); } ThrowTarget(); ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); } break; case 1: if (((EntityState)this).isAuthority && stopwatch >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } break; } } public override void OnExit() { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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_0067: 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_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) ((EntityState)this).OnExit(); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.ArmorBoost); } penis.holdingBoss = false; if (Object.op_Implicit((Object)(object)target)) { ((Component)target).GetComponent<GrabController>().Throw(((EntityState)this).characterDirection.forward, ((EntityState)this).characterBody.corePosition + ((EntityState)this).characterDirection.forward * 1.5f + Vector3.up); } ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camParamsOverrideHandle, 0.2f); ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); } public void ThrowTarget() { //IL_006c: 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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_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_0047: 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) if (shouldThrow) { ((Component)target).GetComponent<GrabController>().Throw(((EntityState)this).characterDirection.forward, ((EntityState)this).characterBody.corePosition + ((EntityState)this).characterDirection.forward * 1.5f + Vector3.up); } else { ((Component)target).GetComponent<GrabController>().Release(((EntityState)this).transform.position); } target = null; penis.holdingBoss = false; } 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 ChargeBeam : BaseRavagerSkillState { public float baseDuration = 30f; public static float maxDamageCoefficient = 24f; public static float minDamageCoefficient = 5f; public float minRadius = 0.1f; public float maxRadius = 14f; private float duration; private float stopwatch; private GameObject chargeEffectInstance; private CameraParamsOverrideHandle camParamsOverrideHandle; private uint playId; private bool isCharged; private Animator animator; private float fuckMyAss; private OverrideRequest crosshairOverrideRequest; private bool allySucc; protected GameObject areaIndicatorInstance { get; set; } private float charge => Util.Remap(Mathf.Clamp(stopwatch + (float)((EntityState)this).characterBody.GetBuffCount(RedGuy.projectileEatedBuff) * 1.25f, 0f, duration), 0f, duration, 0f, 1f); public override void OnEnter() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (Object.op_Implicit((Object)(object)penis)) { penis.projectilesDeleted = 0; } duration = baseDuration / ((BaseState)this).attackSpeedStat; camParamsOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, RavagerCameraParams.AIM, 1f); allySucc = Config.allySucc.Value; animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayCrossfade("Gesture, Override", "ChargeBeam", "Beam.playbackRate", duration * 0.15f, 0.05f); chargeEffectInstance = Object.Instantiate<GameObject>(Assets.beamChargeEffect); chargeEffectInstance.transform.parent = ((BaseState)this).FindModelChild("HandL"); chargeEffectInstance.transform.localPosition = new Vector3(-0.5f, 0f, -0.2f); chargeEffectInstance.transform.localRotation = Quaternion.identity; if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.Slow50); } if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab) && ((EntityState)this).isAuthority) { areaIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab); areaIndicatorInstance.transform.localScale = Vector3.zero; } crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, Assets.beamCrosshair, (OverridePriority)1); Util.PlaySound("sfx_ravager_charge_beam", ((EntityState)this).gameObject); playId = Util.PlaySound("sfx_ravager_beam_loop", ((EntityState)this).gameObject); } public override void OnExit() { //IL_0064: 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) ((EntityState)this).OnExit(); if (charge < 0.5f) { ((EntityState)this).PlayAnimation("Gesture, Override", "FireBeam", "Beam.playbackRate", 1f, 0f); } if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); } ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camParamsOverrideHandle, 0.2f); if (crosshairOverrideRequest != null) { crosshairOverrideRequest.Dispose(); } if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50); int buffCount = ((EntityState)this).characterBody.GetBuffCount(RedGuy.projectileEatedBuff); for (int i = 0; i < buffCount; i++) { ((EntityState)this).characterBody.RemoveBuff(RedGuy.projectileEatedBuff); } } AkSoundEngine.StopPlayingID(playId); penis.projectilesDeleted = 0; } public override void Update() { ((EntityState)this).Update(); UpdateAreaIndicator(); } public override void FixedUpdate() { //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (empowered) { stopwatch += 10f * Time.fixedDeltaTime; } ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; ((BaseState)this).StartAimMode(0.5f, false); ((EntityState)this).characterBody.isSprinting = false; if (((EntityState)this).isAuthority) { if (((ButtonState)(ref ((EntityState)this).inputBank.skill1)).justPressed) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireBullet { charge = charge }); return; } if (((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed) { ThrowOrb(charge); ((EntityState)this).outer.SetNextState((EntityState)(object)new ThrowOrb()); return; } } if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { float num = Util.Remap(charge, 0f, 1f, minRadius, maxRadius); areaIndicatorInstance.transform.localScale = new Vector3(num, num, num); } if (!isCharged && charge >= 1f) { isCharged = true; Util.PlaySound("sfx_ravager_beam_maxcharge", ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Gesture, Override", "ChargeBeamMax", "Beam.playbackRate", 1f, 0.05f); } CheckForProjectiles(); chargeEffectInstance.transform.localScale = Vector3.one * Util.Remap(charge, 0f, 1f, 0f, 2f); penis.chargeValue = charge; if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill3.down) { FireBeam(); } } private void UpdateAreaIndicator() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { float num = 3000f; Ray aimRay = ((BaseState)this).GetAimRay(); RaycastHit val = default(RaycastHit); if (Physics.Raycast(aimRay, ref val, num, LayerMask.op_Implicit(CommonMasks.bullet))) { areaIndicatorInstance.transform.position = ((RaycastHit)(ref val)).point; areaIndicatorInstance.transform.up = ((RaycastHit)(ref val)).normal; } else { areaIndicatorInstance.transform.position = ((Ray)(ref aimRay)).GetPoint(num); areaIndicatorInstance.transform.up = -((Ray)(ref aimRay)).direction; } if (((EntityState)this).isAuthority) { areaIndicatorInstance.SetActive(((EntityState)this).inputBank.skill2.down); } } } protected virtual void EatProjectile(ProjectileController pc) { //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown Util.PlaySound("sfx_ravager_beam_consume", ((Component)pc).gameObject); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff); penis.projectilesDeleted++; if (((EntityState)this).fixedAge <= 0.5f) { ((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff); penis.projectilesDeleted++; ((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff); penis.projectilesDeleted++; ((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff); penis.projectilesDeleted++; } Object.Destroy((Object)(object)((Component)pc).gameObject); if (Object.op_Implicit((Object)(object)DefenseMatrixOn.tracerEffectPrefab)) { EffectData val = new EffectData { origin = chargeEffectInstance.transform.position, start = ((Component)pc).transform.position }; EffectManager.SpawnEffect(DefenseMatrixOn.tracerEffectPrefab, val, true); } } } protected virtual void CheckForProjectiles() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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) Collider[] array = Physics.OverlapSphere(chargeEffectInstance.transform.position, 12f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.projectile)).mask)); for (int i = 0; i < array.Length; i++) { ProjectileController componentInParent = ((Component)array[i]).GetComponentInParent<ProjectileController>(); if (!Object.op_Implicit((Object)(object)componentInParent) || !((Object)(object)componentInParent.owner != (Object)(object)((EntityState)this).gameObject)) { continue; } if (!allySucc) { if (componentInParent.teamFilter.teamIndex != ((BaseState)this).GetTeam()) { EatProjectile(componentInParent); } } else { EatProjectile(componentInParent); } } } protected virtual void FireBeam() { if (charge >= 0.5f) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireBeam { charge = charge }); } else { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireBullet { charge = charge }); } } private void ThrowOrb(float storedCharge) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) penis.lastChargeAmount = storedCharge; if (((EntityState)this).isAuthority) { float num = Util.Remap(storedCharge, 0f, 1f, minDamageCoefficient, maxDamageCoefficient); Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager instance = ProjectileManager.instance; FireProjectileInfo val = new FireProjectileInfo { crit = ((BaseState)this).RollCrit(), damage = num * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, force = 4000f, owner = ((EntityState)this).gameObject, position = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * 0.5f, procChainMask = default(ProcChainMask), projectilePrefab = Projectiles.orbBomb, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction) }; ((FireProjectileInfo)(ref val)).speedOverride = 60f; val._speedOverride = 60f; val.useFuseOverride = false; val.useSpeedOverride = true; instance.FireProjectileServer(val, (NetworkConnection)null, (ushort)0, 0.0); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)3; } } public class ChargeBlink : ChargeJump { private Transform modelTransform; private GameObject predictionEffectInstance; public override void OnEnter() { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) duration = 0.6f; base.OnEnter(); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val.duration = duration; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); val.destroyComponentOnEnd = true; val.originalMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Imp/matImpDissolve.mat").WaitForCompletion(); val.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>()); } if (((EntityState)this).isAuthority) { predictionEffectInstance = Object.Instantiate<GameObject>(Assets.blinkPredictionEffect); } } public override void OnExit() { base.OnExit(); if (!Object.op_Implicit((Object)(object)predictionEffectInstance)) { return; } ParticleSystem[] componentsInChildren = predictionEffectInstance.GetComponentsInChildren<ParticleSystem>(); ParticleSystem[] array = componentsInChildren; foreach (ParticleSystem val in array) { if (Object.op_Implicit((Object)(object)val)) { val.Stop(); } } Object.Destroy((Object)(object)predictionEffectInstance, 5f); } public override void FixedUpdate() { //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) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; if (Object.op_Implicit((Object)(object)predictionEffectInstance)) { Ray aimRay = ((BaseState)this).GetAimRay(); float num = Mathf.Clamp(((EntityState)this).characterBody.moveSpeed, 1f, 18f); float num2 = Mathf.Clamp01(Util.Remap(((EntityState)this).fixedAge, 0f, duration, 0f, 1f)); float num3 = 0.35f; float num4 = (jumpForce = Util.Remap(num2, 0f, 1f, 0.1773399f, 0.37334976f) * ((EntityState)this).characterBody.jumpPower * num); Vector3 position = ((EntityState)this).transform.position + ((Ray)(ref aimRay)).direction * (jumpForce * 1.5f * num3); predictionEffectInstance.transform.position = position; } } protected override void PlayAnim() { ((EntityState)this).PlayCrossfade("Body", "BlinkCharge", "Jump.playbackRate", duration, 0.1f); } protected override void SetJumpTime() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) jumpTime = 0.5f; EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(jumpDir); val.origin = Util.GetCorePosition(((EntityState)this).gameObject); EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false); } protected override void NextState() { //IL_000e: 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) ((EntityState)this).outer.SetNextState((EntityState)(object)new BlinkBig { jumpDir = jumpDir, jumpForce = jumpForce * 1.5f, charge = Util.Remap(((EntityState)this).fixedAge, 0f, duration, 0f, 1f) }); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)3; } } public class ChargeJump : BaseRavagerState { public float duration = 0.65f; public bool hopoo = false; private Vector3 origin; private ParticleSystem x1; private ParticleSystem x2; protected float jumpTime; private bool hasJumped; protected Vector3 jumpDir; protected float jumpForce; private bool isSliding; private uint playID; private bool permaCling; private Animator animator; private bool snapped; 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) base.OnEnter(); origin = ((EntityState)this).transform.position; ((EntityState)this).PlayAnimation("FullBody, Override Soft", "BufferEmpty"); permaCling = Config.permanentCling.Value; penis.isWallClinging = true; penis.skibidi = true; animator = ((EntityState)this).GetModelAnimator(); SnapToGround(); PlayAnim(); x1 = ((Component)((BaseState)this).FindModelChild("FootChargeL")).gameObject.GetComponent<ParticleSystem>(); x2 = ((Component)((BaseState)this).FindModelChild("FootChargeR")).gameObject.GetComponent<ParticleSystem>(); x1.Play(); x2.Play(); if (!Object.op_Implicit((Object)(object)penis) || !Object.op_Implicit((Object)(object)penis.skinDef) || penis.skinDef.glowColor.a != 0f) { playID = Util.PlaySound("sfx_ravager_charge_jump", ((EntityState)this).gameObject); } penis.IncrementWallJump(); } private void SnapToGround() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) RaycastHit val = default(RaycastHit); if (Physics.Raycast(origin, Vector3.down, ref val, 3f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { snapped = true; } } protected virtual void PlayAnim() { if (hopoo) { ((EntityState)this).PlayCrossfade("Body", "JumpChargeHopoo", "Jump.playbackRate", duration, 0.1f); } else { ((EntityState)this).PlayCrossfade("Body", "JumpCharge", "Jump.playbackRate", duration, 0.1f); } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("Body", "AscendDescend"); penis.isWallClinging = false; x1.Stop(); x2.Stop(); AkSoundEngine.StopPlayingID(playID); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)3; } public override void FixedUpdate() { //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Expected O, but got Unknown ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)animator)) { if (((BaseState)this).isGrounded || snapped) { animator.SetFloat("airBlend", 0f); } else { animator.SetFloat("airBlend", 1f); } } if (hasJumped) { jumpTime -= Time.fixedDeltaTime; if (jumpTime <= 0f) { ((EntityState)this).outer.SetNextStateToMain(); } else { ((EntityState)this).characterMotor.velocity = jumpDir * jumpForce; } if (((BaseState)this).isGrounded && !isSliding) { ((EntityState)this).PlayAnimation("Body", "Sprint"); ((EntityState)this).PlayAnimation("FullBody, Override Soft", "Slide"); isSliding = true; } ((EntityState)this).characterDirection.moveVector = jumpDir; } else { if (!((EntityState)this).isAuthority) { return; } ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(origin, true); ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).inputBank.skill1.down) { EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon").SetInterruptState((EntityState)(object)new ChargeSlash(), (InterruptPriority)1); } if ((!(((EntityState)this).fixedAge >= duration) || permaCling) && ((EntityState)this).inputBank.jump.down) { return; } x1.Stop(); x2.Stop(); if (((EntityState)this).fixedAge <= 0.2f) { GenericCharacterMain.ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, 1.6f, 1.5f, false); ((EntityState)this).outer.SetNextState((EntityState)(object)new WallJumpSmall()); return; } ((EntityState)this).characterBody.isSprinting = true; float num = 15f; ((BaseState)this).AddRecoil(-1f * num, -2f * num, -0.5f * num, 0.5f * num); float num2 = Mathf.Clamp01(Util.Remap(((EntityState)this).fixedAge, 0f, duration, 0f, 1f)); Ray aimRay = ((BaseState)this).GetAimRay(); jumpDir = ((Ray)(ref aimRay)).direction; float num3 = Mathf.Clamp(((EntityState)this).characterBody.moveSpeed, 1f, 18f); jumpForce = Util.Remap(num2, 0f, 1f, 0.1773399f, 0.37334976f) * ((EntityState)this).characterBody.jumpPower * num3; ((EntityState)this).characterMotor.velocity = jumpDir * jumpForce; hasJumped = true; SetJumpTime(); if (hopoo) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/FeatherEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition }, true); } NextState(); } } protected virtual void SetJumpTime() { //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_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown jumpTime = 0.25f; EffectData val = new EffectData { origin = ((EntityState)this).transform.position + Vector3.up * 0.75f }; Ray aimRay = ((BaseState)this).GetAimRay(); val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.scale = 1f; EffectData val2 = val; EffectManager.SpawnEffect(penis.skinDef.leapEffectPrefab, val2, true); } protected virtual void NextState() { //IL_000e: 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) ((EntityState)this).outer.SetNextState((EntityState)(object)new WallJumpBig { jumpDir = jumpDir, jumpForce = jumpForce }); } } public class ChargeSlash : BaseRavagerSkillState { public override void OnEnter() { base.OnEnter(); ((EntityState)this).PlayCrossfade("Gesture, Override", "ChargeSlash", "Slash.playbackRate", 0.3f, 0.1f); Util.PlaySound("sfx_ravager_foley_01", ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((!((EntityState)this).inputBank.skill1.down && ((EntityState)this).fixedAge >= 0.1f) || (((BaseState)this).isGrounded && ((EntityState)this).fixedAge >= 1.25f)) && !penis.isWallClinging) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ThrowSlash()); } } 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 Cling : GenericCharacterMain { public HurtBox targetHurtbox; public Vector3 offset; public GameObject anchor; private Transform modelTransform; private RedGuyController penis; private CameraParamsOverrideHandle camParamsOverrideHandle; private OverrideRequest crosshairOverrideRequest; private bool cancelling; public override void OnEnter() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnEnter(); ((Behaviour)((EntityState)this).characterDirection).enabled = false; ((Behaviour)((EntityState)this).modelLocator).enabled = false; modelTransform = ((EntityState)this).GetModelTransform(); penis = ((EntityState)this).GetComponent<RedGuyController>(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.ArmorBoost); } penis.clingTimer = 8f; ((EntityState)this).skillLocator.primary.SetSkillOverride((object)this, RedGuy.clingSlashSkillDef, (SkillOverridePriority)4); ((EntityState)this).skillLocator.secondary.SetSkillOverride((object)this, RedGuy.clingStabSkillDef, (SkillOverridePriority)4); if (((EntityState)this).skillLocator.utility.skillDef.skillNameToken == RedGuy.healNameToken) { ((EntityState)this).skillLocator.utility.SetSkillOverride((object)this, RedGuy.clingHealSkillDef, (SkillOverridePriority)4); } else { ((EntityState)this).skillLocator.utility.SetSkillOverride((object)this, RedGuy.clingBeamSkillDef, (SkillOverridePriority)4); } camParamsOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, RavagerCameraParams.CLING, 1f); crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, Assets.clingCrosshair, (OverridePriority)1); ((EntityState)this).gameObject.layer = LayerIndex.ignoreRaycast.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); } public override void OnExit() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((GenericCharacterMain)this).OnExit(); ((Behaviour)((EntityState)this).characterDirection).enabled = true; ((Behaviour)((EntityState)this).modelLocator).enabled = true; penis.clingTimer = 0f; if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.ArmorBoost); } ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camParamsOverrideHandle, 0.2f); if (crosshairOverrideRequest != null) { crosshairOverrideRequest.Dispose(); } ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)this, RedGuy.clingSlashSkillDef, (SkillOverridePriority)4); ((EntityState)this).skillLocator.secondary.UnsetSkillOverride((object)this, RedGuy.clingStabSkillDef, (SkillOverridePriority)4); if (((EntityState)this).skillLocator.utility.skillDef.skillNameToken == RedGuy.healNameToken) { ((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)this, RedGuy.clingHealSkillDef, (SkillOverridePriority)4); } else { ((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)this, RedGuy.clingBeamSkillDef, (SkillOverridePriority)4); } } public override bool CanExecuteSkill(GenericSkill skillSlot) { if ((Object)(object)skillSlot == (Object)(object)((EntityState)this).skillLocator.special) { return false; } return ((GenericCharacterMain)this).CanExecuteSkill(skillSlot); } public override void HandleMovements() { } public override void ProcessJump() { } public override void FixedUpdate() { //IL_017e: 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_018d: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = false; if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)targetHurtbox) && Object.op_Implicit((Object)(object)anchor) && targetHurtbox.healthComponent.alive) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(anchor.transform.position, true); if (Object.op_Implicit((Object)(object)modelTransform)) { Transform obj = modelTransform; Vector3 val = ((Component)targetHurtbox).transform.position - ((EntityState)this).transform.position; obj.rotation = Util.QuaternionSafeLookRotation(((Vector3)(ref val)).normalized); modelTransform.position = ((EntityState)this).transform.position; } } else { cancelling = true; } if (((ButtonState)(ref ((EntityState)this).inputBank.jump)).justPressed) { cancelling = true; } if (penis.clingTimer <= 0f) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ClingFlourish()); return; } ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (cancelling) { ((EntityState)this).PlayAnimation("FullBody, Override Soft", "JumpEnemy"); ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).characterMotor.velocity = Vector3.up * 20f; Util.PlaySound("sfx_ravager_enemystep", ((EntityState)this).gameObject); ((EntityState)this).outer.SetNextStateToMain(); } else if (((EntityState)this).isAuthority && ((ButtonState)(ref ((EntityState)this).inputBank.skill4)).justPressed) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ClingFlourish()); } } } public class ClingChargeBeam : BaseRavagerSkillState { public float baseDuration = 30f; public static float maxDamageCoefficient = 24f; public static float minDamageCoefficient = 2f; public float minRadius = 0.1f; public float maxRadius = 14f; private float duration; private float stopwatch; private GameObject chargeEffectInstance; private uint playId; private bool isCharged; private Animator animator; private float fuckMyAss; private OverrideRequest crosshairOverrideRequest; private bool allySucc; private float charge => Util.Remap(Mathf.Clamp(stopwatch + (float)((EntityState)this).characterBody.GetBuffCount(RedGuy.projectileEatedBuff) * 1.25f, 0f, duration), 0f, duration, 0f, 1f); public override void OnEnter() { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); if (Object.op_Implicit((Object)(object)penis)) { penis.projectilesDeleted = 0; } duration = baseDuration / ((BaseState)this).attackSpeedStat; allySucc = Config.allySucc.Value; animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayCrossfade("FullBody, Override", "ClingChargeBeam", "Beam.playbackRate", duration * 0.1f, 0.05f); chargeEffectInstance = Object.Instantiate<GameObject>(Assets.beamChargeEffect); chargeEffectInstance.transform.parent = ((BaseState)this).FindModelChild("HandL"); chargeEffectInstance.transform.localPosition = new Vector3(-0.5f, 0f, -0.2f); chargeEffectInstance.transform.localRotation = Quaternion.identity; if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.Slow50); } crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, Assets.clingBeamCrosshair, (OverridePriority)2); Util.PlaySound("sfx_ravager_charge_beam", ((EntityState)this).gameObject); playId = Util.PlaySound("sfx_ravager_beam_loop", ((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("FullBody, Override", "ClingSlash1", "Slash.playbackRate", 1f, 0f); if (crosshairOverrideRequest != null) { crosshairOverrideRequest.Dispose(); } if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50); int buffCount = ((EntityState)this).characterBody.GetBuffCount(RedGuy.projectileEatedBuff); for (int i = 0; i < buffCount; i++) { ((EntityState)this).characterBody.RemoveBuff(RedGuy.projectileEatedBuff); } } AkSoundEngine.StopPlayingID(playId); penis.projectilesDeleted = 0; } public override void FixedUpdate() { //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (empowered) { stopwatch += 10f * Time.fixedDeltaTime; } ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; penis.clingTimer += Time.fixedDeltaTime; ((BaseState)this).StartAimMode(0.5f, false); ((EntityState)this).characterBody.isSprinting = false; if (Object.op_Implicit((Object)(object)animator)) { float num = 0f; if (((EntityState)this).inputBank.skill2.down) { num = -1f; } else if (((EntityState)this).inputBank.skill1.down) { num = 1f; } fuckMyAss = Mathf.Lerp(fuckMyAss, num, Time.fixedDeltaTime * 8f); animator.SetFloat("beamType", fuckMyAss); } if (!isCharged && charge >= 1f) { isCharged = true; Util.PlaySound("sfx_ravager_beam_maxcharge", ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("FullBody, Override", "ClingChargeBeamMax", "Beam.playbackRate", 0.5f, 0.05f); } CheckForProjectiles(); chargeEffectInstance.transform.localScale = Vector3.one * Util.Remap(charge, 0f, 1f, 0f, 2f); penis.chargeValue = charge; if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill3.down) { FireBeam(); } } protected virtual void EatProjectile(ProjectileController pc) { //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown Util.PlaySound("sfx_ravager_beam_consume", ((Component)pc).gameObject); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff); penis.projectilesDeleted++; if (((EntityState)this).fixedAge <= 0.5f) { ((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff); penis.projectilesDeleted++; ((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff); penis.projectilesDeleted++; ((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff); penis.projectilesDeleted++; } Object.Destroy((Object)(object)((Component)pc).gameObject); if (Object.op_Implicit((Object)(object)DefenseMatrixOn.tracerEffectPrefab)) { EffectData val = new EffectData { origin = chargeEffectInstance.transform.position, start = ((Component)pc).transform.position }; EffectManager.SpawnEffect(DefenseMatrixOn.tracerEffectPrefab, val, true); } } } protected virtual void CheckForProjectiles() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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) Collider[] array = Physics.OverlapSphere(chargeEffectInstance.transform.position, 12f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.projectile)).mask)); for (int i = 0; i < array.Length; i++) { ProjectileController componentInParent = ((Component)array[i]).GetComponentInParent<ProjectileController>(); if (!Object.op_Implicit((Object)(object)componentInParent) || !((Object)(object)componentInParent.owner != (Object)(object)((EntityState)this).gameObject)) { continue; } if (!allySucc) { if (componentInParent.teamFilter.teamIndex != ((BaseState)this).GetTeam()) { EatProjectile(componentInParent); } } else { EatProjectile(componentInParent); } } } protected virtual void FireBeam() { //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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_014f: 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) float num = charge; float num2 = Util.Remap(num, 0f, 1f, 1f, 16f); ((BaseState)this).AddRecoil(-0.4f * num2, -0.8f * num2, -0.3f * num2, 0.3f * num2); ((EntityState)this).characterBody.AddSpreadBloom(4f); if (charge >= 0.75f) { EffectManager.SimpleMuzzleFlash(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ImpBoss/ImpBossBlink.prefab").WaitForCompletion(), ((EntityState)this).gameObject, "HandL", true); } else if (charge >= 0.25f) { EffectManager.SimpleMuzzleFlash(Assets.cssEffect, ((EntityState)this).gameObject, "HandL", true); } else { EffectManager.SimpleMuzzleFlash(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Golem/MuzzleflashGolem.prefab").WaitForCompletion(), ((EntityState)this).gameObject, "HandL", true); } Util.PlaySound("sfx_ravager_blast", ((EntityState)this).gameObject); GameObject val = null; GameObject val2 = null; val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/Railgunner/TracerRailgunSuper.prefab").WaitForCompletion(); val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Golem/ExplosionGolem.prefab").WaitForCompletion(); if (num >= 0.5f) { val.transform.GetChild(4).GetChild(3).localScale = Vector3.one * 6f; } float damage = Util.Remap(num, 0f, 1f, ChargeBeam.minDamageCoefficient, ChargeBeam.maxDamageCoefficient) * ((BaseState)this).damageStat; Ray aimRay = ((BaseState)this).GetAimRay(); BulletAttack val3 = new BulletAttack(); val3.aimVector = ((Ray)(ref aimRay)).direction; val3.origin = ((Ray)(ref aimRay)).origin; val3.damage = damage; val3.damageColorIndex = (DamageColorIndex)0; val3.damageType = DamageTypeCombo.op_Implicit((DamageType)32) | DamageTypeCombo.GenericUtility; val3.falloffModel = (FalloffModel)0; val3.maxDistance = 2000f; val3.force = Util.Remap(num, 0f, 1f, 5f, 5000f); val3.hitMask = CommonMasks.bullet; val3.isCrit = ((BaseState)this).RollCrit(); val3.owner = ((EntityState)this).gameObject; val3.muzzleName = "HandL"; val3.smartCollision = true; val3.procChainMask = default(ProcChainMask); val3.procCoefficient = 1f; val3.radius = Util.Remap(num, 0f, 1f, 0f, 5f); val3.sniper = false; val3.stopperMask = ((LayerIndex)(ref LayerIndex.noCollision)).mask; val3.weapon = null; val3.tracerEffectPrefab = val; val3.spreadPitchScale = 1f; val3.spreadYawScale = 1f; val3.queryTriggerInteraction = (QueryTriggerInteraction)0; val3.hitEffectPrefab = val2; val3.HitEffectNormal = Object.op_Implicit((Object)(object)val2); val3.maxSpread = 0f; val3.minSpread = 0f; val3.bulletCount = 1u; val3.Fire(); ((EntityState)this).outer.SetNextStateToMain(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)3; } } public class ClingDefend : BaseRavagerSkillState { private Transform modelTransform; private TemporaryOverlay temporaryOverlay; public override void OnEnter() { //IL_00c6: 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) base.OnEnter(); modelTransform = ((EntityState)this).GetModelTransform(); ((EntityState)this).PlayCrossfade("FullBody, Override", "ClingDefend", 0.05f); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(RedGuy.clingDefendBuff); } if (Object.op_Implicit((Object)(object)modelTransform)) { temporaryOverlay = ((Component)modelTransform).gameObject.AddComponent<TemporaryOverlay>(); temporaryOverlay.duration = 1000f; temporaryOverlay.animateShaderAlpha = true; temporaryOverlay.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); temporaryOverlay.destroyComponentOnEnd = true; temporaryOverlay.originalMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Imp/matImpDissolve.mat").WaitForCompletion(); temporaryOverlay.AddToCharacerModel(((Component)modelTransform).GetComponent<CharacterModel>()); } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("FullBody, Override", "ClingDefendOff"); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(RedGuy.clingDefendBuff); } if (Object.op_Implicit((Object)(object)temporaryOverlay)) { EntityState.Destroy((Object)(object)temporaryOverlay); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill3.down && ((EntityState)this).fixedAge >= 0.1f) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } }