Decompiled source of AbsolutelyBrokenCards v3.0.8

ABSOLUTELY BROKEN CARDS.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using InControl;
using ModdingUtils.Utils;
using UnboundLib.Cards;
using UnboundLib.GameModes;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ABSOLUTELY BROKEN CARDS")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ABSOLUTELY BROKEN CARDS")]
[assembly: AssemblyTitle("ABSOLUTELY BROKEN CARDS")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace ABSOLUTELY_BROKEN_CARDS
{
	internal class Class9
	{
	}
}
namespace AbsolutelyBrokenCards
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.yourname.rounds.absolutelybrokencards", "ABSOLUTELY BROKEN CARDS", "1.0.0")]
	[BepInProcess("Rounds.exe")]
	public class BrokenCardsPlugin : BaseUnityPlugin
	{
		private const string ModId = "com.yourname.rounds.absolutelybrokencards";

		private const string ModName = "ABSOLUTELY BROKEN CARDS";

		private const string Version = "1.0.0";

		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			Harmony val = new Harmony("com.yourname.rounds.absolutelybrokencards");
			val.PatchAll();
		}

		private void Start()
		{
			CustomCard.BuildCard<HammerHeadCard>();
			CustomCard.BuildCard<LaserCard>();
			CustomCard.BuildCard<RailgunCard>();
			CustomCard.BuildCard<RealitysEndCard>();
			CustomCard.BuildCard<UltimateShotgunCard>();
			CustomCard.BuildCard<Class16>();
			CustomCard.BuildCard<Class14>();
			CustomCard.BuildCard<EventHorizonCard>();
			CustomCard.BuildCard<PlasmaMelterCard>();
			CustomCard.BuildCard<StasisWallCard>();
			CustomCard.BuildCard<ParticleAcceleratorCard>();
			CustomCard.BuildCard<IonCannonCard>();
			CustomCard.BuildCard<TeslaCoilCard>();
			CustomCard.BuildCard<Object531Card>();
		}
	}
	public class RealitysEndCard : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
		}

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

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

		protected override string GetTitle()
		{
			return "Reality's End";
		}

		protected override string GetDescription()
		{
			return "stand still for 10 seconds to rip your enemies atoms apart!";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)2;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)4;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_005f: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Still Time Required",
					amount = "7 Seconds",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Targeting System",
					amount = "Enemies Only",
					simepleAmount = (SimpleAmount)3
				}
			};
		}
	}
	public class RealitysEndEffect : MonoBehaviour
	{
		private Player player;

		private float stillTimer = 0f;

		private const float TimeRequired = 7f;

		private Vector3 lastPosition;

		private LineRenderer ringRenderer;

		private const int RingSegments = 50;

		private const float MaxRingRadius = 3.5f;

		private void Start()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			player = ((Component)this).GetComponent<Player>();
			lastPosition = ((Component)this).transform.position;
			SetupIndicatorRing();
		}

		private void SetupIndicatorRing()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Expected O, but got Unknown
			//IL_006b: 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)
			GameObject val = new GameObject("RealitysEnd_IndicatorRing");
			val.transform.SetParent(((Component)this).transform);
			val.transform.localPosition = new Vector3(0f, 0f, -1f);
			ringRenderer = val.AddComponent<LineRenderer>();
			((Renderer)ringRenderer).material = new Material(Shader.Find("Hidden/Internal-Colored"));
			ringRenderer.startColor = Color.red;
			ringRenderer.endColor = Color.red;
			ringRenderer.startWidth = 0.12f;
			ringRenderer.endWidth = 0.12f;
			ringRenderer.useWorldSpace = false;
			ringRenderer.loop = true;
			ringRenderer.positionCount = 50;
			((Renderer)ringRenderer).sortingOrder = 999;
			DrawCircle(0f);
		}

		private void Update()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)player == (Object)null)
			{
				return;
			}
			Vector3 position = ((Component)this).transform.position;
			float num = Vector3.Distance(position, lastPosition);
			lastPosition = position;
			if (num < 0.06f)
			{
				stillTimer += Time.deltaTime;
				if (stillTimer > 7f)
				{
					stillTimer = 7f;
				}
				if (stillTimer >= 7f)
				{
					DetonateArmageddon();
					stillTimer = 0f;
				}
			}
			else
			{
				stillTimer -= Time.deltaTime;
				if (stillTimer < 0f)
				{
					stillTimer = 0f;
				}
			}
			float num2 = stillTimer / 7f;
			float radius = num2 * 3.5f;
			DrawCircle(radius);
		}

		private void DrawCircle(float radius)
		{
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)ringRenderer == (Object)null)
			{
				return;
			}
			if (radius <= 0.05f)
			{
				((Renderer)ringRenderer).enabled = false;
				return;
			}
			((Renderer)ringRenderer).enabled = true;
			for (int i = 0; i < 50; i++)
			{
				float num = (float)i * MathF.PI * 2f / 50f;
				float num2 = Mathf.Cos(num) * radius;
				float num3 = Mathf.Sin(num) * radius;
				ringRenderer.SetPosition(i, new Vector3(num2, num3, 0f));
			}
		}

		private void DetonateArmageddon()
		{
			//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)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			Vector3 position = ((Component)this).transform.position;
			GameObject val = GameObject.CreatePrimitive((PrimitiveType)0);
			val.transform.position = position;
			val.transform.localScale = Vector3.one * 1f;
			Component component = val.GetComponent("SphereCollider");
			if ((Object)(object)component != (Object)null)
			{
				Object.Destroy((Object)(object)component);
			}
			Renderer component2 = val.GetComponent<Renderer>();
			if ((Object)(object)component2 != (Object)null)
			{
				component2.material.color = new Color(0.2f, 0f, 0.4f, 0.5f);
			}
			val.AddComponent<RealityVisualAnimate>();
			Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(position), 150f);
			Collider2D[] array2 = array;
			foreach (Collider2D val2 in array2)
			{
				Player componentInParent = ((Component)val2).GetComponentInParent<Player>();
				if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)player)
				{
					HealthHandler healthHandler = componentInParent.data.healthHandler;
					if ((Object)(object)healthHandler != (Object)null)
					{
						((Damagable)healthHandler).TakeDamage(Vector2.up * 999999f, Vector2.op_Implicit(position), (GameObject)null, (Player)null, true, false);
					}
				}
			}
		}
	}
	public class RealityVisualAnimate : MonoBehaviour
	{
		private float runningTime = 0f;

		private const float Duration = 0.35f;

		private const float TargetDiameter = 300f;

		private void Update()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			runningTime += Time.deltaTime;
			float num = runningTime / 0.35f;
			((Component)this).transform.localScale = Vector3.Lerp(Vector3.one, Vector3.one * 300f, num);
			if (runningTime >= 0.35f)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}
	}
	public class UltimateShotgunCard : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			gun.ammo = 97;
			gun.numberOfProjectiles = 100;
			gun.spread = 0.4f;
			gun.reflects = 0;
			gun.gravity = 0f;
			gun.projectileSize = 0.8f;
			gun.projectileSpeed = 0.8f;
			gun.destroyBulletAfter = 5f;
			gun.damage = 0.2f;
			gun.reloadTime = 2f;
		}

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

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

		protected override string GetTitle()
		{
			return "ULTIMATE SHOT GUN";
		}

		protected override string GetDescription()
		{
			return "Fires 100 straight, weightless bullets in a massive slow-motion wave!";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)1;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)1;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_005f: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[3]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Projectiles",
					amount = "100",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Bounces",
					amount = "0",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Bullet Speed",
					amount = "Slow-Mo",
					simepleAmount = (SimpleAmount)5
				}
			};
		}
	}
	public class UltimateShotgunEffect : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <DelayAmmoDrainRoutine>d__8 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public UltimateShotgunEffect <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <DelayAmmoDrainRoutine>d__8(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0021: Unknown result type (might be due to invalid IL or missing references)
				//IL_002b: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (object)new WaitForEndOfFrame();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					if ((Object)(object)<>4__this.gunAmmo != (Object)null && <>4__this.ammoField != null)
					{
						<>4__this.ammoField.SetValue(<>4__this.gunAmmo, 0);
					}
					<>4__this.isDraining = false;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		private Player player;

		private Gun gun;

		private GunAmmo gunAmmo;

		private FieldInfo ammoField;

		private bool isDraining = false;

		private void Start()
		{
			player = ((Component)this).GetComponent<Player>();
			gun = player.data.weaponHandler.gun;
			gunAmmo = ((Component)gun).GetComponent<GunAmmo>();
			ammoField = typeof(GunAmmo).GetField("ammo", BindingFlags.Instance | BindingFlags.NonPublic);
			Gun obj = gun;
			obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectile));
		}

		private void Update()
		{
			if ((Object)(object)gun != (Object)null && (Object)(object)gunAmmo != (Object)null && ammoField != null)
			{
				int num = (int)ammoField.GetValue(gunAmmo);
				if (num > 0)
				{
					gun.numberOfProjectiles = num;
				}
			}
		}

		private void OnShootProjectile(GameObject proj)
		{
			if (!isDraining)
			{
				isDraining = true;
				((MonoBehaviour)this).StartCoroutine(DelayAmmoDrainRoutine());
			}
		}

		[IteratorStateMachine(typeof(<DelayAmmoDrainRoutine>d__8))]
		private IEnumerator DelayAmmoDrainRoutine()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <DelayAmmoDrainRoutine>d__8(0)
			{
				<>4__this = this
			};
		}

		private void OnDestroy()
		{
			if ((Object)(object)gun != (Object)null)
			{
				Gun obj = gun;
				obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectile));
			}
		}
	}
	public class Class14 : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			block.cdAdd = 10f;
			gun.ammo = -2;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			((Component)player).gameObject.AddComponent<Class15>();
			((Component)player).gameObject.AddComponent<NoFriendlyFireTrait>();
		}

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

		protected override string GetTitle()
		{
			return "rip my granny she got hit by a bazooka";
		}

		protected override string GetDescription()
		{
			return "blocking turns your next shot into an rpg (5s warmup)";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)2;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)0;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_005f: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: 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_00af: 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_00b7: Expected O, but got Unknown
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[5]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Empowered Shot",
					amount = "1000 DMG",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Explosion",
					amount = "MASSIVE",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Max Ammo",
					amount = "3",
					simepleAmount = (SimpleAmount)7
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Warmup Time",
					amount = "5s",
					simepleAmount = (SimpleAmount)5
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Block Cooldown",
					amount = "+10s",
					simepleAmount = (SimpleAmount)7
				}
			};
		}
	}
	public class Class15 : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <ConsumeCharge>d__13 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public Class15 <>4__this;

			private List<ObjectsToSpawn> <list>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <ConsumeCharge>d__13(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<list>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0021: Unknown result type (might be due to invalid IL or missing references)
				//IL_002b: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (object)new WaitForEndOfFrame();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>4__this.isEmpowered = false;
					<>4__this.isConsuming = false;
					if (<>4__this.explosiveEffect != null)
					{
						<list>5__1 = new List<ObjectsToSpawn>(<>4__this.gun.objectsToSpawn);
						<list>5__1.Remove(<>4__this.explosiveEffect);
						<>4__this.gun.objectsToSpawn = <list>5__1.ToArray();
						<list>5__1 = null;
					}
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		private Player player;

		private Block block;

		private Gun gun;

		private bool isEmpowered = false;

		private bool isConsuming = false;

		private float roundTimer = 0f;

		private bool wasDead = false;

		private ObjectsToSpawn explosiveEffect;

		private void Start()
		{
			player = ((Component)this).GetComponent<Player>();
			block = player.data.block;
			gun = player.data.weaponHandler.gun;
			if ((Object)(object)block != (Object)null)
			{
				Block obj = block;
				obj.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
			}
			if ((Object)(object)gun != (Object)null)
			{
				Gun obj2 = gun;
				obj2.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj2.ShootPojectileAction, new Action<GameObject>(OnShootProjectile));
			}
			CardInfo[] cards = CardChoice.instance.cards;
			foreach (CardInfo val in cards)
			{
				if (val.cardName.ToLower().Contains("explosive"))
				{
					Gun component = ((Component)val).gameObject.GetComponent<Gun>();
					if ((Object)(object)component != (Object)null && component.objectsToSpawn != null && component.objectsToSpawn.Length != 0)
					{
						explosiveEffect = component.objectsToSpawn[0];
					}
					break;
				}
			}
		}

		private void Update()
		{
			if (player.data.dead)
			{
				roundTimer = 0f;
				wasDead = true;
				isEmpowered = false;
				return;
			}
			if (wasDead)
			{
				wasDead = false;
				roundTimer = 0f;
			}
			roundTimer += Time.deltaTime;
		}

		private void OnBlock(BlockTriggerType trigger)
		{
			if (roundTimer >= 5f)
			{
				isEmpowered = true;
				if (explosiveEffect != null && !HasExplosion(gun))
				{
					List<ObjectsToSpawn> list = new List<ObjectsToSpawn>(gun.objectsToSpawn);
					list.Add(explosiveEffect);
					gun.objectsToSpawn = list.ToArray();
				}
			}
		}

		private bool HasExplosion(Gun g)
		{
			ObjectsToSpawn[] objectsToSpawn = g.objectsToSpawn;
			foreach (ObjectsToSpawn val in objectsToSpawn)
			{
				if (val == explosiveEffect)
				{
					return true;
				}
			}
			return false;
		}

		private void OnShootProjectile(GameObject projectile)
		{
			if (isEmpowered)
			{
				ProjectileHit component = projectile.GetComponent<ProjectileHit>();
				if ((Object)(object)component != (Object)null)
				{
					component.damage = 3000f;
				}
				if (!isConsuming)
				{
					isConsuming = true;
					((MonoBehaviour)this).StartCoroutine(ConsumeCharge());
				}
			}
		}

		[IteratorStateMachine(typeof(<ConsumeCharge>d__13))]
		private IEnumerator ConsumeCharge()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <ConsumeCharge>d__13(0)
			{
				<>4__this = this
			};
		}

		private void OnDestroy()
		{
			if ((Object)(object)block != (Object)null)
			{
				Block obj = block;
				obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
			}
			if ((Object)(object)gun != (Object)null)
			{
				Gun obj2 = gun;
				obj2.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj2.ShootPojectileAction, new Action<GameObject>(OnShootProjectile));
			}
		}
	}
	public class Class16 : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			statModifiers.respawns = 1;
		}

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

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

		protected override string GetTitle()
		{
			return "FINAL COUNTDOWN";
		}

		protected override string GetDescription()
		{
			return "when you die you get 5 seconds to kill your killer with increased power!";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)2;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)3;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_005f: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[3]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Last Stand DMG",
					amount = "x2",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Size & Speed",
					amount = "MASSIVE",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = true,
					stat = "The Hunt",
					amount = "4s",
					simepleAmount = (SimpleAmount)3
				}
			};
		}
	}
	public class Class17 : MonoBehaviour
	{
		private GameObject watcherObj;

		private void Start()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			Player component = ((Component)this).GetComponent<Player>();
			Gun gun = component.data.weaponHandler.gun;
			if ((Object)(object)watcherObj == (Object)null)
			{
				watcherObj = new GameObject("LastStandWatcher_" + component.playerID);
				LastStandWatcher lastStandWatcher = watcherObj.AddComponent<LastStandWatcher>();
				lastStandWatcher.Initialize(component, gun);
			}
		}
	}
	public class LastStandWatcher : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <LastStandRoutine>d__6 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public LastStandWatcher <>4__this;

			private float <originalMaxHealth>5__1;

			private float <originalDamage>5__2;

			private float <originalMoveSpeed>5__3;

			private Vector3 <originalScale>5__4;

			private GameObject <glowObj>5__5;

			private Light <glowLight>5__6;

			private float <rampageTimer>5__7;

			private int <i>5__8;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <LastStandRoutine>d__6(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<glowObj>5__5 = null;
				<glowLight>5__6 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0110: Unknown result type (might be due to invalid IL or missing references)
				//IL_0115: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a1: 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_01bc: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c6: Expected O, but got Unknown
				//IL_01f2: 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_0094: Unknown result type (might be due to invalid IL or missing references)
				//IL_009e: Expected O, but got Unknown
				//IL_0313: Unknown result type (might be due to invalid IL or missing references)
				//IL_038e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0398: Unknown result type (might be due to invalid IL or missing references)
				//IL_03ad: Unknown result type (might be due to invalid IL or missing references)
				//IL_03b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_03ea: Unknown result type (might be due to invalid IL or missing references)
				//IL_03f4: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>4__this.isRampaging = true;
					<>4__this.trapUsedThisRound = true;
					goto IL_0070;
				case 1:
					<>1__state = -1;
					goto IL_0070;
				case 2:
				{
					<>1__state = -1;
					<originalMaxHealth>5__1 = <>4__this.player.data.maxHealth;
					<originalDamage>5__2 = <>4__this.gun.damage;
					<originalMoveSpeed>5__3 = <>4__this.player.data.stats.movementSpeed;
					<originalScale>5__4 = ((Component)<>4__this.player).transform.localScale;
					<>4__this.player.data.maxHealth = 9999999f;
					<>4__this.player.data.health = 9999999f;
					Gun gun = <>4__this.gun;
					gun.damage *= 2f;
					CharacterStatModifiers stats = <>4__this.player.data.stats;
					stats.movementSpeed *= 1.5f;
					((Component)<>4__this.player).transform.localScale = <originalScale>5__4 * 1.5f;
					<glowObj>5__5 = new GameObject("RampageGlow");
					<glowObj>5__5.transform.SetParent(((Component)<>4__this.player).transform);
					<glowObj>5__5.transform.localPosition = Vector3.zero;
					<glowLight>5__6 = <glowObj>5__5.AddComponent<Light>();
					<glowLight>5__6.type = (LightType)2;
					<glowLight>5__6.color = Color.red;
					<glowLight>5__6.range = 15f;
					<glowLight>5__6.intensity = 8f;
					<rampageTimer>5__7 = 0f;
					goto IL_02a0;
				}
				case 3:
					<>1__state = -1;
					goto IL_02a0;
				case 4:
					{
						<>1__state = -1;
						<>4__this.isRampaging = false;
						return false;
					}
					IL_02a0:
					if (<rampageTimer>5__7 < 5f)
					{
						<rampageTimer>5__7 += Time.deltaTime;
						<>4__this.player.data.health = 9999999f;
						<>2__current = null;
						<>1__state = 3;
						return true;
					}
					<>4__this.gun.damage = <originalDamage>5__2;
					<>4__this.player.data.maxHealth = <originalMaxHealth>5__1;
					<>4__this.player.data.stats.movementSpeed = <originalMoveSpeed>5__3;
					((Component)<>4__this.player).transform.localScale = <originalScale>5__4;
					if ((Object)(object)<glowObj>5__5 != (Object)null)
					{
						Object.Destroy((Object)(object)<glowObj>5__5);
					}
					<>4__this.player.data.stats.remainingRespawns = 0;
					<>4__this.player.data.health = -9999f;
					<i>5__8 = 0;
					while (<i>5__8 < 10)
					{
						((Damagable)<>4__this.player.data.healthHandler).TakeDamage(Vector2.up * 9999999f, Vector2.op_Implicit(((Component)<>4__this.player).transform.position), (GameObject)null, (Player)null, true, false);
						<i>5__8++;
					}
					<>2__current = (object)new WaitForSeconds(3f);
					<>1__state = 4;
					return true;
					IL_0070:
					if (<>4__this.player.data.healthHandler.isRespawning)
					{
						<>2__current = null;
						<>1__state = 1;
						return true;
					}
					<>2__current = (object)new WaitForSeconds(0.1f);
					<>1__state = 2;
					return true;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		private Player player;

		private Gun gun;

		private bool isRampaging = false;

		private bool trapUsedThisRound = false;

		public void Initialize(Player p, Gun g)
		{
			player = p;
			gun = g;
		}

		private void Update()
		{
			if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null))
			{
				if (player.data.stats.remainingRespawns == player.data.stats.respawns && trapUsedThisRound && !isRampaging)
				{
					trapUsedThisRound = false;
				}
				if (!player.data.dead && player.data.stats.remainingRespawns < player.data.stats.respawns && !trapUsedThisRound && !isRampaging)
				{
					((MonoBehaviour)this).StartCoroutine(LastStandRoutine());
				}
			}
		}

		[IteratorStateMachine(typeof(<LastStandRoutine>d__6))]
		private IEnumerator LastStandRoutine()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <LastStandRoutine>d__6(0)
			{
				<>4__this = this
			};
		}
	}
	public class Object531Card : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			gun.projectileSpeed = 50f;
			gun.damage = 0.05f;
			gun.reloadTime = 1.5f;
		}

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

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

		protected override string GetTitle()
		{
			return "OBJECT 531";
		}

		protected override string GetDescription()
		{
			return "WARNING Experimental rail gun charge to do an infinite amount of damage!";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)2;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)4;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_005f: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[3]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Drill Feature",
					amount = "Walls & Blocks",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Projectile Speed",
					amount = "Instant",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Magazine Size",
					amount = "1 Shot Per Reload",
					simepleAmount = (SimpleAmount)7
				}
			};
		}
	}
	public class Object531Effect : MonoBehaviour
	{
		private Player player;

		private Gun gun;

		private GunAmmo gunAmmo;

		private FieldInfo ammoField;

		private bool isCharging = false;

		private float chargeTimer = 0f;

		private float pendingChargeDamage = 0f;

		private float originalAttackSpeed = 0.3f;

		public bool isUnleashing = false;

		private PlayerAction resolvedFireAction;

		private GameObject chargeSphere;

		private void Start()
		{
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			player = ((Component)this).GetComponent<Player>();
			if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !((Object)(object)player.data.weaponHandler == (Object)null))
			{
				gun = player.data.weaponHandler.gun;
				gunAmmo = ((Component)gun).GetComponent<GunAmmo>();
				ammoField = typeof(GunAmmo).GetField("ammo", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
				Gun obj = gun;
				obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectile));
				resolvedFireAction = FindFireAction();
				originalAttackSpeed = gun.attackSpeed;
				gun.attackSpeed = 9999f;
				chargeSphere = GameObject.CreatePrimitive((PrimitiveType)0);
				Component component = chargeSphere.GetComponent("SphereCollider");
				if ((Object)(object)component != (Object)null)
				{
					Object.Destroy((Object)(object)component);
				}
				Renderer component2 = chargeSphere.GetComponent<Renderer>();
				component2.material.color = Color.yellow;
				Shader val = Shader.Find("Particles/Standard Unlit");
				if ((Object)(object)val != (Object)null)
				{
					component2.material.shader = val;
				}
				chargeSphere.SetActive(false);
			}
		}

		private void Update()
		{
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: 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_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || (Object)(object)gun == (Object)null)
			{
				return;
			}
			int num = ((!((Object)(object)gunAmmo != (Object)null) || !(ammoField != null)) ? 1 : ((int)ammoField.GetValue(gunAmmo)));
			if (player.data.dead || gun.isReloading || num <= 0)
			{
				isCharging = false;
				chargeTimer = 0f;
				if ((Object)(object)chargeSphere != (Object)null)
				{
					chargeSphere.SetActive(false);
				}
				gun.attackSpeed = originalAttackSpeed;
				return;
			}
			if (gun.attackSpeed < 5000f && !isCharging)
			{
				originalAttackSpeed = gun.attackSpeed;
				gun.attackSpeed = 9999f;
			}
			if (resolvedFireAction == null)
			{
				return;
			}
			if (((OneAxisInputControl)resolvedFireAction).IsPressed)
			{
				if (!isCharging)
				{
					chargeTimer = 0f;
					pendingChargeDamage = 0f;
				}
				isCharging = true;
				chargeTimer += Time.deltaTime;
				if ((Object)(object)chargeSphere != (Object)null)
				{
					chargeSphere.SetActive(true);
					float num2 = 0.3f + chargeTimer * 1.5f;
					chargeSphere.transform.localScale = new Vector3(num2, num2, num2);
					Transform val = ((Component)gun).transform.Find("Barrel");
					Vector3 val2 = (((Object)(object)val != (Object)null) ? val.position : (((Component)player).transform.position + ((Vector3)(ref player.data.aimDirection)).normalized * 1.5f));
					chargeSphere.transform.position = val2 + ((Vector3)(ref player.data.aimDirection)).normalized * (num2 * 0.6f);
				}
			}
			else if (isCharging)
			{
				isCharging = false;
				if ((Object)(object)chargeSphere != (Object)null)
				{
					chargeSphere.SetActive(false);
				}
				pendingChargeDamage = chargeTimer * 15f;
				ForceShoot();
			}
		}

		private void ForceShoot()
		{
			int numberOfProjectiles = gun.numberOfProjectiles;
			int bursts = gun.bursts;
			gun.numberOfProjectiles = 1;
			gun.bursts = 0;
			gun.attackSpeed = 0f;
			MethodInfo methodInfo = null;
			MethodInfo[] methods = typeof(Gun).GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
			foreach (MethodInfo methodInfo2 in methods)
			{
				if (methodInfo2.Name == "Attack")
				{
					methodInfo = methodInfo2;
					break;
				}
			}
			if (methodInfo != null)
			{
				ParameterInfo[] parameters = methodInfo.GetParameters();
				object[] array = new object[parameters.Length];
				for (int j = 0; j < parameters.Length; j++)
				{
					Type parameterType = parameters[j].ParameterType;
					if (parameterType == typeof(float))
					{
						array[j] = 1f;
					}
					else if (parameterType == typeof(bool))
					{
						array[j] = true;
					}
					else if (parameterType == typeof(int))
					{
						array[j] = 1;
					}
					else
					{
						array[j] = null;
					}
				}
				methodInfo.Invoke(gun, array);
			}
			if ((Object)(object)gunAmmo != (Object)null && ammoField != null)
			{
				ammoField.SetValue(gunAmmo, 0);
			}
			gun.numberOfProjectiles = numberOfProjectiles;
			gun.bursts = bursts;
			gun.attackSpeed = 9999f;
		}

		private void OnShootProjectile(GameObject projectile)
		{
			DrillBullet drillBullet = projectile.AddComponent<DrillBullet>();
			drillBullet.attacker = player;
			drillBullet.damage = gun.damage * 55f + pendingChargeDamage;
			pendingChargeDamage = 0f;
		}

		private PlayerAction FindFireAction()
		{
			if (player.data.playerActions == null)
			{
				return null;
			}
			FieldInfo[] fields = ((object)player.data.playerActions).GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
			FieldInfo[] array = fields;
			foreach (FieldInfo fieldInfo in array)
			{
				string text = fieldInfo.Name.ToLower();
				if (text == "fire" || text == "shoot" || text == "attack")
				{
					object? value = fieldInfo.GetValue(player.data.playerActions);
					return (PlayerAction)((value is PlayerAction) ? value : null);
				}
			}
			PropertyInfo[] properties = ((object)player.data.playerActions).GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
			PropertyInfo[] array2 = properties;
			foreach (PropertyInfo propertyInfo in array2)
			{
				string text2 = propertyInfo.Name.ToLower();
				if (text2 == "fire" || text2 == "shoot" || text2 == "attack")
				{
					object? value2 = propertyInfo.GetValue(player.data.playerActions, null);
					return (PlayerAction)((value2 is PlayerAction) ? value2 : null);
				}
			}
			return null;
		}

		private void OnDestroy()
		{
			if ((Object)(object)gun != (Object)null)
			{
				Gun obj = gun;
				obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectile));
				gun.attackSpeed = originalAttackSpeed;
			}
			if ((Object)(object)chargeSphere != (Object)null)
			{
				Object.Destroy((Object)(object)chargeSphere);
			}
		}
	}
	public class DrillBullet : MonoBehaviour
	{
		public Player attacker;

		public float damage = 0f;

		public float speed = 150f;

		public float beamThickness = 1.5f;

		private Vector3 direction;

		private Vector2 lastPosition;

		private List<Player> hitPlayers = new List<Player>();

		private void Start()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Expected O, but got Unknown
			//IL_0189: 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_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			lastPosition = Vector2.op_Implicit(((Component)this).transform.position);
			Object.Destroy((Object)(object)((Component)this).gameObject, 3f);
			Vector3 normalized = ((Vector3)(ref attacker.data.aimDirection)).normalized;
			Vector3 val = new Vector3(normalized.x, normalized.y, 0f);
			direction = ((Vector3)(ref val)).normalized;
			ProjectileHit componentInChildren = ((Component)this).GetComponentInChildren<ProjectileHit>();
			if ((Object)(object)componentInChildren != (Object)null)
			{
				((Behaviour)componentInChildren).enabled = false;
			}
			RayCastTrail componentInChildren2 = ((Component)this).GetComponentInChildren<RayCastTrail>();
			if ((Object)(object)componentInChildren2 != (Object)null)
			{
				((Behaviour)componentInChildren2).enabled = false;
			}
			MoveTransform componentInChildren3 = ((Component)this).GetComponentInChildren<MoveTransform>();
			if ((Object)(object)componentInChildren3 != (Object)null)
			{
				((Behaviour)componentInChildren3).enabled = false;
			}
			Collider2D componentInChildren4 = ((Component)this).GetComponentInChildren<Collider2D>();
			if ((Object)(object)componentInChildren4 != (Object)null)
			{
				((Behaviour)componentInChildren4).enabled = false;
			}
			Rigidbody2D componentInChildren5 = ((Component)this).GetComponentInChildren<Rigidbody2D>();
			if ((Object)(object)componentInChildren5 != (Object)null)
			{
				componentInChildren5.isKinematic = true;
			}
			SpriteRenderer componentInChildren6 = ((Component)this).GetComponentInChildren<SpriteRenderer>();
			if ((Object)(object)componentInChildren6 != (Object)null)
			{
				componentInChildren6.color = Color.yellow;
				((Component)componentInChildren6).transform.localScale = new Vector3(4f, 4f, 4f);
			}
			TrailRenderer val2 = ((Component)this).gameObject.AddComponent<TrailRenderer>();
			val2.time = 0.4f;
			val2.startWidth = beamThickness;
			val2.endWidth = 0f;
			((Renderer)val2).material = new Material(Shader.Find("Sprites/Default"));
			val2.startColor = Color.yellow;
			val2.endColor = new Color(1f, 1f, 0f, 0f);
		}

		private void Update()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: 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_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			Transform transform = ((Component)this).transform;
			transform.position += direction * speed * Time.deltaTime;
			Vector2 p = Vector2.op_Implicit(((Component)this).transform.position);
			if ((Object)(object)PlayerManager.instance != (Object)null && PlayerManager.instance.players != null)
			{
				foreach (Player player in PlayerManager.instance.players)
				{
					if ((Object)(object)player != (Object)null && player.teamID != attacker.teamID && !player.data.dead)
					{
						float num = FindDistanceToSegment(((Component)player).transform.position, lastPosition, p);
						if (num <= beamThickness && !hitPlayers.Contains(player))
						{
							hitPlayers.Add(player);
							((Damagable)player.data.healthHandler).CallTakeDamage(Vector2.op_Implicit(direction * damage), Vector2.op_Implicit(((Component)player).transform.position), ((Component)this).gameObject, attacker, true);
						}
					}
				}
			}
			lastPosition = p;
		}

		private float FindDistanceToSegment(Vector3 pt, Vector2 p1, Vector2 p2)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			Vector2 val = Vector2.op_Implicit(pt);
			Vector2 val2 = p2 - p1;
			float sqrMagnitude = ((Vector2)(ref val2)).sqrMagnitude;
			if (sqrMagnitude == 0f)
			{
				return Vector2.Distance(val, p1);
			}
			float num = Vector2.Dot(val - p1, val2) / sqrMagnitude;
			num = Mathf.Clamp01(num);
			Vector2 val3 = p1 + num * val2;
			return Vector2.Distance(val, val3);
		}
	}
	public class HammerHeadCard : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			statModifiers.health = 1.5f;
			statModifiers.movementSpeed = 0.85f;
		}

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

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

		protected override string GetTitle()
		{
			return "Hammer Head";
		}

		protected override string GetDescription()
		{
			return "Block to teleport forward. Deals damage to enemies who are in front of you!";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)1;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)3;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_005f: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Health",
					amount = "+50%",
					simepleAmount = (SimpleAmount)1
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Movement Speed",
					amount = "-15%",
					simepleAmount = (SimpleAmount)5
				}
			};
		}
	}
	public class ParticleAcceleratorCard : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			gun.destroyBulletAfter = 999f;
			gun.reflects = 9999;
			gun.projectileSpeed = 0.35f;
			gun.damage = 0.5f;
			gun.ammo = 6;
			gun.attackSpeed = 0.2f;
		}

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

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

		protected override string GetTitle()
		{
			return "PARTICLE ACCELERATOR";
		}

		protected override string GetDescription()
		{
			return "WARNING THIS WILL RUIN YOUR GAME! BLOCK TO TURN OFF!";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)2;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)3;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_005f: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: 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_00af: 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_00b7: Expected O, but got Unknown
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[5]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "DONT",
					amount = "Rapid",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = true,
					stat = "PICK",
					amount = "+6",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = true,
					stat = "THIS",
					amount = "Infinite",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = false,
					stat = "CARD",
					amount = "-65%",
					simepleAmount = (SimpleAmount)7
				},
				new CardInfoStat
				{
					positive = false,
					stat = "UP",
					amount = "-50%",
					simepleAmount = (SimpleAmount)6
				}
			};
		}
	}
	public class ParticleAcceleratorEffect : MonoBehaviour
	{
		public class ParticleBullet : MonoBehaviour
		{
			private RayHitReflect rayHitReflect;

			private ProjectileHit projectileHit;

			private MoveTransform moveTransform;

			private int lastReflects;

			private Camera mainCam;

			private float voidBounceCooldown = 0f;

			private void Start()
			{
				rayHitReflect = ((Component)this).GetComponentInChildren<RayHitReflect>();
				projectileHit = ((Component)this).GetComponentInChildren<ProjectileHit>();
				moveTransform = ((Component)this).GetComponentInChildren<MoveTransform>();
				mainCam = Camera.main;
				if ((Object)(object)rayHitReflect != (Object)null)
				{
					lastReflects = rayHitReflect.reflects;
				}
			}

			private void Update()
			{
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_003f: Unknown result type (might be due to invalid IL or missing references)
				//IL_004c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0051: Unknown result type (might be due to invalid IL or missing references)
				//IL_0056: Unknown result type (might be due to invalid IL or missing references)
				//IL_0057: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0063: Unknown result type (might be due to invalid IL or missing references)
				//IL_0083: Unknown result type (might be due to invalid IL or missing references)
				//IL_0088: Unknown result type (might be due to invalid IL or missing references)
				//IL_008f: 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_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)
				//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
				//IL_0234: Unknown result type (might be due to invalid IL or missing references)
				//IL_0239: Unknown result type (might be due to invalid IL or missing references)
				//IL_0241: Unknown result type (might be due to invalid IL or missing references)
				//IL_0246: Unknown result type (might be due to invalid IL or missing references)
				//IL_024b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0252: Unknown result type (might be due to invalid IL or missing references)
				//IL_0275: Unknown result type (might be due to invalid IL or missing references)
				//IL_027c: Unknown result type (might be due to invalid IL or missing references)
				//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
				//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
				//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
				//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
				//IL_0310: Unknown result type (might be due to invalid IL or missing references)
				//IL_0317: Unknown result type (might be due to invalid IL or missing references)
				//IL_0373: Unknown result type (might be due to invalid IL or missing references)
				//IL_0378: Unknown result type (might be due to invalid IL or missing references)
				//IL_03b7: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)moveTransform == (Object)null)
				{
					return;
				}
				float num = ((Vector3)(ref moveTransform.velocity)).magnitude * Time.deltaTime;
				Vector3 normalized = ((Vector3)(ref moveTransform.velocity)).normalized;
				int num2 = 2049;
				RaycastHit2D val = Physics2D.Raycast(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(normalized), num, num2);
				if ((Object)(object)((RaycastHit2D)(ref val)).collider != (Object)null)
				{
					((Component)this).transform.position = Vector2.op_Implicit(((RaycastHit2D)(ref val)).point) + Vector2.op_Implicit(((RaycastHit2D)(ref val)).normal) * 0.2f;
					moveTransform.velocity = Vector2.op_Implicit(Vector2.Reflect(Vector2.op_Implicit(moveTransform.velocity), ((RaycastHit2D)(ref val)).normal));
					((Component)this).transform.up = ((Vector3)(ref moveTransform.velocity)).normalized;
					ApplyBounceMultipliers();
					if ((Object)(object)rayHitReflect != (Object)null)
					{
						RayHitReflect obj = rayHitReflect;
						obj.reflects--;
					}
					lastReflects = (((Object)(object)rayHitReflect != (Object)null) ? rayHitReflect.reflects : 0);
				}
				else if ((Object)(object)rayHitReflect != (Object)null && (Object)(object)projectileHit != (Object)null && rayHitReflect.reflects < lastReflects)
				{
					int num3 = lastReflects - rayHitReflect.reflects;
					lastReflects = rayHitReflect.reflects;
					for (int i = 0; i < num3; i++)
					{
						ApplyBounceMultipliers();
					}
				}
				if ((Object)(object)mainCam != (Object)null)
				{
					if (voidBounceCooldown > 0f)
					{
						voidBounceCooldown -= Time.deltaTime;
					}
					float orthographicSize = mainCam.orthographicSize;
					float num4 = orthographicSize * mainCam.aspect;
					Vector3 position = ((Component)mainCam).transform.position;
					Vector3 position2 = ((Component)this).transform.position;
					bool flag = false;
					if ((position2.x > position.x + num4 && moveTransform.velocity.x > 0f) || (position2.x < position.x - num4 && moveTransform.velocity.x < 0f))
					{
						moveTransform.velocity = new Vector3(0f - moveTransform.velocity.x, moveTransform.velocity.y, 0f);
						flag = true;
					}
					if ((position2.y > position.y + orthographicSize && moveTransform.velocity.y > 0f) || (position2.y < position.y - orthographicSize && moveTransform.velocity.y < 0f))
					{
						moveTransform.velocity = new Vector3(moveTransform.velocity.x, 0f - moveTransform.velocity.y, 0f);
						flag = true;
					}
					if (flag && voidBounceCooldown <= 0f)
					{
						ApplyBounceMultipliers();
						((Component)this).transform.up = ((Vector3)(ref moveTransform.velocity)).normalized;
						voidBounceCooldown = 0.1f;
					}
				}
			}

			private void ApplyBounceMultipliers()
			{
				//IL_004b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_005a: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)projectileHit != (Object)null)
				{
					ProjectileHit obj = projectileHit;
					obj.damage *= 1f;
				}
				if (((Vector3)(ref moveTransform.velocity)).magnitude < 2000f)
				{
					MoveTransform obj2 = moveTransform;
					obj2.velocity *= 1.15f;
				}
			}
		}

		private Player player;

		private Gun gun;

		private Block block;

		private List<GameObject> activeBullets = new List<GameObject>();

		private void Start()
		{
			player = ((Component)this).GetComponent<Player>();
			if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !((Object)(object)player.data.weaponHandler == (Object)null))
			{
				gun = player.data.weaponHandler.gun;
				Gun obj = gun;
				obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectile));
				block = player.data.block;
				if (!((Object)(object)block != (Object)null))
				{
				}
			}
		}

		private void OnShootProjectile(GameObject projectile)
		{
			projectile.AddComponent<ParticleBullet>();
			activeBullets.Add(projectile);
		}
	}
	public class TeslaCoilCard : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			gun.reloadTime = 5f;
		}

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

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

		protected override string GetTitle()
		{
			return "TESLA COIL";
		}

		protected override string GetDescription()
		{
			return "Fires an electric orb thats zaps your enemies!";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)2;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)3;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_005f: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Sticky Trap",
					amount = "On Hit",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Reload Time",
					amount = "-40%",
					simepleAmount = (SimpleAmount)3
				}
			};
		}
	}
	public class TeslaCoilEffect : MonoBehaviour
	{
		private Player player;

		private Gun gun;

		private void Start()
		{
			player = ((Component)this).GetComponent<Player>();
			if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !((Object)(object)player.data.weaponHandler == (Object)null))
			{
				gun = player.data.weaponHandler.gun;
				Gun obj = gun;
				obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectile));
			}
		}

		private void OnShootProjectile(GameObject projectile)
		{
			TeslaBullet teslaBullet = projectile.AddComponent<TeslaBullet>();
			teslaBullet.attacker = player;
			teslaBullet.baseDamage = gun.damage * 20f;
		}

		private void OnDestroy()
		{
			if ((Object)(object)gun != (Object)null)
			{
				Gun obj = gun;
				obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectile));
			}
		}
	}
	public class TeslaBullet : MonoBehaviour
	{
		public Player attacker;

		public float baseDamage;

		public float speed = 10f;

		public float zapRadius = 8f;

		public float zapTickRate = 0.1f;

		public float currentScale = 2.5f;

		public float maxScale = 6f;

		public float growthSpeed = 1.5f;

		private Vector3 direction;

		private float zapTimer = 0f;

		private bool isStuck = false;

		private float armingTimer = 0.3f;

		private LineRenderer lightningBeam;

		private GameObject core;

		private void Start()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Expected O, but got Unknown
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			Object.Destroy((Object)(object)((Component)this).gameObject, 10f);
			Vector3 normalized = ((Vector3)(ref attacker.data.aimDirection)).normalized;
			Vector3 val = new Vector3(normalized.x, normalized.y, 0f);
			direction = ((Vector3)(ref val)).normalized;
			ProjectileHit componentInChildren = ((Component)this).GetComponentInChildren<ProjectileHit>();
			if ((Object)(object)componentInChildren != (Object)null)
			{
				((Behaviour)componentInChildren).enabled = false;
			}
			RayCastTrail componentInChildren2 = ((Component)this).GetComponentInChildren<RayCastTrail>();
			if ((Object)(object)componentInChildren2 != (Object)null)
			{
				((Behaviour)componentInChildren2).enabled = false;
			}
			MoveTransform componentInChildren3 = ((Component)this).GetComponentInChildren<MoveTransform>();
			if ((Object)(object)componentInChildren3 != (Object)null)
			{
				((Behaviour)componentInChildren3).enabled = false;
			}
			Collider2D componentInChildren4 = ((Component)this).GetComponentInChildren<Collider2D>();
			if ((Object)(object)componentInChildren4 != (Object)null)
			{
				((Behaviour)componentInChildren4).enabled = false;
			}
			Rigidbody2D componentInChildren5 = ((Component)this).GetComponentInChildren<Rigidbody2D>();
			if ((Object)(object)componentInChildren5 != (Object)null)
			{
				componentInChildren5.isKinematic = true;
			}
			SpriteRenderer componentInChildren6 = ((Component)this).GetComponentInChildren<SpriteRenderer>();
			if ((Object)(object)componentInChildren6 != (Object)null)
			{
				((Renderer)componentInChildren6).enabled = false;
			}
			core = GameObject.CreatePrimitive((PrimitiveType)0);
			Component component = core.GetComponent("SphereCollider");
			if ((Object)(object)component != (Object)null)
			{
				Object.Destroy((Object)(object)component);
			}
			core.transform.SetParent(((Component)this).transform, false);
			core.transform.localPosition = Vector3.zero;
			core.transform.localScale = new Vector3(currentScale, currentScale, currentScale);
			Renderer component2 = core.GetComponent<Renderer>();
			component2.material.color = Color.cyan;
			Shader val2 = Shader.Find("Particles/Standard Unlit");
			if ((Object)(object)val2 != (Object)null)
			{
				component2.material.shader = val2;
			}
			lightningBeam = ((Component)this).gameObject.AddComponent<LineRenderer>();
			lightningBeam.startWidth = 0.3f;
			lightningBeam.endWidth = 0.1f;
			((Renderer)lightningBeam).material = new Material(Shader.Find("Sprites/Default"));
			lightningBeam.startColor = Color.cyan;
			lightningBeam.endColor = Color.white;
			lightningBeam.positionCount = 2;
			((Renderer)lightningBeam).enabled = false;
		}

		private void Update()
		{
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: 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_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0313: Unknown result type (might be due to invalid IL or missing references)
			//IL_0318: Unknown result type (might be due to invalid IL or missing references)
			//IL_031d: 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_0338: Unknown result type (might be due to invalid IL or missing references)
			//IL_0343: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Unknown result type (might be due to invalid IL or missing references)
			//IL_034d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)attacker == (Object)null || attacker.data.dead)
			{
				return;
			}
			if (!isStuck)
			{
				armingTimer -= Time.deltaTime;
				bool flag = false;
				if (armingTimer <= 0f)
				{
					int num = 33;
					RaycastHit2D val = Physics2D.CircleCast(Vector2.op_Implicit(((Component)this).transform.position), currentScale * 0.4f, Vector2.op_Implicit(direction), speed * Time.deltaTime, num);
					if ((Object)(object)((RaycastHit2D)(ref val)).collider != (Object)null)
					{
						flag = true;
					}
				}
				if (flag)
				{
					isStuck = true;
				}
				else
				{
					Transform transform = ((Component)this).transform;
					transform.position += direction * speed * Time.deltaTime;
				}
			}
			else if (currentScale < maxScale)
			{
				float num2 = growthSpeed * Time.deltaTime;
				currentScale += num2;
				if ((Object)(object)core != (Object)null)
				{
					core.transform.localScale = new Vector3(currentScale, currentScale, currentScale);
				}
				zapRadius += num2 * 0.8f;
			}
			zapTimer -= Time.deltaTime;
			Player val2 = null;
			float num3 = zapRadius;
			if ((Object)(object)PlayerManager.instance != (Object)null && PlayerManager.instance.players != null)
			{
				foreach (Player player in PlayerManager.instance.players)
				{
					if ((Object)(object)player != (Object)null && player.teamID != attacker.teamID && !player.data.dead)
					{
						float num4 = Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(((Component)player).transform.position));
						if (num4 <= num3)
						{
							num3 = num4;
							val2 = player;
						}
					}
				}
			}
			if ((Object)(object)val2 != (Object)null)
			{
				((Renderer)lightningBeam).enabled = true;
				lightningBeam.SetPosition(0, ((Component)this).transform.position);
				lightningBeam.SetPosition(1, ((Component)val2).transform.position);
				if (zapTimer <= 0f)
				{
					Vector3 val3 = ((Component)val2).transform.position - ((Component)this).transform.position;
					Vector2 val4 = Vector2.op_Implicit(((Vector3)(ref val3)).normalized);
					((Damagable)val2.data.healthHandler).TakeDamage(val4 * (baseDamage * 0.5f), Vector2.op_Implicit(((Component)val2).transform.position), Color.cyan, ((Component)this).gameObject, attacker, true, false);
					zapTimer = zapTickRate;
				}
			}
			else
			{
				((Renderer)lightningBeam).enabled = false;
			}
		}
	}
	public class EventHorizonCard : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			if ((Object)(object)block != (Object)null)
			{
				block.cooldown += 20f;
			}
		}

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

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

		protected override string GetTitle()
		{
			return "EVENT HORIZON";
		}

		protected override string GetDescription()
		{
			return "BLOCK shoots a map-eating black hole. Eats up to 3 of your cards to grow permanently massive!";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)2;
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)0;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_005f: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[3]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Black Hole",
					amount = "On Block",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Sacrifice",
					amount = "Up to 3 Cards",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Block Cooldown",
					amount = "+15s",
					simepleAmount = (SimpleAmount)7
				}
			};
		}
	}
	public class EventHorizonEffect : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnPointStart>d__5 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public IGameModeHandler gm;

			public EventHorizonEffect <>4__this;

			private List<CardInfo> <deck>5__1;

			private List<int> <edibleCardIndices>5__2;

			private int <i>5__3;

			private int <randomIndex>5__4;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnPointStart>d__5(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<deck>5__1 = null;
				<edibleCardIndices>5__2 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				if (<>1__state != 0)
				{
					return false;
				}
				<>1__state = -1;
				if ((Object)(object)<>4__this.player == (Object)null || <>4__this.player.data.dead)
				{
					return false;
				}
				if (<>4__this.globalCardsEaten >= 3)
				{
					return false;
				}
				<deck>5__1 = <>4__this.player.data.currentCards;
				if (<deck>5__1 != null && <deck>5__1.Count > 0)
				{
					<edibleCardIndices>5__2 = new List<int>();
					<i>5__3 = 0;
					while (<i>5__3 < <deck>5__1.Count)
					{
						if (((Object)<deck>5__1[<i>5__3]).name != "EventHorizonCard" && <deck>5__1[<i>5__3].cardName != "EVENT HORIZON")
						{
							<edibleCardIndices>5__2.Add(<i>5__3);
						}
						<i>5__3++;
					}
					if (<edibleCardIndices>5__2.Count > 0)
					{
						<randomIndex>5__4 = <edibleCardIndices>5__2[Random.Range(0, <edibleCardIndices>5__2.Count)];
						Cards.instance.RemoveCardFromPlayer(<>4__this.player, <randomIndex>5__4);
						<>4__this.globalCardsEaten++;
					}
					<edibleCardIndices>5__2 = null;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		private Player player;

		private Block block;

		private bool firstBlockUsed = false;

		public int globalCardsEaten = 0;

		private void Start()
		{
			player = ((Component)this).GetComponent<Player>();
			if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null))
			{
				block = player.data.block;
				if ((Object)(object)block != (Object)null)
				{
					Block obj = block;
					obj.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
				}
				GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)OnPointStart);
			}
		}

		[IteratorStateMachine(typeof(<OnPointStart>d__5))]
		private IEnumerator OnPointStart(IGameModeHandler gm)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnPointStart>d__5(0)
			{
				<>4__this = this,
				gm = gm
			};
		}

		private void OnBlock(BlockTriggerType type)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Expected O, but got Unknown
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: 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_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			if (!firstBlockUsed)
			{
				firstBlockUsed = true;
				return;
			}
			GameObject val = new GameObject("BlackHoleAnomaly");
			val.transform.position = ((Component)player).transform.position + ((Vector3)(ref player.data.aimDirection)).normalized * 2.5f;
			BlackHoleEntity blackHoleEntity = val.AddComponent<BlackHoleEntity>();
			blackHoleEntity.attacker = player;
			blackHoleEntity.direction = ((Vector3)(ref player.data.aimDirection)).normalized;
			blackHoleEntity.startingBonusScale = (float)globalCardsEaten * 6f;
		}

		private void OnDestroy()
		{
			if ((Object)(object)block != (Object)null)
			{
				Block obj = block;
				obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
			}
			GameModeManager.RemoveHook("PointStart", (Func<IGameModeHandler, IEnumerator>)OnPointStart);
		}
	}
	public class BlackHoleEntity : MonoBehaviour
	{
		public Player attacker;

		public Vector3 direction;

		public float startingBonusScale = 0f;

		public float speed = 2.5f;

		public float currentScale = 12f;

		public float pullRadius = 25f;

		public float eatRadius = 6f;

		public float positionDragSpeed = 14f;

		private GameObject core;

		private void Start()
		{
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			Object.Destroy((Object)(object)((Component)this).gameObject, 15f);
			currentScale += startingBonusScale;
			eatRadius = currentScale * 0.5f;
			pullRadius = 25f + currentScale * 1.5f;
			core = GameObject.CreatePrimitive((PrimitiveType)0);
			Component component = core.GetComponent("SphereCollider");
			if ((Object)(object)component != (Object)null)
			{
				Object.Destroy((Object)(object)component);
			}
			core.transform.SetParent(((Component)this).transform, false);
			core.transform.localPosition = Vector3.zero;
			core.transform.localScale = new Vector3(currentScale, currentScale, currentScale);
			Renderer component2 = core.GetComponent<Renderer>();
			component2.material.color = Color.black;
			Shader val = Shader.Find("Particles/Standard Unlit");
			if ((Object)(object)val != (Object)null)
			{
				component2.material.shader = val;
			}
		}

		private void FixedUpdate()
		{
			//IL_0032: 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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)attacker == (Object)null || attacker.data.dead)
			{
				return;
			}
			Transform transform = ((Component)this).transform;
			transform.position += direction * speed * Time.fixedDeltaTime;
			if ((Object)(object)PlayerManager.instance != (Object)null && PlayerManager.instance.players != null)
			{
				foreach (Player player in PlayerManager.instance.players)
				{
					if (!((Object)(object)player != (Object)null) || player.teamID == attacker.teamID || player.data.dead)
					{
						continue;
					}
					float num = Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(((Component)player).transform.position));
					if (num <= pullRadius)
					{
						Vector3 val = ((Component)this).transform.position - ((Component)player).transform.position;
						Vector3 normalized = ((Vector3)(ref val)).normalized;
						float num2 = 1f - num / pullRadius;