ExtraGameCards.dll

Decompiled 2 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using CardChoiceSpawnUniqueCardPatch.CustomCategories;
using EGC.AssetsEmbedded;
using EGC.Cards;
using EGC.Cards.Lunar;
using EGC.Cards.MarioPowerUps;
using EGC.Cards.MarkovChoice;
using EGC.Extensions;
using EGC.MonoBehaviours;
using EGC.Utils;
using HarmonyLib;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using ModdingUtils.Extensions;
using ModdingUtils.MonoBehaviours;
using ModdingUtils.Utils;
using ModsPlus;
using Photon.Pun;
using RarityLib.Utils;
using Sonigon;
using Sonigon.Internal;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.GameModes;
using UnboundLib.Networking;
using UnboundLib.Utils;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.UI.ProceduralImage;

[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("ExtraGameCards")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ExtraGameCards")]
[assembly: AssemblyTitle("ExtraGameCards")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace EGC
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.cryoxe.rounds.ExtraGameCards", "ExtraGameCards", "1.1.6")]
	[BepInProcess("Rounds.exe")]
	public class ExtraGameCards : BaseUnityPlugin
	{
		private const string ModId = "com.cryoxe.rounds.ExtraGameCards";

		private const string ModName = "ExtraGameCards";

		private const string Version = "1.1.6";

		public const string ModInitials = "EGC";

		internal static CardCategory Normal = CustomCardCategories.instance.CardCategory("Normal");

		internal static CardCategory CardManipulation = CustomCardCategories.instance.CardCategory("CardManipulation");

		internal static CardCategory Markov = CustomCardCategories.instance.CardCategory("Markov");

		internal static CardCategory Lunar = CustomCardCategories.instance.CardCategory("Lunar");

		internal static CardCategory MarioPowerUps = CustomCardCategories.instance.CardCategory("MarioPowerUps");

		public static ExtraGameCards? Instance { get; private set; }

		private static IEnumerator GameStart(IGameModeHandler gm)
		{
			foreach (Player player in PlayerManager.instance.players)
			{
				CharacterStatModifiersAdditionalData characterData = CharacterStatModifiersExtension.GetAdditionalData(player.data.stats);
				if (!characterData.blacklistedCategories.Contains(Markov))
				{
					characterData.blacklistedCategories.Add(Markov);
				}
				if (!characterData.blacklistedCategories.Contains(Lunar))
				{
					characterData.blacklistedCategories.Add(Lunar);
				}
				if (!characterData.blacklistedCategories.Contains(MarioPowerUps))
				{
					characterData.blacklistedCategories.Add(MarioPowerUps);
				}
			}
			yield break;
		}

		private void Awake()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			RarityUtils.AddRarity("Lunar", 0.85f, new Color(0.5f, 0.85f, 0.8f), new Color(0.38f, 0.64f, 0.6f));
			Harmony val = new Harmony("com.cryoxe.rounds.ExtraGameCards");
			val.PatchAll();
		}

		private void Start()
		{
			Instance = this;
			Normal = CustomCardCategories.instance.CardCategory("Normal");
			Markov = CustomCardCategories.instance.CardCategory("Markov");
			Lunar = CustomCardCategories.instance.CardCategory("Lunar");
			MarioPowerUps = CustomCardCategories.instance.CardCategory("MarioPowerUps");
			CardManipulation = CustomCardCategories.instance.CardCategory("CardManipulation");
			CustomCard.BuildCard<Twenty>();
			CustomCard.BuildCard<Jar>();
			CustomCard.BuildCard<Something>();
			CustomCard.BuildCard<MarioBlock>();
			CustomCard.BuildCard<MiniMushroom>((Action<CardInfo>)delegate(CardInfo card)
			{
				MiniMushroom.MiniMushroomCard = card;
			});
			CustomCard.BuildCard<SuperMushroom>((Action<CardInfo>)delegate(CardInfo card)
			{
				SuperMushroom.SuperMushroomCard = card;
			});
			CustomCard.BuildCard<OneUpMushroom>((Action<CardInfo>)delegate(CardInfo card)
			{
				OneUpMushroom.OneUpMushroomCard = card;
			});
			CustomCard.BuildCard<PoisonousMushroom>((Action<CardInfo>)delegate(CardInfo card)
			{
				PoisonousMushroom.PoisonousMushroomCard = card;
			});
			CustomCard.BuildCard<BooMushroom>((Action<CardInfo>)delegate(CardInfo card)
			{
				BooMushroom.BooMushroomCard = card;
			});
			CustomCard.BuildCard<BeadsOfFealty>();
			CustomCard.BuildCard<GestureOfTheDrowned>();
			CustomCard.BuildCard<ShapedGlass>();
			CustomCard.BuildCard<StoneFluxPauldron>();
			CustomCard.BuildCard<GlowingMeteorite>();
			CustomCard.BuildCard<PortraitOfMarkov>();
			CustomCard.BuildCard<OpenYourThirdEye>();
			CustomCard.BuildCard<TurningABlindEye>();
			CustomCard.BuildCard<Trauma>();
			CustomCard.BuildCard<Madness>();
			CustomCard.BuildCard<Unimpressed>();
			GameModeManager.AddHook("PlayerPickEnd", (Func<IGameModeHandler, IEnumerator>)((IGameModeHandler gm) => PortraitOfMarkov.MarkovPick()));
			GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)GameStart);
			ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)Instance, 1f, (Action)delegate
			{
				foreach (Card item in CardManager.cards.Values.Where((Card card) => !card.cardInfo.categories.Contains(Markov) && !card.cardInfo.categories.Contains(Lunar) && !card.cardInfo.categories.Contains(MarioPowerUps)))
				{
					item.cardInfo.categories = CollectionExtensions.AddToArray<CardCategory>(item.cardInfo.categories, Normal);
				}
			});
		}
	}
}
namespace EGC.Utils
{
	internal static class AudioController
	{
		private static readonly SoundParameterIntensity SoundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0);

		public static void Play(AudioClip audioClip, Transform transform)
		{
			SoundParameterIntensity.intensity = 1f;
			SoundContainer val = ScriptableObject.CreateInstance<SoundContainer>();
			val.setting.volumeIntensityEnable = true;
			val.audioClip[0] = audioClip;
			SoundEvent val2 = ScriptableObject.CreateInstance<SoundEvent>();
			val2.soundContainerArray[0] = val;
			SoundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1f * Optionshandler.vol_Master;
			SoundManager.Instance.Play(val2, transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)SoundParameterIntensity });
		}
	}
	internal class CheckCards
	{
		public static int Amount(Player player, string cardName)
		{
			List<CardInfo> currentCards = player.data.currentCards;
			int num = 0;
			for (int num2 = currentCards.Count - 1; num2 >= 0; num2--)
			{
				if (currentCards[num2].cardName == cardName)
				{
					num++;
				}
			}
			return num;
		}
	}
	public class PreventRecursion
	{
		private static GameObject _stopRecursion;

		internal static GameObject stopRecursion
		{
			get
			{
				//IL_003f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Expected O, but got Unknown
				if ((Object)(object)_stopRecursion != (Object)null)
				{
					return _stopRecursion;
				}
				_stopRecursion = new GameObject("StopRecursion", new Type[2]
				{
					typeof(StopRecursion),
					typeof(DestroyOnUnparentAfterInitialized)
				});
				Object.DontDestroyOnLoad((Object)(object)_stopRecursion);
				return _stopRecursion;
			}
			set
			{
			}
		}

		internal static ObjectsToSpawn stopRecursionObjectToSpawn
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Expected O, but got Unknown
				ObjectsToSpawn val = new ObjectsToSpawn();
				val.AddToProjectile = stopRecursion;
				return val;
			}
			set
			{
			}
		}
	}
	public class DestroyOnUnparentAfterInitialized : MonoBehaviour
	{
		private static bool initialized;

		private bool isOriginal = false;

		private void Start()
		{
			if (!initialized)
			{
				isOriginal = true;
			}
		}

		private void LateUpdate()
		{
			if (!isOriginal && (Object)(object)((Component)this).gameObject.transform.parent == (Object)null)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}
	}
}
namespace EGC.MonoBehaviours
{
	public class GasterBlasterInstantMono : MonoBehaviour
	{
		public class Blast : Gun
		{
		}

		public Player player;

		public Gun gun;

		public CharacterData data;

		public HealthHandler health;

		public Gravity gravity;

		public Block block;

		public GunAmmo gunAmmo;

		public CharacterStatModifiers statModifiers;

		public GasterBlasterMono gasterBlasterSound;

		public Vector2 originPos;

		public Vector2 targetPos;

		public Vector2 direction;

		public Quaternion rotation;

		private Animator animator;

		private RemoveAfterSeconds removeAfterSeconds;

		private void Start()
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: 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)
			removeAfterSeconds = ((Component)this).gameObject.AddComponent<RemoveAfterSeconds>();
			removeAfterSeconds.seconds = 4f;
			((Component)this).gameObject.transform.localScale = new Vector3(1.8f, 1.8f, ((Component)this).transform.localScale.z);
			Color color = ((Component)this).gameObject.GetComponent<Renderer>().material.color;
			((Component)this).gameObject.GetComponent<Renderer>().material.color = new Color(color.r, color.g, color.b, 0f);
			((Component)this).gameObject.GetComponent<Renderer>().sortingLayerName = "MostFront";
			((Component)this).gameObject.GetComponent<Renderer>().sortingOrder = 1048575;
			animator = ((Component)this).GetComponent<Animator>();
			((MonoBehaviour)this).StartCoroutine(shootLaser());
		}

		private void Update()
		{
			if (!(bool)ExtensionMethods.GetFieldValue((object)data.playerVel, "simulated"))
			{
				Debug.Log((object)"Player not simulated !");
				statModifiers.GetAdditionalData().numberOfGaster--;
				Debug.Log((object)$"Minus One Gaster Blaster : {statModifiers.GetAdditionalData().numberOfGaster} total");
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}

		private IEnumerator shootLaser()
		{
			yield return FadeIn();
			animator.SetTrigger("isBlasting");
			AudioController.Play(Assets.GasterBlasterNoise, ((Component)this).transform);
			yield return BlastEffect(player, gun, gunAmmo, data, health, gravity, block, statModifiers);
			yield return (object)new WaitForSeconds(1.2f);
			animator.SetTrigger("isBlasting");
			yield return (object)new WaitForSeconds(0.5f);
			yield return FadeOut();
			statModifiers.GetAdditionalData().numberOfGaster--;
			Debug.Log((object)$"Minus One Gaster Blaster : {statModifiers.GetAdditionalData().numberOfGaster} total");
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}

		private IEnumerator FadeOut()
		{
			while (((Component)this).GetComponent<Renderer>().material.color.a > 0f)
			{
				Color objectColor2 = ((Component)this).GetComponent<Renderer>().material.color;
				float fadeAmount = objectColor2.a - 5f * TimeHandler.deltaTime;
				objectColor2 = new Color(objectColor2.r, objectColor2.g, objectColor2.b, fadeAmount);
				((Component)this).GetComponent<Renderer>().material.color = objectColor2;
				yield return null;
			}
		}

		private IEnumerator FadeIn()
		{
			while (((Component)this).GetComponent<Renderer>().material.color.a < 1f)
			{
				Color objectColor2 = ((Component)this).GetComponent<Renderer>().material.color;
				float fadeAmount = objectColor2.a + 5f * TimeHandler.deltaTime;
				objectColor2 = new Color(objectColor2.r, objectColor2.g, objectColor2.b, fadeAmount);
				((Component)this).GetComponent<Renderer>().material.color = objectColor2;
				yield return null;
			}
		}

		public List<MonoBehaviour> BlastEffect(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			Gun val = (Gun)(object)((Component)player).gameObject.AddComponent<Blast>();
			SpawnBulletsEffect spawnBulletsEffect = ((Component)player).gameObject.AddComponent<SpawnBulletsEffect>();
			spawnBulletsEffect.SetDirection(Vector2.op_Implicit(direction));
			spawnBulletsEffect.SetPosition(Vector2.op_Implicit(originPos));
			spawnBulletsEffect.SetNumBullets(20);
			spawnBulletsEffect.SetTimeBetweenShots(0.004f);
			SpawnBulletsEffect.CopyGunStats(gun, val);
			val.damage = 8f;
			val.damageAfterDistanceMultiplier = 1f;
			val.reflects = 0;
			val.bulletDamageMultiplier = 1f;
			val.projectileSpeed = 2f;
			val.projectielSimulatonSpeed = 1f;
			val.projectileSize = 10f;
			val.projectileColor = Color.white;
			val.spread = 0f;
			val.gravity = 0f;
			val.destroyBulletAfter = 5f;
			val.numberOfProjectiles = 1;
			val.ignoreWalls = true;
			val.damageAfterDistanceMultiplier = 1f;
			val.objectsToSpawn = (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { PreventRecursion.stopRecursionObjectToSpawn };
			Traverse.Create((object)val).Field("spreadOfLastBullet").SetValue((object)0f);
			spawnBulletsEffect.SetGun(val);
			return new List<MonoBehaviour> { (MonoBehaviour)(object)spawnBulletsEffect };
		}
	}
	public class GasterBlasterMono : MonoBehaviour, IPunInstantiateMagicCallback
	{
		private Camera camera;

		public Player player;

		public Gun gun;

		public CharacterData data;

		public HealthHandler health;

		public Gravity gravity;

		public Block block;

		public GunAmmo gunAmmo;

		public CharacterStatModifiers statModifiers;

		private Vector2 targetPos;

		private Vector2 originPos;

		private Vector3 direction;

		private Quaternion rotation;

		private GameObject blasterSprite;

		private AudioSource? gasterBlasterNoise;

		void IPunInstantiateMagicCallback.OnPhotonInstantiate(PhotonMessageInfo info)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			object[] instantiationData = info.photonView.InstantiationData;
			originPos = (Vector2)instantiationData[0];
			rotation = (Quaternion)instantiationData[1];
		}

		public void Start()
		{
			camera = GameObject.Find("MainCamera").GetComponent<Camera>();
			gasterBlasterNoise = ExtensionMethods.GetOrAddComponent<AudioSource>(((Component)this).gameObject, false);
			ProjectileHit component = ((Component)this).gameObject.GetComponent<ProjectileHit>();
			component.AddHitAction((Action)OnHit);
		}

		private void OnHit()
		{
			//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_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_026a: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			//IL_028e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			//IL_029b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			targetPos = Vector2.op_Implicit(((Component)this).gameObject.transform.position);
			Player[] array = PlayerManager.instance.players.ToArray();
			Player[] array2 = array;
			foreach (Player val in array2)
			{
				if ((Object)(object)val == (Object)(object)player || !(Vector2.Distance(targetPos, Vector2.op_Implicit(((Component)val).transform.position)) <= 6f) || statModifiers.GetAdditionalData().numberOfGaster >= 5)
				{
					continue;
				}
				statModifiers.GetAdditionalData().numberOfGaster++;
				Debug.Log((object)$"New GasterBlaster : {statModifiers.GetAdditionalData().numberOfGaster} total");
				for (int j = 0; j <= 100; j++)
				{
					originPos = targetPos + Random.insideUnitCircle * 15f;
					Vector3 val2 = camera.WorldToViewportPoint(Vector2.op_Implicit(originPos));
					if (Is01(val2.x) && Is01(val2.y))
					{
						break;
					}
				}
				direction = Vector2.op_Implicit(targetPos - originPos);
				float num = Mathf.Atan2(direction.y, direction.x) * 57.29578f + 90f;
				rotation = Quaternion.AngleAxis(num, Vector3.forward);
				blasterSprite = PhotonNetwork.Instantiate(((Object)Assets.GasterBlasterSprite).name, Vector2.op_Implicit(originPos), rotation, (byte)0, new object[2] { originPos, rotation });
				GasterBlasterInstantMono gasterBlasterInstantMono = blasterSprite.AddComponent<GasterBlasterInstantMono>();
				gasterBlasterInstantMono.player = player;
				gasterBlasterInstantMono.health = health;
				gasterBlasterInstantMono.block = block;
				gasterBlasterInstantMono.statModifiers = statModifiers;
				gasterBlasterInstantMono.data = data;
				gasterBlasterInstantMono.gravity = gravity;
				gasterBlasterInstantMono.gun = gun;
				gasterBlasterInstantMono.gunAmmo = gunAmmo;
				gasterBlasterInstantMono.originPos = originPos;
				gasterBlasterInstantMono.direction = Vector2.op_Implicit(direction);
				gasterBlasterInstantMono.targetPos = targetPos;
				gasterBlasterInstantMono.rotation = rotation;
				break;
			}
		}

		private bool Is01(float a)
		{
			return a > 0f && a < 1f;
		}
	}
	internal class GestureOfTheDrownedMono : MonoBehaviour
	{
		public Block block;

		public CharacterData data;

		public void Update()
		{
			if (((Behaviour)block).isActiveAndEnabled && (bool)ExtensionMethods.GetFieldValue((object)data.playerVel, "simulated"))
			{
				block.TryBlock();
			}
		}
	}
	internal class GlowingMeteoriteMono : ReversibleEffect
	{
		public class Meteor : Gun
		{
		}

		private float duration = 10f;

		public Player player;

		public Gun gun;

		public CharacterData data;

		public HealthHandler health;

		public Gravity gravity;

		public Block block;

		public GunAmmo gunAmmo;

		public CharacterStatModifiers statModifiers;

		private void OnBlock(BlockTriggerType trigger)
		{
			if (duration <= 0f)
			{
				MeteorEffect(player, gun, gunAmmo, data, health, gravity, block, statModifiers);
				duration = 10f;
			}
			player = ((Component)this).gameObject.GetComponent<Player>();
		}

		public override void OnStart()
		{
			Block obj = block;
			obj.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj.BlockAction, (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock)));
			((ReversibleEffect)this).SetLivesToEffect(int.MaxValue);
			duration = 0f;
		}

		public override void OnUpdate()
		{
			if (!(duration <= 0f))
			{
				duration -= TimeHandler.deltaTime;
			}
		}

		public override void OnOnDestroy()
		{
			duration = 10f;
			block.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(block.BlockAction, new Action<BlockTriggerType>(OnBlock));
		}

		public List<MonoBehaviour> MeteorEffect(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0155: Unknown result type (might be due to invalid IL or missing references)
			Gun val = (Gun)(object)((Component)this).gameObject.AddComponent<Meteor>();
			SpawnBulletsEffect spawnBulletsEffect = ((Component)player).gameObject.AddComponent<SpawnBulletsEffect>();
			spawnBulletsEffect.SetDirection(new Vector3(0f, -1f, 0f));
			spawnBulletsEffect.SetPosition(new Vector3(0f, 100f, 0f));
			spawnBulletsEffect.SetNumBullets(40);
			spawnBulletsEffect.SetTimeBetweenShots(0.03f);
			SpawnBulletsEffect.CopyGunStats(gun, val);
			val.damage = 1.5f;
			val.damageAfterDistanceMultiplier = 1.2f;
			val.reflects = 0;
			val.explodeNearEnemyRange = 6f;
			val.explodeNearEnemyDamage = 2f;
			val.bulletDamageMultiplier = 1f;
			val.projectileSpeed = 1.1f;
			val.projectielSimulatonSpeed = 1f;
			val.projectileSize = 2f;
			val.projectileColor = Color.cyan;
			val.spread = 0.75f;
			val.destroyBulletAfter = 100f;
			val.numberOfProjectiles = 1;
			val.ignoreWalls = false;
			val.damageAfterDistanceMultiplier = 1f;
			val.objectsToSpawn = (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { PreventRecursion.stopRecursionObjectToSpawn };
			spawnBulletsEffect.SetGun(val);
			ColorFlash orAddComponent = ExtensionMethods.GetOrAddComponent<ColorFlash>(((Component)this.player).gameObject, false);
			orAddComponent.SetNumberOfFlashes(10);
			orAddComponent.SetDuration(0.15f);
			orAddComponent.SetDelayBetweenFlashes(0.15f);
			orAddComponent.SetColor(Color.cyan);
			return new List<MonoBehaviour> { (MonoBehaviour)(object)spawnBulletsEffect };
		}
	}
	internal class SomethingMono : MonoBehaviour
	{
		public SoundEvent soundUpgradeChargeLoop;

		private SoundParameterIntensity soundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0);

		[Range(0f, 1f)]
		public float counter;

		public float timeToFill = 5f;

		public float duration = 1f;

		public int numberOfSomething = 0;

		public ProceduralImage outerRing;

		public ProceduralImage fill;

		public Transform rotator;

		public Transform still;

		private CharacterData data;

		private float remainingDuration;

		private bool isDeathAuraComplete;

		private float startCounter;

		public CharacterStatModifiers characterStats;

		private DeathMark? deathMark = null;

		private bool isPlayerMarked = false;

		private bool shouldBeDying = false;

		public float defaultRLTime;

		public Player player;

		private AudioSource? somethingNoise;

		public void Start()
		{
			data = ((Component)this).GetComponentInParent<CharacterData>();
			HealthHandler healthHandler = data.healthHandler;
			healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(ResetStuff));
			((Component)this).GetComponentInParent<ChildRPC>().childRPCs.Add("DeathAura", RPCA_Activate);
			somethingNoise = ExtensionMethods.GetOrAddComponent<AudioSource>(((Component)this).gameObject, false);
		}

		public void OnDestroy()
		{
			HealthHandler healthHandler = data.healthHandler;
			healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(ResetStuff));
			((Component)this).GetComponentInParent<ChildRPC>().childRPCs.Remove("DeathAura");
			somethingNoise = ExtensionMethods.GetOrAddComponent<AudioSource>(((Component)this).gameObject, false);
			shouldBeDying = false;
		}

		private void ResetStuff()
		{
			shouldBeDying = false;
			remainingDuration = 0f;
			counter = 0f;
			if (isDeathAuraComplete)
			{
				isDeathAuraComplete = false;
				isDying(enable: false);
			}
			somethingNoise = ExtensionMethods.GetOrAddComponent<AudioSource>(((Component)this).gameObject, false);
		}

		private void isDying(bool enable)
		{
			if (enable)
			{
				deathMark = ((Component)player).gameObject.AddComponent<DeathMark>();
				if ((Object)(object)somethingNoise != (Object)null)
				{
					somethingNoise.PlayOneShot(Assets.SomethingNoise, 0.7f * Optionshandler.vol_Master * Optionshandler.vol_Sfx);
					somethingNoise = null;
				}
				ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)Unbound.Instance, 4f, (Action)delegate
				{
					//IL_0034: Unknown result type (might be due to invalid IL or missing references)
					if (shouldBeDying)
					{
						player.data.view.RPC("RPCA_Die", (RpcTarget)0, new object[1] { (object)new Vector2(0f, 1f) });
					}
				});
			}
			else if ((Object)(object)deathMark != (Object)null)
			{
				Object.Destroy((Object)(object)deathMark);
				deathMark = null;
			}
		}

		private void RPCA_Activate()
		{
			remainingDuration = duration;
		}

		private void Update()
		{
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			soundParameterIntensity.intensity = counter;
			((Image)outerRing).fillAmount = counter;
			((Image)fill).fillAmount = counter;
			((Component)rotator).transform.localEulerAngles = new Vector3(0f, 0f, 0f - Mathf.Lerp(0f, 360f, counter));
			if (!(bool)ExtensionMethods.GetFieldValue((object)data.playerVel, "simulated"))
			{
				startCounter = 1f;
				return;
			}
			startCounter -= TimeHandler.deltaTime;
			if (startCounter > 0f)
			{
				return;
			}
			if (remainingDuration > 0f)
			{
				if (!isDeathAuraComplete)
				{
					shouldBeDying = true;
					isDying(enable: true);
				}
				remainingDuration -= TimeHandler.deltaTime;
				counter = remainingDuration / duration;
				return;
			}
			if (isDeathAuraComplete)
			{
				isDying(enable: false);
			}
			try
			{
				if (data.input.direction == Vector3.zero || data.input.direction == Vector3.down || ((data.input.direction == Vector3.up) & data.isGrounded))
				{
					counter += TimeHandler.deltaTime / timeToFill;
				}
			}
			catch (Exception ex)
			{
				Debug.Log((object)"First Catch");
				Debug.LogException(ex);
			}
			try
			{
				counter = Mathf.Clamp(counter, -0.1f / timeToFill, 1f);
				if (counter >= 1f && data.view.IsMine)
				{
					remainingDuration = duration;
					((Component)this).GetComponentInParent<ChildRPC>().CallFunction("DeathAura");
				}
			}
			catch (Exception ex2)
			{
				Debug.Log((object)"Second Catch");
				Debug.LogException(ex2);
			}
			try
			{
				if (counter <= 0f)
				{
					((Component)rotator).gameObject.SetActive(false);
					((Component)still).gameObject.SetActive(false);
				}
				else
				{
					((Component)rotator).gameObject.SetActive(true);
					((Component)still).gameObject.SetActive(true);
				}
			}
			catch (Exception ex3)
			{
				Debug.Log((object)"Last Catch");
				Debug.LogException(ex3);
			}
		}

		public void Destroy()
		{
			ResetStuff();
			Object.Destroy((Object)(object)this);
		}
	}
	public class DeathMark : ReversibleEffect
	{
		private readonly Color color = Color.black;

		private ReversibleColorEffect colorEffect = null;

		public override void OnOnEnable()
		{
			if ((Object)(object)colorEffect != (Object)null)
			{
				((ColorEffect)colorEffect).Destroy();
			}
		}

		public override void OnStart()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			colorEffect = ((Component)base.player).gameObject.AddComponent<ReversibleColorEffect>();
			((ColorEffect)colorEffect).SetColor(color);
			colorEffect.SetLivesToEffect(1);
		}

		public override void OnOnDisable()
		{
			if ((Object)(object)colorEffect != (Object)null)
			{
				((ColorEffect)colorEffect).Destroy();
			}
		}

		public override void OnOnDestroy()
		{
			if ((Object)(object)colorEffect != (Object)null)
			{
				((ColorEffect)colorEffect).Destroy();
			}
		}
	}
}
namespace EGC.Extensions
{
	[Serializable]
	public class CharacterDataAdditionalData
	{
		public OutOfBoundsHandler outOfBoundsHandler;

		public CharacterDataAdditionalData()
		{
			outOfBoundsHandler = null;
		}
	}
	public static class CharacterDataExtension
	{
		public static readonly ConditionalWeakTable<CharacterData, CharacterDataAdditionalData> data = new ConditionalWeakTable<CharacterData, CharacterDataAdditionalData>();

		public static CharacterDataAdditionalData GetAdditionalData(this CharacterData characterData)
		{
			return data.GetOrCreateValue(characterData);
		}

		public static void AddData(this CharacterData characterData, CharacterDataAdditionalData value)
		{
			try
			{
				data.Add(characterData, value);
			}
			catch (Exception)
			{
			}
		}
	}
	[HarmonyPatch(typeof(OutOfBoundsHandler), "Start")]
	internal class OutOfBoundsHandlerPatchStart
	{
		private static void Postfix(OutOfBoundsHandler __instance)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			//IL_005f: 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_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Expected O, but got Unknown
			if (!((Object)(object)CharacterDataExtension.GetAdditionalData((CharacterData)Traverse.Create((object)__instance).Field("data").GetValue()).outOfBoundsHandler == (Object)null))
			{
				return;
			}
			OutOfBoundsHandler[] array = Object.FindObjectsOfType<OutOfBoundsHandler>();
			OutOfBoundsHandler[] array2 = array;
			foreach (OutOfBoundsHandler val in array2)
			{
				if (((CharacterData)Traverse.Create((object)val).Field("data").GetValue()).player.playerID == ((CharacterData)Traverse.Create((object)__instance).Field("data").GetValue()).player.playerID)
				{
					CharacterDataExtension.GetAdditionalData((CharacterData)Traverse.Create((object)__instance).Field("data").GetValue()).outOfBoundsHandler = val;
					break;
				}
			}
		}
	}
	[Serializable]
	public class CharacterStatModifiersAdditionalData
	{
		public int markovChoice;

		public int egocentrismPower;

		public int numberOfGaster;

		public bool hasBooMush;

		public bool hasOneUpMush;

		public bool hasPoisonMush;

		public bool hasMiniMush;

		public CharacterStatModifiersAdditionalData()
		{
			markovChoice = 0;
			egocentrismPower = 0;
			numberOfGaster = 0;
			hasOneUpMush = false;
			hasPoisonMush = false;
			hasBooMush = false;
			hasMiniMush = false;
		}
	}
	public static class CharacterStatModifiersExtension
	{
		public static readonly ConditionalWeakTable<CharacterStatModifiers, CharacterStatModifiersAdditionalData> data = new ConditionalWeakTable<CharacterStatModifiers, CharacterStatModifiersAdditionalData>();

		public static CharacterStatModifiersAdditionalData GetAdditionalData(this CharacterStatModifiers characterstats)
		{
			return data.GetOrCreateValue(characterstats);
		}

		public static void AddData(this CharacterStatModifiers characterstats, CharacterStatModifiersAdditionalData value)
		{
			try
			{
				data.Add(characterstats, value);
			}
			catch (Exception)
			{
			}
		}
	}
	[HarmonyPatch(typeof(CharacterStatModifiers), "ResetStats")]
	internal class CharacterStatModifiersPatchResetStats
	{
		private static void Prefix(CharacterStatModifiers __instance)
		{
			__instance.GetAdditionalData().markovChoice = 0;
		}
	}
	[Serializable]
	public class GunAdditionalData
	{
		public int fragmentationProjectiles;

		public int fireworkProjectiles;

		public int wraps;

		public bool allowStop;

		public bool canBeLaser;

		public bool isLaser;

		public GameObject laserGun;

		public GunAdditionalData()
		{
			fragmentationProjectiles = 0;
			fireworkProjectiles = 0;
			wraps = 0;
			allowStop = false;
			canBeLaser = false;
			isLaser = false;
			laserGun = null;
		}
	}
	public static class GunExtension
	{
		public static readonly ConditionalWeakTable<Gun, GunAdditionalData> data = new ConditionalWeakTable<Gun, GunAdditionalData>();

		public static GunAdditionalData GetAdditionalData(this Gun gun)
		{
			return data.GetOrCreateValue(gun);
		}

		public static void AddData(this Gun gun, GunAdditionalData value)
		{
			try
			{
				data.Add(gun, value);
			}
			catch (Exception)
			{
			}
		}
	}
	[HarmonyPatch(typeof(Gun), "ApplyProjectileStats")]
	internal class GunPatchApplyProjectileStats
	{
		private static void Prefix(Gun __instance, GameObject obj, int numOfProj = 1, float damageM = 1f, float randomSeed = 0f)
		{
			MoveTransform component = obj.GetComponent<MoveTransform>();
			component.allowStop = __instance.GetAdditionalData().allowStop;
		}
	}
	[HarmonyPatch(typeof(Gun), "ResetStats")]
	internal class GunPatchResetStats
	{
		private static void Prefix(Gun __instance)
		{
			__instance.GetAdditionalData().fragmentationProjectiles = 0;
			__instance.GetAdditionalData().fireworkProjectiles = 0;
			__instance.GetAdditionalData().wraps = 0;
			__instance.GetAdditionalData().allowStop = false;
			__instance.GetAdditionalData().canBeLaser = false;
			__instance.GetAdditionalData().isLaser = false;
			__instance.GetAdditionalData().laserGun = null;
		}
	}
	public class SpawnBulletsEffect : MonoBehaviour
	{
		private float initialDelay = 1f;

		private int numBullets = 1;

		private int numShot = 0;

		private Gun gunToShootFrom = null;

		private List<Vector3> directionsToShoot = new List<Vector3>();

		private List<Vector3> positionsToShootFrom = new List<Vector3>();

		private float timeBetweenShots = 0f;

		private float timeSinceLastShot;

		private GameObject newWeaponsBase;

		private Player player;

		private void Awake()
		{
			player = ((Component)this).gameObject.GetComponent<Player>();
		}

		private void Start()
		{
			ResetTimer();
			timeSinceLastShot += initialDelay;
		}

		private void Update()
		{
			if (numShot >= numBullets || (Object)(object)gunToShootFrom == (Object)null)
			{
				Object.Destroy((Object)(object)this);
			}
			else if (Time.time >= timeSinceLastShot + timeBetweenShots)
			{
				Shoot();
			}
		}

		private void OnDisable()
		{
			Object.Destroy((Object)(object)this);
		}

		private void OnDestroy()
		{
			Object.Destroy((Object)(object)newWeaponsBase);
		}

		private void Shoot()
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//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_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			int num = (gunToShootFrom.lockGunToDefault ? 1 : (gunToShootFrom.numberOfProjectiles + Mathf.RoundToInt(gunToShootFrom.chargeNumberOfProjectilesTo * 0f)));
			for (int i = 0; i < gunToShootFrom.projectiles.Length; i++)
			{
				for (int j = 0; j < num; j++)
				{
					Vector3 val = ((directionsToShoot.Count != 0) ? directionsToShoot[numShot % directionsToShoot.Count] : Vector3.down);
					if (gunToShootFrom.spread != 0f)
					{
						float multiplySpread = gunToShootFrom.multiplySpread;
						float num2 = Random.Range(0f - gunToShootFrom.spread, gunToShootFrom.spread);
						num2 /= (1f + gunToShootFrom.projectileSpeed * 0.5f) * 0.5f;
						val += Vector3.Cross(val, Vector3.forward) * num2 * multiplySpread;
					}
					if ((bool)typeof(Gun).InvokeMember("CheckIsMine", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, gunToShootFrom, new object[0]))
					{
						Vector3 val2 = ((positionsToShootFrom.Count != 0) ? positionsToShootFrom[numShot % positionsToShootFrom.Count] : Vector3.zero);
						GameObject val3 = PhotonNetwork.Instantiate(((Object)gunToShootFrom.projectiles[i].objectToSpawn.gameObject).name, val2, Quaternion.LookRotation(val), (byte)0, (object[])null);
						if (PhotonNetwork.OfflineMode)
						{
							RPCA_Shoot(val3.GetComponent<PhotonView>().ViewID, num, 1f, Random.Range(0f, 1f));
							continue;
						}
						((Component)this).gameObject.GetComponent<PhotonView>().RPC("RPCA_Shoot", (RpcTarget)0, new object[4]
						{
							val3.GetComponent<PhotonView>().ViewID,
							num,
							1f,
							Random.Range(0f, 1f)
						});
					}
				}
			}
			ResetTimer();
		}

		[PunRPC]
		private void RPCA_Shoot(int bulletViewID, int numProj, float dmgM, float seed)
		{
			GameObject gameObject = ((Component)PhotonView.Find(bulletViewID)).gameObject;
			gunToShootFrom.BulletInit(gameObject, numProj, dmgM, seed, true);
			numShot++;
		}

		public void SetGun(Gun gun)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Expected O, but got Unknown
			newWeaponsBase = Object.Instantiate<GameObject>(((Component)((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>()).gameObject, new Vector3(500f, 500f, -100f), Quaternion.identity);
			Object.DontDestroyOnLoad((Object)(object)newWeaponsBase);
			foreach (Transform item in newWeaponsBase.transform)
			{
				Transform val = item;
				if ((Object)(object)((Component)val).GetComponentInChildren<Renderer>() != (Object)null)
				{
					Renderer[] componentsInChildren = ((Component)val).GetComponentsInChildren<Renderer>();
					foreach (Renderer val2 in componentsInChildren)
					{
						val2.enabled = false;
					}
				}
			}
			gunToShootFrom = newWeaponsBase.GetComponent<Gun>();
			CopyGunStats(gun, gunToShootFrom);
		}

		public void SetNumBullets(int num)
		{
			numBullets = num;
		}

		public void SetPosition(Vector3 pos)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			positionsToShootFrom = new List<Vector3> { pos };
		}

		public void SetDirection(Vector3 dir)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			directionsToShoot = new List<Vector3> { dir };
		}

		public void SetPositions(List<Vector3> pos)
		{
			positionsToShootFrom = pos;
		}

		public void SetDirections(List<Vector3> dir)
		{
			directionsToShoot = dir;
		}

		public void SetTimeBetweenShots(float delay)
		{
			timeBetweenShots = delay;
		}

		public void SetInitialDelay(float delay)
		{
			initialDelay = delay;
		}

		private void ResetTimer()
		{
			timeSinceLastShot = Time.time;
		}

		public static void CopyGunStats(Gun copyFromGun, Gun copyToGun)
		{
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0412: Unknown result type (might be due to invalid IL or missing references)
			copyToGun.ammo = copyFromGun.ammo;
			copyToGun.ammoReg = copyFromGun.ammoReg;
			copyToGun.attackID = copyFromGun.attackID;
			copyToGun.attackSpeed = copyFromGun.attackSpeed;
			copyToGun.attackSpeedMultiplier = copyFromGun.attackSpeedMultiplier;
			copyToGun.bodyRecoil = copyFromGun.bodyRecoil;
			copyToGun.bulletDamageMultiplier = copyFromGun.bulletDamageMultiplier;
			copyToGun.bulletPortal = copyFromGun.bulletPortal;
			copyToGun.bursts = copyFromGun.bursts;
			copyToGun.chargeDamageMultiplier = copyFromGun.chargeDamageMultiplier;
			copyToGun.chargeEvenSpreadTo = copyFromGun.chargeEvenSpreadTo;
			copyToGun.chargeNumberOfProjectilesTo = copyFromGun.chargeNumberOfProjectilesTo;
			copyToGun.chargeRecoilTo = copyFromGun.chargeRecoilTo;
			copyToGun.chargeSpeedTo = copyFromGun.chargeSpeedTo;
			copyToGun.chargeSpreadTo = copyFromGun.chargeSpreadTo;
			copyToGun.cos = copyFromGun.cos;
			copyToGun.currentCharge = copyFromGun.currentCharge;
			copyToGun.damage = copyFromGun.damage;
			copyToGun.damageAfterDistanceMultiplier = copyFromGun.damageAfterDistanceMultiplier;
			copyToGun.defaultCooldown = copyFromGun.defaultCooldown;
			copyToGun.dmgMOnBounce = copyFromGun.dmgMOnBounce;
			copyToGun.dontAllowAutoFire = copyFromGun.dontAllowAutoFire;
			copyToGun.drag = copyFromGun.drag;
			copyToGun.dragMinSpeed = copyFromGun.dragMinSpeed;
			copyToGun.evenSpread = copyFromGun.evenSpread;
			copyToGun.explodeNearEnemyDamage = copyFromGun.explodeNearEnemyDamage;
			copyToGun.explodeNearEnemyRange = copyFromGun.explodeNearEnemyRange;
			copyToGun.forceSpecificAttackSpeed = copyFromGun.forceSpecificAttackSpeed;
			copyToGun.forceSpecificShake = copyFromGun.forceSpecificShake;
			copyToGun.gravity = copyFromGun.gravity;
			copyToGun.hitMovementMultiplier = copyFromGun.hitMovementMultiplier;
			copyToGun.ignoreWalls = copyFromGun.ignoreWalls;
			copyToGun.isProjectileGun = copyFromGun.isProjectileGun;
			copyToGun.isReloading = copyFromGun.isReloading;
			copyToGun.knockback = copyFromGun.knockback;
			copyToGun.lockGunToDefault = copyFromGun.lockGunToDefault;
			copyToGun.multiplySpread = copyFromGun.multiplySpread;
			copyToGun.numberOfProjectiles = copyFromGun.numberOfProjectiles;
			copyToGun.objectsToSpawn = copyFromGun.objectsToSpawn;
			copyToGun.overheatMultiplier = copyFromGun.overheatMultiplier;
			copyToGun.percentageDamage = copyFromGun.percentageDamage;
			copyToGun.player = copyFromGun.player;
			copyToGun.projectielSimulatonSpeed = copyFromGun.projectielSimulatonSpeed;
			copyToGun.projectileColor = copyFromGun.projectileColor;
			copyToGun.projectiles = copyFromGun.projectiles;
			copyToGun.projectileSize = copyFromGun.projectileSize;
			copyToGun.projectileSpeed = copyFromGun.projectileSpeed;
			copyToGun.randomBounces = copyFromGun.randomBounces;
			copyToGun.recoil = copyFromGun.recoil;
			copyToGun.recoilMuiltiplier = copyFromGun.recoilMuiltiplier;
			copyToGun.reflects = copyFromGun.reflects;
			copyToGun.reloadTime = copyFromGun.reloadTime;
			copyToGun.reloadTimeAdd = copyFromGun.reloadTimeAdd;
			copyToGun.shake = copyFromGun.shake;
			copyToGun.shakeM = copyFromGun.shakeM;
			copyToGun.ShootPojectileAction = copyFromGun.ShootPojectileAction;
			((Weapon)copyToGun).sinceAttack = ((Weapon)copyFromGun).sinceAttack;
			copyToGun.size = copyFromGun.size;
			copyToGun.slow = copyFromGun.slow;
			copyToGun.smartBounce = copyFromGun.smartBounce;
			copyToGun.spawnSkelletonSquare = copyFromGun.spawnSkelletonSquare;
			copyToGun.speedMOnBounce = copyFromGun.speedMOnBounce;
			copyToGun.spread = copyFromGun.spread;
			copyToGun.teleport = copyFromGun.teleport;
			copyToGun.timeBetweenBullets = copyFromGun.timeBetweenBullets;
			copyToGun.timeToReachFullMovementMultiplier = copyFromGun.timeToReachFullMovementMultiplier;
			copyToGun.unblockable = copyFromGun.unblockable;
			copyToGun.useCharge = copyFromGun.useCharge;
			copyToGun.waveMovement = copyFromGun.waveMovement;
			copyToGun.GetAdditionalData().allowStop = copyFromGun.GetAdditionalData().allowStop;
			Traverse.Create((object)copyToGun).Field("attackAction").SetValue((object)(Action)Traverse.Create((object)copyFromGun).Field("attackAction").GetValue());
			Traverse.Create((object)copyToGun).Field("gunID").SetValue((object)(int)Traverse.Create((object)copyFromGun).Field("gunID").GetValue());
			Traverse.Create((object)copyToGun).Field("spreadOfLastBullet").SetValue((object)(float)Traverse.Create((object)copyFromGun).Field("spreadOfLastBullet").GetValue());
			Traverse.Create((object)copyToGun).Field("forceShootDir").SetValue((object)(Vector3)Traverse.Create((object)copyFromGun).Field("forceShootDir").GetValue());
		}

		public void Destroy()
		{
			Object.Destroy((Object)(object)this);
		}
	}
}
namespace EGC.Cards
{
	internal class BeadsOfFealty : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			statModifiers.regen = 5f;
			statModifiers.health = 1.1f;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			Player player2 = player;
			ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Unbound.Instance, 25, (Action)delegate
			{
				CharacterStatModifiersExtension.GetAdditionalData(player2.data.stats).blacklistedCategories.Remove(ExtraGameCards.Lunar);
			});
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			Player player2 = player;
			ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Unbound.Instance, 25, (Action)delegate
			{
				CharacterStatModifiersExtension.GetAdditionalData(player2.data.stats).blacklistedCategories.Add(ExtraGameCards.Lunar);
			});
		}

		protected override string GetTitle()
		{
			return "Beads of Fealty";
		}

		protected override string GetDescription()
		{
			return "Seems to do nothing... <color=#c61a09>but...</color>";
		}

		protected override GameObject GetCardArt()
		{
			return Assets.BeadsArt;
		}

		protected override Rarity GetRarity()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (Rarity)1;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_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 = "+10%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Regen",
					amount = "+3",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

		protected override CardThemeColorType GetTheme()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (CardThemeColorType)7;
		}

		public override string GetModName()
		{
			return "EGC";
		}
	}
	public class BoneLord : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			statModifiers.health = 1.4f;
			gun.damage = 1.4f;
			gun.knockback = 1.6f;
			gun.projectileSpeed = 1.4f;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			((MonoBehaviour)ExtraGameCards.Instance).StartCoroutine(RemoveRandomCardOfPlayer(player));
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "Boon Of The Bone Lord";
		}

		protected override string GetDescription()
		{
			return "<color=#DC0027>It requires a sacrifice.</color>";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (Rarity)2;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_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
			return (CardInfoStat[])(object)new CardInfoStat[4]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Health",
					amount = "+40%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Knockback",
					amount = "+60%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Damage",
					amount = "+40%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Bullet Speed",
					amount = "+40%",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

		protected override CardThemeColorType GetTheme()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (CardThemeColorType)4;
		}

		public override string GetModName()
		{
			return "EGC";
		}

		private IEnumerator RemoveRandomCardOfPlayer(Player player, int numberOfCardToRemove = 1)
		{
			yield return (object)new WaitForSeconds(0.5f);
			Random random = new Random();
			for (int i = 0; i < numberOfCardToRemove; i++)
			{
				List<CardInfo> playerCards = player.data.currentCards;
				Debug.Log((object)("there is " + playerCards.Count + " cards on this player"));
				if (player.data.currentCards.Count - 1 <= 0)
				{
					yield return null;
				}
				int tries = 0;
				while (tries <= 50)
				{
					tries++;
					int randomCardIdx = random.Next(0, playerCards.Count - 1);
					CardInfo card = playerCards[randomCardIdx];
					if (!Cards.instance.CardIsNotBlacklisted(card, (CardCategory[])(object)new CardCategory[2]
					{
						CustomCardCategories.instance.CardCategory("CardManipulation"),
						CustomCardCategories.instance.CardCategory("NoRemove")
					}) || !Cards.instance.PlayerIsAllowedCard(player, card))
					{
						continue;
					}
					Debug.Log((object)("Trying to remove : " + card.cardName));
					yield return Cards.instance.RemoveCardFromPlayer(player, playerCards[randomCardIdx], (SelectionType)1);
					Debug.Log((object)"Success!");
					break;
				}
			}
		}
	}
	internal class BulletThatSootGuns : SimpleCard
	{
		public override CardDetails Details
		{
			get
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Expected O, but got Unknown
				//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_0057: Unknown result type (might be due to invalid IL or missing references)
				//IL_0062: Unknown result type (might be due to invalid IL or missing references)
				//IL_006d: Unknown result type (might be due to invalid IL or missing references)
				//IL_006f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0075: Expected O, but got Unknown
				//IL_0077: Unknown result type (might be due to invalid IL or missing references)
				//IL_007c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0083: 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_0099: Unknown result type (might be due to invalid IL or missing references)
				//IL_009b: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a1: Expected O, but got Unknown
				//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00af: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cd: Expected O, but got Unknown
				//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00db: 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)
				//IL_00f1: 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_00f9: Expected O, but got Unknown
				CardDetails val = new CardDetails();
				val.Title = "Bullet Gun";
				val.Description = "The bullet that shoot guns!";
				val.ModName = "EGC";
				val.Art = null;
				val.Rarity = (Rarity)1;
				val.Theme = (CardThemeColorType)1;
				val.Stats = (CardInfoStat[])(object)new CardInfoStat[4]
				{
					new CardInfoStat
					{
						positive = false,
						stat = "Attack Speed",
						amount = "-30%",
						simepleAmount = (SimpleAmount)0
					},
					new CardInfoStat
					{
						positive = false,
						stat = "Damage",
						amount = "-30%",
						simepleAmount = (SimpleAmount)0
					},
					new CardInfoStat
					{
						positive = false,
						stat = "Bullet Speed",
						amount = "-30%",
						simepleAmount = (SimpleAmount)0
					},
					new CardInfoStat
					{
						positive = false,
						stat = "Reload Speed",
						amount = "-30%",
						simepleAmount = (SimpleAmount)0
					}
				};
				return val;
			}
		}

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			gun.reloadTime = 1.3f;
			gun.projectileSpeed = 0.7f;
			gun.attackSpeed = 1.3f;
			gun.damage = 0.7f;
		}
	}
	internal class GasterBlaster : CustomEffectCard<BlastEffect>
	{
		public override CardDetails<BlastEffect> Details
		{
			get
			{
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0060: Unknown result type (might be due to invalid IL or missing references)
				//IL_0065: Unknown result type (might be due to invalid IL or missing references)
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0077: Unknown result type (might be due to invalid IL or missing references)
				//IL_0082: Unknown result type (might be due to invalid IL or missing references)
				//IL_0084: Unknown result type (might be due to invalid IL or missing references)
				//IL_008a: Expected O, but got Unknown
				//IL_008c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0091: Unknown result type (might be due to invalid IL or missing references)
				//IL_0098: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b6: Expected O, but got Unknown
				//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00da: 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: Expected O, but got Unknown
				//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
				//IL_0106: Unknown result type (might be due to invalid IL or missing references)
				//IL_0108: Unknown result type (might be due to invalid IL or missing references)
				//IL_010e: Expected O, but got Unknown
				CardDetails<BlastEffect> val = new CardDetails<BlastEffect>();
				val.Title = "Gaster Blaster";
				val.Description = "your opponents are gonna have a bad time";
				val.ModName = "EGC";
				val.Art = Assets.GasterBlasterArt;
				val.Rarity = RarityUtils.GetRarity("Legendary");
				val.Theme = (CardThemeColorType)3;
				val.OwnerOnly = true;
				val.Stats = (CardInfoStat[])(object)new CardInfoStat[4]
				{
					new CardInfoStat
					{
						positive = true,
						stat = "Attack Speed",
						amount = "+20%",
						simepleAmount = (SimpleAmount)0
					},
					new CardInfoStat
					{
						positive = true,
						stat = "Ammo",
						amount = "+2",
						simepleAmount = (SimpleAmount)0
					},
					new CardInfoStat
					{
						positive = false,
						stat = "Damage",
						amount = "-20%",
						simepleAmount = (SimpleAmount)0
					},
					new CardInfoStat
					{
						positive = false,
						stat = "Health",
						amount = "-30%",
						simepleAmount = (SimpleAmount)0
					}
				};
				return val;
			}
		}

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			statModifiers.health = 0.7f;
			gun.attackSpeed = 0.8f;
			gun.damage = 0.8f;
			gun.ammo = 2;
		}
	}
	public class BlastEffect : CardEffect
	{
		public override void OnShoot(GameObject projectile)
		{
			ProjectileHit component = projectile.GetComponent<ProjectileHit>();
			Gun component2 = ((Component)((Component)((CardEffect)this).player).GetComponent<Holding>().holdable).GetComponent<Gun>();
			if (!((Object)(object)component.ownWeapon != (Object)(object)((Component)component2).gameObject))
			{
				SpawnedAttack component3 = projectile.GetComponent<SpawnedAttack>();
				if (Object.op_Implicit((Object)(object)component3))
				{
					Debug.Log((object)"Was shoot by player");
					GasterBlasterSpawner gasterBlasterSpawner = projectile.AddComponent<GasterBlasterSpawner>();
					gasterBlasterSpawner.playerID = ((CardEffect)this).player.playerID;
				}
			}
		}
	}
	public class GasterBlasterSpawner : RayHitEffect
	{
		private bool done;

		private Quaternion rotation;

		private Vector2 originPosition;

		public int playerID;

		public override HasToReturn DoHitEffect(HitInfo hit)
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: 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_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: 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_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			if (done || GasterBlasterBehaviour.maxGasterCount <= GasterBlasterBehaviour.gasterCount || (!PhotonNetwork.IsMasterClient && !PhotonNetwork.OfflineMode))
			{
				return (HasToReturn)1;
			}
			Vector3 position = ((Component)this).transform.position;
			Transform transform = ((Component)PlayerManager.instance.GetClosestPlayer(Vector2.op_Implicit(position), false)).transform;
			if ((Object)(object)transform == (Object)null)
			{
				return (HasToReturn)1;
			}
			if ((Object)(object)((Component)transform).GetComponent<Player>() == (Object)(object)ExtensionMethods.GetPlayerWithID(PlayerManager.instance, playerID))
			{
				return (HasToReturn)1;
			}
			if (Vector2.Distance(Vector2.op_Implicit(transform.position), Vector2.op_Implicit(position)) >= 6f)
			{
				return (HasToReturn)1;
			}
			Vector2 val = CalculatePosition(Vector2.op_Implicit(transform.position));
			Quaternion val2 = CalculateRotation(Vector2.op_Implicit(transform.position), val);
			Vector2 val3 = Vector2.op_Implicit(transform.position) - val;
			Debug.Log((object)"Good range + good number !");
			NetworkingManager.RPC(typeof(GasterBlasterSpawner), "RPC_SpawnGaster", new object[4] { val, val2, val3, playerID });
			done = true;
			return (HasToReturn)1;
		}

		[UnboundRPC]
		public static void RPC_SpawnGaster(Vector2 position, Quaternion rotation, Vector2 direction, int playerID)
		{
			//IL_002e: 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_0034: 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_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			Debug.Log((object)"Spawning GasterBlaster");
			if (PhotonNetwork.IsMasterClient || PhotonNetwork.OfflineMode)
			{
				GasterBlasterBehaviour gasterBlasterBehaviour = PhotonNetwork.Instantiate(((Object)Assets.GasterBlasterSprite).name, Vector2.op_Implicit(position), rotation, (byte)0, new object[2] { position, rotation }).AddComponent<GasterBlasterBehaviour>();
				gasterBlasterBehaviour.playerID = playerID;
				gasterBlasterBehaviour.direction = direction;
			}
		}

		private Quaternion CalculateRotation(Vector2 target, Vector2 position)
		{
			//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_0003: 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_000f: 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_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0041: Unknown result type (might be due to invalid IL or missing references)
			Vector2 val = target - position;
			float num = Mathf.Atan2(val.y, val.x) * 57.29578f + 90f;
			rotation = Quaternion.AngleAxis(num, Vector3.forward);
			return rotation;
		}

		private Vector2 CalculatePosition(Vector2 target)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//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_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			Vector2 val = Vector2.zero;
			Camera component = GameObject.Find("MainCamera").GetComponent<Camera>();
			for (int i = 0; i <= 50; i++)
			{
				val = target + Random.insideUnitCircle * 15f;
				Vector3 val2 = component.WorldToViewportPoint(Vector2.op_Implicit(val));
				if (Is01(val2.x) && Is01(val2.y))
				{
					break;
				}
			}
			return val;
		}

		private bool Is01(float a)
		{
			return a > 0f && a < 1f;
		}
	}
	public class GasterBlasterBehaviour : MonoBehaviour
	{
		public class Blast : Gun
		{
		}

		internal static int gasterCount = 0;

		internal static readonly int maxGasterCount = 5;

		public int playerID;

		public Vector2 direction;

		private Player player;

		private Gun gun;

		private PhotonView view;

		private Animator animator;

		private Renderer renderer;

		private RemoveAfterSeconds removeAfterSeconds;

		private void Awake()
		{
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			animator = ((Component)this).GetComponent<Animator>();
			view = ((Component)this).GetComponent<PhotonView>();
			renderer = ((Component)this).gameObject.GetComponent<Renderer>();
			removeAfterSeconds = ((Component)this).gameObject.AddComponent<RemoveAfterSeconds>();
			removeAfterSeconds.seconds = 5f;
			renderer.material.color = new Color(renderer.material.color.r, renderer.material.color.g, renderer.material.color.b, 0f);
			renderer.sortingLayerName = "MostFront";
			renderer.sortingOrder = 1048575;
			gasterCount++;
		}

		private void Start()
		{
			//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)
			Debug.Log((object)"Starting GasterBlaster");
			((Component)this).gameObject.transform.localScale = new Vector3(1.8f, 1.8f, ((Component)this).transform.localScale.z);
			player = ExtensionMethods.GetPlayerWithID(PlayerManager.instance, playerID);
			gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>();
			ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)this, 0.1f, (Action)delegate
			{
				//IL_001b: 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)
				view.RPC("RPC_ShootLaser", (RpcTarget)0, new object[2]
				{
					((Component)this).transform.position,
					direction
				});
			});
		}

		[PunRPC]
		private void RPC_ShootLaser(Vector3 position, Vector2 direction)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			Debug.Log((object)"Starting RPC shoot laser");
			((MonoBehaviour)this).StartCoroutine(ShootLaser(position, direction));
		}

		private IEnumerator ShootLaser(Vector3 position, Vector2 direction)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			yield return FadeIn();
			animator.SetTrigger("isBlasting");
			AudioController.Play(Assets.GasterBlasterNoise, ((Component)this).transform);
			yield return BlastEffect(player, gun, position, direction);
			yield return (object)new WaitForSeconds(1.2f);
			animator.SetTrigger("isBlasting");
			yield return (object)new WaitForSeconds(0.5f);
			yield return FadeOut();
			if (PhotonNetwork.IsMasterClient || PhotonNetwork.OfflineMode)
			{
				ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Unbound.Instance, 1, (Action)delegate
				{
					PhotonNetwork.Destroy(((Component)this).gameObject);
				});
			}
		}

		private IEnumerator FadeOut()
		{
			while (((Component)this).GetComponent<Renderer>().material.color.a > 0f)
			{
				Color objectColor2 = ((Component)this).GetComponent<Renderer>().material.color;
				float fadeAmount = objectColor2.a - 5f * TimeHandler.deltaTime;
				objectColor2 = new Color(objectColor2.r, objectColor2.g, objectColor2.b, fadeAmount);
				((Component)this).GetComponent<Renderer>().material.color = objectColor2;
				yield return null;
			}
		}

		private IEnumerator FadeIn()
		{
			while (((Component)this).GetComponent<Renderer>().material.color.a < 1f)
			{
				Color objectColor2 = ((Component)this).GetComponent<Renderer>().material.color;
				float fadeAmount = objectColor2.a + 5f * TimeHandler.deltaTime;
				objectColor2 = new Color(objectColor2.r, objectColor2.g, objectColor2.b, fadeAmount);
				((Component)this).GetComponent<Renderer>().material.color = objectColor2;
				yield return null;
			}
		}

		public List<MonoBehaviour> BlastEffect(Player player, Gun gun, Vector3 position, Vector2 direction)
		{
			//IL_0049: 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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			Debug.Log((object)"Starting BlastEffect");
			Gun val = (Gun)(object)((Component)player).gameObject.AddComponent<Blast>();
			SpawnBulletsEffect spawnBulletsEffect = ((Component)player).gameObject.AddComponent<SpawnBulletsEffect>();
			float num = player.data.weaponHandler.gun.damage / 4f;
			float projectileSize = 1f / num;
			spawnBulletsEffect.SetDirection(Vector2.op_Implicit(direction));
			spawnBulletsEffect.SetPosition(position);
			spawnBulletsEffect.SetNumBullets(25);
			spawnBulletsEffect.SetTimeBetweenShots(0.004f);
			SpawnBulletsEffect.CopyGunStats(gun, val);
			val.damage = num;
			val.damageAfterDistanceMultiplier = 1f;
			val.reflects = 0;
			val.bulletDamageMultiplier = 1f;
			val.projectileSpeed = 2f;
			val.projectielSimulatonSpeed = 1.1f;
			val.projectileSize = projectileSize;
			val.projectileColor = Color.white;
			val.spread = 0f;
			val.gravity = 0f;
			val.destroyBulletAfter = 5f;
			val.numberOfProjectiles = 1;
			val.ignoreWalls = true;
			val.damageAfterDistanceMultiplier = 1f;
			val.objectsToSpawn = (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { PreventRecursion.stopRecursionObjectToSpawn };
			Traverse.Create((object)val).Field("spreadOfLastBullet").SetValue((object)0f);
			spawnBulletsEffect.SetGun(val);
			return new List<MonoBehaviour> { (MonoBehaviour)(object)spawnBulletsEffect };
		}

		private void OnDestroy()
		{
			gasterCount--;
		}
	}
	internal class Jar : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			statModifiers.movementSpeed = 2f;
			statModifiers.health = 0.3f;
			statModifiers.numberOfJumps = 1;
			block.cooldown = 0.75f;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "The Jar";
		}

		protected override string GetDescription()
		{
			return "Why have health points if you don't plan on getting hit?";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (Rarity)1;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_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
			return (CardInfoStat[])(object)new CardInfoStat[4]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Speed",
					amount = "+100%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Jump",
					amount = "+1",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Block cooldown",
					amount = "-25%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Health",
					amount = "-70%",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

		protected override CardThemeColorType GetTheme()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (CardThemeColorType)2;
		}

		public override string GetModName()
		{
			return "EGC";
		}
	}
	internal class MarioBlock : SimpleCard
	{
		public override CardDetails Details
		{
			get
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Expected O, but got Unknown
				//IL_004f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0054: Unknown result type (might be due to invalid IL or missing references)
				//IL_005b: 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_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				//IL_0079: Expected O, but got Unknown
				CardDetails val = new CardDetails();
				val.Title = "? Block";
				val.Description = "Power-Ups Await";
				val.ModName = "EGC";
				val.Art = Assets.MarioArt;
				val.Rarity = (Rarity)1;
				val.Theme = (CardThemeColorType)1;
				val.Stats = (CardInfoStat[])(object)new CardInfoStat[1]
				{
					new CardInfoStat
					{
						positive = true,
						stat = "Random Power-Up",
						amount = "+1",
						simepleAmount = (SimpleAmount)0
					}
				};
				return val;
			}
		}

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false;
		}

		protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			AddPowerUp(player, characterStats);
		}

		private static void AddPowerUp(Player player, CharacterStatModifiers characterStat)
		{
			CardInfo randomPowerUp = GetRandomPowerUp(characterStat);
			Cards.instance.AddCardToPlayer(player, randomPowerUp, false, "", 0f, 0f, true);
			CardBarUtils.instance.ShowAtEndOfPhase(player, randomPowerUp);
		}

		private static CardInfo GetRandomPowerUp(CharacterStatModifiers characterStats)
		{
			CharacterStatModifiersAdditionalData additionalData = characterStats.GetAdditionalData();
			string[] array = new string[8]
			{
				((Object)SuperMushroom.SuperMushroomCard).name,
				((Object)SuperMushroom.SuperMushroomCard).name,
				((Object)MiniMushroom.MiniMushroomCard).name,
				((Object)MiniMushroom.MiniMushroomCard).name,
				((Object)BooMushroom.BooMushroomCard).name,
				((Object)BooMushroom.BooMushroomCard).name,
				((Object)OneUpMushroom.OneUpMushroomCard).name,
				((Object)PoisonousMushroom.PoisonousMushroomCard).name
			};
			bool[] array2 = new bool[8] { true, true, additionalData.hasMiniMush, additionalData.hasMiniMush, additionalData.hasBooMush, additionalData.hasBooMush, additionalData.hasOneUpMush, additionalData.hasPoisonMush };
			int num = Random.Range(0, array.Length);
			if (array2[num])
			{
				return GetCard(((Object)SuperMushroom.SuperMushroomCard).name);
			}
			switch (num)
			{
			case 2:
			case 3:
				additionalData.hasMiniMush = true;
				break;
			case 4:
			case 5:
				additionalData.hasBooMush = true;
				break;
			case 6:
				additionalData.hasOneUpMush = true;
				break;
			case 7:
				additionalData.hasPoisonMush = true;
				break;
			}
			return GetCard(array[num]);
			static CardInfo GetCard(string name)
			{
				return Cards.instance.GetCardWithObjectName(name);
			}
		}
	}
	internal class PortraitOfMarkov : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			gun.projectileSpeed = 1.4f;
			gun.reloadTimeAdd = -0.25f;
			gun.gravity = 0.6f;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			gun.spread *= 0.7f;
			characterStats.lifeSteal = ((characterStats.lifeSteal != 0f) ? (characterStats.lifeSteal * 2f) : (characterStats.lifeSteal + 1f));
			characterStats.GetAdditionalData().markovChoice++;
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "Portrait of Markov";
		}

		protected override string GetDescription()
		{
			return "Basically, it's about this <b>[REDACTED]</b>...";
		}

		protected override GameObject GetCardArt()
		{
			return Assets.PortraitOfMarkovArt;
		}

		protected override Rarity GetRarity()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (Rarity)2;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_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
			return (CardInfoStat[])(object)new CardInfoStat[4]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Life Steal",
					amount = "+100%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Spread",
					amount = "-30%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Bullet Speed",
					amount = "+40%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Reload Speed",
					amount = "-0.25s",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

		protected override CardThemeColorType GetTheme()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (CardThemeColorType)4;
		}

		public override string GetModName()
		{
			return "EGC";
		}

		internal static IEnumerator MarkovPick()
		{
			Player[] array = PlayerManager.instance.players.ToArray();
			foreach (Player player in array)
			{
				while (player.data.stats.GetAdditionalData().markovChoice > 0)
				{
					player.data.stats.GetAdditionalData().markovChoice--;
					yield return GameModeManager.TriggerHook("PlayerPickStart");
					CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(ExtraGameCards.Normal);
					CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(ExtraGameCards.Lunar);
					CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(ExtraGameCards.Markov);
					CardChoiceVisuals.instance.Show((from i in Enumerable.Range(0, PlayerManager.instance.players.Count)
						where PlayerManager.instance.players[i].playerID == player.playerID
						select i).First(), true);
					yield return CardChoice.instance.DoPick(1, player.playerID, (PickerType)1);
					yield return (object)new WaitForSecondsRealtime(0.1f);
					yield return GameModeManager.TriggerHook("PlayerPickEnd");
					CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(ExtraGameCards.Markov);
					CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(ExtraGameCards.Normal);
					CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(ExtraGameCards.Lunar);
					yield return (object)new WaitForSecondsRealtime(0.1f);
				}
			}
		}
	}
	internal class PurpleGuy : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			statModifiers.movementSpeed = 0.6f;
			statModifiers.health = 1.5f;
			statModifiers.sizeMultiplier = 0.9f;
			statModifiers.gravity = 1.3f;
			statModifiers.respawns = 1;
			gun.damage = 0.6f;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "Purple Soul";
		}

		protected override string GetDescription()
		{
			return "<b><color=#8444D4>I always come back</b></color>";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

		protected override Rarity GetRarity()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (Rarity)2;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_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
			return (CardInfoStat[])(object)new CardInfoStat[4]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Life",
					amount = "+1",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Health",
					amount = "+150%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Damage",
					amount = "-40%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Speed",
					amount = "-40%",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

		protected override CardThemeColorType GetTheme()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (CardThemeColorType)4;
		}

		public override string GetModName()
		{
			return "EGC";
		}
	}
	public class Something : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
			statModifiers.movementSpeed = 1.2f;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			Player[] array = PlayerManager.instance.players.ToArray();
			foreach (Player player2 in PlayerManager.instance.players)
			{
				if ((Object)(object)player2 == (Object)(object)player)
				{
					continue;
				}
				CardInfo val = CardManager.cards.Values.Select((Card card) => card.cardInfo).First((CardInfo c) => ((Object)c).name.Equals("AbyssalCountdown"));
				CharacterStatModifiers compon