using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using MapStation.Common.Gameplay; using MapStation.Plugin.Gameplay; using Microsoft.CodeAnalysis; using Reptile; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyCompany("aciddrop")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Acid Drop for Bomb Rush Cyberfunk")] [assembly: AssemblyFileVersion("1.1.5.0")] [assembly: AssemblyInformationalVersion("1.1.5")] [assembly: AssemblyProduct("aciddrop")] [assembly: AssemblyTitle("aciddrop")] [assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = "")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.1.5.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; } } } namespace aciddrop { [BepInPlugin("info.mariobluegloves.aciddrop2", "Acid Drop", "1.1.9")] [BepInProcess("Bomb Rush Cyberfunk.exe")] public class AcidDrop : BaseUnityPlugin { private static AcidDrop _instance; public static int frameCounter = 0; public static int lastMeteorFrame = -9999; public static int lastBoostFrame = -9999; public const int METEOR_BOOST_BUFFER_FRAMES = 5; private bool sceneLoaded = false; private Player p; private bool canAcidDrop = true; public static bool canMeteor = true; public bool hasMapStationVerted = false; public bool mapStationVertingDown = false; public bool hasMeteored = false; public static bool meteor = false; public bool canceledAirTrick = true; public bool isStoringSpeed = false; public bool hasHitMsVert = false; public bool hasVerted = false; public bool vertingDown = false; public Vector3 lastSpeed = Vector3.zero; public Vector3 curSpeed = Vector3.zero; public float funnySpeed = 0f; public float ts = 0f; public bool updatingBoostHeld = false; public bool hasUpdatedBoostHeld = false; public bool hasStoppedUpdatingBoostHeld = false; public float timeSpentBoostHeld = 0f; public bool updatingSlideHeld = false; public bool hasUpdatedSlideHeld = false; public bool hasStoppedUpdatingSlideHeld = false; public float timeSpentSlideHeld = 0f; public float timeSpentExitingMsVert = 0f; public float maxFallSpeed = 0f; public bool grabbingFallSpeed = false; public float previousTime = 0f; public float currentTime = 0f; public float deltaTime = 0f; private float configTimer = 0f; public static ConfigEntry enableMeteorDrop; public static ConfigEntry enableAcidDrop; public static ConfigEntry allowControlDuringMSDrop; public static ConfigEntry triggerTimerWoodz; public static AcidDrop Instance => _instance; private void Awake() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown _instance = this; SceneManager.sceneLoaded += OnSceneLoaded; Harmony val = new Harmony("info.mariobluegloves.aciddrop2"); val.PatchAll(typeof(GriTAPatchAD)); } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { sceneLoaded = true; grabbingFallSpeed = true; } private void Update() { //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) if (!sceneLoaded) { return; } configTimer += Time.deltaTime; bool flag = false; if (configTimer >= 1f) { configTimer = 0f; flag = true; } if (flag) { enableAcidDrop = ((BaseUnityPlugin)this).Config.Bind("General", "Enable Acid Drop", true, "Enables the Acid drop ability"); enableMeteorDrop = ((BaseUnityPlugin)this).Config.Bind("General", "Enable Meteor Drop", true, "Enables the meteor drop ability (trick 2 + trick 3 + slide)"); allowControlDuringMSDrop = ((BaseUnityPlugin)this).Config.Bind("General", "Allow Control During Mapstation Acid Drop", false, "Allows control of the player while acid dropping into a MapStation vert"); triggerTimerWoodz = ((BaseUnityPlugin)this).Config.Bind("General", "TriggerTimer", 0.75f, "How long you're allowed to hold the triggers for before you aren't able to acid drop anymore"); } currentTime = Time.time; deltaTime = currentTime - previousTime; previousTime = currentTime; GameObject val = GameObject.Find("Player_HUMAN0"); frameCounter++; if (!((Object)(object)val != (Object)null)) { return; } p = val.GetComponent(); if (!((Object)(object)p != (Object)null)) { return; } if (grabbingFallSpeed) { MovementMotor component = ((Component)p).GetComponent(); maxFallSpeed = component.maxFallSpeed; grabbingFallSpeed = false; } if (meteor && p.airTrickAbility != null && !canceledAirTrick) { ((Ability)p.airTrickAbility).p.StopCurrentAbility(); canceledAirTrick = true; } DropCheck(); if (p.OnAnyGround()) { StopMapstationVerting(); StopVerting(); StopMeteor(); if (!vertingDown && hasVerted) { hasVerted = false; } if (!meteor && hasMeteored) { hasMeteored = false; } if (!mapStationVertingDown && hasMapStationVerted) { p.userInputEnabled = true; hasMapStationVerted = false; } canAcidDrop = true; canMeteor = true; if (hasHitMsVert) { timeSpentExitingMsVert += deltaTime; if (timeSpentExitingMsVert > 0.06f) { GiveMsStorage(); } } return; } if (p.boostButtonHeld) { timeSpentBoostHeld += Core.dt; if (timeSpentBoostHeld > 0.51f) { timeSpentBoostHeld = 0.51f; } UpdateBoostHeld(); } else { StopUpdatingBoostHeld(); } if (p.slideButtonHeld) { timeSpentSlideHeld += Core.dt; if (timeSpentSlideHeld > 0.51f) { timeSpentSlideHeld = 0.51f; } UpdateSlideHeld(); } else { StopUpdatingSlideHeld(); } if (isStoringSpeed) { Rigidbody component2 = ((Component)p).GetComponent(); lastSpeed = curSpeed; curSpeed = component2.velocity; } if (mapStationVertingDown && p.boostAbility != null) { ((Ability)p.boostAbility).p.StopCurrentAbility(); } } public void DropCheck() { if ((Object)(object)p == (Object)null) { Debug.LogError((object)"[AcidDrop] DropCheck: p is null"); return; } if (triggerTimerWoodz == null) { Debug.LogError((object)"[AcidDrop] DropCheck: triggerTimerWoodz is null"); return; } if (enableMeteorDrop == null) { Debug.LogError((object)"[AcidDrop] DropCheck: enableMeteorDrop is null"); return; } ts = triggerTimerWoodz.Value; if ((Object)(object)p != (Object)null && p.usingEquippedMovestyle && (p.slideButtonHeld || p.slideButtonNew) && (p.boostButtonHeld || p.boostButtonNew) && timeSpentBoostHeld < ts && timeSpentSlideHeld < ts && !p.IsGrinding()) { MovementMotor component = ((Component)p).GetComponent(); component.maxFallSpeed = float.PositiveInfinity; CheckObjectDirectlyUnderneathPlayer(); } if ((Object)(object)p != (Object)null && enableMeteorDrop.Value && (p.slideButtonHeld || p.slideButtonNew) && timeSpentBoostHeld < ts && timeSpentSlideHeld < ts && p.trick2ButtonHeld && p.trick3ButtonHeld && !p.IsGrinding()) { MovementMotor component2 = ((Component)p).GetComponent(); component2.maxFallSpeed = float.PositiveInfinity; canceledAirTrick = false; MeteorDrop(); } } private void CheckObjectDirectlyUnderneathPlayer() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)p == (Object)null) { return; } Vector3 position = ((Component)p).transform.position; Vector3 down = Vector3.down; RaycastHit[] array = Physics.RaycastAll(position, down); Array.Sort(array, (RaycastHit a, RaycastHit b) => ((RaycastHit)(ref a)).distance.CompareTo(((RaycastHit)(ref b)).distance)); bool flag = false; RaycastHit hit = default(RaycastHit); GameObject val = null; bool flag2 = false; RaycastHit[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit val2 = array2[i]; GameObject gameObject = ((Component)((RaycastHit)(ref val2)).collider).gameObject; if ((Object)(object)gameObject.GetComponent() != (Object)null || (Object)(object)gameObject.GetComponent() != (Object)null) { if (!flag2) { hit = val2; val = gameObject; flag = true; break; } } else { flag2 = true; } } if (!flag || !((Object)(object)val != (Object)null)) { return; } VertShape component = val.GetComponent(); if ((Object)(object)component != (Object)null) { ProcessVertShape(val, hit); return; } MapStationVert component2 = val.GetComponent(); if ((Object)(object)component2 != (Object)null) { ProcessMapStationVert(val, hit); } } private void ProcessVertShape(GameObject obj, RaycastHit hit) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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_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) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_00b5: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0133: 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_0145: 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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: 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_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) VertShape component = obj.GetComponent(); Vector3 bottomLeft = component.bottomLeft; Vector3 topLeft = component.topLeft; Vector3 topRight = component.topRight; Transform transform = ((Component)component).transform; Vector3 val = transform.TransformPoint(bottomLeft); Vector3 val2 = transform.TransformPoint(topLeft); Vector3 val3 = transform.TransformPoint(topRight); Vector3 val4 = val3 - val2; Vector3 normalized = ((Vector3)(ref val4)).normalized; if (!p.IsGrounded() && canAcidDrop && enableAcidDrop.Value) { p.ActivateAbility((Ability)(object)p.vertAbility); Vector3 val5 = ((Component)p).transform.position - val3; float num = Vector3.Dot(val5, normalized) / Vector3.Dot(normalized, normalized); Vector3 val6 = num * normalized; Vector3 val7 = val3 + val6; Vector3 position = default(Vector3); ((Vector3)(ref position))..ctor(val7.x, ((Component)p).transform.position.y, val7.z); ((Component)p).transform.position = position; Vector3 val8 = val - val2; Vector3 normalized2 = ((Vector3)(ref val8)).normalized; ((Component)p).transform.rotation = Quaternion.LookRotation(normalized2, Vector3.up); ((Component)p).transform.Translate(Vector3.forward * 0.5f, (Space)1); StartVerting(); p.ringParticles.Emit(1); p.audioManager.PlayVoice(ref p.currentVoicePriority, p.character, (AudioClipID)489, p.playerGameplayVoicesAudioSource, (VoicePriority)0); p.DoTrick((TrickType)22, "Acid Drop", 0); float totalSpeed = p.GetTotalSpeed(); Vector3 velocity = (0f - totalSpeed) * Vector3.up; Rigidbody component2 = ((Component)p).GetComponent(); component2.velocity = velocity; canAcidDrop = false; } } private void ProcessMapStationVert(GameObject obj, RaycastHit hit) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0154: 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) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) if (p.IsGrounded() || !canAcidDrop || !enableAcidDrop.Value) { return; } MapStationPlayer component = ((Component)p).GetComponent(); MeshCollider component2 = obj.GetComponent(); if ((Object)(object)component2 == (Object)null) { return; } Vector3 val = ((Collider)component2).ClosestPointOnBounds(((Component)p).transform.position); Vector3 val2 = ((Component)this).transform.TransformPoint(val); Vector3 normal = ((RaycastHit)(ref hit)).normal; float num = Vector3.Dot(normal, Vector3.up); bool flag = num < Mathf.Cos((float)Math.PI / 4f); bool flag2 = num > Mathf.Cos(1.2217305f); if (flag && flag2) { Vector3 velocity = (0f - (funnySpeed = p.GetTotalSpeed())) * Vector3.up; Rigidbody component3 = ((Component)p).GetComponent(); component3.velocity = velocity; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(val2.x, ((Component)p).transform.position.y, val2.z); ((Component)p).transform.position = val3; Vector3 normalized = ((Vector3)(ref normal)).normalized; normalized.y = 0f; Quaternion rotation = Quaternion.LookRotation(normalized, Vector3.up); p.SetRotation(rotation); Vector3 position = val3 + ((Vector3)(ref normal)).normalized * 0.6f; ((Component)p).transform.position = position; component.GroundVertVector = normal; component.AirVertBegin(); component.OnVertAir = true; StartMapstationVerting(); p.ringParticles.Emit(1); p.audioManager.PlayVoice(ref p.currentVoicePriority, p.character, (AudioClipID)489, p.playerGameplayVoicesAudioSource, (VoicePriority)0); p.DoTrick((TrickType)22, "Acid Drop", 0); if (!allowControlDuringMSDrop.Value) { p.userInputEnabled = false; } canAcidDrop = false; } } private void MeteorDrop() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)p == (Object)null) { return; } Collider[] array = Physics.OverlapSphere(((Component)p).transform.position, 0.5f); bool flag = false; Collider[] array2 = array; foreach (Collider val in array2) { if ((Object)(object)((Component)val).gameObject != (Object)(object)p && !val.isTrigger && ((Object)((Component)val).gameObject).name != "interactionCapsule" && ((Object)((Component)val).gameObject).name != "grindDetectionBottom" && ((Object)((Component)val).gameObject).name != "Player_HUMAN0") { flag = true; } } if (!flag && !p.IsGrounded() && canMeteor) { MapStationPlayer component = ((Component)p).GetComponent(); StartMeteor(); p.ringParticles.Emit(1); p.audioManager.PlayVoice(ref p.currentVoicePriority, p.character, (AudioClipID)489, p.playerGameplayVoicesAudioSource, (VoicePriority)0); p.DoTrick((TrickType)22, "Meteor Drop", 0); float totalSpeed = p.GetTotalSpeed(); Vector3 velocity = (0f - totalSpeed) * Vector3.up; Rigidbody component2 = ((Component)p).GetComponent(); component2.velocity = velocity; canMeteor = false; } } private void StartMapstationVerting() { mapStationVertingDown = true; if (!hasMapStationVerted) { hasMapStationVerted = true; isStoringSpeed = true; } } private void StopMapstationVerting() { if (mapStationVertingDown) { MovementMotor component = ((Component)p).GetComponent(); mapStationVertingDown = false; isStoringSpeed = false; hasHitMsVert = true; timeSpentExitingMsVert = 0f; component.maxFallSpeed = maxFallSpeed; } } private void StartMeteor() { meteor = true; lastMeteorFrame = frameCounter; if (!hasMeteored) { hasMeteored = true; } } private void StopMeteor() { MovementMotor component = ((Component)p).GetComponent(); if (meteor) { meteor = false; component.maxFallSpeed = maxFallSpeed; } } private void GiveMsStorage() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) Rigidbody component = ((Component)p).GetComponent(); component.velocity = lastSpeed; hasHitMsVert = false; timeSpentExitingMsVert = 0f; } private void StartVerting() { vertingDown = true; if (!hasVerted) { hasVerted = true; } } private void StopVerting() { MovementMotor component = ((Component)p).GetComponent(); vertingDown = false; component.maxFallSpeed = maxFallSpeed; } private void UpdateBoostHeld() { updatingBoostHeld = true; if (!hasUpdatedBoostHeld) { timeSpentBoostHeld = 0f; hasUpdatedBoostHeld = true; hasStoppedUpdatingBoostHeld = false; } } private void UpdateSlideHeld() { updatingSlideHeld = true; if (!hasUpdatedSlideHeld) { timeSpentSlideHeld = 0f; hasUpdatedSlideHeld = true; hasStoppedUpdatingSlideHeld = false; } } private void StopUpdatingBoostHeld() { if (!hasStoppedUpdatingBoostHeld) { updatingBoostHeld = false; hasUpdatedBoostHeld = false; hasStoppedUpdatingBoostHeld = true; timeSpentBoostHeld = 0f; } } private void StopUpdatingSlideHeld() { if (!hasStoppedUpdatingSlideHeld) { updatingSlideHeld = false; hasUpdatedSlideHeld = false; hasStoppedUpdatingSlideHeld = true; timeSpentSlideHeld = 0f; } } } public class GriTAPatchAD { [CompilerGenerated] private sealed class d__5 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Rigidbody rb; public Vector3 storedVelocity; private Vector3 5__1; private Transform 5__2; private Vector3 5__3; private float 5__4; private float 5__5; private float 5__6; private float 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__5(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_0058: 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_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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; if (Object.op_Implicit((Object)(object)rb)) { rb.velocity = storedVelocity; } <>2__current = null; <>1__state = 2; return true; case 2: { <>1__state = -1; if (!Object.op_Implicit((Object)(object)rb)) { return false; } 5__1 = rb.velocity; 5__2 = ((Component)rb).transform; Vector3 forward = 5__2.forward; 5__3 = ((Vector3)(ref forward)).normalized; 5__4 = Vector3.Dot(5__1, 5__3); 5__5 = Mathf.Max(0f, 0f - 5__1.y); if (5__4 < 20f && 5__5 > 0f) { 5__6 = 20f - 5__4; 5__7 = Mathf.Min(5__6, 5__5); 5__1.y += 5__7; 5__1 += 5__3 * 5__7; } rb.velocity = 5__1; return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [HarmonyPatch(typeof(GrindAbility), "CanSetToLine")] [HarmonyPrefix] private static bool GriTAPatchPreFixAD(GrindLine line) { if (((Object)(object)AcidDrop.Instance != (Object)null && AcidDrop.Instance.vertingDown) || ((Object)(object)AcidDrop.Instance != (Object)null && AcidDrop.Instance.mapStationVertingDown)) { return false; } return true; } [HarmonyPatch(typeof(Player), "RegainAirMobility")] [HarmonyPostfix] private static void RegainAirMobilityPatch() { AcidDrop.canMeteor = true; } [HarmonyPatch(typeof(BoostAbility), "OnStartAbility")] [HarmonyPostfix] [HarmonyPriority(0)] private static void OnStartAbilityPatch() { AcidDrop.lastBoostFrame = AcidDrop.frameCounter; AcidDrop.meteor = false; } [HarmonyPatch(typeof(AirTrickAbility), "SetupBoostTrick")] [HarmonyPostfix] [HarmonyPriority(0)] private static void SetupBoostTrickPatch(AirTrickAbility __instance) { //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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) int num = AcidDrop.lastBoostFrame - AcidDrop.lastMeteorFrame; if (num < 0 || num > 5) { return; } AcidDrop.meteor = false; Rigidbody val = (((Object)(object)((Ability)__instance).p != (Object)null) ? ((Component)((Ability)__instance).p).GetComponent() : null); if (Object.op_Implicit((Object)(object)val)) { Vector3 forward = ((Component)((Ability)__instance).p).transform.forward; Vector3 velocity = val.velocity; float num2 = Mathf.Max(0f, 0f - Vector3.Dot(velocity, Vector3.up)); if (!(num2 <= 0f)) { Vector3 storedVelocity = ComputeForwardReplacedVelocity(velocity, forward, num2); ((MonoBehaviour)CoroutineRunner.Instance).StartCoroutine(ApplyStoredVelocityTwice(val, storedVelocity)); } } } private static Vector3 ComputeForwardReplacedVelocity(Vector3 v, Vector3 forwardDir, float newForwardSpeed) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_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_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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) Vector3 normalized = ((Vector3)(ref forwardDir)).normalized; float num = Vector3.Dot(v, normalized); v -= normalized * num; v += normalized * newForwardSpeed; return v; } [IteratorStateMachine(typeof(d__5))] private static IEnumerator ApplyStoredVelocityTwice(Rigidbody rb, Vector3 storedVelocity) { //IL_000e: 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) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__5(0) { rb = rb, storedVelocity = storedVelocity }; } } public class CoroutineRunner : MonoBehaviour { private static CoroutineRunner _instance; public static CoroutineRunner Instance { get { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown if ((Object)(object)_instance == (Object)null) { GameObject val = new GameObject("AcidDrop_CoroutineRunner"); Object.DontDestroyOnLoad((Object)(object)val); _instance = val.AddComponent(); } return _instance; } } } [BepInPlugin("info.mariobluegloves.aciddrop", "Acid Drop", "1.1.9")] [BepInProcess("Bomb Rush Cyberfunk.exe")] public class VertAbilityPatches : BaseUnityPlugin { private void Awake() { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Drop it like it's hot"); } } }