Decompiled source of JJK Cursed Techniques v1.5.4

JJKCardsMod.dll

Decompiled a month ago
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<Player>();
			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<YutaDomainBehaviour>() == (Object)null)
			{
				((Component)player).gameObject.AddComponent<YutaDomainBehaviour>();
			}
		}

		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<YutaDomainBehaviour>();
			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<SpriteRenderer>();
			((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<HollowPurpleCard.ProceduralPulsator>();
			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<JJKPlayerCharacter>();
			if ((Object)(object)jJKPlayerCharacter == (Object)null)
			{
				jJKPlayerCharacter = ((Component)player).gameObject.AddComponent<JJKPlayerCharacter>();
			}
			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<SpriteRenderer>();
			((Renderer)val2).sortingOrder = 5;
			Texture2D val3 = new Texture2D(64, 64);
			Color val4 = default(Color);
			((Color)(ref val4))..ctor(0.9f, 0.7f, 0.6f, 1f);
			Color val5 = default(Color);
			((Color)(ref val5))..ctor(0.2f, 0.2f, 0.2f, 0.8f);
			for (int i = 0; i < 64; i++)
			{
				for (int j = 0; j < 64; j++)
				{
					val3.SetPixel(j, i, (Vector2.Distance(new Vector2((float)j, (float)i), new Vector2(32f, 32f)) < 20f) ? val4 : val5);
				}
			}
			val3.Apply();
			val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, 64f, 64f), new Vector2(0.5f, 0.5f), 32f);
			return val;
		}

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			gun.attackSpeed = 0.5f;
			cardInfo.allowMultiple = false;
			((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_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<CursedFistsBehaviour>() == (Object)null)
			{
				((Component)player).gameObject.AddComponent<CursedFistsBehaviour>().player = player;
			}
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			CursedFistsBehaviour component = ((Component)player).gameObject.GetComponent<CursedFistsBehaviour>();
			if ((Object)(object)component != (Object)null)
			{
				Object.Destroy((Object)(object)component);
			}
		}
	}
	public class 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<SpriteRenderer>();
			((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<CursedFistsBehaviour>();
			if ((Object)(object)cursedFistsBehaviour == (Object)null)
			{
				cursedFistsBehaviour = ((Component)player).gameObject.AddComponent<CursedFistsBehaviour>();
				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<CursedFistsBehaviour>();
			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<Player>();
		}

		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<Player>();
				if ((Object)(object)componentInParent != (Object)null && !componentInParent.data.dead)
				{
					BleedEffectTick bleedEffectTick = ((Component)componentInParent).gameObject.GetComponent<BleedEffectTick>();
					if ((Object)(object)bleedEffectTick == (Object)null)
					{
						bleedEffectTick = ((Component)componentInParent).gameObject.AddComponent<BleedEffectTick>();
					}
					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<Player>();
		}

		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<JJKCustomDummy>();
			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<MoveTransform>();
			foreach (MoveTransform val4 in array2)
			{
				if (!(Vector3.Distance(((Component)val).transform.position, ((Component)val4).transform.position) <= 12f))
				{
					continue;
				}
				ProjectileHit component = ((Component)val4).GetComponent<ProjectileHit>();
				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<Rigidbody2D>();
					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<SpriteRenderer>();
			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>();
			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<SpriteRenderer>();
			((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<ProceduralSpinner>();
			return val;
		}

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			((Object)((Component)cardInfo).gameObject).name = "JJK_Tech_Gojo_Blue";
			JJKCardHelper.SetUniqueCategory(cardInfo);
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			if ((Object)(object)((Component)player).gameObject.GetComponent<BlueBehaviour>() == (Object)null)
			{
				((Component)player).gameObject.AddComponent<BlueBehaviour>();
			}
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			BlueBehaviour component = ((Component)player).gameObject.GetComponent<BlueBehaviour>();
			if ((Object)(object)component != (Object)null)
			{
				Object.Destroy((Object)(object)component);
			}
		}
	}
	public class 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<SpriteRenderer>();
			((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<Player>();
		}

		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<Player>();
				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<Rigidbody2D>();
			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<Rigidbody2D>();
				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<SyncPlayerMovement>();
					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<Rigidbody2D>();
			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>();
			SyncPlayerMovement component5 = ((Component)val6).GetComponent<SyncPlayerMovement>();
			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>();
			PlayerCollision componentInParent2 = ((Component)val6).GetComponentInParent<PlayerCollision>();
			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<SpriteRenderer>();
			((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<BoogieClapShockwave>();
		}

		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<SpriteRenderer>();
			((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<BlueFlameLifecycle>().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<SpriteRenderer>();
			((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<HollowPurpleCard.ProceduralPulsator>();
			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<BoogieWoogieBehaviour>() == (Object)null)
			{
				((Component)player).gameObject.AddComponent<BoogieWoogieBehaviour>();
			}
		}

		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<BoogieWoogieBehaviour>();
			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<Player>();
		}

		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<Renderer>().material.color = new Color(0.1f, 0.1f, 0.1f, 0.9f);
			Object.Destroy((Object)(object)domainVisual.GetComponent<Collider>());
			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<ChimeraShadowGardenBehaviour>();
					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<ChimeraShadowGardenBehaviour>() == (Object)null)
			{
				((Component)player).gameObject.AddComponent<ChimeraShadowGardenBehaviour>();
			}
		}

		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<ChimeraShadowGardenBehaviour>();
			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<Player>();
		}

		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" : "<color=#00FF00>IN RANGE</color>";
			});
		}

		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<JJKCustomDummy>();
			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<LineRenderer>();
			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<CleaveBehaviour>() == (Object)null)
			{
				((Component)player).gameObject.AddComponent<CleaveBehaviour>();
			}
		}

		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<CleaveBehaviour>();
			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<Player>();
		}

		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<Renderer>().material.color = new Color(0.5f, 0.4f, 0f, 0.5f);
				Object.Destroy((Object)(object)val.GetComponent<Collider>());
				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<Player>();
					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<CollapseBehaviour>() == (Object)null)
			{
				((Component)player).gameObject.AddComponent<CollapseBehaviour>();
			}
		}

		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<CollapseBehaviour>();
			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<Player> alreadyHitInPunch = new HashSet<Player>();

		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<SpriteRenderer>();
			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<TextMesh>();
				staminaText.characterSize = 0.05f;
				staminaText.fontSize = 120;
				staminaText.anchor = (TextAnchor)4;
				staminaText.alignment = (TextAlignment)1;
				staminaText.