Decompiled source of JJK Cursed Techniques v1.4.25
JJKCardsMod.dll
Decompiled a week 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.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using InControl; using JJKAnimation; using JJKCardsMod.Cards; using Microsoft.CodeAnalysis; using ModdingUtils.Extensions; using ModdingUtils.Utils; using Photon.Pun; using UnboundLib; using UnboundLib.Cards; using UnboundLib.GameModes; using UnboundLib.Networking; using UnityEngine; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("JJKCardsMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("JJK Cursed Techniques")] [assembly: AssemblyFileVersion("1.4.5.0")] [assembly: AssemblyInformationalVersion("1.4.5")] [assembly: AssemblyProduct("JJKCardsMod")] [assembly: AssemblyTitle("JJKCardsMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.4.5.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 JJKAnimation { public class JJKAnimator : MonoBehaviour { private static JJKAnimator _instance; private static Material _cachedSpriteMaterial; private static Material _cachedParticleMaterial; private static Texture2D _cachedCircleTexture; private static Sprite _cachedCircleSprite; private static Queue<GameObject> _shockwavePool = new Queue<GameObject>(); private static Queue<GameObject> _sparksPool = new Queue<GameObject>(); private static Queue<GameObject> _projectilePool = new Queue<GameObject>(); private static Dictionary<GameObject, Collider2D[]> _casterColliderCache = new Dictionary<GameObject, Collider2D[]>(); private float _cleanupTimer; public static JJKAnimator Instance { get { //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_0027: Expected O, but got Unknown if ((Object)(object)_instance == (Object)null) { GameObject val = new GameObject("JJKAnimator_Manager"); _instance = val.AddComponent<JJKAnimator>(); Object.DontDestroyOnLoad((Object)val); } return _instance; } } public static Material CachedSpriteMaterial { get { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown if ((Object)(object)_cachedSpriteMaterial == (Object)null) { Shader val = Shader.Find("Sprites/Default"); if ((Object)(object)val != (Object)null) { _cachedSpriteMaterial = new Material(val); ((Object)_cachedSpriteMaterial).hideFlags = (HideFlags)61; } } return _cachedSpriteMaterial; } } public static Material CachedParticleMaterial { get { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown if ((Object)(object)_cachedParticleMaterial == (Object)null) { Shader val = Shader.Find("Particles/Standard Unlit") ?? Shader.Find("Legacy Shaders/Particles/Alpha Blended"); if ((Object)(object)val != (Object)null) { _cachedParticleMaterial = new Material(val); ((Object)_cachedParticleMaterial).hideFlags = (HideFlags)61; } else { _cachedParticleMaterial = CachedSpriteMaterial; } } return _cachedParticleMaterial; } } public static Sprite CachedCircleSprite { get { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_00da: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_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) if ((Object)(object)_cachedCircleSprite == (Object)null) { int num = 32; _cachedCircleTexture = new Texture2D(num, num, (TextureFormat)4, false); ((Object)_cachedCircleTexture).hideFlags = (HideFlags)61; Color[] array = (Color[])(object)new Color[num * num]; float num2 = (float)num / 2f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num3 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(num2, num2)); float num4 = ((num3 <= num2) ? Mathf.Clamp01(1f - num3 / num2) : 0f); array[i * num + j] = new Color(1f, 1f, 1f, num4); } } _cachedCircleTexture.SetPixels(array); _cachedCircleTexture.Apply(); _cachedCircleSprite = Sprite.Create(_cachedCircleTexture, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), (float)num); ((Object)_cachedCircleSprite).hideFlags = (HideFlags)61; } return _cachedCircleSprite; } } private static GameObject GetFromPool(Queue<GameObject> pool, Func<GameObject> createFunc) { while (pool.Count > 0) { GameObject val = pool.Dequeue(); if ((Object)(object)val != (Object)null) { val.SetActive(true); return val; } } return createFunc(); } private static IEnumerator ReturnToPoolRoutine(GameObject obj, Queue<GameObject> pool, float delay) { yield return (object)new WaitForSeconds(delay); if ((Object)(object)obj != (Object)null) { obj.SetActive(false); pool.Enqueue(obj); } } private void Update() { _cleanupTimer += Time.deltaTime; if (!(_cleanupTimer > 5f)) { return; } _cleanupTimer = 0f; List<GameObject> list = new List<GameObject>(); foreach (KeyValuePair<GameObject, Collider2D[]> item in _casterColliderCache) { if ((Object)(object)item.Key == (Object)null) { list.Add(item.Key); } } foreach (GameObject item2 in list) { _casterColliderCache.Remove(item2); } } private void OnDestroy() { if ((Object)(object)_cachedCircleTexture != (Object)null) { Object.Destroy((Object)(object)_cachedCircleTexture); } if ((Object)(object)_cachedCircleSprite != (Object)null) { Object.Destroy((Object)(object)_cachedCircleSprite); } if ((Object)(object)_cachedSpriteMaterial != (Object)null) { Object.Destroy((Object)(object)_cachedSpriteMaterial); } if ((Object)(object)_cachedParticleMaterial != (Object)null) { Object.Destroy((Object)(object)_cachedParticleMaterial); } _shockwavePool.Clear(); _sparksPool.Clear(); _projectilePool.Clear(); _casterColliderCache.Clear(); } public static Coroutine TweenScale(Transform target, Vector3 start, Vector3 end, float duration, Action onComplete = null) { //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) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) return ((MonoBehaviour)Instance).StartCoroutine(TweenRoutine(duration, delegate(float t) { //IL_0015: 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_0021: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)target != (Object)null) { target.localScale = Vector3.LerpUnclamped(start, end, t); } }, delegate { //IL_0015: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)target != (Object)null) { target.localScale = end; } onComplete?.Invoke(); })); } public static Coroutine TweenPosition(Transform target, Vector3 start, Vector3 end, float duration, Action onComplete = null) { //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) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) return ((MonoBehaviour)Instance).StartCoroutine(TweenRoutine(duration, delegate(float t) { //IL_0015: 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_0021: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)target != (Object)null) { target.position = Vector3.LerpUnclamped(start, end, t); } }, delegate { //IL_0015: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)target != (Object)null) { target.position = end; } onComplete?.Invoke(); })); } public static Coroutine TweenColor(SpriteRenderer renderer, Color start, Color end, float duration, Action onComplete = null) { //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) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) return ((MonoBehaviour)Instance).StartCoroutine(TweenRoutine(duration, delegate(float t) { //IL_0015: 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_0021: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)renderer != (Object)null) { renderer.color = Color.Lerp(start, end, t); } }, delegate { //IL_0015: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)renderer != (Object)null) { renderer.color = end; } onComplete?.Invoke(); })); } public static Coroutine TweenFade(SpriteRenderer renderer, float startAlpha, float endAlpha, float duration, Action onComplete = null) { //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_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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)renderer == (Object)null) { return null; } Color color = renderer.color; color.a = startAlpha; Color color2 = renderer.color; color2.a = endAlpha; return TweenColor(renderer, color, color2, duration, onComplete); } private static IEnumerator TweenRoutine(float duration, Action<float> onUpdate, Action onComplete) { float elapsed = 0f; while (elapsed < duration) { elapsed += Time.deltaTime; float num = Mathf.Clamp01(elapsed / duration); float obj = 1f - Mathf.Pow(1f - num, 4f); onUpdate?.Invoke(obj); yield return null; } onComplete?.Invoke(); } public static GameObject SpawnProjectile(GameObject caster, Vector2 position, Vector2 direction, float speed, float radius, float lifetime, Action<Collider2D> onHit = null) { //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_0041: 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_0058: 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_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) GameObject fromPool = GetFromPool(_projectilePool, delegate { //IL_0005: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown GameObject val2 = new GameObject("JJK_Projectile"); val2.transform.SetParent(((Component)Instance).transform); SpriteRenderer obj = val2.AddComponent<SpriteRenderer>(); obj.sprite = CachedCircleSprite; ((Renderer)obj).material = CachedSpriteMaterial; Rigidbody2D obj2 = val2.AddComponent<Rigidbody2D>(); obj2.isKinematic = false; obj2.gravityScale = 0f; obj2.collisionDetectionMode = (CollisionDetectionMode2D)1; ((Collider2D)val2.AddComponent<CircleCollider2D>()).isTrigger = false; val2.AddComponent<JJKProjectileLogic>(); return val2; }); fromPool.transform.position = Vector2.op_Implicit(position); fromPool.GetComponent<SpriteRenderer>().color = Color.cyan; fromPool.transform.localScale = Vector3.one * radius * 2f; Rigidbody2D component = fromPool.GetComponent<Rigidbody2D>(); component.velocity = ((Vector2)(ref direction)).normalized * speed; component.angularVelocity = 0f; CircleCollider2D component2 = fromPool.GetComponent<CircleCollider2D>(); component2.radius = 0.5f; if ((Object)(object)caster != (Object)null) { if (!_casterColliderCache.TryGetValue(caster, out var value)) { value = caster.GetComponentsInChildren<Collider2D>(); _casterColliderCache[caster] = value; } Collider2D[] array = value; foreach (Collider2D val in array) { if ((Object)(object)val != (Object)null) { Physics2D.IgnoreCollision((Collider2D)(object)component2, val); } } } fromPool.GetComponent<JJKProjectileLogic>().Initialize(lifetime, onHit, _projectilePool); return fromPool; } public static void CreateShockwave(Vector2 position, float maxRadius, float duration, Color color) { //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_0060: Unknown result type (might be due to invalid IL or missing references) GameObject fromPool = GetFromPool(_shockwavePool, delegate { //IL_0005: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown GameObject val = new GameObject("JJK_Shockwave"); val.transform.SetParent(((Component)Instance).transform); LineRenderer obj = val.AddComponent<LineRenderer>(); ((Renderer)obj).material = CachedSpriteMaterial; obj.useWorldSpace = false; obj.loop = true; obj.positionCount = 32; return val; }); fromPool.transform.position = Vector2.op_Implicit(position); LineRenderer component = fromPool.GetComponent<LineRenderer>(); component.startWidth = 0.5f; component.endWidth = 0f; ((MonoBehaviour)Instance).StartCoroutine(ShockwaveRoutine(component, maxRadius, duration, color, fromPool)); } private static IEnumerator ShockwaveRoutine(LineRenderer lr, float maxRadius, float duration, Color color, GameObject go) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) float elapsed = 0f; while (elapsed < duration) { elapsed += Time.deltaTime; float num = elapsed / duration; float num2 = Mathf.Lerp(0.1f, maxRadius, 1f - Mathf.Pow(1f - num, 3f)); Color val = color; val.a = Mathf.Lerp(color.a, 0f, num); lr.startColor = val; lr.endColor = val; for (int i = 0; i < 32; i++) { float num3 = (float)i / 32f * (float)Math.PI * 2f; lr.SetPosition(i, new Vector3(Mathf.Cos(num3), Mathf.Sin(num3), 0f) * num2); } yield return null; } go.SetActive(false); _shockwavePool.Enqueue(go); } public static ParticleSystem CreateAura(Transform target, Color color) { //IL_0005: 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_0016: 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_0026: 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_005e: 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_0080: 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_008d: 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) //IL_00b8: 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_00d4: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_00f4: 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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_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_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("JJK_Aura"); val.transform.SetParent(target); val.transform.localPosition = Vector3.zero; ParticleSystem val2 = val.AddComponent<ParticleSystem>(); ((Renderer)val.GetComponent<ParticleSystemRenderer>()).material = CachedParticleMaterial; MainModule main = val2.main; ((MainModule)(ref main)).duration = 1f; ((MainModule)(ref main)).loop = true; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(0.5f); ((MainModule)(ref main)).startSpeed = MinMaxCurve.op_Implicit(2f); ((MainModule)(ref main)).startSize = MinMaxCurve.op_Implicit(0.5f); ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(color); ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)0; EmissionModule emission = val2.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(20f); ShapeModule shape = val2.shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)10; ((ShapeModule)(ref shape)).radius = 1f; ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val3 = new Gradient(); val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(color, 0f), new GradientColorKey(color, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[2] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val3); val2.Play(); return val2; } public static void CreateSparks(Vector2 position, Vector2 direction, Color color, int count = 15) { //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_0041: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) GameObject fromPool = GetFromPool(_sparksPool, delegate { //IL_0005: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_00ae: 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_00be: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown GameObject val = new GameObject("JJK_Sparks"); val.transform.SetParent(((Component)Instance).transform); ParticleSystem val2 = val.AddComponent<ParticleSystem>(); ParticleSystemRenderer component2 = val.GetComponent<ParticleSystemRenderer>(); ((Renderer)component2).material = CachedParticleMaterial; component2.renderMode = (ParticleSystemRenderMode)1; component2.lengthScale = 2f; MainModule main2 = val2.main; ((MainModule)(ref main2)).duration = 0.5f; ((MainModule)(ref main2)).loop = false; ((MainModule)(ref main2)).startLifetime = new MinMaxCurve(0.2f, 0.4f); ((MainModule)(ref main2)).startSpeed = new MinMaxCurve(5f, 15f); ((MainModule)(ref main2)).startSize = MinMaxCurve.op_Implicit(0.2f); EmissionModule emission2 = val2.emission; ((EmissionModule)(ref emission2)).rateOverTime = MinMaxCurve.op_Implicit(0f); ShapeModule shape = val2.shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)4; ((ShapeModule)(ref shape)).angle = 25f; ((ShapeModule)(ref shape)).radius = 0.1f; SizeOverLifetimeModule sizeOverLifetime = val2.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = new MinMaxCurve(1f, 0f); return val; }); fromPool.transform.position = Vector2.op_Implicit(position); fromPool.transform.up = Vector2.op_Implicit(direction); ParticleSystem component = fromPool.GetComponent<ParticleSystem>(); MainModule main = component.main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(color); EmissionModule emission = component.emission; ((EmissionModule)(ref emission)).SetBursts((Burst[])(object)new Burst[1] { new Burst(0f, (short)count) }); component.Play(); ((MonoBehaviour)Instance).StartCoroutine(ReturnToPoolRoutine(fromPool, _sparksPool, 1f)); } } public class JJKProjectileLogic : MonoBehaviour { private Action<Collider2D> _onHit; private float _lifetime; private bool _isDead; private Queue<GameObject> _pool; private Coroutine _lifetimeRoutine; public void Initialize(float lifetime, Action<Collider2D> onHit, Queue<GameObject> pool) { _lifetime = lifetime; _onHit = onHit; _pool = pool; _isDead = false; if (_lifetimeRoutine != null) { ((MonoBehaviour)this).StopCoroutine(_lifetimeRoutine); } _lifetimeRoutine = ((MonoBehaviour)this).StartCoroutine(LifetimeRoutine()); } private IEnumerator LifetimeRoutine() { yield return (object)new WaitForSeconds(_lifetime); Die(); } private void OnCollisionEnter2D(Collision2D collision) { if (!_isDead && !((Object)(object)collision.gameObject.GetComponent<JJKProjectileLogic>() != (Object)null)) { _onHit?.Invoke(collision.collider); Die(); } } private void Die() { //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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) _isDead = true; JJKAnimator.CreateSparks(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(-((Component)this).transform.right), Color.white, 8); if (_pool != null) { ((Component)this).gameObject.SetActive(false); _pool.Enqueue(((Component)this).gameObject); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } } } namespace JJKCardsMod { public class DomainManager : MonoBehaviour { public static DomainManager Instance; public Player ActiveDomainCaster; public Action ActiveWinCallback; public bool IsClashActive; private Player clashPlayerA; private Player clashPlayerB; private Action clashWinCallbackA; private Action clashWinCallbackB; private float damageA; private float damageB; private float clashTimer; private const float ClashDuration = 3f; private GameObject clashUIContainer; private RectTransform tugOfWarFill; private Text clashText; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); CreateClashUI(); } else if ((Object)(object)Instance != (Object)(object)this) { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void Update() { if ((Object)(object)ActiveDomainCaster != (Object)null && ((Object)(object)ActiveDomainCaster.data == (Object)null || ActiveDomainCaster.data.dead || !((Component)ActiveDomainCaster).gameObject.activeInHierarchy)) { EndDomain(ActiveDomainCaster); } } private void CreateClashUI() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0178: 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_018d: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("DomainClashCanvas"); val.transform.SetParent(((Component)this).transform); Canvas obj = val.AddComponent<Canvas>(); obj.renderMode = (RenderMode)0; obj.sortingOrder = 100; val.AddComponent<CanvasScaler>().uiScaleMode = (ScaleMode)1; clashUIContainer = new GameObject("ClashContainer"); clashUIContainer.transform.SetParent(val.transform, false); RectTransform obj2 = clashUIContainer.AddComponent<RectTransform>(); obj2.anchorMin = new Vector2(0.5f, 1f); obj2.anchorMax = new Vector2(0.5f, 1f); obj2.pivot = new Vector2(0.5f, 1f); obj2.anchoredPosition = new Vector2(0f, -50f); obj2.sizeDelta = new Vector2(800f, 100f); GameObject val2 = new GameObject("ClashText"); val2.transform.SetParent(clashUIContainer.transform, false); clashText = val2.AddComponent<Text>(); clashText.font = Resources.GetBuiltinResource<Font>("Arial.ttf"); clashText.alignment = (TextAnchor)4; clashText.fontSize = 40; ((Graphic)clashText).color = Color.magenta; clashText.text = "DOMAIN CLASH! DEAL DAMAGE!"; RectTransform component = val2.GetComponent<RectTransform>(); component.anchorMin = new Vector2(0f, 0.5f); component.anchorMax = new Vector2(1f, 1f); component.offsetMin = Vector2.zero; component.offsetMax = Vector2.zero; GameObject val3 = new GameObject("SliderBg"); val3.transform.SetParent(clashUIContainer.transform, false); ((Graphic)val3.AddComponent<Image>()).color = new Color(0.1f, 0.1f, 0.1f, 0.9f); RectTransform component2 = val3.GetComponent<RectTransform>(); component2.anchorMin = new Vector2(0f, 0f); component2.anchorMax = new Vector2(1f, 0.4f); component2.offsetMin = Vector2.zero; component2.offsetMax = Vector2.zero; GameObject val4 = new GameObject("SliderFill"); val4.transform.SetParent(val3.transform, false); ((Graphic)val4.AddComponent<Image>()).color = Color.cyan; RectTransform component3 = val4.GetComponent<RectTransform>(); component3.anchorMin = new Vector2(0f, 0f); component3.anchorMax = new Vector2(0.5f, 1f); component3.offsetMin = Vector2.zero; component3.offsetMax = Vector2.zero; tugOfWarFill = val4.GetComponent<RectTransform>(); clashUIContainer.SetActive(false); } public bool TryCastDomain(Player newCaster, Action winCallback) { if ((Object)(object)ActiveDomainCaster != (Object)null && (Object)(object)ActiveDomainCaster != (Object)(object)newCaster && !ActiveDomainCaster.data.dead) { if (IsClashActive) { return false; } ((MonoBehaviour)this).StartCoroutine(ClashRoutine(ActiveDomainCaster, newCaster, ActiveWinCallback, winCallback)); return false; } ActiveDomainCaster = newCaster; ActiveWinCallback = winCallback; return true; } public void StartClash(Player pA, Player pB, Action callbackA, Action callbackB) { if (!IsClashActive) { ((MonoBehaviour)this).StartCoroutine(ClashRoutine(pA, pB, callbackA, callbackB)); } } private IEnumerator ClashRoutine(Player pA, Player pB, Action callbackA, Action callbackB) { if ((Object)(object)pA == (Object)null || (Object)(object)pA.data == (Object)null || pA.data.dead || (Object)(object)pB == (Object)null || (Object)(object)pB.data == (Object)null || pB.data.dead) { IsClashActive = false; if ((Object)(object)pA != (Object)null && (Object)(object)pA.data != (Object)null && !pA.data.dead) { ActiveDomainCaster = pA; callbackA?.Invoke(); } else if ((Object)(object)pB != (Object)null && (Object)(object)pB.data != (Object)null && !pB.data.dead) { ActiveDomainCaster = pB; callbackB?.Invoke(); } else { ActiveDomainCaster = null; } yield break; } IsClashActive = true; clashPlayerA = pA; clashPlayerB = pB; damageA = 0f; damageB = 0f; clashTimer = 3f; clashUIContainer.SetActive(true); Vector3 center = (((Component)pA).transform.position + ((Component)pB).transform.position) / 2f; JJKCardHelper.CreateFloatingText("DOMAIN CLASH!!!", center, Color.magenta); float lastHealthA = pA.data.health; float lastHealthB = pB.data.health; int lastTenths = -1; while (clashTimer > 0f) { if ((Object)(object)pA == (Object)null || pA.data.dead) { damageB += 9999f; break; } if ((Object)(object)pB == (Object)null || pB.data.dead) { damageA += 9999f; break; } float num = lastHealthA - pA.data.health; if (num > 0f) { damageB += num; } lastHealthA = pA.data.health; float num2 = lastHealthB - pB.data.health; if (num2 > 0f) { damageA += num2; } lastHealthB = pB.data.health; clashTimer -= Time.deltaTime; int num3 = Mathf.CeilToInt(clashTimer * 10f); if (num3 != lastTenths) { clashText.text = $"DOMAIN CLASH! {(float)num3 / 10f:F1}s\nDEAL DAMAGE!"; lastTenths = num3; } float num4 = damageA + damageB; float num5 = 0.5f; if (num4 > 0f) { num5 = damageA / num4; } tugOfWarFill.anchorMax = new Vector2(num5, 1f); yield return null; } clashUIContainer.SetActive(false); IsClashActive = false; if (damageA > damageB) { JJKCardHelper.CreateFloatingText("DOMAIN OVERPOWERED!", ((Component)pA).transform.position + Vector3.up, Color.cyan); ActiveDomainCaster = pA; callbackA?.Invoke(); } else if (damageB > damageA) { JJKCardHelper.CreateFloatingText("DOMAIN OVERPOWERED!", ((Component)pB).transform.position + Vector3.up, Color.red); ActiveDomainCaster = pB; callbackB?.Invoke(); } else { JJKCardHelper.CreateFloatingText("MUTUAL DESTRUCTION!", center + Vector3.down, Color.white); JJKCardHelper.CreateFloatingText("DOMAINS SHATTERED!", center + Vector3.up, Color.gray); ActiveDomainCaster = null; } } public void EndDomain(Player caster) { if ((Object)(object)ActiveDomainCaster == (Object)(object)caster) { ActiveDomainCaster = null; ActiveWinCallback = null; } } } public class JJKAudioManager : MonoBehaviour { public static JJKAudioManager instance; private Dictionary<string, AudioClip> audioClips = new Dictionary<string, AudioClip>(); private string audioFolderPath; private Queue<AudioSource> audioSourcePool = new Queue<AudioSource>(); private void Awake() { if ((Object)(object)instance == (Object)null) { instance = this; Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); audioFolderPath = Path.Combine(directoryName, "Audio"); if (!Directory.Exists(audioFolderPath)) { Directory.CreateDirectory(audioFolderPath); } ((MonoBehaviour)this).StartCoroutine(LoadAllAudioClips()); InitializePool(10); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void InitializePool(int count) { for (int i = 0; i < count; i++) { audioSourcePool.Enqueue(CreateNewAudioSource()); } } private AudioSource CreateNewAudioSource() { //IL_0005: 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_001b: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("JJK_PooledAudio"); val.transform.SetParent(((Component)this).transform); AudioSource result = val.AddComponent<AudioSource>(); val.SetActive(false); return result; } private AudioSource GetAudioSource() { while (audioSourcePool.Count > 0) { AudioSource val = audioSourcePool.Dequeue(); if ((Object)(object)val != (Object)null) { ((Component)val).gameObject.SetActive(true); return val; } } return CreateNewAudioSource(); } private IEnumerator ReturnToPool(AudioSource source, float delay) { yield return (object)new WaitForSeconds(delay); if ((Object)(object)source != (Object)null) { source.Stop(); source.clip = null; ((Component)source).gameObject.SetActive(false); audioSourcePool.Enqueue(source); } } private IEnumerator LoadAllAudioClips() { if (!Directory.Exists(audioFolderPath)) { yield break; } string[] files = Directory.GetFiles(audioFolderPath, "*.*"); string[] array = files; foreach (string file in array) { if (!file.EndsWith(".wav") && !file.EndsWith(".ogg") && !file.EndsWith(".mp3")) { continue; } AudioType val = (AudioType)0; if (file.EndsWith(".wav")) { val = (AudioType)20; } else if (file.EndsWith(".ogg")) { val = (AudioType)14; } else if (file.EndsWith(".mp3")) { val = (AudioType)13; } string text = "file:///" + file.Replace("\\", "/"); UnityWebRequest www = UnityWebRequestMultimedia.GetAudioClip(text, val); try { yield return www.SendWebRequest(); if (www.isNetworkError || www.isHttpError) { Debug.LogError((object)("[JJKCardsMod] Failed to load audio file " + file + ": " + www.error)); continue; } AudioClip content = DownloadHandlerAudioClip.GetContent(www); string text2 = Path.GetFileNameWithoutExtension(file).ToLower(); audioClips[text2] = content; Debug.Log((object)("[JJKCardsMod] Successfully loaded audio: " + text2)); } finally { ((IDisposable)www)?.Dispose(); } } } public void PlaySound(string soundName, Vector3 position, float volume = 1f, float duration = -1f) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) soundName = soundName.ToLower(); if (audioClips.TryGetValue(soundName, out var value)) { AudioSource audioSource = GetAudioSource(); ((Component)audioSource).transform.position = position; audioSource.clip = value; audioSource.spatialBlend = 1f; audioSource.volume = volume; audioSource.maxDistance = 30f; audioSource.rolloffMode = (AudioRolloffMode)1; audioSource.Play(); float delay = ((duration > 0f) ? duration : (value.length + 0.1f)); ((MonoBehaviour)this).StartCoroutine(ReturnToPool(audioSource, delay)); } } public void PlaySoundGlobal(string soundName, float volume = 1f, float duration = -1f) { soundName = soundName.ToLower(); if (audioClips.TryGetValue(soundName, out var value)) { AudioSource audioSource = GetAudioSource(); audioSource.clip = value; audioSource.spatialBlend = 0f; audioSource.volume = volume; audioSource.Play(); float delay = ((duration > 0f) ? duration : (value.length + 0.1f)); ((MonoBehaviour)this).StartCoroutine(ReturnToPool(audioSource, delay)); } } } [BepInPlugin("com.lennox.rounds.jjkcards", "JJK Cursed Techniques", "1.4.25")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class JJKCardsPlugin : BaseUnityPlugin { [CompilerGenerated] private static class <>O { public static PhotonEvent <0>__OnBoogieWoogieSwapEvent; public static PhotonEvent <1>__OnInfiniteVoidEvent; public static PhotonEvent <2>__OnFistHitEvent; public static PhotonEvent <3>__OnFistAnimationEvent; public static PhotonEvent <4>__OnMalevolentShrineEvent; public static PhotonEvent <5>__OnTenShadowsEvent; public static PhotonEvent <6>__OnBlueEvent; public static PhotonEvent <7>__OnRedEvent; public static PhotonEvent <8>__OnDismantleAuraEvent; public static PhotonEvent <9>__OnHollowPurpleEvent; public static PhotonEvent <10>__OnPiercingBloodEvent; public static PhotonEvent <11>__OnSimpleDomainEvent; public static PhotonEvent <12>__OnCleaveEvent; public static PhotonEvent <13>__OnDivineFlameEvent; public static PhotonEvent <14>__OnChimeraShadowEvent; public static PhotonEvent <15>__OnDivineDogEvent; public static PhotonEvent <16>__OnRikaEvent; public static PhotonEvent <17>__OnSpeechEvent; public static PhotonEvent <18>__OnBeamEvent; public static PhotonEvent <19>__OnDomainEvent; public static PhotonEvent <20>__OnCollapseEvent; public static PhotonEvent <21>__OnSupernovaEvent; public static PhotonEvent <22>__OnRedScaleEvent; public static PhotonEvent <23>__OnSukunaRCTEvent; } private const string ModId = "com.lennox.rounds.jjkcards"; private const string ModName = "JJK Cursed Techniques"; public const string Version = "1.4.25"; public static ConfigEntry<bool> DisablePackLocking; public static ConfigEntry<string> CustomCardRarities; public static Dictionary<string, Rarity> CachedRarities = new Dictionary<string, Rarity>(); private void Awake() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) DisablePackLocking = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "DisablePackLocking", false, "Disable the JJK character set lock."); CustomCardRarities = ((BaseUnityPlugin)this).Config.Bind<string>("Rarities", "CustomCardRarities", "", "Custom rarities."); ParseRarities(); new Harmony("com.lennox.rounds.jjkcards").PatchAll(); } public static void ParseRarities() { CachedRarities.Clear(); string value = CustomCardRarities.Value; if (string.IsNullOrEmpty(value)) { return; } string[] array = value.Split(new char[1] { ';' }); for (int i = 0; i < array.Length; i++) { string[] array2 = array[i].Split(new char[1] { ':' }); if (array2.Length == 2) { string key = array2[0].Trim().ToLower(); switch (array2[1].Trim().ToLower()) { case "common": CachedRarities[key] = (Rarity)0; break; case "uncommon": CachedRarities[key] = (Rarity)1; break; case "rare": CachedRarities[key] = (Rarity)2; break; } } } } private void OnHandShakeCompleted() { if (PhotonNetwork.IsMasterClient) { NetworkingManager.RPC(typeof(JJKCardsPlugin), "SyncSettings", new object[2] { DisablePackLocking.Value, CustomCardRarities.Value }); } } [UnboundRPC] private static void SyncSettings(bool hL, string hR) { if (!PhotonNetwork.IsMasterClient) { DisablePackLocking.Value = hL; CustomCardRarities.Value = hR; ParseRarities(); } } private void Start() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) Unbound.RegisterHandshake("com.lennox.rounds.jjkcards", (Action)OnHandShakeCompleted); RegisterNetworkingEvents(); new GameObject("DomainManager").AddComponent<DomainManager>(); RegisterCards(); ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)Unbound.Instance, 0.8f, (Action)delegate { ClassesManagerHelper.RegisterJJK(); }); GameObject val = new GameObject("JJKCooldownManager"); val.AddComponent<JJKCooldownManager>(); Object.DontDestroyOnLoad((Object)val); new GameObject("JJKAudioManager").AddComponent<JJKAudioManager>(); } private void RegisterNetworkingEvents() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_0162: 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: Expected O, but got Unknown //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Expected O, but got Unknown //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Expected O, but got Unknown //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Expected O, but got Unknown //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Expected O, but got Unknown //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Expected O, but got Unknown //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Expected O, but got Unknown //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Expected O, but got Unknown //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Expected O, but got Unknown //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Expected O, but got Unknown //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Expected O, but got Unknown //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Expected O, but got Unknown //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Expected O, but got Unknown //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Expected O, but got Unknown object obj = <>O.<0>__OnBoogieWoogieSwapEvent; if (obj == null) { PhotonEvent val = BoogieWoogieBehaviour.OnBoogieWoogieSwapEvent; <>O.<0>__OnBoogieWoogieSwapEvent = val; obj = (object)val; } NetworkingManager.RegisterEvent("JJKCardsMod_BoogieWoogie_Swap", (PhotonEvent)obj); object obj2 = <>O.<1>__OnInfiniteVoidEvent; if (obj2 == null) { PhotonEvent val2 = InfiniteVoidBehaviour.OnInfiniteVoidEvent; <>O.<1>__OnInfiniteVoidEvent = val2; obj2 = (object)val2; } NetworkingManager.RegisterEvent("JJKCardsMod_InfiniteVoid_Activate", (PhotonEvent)obj2); object obj3 = <>O.<2>__OnFistHitEvent; if (obj3 == null) { PhotonEvent val3 = CursedFistsBehaviour.OnFistHitEvent; <>O.<2>__OnFistHitEvent = val3; obj3 = (object)val3; } NetworkingManager.RegisterEvent("JJKCardsMod_FistHit", (PhotonEvent)obj3); object obj4 = <>O.<3>__OnFistAnimationEvent; if (obj4 == null) { PhotonEvent val4 = CursedFistsBehaviour.OnFistAnimationEvent; <>O.<3>__OnFistAnimationEvent = val4; obj4 = (object)val4; } NetworkingManager.RegisterEvent("JJKCardsMod_FistAnimation", (PhotonEvent)obj4); object obj5 = <>O.<4>__OnMalevolentShrineEvent; if (obj5 == null) { PhotonEvent val5 = MalevolentShrineBehaviour.OnMalevolentShrineEvent; <>O.<4>__OnMalevolentShrineEvent = val5; obj5 = (object)val5; } NetworkingManager.RegisterEvent("JJKCardsMod_MalevolentShrine_Activate", (PhotonEvent)obj5); object obj6 = <>O.<5>__OnTenShadowsEvent; if (obj6 == null) { PhotonEvent val6 = TenShadowsBehaviour.OnTenShadowsEvent; <>O.<5>__OnTenShadowsEvent = val6; obj6 = (object)val6; } NetworkingManager.RegisterEvent("JJKCardsMod_TenShadows_Activate", (PhotonEvent)obj6); object obj7 = <>O.<6>__OnBlueEvent; if (obj7 == null) { PhotonEvent val7 = BlueBehaviour.OnBlueEvent; <>O.<6>__OnBlueEvent = val7; obj7 = (object)val7; } NetworkingManager.RegisterEvent("JJKCardsMod_Blue", (PhotonEvent)obj7); object obj8 = <>O.<7>__OnRedEvent; if (obj8 == null) { PhotonEvent val8 = RedBehaviour.OnRedEvent; <>O.<7>__OnRedEvent = val8; obj8 = (object)val8; } NetworkingManager.RegisterEvent("JJKCardsMod_Red", (PhotonEvent)obj8); object obj9 = <>O.<8>__OnDismantleAuraEvent; if (obj9 == null) { PhotonEvent val9 = SukunaTechniqueBehaviour.OnDismantleAuraEvent; <>O.<8>__OnDismantleAuraEvent = val9; obj9 = (object)val9; } NetworkingManager.RegisterEvent("JJKCardsMod_DismantleAura", (PhotonEvent)obj9); object obj10 = <>O.<9>__OnHollowPurpleEvent; if (obj10 == null) { PhotonEvent val10 = HollowPurpleUltimate.OnHollowPurpleEvent; <>O.<9>__OnHollowPurpleEvent = val10; obj10 = (object)val10; } NetworkingManager.RegisterEvent("JJKCardsMod_HollowPurple_Activate", (PhotonEvent)obj10); object obj11 = <>O.<10>__OnPiercingBloodEvent; if (obj11 == null) { PhotonEvent val11 = PiercingBloodBehaviour.OnPiercingBloodEvent; <>O.<10>__OnPiercingBloodEvent = val11; obj11 = (object)val11; } NetworkingManager.RegisterEvent("JJKCardsMod_PiercingBlood", (PhotonEvent)obj11); object obj12 = <>O.<11>__OnSimpleDomainEvent; if (obj12 == null) { PhotonEvent val12 = SimpleDomainBehaviour.OnSimpleDomainEvent; <>O.<11>__OnSimpleDomainEvent = val12; obj12 = (object)val12; } NetworkingManager.RegisterEvent("JJKCardsMod_SimpleDomain_Activate", (PhotonEvent)obj12); object obj13 = <>O.<12>__OnCleaveEvent; if (obj13 == null) { PhotonEvent val13 = CleaveBehaviour.OnCleaveEvent; <>O.<12>__OnCleaveEvent = val13; obj13 = (object)val13; } NetworkingManager.RegisterEvent("JJKCardsMod_Cleave", (PhotonEvent)obj13); object obj14 = <>O.<13>__OnDivineFlameEvent; if (obj14 == null) { PhotonEvent val14 = DivineFlameBehaviour.OnDivineFlameEvent; <>O.<13>__OnDivineFlameEvent = val14; obj14 = (object)val14; } NetworkingManager.RegisterEvent("JJKCardsMod_DivineFlame", (PhotonEvent)obj14); object obj15 = <>O.<14>__OnChimeraShadowEvent; if (obj15 == null) { PhotonEvent val15 = ChimeraShadowGardenBehaviour.OnChimeraShadowEvent; <>O.<14>__OnChimeraShadowEvent = val15; obj15 = (object)val15; } NetworkingManager.RegisterEvent("JJKCardsMod_ChimeraShadow_Activate", (PhotonEvent)obj15); object obj16 = <>O.<15>__OnDivineDogEvent; if (obj16 == null) { PhotonEvent val16 = DivineDogBehaviour.OnDivineDogEvent; <>O.<15>__OnDivineDogEvent = val16; obj16 = (object)val16; } NetworkingManager.RegisterEvent("JJKCardsMod_DivineDog", (PhotonEvent)obj16); object obj17 = <>O.<16>__OnRikaEvent; if (obj17 == null) { PhotonEvent val17 = RikaBehaviour.OnRikaEvent; <>O.<16>__OnRikaEvent = val17; obj17 = (object)val17; } NetworkingManager.RegisterEvent("JJKCardsMod_Rika", (PhotonEvent)obj17); object obj18 = <>O.<17>__OnSpeechEvent; if (obj18 == null) { PhotonEvent val18 = CursedSpeechBehaviour.OnSpeechEvent; <>O.<17>__OnSpeechEvent = val18; obj18 = (object)val18; } NetworkingManager.RegisterEvent("JJKCardsMod_Speech", (PhotonEvent)obj18); object obj19 = <>O.<18>__OnBeamEvent; if (obj19 == null) { PhotonEvent val19 = PureLoveBeamBehaviour.OnBeamEvent; <>O.<18>__OnBeamEvent = val19; obj19 = (object)val19; } NetworkingManager.RegisterEvent("JJKCardsMod_LoveBeam", (PhotonEvent)obj19); object obj20 = <>O.<19>__OnDomainEvent; if (obj20 == null) { PhotonEvent val20 = YutaDomainBehaviour.OnDomainEvent; <>O.<19>__OnDomainEvent = val20; obj20 = (object)val20; } NetworkingManager.RegisterEvent("JJKCardsMod_YutaDomain", (PhotonEvent)obj20); object obj21 = <>O.<20>__OnCollapseEvent; if (obj21 == null) { PhotonEvent val21 = CollapseBehaviour.OnCollapseEvent; <>O.<20>__OnCollapseEvent = val21; obj21 = (object)val21; } NetworkingManager.RegisterEvent("JJKCardsMod_Collapse", (PhotonEvent)obj21); object obj22 = <>O.<21>__OnSupernovaEvent; if (obj22 == null) { PhotonEvent val22 = SupernovaBehaviour.OnSupernovaEvent; <>O.<21>__OnSupernovaEvent = val22; obj22 = (object)val22; } NetworkingManager.RegisterEvent("JJKCardsMod_Supernova", (PhotonEvent)obj22); object obj23 = <>O.<22>__OnRedScaleEvent; if (obj23 == null) { PhotonEvent val23 = FlowingRedScaleBehaviour.OnRedScaleEvent; <>O.<22>__OnRedScaleEvent = val23; obj23 = (object)val23; } NetworkingManager.RegisterEvent("JJKCardsMod_RedScale", (PhotonEvent)obj23); object obj24 = <>O.<23>__OnSukunaRCTEvent; if (obj24 == null) { PhotonEvent val24 = SukunaRCTBehaviour.OnSukunaRCTEvent; <>O.<23>__OnSukunaRCTEvent = val24; obj24 = (object)val24; } NetworkingManager.RegisterEvent("JJKCardsMod_SukunaRCT", (PhotonEvent)obj24); } private void RegisterCards() { CustomCard.BuildCard<SorcererSelectionCard>(); CustomCard.BuildCard<GojoCard>(); CustomCard.BuildCard<SukunaCard>(); CustomCard.BuildCard<MegumiCard>(); CustomCard.BuildCard<YutaCard>(); CustomCard.BuildCard<TodoCard>(); CustomCard.BuildCard<NanamiCard>(); CustomCard.BuildCard<ChosoCard>(); CustomCard.BuildCard<BlueCard>(); CustomCard.BuildCard<RedCard>(); CustomCard.BuildCard<HollowPurpleCard>(); CustomCard.BuildCard<InfinityCard>(); CustomCard.BuildCard<InfiniteVoidCard>(); CustomCard.BuildCard<DismantleCard>(); CustomCard.BuildCard<CleaveCard>(); CustomCard.BuildCard<DivineFlameCard>(); CustomCard.BuildCard<MalevolentShrineCard>(); CustomCard.BuildCard<SukunaRCTCard>(); CustomCard.BuildCard<TenShadowsCard>(); CustomCard.BuildCard<DivineDogCard>(); CustomCard.BuildCard<ChimeraShadowGardenCard>(); CustomCard.BuildCard<MahoragaCard>(); CustomCard.BuildCard<FullPotentialMahoragaCard>(); CustomCard.BuildCard<YutaCopyCard>(); CustomCard.BuildCard<RikaCard>(); CustomCard.BuildCard<CursedSpeechCard>(); CustomCard.BuildCard<PureLoveBeamCard>(); CustomCard.BuildCard<AuthenticMutualLoveCard>(); CustomCard.BuildCard<BoogieWoogieCard>(); CustomCard.BuildCard<IQ530000Card>(); CustomCard.BuildCard<TodoBlackFlashCard>(); CustomCard.BuildCard<RatioCard>(); CustomCard.BuildCard<OvertimeCard>(); CustomCard.BuildCard<CollapseCard>(); CustomCard.BuildCard<DullKnifeCard>(); CustomCard.BuildCard<NanamiBlackFlashCard>(); CustomCard.BuildCard<PiercingBloodCard>(); CustomCard.BuildCard<SupernovaCard>(); CustomCard.BuildCard<FlowingRedScaleCard>(); CustomCard.BuildCard<BloodMeteoriteCard>(); CustomCard.BuildCard<BloodEdgeCard>(); CustomCard.BuildCard<BasicFistsCard>(); CustomCard.BuildCard<SimpleDomainCard>(); CustomCard.BuildCard<NewShadowStyleCard>(); CustomCard.BuildCard<DivergentFistCard>(); CustomCard.BuildCard<BlackFlashCard>(); CustomCard.BuildCard<InvertedSpearCard>(); CustomCard.BuildCard<SplitSoulKatanaCard>(); CustomCard.BuildCard<PlayfulCloudCard>(); CustomCard.BuildCard<IdleTransfigurationCard>(); } } public class JJKDevTools : MonoBehaviour { private void Update() { if (Input.GetKeyDown((KeyCode)285)) { Spawn(); } } private void Spawn() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_016e: 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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown Player val = ((IEnumerable<Player>)PlayerManager.instance.players).FirstOrDefault((Func<Player, bool>)((Player pl) => pl.data.view.IsMine)); if ((Object)(object)val == (Object)null) { return; } GameObject val2 = GameObject.CreatePrimitive((PrimitiveType)1); val2.transform.position = ((Component)val).transform.position + Vector3.up * 3f; Object.Destroy((Object)(object)val2.GetComponent<CapsuleCollider>()); val2.AddComponent<CapsuleCollider2D>(); Rigidbody2D obj = val2.AddComponent<Rigidbody2D>(); obj.mass = 100f; obj.freezeRotation = true; val2.layer = ((LayerMask.NameToLayer("Player") == -1) ? 10 : LayerMask.NameToLayer("Player")); JJKCustomDummy cd = val2.AddComponent<JJKCustomDummy>(); DamagableEvent obj2 = val2.AddComponent<DamagableEvent>(); FieldInfo field = typeof(DamagableEvent).GetField("damageEvent"); if (field != null) { object value = field.GetValue(obj2); if (value != null) { MethodInfo method = value.GetType().GetMethod("AddListener"); if (method.GetParameters()[0].ParameterType.IsGenericType) { method.Invoke(value, new object[1] { (UnityAction<Vector2>)delegate { cd.TakeDamage(55f); } }); } else { method.Invoke(value, new object[1] { (object)(UnityAction)delegate { cd.TakeDamage(55f); } }); } } } val2.GetComponent<Renderer>().material.color = Color.red; JJKCardHelper.CreateFloatingText("DUMMY!", val2.transform.position, Color.green); } } public class JJKCustomDummy : MonoBehaviour { public float h = 5000f; public void TakeDamage(float d) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) h -= d; JJKCardHelper.CreateFloatingText("-" + Mathf.RoundToInt(d), ((Component)this).transform.position + Vector3.up, Color.red); if (h <= 0f) { JJKCardHelper.CreateFloatingText("DEAD", ((Component)this).transform.position, Color.gray); Object.Destroy((Object)(object)((Component)this).gameObject, 0.1f); } } } public static class JJKCardHelper { public static CardCategory J_T; public static CardCategory J_C; private static Queue<GameObject> pool = new Queue<GameObject>(); private static Material mat; private static Dictionary<string, GameObject> cache = new Dictionary<string, GameObject>(); public static void SetUniqueCategory(CardInfo c) { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown ConfigEntry<bool> disablePackLocking = JJKCardsPlugin.DisablePackLocking; if (disablePackLocking != null && disablePackLocking.Value) { return; } try { Type type = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((Assembly a) => a.GetName().Name == "CardChoiceSpawnUniqueCardPatch")?.GetType("CardChoiceSpawnUniqueCardPatch.CustomCategories.CustomCardCategories"); object obj = type?.GetField("instance", BindingFlags.Static | BindingFlags.Public)?.GetValue(null); if (obj == null) { return; } MethodInfo method = type.GetMethod("CardCategory", new Type[1] { typeof(string) }); if ((Object)(object)J_T == (Object)null) { J_T = (CardCategory)(method?.Invoke(obj, new object[1] { "JJK_Technique" })); } if ((Object)(object)J_C == (Object)null) { J_C = (CardCategory)(method?.Invoke(obj, new object[1] { "JJK_Character_Card" })); } CardCategory val = (CardCategory)(method?.Invoke(obj, new object[1] { Res(((Object)c).name) })); List<CardCategory> list = new List<CardCategory>(); if (c.categories != null) { list.AddRange(c.categories); } if (((Object)c).name.StartsWith("JJK_Char_") || ((Object)c).name == "SorcererSelectionCard") { if (!list.Contains(J_C)) { list.Add(J_C); } } else { if (!list.Contains(J_T)) { list.Add(J_T); } if ((Object)(object)val != (Object)null && !list.Contains(val)) { list.Add(val); } } c.categories = list.ToArray(); } catch { } } public static void ApplyInitialBlacklists(Player p) { ConfigEntry<bool> disablePackLocking = JJKCardsPlugin.DisablePackLocking; if ((disablePackLocking == null || !disablePackLocking.Value) && (Object)(object)J_T != (Object)null) { CharacterStatModifiersExtension.GetAdditionalData(p.data.stats).blacklistedCategories.Add(J_T); } } public static void UnlockCharacter(Player p, string t) { //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown ConfigEntry<bool> disablePackLocking = JJKCardsPlugin.DisablePackLocking; if (disablePackLocking != null && disablePackLocking.Value) { return; } CharacterStatModifiersAdditionalData additionalData = CharacterStatModifiersExtension.GetAdditionalData(p.data.stats); if ((Object)(object)J_T != (Object)null) { additionalData.blacklistedCategories.Remove(J_T); } if ((Object)(object)J_C != (Object)null) { additionalData.blacklistedCategories.Add(J_C); } string[] array = new string[7] { "JJK_Gojo_Pack", "JJK_Sukuna_Pack", "JJK_Todo_Pack", "JJK_Nanami_Pack", "JJK_Choso_Pack", "JJK_Megumi_Pack", "JJK_Yuta_Pack" }; Type? obj = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((Assembly a) => a.GetName().Name == "CardChoiceSpawnUniqueCardPatch")?.GetType("CardChoiceSpawnUniqueCardPatch.CustomCategories.CustomCardCategories"); object obj2 = obj?.GetField("instance", BindingFlags.Static | BindingFlags.Public)?.GetValue(null); MethodInfo methodInfo = obj?.GetMethod("CardCategory", new Type[1] { typeof(string) }); string[] array2 = array; foreach (string text in array2) { if (text != "JJK_" + t + "_Pack") { CardCategory val = (CardCategory)(methodInfo?.Invoke(obj2, new object[1] { text })); if ((Object)(object)val != (Object)null) { additionalData.blacklistedCategories.Add(val); } } } } private static string Res(string n) { if (n.Contains("_Gojo")) { return "JJK_Gojo_Pack"; } if (n.Contains("_Sukuna")) { return "JJK_Sukuna_Pack"; } if (n.Contains("_Todo")) { return "JJK_Todo_Pack"; } if (n.Contains("_Nanami")) { return "JJK_Nanami_Pack"; } if (n.Contains("_Choso")) { return "JJK_Choso_Pack"; } if (n.Contains("_Megumi")) { return "JJK_Megumi_Pack"; } if (n.Contains("_Yuta")) { return "JJK_Yuta_Pack"; } return "JJK_General_Pack"; } public static void CreateFloatingText(string t, Vector3 w, Color c) { //IL_00c3: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) GameObject val = ((pool.Count > 0) ? pool.Dequeue() : null); if ((Object)(object)val != (Object)null) { val.SetActive(true); } if ((Object)(object)val == (Object)null) { val = new GameObject("JJK_FT"); TextMesh obj = val.AddComponent<TextMesh>(); obj.fontSize = 42; obj.characterSize = 0.08f; obj.anchor = (TextAnchor)4; obj.alignment = (TextAlignment)1; MeshRenderer obj2 = val.AddComponent<MeshRenderer>(); if ((Object)(object)mat == (Object)null) { mat = new Material(Shader.Find("GUI/Text Shader")); ((Object)mat).hideFlags = (HideFlags)61; } ((Renderer)obj2).sharedMaterial = mat; ((Renderer)obj2).sortingOrder = 9999; val.AddComponent<FloatingTextBehaviour>(); Object.DontDestroyOnLoad((Object)(object)val); } val.transform.position = w + Vector3.up * 1.5f; TextMesh component = val.GetComponent<TextMesh>(); if ((Object)(object)component != (Object)null) { component.text = t; component.color = c; } val.GetComponent<FloatingTextBehaviour>()?.ResetTimer(c); } public static void ReturnFloatingTextToPool(GameObject o) { if ((Object)(object)o != (Object)null) { o.SetActive(false); pool.Enqueue(o); } } public static GameObject GetCardArt(string a) { //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_009b: 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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) if (cache.ContainsKey(a) && (Object)(object)cache[a] != (Object)null) { return Object.Instantiate<GameObject>(cache[a]); } try { Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("JJKCardsMod.Assets." + a); if (manifestResourceStream != null) { byte[] array = new byte[manifestResourceStream.Length]; manifestResourceStream.Read(array, 0, (int)manifestResourceStream.Length); Texture2D val = new Texture2D(2, 2); ImageConversion.LoadImage(val, array); ((Texture)val).filterMode = (FilterMode)2; Sprite sprite = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), (float)((Texture)val).width / 3.5f); GameObject val2 = new GameObject("Art_" + a); val2.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer obj = val2.AddComponent<SpriteRenderer>(); obj.sprite = sprite; ((Renderer)obj).sortingOrder = 5; Object.DontDestroyOnLoad((Object)(object)val2); val2.SetActive(false); cache[a] = val2; return Object.Instantiate<GameObject>(val2); } } catch { } return new GameObject("Missing"); } } public static class ClassesManagerHelper { public static void RegisterJJK() { try { Assembly assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((Assembly a) => a.GetName().Name == "ClassesManagerReborn"); Type type = assembly?.GetType("ClassesManagerReborn.ClassesManager"); if (type == null) { return; } object m = type.GetField("instance", BindingFlags.Static | BindingFlags.Public)?.GetValue(null); type.GetMethod("RegisterMenu")?.Invoke(m, new object[2] { "Jujutsu Kaisen", null }); Type? type2 = assembly.GetType("ClassesManagerReborn.ClassHandler+ClassObjectType"); object arg = Enum.Parse(type2, "Class"); object arg2 = Enum.Parse(type2, "Card"); MethodInfo[] source = (from mt in type.GetMethods() where mt.Name == "Register" select mt).ToArray(); MethodInfo r2 = source.FirstOrDefault((MethodInfo mt) => mt.GetParameters().Length == 2); MethodInfo r3 = source.FirstOrDefault((MethodInfo mt) => mt.GetParameters().Length == 3); Action<CardInfo, object> action = delegate(CardInfo c, object v) { if ((Object)(object)c != (Object)null) { r2?.Invoke(m, new object[2] { c, v }); } }; Action<CardInfo, object, CardInfo> obj = delegate(CardInfo c, object v, CardInfo p) { if ((Object)(object)c != (Object)null && (Object)(object)p != (Object)null) { r3?.Invoke(m, new object[3] { c, v, p }); } }; CardInfo val = f("JJK_Char_Gojo"); CardInfo val2 = f("JJK_Char_Sukuna"); CardInfo val3 = f("JJK_Char_Megumi"); CardInfo val4 = f("JJK_Char_Yuta"); CardInfo val5 = f("JJK_Char_Todo"); CardInfo val6 = f("JJK_Char_Nanami"); CardInfo val7 = f("JJK_Char_Choso"); action(val, arg); obj(f("JJK_Tech_Gojo_Blue"), arg2, val); obj(f("JJK_Tech_Gojo_Red"), arg2, val); obj(f("JJK_Tech_Gojo_Purple"), arg2, val); obj(f("JJK_Tech_Gojo_Infinity"), arg2, val); obj(f("JJK_Tech_Gojo_Void"), arg2, val); action(val2, arg); obj(f("JJK_Tech_Sukuna_Dismantle"), arg2, val2); obj(f("JJK_Tech_Sukuna_Cleave"), arg2, val2); obj(f("JJK_Tech_Sukuna_DivineFlame"), arg2, val2); obj(f("JJK_Tech_Sukuna_Shrine"), arg2, val2); obj(f("JJK_Tech_Sukuna_RCT"), arg2, val2); action(val3, arg); obj(f("JJK_Tech_Megumi_Nue"), arg2, val3); obj(f("JJK_Tech_Megumi_DivineDog"), arg2, val3); obj(f("JJK_Tech_Megumi_Domain"), arg2, val3); obj(f("JJK_Tech_Megumi_Mahoraga"), arg2, val3); obj(f("JJK_Tech_Megumi_MahoragaFull"), arg2, val3); action(val4, arg); obj(f("JJK_Tech_Yuta_Copy"), arg2, val4); obj(f("JJK_Tech_Yuta_Rika"), arg2, val4); obj(f("JJK_Tech_Yuta_Speech"), arg2, val4); obj(f("JJK_Tech_Yuta_Beam"), arg2, val4); obj(f("JJK_Tech_Yuta_Domain"), arg2, val4); action(val7, arg); obj(f("JJK_FistSkill_PiercingBlood"), arg2, val7); obj(f("JJK_Tech_Choso_Supernova"), arg2, val7); obj(f("JJK_Tech_Choso_RedScale"), arg2, val7); obj(f("JJK_Tech_Choso_Meteorite"), arg2, val7); obj(f("JJK_Tech_Choso_BloodEdge"), arg2, val7); action(val6, arg); obj(f("JJK_Tech_Nanami_Ratio"), arg2, val6); obj(f("JJK_Tech_Nanami_Collapse"), arg2, val6); obj(f("JJK_Tech_Nanami_Overtime"), arg2, val6); obj(f("JJK_Tech_Nanami_DullKnife"), arg2, val6); obj(f("JJK_Tech_Nanami_BlackFlash"), arg2, val6); action(val5, arg); obj(f("JJK_Tech_Todo_Boogie"), arg2, val5); obj(f("JJK_Tech_Todo_IQ"), arg2, val5); obj(f("JJK_Tech_Todo_BlackFlash"), arg2, val5); } catch { } static CardInfo f(string n) { return ((IEnumerable<CardInfo>)CardChoice.instance.cards).FirstOrDefault((Func<CardInfo, bool>)((CardInfo cc) => ((Object)((Component)cc).gameObject).name == n)); } } } public class FloatingTextBehaviour : MonoBehaviour { public float d = 2f; public Color c; private float t; private TextMesh m; private void Awake() { m = ((Component)this).GetComponent<TextMesh>(); } public void ResetTimer(Color co) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) t = 0f; c = co; ((Component)this).transform.localScale = Vector3.zero; } private void Update() { //IL_0032: 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_0046: 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_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_011d: Unknown result type (might be due to invalid IL or missing references) t += Time.deltaTime; if (t >= d) { JJKCardHelper.ReturnFloatingTextToPool(((Component)this).gameObject); return; } ((Component)this).transform.Translate(Vector3.up * Time.deltaTime * 1.2f, (Space)0); float num = ((t < 0.25f) ? Mathf.Lerp(0f, 1.2f, t / 0.25f) : ((t < 0.4f) ? Mathf.Lerp(1.2f, 1f, (t - 0.25f) / 0.15f) : 1f)); ((Component)this).transform.localScale = new Vector3(num, num, 1f); if ((Object)(object)m != (Object)null) { Color color = c; if (t > d * 0.6f) { color.a = Mathf.Clamp01((d - t) / (d * 0.4f)); } m.color = color; } } } [HarmonyPatch(typeof(CardChoice), "Start")] public class CardChoicePatch { [HarmonyPostfix] private static void Postfix(CardChoice __i) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (__i?.cards == null) { return; } CardInfo[] cards = __i.cards; foreach (CardInfo val in cards) { if (!((Object)(object)val == (Object)null)) { string key = ((Object)val).name.ToLower(); string key2 = val.cardName.ToLower(); if (JJKCardsPlugin.CachedRarities.ContainsKey(key)) { val.rarity = JJKCardsPlugin.CachedRarities[key]; } else if (JJKCardsPlugin.CachedRarities.ContainsKey(key2)) { val.rarity = JJKCardsPlugin.CachedRarities[key2]; } } } } } [HarmonyPatch(typeof(Player), "Awake")] internal class Patch_Player_Awake_JJK { private static void Postfix(Player __i) { JJKCardHelper.ApplyInitialBlacklists(__i); } } [HarmonyPatch(typeof(Cards), "GetRandomCardWithCondition")] internal class GetRandomCardWithConditionPatch { [HarmonyPostfix] private static void Postfix(ref CardInfo __r) { if (!((Object)(object)__r == (Object)null)) { return; } CardChoice instance = CardChoice.instance; if (instance != null && instance.cards?.Length > 0) { __r = ((IEnumerable<CardInfo>)CardChoice.instance.cards).FirstOrDefault((Func<CardInfo, bool>)((CardInfo c) => (Object)(object)c != (Object)null && ((Object)((Component)c).gameObject).name.Contains("Block"))) ?? ((IEnumerable<CardInfo>)CardChoice.instance.cards).FirstOrDefault((Func<CardInfo, bool>)((CardInfo c) => (Object)(object)c != (Object)null && ((Object)((Component)c).gameObject).name.Contains("Health"))) ?? ((IEnumerable<CardInfo>)CardChoice.instance.cards).FirstOrDefault((Func<CardInfo, bool>)((CardInfo c) => (Object)(object)c != (Object)null && (c.categories == null || c.categories.Length == 0))) ?? CardChoice.instance.cards[0]; } } } public class JJKCooldownManager : MonoBehaviour { public static JJKCooldownManager instance; private Player localPlayer; public Dictionary<string, Func<string>> trackedAbilities = new Dictionary<string, Func<string>>(); private GUIStyle titleStyle; private GUIStyle itemStyle; private GUIStyle shadowStyle; private bool stylesInitialized; private void Awake() { if ((Object)(object)instance == (Object)null) { instance = this; } else if ((Object)(object)instance != (Object)(object)this) { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void Update() { if ((!((Object)(object)localPlayer == (Object)null) && !localPlayer.data.dead) || !((Object)(object)PlayerManager.instance != (Object)null) || PlayerManager.instance.players == null) { return; } foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && (Object)(object)player.data != (Object)null && (Object)(object)player.data.view != (Object)null && player.data.view.IsMine) { localPlayer = player; break; } } } public void RegisterAbility(string name, Func<string> getStatus) { trackedAbilities[name] = getStatus; } public void UnregisterAbility(string name) { if (trackedAbilities.ContainsKey(name)) { trackedAbilities.Remove(name); } } private void InitStyles() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) titleStyle = new GUIStyle(); titleStyle.fontSize = 24; titleStyle.fontStyle = (FontStyle)1; titleStyle.normal.textColor = new Color(0.8f, 0.2f, 0.8f, 1f); itemStyle = new GUIStyle(); itemStyle.fontSize = 18; itemStyle.fontStyle = (FontStyle)1; shadowStyle = new GUIStyle(itemStyle); shadowStyle.normal.textColor = new Color(0f, 0f, 0f, 0.8f); stylesInitialized = true; } private void OnGUI() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)localPlayer == (Object)null || (Object)(object)localPlayer.data == (Object)null || localPlayer.data.dead || trackedAbilities.Count == 0) { return; } if (!stylesInitialized) { InitStyles(); } float num = (float)Screen.height * 0.3f; float num2 = 20f; GUI.Label(new Rect(num2, num, 200f, 30f), "JJK Techniques", titleStyle); num += 35f; foreach (KeyValuePair<string, Func<string>> trackedAbility in trackedAbilities) { string text = trackedAbility.Value(); string text2 = trackedAbility.Key + ": " + text; Color textColor = (Color)((text == "READY") ? Color.green : new Color(1f, 0.7f, 0f)); itemStyle.normal.textColor = textColor; GUI.Label(new Rect(num2 + 2f, num + 2f, 300f, 30f), text2, shadowStyle); GUI.Label(new Rect(num2, num, 300f, 30f), text2, itemStyle); num += 30f; } } } } namespace JJKCardsMod.Cards { public class BasicFistsCard : CustomCard { protected override string GetTitle() { return "Cursed Fists (Basic)"; } protected override string GetDescription() { return "Replaces your gun with melee Fists. Your punches scale with your gun's stats (Damage, Attack Speed, and Range via Bullet Speed)."; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Melee Attack", amount = "Yes", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0020: 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_0042: Expected O, but got Unknown //IL_00eb: 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_008d: 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_00b1: 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) GameObject val = new GameObject("BasicFistsArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent<SpriteRenderer>(); ((Renderer)val2).sortingOrder = 5; Texture2D val3 = new Texture2D(64, 64); Color val4 = default(Color); ((Color)(ref val4))..ctor(0.9f, 0.7f, 0.6f, 1f); Color val5 = default(Color); ((Color)(ref val5))..ctor(0.2f, 0.2f, 0.2f, 0.8f); for (int i = 0; i < 64; i++) { for (int j = 0; j < 64; j++) { val3.SetPixel(j, i, (Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(32f, 32f)) < 20f) ? val4 : val5); } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, 64f, 64f), new Vector2(0.5f, 0.5f), 32f); return val; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.attackSpeed = 0.5f; cardInfo.allowMultiple = false; ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_BasicFists"; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent<CursedFistsBehaviour>() == (Object)null) { ((Component)player).gameObject.AddComponent<CursedFistsBehaviour>().player = player; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CursedFistsBehaviour component = ((Component)player).gameObject.GetComponent<CursedFistsBehaviour>(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class BlueCard : CustomCard { public class ProceduralSpinner : MonoBehaviour { private void Update() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.Rotate(Vector3.forward, -90f * Time.deltaTime); } } protected override string GetTitle() { return "Lapse: Blue"; } protected override string GetDescription() { return "Press [Q] to unleash a massive gravitational field around you, violently pulling all nearby enemies and projectiles towards you! (6s CD)"; } protected override Rarity GetRarity() { return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //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_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Blue Grapple [Q]", amount = "Yes", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Cooldown", amount = "6s", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)7; } protected override GameObject GetCardArt() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0020: 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_0048: Expected O, but got Unknown //IL_0079: 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_0180: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: 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_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("BlueVortexArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent<SpriteRenderer>(); ((Renderer)val2).sortingOrder = 5; int num = 128; Texture2D val3 = new Texture2D(num, num, (TextureFormat)4, false); ((Texture)val3).filterMode = (FilterMode)0; Color val4 = default(Color); ((Color)(ref val4))..ctor(0f, 0f, 0f, 0f); for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { val3.SetPixel(j, i, val4); } } int num2 = num / 2; int num3 = num / 2; for (int k = 0; k < num; k++) { for (int l = 0; l < num; l++) { float num4 = l - num2; float num5 = k - num3; float num6 = Mathf.Sqrt(num4 * num4 + num5 * num5); if (num6 < 55f && Mathf.Sin(Mathf.Atan2(num5, num4) * 3f + num6 / 6f) > 0.3f) { Color val5 = Color.Lerp(Color.blue, Color.cyan, num6 / 55f); val5.a = (1f - num6 / 55f) * 0.9f; val3.SetPixel(l, k, val5); } } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); val.AddComponent<ProceduralSpinner>(); return val; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Gojo_Blue"; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent<BlueBehaviour>() == (Object)null) { ((Component)player).gameObject.AddComponent<BlueBehaviour>(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BlueBehaviour component = ((Component)player).gameObject.GetComponent<BlueBehaviour>(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class BlueBehaviour : MonoBehaviour { private Player player; private float cooldownTimer; private const float Cooldown = 6f; private void Awake() { player = ((Component)this).GetComponent<Player>(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[Q] Lapse: Blue", () => (!(cooldownTimer <= 0f)) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[Q] Lapse: Blue"); } } private void Update() { if (cooldownTimer > 0f) { cooldownTimer -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)113) && cooldownTimer <= 0f) { FireBlue(); } } private void FireBlue() { cooldownTimer = 6f; NetworkingManager.RaiseEvent("JJKCardsMod_Blue", new object[1] { player.playerID }); } public static void OnBlueEvent(object[] data) { //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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_0249: 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_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Expected O, but got Unknown //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: 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_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length == 0) { return; } int num = Convert.ToInt32(data[0]); Player val = null; foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && player.playerID == num) { val = player; break; } } if (!((Object)(object)val != (Object)null)) { return; } JJKCardHelper.CreateFloatingText("LAPSE: BLUE!", ((Component)val).transform.position + Vector3.up, Color.cyan); Vector3 val3; foreach (Player player2 in PlayerManager.instance.players) { if ((Object)(object)player2 != (Object)null && (Object)(object)player2 != (Object)(object)val && !player2.data.dead) {