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 _shockwavePool = new Queue(); private static Queue _sparksPool = new Queue(); private static Queue _projectilePool = new Queue(); private static Dictionary _casterColliderCache = new Dictionary(); 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(); 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 pool, Func 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 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 list = new List(); foreach (KeyValuePair 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 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 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(); obj.sprite = CachedCircleSprite; ((Renderer)obj).material = CachedSpriteMaterial; Rigidbody2D obj2 = val2.AddComponent(); obj2.isKinematic = false; obj2.gravityScale = 0f; obj2.collisionDetectionMode = (CollisionDetectionMode2D)1; ((Collider2D)val2.AddComponent()).isTrigger = false; val2.AddComponent(); return val2; }); fromPool.transform.position = Vector2.op_Implicit(position); fromPool.GetComponent().color = Color.cyan; fromPool.transform.localScale = Vector3.one * radius * 2f; Rigidbody2D component = fromPool.GetComponent(); component.velocity = ((Vector2)(ref direction)).normalized * speed; component.angularVelocity = 0f; CircleCollider2D component2 = fromPool.GetComponent(); component2.radius = 0.5f; if ((Object)(object)caster != (Object)null) { if (!_casterColliderCache.TryGetValue(caster, out var value)) { value = caster.GetComponentsInChildren(); _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().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(); ((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(); 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(); ((Renderer)val.GetComponent()).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(); ParticleSystemRenderer component2 = val.GetComponent(); ((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(); 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 _onHit; private float _lifetime; private bool _isDead; private Queue _pool; private Coroutine _lifetimeRoutine; public void Initialize(float lifetime, Action onHit, Queue 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() != (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(); obj.renderMode = (RenderMode)0; obj.sortingOrder = 100; val.AddComponent().uiScaleMode = (ScaleMode)1; clashUIContainer = new GameObject("ClashContainer"); clashUIContainer.transform.SetParent(val.transform, false); RectTransform obj2 = clashUIContainer.AddComponent(); 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(); clashText.font = Resources.GetBuiltinResource("Arial.ttf"); clashText.alignment = (TextAnchor)4; clashText.fontSize = 40; ((Graphic)clashText).color = Color.magenta; clashText.text = "DOMAIN CLASH! DEAL DAMAGE!"; RectTransform component = val2.GetComponent(); 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()).color = new Color(0.1f, 0.1f, 0.1f, 0.9f); RectTransform component2 = val3.GetComponent(); 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()).color = Color.cyan; RectTransform component3 = val4.GetComponent(); component3.anchorMin = new Vector2(0f, 0f); component3.anchorMax = new Vector2(0.5f, 1f); component3.offsetMin = Vector2.zero; component3.offsetMax = Vector2.zero; tugOfWarFill = val4.GetComponent(); 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 audioClips = new Dictionary(); private string audioFolderPath; private Queue audioSourcePool = new Queue(); 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(); 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 DisablePackLocking; public static ConfigEntry CustomCardRarities; public static Dictionary CachedRarities = new Dictionary(); private void Awake() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) DisablePackLocking = ((BaseUnityPlugin)this).Config.Bind("General", "DisablePackLocking", false, "Disable the JJK character set lock."); CustomCardRarities = ((BaseUnityPlugin)this).Config.Bind("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(); RegisterCards(); ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)Unbound.Instance, 0.8f, (Action)delegate { ClassesManagerHelper.RegisterJJK(); }); GameObject val = new GameObject("JJKCooldownManager"); val.AddComponent(); Object.DontDestroyOnLoad((Object)val); new GameObject("JJKAudioManager").AddComponent(); } 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(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); } } 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)PlayerManager.instance.players).FirstOrDefault((Func)((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()); val2.AddComponent(); Rigidbody2D obj = val2.AddComponent(); obj.mass = 100f; obj.freezeRotation = true; val2.layer = ((LayerMask.NameToLayer("Player") == -1) ? 10 : LayerMask.NameToLayer("Player")); JJKCustomDummy cd = val2.AddComponent(); DamagableEvent obj2 = val2.AddComponent(); 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)delegate { cd.TakeDamage(55f); } }); } else { method.Invoke(value, new object[1] { (object)(UnityAction)delegate { cd.TakeDamage(55f); } }); } } } val2.GetComponent().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 pool = new Queue(); private static Material mat; private static Dictionary cache = new Dictionary(); 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 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 list = new List(); 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 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 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(); obj.fontSize = 42; obj.characterSize = 0.08f; obj.anchor = (TextAnchor)4; obj.alignment = (TextAlignment)1; MeshRenderer obj2 = val.AddComponent(); 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(); Object.DontDestroyOnLoad((Object)(object)val); } val.transform.position = w + Vector3.up * 1.5f; TextMesh component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.text = t; component.color = c; } val.GetComponent()?.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(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(); obj.sprite = sprite; ((Renderer)obj).sortingOrder = 5; Object.DontDestroyOnLoad((Object)(object)val2); val2.SetActive(false); cache[a] = val2; return Object.Instantiate(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 action = delegate(CardInfo c, object v) { if ((Object)(object)c != (Object)null) { r2?.Invoke(m, new object[2] { c, v }); } }; Action 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)CardChoice.instance.cards).FirstOrDefault((Func)((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(); } 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)CardChoice.instance.cards).FirstOrDefault((Func)((CardInfo c) => (Object)(object)c != (Object)null && ((Object)((Component)c).gameObject).name.Contains("Block"))) ?? ((IEnumerable)CardChoice.instance.cards).FirstOrDefault((Func)((CardInfo c) => (Object)(object)c != (Object)null && ((Object)((Component)c).gameObject).name.Contains("Health"))) ?? ((IEnumerable)CardChoice.instance.cards).FirstOrDefault((Func)((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> trackedAbilities = new Dictionary>(); 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 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> 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(); ((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() == (Object)null) { ((Component)player).gameObject.AddComponent().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(); 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(); ((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(); 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } 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(); 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(); } 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) { Vector3 val2 = ((Component)player2).transform.position - ((Component)val).transform.position; float magnitude = ((Vector3)(ref val2)).magnitude; if (magnitude <= 12f && val.data.view.IsMine) { float num2 = (12f - magnitude) / 12f; HealthHandler healthHandler = player2.data.healthHandler; val3 = ((Component)val).transform.position - ((Component)player2).transform.position; healthHandler.CallTakeForce(Vector2.op_Implicit(((Vector3)(ref val3)).normalized * (200000f * num2)), (ForceMode2D)1, false, false, 0f); ((Damagable)player2.data.healthHandler).CallTakeDamage(Vector2.op_Implicit(((Vector3)(ref val2)).normalized * -5f), Vector2.op_Implicit(((Component)player2).transform.position), (GameObject)null, val, false); } } } JJKCustomDummy[] array = Object.FindObjectsOfType(); foreach (JJKCustomDummy jJKCustomDummy in array) { Vector3 val4 = ((Component)jJKCustomDummy).transform.position - ((Component)val).transform.position; if (((Vector3)(ref val4)).magnitude <= 12f) { jJKCustomDummy.TakeDamage(100f); } } MoveTransform[] array2 = Object.FindObjectsOfType(); foreach (MoveTransform val5 in array2) { if (!(Vector3.Distance(((Component)val).transform.position, ((Component)val5).transform.position) <= 12f)) { continue; } ProjectileHit component = ((Component)val5).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.ownPlayer != (Object)(object)val) { val3 = ((Component)val).transform.position - ((Component)val5).transform.position; Vector3 normalized = ((Vector3)(ref val3)).normalized; val5.velocity = normalized * ((Vector3)(ref val5.velocity)).magnitude * 1.5f; Rigidbody2D component2 = ((Component)val5).GetComponent(); if ((Object)(object)component2 != (Object)null) { Vector2 velocity = component2.velocity; component2.velocity = Vector2.op_Implicit(normalized * ((Vector2)(ref velocity)).magnitude * 1.5f); } } } GameObject val6 = new GameObject("BlueImplosion"); val6.transform.position = ((Component)val).transform.position; SpriteRenderer val7 = val6.AddComponent(); Texture2D val8 = new Texture2D(64, 64); Color val9 = default(Color); ((Color)(ref val9))..ctor(0f, 0.5f, 1f, 0.5f); for (int j = 0; j < 64; j++) { for (int k = 0; k < 64; k++) { val8.SetPixel(k, j, (Vector2.Distance(new Vector2((float)k, (float)j), new Vector2(32f, 32f)) < 32f) ? val9 : Color.clear); } } val8.Apply(); val7.sprite = Sprite.Create(val8, new Rect(0f, 0f, 64f, 64f), new Vector2(0.5f, 0.5f), 32f); ((Renderer)val7).sortingOrder = 50; BlueImplosionBehavior blueImplosionBehavior = val6.AddComponent(); blueImplosionBehavior.sr = val7; blueImplosionBehavior.maxRange = 12f; } } public class BlueImplosionBehavior : MonoBehaviour { public SpriteRenderer sr; public float maxRange; private float duration = 0.3f; private float elapsed; private void Update() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) elapsed += Time.deltaTime; if (elapsed >= duration) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num = elapsed / duration; float num2 = Mathf.Lerp(maxRange * 2f, 1f, num); ((Component)this).transform.localScale = new Vector3(num2, num2, 1f); if ((Object)(object)sr != (Object)null) { float num3 = Mathf.Lerp(0.5f, 0f, num); sr.color = new Color(0f, 0.5f, 1f, num3); } } private void OnDestroy() { if ((Object)(object)sr != (Object)null && (Object)(object)sr.sprite != (Object)null) { if ((Object)(object)sr.sprite.texture != (Object)null) { Object.Destroy((Object)(object)sr.sprite.texture); } Object.Destroy((Object)(object)sr.sprite); } } } public class BoogieWoogieCard : CustomCard { protected override string GetTitle() { return "Boogie Woogie"; } protected override string GetDescription() { return "Press [C] to instantly swap positions and velocities with the nearest opponent. (3s Cooldown)"; } 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 = "Clap Teleport [C]", amount = "Yes", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } 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_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_011c: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("BoogieWoogieArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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 = num3 - 20; k <= num3 + 20; k++) { for (int l = num2 - 35; l <= num2 + 35; l++) { float num4 = Vector2.Distance(new Vector2((float)l, (float)k), new Vector2((float)(num2 - 15), (float)num3)); float num5 = Vector2.Distance(new Vector2((float)l, (float)k), new Vector2((float)(num2 + 15), (float)num3)); if (num4 < 15f || num5 < 15f) { val3.SetPixel(l, k, new Color(0.9f, 0.1f, 0.1f, 0.85f)); } } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); HollowPurpleCard.ProceduralPulsator proceduralPulsator = val.AddComponent(); proceduralPulsator.minScale = 0.9f; proceduralPulsator.maxScale = 1.1f; proceduralPulsator.speed = 3f; 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_Todo_Boogie"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { BoogieWoogieBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class BoogieWoogieBehaviour : MonoBehaviour { private Player player; private float cooldownTimer; private const float Cooldown = 3f; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[C] Boogie Woogie", () => (!(cooldownTimer <= 0f)) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[C] Boogie Woogie"); } } private void Update() { if (cooldownTimer > 0f) { cooldownTimer -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)99) && cooldownTimer <= 0f) { TriggerBoogieWoogie(); } } private void TriggerBoogieWoogie() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Vector3)(ref player.data.aimDirection)).normalized; if (val == Vector3.zero) { val = ((Component)player).transform.right; } RaycastHit2D[] array = Physics2D.CircleCastAll(Vector2.op_Implicit(((Component)player).transform.position), 3f, Vector2.op_Implicit(val), 100f); Player val2 = null; Rigidbody2D val3 = null; float num = float.MaxValue; RaycastHit2D[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit2D val4 = array2[i]; Player componentInParent = ((Component)((RaycastHit2D)(ref val4)).collider).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)player && !componentInParent.data.dead) { if (((RaycastHit2D)(ref val4)).distance < num) { num = ((RaycastHit2D)(ref val4)).distance; val2 = componentInParent; val3 = null; } continue; } Rigidbody2D attachedRigidbody = ((RaycastHit2D)(ref val4)).collider.attachedRigidbody; if ((Object)(object)attachedRigidbody != (Object)null && (int)attachedRigidbody.bodyType == 0 && ((Component)attachedRigidbody).gameObject.layer == LayerMask.NameToLayer("Default") && (Object)(object)((Component)attachedRigidbody).GetComponent() == (Object)null && (Object)(object)((Component)attachedRigidbody).GetComponent() == (Object)null && (Object)(object)((Component)attachedRigidbody).GetComponent() == (Object)null && ((RaycastHit2D)(ref val4)).distance > 1f && ((RaycastHit2D)(ref val4)).distance < num) { num = ((RaycastHit2D)(ref val4)).distance; val3 = attachedRigidbody; val2 = null; } } if ((Object)(object)val2 != (Object)null) { cooldownTimer = 3f; NetworkingManager.RaiseEvent("JJKCardsMod_BoogieWoogie_Swap", new object[5] { player.playerID, 0, val2.playerID, 0f, 0f }); } else if ((Object)(object)val3 != (Object)null) { cooldownTimer = 3f; NetworkingManager.RaiseEvent("JJKCardsMod_BoogieWoogie_Swap", new object[5] { player.playerID, 1, 0, ((Component)val3).transform.position.x, ((Component)val3).transform.position.y }); } else { JJKCardHelper.CreateFloatingText("No target in sight!", ((Component)player).transform.position, Color.yellow); } } public static void OnBoogieWoogieSwapEvent(object[] data) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: 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_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_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: 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_023b: 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_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length < 5) { return; } int num = Convert.ToInt32(data[0]); int num2 = Convert.ToInt32(data[1]); int num3 = Convert.ToInt32(data[2]); float num4 = Convert.ToSingle(data[3]); float num5 = Convert.ToSingle(data[4]); Player val = null; foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && player.playerID == num) { val = player; } } if ((Object)(object)val == (Object)null) { return; } Vector3 position = ((Component)val).transform.position; Rigidbody2D component = ((Component)val).GetComponent(); FieldInfo field = typeof(PlayerVelocity).GetField("velocity", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); Vector2 val2 = (Vector2)((field != null && (Object)(object)val.data.playerVel != (Object)null) ? ((Vector2)field.GetValue(val.data.playerVel)) : (Object.op_Implicit((Object)(object)component) ? component.velocity : Vector2.zero)); if (num2 == 0) { Player val3 = null; foreach (Player player2 in PlayerManager.instance.players) { if ((Object)(object)player2 != (Object)null && player2.playerID == num3) { val3 = player2; } } if ((Object)(object)val3 == (Object)null) { return; } Vector3 position2 = ((Component)val3).transform.position; Rigidbody2D component2 = ((Component)val3).GetComponent(); Vector2 val4 = (Vector2)((field != null && (Object)(object)val3.data.playerVel != (Object)null) ? ((Vector2)field.GetValue(val3.data.playerVel)) : (Object.op_Implicit((Object)(object)component2) ? component2.velocity : Vector2.zero)); if ((Object)(object)val.data.playerVel != (Object)null) { val.data.playerVel.position = Vector2.op_Implicit(position2); } if ((Object)(object)val3.data.playerVel != (Object)null) { val3.data.playerVel.position = Vector2.op_Implicit(position); } ((Component)val).transform.position = position2; ((Component)val3).transform.position = position; SyncPlayerMovement component3 = ((Component)val).GetComponent(); SyncPlayerMovement component4 = ((Component)val3).GetComponent(); FieldInfo field2 = typeof(SyncPlayerMovement).GetField("syncPackages", BindingFlags.Instance | BindingFlags.NonPublic); if ((Object)(object)component3 != (Object)null) { component3.SetDontSyncFor(0.5f); if (field2?.GetValue(component3) is IList list) { list.Clear(); } } if ((Object)(object)component4 != (Object)null) { component4.SetDontSyncFor(0.5f); if (field2?.GetValue(component4) is IList list2) { list2.Clear(); } } PlayerCollision componentInParent = ((Component)val).GetComponentInParent(); PlayerCollision componentInParent2 = ((Component)val3).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null) { componentInParent.IgnoreWallForFrames(2); } if ((Object)(object)componentInParent2 != (Object)null) { componentInParent2.IgnoreWallForFrames(2); } if (field != null && (Object)(object)val.data.playerVel != (Object)null && (Object)(object)val3.data.playerVel != (Object)null) { field.SetValue(val.data.playerVel, val4); field.SetValue(val3.data.playerVel, val2); } if (Object.op_Implicit((Object)(object)component)) { component.velocity = val4; } if (Object.op_Implicit((Object)(object)component2)) { component2.velocity = val2; } SpawnClapShockwave(position); SpawnClapShockwave(position2); SpawnBlueFlame(position); SpawnBlueFlame(position2); JJKCardHelper.CreateFloatingText("CLAP! Boogie Woogie!", position2, Color.cyan); return; } Vector2 val5 = default(Vector2); ((Vector2)(ref val5))..ctor(num4, num5); Rigidbody2D val6 = null; float num6 = float.MaxValue; Rigidbody2D[] array = Object.FindObjectsOfType(); foreach (Rigidbody2D val7 in array) { if ((int)val7.bodyType == 0 && (Object)(object)((Component)val7).GetComponent() == (Object)null && (Object)(object)((Component)val7).GetComponent() == (Object)null) { float num7 = Vector2.Distance(val5, Vector2.op_Implicit(((Component)val7).transform.position)); if (num7 < num6 && num7 < 2f) { num6 = num7; val6 = val7; } } } if ((Object)(object)val6 != (Object)null) { Vector3 position3 = ((Component)val6).transform.position; Vector2 velocity = val6.velocity; if ((Object)(object)val.data.playerVel != (Object)null) { val.data.playerVel.position = Vector2.op_Implicit(position3); } ((Component)val).transform.position = position3; ((Component)val6).transform.position = position; if (field != null && (Object)(object)val.data.playerVel != (Object)null) { field.SetValue(val.data.playerVel, velocity); } if (Object.op_Implicit((Object)(object)component)) { component.velocity = velocity; } val6.velocity = val2; SyncPlayerMovement component5 = ((Component)val).GetComponent(); if ((Object)(object)component5 != (Object)null) { component5.SetDontSyncFor(0.5f); } SpawnClapShockwave(position); SpawnClapShockwave(position3); SpawnBlueFlame(position); SpawnBlueFlame(position3); JJKCardHelper.CreateFloatingText("CLAP! Boogie Woogie!", position3, Color.cyan); } } private static void SpawnClapShockwave(Vector3 pos) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_00ec: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("ClapShockwave"); val.transform.position = pos; SpriteRenderer val2 = val.AddComponent(); ((Renderer)val2).sortingOrder = 1000; int num = 128; Texture2D val3 = new Texture2D(num, num, (TextureFormat)4, false); ((Texture)val3).filterMode = (FilterMode)1; Color val4 = default(Color); ((Color)(ref val4))..ctor(0f, 0f, 0f, 0f); int num2 = num / 2; int num3 = num / 2; int num4 = num / 2 - 4; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num5 = Vector2.Distance(new Vector2((float)j, (float)i), new Vector2((float)num2, (float)num3)); if (num5 >= (float)(num4 - 3) && num5 <= (float)num4) { val3.SetPixel(j, i, Color.white); } else { val3.SetPixel(j, i, val4); } } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); val.AddComponent(); } private static void SpawnBlueFlame(Vector3 pos) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("BlueFlameEffect"); val.transform.position = pos; SpriteRenderer val2 = val.AddComponent(); ((Renderer)val2).sortingOrder = 998; int num = 64; 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); } } for (int k = 0; k < num; k++) { float num2 = (float)num / 2.2f * (1f - (float)k / (float)num); for (int l = (int)((float)num / 2f - num2); l <= (int)((float)num / 2f + num2); l++) { float num3 = Mathf.Abs((float)l - (float)num / 2f) / num2; Color val5 = Color.Lerp(Color.cyan, Color.blue, num3); val5.a = 1f - (float)k / (float)num; val3.SetPixel(l, k, val5); } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0f), 30f); val.AddComponent().sr = val2; } } public class BlueFlameLifecycle : MonoBehaviour { public SpriteRenderer sr; private float life = 0.5f; private void Update() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_0090: 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) life -= Time.deltaTime; if (life <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } Transform transform = ((Component)this).transform; transform.position += Vector3.up * (2.5f * Time.deltaTime); if ((Object)(object)sr != (Object)null) { sr.color = new Color(sr.color.r, sr.color.g, sr.color.b, life / 0.5f); } } private void OnDestroy() { if ((Object)(object)sr != (Object)null && (Object)(object)sr.sprite != (Object)null) { if ((Object)(object)sr.sprite.texture != (Object)null) { Object.Destroy((Object)(object)sr.sprite.texture); } Object.Destroy((Object)(object)sr.sprite); } } } public class BoogieClapShockwave : MonoBehaviour { private SpriteRenderer sr; private float timer; private float duration = 0.25f; private void Start() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) sr = ((Component)this).GetComponent(); ((Component)this).transform.localScale = Vector3.zero; } private void Update() { //IL_0058: 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) timer += Time.deltaTime; if (timer >= duration) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num = timer / duration; float num2 = Mathf.Lerp(0f, 6f, num); ((Component)this).transform.localScale = new Vector3(num2, num2, 1f); if ((Object)(object)sr != (Object)null) { sr.color = new Color(1f, 0.9f, 0.2f, 1f - num); } } private void OnDestroy() { if ((Object)(object)sr != (Object)null && (Object)(object)sr.sprite != (Object)null) { if ((Object)(object)sr.sprite.texture != (Object)null) { Object.Destroy((Object)(object)sr.sprite.texture); } Object.Destroy((Object)(object)sr.sprite); } } } public class JJKPlayerCharacter : MonoBehaviour { public string characterTag = ""; private Player player; private void Awake() { player = ((Component)this).GetComponent(); } private void Update() { if (!string.IsNullOrEmpty(characterTag) || !((Object)(object)player != (Object)null) || !((Object)(object)player.data != (Object)null) || player.data.currentCards == null) { return; } foreach (CardInfo currentCard in player.data.currentCards) { if ((Object)(object)currentCard == (Object)null || (Object)(object)((Component)currentCard).gameObject == (Object)null) { continue; } string text = ((Object)((Component)currentCard).gameObject).name.Replace("(Clone)", ""); if (text.StartsWith("JJK_Tech_")) { string[] array = text.Split(new char[1] { '_' }); if (array.Length >= 3) { characterTag = array[2]; break; } } else if (text.StartsWith("JJK_Char_")) { characterTag = text.Replace("JJK_Char_", ""); break; } } } } public abstract class BaseCharacterCard : CustomCard { public abstract string CharacterName { get; } public abstract string CharacterTag { get; } public abstract string Description { get; } protected override string GetTitle() { return CharacterName; } protected override string GetDescription() { return Description; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "HP", amount = "+10%", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return null; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; ((Object)((Component)cardInfo).gameObject).name = "JJK_Char_" + CharacterTag; statModifiers.health = 1.1f; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { JJKPlayerCharacter jJKPlayerCharacter = ((Component)player).gameObject.GetComponent(); if ((Object)(object)jJKPlayerCharacter == (Object)null) { jJKPlayerCharacter = ((Component)player).gameObject.AddComponent(); } jJKPlayerCharacter.characterTag = CharacterTag; JJKCardHelper.UnlockCharacter(player, CharacterTag); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } public class GojoCard : BaseCharacterCard { public static CardInfo info; public override string CharacterName => "Gojo Satoru"; public override string CharacterTag => "Gojo"; public override string Description => "Unlocks Limitless Techniques."; 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_002b: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "HP", amount = "+30%" }, new CardInfoStat { positive = true, stat = "Move Speed", amount = "+20%" } }; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { info = cardInfo; base.SetupCard(cardInfo, gun, cardStats, statModifiers, block); statModifiers.health = 1.3f; statModifiers.movementSpeed = 1.2f; JJKCardHelper.SetUniqueCategory(cardInfo); } } public class SukunaCard : BaseCharacterCard { public static CardInfo info; public override string CharacterName => "Ryomen Sukuna"; public override string CharacterTag => "Sukuna"; public override string Description => "Unlocks Shrine Techniques."; 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_002b: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "HP", amount = "+20%" }, new CardInfoStat { positive = true, stat = "Damage", amount = "+20%" } }; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { info = cardInfo; base.SetupCard(cardInfo, gun, cardStats, statModifiers, block); statModifiers.health = 1.2f; gun.damage = 1.2f; JJKCardHelper.SetUniqueCategory(cardInfo); } } public class MegumiCard : BaseCharacterCard { public static CardInfo info; public override string CharacterName => "Megumi Fushiguro"; public override string CharacterTag => "Megumi"; public override string Description => "Unlocks Ten Shadows."; 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_002b: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "HP", amount = "+15%" }, new CardInfoStat { positive = true, stat = "Block Cooldown", amount = "-10%" } }; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { info = cardInfo; base.SetupCard(cardInfo, gun, cardStats, statModifiers, block); statModifiers.health = 1.15f; block.cdMultiplier = 0.9f; JJKCardHelper.SetUniqueCategory(cardInfo); } } public class YutaCard : BaseCharacterCard { public static CardInfo info; public override string CharacterName => "Yuta Okkotsu"; public override string CharacterTag => "Yuta"; public override string Description => "Unlocks Rika Copy."; 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_002b: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "HP", amount = "+20%" }, new CardInfoStat { positive = true, stat = "Reload Speed", amount = "+20%" } }; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { info = cardInfo; base.SetupCard(cardInfo, gun, cardStats, statModifiers, block); statModifiers.health = 1.2f; gun.reloadTime = 0.8f; JJKCardHelper.SetUniqueCategory(cardInfo); } } public class TodoCard : BaseCharacterCard { public static CardInfo info; public override string CharacterName => "Aoi Todo"; public override string CharacterTag => "Todo"; public override string Description => "Unlocks Boogie Woogie."; 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_002b: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "HP", amount = "+30%" }, new CardInfoStat { positive = true, stat = "Size", amount = "+10%" } }; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { info = cardInfo; base.SetupCard(cardInfo, gun, cardStats, statModifiers, block); statModifiers.health = 1.3f; statModifiers.sizeMultiplier = 1.1f; JJKCardHelper.SetUniqueCategory(cardInfo); } } public class NanamiCard : BaseCharacterCard { public static CardInfo info; public override string CharacterName => "Kento Nanami"; public override string CharacterTag => "Nanami"; public override string Description => "Unlocks Ratio Technique."; 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_002b: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "HP", amount = "+15%" }, new CardInfoStat { positive = true, stat = "Attack Speed", amount = "+20%" } }; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { info = cardInfo; base.SetupCard(cardInfo, gun, cardStats, statModifiers, block); statModifiers.health = 1.15f; gun.attackSpeed = 0.8f; JJKCardHelper.SetUniqueCategory(cardInfo); } } public class ChosoCard : BaseCharacterCard { public static CardInfo info; public override string CharacterName => "Choso"; public override string CharacterTag => "Choso"; public override string Description => "Unlocks Blood Manipulation Techniques."; 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_002b: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "HP", amount = "+20%" }, new CardInfoStat { positive = true, stat = "Regeneration", amount = "Fast" } }; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { info = cardInfo; base.SetupCard(cardInfo, gun, cardStats, statModifiers, block); statModifiers.health = 1.2f; statModifiers.regen = 10f; JJKCardHelper.SetUniqueCategory(cardInfo); } } public class ChimeraShadowGardenCard : CustomCard { protected override string GetTitle() { return "Chimera Shadow Garden"; } protected override string GetDescription() { return "Press [Y] to cast Megumi's Domain. Floods the ground with shadows, drastically slowing enemies and summoning shadow tendrils!"; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Domain [Y]", amount = "Slow & Damage", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Megumi_Domain"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ChimeraShadowGardenBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class ChimeraShadowGardenBehaviour : MonoBehaviour { private Player player; private float domainCooldown; private const float Cooldown = 35f; private GameObject domainVisual; public bool IsDomainActive; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[Y] Shadow Garden", () => (!(domainCooldown > 0f)) ? "READY" : $"{domainCooldown:F1}s"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[Y] Shadow Garden"); } if ((Object)(object)domainVisual != (Object)null) { Object.Destroy((Object)(object)domainVisual); } } private void Update() { if (!((Object)(object)player == (Object)null) && !player.data.dead) { if (domainCooldown > 0f) { domainCooldown -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)121) && domainCooldown <= 0f && !IsDomainActive && DomainManager.Instance.TryCastDomain(player, delegate { NetworkingManager.RaiseEvent("JJKCardsMod_ChimeraShadow_Activate", new object[1] { player.playerID }); })) { NetworkingManager.RaiseEvent("JJKCardsMod_ChimeraShadow_Activate", new object[1] { player.playerID }); } } } public void ActivateDomainLocal() { if (!IsDomainActive) { ((MonoBehaviour)this).StartCoroutine(DomainRoutine()); } } private IEnumerator DomainRoutine() { IsDomainActive = true; domainCooldown = 35f; JJKCardHelper.CreateFloatingText("DOMAIN EXPANSION:\nCHIMERA SHADOW GARDEN", ((Component)player).transform.position + Vector3.up * 2f, Color.black); domainVisual = GameObject.CreatePrimitive((PrimitiveType)3); domainVisual.transform.position = new Vector3(0f, -15f, 0f); domainVisual.transform.localScale = new Vector3(200f, 20f, 1f); domainVisual.GetComponent().material.color = new Color(0.1f, 0.1f, 0.1f, 0.9f); Object.Destroy((Object)(object)domainVisual.GetComponent()); float num = 12f; float timer = num; while (timer > 0f && !((Object)(object)this.player == (Object)null) && !this.player.data.dead && !((Object)(object)DomainManager.Instance.ActiveDomainCaster != (Object)(object)this.player)) { foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)(object)this.player && !player.data.dead && Random.value < 0.05f && this.player.data.view.IsMine) { ((Damagable)player.data.healthHandler).CallTakeDamage(Vector2.up * 15f, Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, this.player, false); JJKCardHelper.CreateFloatingText("Shadow Tendril!", ((Component)player).transform.position + Vector3.up, Color.black); } } timer -= Time.deltaTime; yield return null; } IsDomainActive = false; if ((Object)(object)domainVisual != (Object)null) { Object.Destroy((Object)(object)domainVisual); } DomainManager.Instance.EndDomain(this.player); } public static void OnChimeraShadowEvent(object[] data) { if (data == null || data.Length == 0) { return; } int num = Convert.ToInt32(data[0]); foreach (Player player in PlayerManager.instance.players) { if (player.playerID == num) { ChimeraShadowGardenBehaviour component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.ActivateDomainLocal(); } break; } } } } public class SupernovaCard : CustomCard { protected override string GetTitle() { return "Supernova"; } protected override string GetDescription() { return "Press [F] to detonate blood orbs around you, shooting shrapnel in all directions!"; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "Supernova [F]", amount = "AOE", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Choso_Supernova"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { SupernovaBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class SupernovaBehaviour : MonoBehaviour { private Player player; private float cooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[F] Supernova", () => (!(cooldown > 0f)) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[F] Supernova"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !player.data.dead) { if (cooldown > 0f) { cooldown -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)102) && cooldown <= 0f) { cooldown = 12f; NetworkingManager.RaiseEvent("JJKCardsMod_Supernova", new object[1] { player.playerID }); } } } public static void OnSupernovaEvent(object[] data) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: 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_015a: 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) if (data == null || data.Length == 0) { return; } int num = Convert.ToInt32(data[0]); foreach (Player player in PlayerManager.instance.players) { if (player.playerID != num) { continue; } JJKCardHelper.CreateFloatingText("SUPERNOVA!", ((Component)player).transform.position + Vector3.up, Color.red); float num2 = 10f; GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); obj.transform.position = ((Component)player).transform.position; obj.transform.localScale = Vector3.one * num2 * 2f; obj.GetComponent().material.color = new Color(0.8f, 0f, 0f, 0.4f); Object.Destroy((Object)(object)obj.GetComponent()); Object.Destroy((Object)(object)obj, 0.3f); if (!player.data.view.IsMine) { break; } Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)player).transform.position), num2); for (int i = 0; i < array.Length; i++) { Player componentInParent = ((Component)array[i]).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)player && !componentInParent.data.dead) { ((Damagable)componentInParent.data.healthHandler).CallTakeDamage(Vector2.up * 65f, Vector2.op_Implicit(((Component)componentInParent).transform.position), (GameObject)null, player, false); BleedEffectTick bleedEffectTick = ((Component)componentInParent).gameObject.GetComponent(); if ((Object)(object)bleedEffectTick == (Object)null) { bleedEffectTick = ((Component)componentInParent).gameObject.AddComponent(); } bleedEffectTick.AddBleed(35f, 4f); } } break; } } } public class FlowingRedScaleCard : CustomCard { protected override string GetTitle() { return "Flowing Red Scale"; } protected override string GetDescription() { return "Press [G] to dope your blood! Sacrifices 15% HP for a 5 second massive boost to fire rate and speed."; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Red Scale [G]", amount = "Buff", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Choso_RedScale"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { FlowingRedScaleBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class FlowingRedScaleBehaviour : MonoBehaviour { private Player player; private float cooldown; private bool isBuffed; private float buffTimer; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[G] Red Scale", () => (!(cooldown > 0f)) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { RemoveBuff(); if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[G] Red Scale"); } } private void Update() { if ((Object)(object)player == (Object)null || player.data.dead) { return; } if (cooldown > 0f) { cooldown -= Time.deltaTime; } if (buffTimer > 0f) { buffTimer -= Time.deltaTime; if (buffTimer <= 0f) { RemoveBuff(); } } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)103) && cooldown <= 0f && !isBuffed) { cooldown = 15f; NetworkingManager.RaiseEvent("JJKCardsMod_RedScale", new object[1] { player.playerID }); } } public static void OnRedScaleEvent(object[] data) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (data == null || data.Length == 0) { return; } int num = Convert.ToInt32(data[0]); foreach (Player player in PlayerManager.instance.players) { if (player.playerID == num) { JJKCardHelper.CreateFloatingText("FLOWING RED SCALE!", ((Component)player).transform.position + Vector3.up, Color.red); FlowingRedScaleBehaviour component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.ApplyBuff(); } break; } } } public void ApplyBuff() { //IL_0088: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) if (!isBuffed) { isBuffed = true; CharacterStatModifiers stats = player.data.stats; stats.movementSpeed *= 1.5f; Gun gun = player.data.weaponHandler.gun; gun.attackSpeed *= 0.5f; } buffTimer = 5f; if (player.data.view.IsMine) { ((Damagable)player.data.healthHandler).CallTakeDamage(Vector2.up * (player.data.maxHealth * 0.15f), Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, player, false); } } private void RemoveBuff() { if (isBuffed) { isBuffed = false; if ((Object)(object)player != (Object)null && (Object)(object)player.data != (Object)null) { CharacterStatModifiers stats = player.data.stats; stats.movementSpeed /= 1.5f; Gun gun = player.data.weaponHandler.gun; gun.attackSpeed /= 0.5f; } } } private void OnDisable() { buffTimer = 0f; isBuffed = false; } } public class BloodMeteoriteCard : CustomCard { protected override string GetTitle() { return "Blood Meteorite"; } protected override string GetDescription() { return "Hardened blood coats your attacks. Gives you massive health and slightly increases damage."; } 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 = "Health", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+15%", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Choso_Meteorite"; statModifiers.health = 1.5f; gun.damage = 1.15f; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } public class BloodEdgeCard : CustomCard { protected override string GetTitle() { return "Blood Edge"; } protected override string GetDescription() { return "Your bullets are formed from sharp blood, allowing them to pierce through walls and enemies!"; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Pierce", amount = "Infinite", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Choso_BloodEdge"; gun.unblockable = true; gun.ignoreWalls = true; gun.reflects = 0; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } public class CleaveCard : CustomCard { protected override string GetTitle() { return "Cleave"; } protected override string GetDescription() { return "Press [E] for Cleave (devastating melee slash adapting to enemy HP). Ignoriert Blocks!"; } 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 = "Cleave [E]", amount = "Melee", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Sukuna_Cleave"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CleaveBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class CleaveBehaviour : MonoBehaviour { private Player player; private float cleaveCooldown; private const float Cooldown = 6f; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (!player.data.view.IsMine) { return; } JJKCooldownManager.instance.RegisterAbility("[E] Cleave", delegate { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) if (cleaveCooldown > 0f) { return $"{cleaveCooldown:F1}s"; } bool flag = false; foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)(object)this.player && !player.data.dead && Vector3.Distance(((Component)this.player).transform.position, ((Component)player).transform.position) <= 12f) { flag = true; break; } } return (!flag) ? "READY" : "IN RANGE"; }); } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[E] Cleave"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !player.data.dead) { if (cleaveCooldown > 0f) { cleaveCooldown -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)101) && cleaveCooldown <= 0f) { FireCleave(); } } } private void FireCleave() { cleaveCooldown = 6f; NetworkingManager.RaiseEvent("JJKCardsMod_Cleave", new object[1] { player.playerID }); } public static void OnCleaveEvent(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_00d4: 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_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: 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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0270: 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_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: 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("CLEAVE!", ((Component)val).transform.position, Color.red); bool flag = false; foreach (Player player2 in PlayerManager.instance.players) { if ((Object)(object)player2 != (Object)null && (Object)(object)player2 != (Object)(object)val && !player2.data.dead && Vector3.Distance(((Component)val).transform.position, ((Component)player2).transform.position) <= 12f) { flag = true; SpawnCleaveSlashVisual(((Component)player2).transform.position); SpawnCleaveSlashVisual(((Component)player2).transform.position + Vector3.up * 0.5f); SpawnCleaveSlashVisual(((Component)player2).transform.position - Vector3.up * 0.5f); if (val.data.view.IsMine) { float num2 = player2.data.maxHealth * 0.6f + 50f; ((Damagable)player2.data.healthHandler).CallTakeDamage(Vector2.up * num2, Vector2.op_Implicit(((Component)player2).transform.position), (GameObject)null, val, true); } } } JJKCustomDummy[] array = Object.FindObjectsOfType(); foreach (JJKCustomDummy jJKCustomDummy in array) { if (Vector3.Distance(((Component)val).transform.position, ((Component)jJKCustomDummy).transform.position) <= 12f) { flag = true; jJKCustomDummy.TakeDamage(1000f); SpawnCleaveSlashVisual(((Component)jJKCustomDummy).transform.position); SpawnCleaveSlashVisual(((Component)jJKCustomDummy).transform.position + Vector3.up * 0.5f); } } if (!flag) { Vector3 normalized = ((Vector3)(ref val.data.aimDirection)).normalized; SpawnCleaveSlashVisual(((Component)val).transform.position + normalized * 2f); } } public static void SpawnCleaveSlashVisual(Vector3 pos) { //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_0010: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown GameObject val = new GameObject("CleaveSlash"); val.transform.position = pos; LineRenderer obj = val.AddComponent(); obj.startWidth = 0.4f; obj.endWidth = 0f; ((Renderer)obj).material = new Material(Shader.Find("Sprites/Default")); obj.startColor = Color.white; obj.endColor = Color.red; obj.positionCount = 2; float num = Random.Range(0f, 360f) * ((float)Math.PI / 180f); Vector3 val2 = new Vector3(Mathf.Cos(num), Mathf.Sin(num), 0f) * 2.5f; obj.SetPosition(0, pos - val2); obj.SetPosition(1, pos + val2); Object.Destroy((Object)val, 0.2f); } } public class BlackFlashCard : CustomCard { protected override string GetTitle() { return "Black Flash (Cursed Fists)"; } protected override string GetDescription() { return "Replaces your gun with melee Fists. Every punch has a 10% chance to trigger Black Flash (2.5x damage, ignores block)!"; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "Melee Damage", amount = "Massive", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Black Flash Chance", amount = "10%", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } 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_00e2: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("BlackFlashArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((Renderer)val2).sortingOrder = 5; Texture2D val3 = new Texture2D(64, 64); Color val4 = default(Color); ((Color)(ref val4))..ctor(0.1f, 0f, 0f, 0.8f); Color val5 = default(Color); ((Color)(ref val5))..ctor(0.8f, 0f, 0f, 1f); for (int i = 0; i < 64; i++) { for (int j = 0; j < 64; j++) { val3.SetPixel(j, i, (Mathf.Abs(j - i) < 5 || Mathf.Abs(j + i - 64) < 5) ? val5 : val4); } } 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_BlackFlash"; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CursedFistsBehaviour cursedFistsBehaviour = ((Component)player).gameObject.GetComponent(); if ((Object)(object)cursedFistsBehaviour == (Object)null) { cursedFistsBehaviour = ((Component)player).gameObject.AddComponent(); cursedFistsBehaviour.player = player; } cursedFistsBehaviour.enableBlackFlash = true; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CursedFistsBehaviour component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.enableBlackFlash = false; Object.Destroy((Object)(object)component); } } } public class CursedFistsBehaviour : MonoBehaviour { public Player player; public bool enableBlackFlash; public bool enableIdleTransfiguration; public bool enableDivergentFist; private GameObject fistVisual; private bool isPunching; private float punchTimer; private float punchDuration = 0.2f; private float punchRadius = 1.5f; private float punchCooldown; private HashSet alreadyHitInPunch = new HashSet(); private int maxStamina; private int currentStamina; private float reloadTimer; private TextMesh staminaText; private GunAmmo cachedGunAmmo; private float currentBlackFlashChance = 0.1f; private void Start() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b4: 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) fistVisual = new GameObject("CursedFist"); fistVisual.transform.SetParent(((Component)player).transform); fistVisual.transform.localPosition = new Vector3(0.5f, 0f, 0f); SpriteRenderer val = fistVisual.AddComponent(); Texture2D val2 = new Texture2D(32, 32); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.9f, 0.7f, 0.6f); for (int i = 0; i < 32; i++) { for (int j = 0; j < 32; j++) { val2.SetPixel(j, i, (Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(16f, 16f)) < 16f) ? val3 : Color.clear); } } val2.Apply(); val.sprite = Sprite.Create(val2, new Rect(0f, 0f, 32f, 32f), new Vector2(0.5f, 0.5f), 32f); ((Renderer)val).sortingOrder = 50; fistVisual.SetActive(false); if (player.data.view.IsMine) { GameObject val4 = new GameObject("CursedFistsStamina"); val4.transform.SetParent(((Component)player).transform); val4.transform.localPosition = new Vector3(0f, 1.3f, 0f); staminaText = val4.AddComponent(); staminaText.characterSize = 0.05f; staminaText.fontSize = 120; staminaText.anchor = (TextAnchor)4; staminaText.alignment = (TextAlignment)1; staminaText.color = Color.white; staminaText.fontStyle = (FontStyle)0; } } private void Update() { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || player.data.dead) { return; } if (punchCooldown > 0f) { punchCooldown -= Time.deltaTime; } if ((Object)(object)player.data.weaponHandler != (Object)null && (Object)(object)player.data.weaponHandler.gun != (Object)null) { player.data.weaponHandler.gun.numberOfProjectiles = 0; ((Component)player.data.weaponHandler.gun).transform.localScale = Vector3.zero; if ((Object)(object)cachedGunAmmo == (Object)null) { cachedGunAmmo = ((Component)player.data.weaponHandler.gun).GetComponentInChildren(); } maxStamina = (((Object)(object)cachedGunAmmo != (Object)null) ? cachedGunAmmo.maxAmmo : 3); if ((Object)(object)cachedGunAmmo != (Object)null) { _ = cachedGunAmmo.reloadTime; } if (player.data.view.IsMine) { if (currentStamina <= 0) { reloadTimer -= Time.deltaTime; if (reloadTimer <= 0f) { currentStamina = maxStamina; } } if ((Object)(object)staminaText != (Object)null) { if (currentStamina > 0) { string text = ""; for (int i = 0; i < maxStamina; i++) { text += ((i < currentStamina) ? "â– " : "â–¡"); } staminaText.text = text; staminaText.color = Color.white; } else { staminaText.text = "RELOADING..."; staminaText.color = Color.red; } } } } if (player.data.view.IsMine && !player.data.dead && ((OneAxisInputControl)player.data.playerActions.Fire).WasPressed && punchCooldown <= 0f && !isPunching && currentStamina > 0) { currentStamina--; if (currentStamina <= 0) { if ((Object)(object)cachedGunAmmo == (Object)null) { cachedGunAmmo = ((Component)player.data.weaponHandler.gun).GetComponentInChildren(); } reloadTimer = (((Object)(object)cachedGunAmmo != (Object)null) ? cachedGunAmmo.reloadTime : 1f); } NetworkingManager.RaiseEvent("JJKCardsMod_FistAnimation", new object[1] { player.playerID }); } if (isPunching) { punchTimer += Time.deltaTime; Vector3 val = ((Vector3)(ref player.data.aimDirection)).normalized; if (val == Vector3.zero) { val = Vector3.up; } float num = punchDuration * player.data.weaponHandler.gun.attackSpeed; if (punchTimer < num / 2f) { fistVisual.transform.position = ((Component)player).transform.position + val * Mathf.Lerp(0.5f, 2f, punchTimer / (num / 2f)); } else { fistVisual.transform.position = ((Component)player).transform.position + val * Mathf.Lerp(2f, 0.5f, (punchTimer - num / 2f) / (num / 2f)); } CheckMeleeHitbox(val); if (punchTimer >= num) { isPunching = false; fistVisual.SetActive(false); } } } private void StartPunch() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_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) isPunching = true; punchTimer = 0f; punchCooldown = 0.4f * player.data.weaponHandler.gun.attackSpeed; alreadyHitInPunch.Clear(); fistVisual.SetActive(true); fistVisual.transform.position = ((Component)player).transform.position + ((Vector3)(ref player.data.aimDirection)).normalized * 0.5f; } private void CheckMeleeHitbox(Vector3 aimDir) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: 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) if (!player.data.view.IsMine) { return; } Vector3 position = fistVisual.transform.position; float num = punchRadius * player.data.weaponHandler.gun.projectileSpeed; foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && (Object)(object)player != (Object)(object)this.player && !player.data.dead && !alreadyHitInPunch.Contains(player) && Vector3.Distance(position, ((Component)player).transform.position) <= num) { alreadyHitInPunch.Add(player); ResolveHit(player); } } Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(position), num); for (int i = 0; i < array.Length; i++) { JJKCustomDummy componentInParent = ((Component)array[i]).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null) { float num2 = 55f * this.player.data.weaponHandler.gun.damage; float d = num2; if (enableBlackFlash && Random.value <= 0.1f) { d = num2 + 200f; JJKCardHelper.CreateFloatingText("BLACK FLASH!", ((Component)componentInParent).transform.position + Vector3.up, Color.red); } componentInParent.TakeDamage(d); } } } private void ResolveHit(Player target) { //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: 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_018e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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) float num = 55f * player.data.weaponHandler.gun.damage; float num2 = num; if (enableBlackFlash && Random.value <= currentBlackFlashChance) { num2 = num + target.data.maxHealth * 0.2f; currentBlackFlashChance += 0.1f; JJKAudioManager.instance?.PlaySound("black_flash", ((Component)target).transform.position, 1.2f, 2f); JJKCardHelper.CreateFloatingText($"BLACK FLASH! ({Mathf.RoundToInt(currentBlackFlashChance * 100f)}%)", ((Component)target).transform.position + Vector3.up, Color.red); GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); obj.transform.position = ((Component)target).transform.position; obj.transform.localScale = Vector3.one * 4f; obj.GetComponent().material.color = new Color(0f, 0f, 0f, 0.8f); Object.Destroy((Object)(object)obj.GetComponent()); Object.Destroy((Object)(object)obj, 0.3f); } else { currentBlackFlashChance = 0.1f; } int numberOfProjectiles = player.data.weaponHandler.gun.numberOfProjectiles; if (numberOfProjectiles > 1) { num2 *= (float)numberOfProjectiles; } Vector2 val = Vector2.op_Implicit(((Vector3)(ref player.data.aimDirection)).normalized); if (val == Vector2.zero) { val = Vector2.up; } NetworkingManager.RaiseEvent("JJKCardsMod_FistHit", new object[7] { target.playerID, player.playerID, val.x, val.y, num2, enableIdleTransfiguration, false }); if (enableDivergentFist) { ((MonoBehaviour)this).StartCoroutine(DelayedDivergentHit(target, val, num2)); } } private IEnumerator DelayedDivergentHit(Player target, Vector2 damageDir, float damage) { //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) yield return (object)new WaitForSeconds(0.5f); if ((Object)(object)target != (Object)null && !target.data.dead && (Object)(object)player != (Object)null) { NetworkingManager.RaiseEvent("JJKCardsMod_FistHit", new object[7] { target.playerID, player.playerID, damageDir.x, damageDir.y, damage, enableIdleTransfiguration, true }); } } public static void OnFistHitEvent(object[] data) { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_01a1: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length < 7) { return; } int num = Convert.ToInt32(data[0]); int num2 = Convert.ToInt32(data[1]); float num3 = Convert.ToSingle(data[2]); float num4 = Convert.ToSingle(data[3]); float num5 = Convert.ToSingle(data[4]); bool flag = Convert.ToBoolean(data[5]); bool flag2 = Convert.ToBoolean(data[6]); Player val = null; Player val2 = null; foreach (Player player in PlayerManager.instance.players) { if (player.playerID == num) { val = player; } if (player.playerID == num2) { val2 = player; } } if (!((Object)(object)val != (Object)null) || !((Object)(object)val2 != (Object)null)) { return; } Vector2 val3 = new Vector2(num3, num4) * num5; GameObject val4 = (((Object)(object)val2.data.weaponHandler.gun != (Object)null) ? ((Component)val2.data.weaponHandler.gun).gameObject : ((Component)val2).gameObject); val.data.healthHandler.DoDamage(val3, Vector2.op_Implicit(((Component)val).transform.position), Color.red, val4, val2, true, true, true); if (flag) { CharacterData data2 = val.data; data2.maxHealth *= 0.9f; JJKCardHelper.CreateFloatingText("Seele verletzt!", ((Component)val).transform.position + Vector3.up * 1.5f, Color.magenta); } if (flag2) { JJKCardHelper.CreateFloatingText("\ud83d\udca5 IMPACT!", ((Component)val).transform.position + Vector3.up, Color.blue); if ((Object)(object)val.data.stunHandler != (Object)null) { val.data.stunHandler.AddStun(0.2f); } } } public static void OnFistAnimationEvent(object[] data) { if (data == null || data.Length < 1) { return; } int num = Convert.ToInt32(data[0]); foreach (Player player in PlayerManager.instance.players) { if (player.playerID == num) { CursedFistsBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.StartPunch(); } } } } private void OnDestroy() { if ((Object)(object)fistVisual != (Object)null) { SpriteRenderer component = fistVisual.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.sprite != (Object)null) { if ((Object)(object)component.sprite.texture != (Object)null) { Object.Destroy((Object)(object)component.sprite.texture); } Object.Destroy((Object)(object)component.sprite); } Object.Destroy((Object)(object)fistVisual); } if ((Object)(object)staminaText != (Object)null && (Object)(object)((Component)staminaText).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)staminaText).gameObject); } } } public class DismantleCard : CustomCard { protected override string GetTitle() { return "Dismantle"; } protected override string GetDescription() { return "Gain a passive Dismantle aura that automatically slashes nearby enemies!"; } 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 = "Dismantle", amount = "Passive", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Pierce", amount = "Yes", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.numberOfProjectiles = 0; cardInfo.allowMultiple = false; ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Sukuna_Dismantle"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { SukunaTechniqueBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class SukunaTechniqueBehaviour : MonoBehaviour { private Player player; private float dismantleAuraTimer; private const float DismantleAuraInterval = 1.5f; private const float DismantleAuraRange = 8f; private const float DismantleAuraDamage = 8f; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player.data.weaponHandler != (Object)null && (Object)(object)player.data.weaponHandler.gun != (Object)null) { Transform val = ((Component)player.data.weaponHandler.gun).transform.Find("Art"); if ((Object)(object)val != (Object)null) { val.localScale = Vector3.zero; } } } private void OnDestroy() { } private void Update() { //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || player.data.dead || !player.data.view.IsMine || player.data.dead) { return; } dismantleAuraTimer -= Time.deltaTime; if (!(dismantleAuraTimer <= 0f)) { return; } dismantleAuraTimer = 1.5f; foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && (Object)(object)player != (Object)(object)this.player && !player.data.dead && Vector3.Distance(((Component)this.player).transform.position, ((Component)player).transform.position) <= 8f) { NetworkingManager.RaiseEvent("JJKCardsMod_DismantleAura", new object[3] { this.player.playerID, player.playerID, 8f }); } } } public static void OnDismantleAuraEvent(object[] data) { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length < 3) { return; } int num = Convert.ToInt32(data[0]); int num2 = Convert.ToInt32(data[1]); float num3 = Convert.ToSingle(data[2]); Player val = null; Player val2 = null; foreach (Player player in PlayerManager.instance.players) { if (player.playerID == num) { val = player; } if (player.playerID == num2) { val2 = player; } } if ((Object)(object)val2 != (Object)null && (Object)(object)val != (Object)null && !val2.data.dead) { CleaveBehaviour.SpawnCleaveSlashVisual(((Component)val2).transform.position); if (val.data.view.IsMine) { ((Damagable)val2.data.healthHandler).CallTakeDamage(Vector2.up * num3, Vector2.op_Implicit(((Component)val2).transform.position), (GameObject)null, val, false); } } } } public class DivergentFistCard : CustomCard { protected override string GetTitle() { return "Divergent Fist"; } protected override string GetDescription() { return "Upgrade: Your punches now hit twice! The cursed energy impact lags behind your physical hit, exploding 0.5s later for full damage."; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "Double Hit", amount = "Yes", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Stun", amount = "+0.2s", 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_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_00bd: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("DivergentFistArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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 < 40; k++) { val3.SetPixel(num2 + Random.Range(-20, 0), num3 + Random.Range(-20, 20), Color.blue); val3.SetPixel(num2 + Random.Range(10, 30), num3 + Random.Range(-20, 20), Color.cyan); } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); 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_DivergentFist"; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CursedFistsBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { component.enableDivergentFist = true; } } 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(); if ((Object)(object)component != (Object)null) { component.enableDivergentFist = false; } } } public class DivineDogCard : CustomCard { protected override string GetTitle() { return "Divine Dog: Totality"; } protected override string GetDescription() { return "Press [F] to summon the Divine Dog, which relentlessly chases down your enemies with extreme speed and biting attacks!"; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "Divine Dog [F]", amount = "Summon", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("TenShadows.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Megumi_DivineDog"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { DivineDogBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class DivineDogBehaviour : MonoBehaviour { private Player player; private float dogCooldown; private const float Cooldown = 15f; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[F] Divine Dog", () => (!(dogCooldown > 0f)) ? "READY" : $"{dogCooldown:F1}s"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[F] Divine Dog"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !player.data.dead) { if (dogCooldown > 0f) { dogCooldown -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)102) && dogCooldown <= 0f) { dogCooldown = 15f; NetworkingManager.RaiseEvent("JJKCardsMod_DivineDog", new object[1] { player.playerID }); } } } public static void OnDivineDogEvent(object[] data) { //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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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 (player.playerID == num) { val = player; } } if ((Object)(object)val != (Object)null) { JJKCardHelper.CreateFloatingText("Divine Dog: Totality!", ((Component)val).transform.position + Vector3.up * 1.5f, Color.black); GameObject obj = GameObject.CreatePrimitive((PrimitiveType)1); obj.transform.position = ((Component)val).transform.position + Vector3.right * 2f; obj.transform.localScale = new Vector3(1.2f, 0.8f, 1f); obj.GetComponent().material.color = new Color(0.1f, 0.1f, 0.1f, 1f); Object.Destroy((Object)(object)obj.GetComponent()); ((Collider2D)obj.AddComponent()).isTrigger = true; obj.AddComponent().isKinematic = true; obj.AddComponent().owner = val; } } } public class DivineDogController : MonoBehaviour { public Player owner; private float speed = 25f; private float lifeTime = 10f; private Player target; private float biteCooldown; private void Start() { FindTarget(); } private void Update() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_00cd: Unknown result type (might be due to invalid IL or missing references) lifeTime -= Time.deltaTime; if (lifeTime <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } if ((Object)(object)target == (Object)null || target.data.dead) { FindTarget(); } if ((Object)(object)target != (Object)null) { Vector3 val = ((Component)target).transform.position - ((Component)this).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; Transform transform = ((Component)this).transform; transform.position += normalized * speed * Time.deltaTime; if (Vector3.Distance(((Component)this).transform.position, ((Component)target).transform.position) < 2f) { Bite(target); } } } private void FindTarget() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) float num = float.MaxValue; foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)(object)owner && !player.data.dead) { float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)player).transform.position); if (num2 < num) { num = num2; target = player; } } } } private void Bite(Player p) { //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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) if (biteCooldown > 0f) { biteCooldown -= Time.deltaTime; return; } biteCooldown = 0.5f; JJKCardHelper.CreateFloatingText("BITE!", ((Component)this).transform.position, Color.red); if (owner.data.view.IsMine) { float num = 45f + owner.data.maxHealth * 0.1f; ((Damagable)p.data.healthHandler).CallTakeDamage(Vector2.up * num, Vector2.op_Implicit(((Component)p).transform.position), (GameObject)null, owner, false); } } } public class DivineFlameCard : CustomCard { protected override string GetTitle() { return "Divine Flame (Fuga)"; } protected override string GetDescription() { return "Press [F] to charge and unleash an apocalyptic fire arrow that causes a massive explosion! Open: Fuga!"; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Divine Flame [F]", amount = "Massive AOE", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Sukuna_DivineFlame"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { DivineFlameBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class DivineFlameBehaviour : MonoBehaviour { private Player player; private float fugaCooldown; private const float Cooldown = 15f; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[F] Divine Flame", () => (!(fugaCooldown > 0f)) ? "READY" : $"{fugaCooldown:F1}s"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[F] Divine Flame"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !player.data.dead) { if (fugaCooldown > 0f) { fugaCooldown -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)102) && fugaCooldown <= 0f) { ((MonoBehaviour)this).StartCoroutine(CastFuga()); } } } private IEnumerator CastFuga() { fugaCooldown = 15f; JJKCardHelper.CreateFloatingText("OPEN...", ((Component)player).transform.position + Vector3.up, Color.yellow); yield return (object)new WaitForSeconds(1f); if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { Vector2 val = Vector2.op_Implicit(((Vector3)(ref player.data.aimDirection)).normalized); if (val == Vector2.zero) { val = Vector2.up; } NetworkingManager.RaiseEvent("JJKCardsMod_DivineFlame", new object[3] { player.playerID, val.x, val.y }); } } public static void OnDivineFlameEvent(object[] data) { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Expected O, but got Unknown //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length < 3) { return; } int num = Convert.ToInt32(data[0]); float num2 = Convert.ToSingle(data[1]); float num3 = Convert.ToSingle(data[2]); Player val = null; foreach (Player player in PlayerManager.instance.players) { if (player.playerID == num) { val = player; } } if ((Object)(object)val != (Object)null) { Vector3 val2 = new Vector3(num2, num3, 0f); Vector3 normalized = ((Vector3)(ref val2)).normalized; JJKCardHelper.CreateFloatingText("FUGA!", ((Component)val).transform.position + Vector3.up * 1.5f, Color.red); GameObject obj = GameObject.CreatePrimitive((PrimitiveType)3); obj.transform.position = ((Component)val).transform.position + normalized * 2f; obj.transform.localScale = new Vector3(3f, 0.3f, 1f); float num4 = Mathf.Atan2(normalized.y, normalized.x) * 57.29578f; obj.transform.rotation = Quaternion.Euler(0f, 0f, num4); Renderer component = obj.GetComponent(); component.material = new Material(Shader.Find("Sprites/Default")); component.material.color = new Color(1f, 0.4f, 0f, 1f); TrailRenderer obj2 = obj.AddComponent(); obj2.time = 0.2f; obj2.startWidth = 0.3f; obj2.endWidth = 0f; ((Renderer)obj2).material = component.material; obj2.startColor = Color.yellow; obj2.endColor = new Color(1f, 0f, 0f, 0f); Object.Destroy((Object)(object)obj.GetComponent()); DivineFlameHit divineFlameHit = obj.AddComponent(); divineFlameHit.owner = val; divineFlameHit.direction = normalized; } } } public class DivineFlameHit : MonoBehaviour { public Player owner; public Vector3 direction; private float speed = 50f; private bool hasExploded; private void Start() { Object.Destroy((Object)(object)((Component)this).gameObject, 5f); } private void Update() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) if (hasExploded) { return; } float num = speed * Time.deltaTime; RaycastHit2D val = Physics2D.Raycast(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(direction), num); if ((Object)(object)((RaycastHit2D)(ref val)).collider != (Object)null) { Player componentInParent = ((Component)((RaycastHit2D)(ref val)).collider).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent == (Object)(object)owner) { Transform transform = ((Component)this).transform; transform.position += direction * num; } else if (((RaycastHit2D)(ref val)).collider.isTrigger) { Transform transform2 = ((Component)this).transform; transform2.position += direction * num; } else { ((Component)this).transform.position = Vector2.op_Implicit(((RaycastHit2D)(ref val)).point); Explode(); } } else { Transform transform3 = ((Component)this).transform; transform3.position += direction * num; } } private void Explode() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) if (hasExploded) { return; } hasExploded = true; float num = 15f; JJKCardHelper.CreateFloatingText("\ud83d\udd25\ud83d\udca5", ((Component)this).transform.position, Color.red); GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); obj.transform.position = ((Component)this).transform.position; Object.Destroy((Object)(object)obj.GetComponent()); obj.AddComponent().maxRadius = num; if (owner.data.view.IsMine) { Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)this).transform.position), num); foreach (Collider2D obj2 in array) { Player componentInParent = ((Component)obj2).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)owner && !componentInParent.data.dead) { float num2 = componentInParent.data.maxHealth * 0.8f + 200f; ((Damagable)componentInParent.data.healthHandler).CallTakeDamage(Vector2.up * num2, Vector2.op_Implicit(((Component)componentInParent).transform.position), (GameObject)null, owner, true); } JJKCustomDummy componentInParent2 = ((Component)obj2).GetComponentInParent(); if ((Object)(object)componentInParent2 != (Object)null) { componentInParent2.TakeDamage(5000f); } } } Renderer component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.material != (Object)null) { Object.Destroy((Object)(object)component.material); } Object.Destroy((Object)(object)((Component)this).gameObject); } } public class DivineFlameExplosionAnim : MonoBehaviour { public float maxRadius = 15f; private float timer; private float duration = 0.5f; private Renderer rend; private void Start() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) rend = ((Component)this).GetComponent(); rend.material = new Material(Shader.Find("Sprites/Default")); rend.material.color = new Color(1f, 0.4f, 0f, 0.8f); ((Component)this).transform.localScale = Vector3.zero; } private void Update() { //IL_0048: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) timer += Time.deltaTime; float num = timer / duration; float num2 = Mathf.Lerp(0f, maxRadius * 2f, Mathf.Pow(num, 0.5f)); ((Component)this).transform.localScale = Vector3.one * num2; Color color = rend.material.color; color.a = Mathf.Lerp(0.8f, 0f, Mathf.Pow(num, 2f)); rend.material.color = color; if (timer >= duration) { if ((Object)(object)rend != (Object)null && (Object)(object)rend.material != (Object)null) { Object.Destroy((Object)(object)rend.material); } Object.Destroy((Object)(object)((Component)this).gameObject); } } private void OnDestroy() { if ((Object)(object)rend != (Object)null && (Object)(object)rend.material != (Object)null) { Object.Destroy((Object)(object)rend.material); } } } public class FullPotentialMahoragaCard : CustomCard { protected override string GetTitle() { return "Full Potential Mahoraga"; } protected override string GetDescription() { return "The ultimate trump card! Adapts to ANY attack type over time, permanently. Adaptation progress NEVER resets across the entire match! Very Rare."; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Infinite", amount = "Adaptation", 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_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_00d5: 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_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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) GameObject val = new GameObject("FullMahoragaArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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); } } Color val5 = default(Color); ((Color)(ref val5))..ctor(1f, 0.9f, 0.2f); int num2 = num / 2; int num3 = num / 2; int num4 = 40; int num5 = 8; for (int k = num3 - num4; k <= num3 + num4; k++) { for (int l = num2 - num4; l <= num2 + num4; l++) { float num6 = Vector2.Distance(new Vector2((float)l, (float)k), new Vector2((float)num2, (float)num3)); if (num6 >= (float)(num4 - 3) && num6 <= (float)num4) { val3.SetPixel(l, k, val5); } if (num6 <= (float)num5) { val3.SetPixel(l, k, val5); } } } for (int m = 0; m < 8; m++) { float num7 = (float)m * 45f * ((float)Math.PI / 180f); for (float num8 = num5; num8 < (float)num4; num8 += 0.5f) { int num9 = num2 + Mathf.RoundToInt(Mathf.Cos(num7) * num8); int num10 = num3 + Mathf.RoundToInt(Mathf.Sin(num7) * num8); val3.SetPixel(num9, num10, 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(); 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_Megumi_MahoragaFull"; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { MahoragaBehaviour mahoragaBehaviour = ((Component)player).gameObject.GetComponent(); if ((Object)(object)mahoragaBehaviour == (Object)null) { mahoragaBehaviour = ((Component)player).gameObject.AddComponent(); } mahoragaBehaviour.isFullPotential = true; mahoragaBehaviour.SpawnWheel(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((MonoBehaviour)player).StartCoroutine(RemoveCoroutine(player)); } private IEnumerator RemoveCoroutine(Player player) { yield return (object)new WaitForEndOfFrame(); if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.currentCards == null || player.data.currentCards.Any((CardInfo c) => (Object)(object)c != (Object)null && ((Object)((Component)c).gameObject).name.Replace("(Clone)", "") == "JJK_Tech_Megumi_MahoragaFull")) { yield break; } MahoragaBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { if (player.data.currentCards.Any((CardInfo c) => (Object)(object)c != (Object)null && ((Object)((Component)c).gameObject).name.Replace("(Clone)", "") == "JJK_Tech_Megumi_Mahoraga")) { component.isFullPotential = false; component.DestroyWheel(); component.SpawnWheel(); } else { component.DestroyWheel(); Object.Destroy((Object)(object)component); } } } } public class HollowPurpleCard : CustomCard { public class ProceduralPulsator : MonoBehaviour { public float minScale = 0.9f; public float maxScale = 1.1f; public float speed = 3f; private void Update() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Lerp(minScale, maxScale, (Mathf.Sin(Time.time * speed) + 1f) / 2f); ((Component)this).transform.localScale = new Vector3(num, num, 1f); } } protected override string GetTitle() { return "Hollow Purple"; } protected override string GetDescription() { return "Press [F] to fire a slow but massive sphere of imaginary mass. Deals 500% damage, passes through walls, and penetrates all obstacles."; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Hollow Purple [F]", amount = "Ultimate", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Cooldown", amount = "15s", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } 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_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: 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_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("HollowPurpleArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((Renderer)val2).sortingOrder = 5; int num = 128; Texture2D val3 = new Texture2D(num, num, (TextureFormat)4, false); ((Texture)val3).filterMode = (FilterMode)1; 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; int num4 = 50; for (int k = num3 - num4; k <= num3 + num4; k++) { for (int l = num2 - num4; l <= num2 + num4; l++) { float num5 = Vector2.Distance(new Vector2((float)l, (float)k), new Vector2((float)num2, (float)num3)); if (num5 <= (float)num4) { float num6 = ((float)num4 - num5) / (float)num4; Color val5 = Color.Lerp(new Color(0.4f, 0f, 0.9f, 0.9f), new Color(0.9f, 0.2f, 1f, 1f), num6); 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); ProceduralPulsator proceduralPulsator = val.AddComponent(); proceduralPulsator.minScale = 0.85f; proceduralPulsator.maxScale = 1.15f; proceduralPulsator.speed = 4f; 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_Purple"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { HollowPurpleUltimate component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class HollowPurpleUltimate : MonoBehaviour { private Player player; private float cooldownTimer; private bool isCharging; private float chargeProgress; private GameObject blueOrb; private GameObject redOrb; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[F] Hollow Purple", () => (!(cooldownTimer <= 0f)) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if ((Object)(object)blueOrb != (Object)null) { SpriteRenderer component = blueOrb.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.sprite != (Object)null) { Object.Destroy((Object)(object)component.sprite.texture); Object.Destroy((Object)(object)component.sprite); } Object.Destroy((Object)(object)blueOrb); } if ((Object)(object)redOrb != (Object)null) { SpriteRenderer component2 = redOrb.GetComponent(); if ((Object)(object)component2 != (Object)null && (Object)(object)component2.sprite != (Object)null) { Object.Destroy((Object)(object)component2.sprite.texture); Object.Destroy((Object)(object)component2.sprite); } Object.Destroy((Object)(object)redOrb); } isCharging = false; chargeProgress = 0f; if ((Object)(object)player != (Object)null && player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[F] Hollow Purple"); } } private void Update() { //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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //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_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) if (cooldownTimer > 0f) { cooldownTimer -= Time.deltaTime; } if ((Object)(object)player != (Object)null && player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)102) && cooldownTimer <= 0f && !isCharging) { NetworkingManager.RaiseEvent("JJKCardsMod_HollowPurple_Activate", new object[1] { player.playerID }); } if ((Object)(object)player != (Object)null && player.data.dead && isCharging) { isCharging = false; chargeProgress = 0f; cooldownTimer = 15f; if ((Object)(object)blueOrb != (Object)null) { Object.Destroy((Object)(object)blueOrb); blueOrb = null; } if ((Object)(object)redOrb != (Object)null) { Object.Destroy((Object)(object)redOrb); redOrb = null; } } if (isCharging) { chargeProgress += Time.deltaTime; if ((Object)(object)blueOrb != (Object)null && (Object)(object)redOrb != (Object)null) { Vector3 val = ((Component)player).transform.position + Vector3.up * 2.5f; float num = chargeProgress / 1.5f; Vector3 val2 = ((Component)player).transform.position + new Vector3(-2f, 2f, 0f); Vector3 val3 = ((Component)player).transform.position + new Vector3(2f, 2f, 0f); blueOrb.transform.position = Vector3.Lerp(val2, val, num); redOrb.transform.position = Vector3.Lerp(val3, val, num); blueOrb.transform.Rotate(0f, 0f, 800f * Time.deltaTime); redOrb.transform.Rotate(0f, 0f, -800f * Time.deltaTime); } if (chargeProgress >= 1.5f) { FireHollowPurple(); isCharging = false; chargeProgress = 0f; cooldownTimer = 15f; } } } public static void OnHollowPurpleEvent(object[] data) { if (data == null || data.Length < 1) { return; } int num = Convert.ToInt32(data[0]); Player val = null; foreach (Player player in PlayerManager.instance.players) { if (player.playerID == num) { val = player; break; } } if ((Object)(object)val != (Object)null) { HollowPurpleUltimate component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null && !component.isCharging) { component.StartCharge(); } } } private void StartCharge() { //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) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) isCharging = true; chargeProgress = 0f; JJKCardHelper.CreateFloatingText("Cursed Technique Lapse: Blue...", ((Component)player).transform.position + Vector3.up, Color.blue); JJKCardHelper.CreateFloatingText("Cursed Technique Reversal: Red...", ((Component)player).transform.position + Vector3.up * 1.5f, Color.red); blueOrb = CreateEnergyOrb(Color.blue, "BlueOrb"); redOrb = CreateEnergyOrb(Color.red, "RedOrb"); } private GameObject CreateEnergyOrb(Color color, string name) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); SpriteRenderer val2 = val.AddComponent(); Texture2D val3 = new Texture2D(32, 32); for (int i = 0; i < 32; i++) { for (int j = 0; j < 32; j++) { val3.SetPixel(j, i, (Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(16f, 16f)) < 16f) ? color : Color.clear); } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, 32f, 32f), new Vector2(0.5f, 0.5f), 32f); ((Renderer)val2).sortingOrder = 100; return val; } private void FireHollowPurple() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00bc: 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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)blueOrb != (Object)null) { Object.Destroy((Object)(object)blueOrb); } if ((Object)(object)redOrb != (Object)null) { Object.Destroy((Object)(object)redOrb); } JJKCardHelper.CreateFloatingText("Imaginary Mass: HOLLOW PURPLE!", ((Component)player).transform.position + Vector3.up * 2f, new Color(0.6f, 0f, 0.8f)); Vector3 normalized = ((Vector3)(ref player.data.aimDirection)).normalized; Vector3 position = ((Component)player).transform.position + normalized * 2f; GameObject val = new GameObject("HollowPurpleProjectile"); val.transform.position = position; SpriteRenderer val2 = val.AddComponent(); Texture2D val3 = new Texture2D(64, 64); Color val4 = default(Color); ((Color)(ref val4))..ctor(0.6f, 0f, 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)) < 32f) ? val4 : Color.clear); } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, 64f, 64f), new Vector2(0.5f, 0.5f), 32f); ((Renderer)val2).sortingOrder = 100; val.transform.localScale = Vector3.one * 8f; HollowPurpleProjectileMover hollowPurpleProjectileMover = val.AddComponent(); hollowPurpleProjectileMover.direction = normalized; hollowPurpleProjectileMover.caster = player; Object.Destroy((Object)(object)val, 5f); } } public class HollowPurpleProjectileMover : MonoBehaviour { public Vector3 direction; public Player caster; private float speed = 15f; private float tickTimer = 0.1f; private void Update() { //IL_0007: 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) //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_007b: 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_015c: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)this).transform; transform.position += direction * speed * Time.deltaTime; ((Component)this).transform.Rotate(0f, 0f, 300f * Time.deltaTime); float num = 8f + Mathf.Sin(Time.time * 20f) * 0.5f; ((Component)this).transform.localScale = new Vector3(num, num, 1f); if ((Object)(object)caster == (Object)null || !caster.data.view.IsMine) { return; } tickTimer -= Time.deltaTime; if (!(tickTimer <= 0f)) { return; } tickTimer = 0.1f; float num2 = 5f; float num3 = caster.data.weaponHandler.gun.damage * 55f * 2.5f; foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && !player.data.dead && (Object)(object)player != (Object)(object)caster && Vector3.Distance(((Component)this).transform.position, ((Component)player).transform.position) <= num2) { ((Damagable)player.data.healthHandler).CallTakeDamage(Vector2.up * num3, Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, caster, true); } } JJKCustomDummy[] array = Object.FindObjectsOfType(); foreach (JJKCustomDummy jJKCustomDummy in array) { if (Vector3.Distance(((Component)this).transform.position, ((Component)jJKCustomDummy).transform.position) <= num2) { jJKCustomDummy.TakeDamage(750f); } } } } public class IdleTransfigurationCard : CustomCard { protected override string GetTitle() { return "Idle Transfiguration"; } protected override string GetDescription() { return "Replaces your gun with melee Fists. Every punch damages the opponent's SOUL, permanently reducing their MAX HP by 10% for the rest of the round!"; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "Max HP Damage", amount = "10%", simepleAmount = (SimpleAmount)0 }, 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)5; } 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_009e: 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_0063: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("IdleTransfigurationArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((Renderer)val2).sortingOrder = 5; Texture2D val3 = new Texture2D(64, 64); for (int i = 0; i < 64; i++) { for (int j = 0; j < 64; j++) { val3.SetPixel(j, i, new Color(0.2f, 0.8f, 0.3f, 0.8f)); } } 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_FistSkill_IdleTrans"; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CursedFistsBehaviour cursedFistsBehaviour = ((Component)player).gameObject.GetComponent(); if ((Object)(object)cursedFistsBehaviour == (Object)null) { cursedFistsBehaviour = ((Component)player).gameObject.AddComponent(); } cursedFistsBehaviour.player = player; cursedFistsBehaviour.enableIdleTransfiguration = true; } 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(); if ((Object)(object)component != (Object)null) { component.enableIdleTransfiguration = false; } } } public class InfiniteVoidCard : CustomCard { protected override string GetTitle() { return "Domain Expansion: Infinite Void"; } protected override string GetDescription() { return "Press [V] to trap all nearby enemies in an infinite space of information, stunning them completely for 3 seconds and dealing 30 damage. (15s Cooldown)"; } protected override Rarity GetRarity() { return (Rarity)2; } 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 //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Domain Expansion [V]", amount = "Yes", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Stun Duration", amount = "3s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Cooldown", amount = "15s", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return null; } 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_Void"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { InfiniteVoidBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class InfiniteVoidBehaviour : MonoBehaviour { private Player player; private float cooldownTimer; private const float Cooldown = 15f; private const float Range = 100f; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[V] Infinite Void", () => (!(cooldownTimer <= 0f)) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[V] Infinite Void"); } } private void Update() { if (cooldownTimer > 0f) { cooldownTimer -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)118) && cooldownTimer <= 0f) { cooldownTimer = 15f; JJKAudioManager.instance?.PlaySoundGlobal("infinite_void", 1.5f, 5f); NetworkingManager.RaiseEvent("JJKCardsMod_InfiniteVoid_Activate", new object[1] { player.playerID }); } } public static void OnInfiniteVoidEvent(object[] data) { if (data == null || data.Length < 1) { 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) { ((MonoBehaviour)val).StartCoroutine(DomainCastRoutine(val)); } } private static IEnumerator DomainCastRoutine(Player sender) { if ((Object)(object)DomainManager.Instance == (Object)null) { yield break; } JJKCardHelper.CreateFloatingText("Domain Expansion...", ((Component)sender).transform.position, Color.white); float t = 0f; while (t < 1.5f) { if ((Object)(object)sender == (Object)null || sender.data.dead || DomainManager.Instance.IsClashActive) { yield break; } t += Time.deltaTime; yield return null; } if ((Object)(object)DomainManager.Instance.ActiveDomainCaster != (Object)null && (Object)(object)DomainManager.Instance.ActiveDomainCaster != (Object)(object)sender && !DomainManager.Instance.ActiveDomainCaster.data.dead) { DomainManager.Instance.StartClash(DomainManager.Instance.ActiveDomainCaster, sender, null, delegate { TriggerInfiniteVoid(sender); }); } else { DomainManager.Instance.ActiveDomainCaster = sender; TriggerInfiniteVoid(sender); } } public static void TriggerInfiniteVoid(Player sender) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_0087: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) JJKCardHelper.CreateFloatingText("INFINITE VOID!", ((Component)sender).transform.position, Color.cyan); SpawnDomainVoidVisual(((Component)sender).transform.position, 100f); Vector3 position = ((Component)sender).transform.position; foreach (Player player in PlayerManager.instance.players) { if (!((Object)(object)player != (Object)null) || !((Object)(object)player != (Object)(object)sender) || player.data.dead || !(Vector3.Distance(position, ((Component)player).transform.position) <= 100f)) { continue; } SimpleDomainBehaviour component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null && component.IsSimpleDomainActive) { JJKCardHelper.CreateFloatingText("DOMAIN NEGATED!", ((Component)player).transform.position, Color.white); } else if (sender.data.view.IsMine) { if ((Object)(object)player.data.stunHandler != (Object)null) { player.data.stunHandler.AddStun(3f); } if ((Object)(object)player.data.healthHandler != (Object)null) { ((Damagable)player.data.healthHandler).CallTakeDamage(Vector2.up * 30f, Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, sender, true); } } } if ((Object)(object)DomainManager.Instance != (Object)null) { DomainManager.Instance.EndDomain(sender); } } private static void SpawnDomainVoidVisual(Vector3 pos, float radius) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Expected O, but got Unknown //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_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_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Expected O, but got Unknown //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_015a: 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_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("InfiniteVoidDomainVisual"); val.transform.position = pos; val.transform.localScale = new Vector3(radius * 2f, radius * 2f, 1f); SpriteRenderer val2 = val.AddComponent(); ((Renderer)val2).sortingOrder = -10; int num = 256; Texture2D val3 = new Texture2D(num, num, (TextureFormat)4, false); ((Texture)val3).filterMode = (FilterMode)1; Color val4 = default(Color); ((Color)(ref val4))..ctor(0f, 0f, 0f, 0f); int num2 = num / 2; int num3 = num / 2; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { float num4 = j - num2; float num5 = i - num3; float num6 = Mathf.Sqrt(num4 * num4 + num5 * num5); if (num6 < (float)(num2 - 2)) { float num7 = Mathf.Sin(Mathf.Atan2(num5, num4) * 3f + num6 / 10f); float num8 = (1f - num6 / (float)num2) * 0.9f; if (num7 > 0.1f) { val3.SetPixel(j, i, Color.Lerp(new Color(0.4f, 0f, 0.9f, num8), new Color(0f, 0.6f, 0.9f, num8), num6 / (float)num2)); } else { val3.SetPixel(j, i, new Color(0.01f, 0f, 0.03f, num8 * 0.9f)); } } else { val3.SetPixel(j, i, val4); } } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); val.AddComponent(); GameObject val5 = new GameObject("Stars"); val5.transform.SetParent(val.transform); val5.transform.localPosition = Vector3.zero; val5.transform.localScale = Vector3.one; for (int k = 0; k < 30; k++) { GameObject val6 = new GameObject("VoidStar"); val6.transform.SetParent(val5.transform); float num9 = Random.Range(0f, 360f) * ((float)Math.PI / 180f); float num10 = Random.Range(0.05f, 0.45f); val6.transform.localPosition = new Vector3(Mathf.Cos(num9) * num10, Mathf.Sin(num9) * num10, -0.1f); val6.transform.localScale = new Vector3(0.02f, 0.02f, 1f); SpriteRenderer val7 = val6.AddComponent(); ((Renderer)val7).sortingOrder = -9; int num11 = 16; Texture2D val8 = new Texture2D(num11, num11, (TextureFormat)4, false); for (int l = 0; l < num11; l++) { for (int m = 0; m < num11; m++) { float num12 = Vector2.Distance(new Vector2((float)m, (float)l), new Vector2((float)num11 / 2f, (float)num11 / 2f)); float num13 = Mathf.Max(0f, 1f - num12 / ((float)num11 / 2f)); val8.SetPixel(m, l, new Color(1f, 1f, 1f, num13)); } } val8.Apply(); val7.sprite = Sprite.Create(val8, new Rect(0f, 0f, (float)num11, (float)num11), new Vector2(0.5f, 0.5f), 100f); } val5.AddComponent(); val.AddComponent(); Object.Destroy((Object)(object)val, 3f); } } public class VoidVisualCleanup : MonoBehaviour { private void OnDestroy() { SpriteRenderer[] componentsInChildren = ((Component)this).GetComponentsInChildren(true); foreach (SpriteRenderer val in componentsInChildren) { if ((Object)(object)val.sprite != (Object)null) { if ((Object)(object)val.sprite.texture != (Object)null) { Object.Destroy((Object)(object)val.sprite.texture); } Object.Destroy((Object)(object)val.sprite); } } } } public class VoidStarsSpinner : MonoBehaviour { private void Update() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.Rotate(Vector3.forward, 30f * Time.deltaTime); } } public class InfinityCard : CustomCard { protected override string GetTitle() { return "Limitless: Infinity"; } protected override string GetDescription() { return "Slows down incoming projectiles as they approach you (up to 95% slow). When you block, nearby projectiles are stopped completely."; } protected override Rarity GetRarity() { return (Rarity)1; } 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 //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Projectile Slowdown", amount = "Up to 95%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Slow Range", amount = "8m", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Block Stopping", 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_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_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_0119: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("InfinityCardArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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 = Vector2.Distance(new Vector2((float)l, (float)k), new Vector2((float)num2, (float)num3)); if ((num4 >= 20f && num4 <= 22f) || (num4 >= 40f && num4 <= 42f) || (num4 >= 56f && num4 <= 58f)) { val3.SetPixel(l, k, new Color(1f, 1f, 1f, 0.75f)); } } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); HollowPurpleCard.ProceduralPulsator proceduralPulsator = val.AddComponent(); proceduralPulsator.minScale = 0.9f; proceduralPulsator.maxScale = 1.1f; proceduralPulsator.speed = 1.5f; 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_Infinity"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { InfinityBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class InfinityBehaviour : MonoBehaviour { private Player player; private Block block; private const float Range = 8f; private GameObject auraObj; private float scanTimer; private const float ScanInterval = 0.1f; private Dictionary originalSpeeds = new Dictionary(); private Collider2D[] hitBuffer = (Collider2D[])(object)new Collider2D[40]; private float shatterTimer; public bool IsInfinityActive { get; private set; } = true; public void ShatterInfinity() { IsInfinityActive = false; shatterTimer = 3f; if ((Object)(object)auraObj != (Object)null) { auraObj.SetActive(false); } } private void Awake() { player = ((Component)this).GetComponent(); block = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Combine(obj.BlockAction, new Action(OnBlock)); } SpawnAura(); } private void SpawnAura() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) auraObj = new GameObject("InfinityAura"); auraObj.transform.SetParent(((Component)this).transform); auraObj.transform.localPosition = Vector3.zero; auraObj.transform.localScale = new Vector3(16f, 16f, 1f); SpriteRenderer val = auraObj.AddComponent(); ((Renderer)val).sortingOrder = -5; int num = 128; Texture2D val2 = new Texture2D(num, num, (TextureFormat)4, false); ((Texture)val2).filterMode = (FilterMode)0; Color val3 = default(Color); ((Color)(ref val3))..ctor(0f, 0f, 0f, 0f); for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { val2.SetPixel(j, i, val3); } } int num2 = num / 2; int num3 = num / 2; int num4 = num / 2 - 2; for (int k = 0; k < 360; k += 2) { float num5 = (float)k * ((float)Math.PI / 180f); int num6 = num2 + Mathf.RoundToInt(Mathf.Cos(num5) * (float)num4); int num7 = num3 + Mathf.RoundToInt(Mathf.Sin(num5) * (float)num4); val2.SetPixel(num6, num7, new Color(1f, 1f, 1f, 0.15f)); } val2.Apply(); val.sprite = Sprite.Create(val2, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); } private void OnBlock(BlockTriggerType triggerType) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) if (!IsInfinityActive) { return; } int num = Physics2D.OverlapCircleNonAlloc(Vector2.op_Implicit(((Component)this).transform.position), 8f, hitBuffer); for (int i = 0; i < num; i++) { Collider2D val = hitBuffer[i]; if ((Object)(object)val == (Object)null) { continue; } MoveTransform component = ((Component)val).GetComponent(); if (!((Object)(object)component != (Object)null)) { continue; } ProjectileHit component2 = ((Component)component).GetComponent(); if ((Object)(object)component2 != (Object)null && (Object)(object)component2.ownPlayer != (Object)(object)player) { component.velocity = Vector3.zero; Rigidbody2D component3 = ((Component)component).GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.velocity = Vector2.zero; } } } if ((Object)(object)auraObj != (Object)null && (Object)(object)auraObj.GetComponent() == (Object)null) { auraObj.AddComponent().sr = auraObj.GetComponent(); } } private void Update() { //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) if (!IsInfinityActive) { shatterTimer -= Time.deltaTime; if (shatterTimer <= 0f) { IsInfinityActive = true; if ((Object)(object)auraObj != (Object)null) { auraObj.SetActive(true); } JJKCardHelper.CreateFloatingText("INFINITY RESTORED", ((Component)this).transform.position, Color.cyan); } return; } scanTimer -= Time.deltaTime; if (scanTimer > 0f) { return; } scanTimer = 0.1f; if (Random.value < 0.1f) { foreach (MoveTransform item in new List(originalSpeeds.Keys)) { if ((Object)(object)item == (Object)null || (Object)(object)((Component)item).gameObject == (Object)null) { originalSpeeds.Remove(item); } } } int num = Physics2D.OverlapCircleNonAlloc(Vector2.op_Implicit(((Component)this).transform.position), 8f, hitBuffer); for (int i = 0; i < num; i++) { Collider2D val = hitBuffer[i]; if ((Object)(object)val == (Object)null) { continue; } MoveTransform component = ((Component)val).GetComponent(); if ((Object)(object)component == (Object)null) { continue; } ProjectileHit component2 = ((Component)component).GetComponent(); if ((Object)(object)component2 == (Object)null || (Object)(object)component2.ownPlayer == (Object)(object)player) { continue; } float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)component).transform.position); Vector2 velocity; if (!originalSpeeds.ContainsKey(component)) { float magnitude = ((Vector3)(ref component.velocity)).magnitude; if (magnitude < 0.1f) { Rigidbody2D component3 = ((Component)component).GetComponent(); if ((Object)(object)component3 != (Object)null) { velocity = component3.velocity; magnitude = ((Vector2)(ref velocity)).magnitude; } } if (!(magnitude > 0.1f)) { continue; } originalSpeeds[component] = magnitude; } float num3 = originalSpeeds[component]; bool flag = false; if ((Object)(object)component2.ownPlayer != (Object)null && (Object)(object)((Component)component2.ownPlayer).GetComponent() != (Object)null) { flag = true; } float num4 = Mathf.Clamp(num2 / 8f, 0.05f, 1f); float num5 = (flag ? 1f : num4); float num6 = num3 * num5; float num7 = Mathf.Lerp(((Vector3)(ref component.velocity)).magnitude, num6, 0.3f); if (((Vector3)(ref component.velocity)).sqrMagnitude > 0.001f) { component.velocity = ((Vector3)(ref component.velocity)).normalized * num7; } Rigidbody2D component4 = ((Component)component).GetComponent(); if ((Object)(object)component4 != (Object)null) { velocity = component4.velocity; if (((Vector2)(ref velocity)).sqrMagnitude > 0.001f) { velocity = component4.velocity; component4.velocity = ((Vector2)(ref velocity)).normalized * num7; } } } } private void OnDestroy() { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Remove(obj.BlockAction, new Action(OnBlock)); } if ((Object)(object)auraObj != (Object)null) { Object.Destroy((Object)(object)auraObj); } originalSpeeds.Clear(); } } public class AuraFlash : MonoBehaviour { public SpriteRenderer sr; private float timer = 0.4f; private void Update() { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) timer -= Time.deltaTime; if (timer <= 0f) { if ((Object)(object)sr != (Object)null) { sr.color = new Color(1f, 1f, 1f, 0.15f); } Object.Destroy((Object)(object)this); } else if ((Object)(object)sr != (Object)null) { sr.color = new Color(1f, 1f, 1f, 0.15f + timer / 0.4f * 0.4f); } } } public class InvertedSpearCard : CustomCard { protected override string GetTitle() { return "Inverted Spear of Heaven"; } protected override string GetDescription() { return "A legendary cursed tool that forcefully cancels cursed techniques. Replaces your weapon with a fast melee attack. Hitting an enemy silences their abilities for 3 seconds and shatters Gojo's Infinity."; } protected override Rarity GetRarity() { return (Rarity)1; } 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 //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Silence Duration", amount = "3s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bypass Infinity", amount = "Yes", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Range", amount = "Melee", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return null; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; ((Object)((Component)cardInfo).gameObject).name = "JJK_Tool_InvertedSpear"; gun.attackSpeed = 0.5f; gun.gravity = 0f; gun.projectileSpeed = 50f; gun.destroyBulletAfter = 0.1f; gun.damage = 1.5f; 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() == (Object)null) { ((Component)player).gameObject.AddComponent().player = player; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { InvertedSpearBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class InvertedSpearBehaviour : MonoBehaviour { public Player player; private void Awake() { player = ((Component)this).GetComponent(); } } [HarmonyPatch(typeof(ProjectileHit), "Hit")] internal class Patch_ProjectileHit_Hit_InvertedSpear { private static void Prefix(ProjectileHit __instance, HitInfo hit, bool forceCall) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)hit.transform == (Object)null || (Object)(object)__instance.ownPlayer == (Object)null) { return; } Player ownPlayer = __instance.ownPlayer; if (!((Object)(object)((Component)ownPlayer).GetComponent() != (Object)null)) { return; } Player componentInParent = ((Component)hit.transform).GetComponentInParent(); if (!((Object)(object)componentInParent != (Object)null) || !((Object)(object)componentInParent != (Object)(object)ownPlayer)) { return; } InfinityBehaviour component = ((Component)componentInParent).GetComponent(); if ((Object)(object)component != (Object)null && component.IsInfinityActive) { component.ShatterInfinity(); JJKCardHelper.CreateFloatingText("INFINITY SHATTERED!", ((Component)componentInParent).transform.position, Color.red); } MonoBehaviour[] componentsInChildren = ((Component)componentInParent).GetComponentsInChildren(); foreach (MonoBehaviour val in componentsInChildren) { if ((Object)(object)val != (Object)null && ((object)val).GetType().Namespace != null && ((object)val).GetType().Namespace.Contains("JJKCardsMod") && !(val is JJKPlayerCharacter) && !(val is Player) && !(val is CharacterData) && ((Behaviour)val).enabled) { ((Behaviour)val).enabled = false; JJKCardHelper.CreateFloatingText("TECHNIQUE EXTINGUISHED: " + ((object)val).GetType().Name.Replace("Behaviour", ""), ((Component)componentInParent).transform.position + Vector3.up * 0.5f, Color.white); } } if ((Object)(object)componentInParent.data.stunHandler != (Object)null) { componentInParent.data.stunHandler.AddStun(1.5f); JJKCardHelper.CreateFloatingText("SILENCED!", ((Component)componentInParent).transform.position + Vector3.up, Color.magenta); } JJKCardHelper.CreateFloatingText("âš¡", Vector2.op_Implicit(hit.point), Color.yellow); } } public class MahoragaCard : CustomCard { protected override string GetTitle() { return "Divine General Mahoraga"; } protected override string GetDescription() { return "Adapt to any and all phenomena. Survival guarantees victory. Starts taking 20% more damage, but adapts to specific players and DOTs. Resets every round."; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Adaptation", amount = "Phenomena", 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("MahoragaArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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); } } Color cyan = Color.cyan; int num2 = num / 2; int num3 = num / 2; int num4 = 40; int num5 = 8; for (int k = num3 - num4; k <= num3 + num4; k++) { for (int l = num2 - num4; l <= num2 + num4; l++) { float num6 = Vector2.Distance(new Vector2((float)l, (float)k), new Vector2((float)num2, (float)num3)); if (num6 >= (float)(num4 - 3) && num6 <= (float)num4) { val3.SetPixel(l, k, cyan); } if (num6 <= (float)num5) { val3.SetPixel(l, k, cyan); } } } for (int m = 0; m < 8; m++) { float num7 = (float)m * 45f * ((float)Math.PI / 180f); for (float num8 = num5; num8 < (float)num4; num8 += 0.5f) { int num9 = num2 + Mathf.RoundToInt(Mathf.Cos(num7) * num8); int num10 = num3 + Mathf.RoundToInt(Mathf.Sin(num7) * num8); val3.SetPixel(num9, num10, cyan); } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); val.AddComponent(); 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_Megumi_Mahoraga"; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { MahoragaBehaviour mahoragaBehaviour = ((Component)player).gameObject.GetComponent(); if ((Object)(object)mahoragaBehaviour == (Object)null) { mahoragaBehaviour = ((Component)player).gameObject.AddComponent(); } mahoragaBehaviour.SpawnWheel(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((MonoBehaviour)player).StartCoroutine(RemoveCoroutine(player)); } private IEnumerator RemoveCoroutine(Player player) { yield return (object)new WaitForEndOfFrame(); if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && player.data.currentCards != null && !player.data.currentCards.Any((CardInfo c) => (Object)(object)c != (Object)null && ((Object)((Component)c).gameObject).name.Replace("(Clone)", "") == "JJK_Tech_Megumi_Mahoraga")) { MahoragaBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null && !component.isFullPotential) { component.DestroyWheel(); Object.Destroy((Object)(object)component); } } } } public class MahoragaBehaviour : MonoBehaviour { private Player player; private MahoragaWheel wheel; public bool isFullPotential; public Dictionary playerResistances = new Dictionary(); public float dotResistance; public float slowResistance; public Dictionary blockBypassChance = new Dictionary(); private int currentRound = 1; private float visualSpinTimer; private Dictionary queuedTextProgress = new Dictionary(); private Dictionary lastTextTime = new Dictionary(); private void Awake() { player = ((Component)this).GetComponent(); } private void OnEnable() { GameModeManager.AddHook("RoundEnd", (Func)OnRoundEnd); } private void OnDisable() { GameModeManager.RemoveHook("RoundEnd", (Func)OnRoundEnd); } private IEnumerator OnRoundEnd(IGameModeHandler gm) { if (!isFullPotential) { ResetAdaptation(); } currentRound++; yield break; } public void ResetAdaptation() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) playerResistances.Clear(); blockBypassChance.Clear(); dotResistance = 0f; slowResistance = 0f; JJKCardHelper.CreateFloatingText("Adaptation Reset!", ((Component)this).transform.position + Vector3.up * 2f, Color.red); } private void Update() { //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) if (visualSpinTimer > 0f) { visualSpinTimer -= Time.deltaTime; if ((Object)(object)wheel != (Object)null) { wheel.TriggerAdaptationEffect(); } } Vector3 val = default(Vector3); foreach (string item in new List(queuedTextProgress.Keys)) { if (!lastTextTime.ContainsKey(item)) { lastTextTime[item] = 0f; } if (Time.time - lastTextTime[item] >= 0.2f) { float num = queuedTextProgress[item]; queuedTextProgress.Remove(item); lastTextTime[item] = Time.time; ((Vector3)(ref val))..ctor(Random.Range(-0.5f, 0.5f), Random.Range(0f, 0.5f), 0f); JJKCardHelper.CreateFloatingText((num >= 1f) ? ("âš™\ufe0f " + item + " 100% IMMUNE!") : $"âš™\ufe0f {item}: {Mathf.FloorToInt(num * 100f)}%", ((Component)this).transform.position + Vector3.up * 1.5f + val, Color.cyan); } } } private void Start() { if (!player.data.view.IsMine) { return; } JJKCooldownManager.instance.RegisterAbility("Mahoraga Adapt", delegate { List list = new List(); foreach (KeyValuePair playerResistance in playerResistances) { if (playerResistance.Value > 0f) { list.Add($"Player {playerResistance.Key}: {Mathf.FloorToInt(playerResistance.Value * 100f)}%"); } } if (dotResistance > 0f) { list.Add($"D.O.T.: {Mathf.FloorToInt(dotResistance * 100f)}%"); } if (isFullPotential) { list.Add("[FULL POTENTIAL]"); } return string.Join("\n", list); }); } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("Mahoraga Adapt"); } DestroyWheel(); } public void SpawnWheel() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown if ((Object)(object)wheel == (Object)null) { GameObject val = new GameObject("MahoragaWheel"); wheel = val.AddComponent(); wheel.Init(player); if (isFullPotential) { wheel.SetGold(); } } } public void DestroyWheel() { if ((Object)(object)wheel != (Object)null) { Object.Destroy((Object)(object)((Component)wheel).gameObject); wheel = null; } } public Vector2 FilterDamage(Vector2 damage, bool isDmgOverTime, Player damagingPlayer, bool hasKatana = false) { //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) float num = 1.2f; float num2 = 0f; if (isDmgOverTime) { float num3 = dotResistance; dotResistance = Mathf.Clamp01(dotResistance + 0.2f); num2 = dotResistance; if (num3 < 1f) { visualSpinTimer = 0.5f; queuedTextProgress["D.O.T."] = dotResistance; } } else if ((Object)(object)damagingPlayer != (Object)null) { int playerID = damagingPlayer.playerID; if (!playerResistances.ContainsKey(playerID)) { playerResistances[playerID] = 0f; } float num4 = playerResistances[playerID]; playerResistances[playerID] = Mathf.Clamp01(playerResistances[playerID] + 0.15f); num2 = playerResistances[playerID]; if (num4 < 1f) { visualSpinTimer = 0.5f; queuedTextProgress[$"Player {playerID}"] = playerResistances[playerID]; } } if (hasKatana) { num2 *= 0.5f; } num -= num2; num = Mathf.Max(0f, num); return damage * num; } public void RegisterEnemyBlocked(Player enemy) { int playerID = enemy.playerID; if (!blockBypassChance.ContainsKey(playerID)) { blockBypassChance[playerID] = 0f; } float num = blockBypassChance[playerID]; blockBypassChance[playerID] = Mathf.Clamp01(blockBypassChance[playerID] + 0.2f); if (num < 1f) { visualSpinTimer = 0.5f; queuedTextProgress[$"Bypass P{playerID}"] = blockBypassChance[playerID]; } } } public class MahoragaWheel : MonoBehaviour { private SpriteRenderer sr; private float spinSpeed = 30f; private float targetSpinSpeed = 30f; private float flashTimer; private Player player; private Color baseColor = Color.cyan; public void Init(Player p) { //IL_0032: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: 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_0229: Unknown result type (might be due to invalid IL or missing references) player = p; ((Component)this).transform.SetParent(((Component)player).transform); ((Component)this).transform.localPosition = new Vector3(0f, 2.2f, -0.5f); ((Component)this).transform.localScale = new Vector3(2.5f, 2.5f, 1f); sr = ((Component)this).gameObject.AddComponent(); ((Renderer)sr).sortingOrder = 999; int num = 128; Texture2D val = new Texture2D(num, num, (TextureFormat)4, false); ((Texture)val).filterMode = (FilterMode)0; Color val2 = default(Color); ((Color)(ref val2))..ctor(0f, 0f, 0f, 0f); for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { val.SetPixel(j, i, val2); } } Color white = Color.white; int num2 = num / 2; int num3 = num / 2; int num4 = 40; int r = 10; DrawCircle(val, num2, num3, num4, white); DrawCircle(val, num2, num3, num4 - 1, white); DrawCircle(val, num2, num3, num4 - 2, white); DrawFilledCircle(val, num2, num3, r, white); for (int k = 0; k < 8; k++) { float num5 = (float)k * 45f * ((float)Math.PI / 180f); int x = num2 + Mathf.RoundToInt(Mathf.Cos(num5) * (float)num4); int y = num3 + Mathf.RoundToInt(Mathf.Sin(num5) * (float)num4); DrawLine(val, num2, num3, x, y, white); } for (int l = 0; l < 8; l++) { float num6 = (float)l * 45f * ((float)Math.PI / 180f); int cx = num2 + Mathf.RoundToInt(Mathf.Cos(num6) * (float)(num4 + 4)); int cy = num3 + Mathf.RoundToInt(Mathf.Sin(num6) * (float)(num4 + 4)); DrawFilledCircle(val, cx, cy, 4, white); } val.Apply(); sr.sprite = Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); sr.color = baseColor; } public void SetGold() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) baseColor = new Color(1f, 0.8f, 0.2f); } private void Update() { //IL_0049: 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_0084: Unknown result type (might be due to invalid IL or missing references) spinSpeed = Mathf.Lerp(spinSpeed, targetSpinSpeed, Time.deltaTime * 5f); targetSpinSpeed = Mathf.Lerp(targetSpinSpeed, 30f, Time.deltaTime * 2f); ((Component)this).transform.Rotate(Vector3.forward, spinSpeed * Time.deltaTime); if (flashTimer > 0f) { flashTimer -= Time.deltaTime; sr.color = Color.white; } else { sr.color = baseColor; } } private void OnDestroy() { if ((Object)(object)sr != (Object)null && (Object)(object)sr.sprite != (Object)null) { if ((Object)(object)sr.sprite.texture != (Object)null) { Object.Destroy((Object)(object)sr.sprite.texture); } Object.Destroy((Object)(object)sr.sprite); } } public void TriggerAdaptationEffect() { spinSpeed = 1200f; targetSpinSpeed = 1200f; flashTimer = 0.5f; } private void DrawCircle(Texture2D tex, int cx, int cy, int r, Color col) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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_004b: 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_0067: 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) int num = r; int num2 = 0; int num3 = 0; while (num >= num2) { tex.SetPixel(cx + num, cy + num2, col); tex.SetPixel(cx + num2, cy + num, col); tex.SetPixel(cx - num2, cy + num, col); tex.SetPixel(cx - num, cy + num2, col); tex.SetPixel(cx - num, cy - num2, col); tex.SetPixel(cx - num2, cy - num, col); tex.SetPixel(cx + num2, cy - num, col); tex.SetPixel(cx + num, cy - num2, col); num2++; if (num3 <= 0) { num3 += 2 * num2 + 1; continue; } num--; num3 -= 2 * num + 1; } } private void DrawFilledCircle(Texture2D tex, int cx, int cy, int r, Color col) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) for (int i = -r; i <= r; i++) { for (int j = -r; j <= r; j++) { if (j * j + i * i <= r * r) { tex.SetPixel(cx + j, cy + i, col); } } } } private void DrawLine(Texture2D tex, int x0, int y0, int x1, int y1, Color col) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) int num = Mathf.Abs(x1 - x0); int num2 = Mathf.Abs(y1 - y0); int num3 = ((x0 < x1) ? 1 : (-1)); int num4 = ((y0 < y1) ? 1 : (-1)); int num5 = num - num2; while (true) { tex.SetPixel(x0, y0, col); if (x0 != x1 || y0 != y1) { int num6 = 2 * num5; if (num6 > -num2) { num5 -= num2; x0 += num3; } if (num6 < num) { num5 += num; y0 += num4; } continue; } break; } } } [HarmonyPatch] internal class Patch_HealthHandler_TakeDamage_All { private static IEnumerable TargetMethods() { return from m in typeof(HealthHandler).GetMethods(BindingFlags.Instance | BindingFlags.Public) where m.Name == "TakeDamage" select m; } private static void Prefix(HealthHandler __instance, ref Vector2 damage, MethodBase __originalMethod, object[] __args) { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) Player componentInParent = ((Component)__instance).GetComponentInParent(); if ((Object)(object)componentInParent == (Object)null) { return; } Player val = null; bool isDmgOverTime = true; ParameterInfo[] parameters = __originalMethod.GetParameters(); for (int i = 0; i < parameters.Length; i++) { if (parameters[i].Name == "damagingWeapon" && __args[i] != null) { isDmgOverTime = false; } else if (parameters[i].Name == "damagingPlayer" && __args[i] != null) { object obj = __args[i]; val = (Player)((obj is Player) ? obj : null); } } bool hasKatana = false; if ((Object)(object)val != (Object)null && (Object)(object)((Component)val).GetComponent() != (Object)null) { hasKatana = true; if ((Object)(object)((Component)componentInParent).GetComponent() == (Object)null) { ((Component)componentInParent).gameObject.AddComponent(); } } MahoragaBehaviour component = ((Component)componentInParent).GetComponent(); if ((Object)(object)component != (Object)null) { damage = component.FilterDamage(damage, isDmgOverTime, val, hasKatana); } } } [HarmonyPatch(typeof(Block), "IsBlocking")] internal class Patch_Block_IsBlocking { private static bool Prefix(Block __instance, ref bool __result) { return true; } } public class MalevolentShrineCard : CustomCard { protected override string GetTitle() { return "Domain Expansion: Malevolent Shrine"; } protected override string GetDescription() { return "Press [Y] to unleash Sukuna's domain across the entire map! For 5 seconds, random slashes appear everywhere, and all enemies take continuous unavoidable damage. (20s CD)"; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Malevolent Shrine [G]", amount = "Map-Wide", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Cooldown", amount = "20s", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Sukuna_Shrine"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { MalevolentShrineBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class MalevolentShrineBehaviour : MonoBehaviour { private Player player; private float cooldownTimer; private const float Cooldown = 20f; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[Y] Malevolent Shrine", () => (!(cooldownTimer <= 0f)) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if ((Object)(object)player != (Object)null && (Object)(object)player.data != (Object)null && (Object)(object)player.data.view != (Object)null && player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[Y] Malevolent Shrine"); } } private void Update() { if (cooldownTimer > 0f) { cooldownTimer -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)121) && cooldownTimer <= 0f) { cooldownTimer = 20f; JJKAudioManager.instance?.PlaySoundGlobal("malevolent_shrine", 1.5f, 5f); NetworkingManager.RaiseEvent("JJKCardsMod_MalevolentShrine_Activate", new object[1] { player.playerID }); } } public static void OnMalevolentShrineEvent(object[] data) { if (data == null || data.Length < 1) { 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 && !((Object)(object)((Component)val).gameObject.GetComponent() != (Object)null)) { ((MonoBehaviour)val).StartCoroutine(DomainCastRoutine(val)); } } private static IEnumerator DomainCastRoutine(Player sender) { if ((Object)(object)DomainManager.Instance == (Object)null) { yield break; } JJKCardHelper.CreateFloatingText("Domain Expansion...", ((Component)sender).transform.position, Color.white); float t = 0f; while (t < 1.5f) { if ((Object)(object)sender == (Object)null || sender.data.dead || DomainManager.Instance.IsClashActive) { yield break; } t += Time.deltaTime; yield return null; } if ((Object)(object)DomainManager.Instance.ActiveDomainCaster != (Object)null && (Object)(object)DomainManager.Instance.ActiveDomainCaster != (Object)(object)sender && !DomainManager.Instance.ActiveDomainCaster.data.dead) { DomainManager.Instance.StartClash(DomainManager.Instance.ActiveDomainCaster, sender, null, delegate { TriggerMalevolentShrine(sender); }); } else { DomainManager.Instance.ActiveDomainCaster = sender; TriggerMalevolentShrine(sender); } } public static void TriggerMalevolentShrine(Player sender) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)((Component)sender).gameObject.GetComponent() != (Object)null)) { JJKCardHelper.CreateFloatingText("DOMAIN EXPANSION:\nMALEVOLENT SHRINE!", ((Component)sender).transform.position + Vector3.up * 2f, Color.red); ((Component)sender).gameObject.AddComponent().caster = sender; } } } public class MalevolentShrineActiveDomain : MonoBehaviour { public Player caster; private bool isCleanedUp; private float activeTimer = 5f; private float damageTickTimer; private float visualSlashTimer; private GameObject screenOverlay; private List skulls = new List(); private static Material cachedSlashMat; private void Start() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_001b: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) screenOverlay = new GameObject("ShrineOverlay"); screenOverlay.transform.position = Vector3.zero; screenOverlay.transform.localScale = new Vector3(200f, 200f, 1f); SpriteRenderer val = screenOverlay.AddComponent(); ((Renderer)val).sortingOrder = -20; Texture2D val2 = new Texture2D(2, 2); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.3f, 0f, 0f, 0.4f); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { val2.SetPixel(j, i, val3); } } val2.Apply(); val.sprite = Sprite.Create(val2, new Rect(0f, 0f, 2f, 2f), new Vector2(0.5f, 0.5f), 1f); Color val7 = default(Color); for (int k = 0; k < 4; k++) { GameObject val4 = new GameObject("ShrineSkull"); val4.transform.position = ((Component)this).transform.position; SpriteRenderer val5 = val4.AddComponent(); ((Renderer)val5).sortingOrder = -9; int num = 32; Texture2D val6 = new Texture2D(num, num, (TextureFormat)4, false); ((Texture)val6).filterMode = (FilterMode)0; ((Color)(ref val7))..ctor(0f, 0f, 0f, 0f); for (int l = 0; l < num; l++) { for (int m = 0; m < num; m++) { val6.SetPixel(m, l, val7); } } int num2 = num / 2; int num3 = num / 2; for (int n = num3 - 8; n <= num3 + 8; n++) { for (int num4 = num2 - 8; num4 <= num2 + 8; num4++) { if (Vector2.Distance(new Vector2((float)num4, (float)n), new Vector2((float)num2, (float)num3)) <= 8f) { val6.SetPixel(num4, n, new Color(0.9f, 0.9f, 0.9f, 0.85f)); } } } val6.SetPixel(num2 - 3, num3 + 2, val7); val6.SetPixel(num2 + 3, num3 + 2, val7); val6.SetPixel(num2 - 2, num3 + 2, val7); val6.SetPixel(num2 + 2, num3 + 2, val7); for (int num5 = num2 - 3; num5 <= num2 + 3; num5 += 2) { val6.SetPixel(num5, num3 - 7, Color.black); val6.SetPixel(num5, num3 - 8, Color.black); } val6.Apply(); val5.sprite = Sprite.Create(val6, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); skulls.Add(val4.transform); } } private void Update() { //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) activeTimer -= Time.deltaTime; if (activeTimer <= 0f || (Object)(object)caster == (Object)null || caster.data.dead || ((Object)(object)DomainManager.Instance != (Object)null && (Object)(object)DomainManager.Instance.ActiveDomainCaster != (Object)(object)caster)) { CleanUp(); return; } float num = 90f; for (int i = 0; i < skulls.Count; i++) { if ((Object)(object)skulls[i] != (Object)null) { float num2 = ((float)i * (360f / (float)skulls.Count) + Time.time * num) * ((float)Math.PI / 180f); Vector3 position = ((Component)caster).transform.position + new Vector3(Mathf.Cos(num2) * 3f, Mathf.Sin(num2) * 3f, 0f); skulls[i].position = position; skulls[i].rotation = Quaternion.Euler(0f, 0f, num2 * 57.29578f - 90f); } } visualSlashTimer -= Time.deltaTime; if (visualSlashTimer <= 0f) { visualSlashTimer = 0.05f; Vector3 pos = default(Vector3); ((Vector3)(ref pos))..ctor(Random.Range(-35f, 35f), Random.Range(-20f, 20f), 0f); SpawnCleaveSlashVisual(pos, 3f); } if ((Object)(object)caster == (Object)null || !caster.data.view.IsMine) { return; } damageTickTimer -= Time.deltaTime; if (!(damageTickTimer <= 0f)) { return; } damageTickTimer = 0.4f; foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && (Object)(object)player != (Object)(object)caster && !player.data.dead) { SimpleDomainBehaviour component = ((Component)player).GetComponent(); if (!((Object)(object)component != (Object)null) || !component.IsSimpleDomainActive) { ((Damagable)player.data.healthHandler).CallTakeDamage(Vector2.up * 10f, Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, caster, true); SpawnCleaveSlashVisual(((Component)player).transform.position, 1.5f); } } } JJKCustomDummy[] array = Object.FindObjectsOfType(); foreach (JJKCustomDummy jJKCustomDummy in array) { jJKCustomDummy.TakeDamage(200f); SpawnCleaveSlashVisual(((Component)jJKCustomDummy).transform.position, 1.5f); } } private void SpawnCleaveSlashVisual(Vector3 pos, float length) { //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_0010: 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_005f: 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown GameObject val = new GameObject("ShrineSlash"); val.transform.position = pos; LineRenderer obj = val.AddComponent(); obj.startWidth = 0.2f; obj.endWidth = 0f; if ((Object)(object)cachedSlashMat == (Object)null) { cachedSlashMat = new Material(Shader.Find("Sprites/Default")); } ((Renderer)obj).material = cachedSlashMat; obj.startColor = Color.white; obj.endColor = Color.red; obj.positionCount = 2; float num = Random.Range(0f, 360f) * ((float)Math.PI / 180f); Vector3 val2 = new Vector3(Mathf.Cos(num), Mathf.Sin(num), 0f) * (length / 2f); obj.SetPosition(0, pos - val2); obj.SetPosition(1, pos + val2); Object.Destroy((Object)val, 0.15f); } private void CleanUp() { if (isCleanedUp) { return; } isCleanedUp = true; if ((Object)(object)screenOverlay != (Object)null) { SpriteRenderer component = screenOverlay.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.sprite != (Object)null) { Object.Destroy((Object)(object)component.sprite.texture); Object.Destroy((Object)(object)component.sprite); } Object.Destroy((Object)(object)screenOverlay); } foreach (Transform skull in skulls) { if ((Object)(object)skull != (Object)null) { SpriteRenderer component2 = ((Component)skull).GetComponent(); if ((Object)(object)component2 != (Object)null && (Object)(object)component2.sprite != (Object)null) { Object.Destroy((Object)(object)component2.sprite.texture); Object.Destroy((Object)(object)component2.sprite); } Object.Destroy((Object)(object)((Component)skull).gameObject); } } skulls.Clear(); if ((Object)(object)DomainManager.Instance != (Object)null) { DomainManager.Instance.EndDomain(caster); } Object.Destroy((Object)(object)this); } private void OnDestroy() { CleanUp(); } } public class OvertimeCard : CustomCard { protected override string GetTitle() { return "Overtime"; } protected override string GetDescription() { return "Nanami hates working overtime. After 5 seconds in a round, you gain a massive 100% boost to Damage and Movement Speed!"; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Overtime", amount = "Buffs", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Nanami_Overtime"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { OvertimeBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class OvertimeBehaviour : MonoBehaviour { private Player player; private float roundTimer; private bool overtimeActive; private void Awake() { player = ((Component)this).GetComponent(); } private void Update() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !player.data.dead) { roundTimer += Time.deltaTime; if (roundTimer >= 5f && !overtimeActive) { overtimeActive = true; JJKCardHelper.CreateFloatingText("OVERTIME!", ((Component)player).transform.position + Vector3.up, Color.yellow); Gun gun = player.data.weaponHandler.gun; gun.damage *= 2f; CharacterStatModifiers stats = player.data.stats; stats.movementSpeed *= 2f; } } } private void OnEnable() { roundTimer = 0f; overtimeActive = false; } private void OnDisable() { if (overtimeActive && (Object)(object)player != (Object)null) { Gun gun = player.data.weaponHandler.gun; gun.damage /= 2f; CharacterStatModifiers stats = player.data.stats; stats.movementSpeed /= 2f; } overtimeActive = false; } } public class CollapseCard : CustomCard { protected override string GetTitle() { return "Collapse"; } protected override string GetDescription() { return "Press [F] to smash the ground with Nanami's technique, sending damaging debris flying upwards in an AOE around you!"; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "Collapse [F]", amount = "AOE", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Nanami_Collapse"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CollapseBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class CollapseBehaviour : MonoBehaviour { private Player player; private float cooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[F] Collapse", () => (!(cooldown > 0f)) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[F] Collapse"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !player.data.dead) { if (cooldown > 0f) { cooldown -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)102) && cooldown <= 0f) { cooldown = 12f; NetworkingManager.RaiseEvent("JJKCardsMod_Collapse", new object[1] { player.playerID }); } } } public static void OnCollapseEvent(object[] data) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length == 0) { return; } int num = Convert.ToInt32(data[0]); foreach (Player player in PlayerManager.instance.players) { if (player.playerID != num) { continue; } JJKCardHelper.CreateFloatingText("COLLAPSE!", ((Component)player).transform.position, Color.yellow); float num2 = 8f; GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); obj.transform.position = ((Component)player).transform.position; obj.transform.localScale = Vector3.one * num2 * 2f; obj.GetComponent().material.color = new Color(0.5f, 0.4f, 0f, 0.5f); Object.Destroy((Object)(object)obj.GetComponent()); Object.Destroy((Object)(object)obj, 0.4f); if (!player.data.view.IsMine) { break; } Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)player).transform.position), num2); for (int i = 0; i < array.Length; i++) { Player componentInParent = ((Component)array[i]).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)player && !componentInParent.data.dead) { ((Damagable)componentInParent.data.healthHandler).CallTakeDamage(Vector2.up * 80f, Vector2.op_Implicit(((Component)componentInParent).transform.position), (GameObject)null, player, false); } } break; } } } public class DullKnifeCard : CustomCard { protected override string GetTitle() { return "Dull Knife"; } protected override string GetDescription() { return "Nanami's wrapped blade causes brutal bruising. Bullets apply a small bleed effect."; } 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 = "Bleed", amount = "Yes", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Nanami_DullKnife"; gun.damageAfterDistanceMultiplier = 1.1f; GameObject val = new GameObject("BleedHitEffect"); val.AddComponent(); Object.DontDestroyOnLoad((Object)(object)val); ObjectsToSpawn val2 = new ObjectsToSpawn { effect = val, numberOfSpawns = 1, normalOffset = 0f, spawnOn = (SpawnOn)0, spawnAsChild = false }; gun.objectsToSpawn = (ObjectsToSpawn[])((gun.objectsToSpawn != null) ? ((Array)new List(gun.objectsToSpawn) { val2 }.ToArray()) : ((Array)new ObjectsToSpawn[1] { val2 })); JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } public class BleedHitTrigger : MonoBehaviour { private void Start() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)this).transform.position), 1.5f); for (int i = 0; i < array.Length; i++) { Player componentInParent = ((Component)array[i]).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && !componentInParent.data.dead) { BleedEffectTick bleedEffectTick = ((Component)componentInParent).gameObject.GetComponent(); if ((Object)(object)bleedEffectTick == (Object)null) { bleedEffectTick = ((Component)componentInParent).gameObject.AddComponent(); } bleedEffectTick.AddBleed(15f, 3f); } } Object.Destroy((Object)(object)((Component)this).gameObject, 0.1f); } } public class BleedEffectTick : MonoBehaviour { private Player player; private float bleedDamageQueue; private float bleedTimer; private void Awake() { player = ((Component)this).GetComponent(); } private void OnDisable() { bleedDamageQueue = 0f; bleedTimer = 0f; } public void AddBleed(float damage, float duration) { bleedDamageQueue += damage; bleedTimer = duration; } private void Update() { //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_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead && !(bleedTimer <= 0f)) { float num = bleedDamageQueue / bleedTimer * Time.deltaTime; bleedDamageQueue -= num; bleedTimer -= Time.deltaTime; if ((Object)(object)player.data.view != (Object)null && player.data.view.IsMine) { ((Damagable)player.data.healthHandler).CallTakeDamage(Vector2.up * num, Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, (Player)null, false); } if (Random.value < 0.1f) { JJKAnimator.CreateSparks(Vector2.op_Implicit(((Component)player).transform.position), Vector2.down, Color.red, 1); } } } } public class NanamiBlackFlashCard : CustomCard { protected override string GetTitle() { return "Black Flash (Nanami)"; } protected override string GetDescription() { return "Your bullets have a 20% chance to trigger a Black Flash on hit, dealing bonus damage!"; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Damage", amount = "+50%", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Nanami_BlackFlash"; gun.damage = 1.5f; GameObject val = new GameObject("BlackFlashHitEffect"); val.AddComponent(); Object.DontDestroyOnLoad((Object)(object)val); ObjectsToSpawn val2 = new ObjectsToSpawn { effect = val, numberOfSpawns = 1, normalOffset = 0f, spawnOn = (SpawnOn)0, spawnAsChild = false }; gun.objectsToSpawn = (ObjectsToSpawn[])((gun.objectsToSpawn != null) ? ((Array)new List(gun.objectsToSpawn) { val2 }.ToArray()) : ((Array)new ObjectsToSpawn[1] { val2 })); JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } public class BlackFlashHitTrigger : MonoBehaviour { private void Start() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_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_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) bool flag = false; Player val = null; foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && !player.data.dead && Vector3.Distance(((Component)this).transform.position, ((Component)player).transform.position) < 2.5f) { flag = true; val = player; break; } } if (!flag) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } if (Random.value > 0.2f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } if ((Object)(object)val != (Object)null && val.data.view.IsMine) { ((Damagable)val.data.healthHandler).CallTakeDamage(Vector2.up * 50f, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, (Player)null, true); } JJKAudioManager.instance?.PlaySound("black_flash", ((Component)this).transform.position, 1.2f, 2f); JJKAnimator.CreateSparks(Vector2.op_Implicit(((Component)this).transform.position), Vector2.up + Vector2.right, Color.red, 12); JJKAnimator.CreateSparks(Vector2.op_Implicit(((Component)this).transform.position), Vector2.down + Vector2.left, Color.black, 12); JJKCardHelper.CreateFloatingText("BLACK FLASH!", ((Component)this).transform.position + Vector3.up, Color.red); JJKAnimator.CreateShockwave(Vector2.op_Implicit(((Component)this).transform.position), 6f, 0.4f, new Color(0.8f, 0f, 0f, 0.8f)); Object.Destroy((Object)(object)((Component)this).gameObject, 0.1f); } } public class NewShadowStyleCard : CustomCard { protected override string GetTitle() { return "New Shadow Style: Batto"; } protected override string GetDescription() { return "Passive Upgrade: Your Simple Domain now reflects all incoming enemy projectiles while active. If you don't have Simple Domain, grants it to you."; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Reflect Projectiles", 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_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_0179: 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_013f: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("NewShadowStyleArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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; int num4 = 40; for (int k = 0; k < 50; k++) { float num5 = (float)k / 49f; float num6 = Mathf.Lerp(-(float)Math.PI / 4f, (float)Math.PI / 2f, num5); int num7 = num2 + Mathf.RoundToInt(Mathf.Cos(num6) * (float)num4); int num8 = num3 + Mathf.RoundToInt(Mathf.Sin(num6) * (float)num4); for (int l = -2; l <= 2; l++) { if (num7 + l >= 0 && num7 + l < num && num8 >= 0 && num8 < num) { val3.SetPixel(num7 + l, num8, new Color(1f, 1f, 1f, 1f - (float)Mathf.Abs(l) / 3f)); } } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); 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_NewShadowStyle"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { NewShadowStyleUpgrade component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class NewShadowStyleUpgrade : MonoBehaviour { } public class PiercingBloodCard : CustomCard { protected override string GetTitle() { return "Piercing Blood"; } protected override string GetDescription() { return "Press [X] to fire a high-speed, hyper-compressed beam of blood that pierces everything in a straight line."; } 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 //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Blood Beam [X]", amount = "Active", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Projectile Pierce", amount = "Infinite", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Cooldown", amount = "12s", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("PiercingBlood.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; ((Object)((Component)cardInfo).gameObject).name = "JJK_FistSkill_PiercingBlood"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PiercingBloodBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class PiercingBloodBehaviour : MonoBehaviour { private Player player; private float cooldownTimer; private const float Cooldown = 12f; private const float Damage = 150f; private bool isCharging; private float chargeTimer; private Vector3 savedDir; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[X] Piercing Blood", () => (!(cooldownTimer <= 0f)) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[X] Piercing Blood"); } } private void Update() { //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead) { if (isCharging) { isCharging = false; } return; } if (cooldownTimer > 0f) { cooldownTimer -= Time.deltaTime; } if (player.data.view.IsMine && Input.GetKeyDown((KeyCode)120) && cooldownTimer <= 0f && !isCharging) { isCharging = true; chargeTimer = 0.5f; savedDir = ((Vector3)(ref player.data.aimDirection)).normalized; if (savedDir == Vector3.zero) { savedDir = ((Component)player.data.weaponHandler.gun).transform.right; } JJKCardHelper.CreateFloatingText("Convergence...", ((Component)player).transform.position + Vector3.up, new Color(0.8f, 0f, 0f)); } if (!isCharging) { return; } chargeTimer -= Time.deltaTime; if (chargeTimer <= 0f) { isCharging = false; cooldownTimer = 12f; savedDir = ((Vector3)(ref player.data.aimDirection)).normalized; if (savedDir == Vector3.zero) { savedDir = ((Component)player.data.weaponHandler.gun).transform.right; } ExecutePiercingBlood(player, savedDir, isLocalPlayer: true); NetworkingManager.RaiseEvent("JJKCardsMod_PiercingBlood", new object[3] { player.playerID, savedDir.x, savedDir.y }); } } public static void OnPiercingBloodEvent(object[] data) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length < 3) { return; } int num = Convert.ToInt32(data[0]); float num2 = Convert.ToSingle(data[1]); float num3 = Convert.ToSingle(data[2]); Vector3 val = new Vector3(num2, num3, 0f); Vector3 normalized = ((Vector3)(ref val)).normalized; Player val2 = null; foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && player.playerID == num) { val2 = player; break; } } if ((Object)(object)val2 != (Object)null && !val2.data.view.IsMine) { ExecutePiercingBlood(val2, normalized, isLocalPlayer: false); } } private static void ExecutePiercingBlood(Player sender, Vector3 dir, bool isLocalPlayer) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_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_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: 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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) JJKCardHelper.CreateFloatingText("PIERCING BLOOD!", ((Component)sender).transform.position, Color.red); Vector3 position = ((Component)sender).transform.position; if (isLocalPlayer) { int mask = LayerMask.GetMask(new string[1] { "Player" }); RaycastHit2D[] array = Physics2D.CircleCastAll(Vector2.op_Implicit(position), 1.5f, Vector2.op_Implicit(dir), 100f, mask); for (int i = 0; i < array.Length; i++) { RaycastHit2D val = array[i]; Player componentInParent = ((Component)((RaycastHit2D)(ref val)).collider).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)sender) { ((Damagable)componentInParent.data.healthHandler).CallTakeDamage(Vector2.op_Implicit(dir * 150f), ((RaycastHit2D)(ref val)).point, (GameObject)null, sender, true); BleedEffectTick bleedEffectTick = ((Component)componentInParent).gameObject.GetComponent(); if ((Object)(object)bleedEffectTick == (Object)null) { bleedEffectTick = ((Component)componentInParent).gameObject.AddComponent(); } bleedEffectTick.AddBleed(50f, 5f); } } array = Physics2D.CircleCastAll(Vector2.op_Implicit(position), 1.5f, Vector2.op_Implicit(dir), 100f); for (int i = 0; i < array.Length; i++) { RaycastHit2D val2 = array[i]; DamagableEvent componentInParent2 = ((Component)((RaycastHit2D)(ref val2)).collider).GetComponentInParent(); if ((Object)(object)componentInParent2 != (Object)null && (Object)(object)((Component)((RaycastHit2D)(ref val2)).collider).GetComponentInParent() == (Object)null) { ((Damagable)componentInParent2).CallTakeDamage(Vector2.op_Implicit(dir * 150f), ((RaycastHit2D)(ref val2)).point, (GameObject)null, (Player)null, true); } } } GameObject val3 = new GameObject("PiercingBloodBeam"); LineRenderer obj = val3.AddComponent(); obj.startWidth = 1.5f; obj.endWidth = 1.5f; ((Renderer)obj).material = new Material(Shader.Find("Sprites/Default")); obj.startColor = new Color(0.9f, 0.1f, 0.1f, 1f); obj.endColor = new Color(0.9f, 0.1f, 0.1f, 1f); obj.positionCount = 2; obj.SetPosition(0, position); obj.SetPosition(1, position + dir * 100f); val3.AddComponent(); } } public class PiercingBloodFade : MonoBehaviour { private LineRenderer lr; private float life = 1f; private Color color; private void Start() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) lr = ((Component)this).GetComponent(); if ((Object)(object)lr != (Object)null) { color = lr.startColor; } } private void Update() { //IL_0069: 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) life -= Time.deltaTime; if (life <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); } else if ((Object)(object)lr != (Object)null) { lr.startColor = new Color(color.r, color.g, color.b, life); lr.endColor = new Color(color.r, color.g, color.b, life); lr.startWidth = Mathf.Lerp(0f, 1.5f, life); lr.endWidth = Mathf.Lerp(0f, 1.5f, life); } } } public class PlayfulCloudCard : CustomCard { protected override string GetTitle() { return "Cursed Tool: Playful Cloud"; } protected override string GetDescription() { return "A pure physical staff. Your bullet damage scales up to +100% based on your current health percentage (higher health = higher damage), but your bullets can no longer ignore walls."; } 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 = "Max Health Damage Scaling", amount = "Up to +100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ignore Walls/Magical effects", amount = "Disabled", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("PlayfulCloudArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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 = -35; k <= 35; k++) { val3.SetPixel(num2 + k, num3 + k / 2, Color.red); val3.SetPixel(num2 + k, num3 - k / 2, Color.red); } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); HollowPurpleCard.ProceduralPulsator proceduralPulsator = val.AddComponent(); proceduralPulsator.minScale = 0.95f; proceduralPulsator.maxScale = 1.05f; proceduralPulsator.speed = 1f; return val; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.ignoreWalls = false; cardInfo.allowMultiple = false; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PlayfulCloudBehaviour playfulCloudBehaviour = ((Component)player).gameObject.GetComponent(); if ((Object)(object)playfulCloudBehaviour == (Object)null) { playfulCloudBehaviour = ((Component)player).gameObject.AddComponent(); } playfulCloudBehaviour.gun = gun; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PlayfulCloudBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class PlayfulCloudBehaviour : MonoBehaviour { private Player player; public Gun gun; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShoot)); } } private void OnShoot(GameObject bullet) { if ((Object)(object)player != (Object)null && (Object)(object)bullet != (Object)null) { float num = player.data.health / player.data.maxHealth; float num2 = 1f + num; ProjectileHit component = bullet.GetComponent(); if ((Object)(object)component != (Object)null) { component.damage *= num2; } } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShoot)); } } } public class RatioCard : CustomCard { protected override string GetTitle() { return "Ratio Technique: 7:3"; } protected override string GetDescription() { return "Every 7th shot strikes a perfect weak point (Ratio 7:3), dealing massive critical damage."; } 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 = "Critical Hit", amount = "Every 7th shot", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } protected override GameObject GetCardArt() { return null; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Nanami_Ratio"; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { RatioBehaviour ratioBehaviour = ((Component)player).gameObject.GetComponent(); if ((Object)(object)ratioBehaviour == (Object)null) { ratioBehaviour = ((Component)player).gameObject.AddComponent(); } ratioBehaviour.gun = gun; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { RatioBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class RatioBehaviour : MonoBehaviour { public Gun gun; private int shotCounter; private void Start() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShoot)); } } private void OnShoot(GameObject bullet) { //IL_0047: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) shotCounter++; if (shotCounter < 7) { return; } shotCounter = 0; ProjectileHit component = bullet.GetComponent(); if ((Object)(object)component != (Object)null) { component.damage *= 7f; Transform transform = bullet.transform; transform.localScale *= 2f; Player componentInParent = ((Component)gun).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null) { JJKCardHelper.CreateFloatingText("7:3 CRITICAL HIT!", ((Component)componentInParent).transform.position, Color.yellow); } } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShoot)); } } } public class RedCard : CustomCard { protected override string GetTitle() { return "Reversal: Red"; } protected override string GetDescription() { return "Press [G] to fire an explosive orb of repulsive energy that deals massive damage and knocks enemies back."; } 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 = "Red Repulse [G]", amount = "Active", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage & Knockback", amount = "High", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } 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_017b: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_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_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("RedRepulseArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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 < 60f) { float num7 = Mathf.Abs(Mathf.Sin(Mathf.Atan2(num5, num4) * 6f)); float num8 = 25f + num7 * 30f; if (num6 <= num8) { Color val5 = Color.Lerp(Color.red, Color.yellow, num6 / num8); val5.a = (1f - num6 / 60f) * 0.95f; 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); HollowPurpleCard.ProceduralPulsator proceduralPulsator = val.AddComponent(); proceduralPulsator.minScale = 0.8f; proceduralPulsator.maxScale = 1.2f; proceduralPulsator.speed = 6f; 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_Red"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { RedBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class RedBehaviour : MonoBehaviour { private Player player; private float cooldownTimer; private const float Cooldown = 8f; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[E] Reversal: Red", () => (!(cooldownTimer <= 0f)) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[E] Reversal: Red"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { if (cooldownTimer > 0f) { cooldownTimer -= Time.deltaTime; } if (player.data.view.IsMine && Input.GetKeyDown((KeyCode)103) && cooldownTimer <= 0f) { FireRed(); } } } private void FireRed() { cooldownTimer = 8f; NetworkingManager.RaiseEvent("JJKCardsMod_Red", new object[1] { player.playerID }); } public static void OnRedEvent(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_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Expected O, but got Unknown //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_033b: 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("REVERSAL: RED!", ((Component)val).transform.position + Vector3.up, Color.red); foreach (Player player2 in PlayerManager.instance.players) { if ((Object)(object)player2 != (Object)null && (Object)(object)player2 != (Object)(object)val && !player2.data.dead) { Vector3 val2 = ((Component)player2).transform.position - ((Component)val).transform.position; float magnitude = ((Vector3)(ref val2)).magnitude; if (magnitude <= 12f && val.data.view.IsMine) { float num2 = (12f - magnitude) / 12f; player2.data.healthHandler.CallTakeForce(Vector2.op_Implicit(((Vector3)(ref val2)).normalized * (250000f * num2)), (ForceMode2D)1, false, false, 0f); ((Damagable)player2.data.healthHandler).CallTakeDamage(Vector2.op_Implicit(((Vector3)(ref val2)).normalized * 3f), Vector2.op_Implicit(((Component)player2).transform.position), (GameObject)null, val, false); } } } MoveTransform[] array = Object.FindObjectsOfType(); foreach (MoveTransform val3 in array) { if (!(Vector3.Distance(((Component)val).transform.position, ((Component)val3).transform.position) <= 12f)) { continue; } ProjectileHit component = ((Component)val3).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.ownPlayer != (Object)(object)val) { Vector3 val4 = ((Component)val3).transform.position - ((Component)val).transform.position; Vector3 normalized = ((Vector3)(ref val4)).normalized; val3.velocity = normalized * ((Vector3)(ref val3.velocity)).magnitude * 1.5f; Rigidbody2D component2 = ((Component)val3).GetComponent(); if ((Object)(object)component2 != (Object)null) { Vector2 velocity = component2.velocity; component2.velocity = Vector2.op_Implicit(normalized * ((Vector2)(ref velocity)).magnitude * 1.5f); } } } GameObject val5 = new GameObject("RedShockwave"); val5.transform.position = ((Component)val).transform.position; SpriteRenderer val6 = val5.AddComponent(); Texture2D val7 = new Texture2D(64, 64); Color val8 = default(Color); ((Color)(ref val8))..ctor(1f, 0f, 0f, 0.5f); for (int j = 0; j < 64; j++) { for (int k = 0; k < 64; k++) { val7.SetPixel(k, j, (Vector2.Distance(new Vector2((float)k, (float)j), new Vector2(32f, 32f)) < 32f) ? val8 : Color.clear); } } val7.Apply(); val6.sprite = Sprite.Create(val7, new Rect(0f, 0f, 64f, 64f), new Vector2(0.5f, 0.5f), 32f); ((Renderer)val6).sortingOrder = 50; RedExplosionBehavior redExplosionBehavior = val5.AddComponent(); redExplosionBehavior.sr = val6; redExplosionBehavior.maxRange = 12f; } } public class RedExplosionBehavior : MonoBehaviour { public SpriteRenderer sr; public float maxRange; private float duration = 0.3f; private float elapsed; private void Update() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) elapsed += Time.deltaTime; if (elapsed >= duration) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num = elapsed / duration; float num2 = Mathf.Lerp(1f, maxRange * 2f, num); ((Component)this).transform.localScale = new Vector3(num2, num2, 1f); if ((Object)(object)sr != (Object)null) { float num3 = Mathf.Lerp(0.5f, 0f, num); sr.color = new Color(1f, 0f, 0f, num3); } } private void OnDestroy() { if ((Object)(object)sr != (Object)null && (Object)(object)sr.sprite != (Object)null) { if ((Object)(object)sr.sprite.texture != (Object)null) { Object.Destroy((Object)(object)sr.sprite.texture); } Object.Destroy((Object)(object)sr.sprite); } } } public class SimpleDomainCard : CustomCard { protected override string GetTitle() { return "Simple Domain"; } protected override string GetDescription() { return "Press [V] to deploy a Simple Domain for 5s. While inside, you are immune to Domain Expansions and their guaranteed hits. (15s Cooldown)"; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "Anti-Domain Barrier [V]", amount = "5s", 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_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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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) GameObject val = new GameObject("SimpleDomainArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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; int num4 = 40; for (int k = 0; k < num; k++) { for (int l = 0; l < num; l++) { float num5 = Vector2.Distance(new Vector2((float)l, (float)k), new Vector2((float)num2, (float)num3)); if (num5 < (float)num4 && num5 > (float)(num4 - 4)) { val3.SetPixel(l, k, new Color(0.8f, 0.9f, 1f, 0.9f)); } else if (num5 <= (float)(num4 - 4)) { val3.SetPixel(l, k, new Color(0.8f, 0.9f, 1f, 0.2f)); } } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); 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_SimpleDomain"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { SimpleDomainBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class SimpleDomainBehaviour : MonoBehaviour { private Player player; private float cooldownTimer; private const float Cooldown = 15f; private float activeTimer; private const float Duration = 5f; private GameObject visualIndicator; private Collider2D[] hitBuffer = (Collider2D[])(object)new Collider2D[20]; public bool IsSimpleDomainActive { get; private set; } private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[V] Simple Domain", () => (!IsSimpleDomainActive) ? ((!(cooldownTimer <= 0f)) ? $"{cooldownTimer:F1}s" : "READY") : $"ACTIVE ({activeTimer:F1}s)"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[V] Simple Domain"); } if ((Object)(object)visualIndicator != (Object)null) { Object.Destroy((Object)(object)visualIndicator); } } private void Update() { if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead) { DeactivateDomain(); return; } if (cooldownTimer > 0f && !IsSimpleDomainActive) { cooldownTimer -= Time.deltaTime; } if (IsSimpleDomainActive) { activeTimer -= Time.deltaTime; if (activeTimer <= 0f) { DeactivateDomain(); } else if ((Object)(object)((Component)player).GetComponent() != (Object)null) { ReflectProjectiles(); } } else if (player.data.view.IsMine && Input.GetKeyDown((KeyCode)118) && cooldownTimer <= 0f) { NetworkingManager.RaiseEvent("JJKCardsMod_SimpleDomain_Activate", new object[1] { player.playerID }); } } public void ActivateDomainLocal() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) IsSimpleDomainActive = true; activeTimer = 5f; cooldownTimer = 15f; JJKCardHelper.CreateFloatingText("SIMPLE DOMAIN!", ((Component)player).transform.position, Color.white); if ((Object)(object)visualIndicator == (Object)null) { visualIndicator = new GameObject("SimpleDomainVisual"); visualIndicator.transform.SetParent(((Component)player).transform); visualIndicator.transform.localPosition = Vector3.zero; LineRenderer val = visualIndicator.AddComponent(); val.useWorldSpace = false; val.positionCount = 50; val.startWidth = 0.15f; val.endWidth = 0.15f; ((Renderer)val).material = new Material(Shader.Find("Sprites/Default")); val.startColor = new Color(0.8f, 0.9f, 1f, 0.8f); val.endColor = new Color(0.8f, 0.9f, 1f, 0.8f); float num = 3.5f; for (int i = 0; i < 50; i++) { float num2 = (float)i / 49f * (float)Math.PI * 2f; val.SetPosition(i, new Vector3(Mathf.Cos(num2) * num, Mathf.Sin(num2) * num, 0f)); } } visualIndicator.SetActive(true); } private void DeactivateDomain() { IsSimpleDomainActive = false; if ((Object)(object)visualIndicator != (Object)null) { visualIndicator.SetActive(false); } } private void ReflectProjectiles() { //IL_0011: 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_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_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) float num = 3.5f; int num2 = Physics2D.OverlapCircleNonAlloc(Vector2.op_Implicit(((Component)player).transform.position), num, hitBuffer); for (int i = 0; i < num2; i++) { ProjectileHit componentInParent = ((Component)hitBuffer[i]).GetComponentInParent(); if (!((Object)(object)componentInParent != (Object)null) || !((Object)(object)componentInParent.ownPlayer != (Object)(object)player)) { continue; } MoveTransform component = ((Component)componentInParent).GetComponent(); if (!((Object)(object)component != (Object)null)) { continue; } component.velocity = -component.velocity; componentInParent.ownPlayer = player; if ((Object)(object)componentInParent.ownWeapon != (Object)null) { _ = componentInParent.ownWeapon.gameObject; WeaponHandler weaponHandler = player.data.weaponHandler; if ((Object)(object)weaponHandler != (Object)null && (Object)(object)weaponHandler.gun != (Object)null) { componentInParent.ownWeapon = ((Component)weaponHandler.gun).gameObject; } } componentInParent.damage *= 1.5f; JJKCardHelper.CreateFloatingText("PARRIED!", ((Component)component).transform.position, Color.white); } } public static void OnSimpleDomainEvent(object[] data) { if (data == null || data.Length == 0) { return; } int num = Convert.ToInt32(data[0]); foreach (Player player in PlayerManager.instance.players) { if (player.playerID == num) { SimpleDomainBehaviour component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { component.ActivateDomainLocal(); } break; } } } } public class SorcererSelectionCard : CustomCard { protected override string GetTitle() { return "Jujutsu Sorcerer Selection"; } protected override string GetDescription() { return "Choose your Jujutsu path: picking a JJK card locks you into that character's set (Gojo, Sukuna, Todo, Megumi, Nanami, Choso, Yuta). You can draft multiple cards from your chosen character, but other characters' cards will be filtered out."; } 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 = "Sorcerer Selection", amount = "Active", 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_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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("SorcererSelectionArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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 = num3 - 25; k <= num3 + 25; k++) { for (int l = num2 - 25; l <= num2 + 25; l++) { if (Vector2.Distance(new Vector2((float)l, (float)k), new Vector2((float)num2, (float)num3)) < 24f) { if (l < num2) { val3.SetPixel(l, k, Color.black); } else { val3.SetPixel(l, k, Color.white); } } } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); HollowPurpleCard.ProceduralPulsator proceduralPulsator = val.AddComponent(); proceduralPulsator.minScale = 0.95f; proceduralPulsator.maxScale = 1.05f; proceduralPulsator.speed = 1f; return val; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { try { Type type = Type.GetType("CardChoiceSpawnUniqueCardPatch.CustomCategories.CustomCardCategories, CardChoiceSpawnUniqueCardPatch"); if (type != null) { object obj = type.GetField("instance", BindingFlags.Static | BindingFlags.Public)?.GetValue(null); if (obj != null) { object obj2 = type.GetMethod("CardCategory", new Type[1] { typeof(string) })?.Invoke(obj, new object[1] { "JJKSorcererSelection" }); if (obj2 != null) { Array array = Array.CreateInstance(obj2.GetType(), 1); array.SetValue(obj2, 0); typeof(CardInfo).GetField("categories", BindingFlags.Instance | BindingFlags.Public)?.SetValue(cardInfo, array); } } } } catch (Exception ex) { Debug.LogWarning((object)("[JJKCards] Failed to set custom card categories: " + ex.Message)); } JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } public class SplitSoulKatanaCard : CustomCard { protected override string GetTitle() { return "Cursed Tool: Split Soul Katana"; } protected override string GetDescription() { return "Directly strikes the soul. Your bullets bypass 50% of the opponent's Armor or Mahoraga's adapted resistances, and prevent target healing for 3 seconds."; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "Armor/Resistance Bypass", amount = "50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Anti-Heal Duration", amount = "3s", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("SplitSoulArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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 = -30; k <= 30; k++) { val3.SetPixel(num2 + k, num3 - k, Color.white); } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); val.AddComponent(); return val; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { SplitSoulKatanaBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class SplitSoulKatanaBehaviour : MonoBehaviour { } public class AntiHealEffect : MonoBehaviour { private float timer = 3f; private float startHp; private Player player; private void Update() { timer -= Time.deltaTime; if (timer <= 0f) { Object.Destroy((Object)(object)this); } } private void Start() { player = ((Component)this).GetComponent(); if ((Object)(object)player != (Object)null) { startHp = player.data.health; } } private void LateUpdate() { if ((Object)(object)player != (Object)null && player.data.health > startHp) { player.data.health = startHp; } else if ((Object)(object)player != (Object)null) { startHp = player.data.health; } } } public class SukunaRCTCard : CustomCard { protected override string GetTitle() { return "Reverse Cursed Technique"; } protected override string GetDescription() { return "Press [H] to instantly heal 50% of your missing health! (15s Cooldown)"; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "RCT [H]", amount = "Heal", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Max Health", amount = "+20%", simepleAmount = (SimpleAmount)1 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.2f; ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Sukuna_RCT"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { SukunaRCTBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class SukunaRCTBehaviour : MonoBehaviour { private Player player; private float cooldown; private const float Cooldown = 15f; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[H] RCT", () => (!(cooldown > 0f)) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[H] RCT"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !player.data.dead) { if (cooldown > 0f) { cooldown -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)104) && cooldown <= 0f) { cooldown = 15f; float num = player.data.maxHealth - player.data.health; float num2 = ((num > 0f) ? (num * 0.5f) : 0f); NetworkingManager.RaiseEvent("JJKCardsMod_SukunaRCT", new object[2] { player.playerID, num2 }); } } } public static void OnSukunaRCTEvent(object[] data) { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: 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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length < 2) { return; } int num = Convert.ToInt32(data[0]); float num2 = Convert.ToSingle(data[1]); Player val = null; foreach (Player player in PlayerManager.instance.players) { if (player.playerID == num) { val = player; } } if ((Object)(object)val != (Object)null) { JJKCardHelper.CreateFloatingText("REVERSE CURSED TECHNIQUE!", ((Component)val).transform.position + Vector3.up * 1.5f, Color.green); if (num2 > 0f) { val.data.healthHandler.Heal(num2); } GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); obj.transform.position = ((Component)val).transform.position; obj.transform.localScale = Vector3.one * 3f; Renderer component = obj.GetComponent(); component.material.color = new Color(0f, 1f, 0f, 0.4f); Object.Destroy((Object)(object)obj.GetComponent()); Object.Destroy((Object)(object)component.material, 0.3f); Object.Destroy((Object)(object)obj, 0.3f); } } } public class TenShadowsCard : CustomCard { protected override string GetTitle() { return "Ten Shadows Technique"; } protected override string GetDescription() { return "Press [H] to cycle summons! (Divine Dog = Chomp, Nue = Lightning stun, Toad = Pulls enemies)."; } 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 = "Shadow Summon [H]", amount = "Yes", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Summon Cooldown", amount = "10s", 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_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("TenShadowsArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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 = num3 - 25; k <= num3 + 25; k++) { for (int l = num2 - 25; l <= num2 + 25; l++) { if (Mathf.Abs(l - num2) < 25 - (k - num3)) { val3.SetPixel(l, k, new Color(0.1f, 0.1f, 0.1f, 0.95f)); } } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); val.AddComponent(); 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_Megumi_Nue"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { TenShadowsBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class TenShadowsBehaviour : MonoBehaviour { private Player player; private float cooldownTimer; private const float Cooldown = 10f; private int shadowIndex; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[H] Ten Shadows", () => (!(cooldownTimer <= 0f)) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[H] Ten Shadows"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !player.data.dead) { if (cooldownTimer > 0f) { cooldownTimer -= Time.deltaTime; } if (player.data.view.IsMine && Input.GetKeyDown((KeyCode)104) && cooldownTimer <= 0f) { cooldownTimer = 10f; NetworkingManager.RaiseEvent("JJKCardsMod_TenShadows_Activate", new object[2] { player.playerID, shadowIndex }); shadowIndex = (shadowIndex + 1) % 3; } } } public static void OnTenShadowsEvent(object[] data) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length < 2) { return; } int num = Convert.ToInt32(data[0]); int num2 = Convert.ToInt32(data[1]); 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) { switch (num2) { case 0: SpawnDivineDog(val); break; case 1: JJKCardHelper.CreateFloatingText("TEN SHADOWS: NUE!", ((Component)val).transform.position, Color.yellow); SpawnNueLightning(val); break; case 2: JJKCardHelper.CreateFloatingText("TEN SHADOWS: TOAD!", ((Component)val).transform.position, Color.green); SpawnToadPull(val); break; } } } private static void SpawnDivineDog(Player sender) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0031: 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_0053: Expected O, but got Unknown //IL_0060: 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_010a: 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_015a: Expected O, but got Unknown //IL_016f: 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_00bd: Unknown result type (might be due to invalid IL or missing references) JJKCardHelper.CreateFloatingText("TEN SHADOWS: DIVINE DOG!", ((Component)sender).transform.position, Color.white); GameObject val = new GameObject("DivineDog"); val.transform.position = ((Component)sender).transform.position; SpriteRenderer val2 = val.AddComponent(); ((Renderer)val2).sortingOrder = 5; Texture2D val3 = new Texture2D(64, 64); for (int i = 0; i < 64; i++) { for (int j = 0; j < 64; j++) { val3.SetPixel(j, i, Color.clear); } } for (int k = -15; k <= 15; k++) { for (int l = -15; l <= 15; l++) { if (Mathf.Abs(k) + Mathf.Abs(l) < 20) { val3.SetPixel(32 + k, 32 + l, new Color(0.1f, 0.1f, 0.1f, 1f)); } } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, 64f, 64f), new Vector2(0.5f, 0.5f), 32f); TrailRenderer obj = val.AddComponent(); obj.time = 0.2f; obj.startWidth = 1f; obj.endWidth = 0.1f; ((Renderer)obj).material = new Material(Shader.Find("Sprites/Default")); obj.startColor = new Color(0.1f, 0.1f, 0.1f, 0.5f); obj.endColor = new Color(0f, 0f, 0f, 0f); ((MonoBehaviour)sender).StartCoroutine(DivineDogLunge(val, sender)); } private static IEnumerator DivineDogLunge(GameObject dog, Player sender) { Vector3 position = ((Component)sender).transform.position; Player val = FindClosestOpponent(sender, 20f); Vector3 dir = sender.data.aimDirection; if ((Object)(object)val != (Object)null) { Vector3 val2 = ((Component)val).transform.position - position; dir = ((Vector3)(ref val2)).normalized; } float duration = 0.3f; float elapsed = 0f; float speed = 50f; bool hit = false; while (elapsed < duration) { elapsed += Time.deltaTime; if ((Object)(object)dog != (Object)null) { Transform transform = dog.transform; transform.position += dir * speed * Time.deltaTime; } if (sender.data.view.IsMine && !hit && (Object)(object)dog != (Object)null) { foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)(object)sender && !player.data.dead && Vector3.Distance(dog.transform.position, ((Component)player).transform.position) < 2.5f) { hit = true; ((Damagable)player.data.healthHandler).CallTakeDamage(Vector2.op_Implicit(dir * 55f), Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, sender, false); break; } } } yield return null; } if ((Object)(object)dog != (Object)null) { Object.Destroy((Object)(object)dog); } } private static void SpawnNueLightning(Player sender) { //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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_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) Player val = FindClosestOpponent(sender); if (!((Object)(object)val != (Object)null)) { return; } GameObject val2 = new GameObject("NueLightning"); LineRenderer obj = val2.AddComponent(); obj.startWidth = 0.2f; obj.endWidth = 0.05f; ((Renderer)obj).material = new Material(Shader.Find("Sprites/Default")); obj.startColor = Color.yellow; obj.endColor = Color.white; obj.positionCount = 4; Vector3 position = ((Component)sender).transform.position; Vector3 position2 = ((Component)val).transform.position; obj.SetPosition(0, position); obj.SetPosition(1, Vector3.Lerp(position, position2, 0.33f) + Vector3.up * Random.Range(-1.5f, 1.5f)); obj.SetPosition(2, Vector3.Lerp(position, position2, 0.66f) + Vector3.down * Random.Range(-1.5f, 1.5f)); obj.SetPosition(3, position2); if (sender.data.view.IsMine) { if ((Object)(object)val.data.stunHandler != (Object)null) { val.data.stunHandler.AddStun(0.6f); } if ((Object)(object)val.data.healthHandler != (Object)null) { ((Damagable)val.data.healthHandler).CallTakeDamage(Vector2.up * 10f, Vector2.op_Implicit(((Component)val).transform.position), (GameObject)null, sender, false); } } Object.Destroy((Object)val2, 0.25f); } private static void SpawnToadPull(Player sender) { //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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0063: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) Player val = FindClosestOpponent(sender); if ((Object)(object)val != (Object)null) { GameObject val2 = new GameObject("ToadTongue"); LineRenderer obj = val2.AddComponent(); obj.startWidth = 0.15f; obj.endWidth = 0.15f; ((Renderer)obj).material = new Material(Shader.Find("Sprites/Default")); obj.startColor = new Color(0.8f, 0.4f, 0.5f); obj.endColor = new Color(0.8f, 0.4f, 0.5f); obj.positionCount = 2; obj.SetPosition(0, ((Component)sender).transform.position); obj.SetPosition(1, ((Component)val).transform.position); if ((Object)(object)((Component)val).GetComponent() != (Object)null && sender.data.view.IsMine) { Vector3 val3 = ((Component)sender).transform.position - ((Component)val).transform.position; Vector3 normalized = ((Vector3)(ref val3)).normalized; val.data.healthHandler.TakeForce(Vector2.op_Implicit(normalized * 5000f), (ForceMode2D)1, false, false, 0f); } Object.Destroy((Object)val2, 0.25f); } } private static Player FindClosestOpponent(Player player, float maxRange = 25f) { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) Player result = null; float num = maxRange; int mask = LayerMask.GetMask(new string[1] { "Default" }); foreach (Player player2 in PlayerManager.instance.players) { if (!((Object)(object)player2 != (Object)(object)player) || !((Object)(object)player2 != (Object)null) || player2.data.dead) { continue; } float num2 = Vector3.Distance(((Component)player).transform.position, ((Component)player2).transform.position); if (num2 < num) { RaycastHit2D val = Physics2D.Linecast(Vector2.op_Implicit(((Component)player).transform.position), Vector2.op_Implicit(((Component)player2).transform.position), mask); if ((Object)(object)((RaycastHit2D)(ref val)).collider == (Object)null || ((RaycastHit2D)(ref val)).distance >= num2 - 1f) { num = num2; result = player2; } } } return result; } } public class IQ530000Card : CustomCard { protected override string GetTitle() { return "530,000 IQ"; } protected override string GetDescription() { return "Todo's legendary intellect! Massive passive boosts to reload speed and movement speed."; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "Reload Time", amount = "-40%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move Speed", amount = "+30%", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Todo_IQ"; gun.reloadTime = 0.6f; statModifiers.movementSpeed = 1.3f; JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } public class TodoBlackFlashCard : CustomCard { protected override string GetTitle() { return "Black Flash (Todo)"; } protected override string GetDescription() { return "Your bullets have a 20% chance to trigger a Black Flash on hit, dealing bonus damage!"; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Damage", amount = "+50%", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Todo_BlackFlash"; gun.damage = 1.5f; GameObject val = new GameObject("BlackFlashHitEffect"); val.AddComponent(); Object.DontDestroyOnLoad((Object)(object)val); ObjectsToSpawn val2 = new ObjectsToSpawn { effect = val, numberOfSpawns = 1, normalOffset = 0f, spawnOn = (SpawnOn)0, spawnAsChild = false }; gun.objectsToSpawn = (ObjectsToSpawn[])((gun.objectsToSpawn != null) ? ((Array)new List(gun.objectsToSpawn) { val2 }.ToArray()) : ((Array)new ObjectsToSpawn[1] { val2 })); JJKCardHelper.SetUniqueCategory(cardInfo); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } } public class YutaCopyCard : CustomCard { protected override string GetTitle() { return "Rika: Cursed Technique Copy"; } protected override string GetDescription() { return "Press [T] to copy the active ability (Boogie Woogie, Domain, or Ten Shadows) of the opponent you last hit. The copied technique can be used once before needing to copy again. (10s Cooldown)"; } 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 = "Copy Cursed Technique [T]", amount = "Yes", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Copy Cooldown", amount = "10s", 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_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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("YutaCopyArt"); val.transform.position = new Vector3(-10000f, -10000f, 0f); SpriteRenderer val2 = val.AddComponent(); ((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 = num3 - 25; k <= num3 + 25; k++) { for (int l = num2 - 25; l <= num2 + 25; l++) { float num4 = Vector2.Distance(new Vector2((float)l, (float)k), new Vector2((float)num2, (float)num3)); if (num4 >= 18f && num4 <= 24f) { val3.SetPixel(l, k, Color.white); } } } val3.Apply(); val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); val.AddComponent(); 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_Yuta_Copy"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { YutaCopyBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class YutaCopyBehaviour : MonoBehaviour { private Player player; private float cooldownTimer; private const float Cooldown = 10f; public Player lastHitEnemy; private string copiedAbility = ""; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[T] Rika Copy", () => (!string.IsNullOrEmpty(copiedAbility)) ? ("[" + copiedAbility + "] " + ((copiedAbility == "Mahoraga") ? "PASSIVE" : ((cooldownTimer <= 0f) ? "READY" : $"{cooldownTimer:F1}s"))) : "EMPTY"); } GameModeManager.AddHook("PointStart", (Func)OnPointStart); } private IEnumerator OnPointStart(IGameModeHandler gm) { copiedAbility = ""; cooldownTimer = 0f; lastHitEnemy = null; MahoragaBehaviour component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { component.DestroyWheel(); Object.Destroy((Object)(object)component); } yield break; } private void OnDestroy() { GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[T] Rika Copy"); } } private void Update() { //IL_00cf: 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) if (cooldownTimer > 0f) { YutaDomainBehaviour component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null && component.IsDomainActive) { cooldownTimer -= Time.deltaTime * 10f; } else { cooldownTimer -= Time.deltaTime; } } if ((Object)(object)player != (Object)null && player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)116)) { if (cooldownTimer <= 0f) { UseCopiedAbility(); } else { JJKCardHelper.CreateFloatingText($"Copy Cooldown: {Mathf.CeilToInt(cooldownTimer)}s", ((Component)player).transform.position, Color.red); } } } public void RegisterHit(Player hitEnemy) { //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(copiedAbility)) { return; } lastHitEnemy = hitEnemy; List list = new List(); if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("InfiniteVoid"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("MalevolentShrine"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("ChimeraShadowGarden"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("TenShadows"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("DivineDog"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("PiercingBlood"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("Supernova"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("FlowingRedScale"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("Cleave"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("Cleave"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("DivineFlame"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("Blue"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("Red"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("HollowPurple"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("BoogieWoogie"); } if ((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null || (Object)(object)((Component)hitEnemy).GetComponent() != (Object)null) { list.Add("Collapse"); } if (list.Count > 0) { copiedAbility = list[Random.Range(0, list.Count)]; JJKCardHelper.CreateFloatingText("Copied " + copiedAbility + "!", ((Component)player).transform.position, Color.white); } else { if (!((Object)(object)((Component)hitEnemy).GetComponent() != (Object)null)) { return; } copiedAbility = "Mahoraga"; JJKCardHelper.CreateFloatingText("Copied Mahoraga!", ((Component)player).transform.position, Color.white); MahoragaBehaviour component = ((Component)hitEnemy).GetComponent(); MahoragaBehaviour mahoragaBehaviour = ((Component)player).gameObject.AddComponent(); mahoragaBehaviour.isFullPotential = component.isFullPotential; foreach (KeyValuePair playerResistance in component.playerResistances) { mahoragaBehaviour.playerResistances[playerResistance.Key] = playerResistance.Value; } foreach (KeyValuePair item in component.blockBypassChance) { mahoragaBehaviour.blockBypassChance[item.Key] = item.Value; } mahoragaBehaviour.dotResistance = component.dotResistance; mahoragaBehaviour.slowResistance = component.slowResistance; mahoragaBehaviour.SpawnWheel(); } } private void UseCopiedAbility() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrEmpty(copiedAbility) || copiedAbility == "Mahoraga") { JJKCardHelper.CreateFloatingText("No active ability copied!", ((Component)player).transform.position, Color.yellow); return; } cooldownTimer = 10f; JJKCardHelper.CreateFloatingText("Release " + copiedAbility + "!", ((Component)player).transform.position, Color.white); Vector3 val = ((Vector3)(ref player.data.aimDirection)).normalized; if (val == Vector3.zero) { val = ((Component)player.data.weaponHandler.gun).transform.right; } if (copiedAbility == "BoogieWoogie") { Player val2 = null; float num = float.MaxValue; foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)(object)this.player && (Object)(object)player != (Object)null && !player.data.dead) { float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)player).transform.position); if (num2 < num) { num = num2; val2 = player; } } } if ((Object)(object)val2 != (Object)null) { NetworkingManager.RaiseEvent("JJKCardsMod_BoogieWoogie_Swap", new object[5] { this.player.playerID, 0, val2.playerID, 0f, 0f }); } } else if (copiedAbility == "InfiniteVoid") { NetworkingManager.RaiseEvent("JJKCardsMod_InfiniteVoid_Activate", new object[1] { this.player.playerID }); } else if (copiedAbility == "MalevolentShrine") { NetworkingManager.RaiseEvent("JJKCardsMod_MalevolentShrine_Activate", new object[1] { this.player.playerID }); } else if (copiedAbility == "ChimeraShadowGarden") { NetworkingManager.RaiseEvent("JJKCardsMod_ChimeraShadow_Activate", new object[1] { this.player.playerID }); } else if (copiedAbility == "TenShadows") { NetworkingManager.RaiseEvent("JJKCardsMod_TenShadows_Activate", new object[2] { this.player.playerID, Random.Range(0, 4) }); } else if (copiedAbility == "DivineDog") { NetworkingManager.RaiseEvent("JJKCardsMod_DivineDog", new object[1] { this.player.playerID }); } else if (copiedAbility == "PiercingBlood") { NetworkingManager.RaiseEvent("JJKCardsMod_PiercingBlood", new object[3] { this.player.playerID, val.x, val.y }); } else if (copiedAbility == "Supernova") { NetworkingManager.RaiseEvent("JJKCardsMod_Supernova", new object[1] { this.player.playerID }); } else if (copiedAbility == "FlowingRedScale") { NetworkingManager.RaiseEvent("JJKCardsMod_RedScale", new object[1] { this.player.playerID }); } else if (copiedAbility == "Cleave") { NetworkingManager.RaiseEvent("JJKCardsMod_Cleave", new object[1] { this.player.playerID }); } else if (copiedAbility == "DivineFlame") { NetworkingManager.RaiseEvent("JJKCardsMod_DivineFlame", new object[3] { this.player.playerID, val.x, val.y }); } else if (copiedAbility == "Blue") { NetworkingManager.RaiseEvent("JJKCardsMod_Blue", new object[1] { this.player.playerID }); } else if (copiedAbility == "Red") { NetworkingManager.RaiseEvent("JJKCardsMod_Red", new object[1] { this.player.playerID }); } else if (copiedAbility == "HollowPurple") { NetworkingManager.RaiseEvent("JJKCardsMod_HollowPurple_Activate", new object[1] { this.player.playerID }); } else if (copiedAbility == "Collapse") { NetworkingManager.RaiseEvent("JJKCardsMod_Collapse", new object[1] { this.player.playerID }); } YutaDomainBehaviour component = ((Component)this.player).GetComponent(); if ((Object)(object)component == (Object)null || !component.IsDomainActive) { copiedAbility = ""; } } } [HarmonyPatch(typeof(ProjectileHit), "Hit")] internal class Patch_ProjectileHit_Hit_Yuta { private static void Prefix(ProjectileHit __instance, HitInfo hit, bool forceCall) { if (!((Object)(object)__instance.ownPlayer != (Object)null) || !((Object)(object)hit.collider != (Object)null)) { return; } YutaCopyBehaviour component = ((Component)__instance.ownPlayer).GetComponent(); if ((Object)(object)component != (Object)null) { Player componentInParent = ((Component)hit.collider).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)__instance.ownPlayer) { component.RegisterHit(componentInParent); } } } } public class RikaCard : CustomCard { protected override string GetTitle() { return "Rika Manifestation"; } protected override string GetDescription() { return "Press [F] to fully manifest Rika for 10 seconds. She will fly around and attack your enemies autonomously!"; } protected override Rarity GetRarity() { return (Rarity)2; } 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 = "Rika [F]", amount = "Summon", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("TenShadows.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Yuta_Rika"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { RikaBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class RikaBehaviour : MonoBehaviour { private Player player; private float cooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[F] Rika", () => (!(cooldown > 0f)) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[F] Rika"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !player.data.dead) { if (cooldown > 0f) { cooldown -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)102) && cooldown <= 0f) { cooldown = 45f; NetworkingManager.RaiseEvent("JJKCardsMod_Rika", new object[1] { player.playerID }); } } } public static void OnRikaEvent(object[] data) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length == 0) { return; } int num = Convert.ToInt32(data[0]); foreach (Player player in PlayerManager.instance.players) { if (player.playerID == num) { JJKCardHelper.CreateFloatingText("COME, RIKA!", ((Component)player).transform.position + Vector3.up * 2f, Color.magenta); GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); obj.transform.position = ((Component)player).transform.position + Vector3.up * 3f; obj.transform.localScale = Vector3.one * 2.5f; obj.GetComponent().material.color = new Color(0.2f, 0f, 0.2f, 0.8f); Object.Destroy((Object)(object)obj.GetComponent()); obj.AddComponent().owner = player; JJKAnimator.CreateAura(obj.transform, new Color(0.8f, 0f, 0.8f, 0.6f)); break; } } } } public class RikaAIController : MonoBehaviour { public Player owner; private float speed = 20f; private float lifeTime = 10f; private float attackCooldown; private void OnDestroy() { Renderer component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.material != (Object)null) { Object.Destroy((Object)(object)component.material); } } private void Update() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_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_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_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_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)owner == (Object)null || (Object)(object)owner.data == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } lifeTime -= Time.deltaTime; if (lifeTime <= 0f) { JJKCardHelper.CreateFloatingText("RIKA DISMISSED", ((Component)this).transform.position, Color.gray); Object.Destroy((Object)(object)((Component)this).gameObject); return; } Player val = null; float num = float.MaxValue; foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)(object)owner && (Object)(object)player.data != (Object)null && !player.data.dead) { float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)player).transform.position); if (num2 < num) { num = num2; val = player; } } } if (!((Object)(object)val != (Object)null)) { return; } Vector3 val2 = ((Component)val).transform.position - ((Component)this).transform.position; Vector3 normalized = ((Vector3)(ref val2)).normalized; Transform transform = ((Component)this).transform; transform.position += normalized * speed * Time.deltaTime; if (attackCooldown > 0f) { attackCooldown -= Time.deltaTime; } if (num < 2.5f && attackCooldown <= 0f) { attackCooldown = 0.5f; JJKCardHelper.CreateFloatingText("SMASH!", ((Component)this).transform.position, Color.red); if ((Object)(object)owner.data.view != (Object)null && owner.data.view.IsMine) { ((Damagable)val.data.healthHandler).CallTakeDamage(Vector2.op_Implicit(normalized * 50f), Vector2.op_Implicit(((Component)val).transform.position), (GameObject)null, owner, false); JJKAnimator.CreateSparks(Vector2.op_Implicit(((Component)val).transform.position), Vector2.op_Implicit(-normalized), Color.magenta, 5); } } } } public class CursedSpeechCard : CustomCard { protected override string GetTitle() { return "Cursed Speech"; } protected override string GetDescription() { return "Press [G] to shout 'DON'T MOVE!'. Freezes all enemies in front of you for 2.5 seconds."; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "Cursed Speech [G]", amount = "Stun", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("TenShadows.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Yuta_Speech"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CursedSpeechBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class CursedSpeechBehaviour : MonoBehaviour { private Player player; private float cooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[G] Cursed Speech", () => (!(cooldown > 0f)) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[G] Cursed Speech"); } } private void Update() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null) && !player.data.dead) { if (cooldown > 0f) { cooldown -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)103) && cooldown <= 0f) { cooldown = 12f; Vector3 normalized = ((Vector3)(ref player.data.aimDirection)).normalized; NetworkingManager.RaiseEvent("JJKCardsMod_Speech", new object[3] { player.playerID, normalized.x, normalized.y }); } } } public static void OnSpeechEvent(object[] data) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_015a: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length < 3) { return; } int num = Convert.ToInt32(data[0]); Vector3 val = new Vector3(Convert.ToSingle(data[1]), Convert.ToSingle(data[2]), 0f); Vector3 normalized = ((Vector3)(ref val)).normalized; foreach (Player player in PlayerManager.instance.players) { if (player.playerID != num) { continue; } JJKCardHelper.CreateFloatingText("DON'T MOVE!", ((Component)player).transform.position + Vector3.up, Color.blue); { foreach (Player player2 in PlayerManager.instance.players) { if (!((Object)(object)player2 != (Object)(object)player) || player2.data.dead) { continue; } val = ((Component)player2).transform.position - ((Component)player).transform.position; Vector3 normalized2 = ((Vector3)(ref val)).normalized; if (Vector3.Angle(normalized, normalized2) < 45f && Vector3.Distance(((Component)player).transform.position, ((Component)player2).transform.position) < 20f) { Block block = player2.data.block; val = default(Vector3); block.RPCA_DoBlock(true, true, (BlockTriggerType)0, val, false); JJKCardHelper.CreateFloatingText("FROZEN", ((Component)player2).transform.position + Vector3.up, Color.cyan); if ((Object)(object)player2.data.stunHandler != (Object)null) { player2.data.stunHandler.AddStun(2.5f); } } } break; } } } } public class PureLoveBeamCard : CustomCard { protected override string GetTitle() { return "Pure Love Beam"; } protected override string GetDescription() { return "Press [H] to charge up and fire a massive energy beam! Extremely high damage."; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "Love Beam [H]", amount = "Laser", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("TenShadows.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Yuta_Beam"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { PureLoveBeamBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class PureLoveBeamBehaviour : MonoBehaviour { private Player player; private float cooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[H] Love Beam", () => (!(cooldown > 0f)) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[H] Love Beam"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !player.data.dead) { if (cooldown > 0f) { cooldown -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)104) && cooldown <= 0f) { ((MonoBehaviour)this).StartCoroutine(FireBeam()); } } } private IEnumerator FireBeam() { cooldown = 18f; JJKCardHelper.CreateFloatingText("Charging...", ((Component)player).transform.position + Vector3.up, Color.magenta); yield return (object)new WaitForSeconds(1.2f); Vector3 val = ((Vector3)(ref player.data.aimDirection)).normalized; if (val == Vector3.zero) { val = Vector3.right; } NetworkingManager.RaiseEvent("JJKCardsMod_LoveBeam", new object[3] { player.playerID, val.x, val.y }); } public static void OnBeamEvent(object[] data) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_00d1: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: 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_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length < 3) { return; } int num = Convert.ToInt32(data[0]); Vector3 val = new Vector3(Convert.ToSingle(data[1]), Convert.ToSingle(data[2]), 0f); Vector3 normalized = ((Vector3)(ref val)).normalized; foreach (Player player in PlayerManager.instance.players) { if (player.playerID != num) { continue; } JJKCardHelper.CreateFloatingText("PURE LOVE!", ((Component)player).transform.position + Vector3.up * 2f, Color.magenta); GameObject val2 = new GameObject("LoveBeam"); val2.transform.position = ((Component)player).transform.position; LineRenderer obj = val2.AddComponent(); ((Renderer)obj).material = new Material(Shader.Find("Sprites/Default")); obj.startColor = Color.white; obj.endColor = Color.magenta; obj.startWidth = 4f; obj.endWidth = 4f; obj.positionCount = 2; obj.SetPosition(0, ((Component)player).transform.position); obj.SetPosition(1, ((Component)player).transform.position + normalized * 50f); if (player.data.view.IsMine) { RaycastHit2D[] array = Physics2D.CircleCastAll(Vector2.op_Implicit(((Component)player).transform.position), 2f, Vector2.op_Implicit(normalized), 50f); for (int i = 0; i < array.Length; i++) { RaycastHit2D val3 = array[i]; Player componentInParent = ((Component)((RaycastHit2D)(ref val3)).collider).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)player && !componentInParent.data.dead) { ((Damagable)componentInParent.data.healthHandler).CallTakeDamage(Vector2.up * 500f, Vector2.op_Implicit(((Component)componentInParent).transform.position), (GameObject)null, player, true); } } } Object.Destroy((Object)(object)val2, 0.4f); break; } } } public class AuthenticMutualLoveCard : CustomCard { protected override string GetTitle() { return "Authentic Mutual Love"; } protected override string GetDescription() { return "Press [Y] to cast Yuta's Domain! Grants you infinite ammo and instantly refreshes Copy for 8 seconds!"; } protected override Rarity GetRarity() { return (Rarity)1; } 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 = "Domain [Y]", amount = "Buffs", simepleAmount = (SimpleAmount)0 } }; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.png"); } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { ((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Yuta_Domain"; 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() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { YutaDomainBehaviour component = ((Component)player).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public class YutaDomainBehaviour : MonoBehaviour { private Player player; private float domainCooldown; public bool IsDomainActive; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[Y] Mutual Love", () => (!(domainCooldown > 0f)) ? "READY" : $"{domainCooldown:F1}s"); } } private void OnDestroy() { if (player.data.view.IsMine && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[Y] Mutual Love"); } } private void Update() { if (!((Object)(object)player == (Object)null) && !player.data.dead) { if (domainCooldown > 0f) { domainCooldown -= Time.deltaTime; } if (player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)121) && domainCooldown <= 0f && !IsDomainActive && DomainManager.Instance.TryCastDomain(player, delegate { NetworkingManager.RaiseEvent("JJKCardsMod_YutaDomain", new object[1] { player.playerID }); })) { NetworkingManager.RaiseEvent("JJKCardsMod_YutaDomain", new object[1] { player.playerID }); } } } public void ActivateDomainLocal() { if (!IsDomainActive) { ((MonoBehaviour)this).StartCoroutine(DomainRoutine()); } } private IEnumerator DomainRoutine() { IsDomainActive = true; domainCooldown = 40f; JJKCardHelper.CreateFloatingText("AUTHENTIC MUTUAL LOVE", ((Component)player).transform.position + Vector3.up * 2f, Color.magenta); int originalAmmo = player.data.weaponHandler.gun.ammo; float num = 8f; float timer = num; while (timer > 0f && !((Object)(object)player == (Object)null) && !player.data.dead && !((Object)(object)DomainManager.Instance.ActiveDomainCaster != (Object)(object)player)) { if (player.data.weaponHandler.gun.isReloading) { player.data.weaponHandler.gun.isReloading = false; } player.data.weaponHandler.gun.ammo = originalAmmo; timer -= Time.deltaTime; yield return null; } IsDomainActive = false; DomainManager.Instance.EndDomain(player); } public static void OnDomainEvent(object[] data) { if (data == null || data.Length == 0) { return; } int num = Convert.ToInt32(data[0]); foreach (Player player in PlayerManager.instance.players) { if (player.playerID == num) { ((Component)player).GetComponent()?.ActivateDomainLocal(); break; } } } } }