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 NoxyRadialMenu.UI; 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: AssemblyProduct("JJKCardsMod")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyFileVersion("1.4.5.0")] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyTitle("JJKCardsMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("JJK Cursed Techniques")] [assembly: AssemblyCompany("JJKCardsMod")] [assembly: CompilationRelaxations(8)] [assembly: AssemblyInformationalVersion("1.4.5")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = "")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.4.5.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace JJKCardsMod { [HarmonyPatch(typeof(CardChoice), "Start")] public class CardChoicePatch { [HarmonyPostfix] private static void Postfix(CardChoice __i) { //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_009e: 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) if ((((Object)(object)__i != (Object)null) ? __i.cards : null) == 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]; } } } } } } namespace JJKCardsMod.Cards { 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 AuraFlash : MonoBehaviour { public SpriteRenderer sr; private float timer = 0.4f; private void Update() { //IL_00a9: 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) 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Domain [Y]"; val.amount = "Buffs"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "HP"; val.amount = "+10%"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)3; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: 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_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_0120: 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) GameObject val = new GameObject("CharacterCardArt"); 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); ((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 = 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_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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Melee Attack"; val.amount = "Yes"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)3; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: 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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_00b4: 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_Yuji_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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Melee Damage"; val.amount = "Massive"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Black Flash Chance"; val2.amount = "10%"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: 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_00fa: 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_00ae: 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) 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_Yuji_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 BlackFlashHitTrigger : MonoBehaviour { private void Start() { //IL_003e: 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_0117: 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_012c: 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_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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ab: 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_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: 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_0224: 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) 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 && ((Object)(object)val.data.view == (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 = JJKAudioManager.instance; if ((Object)(object)instance != (Object)null) { 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 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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) 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 || (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 BleedHitTrigger : MonoBehaviour { private void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Pierce"; val.amount = "Infinite"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Health"; val.amount = "+50%"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Damage"; val2.amount = "+15%"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 BlueBehaviour : MonoBehaviour { private const float Cooldown = 6f; private Player player; private float cooldownTimer; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[Q] Lapse: Blue", () => (cooldownTimer > 0f) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (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_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_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_0113: 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_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: 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_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Expected O, but got Unknown //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: 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_01c0: 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_01ea: 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_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_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0325: 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_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_044e: 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 && ((Object)(object)val.data.view == (Object)null || 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) { val3 = ((Component)jJKCustomDummy).transform.position - ((Component)val).transform.position; if (((Vector3)(ref val3)).magnitude <= 12f) { jJKCustomDummy.TakeDamage(100f); } } MoveTransform[] array2 = Object.FindObjectsOfType(); foreach (MoveTransform val4 in array2) { if (!(Vector3.Distance(((Component)val).transform.position, ((Component)val4).transform.position) <= 12f)) { continue; } ProjectileHit component = ((Component)val4).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.ownPlayer != (Object)(object)val) { val3 = ((Component)val).transform.position - ((Component)val4).transform.position; Vector3 normalized = ((Vector3)(ref val3)).normalized; val4.velocity = normalized * ((Vector3)(ref val4.velocity)).magnitude * 1.5f; Rigidbody2D component2 = ((Component)val4).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("BlueImplosion"); 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(0f, 0.5f, 1f, 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; BlueImplosionBehavior blueImplosionBehavior = val5.AddComponent(); blueImplosionBehavior.sr = val6; blueImplosionBehavior.maxRange = 12f; } } public class BlueCard : CustomCard { public class ProceduralSpinner : MonoBehaviour { private void Update() { //IL_0007: 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Blue Grapple [Q]"; val.amount = "Yes"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = false; val2.stat = "Cooldown"; val2.amount = "6s"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: 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_01b5: 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_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_015c: 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); ((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 BlueFlameLifecycle : MonoBehaviour { public SpriteRenderer sr; private float life = 0.5f; private void Update() { //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_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_0082: 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_00a2: 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) 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 BlueImplosionBehavior : MonoBehaviour { public SpriteRenderer sr; public float maxRange; private float duration = 0.3f; private float elapsed; private void Update() { //IL_006a: 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) 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 BoogieClapShockwave : MonoBehaviour { private SpriteRenderer sr; private float timer; private float duration = 0.25f; private void Start() { //IL_0013: 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_0060: 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) 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 BoogieWoogieBehaviour : MonoBehaviour { private const float Cooldown = 3f; private Player player; private float cooldownTimer; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[C] Boogie Woogie", () => (cooldownTimer > 0f) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (KeyCode)99) && cooldownTimer <= 0f) { TriggerBoogieWoogie(); } } private void TriggerBoogieWoogie() { //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_0017: 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_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_0058: 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_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_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_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0211: 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_0111: 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; } } else { Rigidbody2D attachedRigidbody = ((RaycastHit2D)(ref val4)).collider.attachedRigidbody; if ((Object)(object)attachedRigidbody != (Object)null) { _ = attachedRigidbody.bodyType; } bool flag = 0 == 0; } } 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_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_0129: 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_0144: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: 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_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0381: 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_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: 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_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_05cf: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_0638: Unknown result type (might be due to invalid IL or missing references) //IL_0640: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) //IL_0655: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_0627: 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) { Vector2 val3 = default(Vector2); ((Vector2)(ref val3))..ctor(num4, num5); Rigidbody2D val4 = null; float num6 = float.MaxValue; Rigidbody2D[] array = Object.FindObjectsOfType(); foreach (Rigidbody2D val5 in array) { _ = val5.bodyType; bool flag = 0 == 0; } if ((Object)(object)val4 != (Object)null) { Vector3 position2 = ((Component)val4).transform.position; Vector2 velocity = val4.velocity; if ((Object)(object)val.data.playerVel != (Object)null) { val.data.playerVel.position = Vector2.op_Implicit(position2); } ((Component)val).transform.position = position2; ((Component)val4).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; } val4.velocity = val2; SyncPlayerMovement component2 = ((Component)val).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.SetDontSyncFor(0.5f); } SpawnClapShockwave(position); SpawnClapShockwave(position2); SpawnBlueFlame(position); SpawnBlueFlame(position2); JJKCardHelper.CreateFloatingText("CLAP! Boogie Woogie!", position2, Color.cyan); } return; } Player val6 = null; foreach (Player player2 in PlayerManager.instance.players) { if ((Object)(object)player2 != (Object)null && player2.playerID == num3) { val6 = player2; } } if ((Object)(object)val6 == (Object)null) { return; } Vector3 position3 = ((Component)val6).transform.position; Rigidbody2D component3 = ((Component)val6).GetComponent(); Vector2 val7 = (Vector2)((field != null && (Object)(object)val6.data.playerVel != (Object)null) ? ((Vector2)field.GetValue(val6.data.playerVel)) : (Object.op_Implicit((Object)(object)component3) ? component3.velocity : Vector2.zero)); if ((Object)(object)val.data.playerVel != (Object)null) { val.data.playerVel.position = Vector2.op_Implicit(position3); } if ((Object)(object)val6.data.playerVel != (Object)null) { val6.data.playerVel.position = Vector2.op_Implicit(position); } ((Component)val).transform.position = position3; ((Component)val6).transform.position = position; SyncPlayerMovement component4 = ((Component)val).GetComponent(); SyncPlayerMovement component5 = ((Component)val6).GetComponent(); FieldInfo field2 = typeof(SyncPlayerMovement).GetField("syncPackages", BindingFlags.Instance | BindingFlags.NonPublic); if ((Object)(object)component4 != (Object)null) { component4.SetDontSyncFor(0.5f); if (((field2 != null) ? field2.GetValue(component4) : null) is IList list) { list.Clear(); } } if ((Object)(object)component5 != (Object)null) { component5.SetDontSyncFor(0.5f); if (((field2 != null) ? field2.GetValue(component5) : null) is IList list2) { list2.Clear(); } } PlayerCollision componentInParent = ((Component)val).GetComponentInParent(); PlayerCollision componentInParent2 = ((Component)val6).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)val6.data.playerVel != (Object)null) { field.SetValue(val.data.playerVel, val7); field.SetValue(val6.data.playerVel, val2); } if (Object.op_Implicit((Object)(object)component)) { component.velocity = val7; } if (Object.op_Implicit((Object)(object)component3)) { component3.velocity = val2; } SpawnClapShockwave(position); SpawnClapShockwave(position3); SpawnBlueFlame(position); SpawnBlueFlame(position3); JJKCardHelper.CreateFloatingText("CLAP! Boogie Woogie!", position3, Color.cyan); } private static void SpawnClapShockwave(Vector3 pos) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: 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_003a: Expected O, but got Unknown //IL_0113: 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_0081: 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_00cc: 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) 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); ((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_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: 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_0037: Expected O, but got Unknown //IL_006c: 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_016d: 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_00eb: 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_010a: 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); ((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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Clap Teleport [C]"; val.amount = "Yes"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: 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_00e2: 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_0102: 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) 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); ((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 ChimeraShadowGardenBehaviour : MonoBehaviour { private const float Cooldown = 35f; private Player player; private float domainCooldown; private GameObject domainVisual; public bool IsDomainActive; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[Y] Shadow Garden", () => (domainCooldown <= 0f) ? "READY" : $"{domainCooldown:F1}s"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (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 && ((Object)(object)this.player.data.view == (Object)null || 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Domain [Y]"; val.amount = "Slow & Damage"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 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_000a: 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_0037: Expected O, but got Unknown CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "HP"; val.amount = "+20%"; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Regeneration"; val2.amount = "Fast"; array[1] = val2; return array; } 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 CleaveBehaviour : MonoBehaviour { private const float Cooldown = 6f; private Player player; private float cleaveCooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if (!((Object)(object)player.data.view == (Object)null) && !player.data.view.IsMine) { return; } JJKCooldownManager.instance.RegisterAbility("[E] Cleave", delegate { //IL_0076: 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) 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 (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (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_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_0137: 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_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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_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_0103: 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_024e: 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_0288: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: 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) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: 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_0303: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: 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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) 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 ((Object)(object)val.data.view == (Object)null || 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_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00a4: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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) GameObject val = new GameObject("CleaveSlash"); val.transform.position = pos; LineRenderer val2 = val.AddComponent(); val2.startWidth = 0.4f; val2.endWidth = 0f; ((Renderer)val2).material = new Material(Shader.Find("Sprites/Default")); val2.startColor = Color.white; val2.endColor = Color.red; val2.positionCount = 2; float num = Random.Range(0f, 360f) * ((float)Math.PI / 180f); Vector3 val3 = new Vector3(Mathf.Cos(num), Mathf.Sin(num), 0f) * 2.5f; val2.SetPosition(0, pos - val3); val2.SetPosition(1, pos + val3); Object.Destroy((Object)(object)val, 0.2f); } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Cleave [E]"; val.amount = "Melee"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 CollapseBehaviour : MonoBehaviour { private Player player; private float cooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[F] Collapse", () => (cooldown <= 0f) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (KeyCode)102) && cooldown <= 0f) { cooldown = 12f; NetworkingManager.RaiseEvent("JJKCardsMod_Collapse", new object[1] { player.playerID }); } } } public static void OnCollapseEvent(object[] data) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00a7: 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_00db: 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_013d: 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_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: 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 val = GameObject.CreatePrimitive((PrimitiveType)0); val.transform.position = ((Component)player).transform.position; val.transform.localScale = Vector3.one * num2 * 2f; val.GetComponent().material.color = new Color(0.5f, 0.4f, 0f, 0.5f); Object.Destroy((Object)(object)val.GetComponent()); Object.Destroy((Object)(object)val, 0.4f); if (!((Object)(object)player.data.view == (Object)null) && !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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Collapse [F]"; val.amount = "AOE"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 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_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0047: 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_0068: Expected O, but got Unknown //IL_0102: 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_0093: 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_00ba: 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_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Expected O, but got Unknown //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) 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 ((Object)(object)player.data.view == (Object)null || 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: 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_025a: 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) { float reloadTime = cachedGunAmmo.reloadTime; } if ((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || 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_0068: 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_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) 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_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_0115: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_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_01b0: 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) if (!((Object)(object)player.data.view == (Object)null) && !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_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_00d6: 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_00f9: 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_0114: 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_0090: 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_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_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: 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_026b: 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 = JJKAudioManager.instance; if ((Object)(object)instance != (Object)null) { 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 val = GameObject.CreatePrimitive((PrimitiveType)0); val.transform.position = ((Component)target).transform.position; val.transform.localScale = Vector3.one * 4f; val.GetComponent().material.color = new Color(0f, 0f, 0f, 0.8f); Object.Destroy((Object)(object)val.GetComponent()); Object.Destroy((Object)(object)val, 0.3f); } else { currentBlackFlashChance = 0.1f; } int numberOfProjectiles = player.data.weaponHandler.gun.numberOfProjectiles; if (numberOfProjectiles > 1) { num2 *= (float)numberOfProjectiles; } Vector2 val2 = Vector2.op_Implicit(((Vector3)(ref player.data.aimDirection)).normalized); if (val2 == Vector2.zero) { val2 = Vector2.up; } NetworkingManager.RaiseEvent("JJKCardsMod_FistHit", new object[7] { target.playerID, player.playerID, val2.x, val2.y, num2, enableIdleTransfiguration, false }); if (enableDivergentFist) { ((MonoBehaviour)this).StartCoroutine(DelayedDivergentHit(target, val2, num2)); } } private IEnumerator DelayedDivergentHit(Player target, Vector2 damageDir, float damage) { //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) 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_00fa: 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_0106: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: 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_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_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: 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) 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 CursedSpeechBehaviour : MonoBehaviour { private Player player; private float cooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[G] Cursed Speech", () => (cooldown <= 0f) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[G] Cursed Speech"); } } private void Update() { //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) if (!((Object)(object)player == (Object)null) && !player.data.dead) { if (cooldown > 0f) { cooldown -= Time.deltaTime; } if (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_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_008b: 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_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_00f0: 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_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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_0125: 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_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: 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) 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Cursed Speech [G]"; val.amount = "Stun"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Dismantle"; val.amount = "Passive"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Pierce"; val2.amount = "Yes"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Double Hit"; val.amount = "Yes"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Stun"; val2.amount = "+0.2s"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)3; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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); ((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_Yuji_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 DivineDogBehaviour : MonoBehaviour { private const float Cooldown = 15f; private Player player; private float dogCooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[F] Divine Dog", () => (dogCooldown <= 0f) ? "READY" : $"{dogCooldown:F1}s"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (KeyCode)102) && dogCooldown <= 0f) { dogCooldown = 15f; NetworkingManager.RaiseEvent("JJKCardsMod_DivineDog", new object[1] { player.playerID }); } } } public static void OnDivineDogEvent(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_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_00b3: 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_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_0105: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) 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 val2 = GameObject.CreatePrimitive((PrimitiveType)1); val2.transform.position = ((Component)val).transform.position + Vector3.right * 2f; val2.transform.localScale = new Vector3(1.2f, 0.8f, 1f); val2.GetComponent().material.color = new Color(0.1f, 0.1f, 0.1f, 1f); Object.Destroy((Object)(object)val2.GetComponent()); ((Collider2D)val2.AddComponent()).isTrigger = true; val2.AddComponent().isKinematic = true; val2.AddComponent().owner = val; } } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Divine Dog [F]"; val.amount = "Summon"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 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_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) //IL_009f: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_00ca: 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_00eb: 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_004d: 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) 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_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) 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 DivineFlameBehaviour : MonoBehaviour { private const float Cooldown = 15f; private Player player; private float fugaCooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[F] Divine Flame", () => (fugaCooldown <= 0f) ? "READY" : $"{fugaCooldown:F1}s"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (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 vector = Vector2.op_Implicit(((Vector3)(ref player.data.aimDirection)).normalized); if (vector == Vector2.zero) { vector = Vector2.up; } NetworkingManager.RaiseEvent("JJKCardsMod_DivineFlame", new object[3] { player.playerID, vector.x, vector.y }); } } public static void OnDivineFlameEvent(object[] data) { //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_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_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_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_00df: 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_010b: 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_0131: 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_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Expected O, but got Unknown //IL_01b0: 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_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024a: 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 val3 = GameObject.CreatePrimitive((PrimitiveType)3); val3.transform.position = ((Component)val).transform.position + normalized * 2f; val3.transform.localScale = new Vector3(3f, 0.3f, 1f); float num4 = Mathf.Atan2(normalized.y, normalized.x) * 57.29578f; val3.transform.rotation = Quaternion.Euler(0f, 0f, num4); Renderer component = val3.GetComponent(); component.material = new Material(Shader.Find("Sprites/Default")); component.material.color = new Color(1f, 0.4f, 0f, 1f); TrailRenderer val4 = val3.AddComponent(); val4.time = 0.2f; val4.startWidth = 0.3f; val4.endWidth = 0f; ((Renderer)val4).material = component.material; val4.startColor = Color.yellow; val4.endColor = new Color(1f, 0f, 0f, 0f); Object.Destroy((Object)(object)val3.GetComponent()); DivineFlameHit divineFlameHit = val3.AddComponent(); divineFlameHit.owner = val; divineFlameHit.direction = normalized; } } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Divine Flame [F]"; val.amount = "Massive AOE"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 DivineFlameExplosionAnim : MonoBehaviour { public float maxRadius = 15f; private float timer; private float duration = 0.5f; private Renderer rend; private void Start() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0047: 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) 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_0049: 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_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_0097: 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 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_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_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_005c: 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_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_00b2: 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_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_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_00eb: 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_00f7: 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) 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)) { Transform transform = ((Component)this).transform; transform.position += direction * num; return; } Player componentInParent = ((Component)((RaycastHit2D)(ref val)).collider).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent == (Object)(object)owner) { Transform transform2 = ((Component)this).transform; transform2.position += direction * num; } else if (((RaycastHit2D)(ref val)).collider.isTrigger) { Transform transform3 = ((Component)this).transform; transform3.position += direction * num; } else { ((Component)this).transform.position = Vector2.op_Implicit(((RaycastHit2D)(ref val)).point); Explode(); } } private void Explode() { //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_0051: 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_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_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) if (hasExploded) { return; } hasExploded = true; float num = 15f; JJKCardHelper.CreateFloatingText("\ud83d\udd25\ud83d\udca5", ((Component)this).transform.position, Color.red); GameObject val = GameObject.CreatePrimitive((PrimitiveType)0); val.transform.position = ((Component)this).transform.position; Object.Destroy((Object)(object)val.GetComponent()); val.AddComponent().maxRadius = num; if (owner.data.view.IsMine) { Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)this).transform.position), num); foreach (Collider2D val2 in array) { Player componentInParent = ((Component)val2).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)val2).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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Bleed"; val.amount = "Yes"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) ((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(); val2.effect = val; val2.numberOfSpawns = 1; val2.normalOffset = 0f; val2.spawnOn = (SpawnOn)0; val2.spawnAsChild = false; ObjectsToSpawn val3 = val2; ObjectsToSpawn[] objectsToSpawn; if (gun.objectsToSpawn == null) { (objectsToSpawn = (ObjectsToSpawn[])(object)new ObjectsToSpawn[1])[0] = val3; } else { List list = new List(gun.objectsToSpawn); list.Add(val3); objectsToSpawn = list.ToArray(); } gun.objectsToSpawn = objectsToSpawn; 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 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 ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[G] Red Scale", () => (cooldown <= 0f) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { RemoveBuff(); if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (KeyCode)103) && cooldown <= 0f && !isBuffed) { cooldown = 15f; NetworkingManager.RaiseEvent("JJKCardsMod_RedScale", new object[1] { player.playerID }); } } public static void OnRedScaleEvent(object[] data) { //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) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) 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_00af: 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_00da: 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) 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 ((Object)(object)player.data.view == (Object)null || 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Red Scale [G]"; val.amount = "Buff"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Infinite"; val.amount = "Adaptation"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)3; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: 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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: 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_0142: 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); ((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 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_000a: 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_0037: Expected O, but got Unknown CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "HP"; val.amount = "+30%"; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Move Speed"; val2.amount = "+20%"; array[1] = val2; return array; } 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 MahitoCard : BaseCharacterCard { public override string CharacterName => "Mahito"; public override string CharacterTag => "Mahito"; public override string Description => "A cursed spirit born from humanity's hatred. Transfigure souls to reshape the battlefield."; } public class YujiCard : BaseCharacterCard { public override string CharacterName => "Yuji Itadori"; public override string CharacterTag => "Yuji"; public override string Description => "A prodigy of hand-to-hand combat. Overpower your opponents with raw physical strength and Black Flash."; } public class TojiCard : BaseCharacterCard { public override string CharacterName => "Toji Fushiguro"; public override string CharacterTag => "Toji"; public override string Description => "Zero Cursed Energy. A physical monster who wields Special Grade Cursed Tools."; } 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_003d: 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Hollow Purple [F]"; val.amount = "Ultimate"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = false; val2.stat = "Cooldown"; val2.amount = "15s"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)4; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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_00e3: 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_0136: 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_0142: 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) 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); ((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 HollowPurpleProjectileMover : MonoBehaviour { public Vector3 direction; public Player caster; private float speed = 15f; private float tickTimer = 0.1f; private void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_0183: 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_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) 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 || (!((Object)(object)caster.data.view == (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); } } } private void OnDestroy() { SpriteRenderer component = ((Component)this).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); } } } 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 ((Object)(object)player.data.view == (Object)null || 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 && ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[F] Hollow Purple"); } } private void Update() { //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_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: 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_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: 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_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) if (cooldownTimer > 0f) { cooldownTimer -= Time.deltaTime; } if ((Object)(object)player != (Object)null && ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_009c: 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_002d: 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_0054: 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) 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; val.AddComponent(); return val; } private void FireHollowPurple() { //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_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_007f: 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_009f: 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_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_00c0: 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_00cc: Expected O, but got Unknown //IL_00d2: 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_00eb: Expected O, but got Unknown //IL_018f: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: 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_0129: 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_013a: 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Max HP Damage"; val.amount = "10%"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Melee Attack"; val2.amount = "Yes"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)5; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: 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_00b3: 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_0068: 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_Tech_Mahito_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 InfiniteVoidBehaviour : MonoBehaviour { private const float Cooldown = 15f; private const float Range = 100f; private Player player; private float cooldownTimer; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[V] Infinite Void", () => (cooldownTimer > 0f) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (KeyCode)118) && cooldownTimer <= 0f) { cooldownTimer = 15f; JJKAudioManager instance = JJKAudioManager.instance; if ((Object)(object)instance != (Object)null) { 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_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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_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_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) 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 ((Object)(object)sender.data.view == (Object)null || 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_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Expected O, but got Unknown //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Expected O, but got Unknown //IL_02b9: 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_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Expected O, but got Unknown //IL_0190: 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_012f: 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_0150: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0374: 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); ((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); 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0031: 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_0041: Expected O, but got Unknown //IL_0060: 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_0070: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[3]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Domain Expansion [V]"; val.amount = "Yes"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Stun Duration"; val2.amount = "3s"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; CardInfoStat val3 = new CardInfoStat(); val3.positive = false; val3.stat = "Cooldown"; val3.amount = "15s"; val3.simepleAmount = (SimpleAmount)0; array[2] = val3; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 InfinityBehaviour : MonoBehaviour { private const float Range = 8f; private const float ScanInterval = 0.1f; private Player player; private Block block; private GameObject auraObj; private float scanTimer; private Dictionary originalSpeeds = new Dictionary(); private Collider2D[] hitBuffer = (Collider2D[])(object)new Collider2D[40]; private float shatterTimer; public bool IsInfinityActive { get; private set; } public void ShatterInfinity() { IsInfinityActive = false; shatterTimer = 3f; if ((Object)(object)auraObj != (Object)null) { auraObj.SetActive(false); } } private void Awake() { IsInfinityActive = true; player = ((Component)this).GetComponent(); block = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)block != (Object)null) { Block val = block; val.BlockAction = (Action)Delegate.Combine(val.BlockAction, new Action(OnBlock)); } SpawnAura(); } private void SpawnAura() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0033: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00bb: 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_0183: 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) 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); ((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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c7: 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_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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: 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_024a: 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: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_0390: 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 val = block; val.BlockAction = (Action)Delegate.Remove(val.BlockAction, new Action(OnBlock)); } if ((Object)(object)auraObj != (Object)null) { SpriteRenderer component = auraObj.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)auraObj); } originalSpeeds.Clear(); } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0031: 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_0041: Expected O, but got Unknown //IL_0060: 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_0070: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[3]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Projectile Slowdown"; val.amount = "Up to 95%"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Slow Range"; val2.amount = "8m"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; CardInfoStat val3 = new CardInfoStat(); val3.positive = true; val3.stat = "Block Stopping"; val3.amount = "Yes"; val3.simepleAmount = (SimpleAmount)0; array[2] = val3; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)3; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: 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_019d: 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_0141: 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); ((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 InvertedSpearBehaviour : MonoBehaviour { public Player player; private void Awake() { player = ((Component)this).GetComponent(); } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0031: 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_0041: Expected O, but got Unknown //IL_0060: 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_0070: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[3]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Silence Duration"; val.amount = "3s"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Bypass Infinity"; val2.amount = "Yes"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; CardInfoStat val3 = new CardInfoStat(); val3.positive = false; val3.stat = "Range"; val3.amount = "Melee"; val3.simepleAmount = (SimpleAmount)0; array[2] = val3; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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_Toji_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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Reload Time"; val.amount = "-40%"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Move Speed"; val2.amount = "+30%"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 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 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_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_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_0053: 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_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_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_0162: 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_0168: 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 (!((Object)(object)player.data.view == (Object)null) && !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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("Mahoraga Adapt"); } DestroyWheel(); } public void SpawnWheel() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_0165: 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_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) float num = 1f; 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Adaptation"; val.amount = "Phenomena"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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_00ea: 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_0214: 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_0116: 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) 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); ((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 MahoragaWheel : MonoBehaviour { private static Sprite cachedWheelSprite; 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_0034: 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_027c: 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_00a7: Expected O, but got Unknown //IL_0102: 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_0123: 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_0147: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_0210: 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_024f: 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; if ((Object)(object)cachedWheelSprite == (Object)null) { int num = 128; Texture2D val = new Texture2D(num, num); ((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(); cachedWheelSprite = Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f); } sr.sprite = cachedWheelSprite; sr.color = baseColor; } public void SetGold() { //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) baseColor = new Color(1f, 0.8f, 0.2f); } private void Update() { //IL_004a: 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_008e: 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() { } public void TriggerAdaptationEffect() { spinSpeed = 1200f; targetSpinSpeed = 1200f; flashTimer = 0.5f; } private void DrawCircle(Texture2D tex, int cx, int cy, int r, Color col) { //IL_0015: 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_0033: 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_0051: 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) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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_0029: 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_0036: 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) { bool flag = true; tex.SetPixel(x0, y0, col); if (x0 == x1 && y0 == y1) { break; } int num6 = 2 * num5; if (num6 > -num2) { num5 -= num2; x0 += num3; } if (num6 < num) { num5 += num; y0 += num4; } } } } 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_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_001c: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_00d9: 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_0094: 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) //IL_0112: Expected O, but got Unknown //IL_011f: 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_014c: Expected O, but got Unknown //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_025b: 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_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0291: 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_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) 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); ((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_00dc: 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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0115: 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_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_036c: 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_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: 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) 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 || (!((Object)(object)caster.data.view == (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_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0012: 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_007b: 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_00c1: 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_00c9: 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_00cb: 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_00da: 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: Expected O, but got Unknown GameObject val = new GameObject("ShrineSlash"); val.transform.position = pos; LineRenderer val2 = val.AddComponent(); val2.startWidth = 0.2f; val2.endWidth = 0f; if ((Object)(object)cachedSlashMat == (Object)null) { cachedSlashMat = new Material(Shader.Find("Sprites/Default")); } ((Renderer)val2).material = cachedSlashMat; val2.startColor = Color.white; val2.endColor = Color.red; val2.positionCount = 2; float num = Random.Range(0f, 360f) * ((float)Math.PI / 180f); Vector3 val3 = new Vector3(Mathf.Cos(num), Mathf.Sin(num), 0f) * (length / 2f); val2.SetPosition(0, pos - val3); val2.SetPosition(1, pos + val3); Object.Destroy((Object)(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 MalevolentShrineBehaviour : MonoBehaviour { private const float Cooldown = 20f; private Player player; private float cooldownTimer; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (KeyCode)121) && cooldownTimer <= 0f) { cooldownTimer = 20f; JJKAudioManager instance = JJKAudioManager.instance; if ((Object)(object)instance != (Object)null) { 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_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_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_0040: 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Malevolent Shrine [G]"; val.amount = "Map-Wide"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = false; val2.stat = "Cooldown"; val2.amount = "20s"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } protected override GameObject GetCardArt() { return JJKCardHelper.GetCardArt("MalevolentShrine.jpg"); } 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 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_000a: 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_0037: Expected O, but got Unknown CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "HP"; val.amount = "+15%"; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Block Cooldown"; val2.amount = "-10%"; array[1] = val2; return array; } 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Damage"; val.amount = "+50%"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) ((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(); val2.effect = val; val2.numberOfSpawns = 1; val2.normalOffset = 0f; val2.spawnOn = (SpawnOn)0; val2.spawnAsChild = false; ObjectsToSpawn val3 = val2; ObjectsToSpawn[] objectsToSpawn; if (gun.objectsToSpawn == null) { (objectsToSpawn = (ObjectsToSpawn[])(object)new ObjectsToSpawn[1])[0] = val3; } else { List list = new List(gun.objectsToSpawn); list.Add(val3); objectsToSpawn = list.ToArray(); } gun.objectsToSpawn = objectsToSpawn; 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 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_000a: 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_0037: Expected O, but got Unknown CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "HP"; val.amount = "+15%"; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Attack Speed"; val2.amount = "+20%"; array[1] = val2; return array; } 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Reflect Projectiles"; val.amount = "Yes"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)3; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: 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_01c0: 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) 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); ((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 OvertimeBehaviour : MonoBehaviour { private Player player; private float roundTimer; private bool overtimeActive; private void Awake() { player = ((Component)this).GetComponent(); } private void Update() { //IL_0075: 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_0084: 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Overtime"; val.amount = "Buffs"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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); } } } [HarmonyPatch(typeof(Block), "IsBlocking")] internal class Patch_Block_IsBlocking { private static bool Prefix(Block __instance, ref bool __result) { return true; } } [HarmonyPatch(typeof(HealthHandler), "TakeDamage", new Type[] { typeof(Vector2), typeof(Vector2), typeof(Color), typeof(GameObject), typeof(Player), typeof(bool), typeof(bool) })] internal class Patch_HealthHandler_TakeDamage { [HarmonyPrefix] private static void Prefix(HealthHandler __instance, ref Vector2 damage, Vector2 position, Color damageColor, GameObject damagingWeapon, Player damagingPlayer, bool ignoreBlock, bool ignoreDamageMultipier) { //IL_0094: 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) Player componentInParent = ((Component)__instance).GetComponentInParent(); if ((Object)(object)componentInParent == (Object)null) { return; } bool isDmgOverTime = (Object)(object)damagingWeapon == (Object)null; bool hasKatana = false; if ((Object)(object)damagingPlayer != (Object)null && (Object)(object)((Component)damagingPlayer).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, damagingPlayer, hasKatana); } } } [HarmonyPatch(typeof(ProjectileHit), "Hit")] internal class Patch_ProjectileHit_Hit_InvertedSpear { private static void Prefix(ProjectileHit __instance, HitInfo hit, bool forceCall) { //IL_00b1: 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_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_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) 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 PiercingBloodBehaviour : MonoBehaviour { private const float Cooldown = 12f; private const float Damage = 150f; private Player player; private float cooldownTimer; private bool isCharging; private float chargeTimer; private Vector3 savedDir; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[X] Piercing Blood", () => (cooldownTimer > 0f) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && (Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[X] Piercing Blood"); } } private void Update() { //IL_0101: 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_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) //IL_0177: 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_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: 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_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) 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && JJKCardHelper.IsKeyPressed(player, (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_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_0048: 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_00f7: 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 && !((Object)(object)val2.data.view == (Object)null) && !val2.data.view.IsMine) { ExecutePiercingBlood(val2, normalized, isLocalPlayer: false); } } private static void ExecutePiercingBlood(Player sender, Vector3 dir, bool isLocalPlayer) { //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_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_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Expected O, but got Unknown //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_027a: 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_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0286: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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) //IL_0135: 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_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_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_00c7: 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_01a2: 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_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) 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 val4 = val3.AddComponent(); val4.startWidth = 1.5f; val4.endWidth = 1.5f; ((Renderer)val4).material = new Material(Shader.Find("Sprites/Default")); val4.startColor = new Color(0.9f, 0.1f, 0.1f, 1f); val4.endColor = new Color(0.9f, 0.1f, 0.1f, 1f); val4.positionCount = 2; val4.SetPosition(0, position); val4.SetPosition(1, position + dir * 100f); val3.AddComponent(); } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0031: 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_0041: Expected O, but got Unknown //IL_0060: 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_0070: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[3]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Blood Beam [X]"; val.amount = "Active"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Projectile Pierce"; val2.amount = "Infinite"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; CardInfoStat val3 = new CardInfoStat(); val3.positive = false; val3.stat = "Cooldown"; val3.amount = "12s"; val3.simepleAmount = (SimpleAmount)0; array[2] = val3; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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_Tech_Choso_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 PiercingBloodFade : MonoBehaviour { private LineRenderer lr; private float life = 1f; private Color color; private void Start() { //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) lr = ((Component)this).GetComponent(); if ((Object)(object)lr != (Object)null) { color = lr.startColor; } } private void Update() { //IL_007a: 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) 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 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 val = gun; val.ShootPojectileAction = (Action)Delegate.Combine(val.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 val = gun; val.ShootPojectileAction = (Action)Delegate.Remove(val.ShootPojectileAction, new Action(OnShoot)); } } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Max Health Damage Scaling"; val.amount = "Up to +100%"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = false; val2.stat = "Ignore Walls/Magical effects"; val2.amount = "Disabled"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)1; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_0118: 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) 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); ((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; ((Object)((Component)cardInfo).gameObject).name = "JJK_Tool_Toji_PlayfulCloud"; 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 PureLoveBeamBehaviour : MonoBehaviour { private Player player; private float cooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[H] Love Beam", () => (cooldown <= 0f) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (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 vector = ((Vector3)(ref player.data.aimDirection)).normalized; if (vector == Vector3.zero) { vector = Vector3.right; } NetworkingManager.RaiseEvent("JJKCardsMod_LoveBeam", new object[3] { player.playerID, vector.x, vector.y }); } public static void OnBeamEvent(object[] data) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_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_008b: 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_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_00a4: 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: Expected O, but got Unknown //IL_00c6: 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_00ef: Expected O, but got Unknown //IL_00f2: 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_0136: 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_014f: 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_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: 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_01b0: 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_021f: 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_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) 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 val3 = val2.AddComponent(); ((Renderer)val3).material = new Material(Shader.Find("Sprites/Default")); val3.startColor = Color.white; val3.endColor = Color.magenta; val3.startWidth = 4f; val3.endWidth = 4f; val3.positionCount = 2; val3.SetPosition(0, ((Component)player).transform.position); val3.SetPosition(1, ((Component)player).transform.position + normalized * 50f); if ((Object)(object)player.data.view == (Object)null || 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 val4 = array[i]; Player componentInParent = ((Component)((RaycastHit2D)(ref val4)).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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Love Beam [H]"; val.amount = "Laser"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 RatioBehaviour : MonoBehaviour { public Gun gun; private int shotCounter; private void Start() { if ((Object)(object)gun != (Object)null) { Gun val = gun; val.ShootPojectileAction = (Action)Delegate.Combine(val.ShootPojectileAction, new Action(OnShoot)); } } private void OnShoot(GameObject bullet) { //IL_0056: 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) //IL_0091: 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) 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 val = gun; val.ShootPojectileAction = (Action)Delegate.Remove(val.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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Critical Hit"; val.amount = "Every 7th shot"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 RedBehaviour : MonoBehaviour { private const float Cooldown = 8f; private Player player; private float cooldownTimer; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[E] Reversal: Red", () => (cooldownTimer > 0f) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && JJKCardHelper.IsKeyPressed(player, (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_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_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_0113: 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_0230: 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_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Expected O, but got Unknown //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Expected O, but got Unknown //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0428: 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_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: 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_01da: 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_028f: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: 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_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: 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_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: 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 && ((Object)(object)val.data.view == (Object)null || 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Red Repulse [G]"; val.amount = "Active"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Damage & Knockback"; val2.amount = "High"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: 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_0169: 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); ((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 RedExplosionBehavior : MonoBehaviour { public SpriteRenderer sr; public float maxRange; private float duration = 0.3f; private float elapsed; private void Update() { //IL_006a: 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) 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 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_0070: 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_0152: 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_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_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //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_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_028e: 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_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: 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 RikaBehaviour : MonoBehaviour { private Player player; private float cooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[F] Rika", () => (cooldown <= 0f) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (KeyCode)102) && cooldown <= 0f) { cooldown = 45f; NetworkingManager.RaiseEvent("JJKCardsMod_Rika", new object[1] { player.playerID }); } } } public static void OnRikaEvent(object[] data) { //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_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_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_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_00bf: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) 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 val = GameObject.CreatePrimitive((PrimitiveType)0); val.transform.position = ((Component)player).transform.position + Vector3.up * 3f; val.transform.localScale = Vector3.one * 2.5f; val.GetComponent().material.color = new Color(0.2f, 0f, 0.2f, 0.8f); Object.Destroy((Object)(object)val.GetComponent()); val.AddComponent().owner = player; JJKAnimator.CreateAura(val.transform, new Color(0.8f, 0f, 0.8f, 0.6f)); break; } } } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Rika [F]"; val.amount = "Summon"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 SimpleDomainBehaviour : MonoBehaviour { private const float Cooldown = 15f; private const float Duration = 5f; private Player player; private float cooldownTimer; private float activeTimer; 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 (!((Object)(object)player.data.view == (Object)null) && !player.data.view.IsMine) { return; } JJKCooldownManager.instance.RegisterAbility("[V] Simple Domain", delegate { if (IsSimpleDomainActive) { return $"ACTIVE ({activeTimer:F1}s)"; } return (cooldownTimer > 0f) ? $"{cooldownTimer:F1}s" : "READY"; }); } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && JJKCardHelper.IsKeyPressed(player, (KeyCode)118) && cooldownTimer <= 0f) { NetworkingManager.RaiseEvent("JJKCardsMod_SimpleDomain_Activate", new object[1] { player.playerID }); } } public void ActivateDomainLocal() { //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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_008f: 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_00e4: Expected O, but got Unknown //IL_00fa: 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_015c: 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_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_008b: 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_0095: 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_0137: 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) { GameObject gameObject = 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Anti-Domain Barrier [V]"; val.amount = "5s"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "itsaciiid!"; val2.amount = "Thanks"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)3; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: 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_00db: 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_0155: 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); ((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 SplitSoulKatanaBehaviour : MonoBehaviour { } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Armor/Resistance Bypass"; val.amount = "50%"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Anti-Heal Duration"; val2.amount = "3s"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: 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_00fe: 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) 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); ((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; ((Object)((Component)cardInfo).gameObject).name = "JJK_Tool_Toji_SplitSoul"; 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 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_000a: 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_0037: Expected O, but got Unknown CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "HP"; val.amount = "+20%"; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Damage"; val2.amount = "+20%"; array[1] = val2; return array; } 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 SukunaRCTBehaviour : MonoBehaviour { private const float Cooldown = 15f; private Player player; private float cooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[H] RCT", () => (cooldown <= 0f) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (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_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) //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_00bc: 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_0113: 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_014c: 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 val2 = GameObject.CreatePrimitive((PrimitiveType)0); val2.transform.position = ((Component)val).transform.position; val2.transform.localScale = Vector3.one * 3f; Renderer component = val2.GetComponent(); component.material.color = new Color(0f, 1f, 0f, 0.4f); Object.Destroy((Object)(object)val2.GetComponent()); Object.Destroy((Object)(object)component.material, 0.3f); Object.Destroy((Object)(object)val2, 0.3f); } } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "RCT [H]"; val.amount = "Heal"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Max Health"; val2.amount = "+20%"; val2.simepleAmount = (SimpleAmount)1; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 SukunaTechniqueBehaviour : MonoBehaviour { private const float DismantleAuraInterval = 1.5f; private const float DismantleAuraRange = 8f; private const float DismantleAuraDamage = 8f; private Player player; private float dismantleAuraTimer; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { //IL_0075: 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_00fb: 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) if ((Object)(object)player == (Object)null || player.data.dead || (!((Object)(object)player.data.view == (Object)null) && !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_00dd: 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_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) 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 ((Object)(object)val.data.view == (Object)null || 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 SupernovaBehaviour : MonoBehaviour { private Player player; private float cooldown; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[F] Supernova", () => (cooldown <= 0f) ? "READY" : $"{cooldown:F1}s"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (KeyCode)102) && cooldown <= 0f) { cooldown = 12f; NetworkingManager.RaiseEvent("JJKCardsMod_Supernova", new object[1] { player.playerID }); } } } public static void OnSupernovaEvent(object[] data) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00b1: 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_00e5: 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_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: 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) 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 val = GameObject.CreatePrimitive((PrimitiveType)0); val.transform.position = ((Component)player).transform.position; val.transform.localScale = Vector3.one * num2 * 2f; val.GetComponent().material.color = new Color(0.8f, 0f, 0f, 0.4f); Object.Destroy((Object)(object)val.GetComponent()); Object.Destroy((Object)(object)val, 0.3f); if (!((Object)(object)player.data.view == (Object)null) && !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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Supernova [F]"; val.amount = "AOE"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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 TenShadowsBehaviour : MonoBehaviour { private const float Cooldown = 10f; private Player player; private float cooldownTimer; private int shadowIndex; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[H] Ten Shadows", () => (cooldownTimer > 0f) ? $"{cooldownTimer:F1}s" : "READY"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && JJKCardHelper.IsKeyPressed(player, (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_00d3: 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_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 (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_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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0066: 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_0142: 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_019c: Expected O, but got Unknown //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: 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) 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 val4 = val.AddComponent(); val4.time = 0.2f; val4.startWidth = 1f; val4.endWidth = 0.1f; ((Renderer)val4).material = new Material(Shader.Find("Sprites/Default")); val4.startColor = new Color(0.1f, 0.1f, 0.1f, 0.5f); val4.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 player = FindClosestOpponent(sender, 20f); Vector3 dir = sender.data.aimDirection; if ((Object)(object)player != (Object)null) { Vector3 val = ((Component)player).transform.position - position; dir = ((Vector3)(ref val)).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 (((Object)(object)sender.data.view == (Object)null || sender.data.view.IsMine) && !hit && (Object)(object)dog != (Object)null) { foreach (Player player2 in PlayerManager.instance.players) { if ((Object)(object)player2 != (Object)(object)sender && !player2.data.dead && Vector3.Distance(dog.transform.position, ((Component)player2).transform.position) < 2.5f) { hit = true; ((Damagable)player2.data.healthHandler).CallTakeDamage(Vector2.op_Implicit(dir * 55f), Vector2.op_Implicit(((Component)player2).transform.position), (GameObject)null, sender, false); break; } } } yield return null; } if (!((Object)(object)dog != (Object)null)) { yield break; } SpriteRenderer component = dog.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)dog); } private static void SpawnNueLightning(Player sender) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_004e: 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_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_00a1: 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_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_00c0: 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_0095: 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_00ce: 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_00d6: 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_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_0101: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: 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_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) Player val = FindClosestOpponent(sender); GameObject val2 = new GameObject("NueLightning"); LineRenderer val3 = val2.AddComponent(); val3.startWidth = 0.2f; val3.endWidth = 0.05f; ((Renderer)val3).material = new Material(Shader.Find("Sprites/Default")); val3.startColor = Color.yellow; val3.endColor = Color.white; val3.positionCount = 4; Vector3 position = ((Component)sender).transform.position; Vector3 val4 = ((!((Object)(object)val != (Object)null)) ? (((Component)sender).transform.position + sender.data.aimDirection * 15f) : ((Component)val).transform.position); val3.SetPosition(0, position); val3.SetPosition(1, Vector3.Lerp(position, val4, 0.33f) + Vector3.up * Random.Range(-1.5f, 1.5f)); val3.SetPosition(2, Vector3.Lerp(position, val4, 0.66f) + Vector3.down * Random.Range(-1.5f, 1.5f)); val3.SetPosition(3, val4); if (((Object)(object)sender.data.view == (Object)null || sender.data.view.IsMine) && (Object)(object)val != (Object)null) { 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)(object)val2, 0.25f); } private static void SpawnToadPull(Player sender) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_005d: 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_0093: 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_016e: 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_017d: 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_010e: 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_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_0138: 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) Player val = FindClosestOpponent(sender); GameObject val2 = new GameObject("ToadTongue"); LineRenderer val3 = val2.AddComponent(); val3.startWidth = 0.15f; val3.endWidth = 0.15f; ((Renderer)val3).material = new Material(Shader.Find("Sprites/Default")); val3.startColor = new Color(0.8f, 0.4f, 0.5f); val3.endColor = new Color(0.8f, 0.4f, 0.5f); val3.positionCount = 2; val3.SetPosition(0, ((Component)sender).transform.position); if ((Object)(object)val != (Object)null) { val3.SetPosition(1, ((Component)val).transform.position); if ((Object)(object)((Component)val).GetComponent() != (Object)null && ((Object)(object)sender.data.view == (Object)null || sender.data.view.IsMine)) { Vector3 val4 = ((Component)sender).transform.position - ((Component)val).transform.position; Vector3 normalized = ((Vector3)(ref val4)).normalized; val.data.healthHandler.TakeForce(Vector2.op_Implicit(normalized * 5000f), (ForceMode2D)1, false, false, 0f); } } else { val3.SetPosition(1, ((Component)sender).transform.position + sender.data.aimDirection * 15f); } Object.Destroy((Object)(object)val2, 0.25f); } private static Player FindClosestOpponent(Player player, float maxRange = 100f) { //IL_006f: 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_009b: 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_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_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) 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Shadow Summon [H]"; val.amount = "Yes"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Summon Cooldown"; val2.amount = "10s"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: 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_0163: 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) 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); ((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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[1]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Damage"; val.amount = "+50%"; val.simepleAmount = (SimpleAmount)0; array[0] = val; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) ((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(); val2.effect = val; val2.numberOfSpawns = 1; val2.normalOffset = 0f; val2.spawnOn = (SpawnOn)0; val2.spawnAsChild = false; ObjectsToSpawn val3 = val2; ObjectsToSpawn[] objectsToSpawn; if (gun.objectsToSpawn == null) { (objectsToSpawn = (ObjectsToSpawn[])(object)new ObjectsToSpawn[1])[0] = val3; } else { List list = new List(gun.objectsToSpawn); list.Add(val3); objectsToSpawn = list.ToArray(); } gun.objectsToSpawn = objectsToSpawn; 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 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_000a: 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_0037: Expected O, but got Unknown CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "HP"; val.amount = "+30%"; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Size"; val2.amount = "+10%"; array[1] = val2; return array; } 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 VoidStarsSpinner : MonoBehaviour { private void Update() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.Rotate(Vector3.forward, 30f * Time.deltaTime); } } 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 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_000a: 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_0037: Expected O, but got Unknown CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "HP"; val.amount = "+20%"; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Reload Speed"; val2.amount = "+20%"; array[1] = val2; return array; } 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 YutaCopyBehaviour : MonoBehaviour { private Player player; private float cooldownTimer; public CardInfo copiedCardInfo; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { RadialMenuManager.IsMenuEnabled = true; JJKCooldownManager.instance.RegisterAbility("[T] Rika Copy", () => ((Object)(object)copiedCardInfo != (Object)null) ? ("[" + ((Object)((Component)copiedCardInfo).gameObject).name.Replace("JJK_Tech_", "").Replace("JJK_Tool_", "").Replace("(Clone)", "") .Trim() + "] PASSIVE") : ((cooldownTimer <= 0f) ? "READY" : $"{cooldownTimer:F1}s")); } GameModeManager.AddHook("PointStart", (Func)OnPointStart); GameModeManager.AddHook("PointEnd", (Func)OnPointEnd); } private IEnumerator OnPointStart(IGameModeHandler gm) { cooldownTimer = 0f; yield break; } private IEnumerator OnPointEnd(IGameModeHandler gm) { if (!((Object)(object)copiedCardInfo != (Object)null)) { yield break; } try { int num = player.data.currentCards.LastIndexOf(copiedCardInfo); if (num != -1) { Cards.instance.RemoveCardFromPlayer(player, num); } else { Cards.instance.RemoveCardFromPlayer(player, copiedCardInfo, (SelectionType)2); } } catch (Exception ex) { Debug.Log((object)("[JJKCards] Failed to remove copied card: " + ex.Message)); } copiedCardInfo = null; } private void OnDestroy() { GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); GameModeManager.RemoveHook("PointEnd", (Func)OnPointEnd); if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { RadialMenuManager.IsMenuEnabled = false; if ((Object)(object)JJKCooldownManager.instance != (Object)null) { JJKCooldownManager.instance.UnregisterAbility("[T] Rika Copy"); } } } private void Update() { //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_014c: 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) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || player.data.dead) { return; } 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.data.view == (Object)null || player.data.view.IsMine) && JJKCardHelper.IsKeyPressed(player, (KeyCode)116)) { if (cooldownTimer <= 0f && (Object)(object)copiedCardInfo == (Object)null) { ExecuteCopy(); } else if ((Object)(object)copiedCardInfo != (Object)null) { JJKCardHelper.CreateFloatingText("Already copied a card!", ((Component)player).transform.position, Color.yellow); } else { JJKCardHelper.CreateFloatingText($"Copy Cooldown: {Mathf.CeilToInt(cooldownTimer)}s", ((Component)player).transform.position, Color.red); } } } private void ExecuteCopy() { //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_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_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Invalid comparison between Unknown and I4 //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Expected I4, but got Unknown //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Invalid comparison between Unknown and I4 Player val = FindClosestOpponent(player); if ((Object)(object)val == (Object)null) { JJKCardHelper.CreateFloatingText("No opponent found to copy!", ((Component)player).transform.position, Color.yellow); cooldownTimer = 2f; return; } List list = new List(); foreach (CardInfo currentCard in val.data.currentCards) { if ((Object)(object)currentCard != (Object)null && !((Object)((Component)currentCard).gameObject).name.Contains("SorcererSelection") && !((Object)((Component)currentCard).gameObject).name.Contains("Domain") && !((Object)((Component)currentCard).gameObject).name.Contains("Yuta_Rika")) { list.Add(currentCard); } } if (list.Count == 0) { JJKCardHelper.CreateFloatingText("Opponent has no valid cards!", ((Component)player).transform.position, Color.yellow); cooldownTimer = 2f; return; } int num = -1; foreach (CardInfo item in list) { if ((int)item.rarity > num) { num = (int)item.rarity; } } List list2 = new List(); foreach (CardInfo item2 in list) { if ((int)item2.rarity == num) { list2.Add(item2); } } CardInfo val2 = list2[Random.Range(0, list2.Count)]; NetworkingManager.RaiseEvent("JJKCardsMod_YutaCopy_Execute", new object[2] { player.playerID, ((Object)((Component)val2).gameObject).name }); cooldownTimer = 15f; } public static void OnYutaCopyEvent(object[] data) { //IL_0193: 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) if (data == null || data.Length < 2) { return; } int num = Convert.ToInt32(data[0]); string cardName = (string)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)) { return; } YutaCopyBehaviour component = ((Component)val).GetComponent(); if (!((Object)(object)component != (Object)null)) { return; } CardInfo val2 = ClassesManagerHelper.GetCardByName(cardName); if ((Object)(object)val2 == (Object)null) { val2 = ((IEnumerable)CardChoice.instance.cards).FirstOrDefault((Func)((CardInfo c) => ((Object)((Component)c).gameObject).name == cardName || ((Object)((Component)c).gameObject).name.Replace("(Clone)", "").Trim() == cardName)); } if ((Object)(object)val2 != (Object)null) { component.copiedCardInfo = val2; string text = ((Object)((Component)val2).gameObject).name.Replace("JJK_Tech_", "").Replace("JJK_Tool_", "").Replace("(Clone)", "") .Trim(); JJKCardHelper.CreateFloatingText("RIKA COPIED: " + text.ToUpper() + "!", ((Component)val).transform.position, new Color(0.8f, 0.2f, 0.8f)); Cards.instance.AddCardToPlayer(val, val2, false, "", 0f, 0f, true); } } private Player FindClosestOpponent(Player player, float maxRange = 100f) { //IL_006f: 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_009b: 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_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_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) 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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_002f: 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_003e: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) CardInfoStat[] array = (CardInfoStat[])(object)new CardInfoStat[2]; CardInfoStat val = new CardInfoStat(); val.positive = true; val.stat = "Copy Cursed Technique [T]"; val.amount = "Yes"; val.simepleAmount = (SimpleAmount)0; array[0] = val; CardInfoStat val2 = new CardInfoStat(); val2.positive = true; val2.stat = "Copy Cooldown"; val2.amount = "10s"; val2.simepleAmount = (SimpleAmount)0; array[1] = val2; return array; } public override string GetModName() { return "JJK Cursed Techniques"; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)3; } protected override GameObject GetCardArt() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_007e: 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_016e: 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_00d9: 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) 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); ((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 YutaDomainBehaviour : MonoBehaviour { private Player player; private float domainCooldown; public bool IsDomainActive; private void Awake() { player = ((Component)this).GetComponent(); } private void Start() { if ((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) { JJKCooldownManager.instance.RegisterAbility("[Y] Mutual Love", () => (domainCooldown <= 0f) ? "READY" : $"{domainCooldown:F1}s"); } } private void OnDestroy() { if (((Object)(object)player.data.view == (Object)null || 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 (((Object)(object)player.data.view == (Object)null || player.data.view.IsMine) && !player.data.dead && JJKCardHelper.IsKeyPressed(player, (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) { YutaDomainBehaviour component = ((Component)player).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.ActivateDomainLocal(); } break; } } } } } namespace JJKCardsMod { public static class ClassesManagerHelper { public static void RegisterJJK() { try { object m = null; MethodInfo r2 = null; MethodInfo r3 = null; Assembly assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((Assembly a) => a.GetName().Name == "ClassesManagerReborn"); Type type = ((assembly != null) ? assembly.GetType("ClassesManagerReborn.ClassesManager") : null); if (type == null) { return; } FieldInfo field = type.GetField("instance", BindingFlags.Static | BindingFlags.Public); m = ((field != null) ? field.GetValue(null) : null); MethodInfo method = type.GetMethod("RegisterMenu"); if (method != null) { method.Invoke(parameters: new object[2] { "Jujutsu Kaisen", null }, obj: m); } 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(); r2 = source.FirstOrDefault((MethodInfo mt) => mt.GetParameters().Length == 2); r3 = source.FirstOrDefault((MethodInfo mt) => mt.GetParameters().Length == 3); Action action = delegate(CardInfo c, object v) { if ((Object)(object)c != (Object)null) { MethodInfo methodInfo = r2; if (!(methodInfo == null)) { methodInfo.Invoke(m, new object[2] { c, v }); } } }; Action action2 = delegate(CardInfo c, object v, CardInfo p) { if ((Object)(object)c != (Object)null && (Object)(object)p != (Object)null) { MethodInfo methodInfo = r3; if (!(methodInfo == null)) { methodInfo.Invoke(m, new object[3] { c, v, p }); } } }; CardInfo cardByName = GetCardByName("JJK_Char_Gojo"); CardInfo cardByName2 = GetCardByName("JJK_Char_Sukuna"); CardInfo cardByName3 = GetCardByName("JJK_Char_Megumi"); CardInfo cardByName4 = GetCardByName("JJK_Char_Yuta"); CardInfo cardByName5 = GetCardByName("JJK_Char_Todo"); CardInfo cardByName6 = GetCardByName("JJK_Char_Nanami"); CardInfo cardByName7 = GetCardByName("JJK_Char_Choso"); CardInfo cardByName8 = GetCardByName("JJK_Char_Mahito"); CardInfo cardByName9 = GetCardByName("JJK_Char_Yuji"); CardInfo cardByName10 = GetCardByName("JJK_Char_Toji"); action(cardByName, arg); action2(GetCardByName("JJK_Tech_Gojo_Blue"), arg2, cardByName); action2(GetCardByName("JJK_Tech_Gojo_Red"), arg2, cardByName); action2(GetCardByName("JJK_Tech_Gojo_Purple"), arg2, cardByName); action2(GetCardByName("JJK_Tech_Gojo_Infinity"), arg2, cardByName); action2(GetCardByName("JJK_Tech_Gojo_Void"), arg2, cardByName); action(cardByName2, arg); action2(GetCardByName("JJK_Tech_Sukuna_Dismantle"), arg2, cardByName2); action2(GetCardByName("JJK_Tech_Sukuna_Cleave"), arg2, cardByName2); action2(GetCardByName("JJK_Tech_Sukuna_DivineFlame"), arg2, cardByName2); action2(GetCardByName("JJK_Tech_Sukuna_Shrine"), arg2, cardByName2); action2(GetCardByName("JJK_Tech_Sukuna_RCT"), arg2, cardByName2); action(cardByName3, arg); action2(GetCardByName("JJK_Tech_Megumi_Nue"), arg2, cardByName3); action2(GetCardByName("JJK_Tech_Megumi_DivineDog"), arg2, cardByName3); action2(GetCardByName("JJK_Tech_Megumi_Domain"), arg2, cardByName3); action2(GetCardByName("JJK_Tech_Megumi_Mahoraga"), arg2, cardByName3); action2(GetCardByName("JJK_Tech_Megumi_MahoragaFull"), arg2, cardByName3); action(cardByName4, arg); action2(GetCardByName("JJK_Tech_Yuta_Copy"), arg2, cardByName4); action2(GetCardByName("JJK_Tech_Yuta_Rika"), arg2, cardByName4); action2(GetCardByName("JJK_Tech_Yuta_Speech"), arg2, cardByName4); action2(GetCardByName("JJK_Tech_Yuta_Beam"), arg2, cardByName4); action2(GetCardByName("JJK_Tech_Yuta_Domain"), arg2, cardByName4); action(cardByName7, arg); action2(GetCardByName("JJK_Tech_Choso_PiercingBlood"), arg2, cardByName7); action2(GetCardByName("JJK_Tech_Choso_Supernova"), arg2, cardByName7); action2(GetCardByName("JJK_Tech_Choso_RedScale"), arg2, cardByName7); action2(GetCardByName("JJK_Tech_Choso_Meteorite"), arg2, cardByName7); action2(GetCardByName("JJK_Tech_Choso_BloodEdge"), arg2, cardByName7); action(cardByName6, arg); action2(GetCardByName("JJK_Tech_Nanami_Ratio"), arg2, cardByName6); action2(GetCardByName("JJK_Tech_Nanami_Collapse"), arg2, cardByName6); action2(GetCardByName("JJK_Tech_Nanami_Overtime"), arg2, cardByName6); action2(GetCardByName("JJK_Tech_Nanami_DullKnife"), arg2, cardByName6); action2(GetCardByName("JJK_Tech_Nanami_BlackFlash"), arg2, cardByName6); action(cardByName5, arg); action2(GetCardByName("JJK_Tech_Todo_Boogie"), arg2, cardByName5); action2(GetCardByName("JJK_Tech_Todo_IQ"), arg2, cardByName5); action2(GetCardByName("JJK_Tech_Todo_BlackFlash"), arg2, cardByName5); action(cardByName8, arg); action2(GetCardByName("JJK_Tech_Mahito_IdleTrans"), arg2, cardByName8); action(cardByName9, arg); action2(GetCardByName("JJK_Tech_Yuji_BasicFists"), arg2, cardByName9); action2(GetCardByName("JJK_Tech_Yuji_BlackFlash"), arg2, cardByName9); action2(GetCardByName("JJK_Tech_Yuji_DivergentFist"), arg2, cardByName9); action(cardByName10, arg); action2(GetCardByName("JJK_Tool_Toji_InvertedSpear"), arg2, cardByName10); action2(GetCardByName("JJK_Tool_Toji_SplitSoul"), arg2, cardByName10); action2(GetCardByName("JJK_Tool_Toji_PlayfulCloud"), arg2, cardByName10); } catch { } } [CompilerGenerated] internal static CardInfo GetCardByName(string n) { return ((IEnumerable)CardChoice.instance.cards).FirstOrDefault((Func)((CardInfo cc) => ((Object)((Component)cc).gameObject).name.Replace("(Clone)", "").Trim() == n)); } } public class DomainManager : MonoBehaviour { private const float ClashDuration = 3f; 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 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_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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 //IL_0082: 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_00ae: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_014b: 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_0192: 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_01ac: 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_01c3: Expected O, but got Unknown //IL_01f7: 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_022e: 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_0248: 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_025f: Expected O, but got Unknown //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("DomainClashCanvas"); val.transform.SetParent(((Component)this).transform); Canvas val2 = val.AddComponent(); val2.renderMode = (RenderMode)0; val2.sortingOrder = 100; val.AddComponent().uiScaleMode = (ScaleMode)1; clashUIContainer = new GameObject("ClashContainer"); clashUIContainer.transform.SetParent(val.transform, false); RectTransform val3 = clashUIContainer.AddComponent(); val3.anchorMin = new Vector2(0.5f, 1f); val3.anchorMax = new Vector2(0.5f, 1f); val3.pivot = new Vector2(0.5f, 1f); val3.anchoredPosition = new Vector2(0f, -50f); val3.sizeDelta = new Vector2(800f, 100f); GameObject val4 = new GameObject("ClashText"); val4.transform.SetParent(clashUIContainer.transform, false); clashText = val4.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 = val4.GetComponent(); component.anchorMin = new Vector2(0f, 0.5f); component.anchorMax = new Vector2(1f, 1f); component.offsetMin = Vector2.zero; component.offsetMax = Vector2.zero; GameObject val5 = new GameObject("SliderBg"); val5.transform.SetParent(clashUIContainer.transform, false); ((Graphic)val5.AddComponent()).color = new Color(0.1f, 0.1f, 0.1f, 0.9f); RectTransform component2 = val5.GetComponent(); component2.anchorMin = new Vector2(0f, 0f); component2.anchorMax = new Vector2(1f, 0.4f); component2.offsetMin = Vector2.zero; component2.offsetMax = Vector2.zero; GameObject val6 = new GameObject("SliderFill"); val6.transform.SetParent(val5.transform, false); ((Graphic)val6.AddComponent()).color = Color.cyan; RectTransform component3 = val6.GetComponent(); component3.anchorMin = new Vector2(0f, 0f); component3.anchorMax = new Vector2(0.5f, 1f); component3.offsetMin = Vector2.zero; component3.offsetMax = Vector2.zero; tugOfWarFill = val6.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) { ActiveDomainCaster = newCaster; ActiveWinCallback = winCallback; return true; } if (IsClashActive) { return false; } ((MonoBehaviour)this).StartCoroutine(ClashRoutine(ActiveDomainCaster, newCaster, ActiveWinCallback, winCallback)); return false; } 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 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_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_003d: 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_00cc: 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_013b: 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(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 ((Object)(object)instance == (Object)null || !(instance.cards?.Length > 0)) { return; } CardInfo val; if ((Object)(object)(val = ((IEnumerable)CardChoice.instance.cards).FirstOrDefault((Func)((CardInfo c) => (Object)(object)c != (Object)null && ((Object)((Component)c).gameObject).name.Contains("Block")))) == (Object)null && (Object)(object)(val = ((IEnumerable)CardChoice.instance.cards).FirstOrDefault((Func)((CardInfo c) => (Object)(object)c != (Object)null && ((Object)((Component)c).gameObject).name.Contains("Health")))) == (Object)null) { val = ((IEnumerable)CardChoice.instance.cards).FirstOrDefault((Func)((CardInfo c) => (Object)(object)c != (Object)null && (c.categories == null || c.categories.Length == 0))) ?? CardChoice.instance.cards[0]; } __r = val; } } } 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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown if ((Object)(object)_instance == (Object)null) { GameObject val = new GameObject("JJKAnimator_Manager"); _instance = val.AddComponent(); Object.DontDestroyOnLoad((Object)(object)val); } return _instance; } } public static Material CachedSpriteMaterial { get { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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) //IL_00a7: 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) 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); ref Color reference = ref array[i * num + j]; reference = 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_001c: 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_0028: 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_001c: 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_001c: 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_0028: 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_001c: 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_001c: 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_0028: 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_001c: 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_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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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) 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 num2 = 1f - Mathf.Pow(1f - num, 4f); onUpdate?.Invoke(num2); 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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) GameObject fromPool = GetFromPool(_projectilePool, delegate { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GameObject val2 = new GameObject("JJK_Projectile"); val2.transform.SetParent(((Component)Instance).transform); SpriteRenderer val3 = val2.AddComponent(); val3.sprite = CachedCircleSprite; ((Renderer)val3).material = CachedSpriteMaterial; Rigidbody2D val4 = val2.AddComponent(); val4.isKinematic = false; val4.gravityScale = 0f; val4.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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) GameObject fromPool = GetFromPool(_shockwavePool, delegate { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GameObject val = new GameObject("JJK_Shockwave"); val.transform.SetParent(((Component)Instance).transform); LineRenderer val2 = val.AddComponent(); ((Renderer)val2).material = CachedSpriteMaterial; val2.useWorldSpace = false; val2.loop = true; val2.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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) 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 color2 = color; color2.a = Mathf.Lerp(color.a, 0f, num); lr.startColor = color2; lr.endColor = color2; 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_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_0078: 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_0098: 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_00b2: 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_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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_010e: 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_0119: 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_012c: 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_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_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_0184: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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_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_005f: 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) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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) GameObject fromPool = GetFromPool(_sparksPool, delegate { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //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_0079: 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_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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_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_010f: Unknown result type (might be due to invalid IL or missing references) 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_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) _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); _onHit = null; _pool.Enqueue(((Component)this).gameObject); } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } } } namespace JJKCardsMod { 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_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown 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, "*.*"); try { string[] array = files; foreach (string file in array) { if (!file.EndsWith(".wav") && !file.EndsWith(".ogg") && !file.EndsWith(".mp3")) { continue; } AudioType audioType = (AudioType)0; if (file.EndsWith(".wav")) { audioType = (AudioType)20; } else if (file.EndsWith(".ogg")) { audioType = (AudioType)14; } else if (file.EndsWith(".mp3")) { audioType = (AudioType)13; } string text = "file:///" + file.Replace("\\", "/"); UnityWebRequest www = UnityWebRequestMultimedia.GetAudioClip(text, audioType); try { yield return www.SendWebRequest(); if (www.isNetworkError || www.isHttpError) { Debug.LogError("[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("[JJKCardsMod] Successfully loaded audio: " + text2); } finally { ((IDisposable)www)?.Dispose(); } } } finally { } } public void PlaySound(string soundName, Vector3 position, float volume = 1f, float duration = -1f) { //IL_002c: 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)); } } } 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 bool IsKeyPressed(Player p, KeyCode key) { //IL_0001: 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_0043: 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_0064: Expected I4, but got Unknown //IL_0064: 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_0091: Expected I4, but got Unknown if (Input.GetKeyDown(key)) { return true; } if (p.data.playerActions != null && ((PlayerActionSet)p.data.playerActions).Device != null) { switch (key - 99) { default: switch (key - 113) { case 5: return ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.Action3).WasPressed || ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.DPadLeft).WasPressed; case 7: return ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.Action4).WasPressed || ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.RightBumper).WasPressed; case 8: return ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.LeftTrigger).WasPressed || (((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.LeftBumper).WasPressed && ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.RightBumper).WasPressed); case 3: return ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.DPadUp).WasPressed; case 0: return ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.Action3).WasPressed || ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.LeftBumper).WasPressed; } break; case 3: return ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.RightBumper).WasPressed || ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.DPadUp).WasPressed; case 4: return ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.LeftBumper).WasPressed || ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.DPadRight).WasPressed; case 0: return ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.Action4).WasPressed || ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.DPadDown).WasPressed; case 5: return ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.DPadLeft).WasPressed; case 2: return ((OneAxisInputControl)((PlayerActionSet)p.data.playerActions).Device.Action3).WasPressed; case 1: break; } } return false; } public static void SetUniqueCategory(CardInfo c) { //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Expected O, but got Unknown //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Expected O, but got Unknown ConfigEntry disablePackLocking = JJKCardsPlugin.DisablePackLocking; if (disablePackLocking != null && disablePackLocking.Value) { return; } try { Assembly assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((Assembly a) => a.GetName().Name == "CardChoiceSpawnUniqueCardPatch"); Type type = ((assembly != null) ? assembly.GetType("CardChoiceSpawnUniqueCardPatch.CustomCategories.CustomCardCategories") : null); object obj; if (type == null) { obj = null; } else { FieldInfo field = type.GetField("instance", BindingFlags.Static | BindingFlags.Public); obj = ((field != null) ? field.GetValue(null) : null); } object obj2 = obj; if (obj2 == null) { return; } MethodInfo method = type.GetMethod("CardCategory", new Type[1] { typeof(string) }); if ((Object)(object)J_T == (Object)null) { J_T = (CardCategory)((method != null) ? method.Invoke(obj2, new object[1] { "JJK_Technique" }) : null); } if ((Object)(object)J_C == (Object)null) { J_C = (CardCategory)((method != null) ? method.Invoke(obj2, new object[1] { "JJK_Character_Card" }) : null); } CardCategory val = (CardCategory)((method != null) ? method.Invoke(obj2, new object[1] { Res(((Object)((Component)c).gameObject).name) }) : null); List list = new List(); if (c.categories != null) { list.AddRange(c.categories); } if (((Object)((Component)c).gameObject).name.StartsWith("JJK_Char_") || ((Object)((Component)c).gameObject).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) { try { ConfigEntry disablePackLocking = JJKCardsPlugin.DisablePackLocking; if ((disablePackLocking == null || !disablePackLocking.Value) && (Object)(object)J_T != (Object)null && (Object)(object)p != (Object)null && (Object)(object)p.data != (Object)null && (Object)(object)p.data.stats != (Object)null) { CharacterStatModifiersAdditionalData additionalData = CharacterStatModifiersExtension.GetAdditionalData(p.data.stats); if ((!((Object)(object)J_C != (Object)null) || !additionalData.blacklistedCategories.Contains(J_C)) && !additionalData.blacklistedCategories.Contains(J_T)) { additionalData.blacklistedCategories.Add(J_T); } } } catch (Exception ex) { Debug.LogError((object)("[JJKCardsMod] Error in ApplyInitialBlacklists: " + ex.ToString())); } } public static void UnlockCharacter(Player p, string t) { //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Expected O, but got Unknown //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028f: 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[10] { "JJK_Gojo_Pack", "JJK_Sukuna_Pack", "JJK_Todo_Pack", "JJK_Nanami_Pack", "JJK_Choso_Pack", "JJK_Megumi_Pack", "JJK_Yuta_Pack", "JJK_Mahito_Pack", "JJK_Yuji_Pack", "JJK_Toji_Pack" }; Assembly assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((Assembly a) => a.GetName().Name == "CardChoiceSpawnUniqueCardPatch"); Type type = ((assembly != null) ? assembly.GetType("CardChoiceSpawnUniqueCardPatch.CustomCategories.CustomCardCategories") : null); object obj; if (type == null) { obj = null; } else { FieldInfo field = type.GetField("instance", BindingFlags.Static | BindingFlags.Public); obj = ((field != null) ? field.GetValue(null) : null); } object obj2 = obj; MethodInfo methodInfo = ((type != null) ? type.GetMethod("CardCategory", new Type[1] { typeof(string) }) : null); string[] array2 = array; foreach (string text in array2) { if (text != "JJK_" + t + "_Pack") { CardCategory val = (CardCategory)((methodInfo != null) ? methodInfo.Invoke(obj2, new object[1] { text }) : null); if ((Object)(object)val != (Object)null) { additionalData.blacklistedCategories.Add(val); } } } if (t == "Toji") { CardCategory val2 = (CardCategory)((methodInfo != null) ? methodInfo.Invoke(obj2, new object[1] { "JJK_General_Pack" }) : null); if ((Object)(object)val2 != (Object)null) { additionalData.blacklistedCategories.Add(val2); } } } 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"; } if (n.Contains("_Mahito")) { return "JJK_Mahito_Pack"; } if (n.Contains("_Yuji")) { return "JJK_Yuji_Pack"; } if (n.Contains("_Toji")) { return "JJK_Toji_Pack"; } return "JJK_General_Pack"; } public static void CreateFloatingText(string t, Vector3 w, Color c) { //IL_0106: 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_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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown 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 val2 = val.AddComponent(); val2.fontSize = 42; val2.characterSize = 0.08f; val2.anchor = (TextAnchor)4; val2.alignment = (TextAlignment)1; MeshRenderer val3 = val.GetComponent(); if ((Object)(object)val3 == (Object)null) { val3 = val.AddComponent(); } if ((Object)(object)mat == (Object)null) { mat = new Material(Shader.Find("GUI/Text Shader")); ((Object)mat).hideFlags = (HideFlags)61; } ((Renderer)val3).sharedMaterial = mat; ((Renderer)val3).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; } FloatingTextBehaviour component2 = val.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { component2.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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_00b7: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_0106: 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 val3 = val2.AddComponent(); val3.sprite = sprite; ((Renderer)val3).sortingOrder = 5; Object.DontDestroyOnLoad((Object)(object)val2); val2.SetActive(false); cache[a] = val2; return Object.Instantiate(val2); } } catch { } return new GameObject("Missing"); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [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.*/)] public class JJKCardsPlugin : BaseUnityPlugin { [CompilerGenerated] private static class CompilerGeneratedEvents { public static PhotonEvent AutoGenerated_0_OnBoogieWoogieSwapEvent; public static PhotonEvent AutoGenerated_1_OnInfiniteVoidEvent; public static PhotonEvent AutoGenerated_2_OnFistHitEvent; public static PhotonEvent AutoGenerated_3_OnFistAnimationEvent; public static PhotonEvent AutoGenerated_4_OnMalevolentShrineEvent; public static PhotonEvent AutoGenerated_5_OnTenShadowsEvent; public static PhotonEvent AutoGenerated_6_OnBlueEvent; public static PhotonEvent AutoGenerated_7_OnRedEvent; public static PhotonEvent AutoGenerated_8_OnDismantleAuraEvent; public static PhotonEvent AutoGenerated_9_OnHollowPurpleEvent; public static PhotonEvent AutoGenerated_10_OnPiercingBloodEvent; public static PhotonEvent AutoGenerated_11_OnSimpleDomainEvent; public static PhotonEvent AutoGenerated_12_OnCleaveEvent; public static PhotonEvent AutoGenerated_13_OnDivineFlameEvent; public static PhotonEvent AutoGenerated_14_OnChimeraShadowEvent; public static PhotonEvent AutoGenerated_15_OnDivineDogEvent; public static PhotonEvent AutoGenerated_16_OnRikaEvent; public static PhotonEvent AutoGenerated_17_OnSpeechEvent; public static PhotonEvent AutoGenerated_18_OnBeamEvent; public static PhotonEvent AutoGenerated_19_OnDomainEvent; public static PhotonEvent AutoGenerated_20_OnCollapseEvent; public static PhotonEvent AutoGenerated_21_OnSupernovaEvent; public static PhotonEvent AutoGenerated_22_OnRedScaleEvent; public static PhotonEvent AutoGenerated_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() { DisablePackLocking = ((BaseUnityPlugin)this).Config.Bind("JJKCardsMod", "DisablePackLocking", false, "Set to true to disable the character locking system. (Allows drafting techniques from any character without picking them first)."); CustomCardRarities = ((BaseUnityPlugin)this).Config.Bind("Rarities", "CustomCardRarities", "", "Custom rarities."); ParseRarities(); } 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_0024: 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_0087: Expected O, but got Unknown //IL_009a: 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(); }); GameModeManager.AddHook("PlayerPickStart", (Func)OnPickStart); GameObject val = new GameObject("JJKCooldownManager"); val.AddComponent(); Object.DontDestroyOnLoad((Object)(object)val); new GameObject("JJKAudioManager").AddComponent(); } private IEnumerator OnPickStart(IGameModeHandler gm) { foreach (Player player in PlayerManager.instance.players) { JJKCardHelper.ApplyInitialBlacklists(player); } yield break; } private void RegisterNetworkingEvents() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //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_002d: Expected O, but got Unknown //IL_002e: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_007b: Expected O, but got Unknown //IL_00a7: 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: Expected O, but got Unknown //IL_00b4: Expected O, but got Unknown //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_00ed: Expected O, but got Unknown //IL_00ef: Expected O, but got Unknown //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_0128: Expected O, but got Unknown //IL_012a: Expected O, but got Unknown //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_0163: Expected O, but got Unknown //IL_0165: Expected O, but got Unknown //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_019e: Expected O, but got Unknown //IL_01a0: Expected O, but got Unknown //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Expected O, but got Unknown //IL_01db: Expected O, but got Unknown //IL_0209: 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_0214: Expected O, but got Unknown //IL_0216: Expected O, but got Unknown //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Expected O, but got Unknown //IL_0251: Expected O, but got Unknown //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Expected O, but got Unknown //IL_028c: Expected O, but got Unknown //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Expected O, but got Unknown //IL_02c7: Expected O, but got Unknown //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_0300: Expected O, but got Unknown //IL_0302: Expected O, but got Unknown //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Expected O, but got Unknown //IL_033d: Expected O, but got Unknown //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Expected O, but got Unknown //IL_0378: Expected O, but got Unknown //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Expected O, but got Unknown //IL_03b3: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Expected O, but got Unknown //IL_03ee: Expected O, but got Unknown //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Expected O, but got Unknown //IL_0429: Expected O, but got Unknown //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Expected O, but got Unknown //IL_0464: Expected O, but got Unknown //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Expected O, but got Unknown //IL_049f: Expected O, but got Unknown //IL_04cd: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Expected O, but got Unknown //IL_04da: Expected O, but got Unknown //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_050d: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Expected O, but got Unknown //IL_0515: Expected O, but got Unknown //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Expected O, but got Unknown //IL_0550: Expected O, but got Unknown //IL_057e: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Expected O, but got Unknown //IL_058b: Expected O, but got Unknown string text = "JJKCardsMod_BoogieWoogie_Swap"; PhotonEvent val; if ((val = CompilerGeneratedEvents.AutoGenerated_0_OnBoogieWoogieSwapEvent) == null) { PhotonEvent val2 = BoogieWoogieBehaviour.OnBoogieWoogieSwapEvent; CompilerGeneratedEvents.AutoGenerated_0_OnBoogieWoogieSwapEvent = val2; val = val2; } NetworkingManager.RegisterEvent(text, val); NetworkingManager.RegisterEvent("JJKCardsMod_YutaCopy_Execute", new PhotonEvent(YutaCopyBehaviour.OnYutaCopyEvent)); string text2 = "JJKCardsMod_InfiniteVoid_Activate"; PhotonEvent val3; if ((val3 = CompilerGeneratedEvents.AutoGenerated_1_OnInfiniteVoidEvent) == null) { PhotonEvent val4 = InfiniteVoidBehaviour.OnInfiniteVoidEvent; CompilerGeneratedEvents.AutoGenerated_1_OnInfiniteVoidEvent = val4; val3 = val4; } NetworkingManager.RegisterEvent(text2, val3); string text3 = "JJKCardsMod_FistHit"; PhotonEvent val5; if ((val5 = CompilerGeneratedEvents.AutoGenerated_2_OnFistHitEvent) == null) { PhotonEvent val6 = CursedFistsBehaviour.OnFistHitEvent; CompilerGeneratedEvents.AutoGenerated_2_OnFistHitEvent = val6; val5 = val6; } NetworkingManager.RegisterEvent(text3, val5); string text4 = "JJKCardsMod_FistAnimation"; PhotonEvent val7; if ((val7 = CompilerGeneratedEvents.AutoGenerated_3_OnFistAnimationEvent) == null) { PhotonEvent val8 = CursedFistsBehaviour.OnFistAnimationEvent; CompilerGeneratedEvents.AutoGenerated_3_OnFistAnimationEvent = val8; val7 = val8; } NetworkingManager.RegisterEvent(text4, val7); string text5 = "JJKCardsMod_MalevolentShrine_Activate"; PhotonEvent val9; if ((val9 = CompilerGeneratedEvents.AutoGenerated_4_OnMalevolentShrineEvent) == null) { PhotonEvent val10 = MalevolentShrineBehaviour.OnMalevolentShrineEvent; CompilerGeneratedEvents.AutoGenerated_4_OnMalevolentShrineEvent = val10; val9 = val10; } NetworkingManager.RegisterEvent(text5, val9); string text6 = "JJKCardsMod_TenShadows_Activate"; PhotonEvent val11; if ((val11 = CompilerGeneratedEvents.AutoGenerated_5_OnTenShadowsEvent) == null) { PhotonEvent val12 = TenShadowsBehaviour.OnTenShadowsEvent; CompilerGeneratedEvents.AutoGenerated_5_OnTenShadowsEvent = val12; val11 = val12; } NetworkingManager.RegisterEvent(text6, val11); string text7 = "JJKCardsMod_Blue"; PhotonEvent val13; if ((val13 = CompilerGeneratedEvents.AutoGenerated_6_OnBlueEvent) == null) { PhotonEvent val14 = BlueBehaviour.OnBlueEvent; CompilerGeneratedEvents.AutoGenerated_6_OnBlueEvent = val14; val13 = val14; } NetworkingManager.RegisterEvent(text7, val13); string text8 = "JJKCardsMod_Red"; PhotonEvent val15; if ((val15 = CompilerGeneratedEvents.AutoGenerated_7_OnRedEvent) == null) { PhotonEvent val16 = RedBehaviour.OnRedEvent; CompilerGeneratedEvents.AutoGenerated_7_OnRedEvent = val16; val15 = val16; } NetworkingManager.RegisterEvent(text8, val15); string text9 = "JJKCardsMod_DismantleAura"; PhotonEvent val17; if ((val17 = CompilerGeneratedEvents.AutoGenerated_8_OnDismantleAuraEvent) == null) { PhotonEvent val18 = SukunaTechniqueBehaviour.OnDismantleAuraEvent; CompilerGeneratedEvents.AutoGenerated_8_OnDismantleAuraEvent = val18; val17 = val18; } NetworkingManager.RegisterEvent(text9, val17); string text10 = "JJKCardsMod_HollowPurple_Activate"; PhotonEvent val19; if ((val19 = CompilerGeneratedEvents.AutoGenerated_9_OnHollowPurpleEvent) == null) { PhotonEvent val20 = HollowPurpleUltimate.OnHollowPurpleEvent; CompilerGeneratedEvents.AutoGenerated_9_OnHollowPurpleEvent = val20; val19 = val20; } NetworkingManager.RegisterEvent(text10, val19); string text11 = "JJKCardsMod_PiercingBlood"; PhotonEvent val21; if ((val21 = CompilerGeneratedEvents.AutoGenerated_10_OnPiercingBloodEvent) == null) { PhotonEvent val22 = PiercingBloodBehaviour.OnPiercingBloodEvent; CompilerGeneratedEvents.AutoGenerated_10_OnPiercingBloodEvent = val22; val21 = val22; } NetworkingManager.RegisterEvent(text11, val21); string text12 = "JJKCardsMod_SimpleDomain_Activate"; PhotonEvent val23; if ((val23 = CompilerGeneratedEvents.AutoGenerated_11_OnSimpleDomainEvent) == null) { PhotonEvent val24 = SimpleDomainBehaviour.OnSimpleDomainEvent; CompilerGeneratedEvents.AutoGenerated_11_OnSimpleDomainEvent = val24; val23 = val24; } NetworkingManager.RegisterEvent(text12, val23); string text13 = "JJKCardsMod_Cleave"; PhotonEvent val25; if ((val25 = CompilerGeneratedEvents.AutoGenerated_12_OnCleaveEvent) == null) { PhotonEvent val26 = CleaveBehaviour.OnCleaveEvent; CompilerGeneratedEvents.AutoGenerated_12_OnCleaveEvent = val26; val25 = val26; } NetworkingManager.RegisterEvent(text13, val25); string text14 = "JJKCardsMod_DivineFlame"; PhotonEvent val27; if ((val27 = CompilerGeneratedEvents.AutoGenerated_13_OnDivineFlameEvent) == null) { PhotonEvent val28 = DivineFlameBehaviour.OnDivineFlameEvent; CompilerGeneratedEvents.AutoGenerated_13_OnDivineFlameEvent = val28; val27 = val28; } NetworkingManager.RegisterEvent(text14, val27); string text15 = "JJKCardsMod_ChimeraShadow_Activate"; PhotonEvent val29; if ((val29 = CompilerGeneratedEvents.AutoGenerated_14_OnChimeraShadowEvent) == null) { PhotonEvent val30 = ChimeraShadowGardenBehaviour.OnChimeraShadowEvent; CompilerGeneratedEvents.AutoGenerated_14_OnChimeraShadowEvent = val30; val29 = val30; } NetworkingManager.RegisterEvent(text15, val29); string text16 = "JJKCardsMod_DivineDog"; PhotonEvent val31; if ((val31 = CompilerGeneratedEvents.AutoGenerated_15_OnDivineDogEvent) == null) { PhotonEvent val32 = DivineDogBehaviour.OnDivineDogEvent; CompilerGeneratedEvents.AutoGenerated_15_OnDivineDogEvent = val32; val31 = val32; } NetworkingManager.RegisterEvent(text16, val31); string text17 = "JJKCardsMod_Rika"; PhotonEvent val33; if ((val33 = CompilerGeneratedEvents.AutoGenerated_16_OnRikaEvent) == null) { PhotonEvent val34 = RikaBehaviour.OnRikaEvent; CompilerGeneratedEvents.AutoGenerated_16_OnRikaEvent = val34; val33 = val34; } NetworkingManager.RegisterEvent(text17, val33); string text18 = "JJKCardsMod_Speech"; PhotonEvent val35; if ((val35 = CompilerGeneratedEvents.AutoGenerated_17_OnSpeechEvent) == null) { PhotonEvent val36 = CursedSpeechBehaviour.OnSpeechEvent; CompilerGeneratedEvents.AutoGenerated_17_OnSpeechEvent = val36; val35 = val36; } NetworkingManager.RegisterEvent(text18, val35); string text19 = "JJKCardsMod_LoveBeam"; PhotonEvent val37; if ((val37 = CompilerGeneratedEvents.AutoGenerated_18_OnBeamEvent) == null) { PhotonEvent val38 = PureLoveBeamBehaviour.OnBeamEvent; CompilerGeneratedEvents.AutoGenerated_18_OnBeamEvent = val38; val37 = val38; } NetworkingManager.RegisterEvent(text19, val37); string text20 = "JJKCardsMod_YutaDomain"; PhotonEvent val39; if ((val39 = CompilerGeneratedEvents.AutoGenerated_19_OnDomainEvent) == null) { PhotonEvent val40 = YutaDomainBehaviour.OnDomainEvent; CompilerGeneratedEvents.AutoGenerated_19_OnDomainEvent = val40; val39 = val40; } NetworkingManager.RegisterEvent(text20, val39); string text21 = "JJKCardsMod_Collapse"; PhotonEvent val41; if ((val41 = CompilerGeneratedEvents.AutoGenerated_20_OnCollapseEvent) == null) { PhotonEvent val42 = CollapseBehaviour.OnCollapseEvent; CompilerGeneratedEvents.AutoGenerated_20_OnCollapseEvent = val42; val41 = val42; } NetworkingManager.RegisterEvent(text21, val41); string text22 = "JJKCardsMod_Supernova"; PhotonEvent val43; if ((val43 = CompilerGeneratedEvents.AutoGenerated_21_OnSupernovaEvent) == null) { PhotonEvent val44 = SupernovaBehaviour.OnSupernovaEvent; CompilerGeneratedEvents.AutoGenerated_21_OnSupernovaEvent = val44; val43 = val44; } NetworkingManager.RegisterEvent(text22, val43); string text23 = "JJKCardsMod_RedScale"; PhotonEvent val45; if ((val45 = CompilerGeneratedEvents.AutoGenerated_22_OnRedScaleEvent) == null) { PhotonEvent val46 = FlowingRedScaleBehaviour.OnRedScaleEvent; CompilerGeneratedEvents.AutoGenerated_22_OnRedScaleEvent = val46; val45 = val46; } NetworkingManager.RegisterEvent(text23, val45); string text24 = "JJKCardsMod_SukunaRCT"; PhotonEvent val47; if ((val47 = CompilerGeneratedEvents.AutoGenerated_23_OnSukunaRCTEvent) == null) { PhotonEvent val48 = SukunaRCTBehaviour.OnSukunaRCTEvent; CompilerGeneratedEvents.AutoGenerated_23_OnSukunaRCTEvent = val48; val47 = val48; } NetworkingManager.RegisterEvent(text24, val47); } 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(); CustomCard.BuildCard(); CustomCard.BuildCard(); } } 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_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_00a7: 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_0096: 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_010d: 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_0127: 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_0166: 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; } } } public class JJKCustomDummy : MonoBehaviour { public float h = 5000f; public void TakeDamage(float d) { //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_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_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) 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 class JJKDevTools : MonoBehaviour { private void Update() { if (Input.GetKeyDown((KeyCode)285)) { Spawn(); } } private void Spawn() { //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_0075: 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_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Expected O, but got Unknown UnityAction val = null; Player val2 = ((IEnumerable)PlayerManager.instance.players).FirstOrDefault((Func)((Player pl) => pl.data.view.IsMine)); if ((Object)(object)val2 == (Object)null) { return; } GameObject val3 = GameObject.CreatePrimitive((PrimitiveType)1); val3.transform.position = ((Component)val2).transform.position + Vector3.up * 3f; Object.Destroy((Object)(object)val3.GetComponent()); val3.AddComponent(); Rigidbody2D val4 = val3.AddComponent(); val4.mass = 100f; val4.freezeRotation = true; val3.layer = ((LayerMask.NameToLayer("Player") == -1) ? 10 : LayerMask.NameToLayer("Player")); JJKCustomDummy cd = val3.AddComponent(); DamagableEvent obj = val3.AddComponent(); FieldInfo field = typeof(DamagableEvent).GetField("damageEvent"); if (field != null) { object value = field.GetValue(obj); 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 { object[] array = new object[1]; object[] array2 = array; if (val == null) { val = (UnityAction)delegate { cd.TakeDamage(55f); }; } array2[0] = val; method.Invoke(value, array); } } } val3.GetComponent().material.color = Color.red; JJKCardHelper.CreateFloatingText("DUMMY!", val3.transform.position, Color.green); } } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [CompilerGenerated] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int A_1) { Version = A_1; } } }