Decompiled source of ChaosPoppycarsCardsCore v1.0.8

ChaosPoppycarsCardsCore.dll

Decompiled 3 weeks 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 System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using CPCCardInfostuffs;
using CPCCore.Extensions;
using CPCCore.MonoBehaviours;
using CPCCore.Patches;
using CPCCore.Utilities;
using CPCTabInfoSTATS;
using CardChoiceSpawnUniqueCardPatch;
using CardChoiceSpawnUniqueCardPatch.CustomCategories;
using CardThemeLib;
using HarmonyLib;
using Jotunn.Utils;
using LuckLib;
using MapEmbiggener;
using MapEmbiggener.Controllers;
using MapEmbiggener.Patches;
using Microsoft.CodeAnalysis;
using ModdingUtils.Extensions;
using ModdingUtils.MonoBehaviours;
using ModdingUtils.Patches;
using ModdingUtils.Utils;
using Nullmanager;
using Photon.Pun;
using PickPhaseImprovements;
using PlayerActionsHelper.Extensions;
using RWF;
using RarityLib.Utils;
using SimulationChamber;
using TMPro;
using TabInfo.Utils;
using ToggleCardsCategories;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.Extensions;
using UnboundLib.GameModes;
using UnboundLib.Networking;
using UnboundLib.Utils;
using UnityEngine;
using UnityEngine.Diagnostics;
using UnityEngine.UI;
using UnityEngine.UI.ProceduralImage;
using WillsWackyManagers.Utils;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
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;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
public class Air : MonoBehaviour
{
}
public class Animal : MonoBehaviour
{
}
public class Earth : MonoBehaviour
{
}
public class Energy : MonoBehaviour
{
}
public class Fire : MonoBehaviour
{
}
public class Moon : MonoBehaviour
{
}
public class Plant : MonoBehaviour
{
}
public class Sun : MonoBehaviour
{
}
public class Water : MonoBehaviour
{
}
namespace CPCTabInfoSTATS
{
	public class TabinfoInterface
	{
		public static void Setup()
		{
			StatCategory val = TabInfoManager.RegisterCategory("Other Stats", 0);
			TabInfoManager.RegisterStat(val, "Max Dashes", (Func<Player, bool>)((Player p) => p.data.stats.GetAdditionalData().dashes != 0), (Func<Player, string>)((Player p) => $"{p.data.stats.GetAdditionalData().dashes:F0}"));
			TabInfoManager.RegisterStat(val, "Extra Damage", (Func<Player, bool>)((Player p) => p.data.stats.GetAdditionalData().DamageAmpDamage != 0f), (Func<Player, string>)((Player p) => $"{p.data.stats.GetAdditionalData().DamageAmpDamage:F0}"));
			TabInfoManager.RegisterStat(val, "Extra Healing", (Func<Player, bool>)((Player p) => p.data.stats.GetAdditionalData().ExtraHeal != 1f), (Func<Player, string>)((Player p) => $"{(p.data.stats.GetAdditionalData().ExtraHeal - 1f) * 100f:F0}%"));
			TabInfoManager.RegisterStat(val, "Blocks are", (Func<Player, bool>)((Player p) => p.data.stats.GetAdditionalData().blockMover && !p.data.stats.GetAdditionalData().blockPush), (Func<Player, string>)((Player p) => "pulling"));
			TabInfoManager.RegisterStat(val, "Blocks <b>are</b>", (Func<Player, bool>)((Player p) => p.data.stats.GetAdditionalData().blockMover && p.data.stats.GetAdditionalData().blockPush), (Func<Player, string>)((Player p) => "pushing"));
			StatCategory val2 = TabInfoManager.RegisterCategory("Minecraft Stats", 1);
			TabInfoManager.RegisterStat(val2, "Totems", (Func<Player, bool>)((Player p) => p.data.stats.GetAdditionalData().totems != 0), (Func<Player, string>)((Player p) => $"{p.data.stats.GetAdditionalData().totems:F0}"));
			TabInfoManager.RegisterStat(val2, "Remaining Totems", (Func<Player, bool>)((Player p) => p.data.stats.GetAdditionalData().remainingTotems != 0), (Func<Player, string>)((Player p) => $"{p.data.stats.GetAdditionalData().remainingTotems:F0}"));
			TabInfoManager.RegisterStat(val2, "Glowstone", (Func<Player, bool>)((Player p) => p.data.stats.GetAdditionalData().Glowstone > 0), (Func<Player, string>)((Player p) => $"{p.data.stats.GetAdditionalData().Glowstone:F0}"));
			TabInfoManager.RegisterStat(val2, "Redstone", (Func<Player, bool>)((Player p) => p.data.stats.GetAdditionalData().Redstone > 0), (Func<Player, string>)((Player p) => $"{p.data.stats.GetAdditionalData().Redstone:F0}"));
			StatCategory val3 = TabInfoManager.RegisterCategory("Critical Hit Stats", 5);
			TabInfoManager.RegisterStat(val3, "Crit Damage", (Func<Player, bool>)((Player p) => p.data.weaponHandler.gun.GetAdditionalData().criticalHitDamage1 != 1f), (Func<Player, string>)((Player p) => $"{(p.data.weaponHandler.gun.GetAdditionalData().criticalHitDamage1 - 1f) * 100f:F0}%"));
			TabInfoManager.RegisterStat(val3, "Crit Chance", (Func<Player, bool>)((Player p) => p.data.weaponHandler.gun.GetAdditionalData().criticalHitChance1 != 0f), (Func<Player, string>)((Player p) => $"{p.data.weaponHandler.gun.GetAdditionalData().criticalHitChance1 * 100f:F0}%"));
			TabInfoManager.RegisterStat(val3, "Crit Slow", (Func<Player, bool>)((Player p) => p.data.weaponHandler.gun.GetAdditionalData().CritSlow > 0f), (Func<Player, string>)((Player p) => $"{p.data.weaponHandler.gun.GetAdditionalData().CritSlow * 100f:F0}%"));
			TabInfoManager.RegisterStat(val3, "Crit Bounces", (Func<Player, bool>)((Player p) => p.data.weaponHandler.gun.GetAdditionalData().criticalHitBounces != 0), (Func<Player, string>)((Player p) => $"{p.data.weaponHandler.gun.GetAdditionalData().criticalHitBounces:F0}"));
			TabInfoManager.RegisterStat(val3, "Damage on Bounce when you Crit", (Func<Player, bool>)((Player p) => p.data.weaponHandler.gun.GetAdditionalData().criticalHitDamageOnBounce > 0f), (Func<Player, string>)((Player p) => $"{p.data.weaponHandler.gun.GetAdditionalData().criticalHitDamageOnBounce * 100f:F0}%"));
			TabInfoManager.RegisterStat(val3, "Guranteed Crits", (Func<Player, bool>)((Player p) => p.data.weaponHandler.gun.GetAdditionalData().guranteedCrits), (Func<Player, string>)((Player p) => "True"));
			TabInfoManager.RegisterStat(val3, "Crit Bullet Speed", (Func<Player, bool>)((Player p) => p.data.weaponHandler.gun.GetAdditionalData().criticalBulletSpeed > 1f), (Func<Player, string>)((Player p) => $"{(p.data.weaponHandler.gun.GetAdditionalData().criticalBulletSpeed - 1f) * 100f:F0}%"));
			TabInfoManager.RegisterStat(val3, "Crit Simulation Speed", (Func<Player, bool>)((Player p) => p.data.weaponHandler.gun.GetAdditionalData().criticalSimulationSpeed > 1f), (Func<Player, string>)((Player p) => $"{(p.data.weaponHandler.gun.GetAdditionalData().criticalSimulationSpeed - 1f) * 100f:F0}%"));
			TabInfoManager.RegisterStat(val3, "Crit Heal", (Func<Player, bool>)((Player p) => p.data.weaponHandler.gun.GetAdditionalData().criticalHeal > 0f), (Func<Player, string>)((Player p) => $"{p.data.weaponHandler.gun.GetAdditionalData().criticalHeal:F0}"));
			TabInfoManager.RegisterStat(val3, "Crit CD Reduction", (Func<Player, bool>)((Player p) => p.data.weaponHandler.gun.GetAdditionalData().critAmmo > 0), (Func<Player, string>)((Player p) => $"{p.data.weaponHandler.gun.GetAdditionalData().critAmmo:F0}"));
		}
	}
}
namespace CPCCardInfostuffs
{
	public class CPCCardInfo : MonoBehaviour
	{
		[Header("CPC Settings")]
		public string Tag = "CPC";

		public CardInfo alternateSource;

		public void Setup()
		{
			((Component)this).GetComponent<CardInfo>().sourceCard = alternateSource ?? ((Component)this).GetComponent<CardInfo>();
		}

		public void Start()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			RectTransform[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<RectTransform>();
			GameObject val = new GameObject("ModIDText");
			RectTransform val2 = ((IEnumerable<RectTransform>)componentsInChildren).FirstOrDefault((Func<RectTransform, bool>)((RectTransform obj) => ((Object)((Component)obj).gameObject).name == "EdgePart (2)"));
			if ((Object)(object)val2 != (Object)null)
			{
				GameObject gameObject = ((Component)val2).gameObject;
				val.gameObject.transform.SetParent(gameObject.transform);
			}
			TextMeshProUGUI val3 = val.gameObject.AddComponent<TextMeshProUGUI>();
			((TMP_Text)val3).text = Tag;
			((TMP_Text)val3).autoSizeTextContainer = true;
			val.transform.localEulerAngles = new Vector3(0f, 0f, 135f);
			val.transform.localScale = Vector3.one;
			val.transform.localPosition = new Vector3(-75f, -75f, 0f);
			((TMP_Text)val3).alignment = (TextAlignmentOptions)1026;
			((TMP_Text)val3).alpha = 0.1f;
			((TMP_Text)val3).fontSize = 54f;
			if ((Object)(object)alternateSource != (Object)null)
			{
				((Component)this).GetComponent<CardInfo>().sourceCard = alternateSource;
			}
		}
	}
	public class CPCCardInfoForExtraStats : MonoBehaviour
	{
		[Header("CPC Settings")]
		public float GunCritDamage2 = 0f;

		public float GunCritChance2 = 0f;

		public int GunCritBounces = 0;

		public float GunCritDamageOnBounce = 0f;

		public float GunConsecutiveCritsDamage = 0f;

		public bool GunGuranteedCrits = false;

		public float GunCritSlow = 0f;

		public Color GunCritColor = Color.red;

		public Color GunDoubleCritColor = Color.cyan;

		public float GunCritBulletSpeed = 0f;

		public float GunCritSimulationSpeed = 0f;

		public float GunCritHeal = 0f;

		public int GunCritAmmo = 0;
	}
	public class CPCSICardInfo : MonoBehaviour
	{
		[Header("CPC Settings")]
		public CardInfo cardInfo;

		public GameObject cardBase;

		public string energy = "1";

		public bool sun = false;

		public bool moon = false;

		public bool fire = false;

		public bool air = false;

		public bool water = false;

		public bool earth = false;

		public bool plant = false;

		public bool animal = false;

		public void Start()
		{
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			cardInfo = ((Component)this).GetComponent<CardInfo>();
			cardBase = cardInfo.cardBase;
			GameObject gameObject = ((Component)cardBase.GetComponentInChildren<Energy>()).gameObject;
			((TMP_Text)gameObject.GetComponent<TextMeshProUGUI>()).text = energy;
			((Graphic)gameObject.GetComponent<TextMeshProUGUI>()).color = ((Graphic)((Component)cardBase.GetComponentInChildren<CardRarityColor>()).GetComponent<Image>()).color;
			GameObject gameObject2 = ((Component)cardBase.GetComponentInChildren<Sun>()).gameObject;
			gameObject2.SetActive(sun);
			GameObject gameObject3 = ((Component)cardBase.GetComponentInChildren<Moon>()).gameObject;
			gameObject3.SetActive(moon);
			GameObject gameObject4 = ((Component)cardBase.GetComponentInChildren<Fire>()).gameObject;
			gameObject4.SetActive(fire);
			GameObject gameObject5 = ((Component)cardBase.GetComponentInChildren<Air>()).gameObject;
			gameObject5.SetActive(air);
			GameObject gameObject6 = ((Component)cardBase.GetComponentInChildren<Water>()).gameObject;
			gameObject6.SetActive(water);
			GameObject gameObject7 = ((Component)cardBase.GetComponentInChildren<Earth>()).gameObject;
			gameObject7.SetActive(earth);
			GameObject gameObject8 = ((Component)cardBase.GetComponentInChildren<Plant>()).gameObject;
			gameObject8.SetActive(plant);
			GameObject gameObject9 = ((Component)cardBase.GetComponentInChildren<Animal>()).gameObject;
			gameObject9.SetActive(animal);
		}
	}
}
namespace CPCCore
{
	public class CardHolder : MonoBehaviour
	{
		public List<GameObject> Cards;

		public List<GameObject> HiddenCards;

		public void RegisterCards()
		{
			foreach (GameObject card in Cards)
			{
				if ((Object)(object)card.gameObject.GetComponent<CPCCardInfo>() == (Object)null)
				{
					CustomCard.RegisterUnityCard(card, "CPC", card.GetComponent<CardInfo>().cardName, true, (Action<CardInfo>)null);
				}
				else
				{
					CustomCard.RegisterUnityCard(card, card.gameObject.GetComponent<CPCCardInfo>().Tag, card.GetComponent<CardInfo>().cardName, true, (Action<CardInfo>)null);
				}
			}
			foreach (GameObject hiddenCard in HiddenCards)
			{
			}
		}
	}
	public static class Config
	{
		public const bool isDebugBuild = false;
	}
	[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.*/)]
	[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.*/)]
	[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.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.Poppycars.CPCCore.Id", "ChaosPoppycarsCardsCore", "1.0.8")]
	[BepInProcess("Rounds.exe")]
	public class ChaosPoppycarsCardsCore : BaseUnityPlugin
	{
		public static class CPCCoreCardCategories
		{
			public static CardCategory PoppysChaosCategory = CustomCardCategories.instance.CardCategory("PoppysChaosCards");
		}

		[CompilerGenerated]
		private sealed class <GameStart>d__18 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public IGameModeHandler gm;

			public ChaosPoppycarsCardsCore <>4__this;

			private List<Player>.Enumerator <>s__1;

			private Player <player>5__2;

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

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

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

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

			private bool MoveNext()
			{
				if (<>1__state != 0)
				{
					return false;
				}
				<>1__state = -1;
				<>s__1 = PlayerManager.instance.players.GetEnumerator();
				try
				{
					while (<>s__1.MoveNext())
					{
						<player>5__2 = <>s__1.Current;
						<player>5__2 = null;
					}
				}
				finally
				{
					((IDisposable)<>s__1).Dispose();
				}
				return false;
			}

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

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

		[CompilerGenerated]
		private sealed class <PointEnd>d__17 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public IGameModeHandler gm;

			public ChaosPoppycarsCardsCore <>4__this;

			private List<Player>.Enumerator <>s__1;

			private Player <player>5__2;

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

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

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

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

			private bool MoveNext()
			{
				if (<>1__state != 0)
				{
					return false;
				}
				<>1__state = -1;
				<>s__1 = PlayerManager.instance.players.GetEnumerator();
				try
				{
					while (<>s__1.MoveNext())
					{
						<player>5__2 = <>s__1.Current;
						<player>5__2.data.stats.GetAdditionalData().firstHit = true;
						<player>5__2.data.stats.GetAdditionalData().firstDamage = true;
						<player>5__2 = null;
					}
				}
				finally
				{
					((IDisposable)<>s__1).Dispose();
				}
				return false;
			}

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

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

		private const string ModId = "com.Poppycars.CPCCore.Id";

		private const string ModName = "ChaosPoppycarsCardsCore";

		public const string Version = "1.0.8";

		public const string ModInitials = "CPCCore";

		public static Harmony harmony;

		internal static List<BaseUnityPlugin> plugins;

		public static AssetBundle Bundle;

		internal static AssetBundle ArtAssets;

		public static ChaosPoppycarsCardsCore Instance { get; private set; }

		private void Awake()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_006e: Expected O, but got Unknown
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: 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_0093: 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_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0100: Expected O, but got Unknown
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Expected O, but got Unknown
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Expected O, but got Unknown
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Expected O, but got Unknown
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Expected O, but got Unknown
			Instance = this;
			Bundle = AssetUtils.LoadAssetBundleFromResources("cpccore", typeof(ChaosPoppycarsCardsCore).Assembly);
			CardThemeLib.instance.CreateOrGetType("Evergreen", new CardThemeColor
			{
				bgColor = new Color(0.09f, 0.23f, 0.11f),
				targetColor = new Color(0.28f, 0.8f, 0.32f)
			});
			CardThemeLib.instance.CreateOrGetType("Whynot Block Red", new CardThemeColor
			{
				bgColor = new Color(0.3f, 0f, 0f),
				targetColor = new Color(0.28f, 0f, 0f)
			});
			CardThemeLib.instance.CreateOrGetType("Minecraft Soil", new CardThemeColor
			{
				bgColor = new Color(0.3019608f, 8f / 51f, 0f),
				targetColor = new Color(0.1f, 0.85f, 0.1f)
			});
			CardThemeLib.instance.CreateOrGetType("Critical Cerise", new CardThemeColor
			{
				bgColor = new Color(0.2175f, 0.0475f, 0.095f),
				targetColor = new Color(0.87f, 0.19f, 0.38f)
			});
			CardThemeLib.instance.CreateOrGetType("Ancient Pumpkin Orange", new CardThemeColor
			{
				bgColor = Color32.op_Implicit(new Color32((byte)114, (byte)63, (byte)0, (byte)200)),
				targetColor = Color32.op_Implicit(new Color32((byte)171, (byte)95, (byte)0, (byte)200))
			});
			CardThemeLib.instance.CreateOrGetType("Geese Gray", new CardThemeColor
			{
				bgColor = new Color(0.24f, 0.21f, 0.19f),
				targetColor = new Color(0.24f, 0.21f, 0.19f)
			});
			harmony = new Harmony("com.Poppycars.CPCCore.Id");
			harmony.PatchAll();
			ToggleCardsCategoriesManager.instance.RegisterCategories("CPC");
		}

		public static void RegisterCards(Assembly asemble, AssetBundle Bundle)
		{
			GameObject[] source = Bundle.LoadAllAssets<GameObject>();
			List<Type> list = (from type in asemble.GetTypes()
				where type.IsClass && !type.IsAbstract && type.IsSubclassOf(typeof(CustomCard))
				select type).ToList();
			foreach (Type type2 in list)
			{
				try
				{
					IEnumerable<GameObject> enumerable = source.Where((GameObject a) => a != null && (Object)(object)a.GetComponent<CustomCard>() != (Object)null && ((object)a.GetComponent<CustomCard>()).GetType() == type2);
					foreach (GameObject item in enumerable)
					{
						if (!DateTools.WeekOf(new DateTime(DateTime.UtcNow.Year, 4, 1)) && ((Object)item).name == "Tree")
						{
							continue;
						}
						try
						{
							type2.GetField("Card", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null);
							item.GetComponent<CustomCard>().BuildUnityCard((Action<CardInfo>)delegate(CardInfo cardInfo)
							{
								type2.GetField("Card", BindingFlags.Static | BindingFlags.NonPublic).SetValue(null, cardInfo);
							});
						}
						catch
						{
							item.GetComponent<CustomCard>().BuildUnityCard((Action<CardInfo>)null);
						}
						if ((Object)(object)item.GetComponent<Curse>() != (Object)null)
						{
							CurseManager.instance.RegisterCurse(item.GetComponent<CardInfo>());
						}
						item.GetComponent<CPCCardInfo>()?.Setup();
						if (!item.GetComponent<CustomCard>().GetEnabled())
						{
							Cards.instance.AddHiddenCard(item.GetComponent<CardInfo>());
						}
					}
				}
				catch (Exception ex)
				{
					Debug.LogException(ex);
				}
			}
		}

		private void Start()
		{
			plugins = (List<BaseUnityPlugin>)typeof(Chainloader).GetField("_plugins", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null);
			GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)GameStart);
			CardManager.categories.Add("CPC");
			if (plugins.Exists((BaseUnityPlugin plugin) => plugin.Info.Metadata.GUID == "com.willuwontu.rounds.tabinfo"))
			{
				TabinfoInterface.Setup();
			}
			if (plugins.Exists((BaseUnityPlugin plugin) => plugin.Info.Metadata.GUID == "pykess.rounds.plugins.mapembiggener"))
			{
				CameraZoomHandlerPatchPatch.Patch();
			}
			RegisterCards(typeof(ChaosPoppycarsCardsCore).Assembly, Bundle);
			GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd);
			NullManager.instance.RegesterOnAddCallback((Action<NullCardInfo, Player>)OnNullAdd);
			ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)this, 60, (Action)delegate
			{
				CardManager.cards.Values.ToList().ForEach(delegate(Card card)
				{
					AddMod(card);
				});
			});
		}

		private void AddMod(Card card)
		{
			string text = "__Rarity-" + ((object)(Rarity)(ref card.cardInfo.rarity)).ToString();
			CardCategory val = CustomCardCategories.instance.CardCategory(text);
			CardCategory[] categories = CollectionExtensions.AddToArray<CardCategory>(card.cardInfo.categories, val);
			card.cardInfo.categories = categories;
		}

		private void OnNullAdd(NullCardInfo card, Player player)
		{
			Gun component = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>();
			CharacterStatModifiers stats = player.data.stats;
			CPCNullData nullData = stats.GetAdditionalData().nullData;
			int nullCount = PlayerExtensions.GetNullCount(player, (Rarity)(-1));
			stats.GetAdditionalData().maxWarps += nullData.screenWarps;
			Luck component2 = ((Component)player).GetComponent<Luck>();
			component2.PlayerLuck += nullData.luckInc;
			component.knockback *= nullData.knockback;
			for (int i = 0; i < nullData.nullShuffles; i++)
			{
				PickManager.QueueShuffleForPicker(player, 0, false, (Func<CardInfo, bool>)null);
			}
			for (int j = 0; j < nullData.nullCurses; j++)
			{
				CurseManager.instance.CursePlayer(player, (Action<CardInfo>)delegate(CardInfo curse)
				{
					CardBarUtils.instance.ShowImmediate(player, curse, (float?)3f);
				});
			}
			UpdateNullStatsForPlayer(player);
		}

		public static void UpdateNullStatsForPlayer(Player player)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Expected O, but got Unknown
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Expected O, but got Unknown
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Expected O, but got Unknown
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Expected O, but got Unknown
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: 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_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Expected O, but got Unknown
			List<CardInfoStat> list = new List<CardInfoStat>();
			CPCNullData nullData = player.data.stats.GetAdditionalData().nullData;
			int nullCount = PlayerExtensions.GetNullCount(player, (Rarity)(-1));
			if (nullData.screenWarps > 0)
			{
				list.Add(new CardInfoStat
				{
					positive = true,
					stat = "Screen Warps",
					amount = $"+{nullData.screenWarps}",
					simepleAmount = (SimpleAmount)0
				});
			}
			if (nullData.luckInc > 0)
			{
				list.Add(new CardInfoStat
				{
					positive = true,
					stat = "Luck",
					amount = $"+{nullData.luckInc}",
					simepleAmount = (SimpleAmount)0
				});
			}
			if (nullData.nullShuffles > 0)
			{
				list.Add(new CardInfoStat
				{
					positive = true,
					stat = "Shuffles",
					amount = $"+{nullData.nullShuffles}",
					simepleAmount = (SimpleAmount)0
				});
			}
			if (nullData.knockback > 1f)
			{
				list.Add(new CardInfoStat
				{
					positive = true,
					stat = "Knockback",
					amount = $"+{(nullData.knockback - 1f) * 100f}%",
					simepleAmount = (SimpleAmount)0
				});
			}
			if (nullData.nullCurses > 0)
			{
				list.Add(new CardInfoStat
				{
					positive = false,
					stat = "Curses",
					amount = $"+{nullData.nullCurses}",
					simepleAmount = (SimpleAmount)0
				});
			}
			NullManager.instance.SetAdditionalNullStats(player, "CPC", list.ToArray());
		}

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

		[IteratorStateMachine(typeof(<GameStart>d__18))]
		private IEnumerator GameStart(IGameModeHandler gm)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <GameStart>d__18(0)
			{
				<>4__this = this,
				gm = gm
			};
		}
	}
	public class Curse : MonoBehaviour
	{
	}
}
namespace CPCCore.Utilities
{
	public class CPCDebug
	{
		public static void Log(object message)
		{
			bool flag = false;
		}
	}
	internal static class DateTools
	{
		public static bool DayOf(DateTime holiday)
		{
			double num = DateTime.UtcNow.ToOADate();
			double num2 = holiday.AddHours(-12.0).ToOADate();
			double num3 = holiday.AddHours(36.0).ToOADate();
			return num > num2 && num < num3;
		}

		public static bool DayOf(DateTime[] holidays)
		{
			for (int i = 0; i < holidays.Length; i++)
			{
				if (DayOf(holidays[i]))
				{
					return true;
				}
			}
			return false;
		}

		public static bool WeekOf(DateTime holiday)
		{
			double num = DateTime.UtcNow.ToOADate();
			double num2 = holiday.AddDays(-6.0).AddHours(-12.0).ToOADate();
			double num3 = holiday.AddDays(6.0).AddHours(36.0).ToOADate();
			return num > num2 && num < num3;
		}

		public static bool WeekOf(DateTime[] holidays)
		{
			for (int i = 0; i < holidays.Length; i++)
			{
				if (WeekOf(holidays[i]))
				{
					return true;
				}
			}
			return false;
		}

		public static void DateTest(DateTime testDate)
		{
			if (DayOf(testDate))
			{
				Debug.Log((object)$"It's {testDate.Month}/{testDate.Day} somewhere");
			}
			else if (WeekOf(testDate))
			{
				Debug.Log((object)$"It's the week of {testDate.Month}/{testDate.Day} somewhere");
			}
			else
			{
				Debug.Log((object)$"It's not {testDate.Month}/{testDate.Day} anywhere");
			}
		}
	}
	internal class Miscs
	{
		public static bool debugFlag = true;

		public static void Log(object message)
		{
			if (debugFlag)
			{
				Debug.Log(message);
			}
		}

		public static void LogWarn(object message)
		{
			if (debugFlag)
			{
				Debug.LogWarning(message);
			}
		}

		public static void LogError(object message)
		{
			if (debugFlag)
			{
				Debug.LogError(message);
			}
		}

		public static List<string> StringSplit(string input, char splitAt)
		{
			List<string> list = new List<string>();
			string text = "";
			for (int i = 0; i < input.Length; i++)
			{
				if (input[i] != splitAt)
				{
					text += input[i];
					continue;
				}
				list.Add(text);
				text = "";
			}
			if (text != "")
			{
				list.Add(text);
			}
			return list;
		}

		public static int ValidateStringQuery(string targetString, string query)
		{
			int num = 15;
			int num2 = 0;
			int num3 = 0;
			bool flag = true;
			for (int i = 0; i < targetString.Length; i++)
			{
				if (targetString[i] == query[num2])
				{
					num3 += num;
					num2++;
				}
				else
				{
					flag = false;
					num--;
					num2++;
				}
				if (num2 == query.Length)
				{
					if (flag)
					{
						num3 += num * 10;
					}
					break;
				}
			}
			return num3;
		}
	}
	public class CardUtils
	{
		public class PlayerCardData
		{
			public CardInfo cardInfo;

			public Player owner;

			public int index;

			public PlayerCardData(CardInfo cardInfo, Player owner, int index)
			{
				this.cardInfo = cardInfo;
				this.owner = owner;
				this.index = index;
			}
		}

		public static bool PlayerHasCard(Player player, string cardName)
		{
			List<PlayerCardData> playerCardsWithName = GetPlayerCardsWithName(player, cardName);
			return playerCardsWithName.Count > 0;
		}

		public static bool PlayerHasCardCategory(Player player, CardCategory cardCategory)
		{
			List<PlayerCardData> playerCardsWithCategory = GetPlayerCardsWithCategory(player, cardCategory);
			return playerCardsWithCategory.Count > 0;
		}

		public static List<PlayerCardData> GetPlayerCardsWithName(Player player, string targetCardName)
		{
			targetCardName = targetCardName.ToUpper();
			List<PlayerCardData> list = new List<PlayerCardData>();
			List<CardInfo> currentCards = player.data.currentCards;
			for (int i = 0; i < currentCards.Count; i++)
			{
				string text = currentCards[i].cardName.ToUpper();
				if (text.Equals(targetCardName))
				{
					list.Add(new PlayerCardData(currentCards[i], player, i));
				}
			}
			return list;
		}

		public static List<PlayerCardData> GetPlayerCardsWithCategory(Player player, CardCategory targetCategory)
		{
			List<PlayerCardData> list = new List<PlayerCardData>();
			List<CardInfo> currentCards = player.data.currentCards;
			for (int i = 0; i < currentCards.Count; i++)
			{
				bool flag = false;
				CardCategory[] categoriesFromCard = CustomCardCategories.instance.GetCategoriesFromCard(currentCards[i]);
				CardCategory[] array = categoriesFromCard;
				foreach (CardCategory val in array)
				{
					if ((Object)(object)targetCategory == (Object)(object)val)
					{
						flag = true;
						break;
					}
				}
				if (flag)
				{
					list.Add(new PlayerCardData(currentCards[i], player, i));
				}
			}
			return list;
		}

		public static CardInfo GetCardInfo(string modInitial, string cardNameExact)
		{
			string value = "__" + modInitial + "__" + cardNameExact;
			List<CardInfo> list = CardManager.cards.Values.Select((Card c) => c.cardInfo).ToList();
			CardInfo result = null;
			foreach (CardInfo item in list)
			{
				if (((Object)((Component)item).gameObject).name.Contains(value))
				{
					result = item;
					break;
				}
			}
			return result;
		}

		public static CardInfo GetCardInfo(string query, bool searchVanillaOnly = false)
		{
			if (query.Contains("@"))
			{
				List<string> list = Miscs.StringSplit(query, '@');
				if (list.Count == 2)
				{
					if (list[0] == "")
					{
						return GetCardInfo(list[1]);
					}
					if (list[0] == "Vanilla")
					{
						return GetCardInfo(list[1], searchVanillaOnly: true);
					}
					return GetCardInfo(list[0], list[1]);
				}
				Miscs.LogWarn(">> query splitting failed");
				query = list[0];
			}
			query = CardNameSanitize(query, removeWhitespaces: true);
			List<CardInfo> list2 = CardManager.cards.Values.Select((Card c) => c.cardInfo).ToList();
			CardInfo result = null;
			int num = 0;
			foreach (CardInfo item in list2)
			{
				string text = CardNameSanitize(((Object)((Component)item).gameObject).name, removeWhitespaces: true);
				if (searchVanillaOnly && text.Contains("__"))
				{
					continue;
				}
				text = CardNameSanitize(item.cardName, removeWhitespaces: true);
				if (text.Equals(query))
				{
					result = item;
					num = 9999;
					break;
				}
				if (text.Contains(query))
				{
					int num2 = Miscs.ValidateStringQuery(text, query);
					if (num2 > num)
					{
						num = num2;
						result = item;
					}
				}
			}
			return result;
		}

		public static List<PlayerCardData> GetPlayerCardsWithCardInfo(Player player, CardInfo cardInfo)
		{
			string value = ((Object)((Component)cardInfo).gameObject).name.ToUpper();
			List<PlayerCardData> list = new List<PlayerCardData>();
			List<CardInfo> currentCards = player.data.currentCards;
			for (int i = 0; i < currentCards.Count; i++)
			{
				string text = ((Object)((Component)currentCards[i]).gameObject).name.ToUpper();
				if (text.Equals(value))
				{
					list.Add(new PlayerCardData(currentCards[i], player, i));
				}
			}
			return list;
		}

		public static List<PlayerCardData> GetPlayerCardsWithStringList(Player player, List<string> checkList)
		{
			List<PlayerCardData> list = new List<PlayerCardData>();
			List<CardInfo> currentCards = player.data.currentCards;
			foreach (string check in checkList)
			{
				CardInfo cardInfo = GetCardInfo(check);
				if (!((Object)(object)cardInfo == (Object)null))
				{
					list = list.Concat(GetPlayerCardsWithCardInfo(player, cardInfo)).ToList();
				}
			}
			return list;
		}

		public static string CardNameSanitize(string name, bool removeWhitespaces = false)
		{
			string text = name.ToLower();
			if (removeWhitespaces)
			{
				text = text.Replace(" ", "");
			}
			return text;
		}

		public static void MakeExclusive(string cardA, string cardB)
		{
			CardInfo cardInfo = GetCardInfo(cardA);
			CardInfo cardInfo2 = GetCardInfo(cardB);
			if ((Object)(object)cardInfo != (Object)null && (Object)(object)cardInfo2 != (Object)null)
			{
				CustomCardCategories.instance.MakeCardsExclusive(cardInfo, cardInfo2);
				Miscs.Log("[CPC] MakeExclusive: card [" + cardA + "] and card [" + cardB + "] made exclusive");
			}
			else
			{
				if ((Object)(object)cardInfo == (Object)null)
				{
					Miscs.LogWarn("[CPC] MakeExclusive: card [" + cardA + "] not found");
				}
				if ((Object)(object)cardInfo2 == (Object)null)
				{
					Miscs.LogWarn("[CPC] MakeExclusive: card [" + cardB + "] not found");
				}
			}
		}
	}
}
namespace CPCCore.Patches
{
	public class CameraZoomHandlerPatchPatch
	{
		public static void Patch()
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			ChaosPoppycarsCardsCore.harmony.Patch((MethodBase)typeof(CameraZoomHandler_Patch_Update).GetMethod("Postfix", BindingFlags.Static | BindingFlags.NonPublic), (HarmonyMethod)null, new HarmonyMethod(typeof(CameraZoomHandlerPatchPatch).GetMethod("Postfix", BindingFlags.Static | BindingFlags.Public)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
		}

		public static void Postfix(object[] __args)
		{
			//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_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			Camera[] array = (Camera[])__args[0];
			if ((Object)(object)PlayerManager.instance != (Object)null && PlayerManager.instance.players.Any((Player player) => player.data.stats.GetAdditionalData().cameraLock && (player.data.view.IsMine || PhotonNetwork.OfflineMode)))
			{
				for (int i = 0; i < array.Length; i++)
				{
					Transform transform = ((Component)array[i]).transform;
					Quaternion rotation = ((Component)array[i]).transform.rotation;
					float x = ((Quaternion)(ref rotation)).eulerAngles.x;
					rotation = ((Component)array[i]).transform.rotation;
					transform.eulerAngles = new Vector3(x, ((Quaternion)(ref rotation)).eulerAngles.y, 180f);
				}
			}
		}
	}
	[HarmonyPatch(typeof(DeathEffect))]
	internal class DeathEffect_Patch
	{
		[HarmonyPostfix]
		[HarmonyPatch("PlayDeath")]
		private static void AdjustedRespawnTime(DeathEffect __instance, Color color, PlayerVelocity playerRig, Vector2 vel, int playerIDToRevive)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			if (playerIDToRevive == -1)
			{
				return;
			}
			Player player = ((CharacterData)ExtensionMethods.GetFieldValue((object)playerRig, "data")).player;
			if (player.data.stats.GetAdditionalData().useNewRespawnTime)
			{
				float newRespawnTime = player.data.stats.GetAdditionalData().newRespawnTime;
				ExtensionMethods.SetFieldValue((object)__instance, "respawnTime", (object)newRespawnTime);
				ParticleSystem[] componentsInChildren = ((Component)__instance).GetComponentsInChildren<ParticleSystem>();
				ParticleSystem[] array = componentsInChildren;
				foreach (ParticleSystem val in array)
				{
					val.playbackSpeed = 2.53f / newRespawnTime;
					MainModule main = val.main;
					((MainModule)(ref main)).simulationSpeed = 2.53f / newRespawnTime;
				}
				((Component)__instance).gameObject.GetComponent<RemoveAfterSeconds>().seconds = 2f * newRespawnTime;
			}
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(GeneralInput), "Update")]
	[HarmonyPriority(800)]
	internal class GeneralInputUpdatePatch
	{
		private static void Postfix(GeneralInput __instance)
		{
			//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)
			if (((Component)__instance).GetComponent<Player>().data.stats.GetAdditionalData().forcedMoveEnabled || (((Component)__instance).GetComponent<Player>().data.stats.GetAdditionalData().whynackAd && !((Component)__instance).GetComponent<Player>().data.stats.GetAdditionalData().whynackHarmony))
			{
				if (Mathf.Abs(__instance.direction.x) < 0.5f)
				{
					__instance.direction = new Vector3(((Component)__instance).GetComponent<Player>().data.stats.GetAdditionalData().forcedMove, __instance.direction.y);
				}
				else
				{
					((Component)__instance).GetComponent<Player>().data.stats.GetAdditionalData().forcedMove = __instance.direction.x;
				}
			}
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(PlayerVelocity), "AddForce", new Type[]
	{
		typeof(Vector2),
		typeof(ForceMode2D)
	})]
	internal class ForcePatch
	{
		private static void Prefix(PlayerVelocity __instance, ref Vector2 force, ForceMode2D forceMode)
		{
			//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)
			if (__instance.data.stats.GetAdditionalData().rotatedForce)
			{
				float y = force.y;
				float x = force.x;
				force = new Vector2(y, x);
			}
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(PlayerVelocity), "FixedUpdate")]
	internal class ForcePatch2
	{
		private static bool Prefix(PlayerVelocity __instance)
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: 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_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			if (__instance.data.stats.GetAdditionalData().cursorFear != 0f)
			{
				if (__instance.data.isPlaying)
				{
					if (__instance.isKinematic)
					{
						__instance.velocity *= 0f;
					}
					if (__instance.simulated && !__instance.isKinematic)
					{
						__instance.velocity += Vector2.op_Implicit(__instance.data.aimDirection) * TimeHandler.fixedDeltaTime * TimeHandler.timeScale * 20f * (__instance.data.stats.GetAdditionalData().cursorFear * -1f);
						Transform transform = ((Component)__instance.data).gameObject.transform;
						transform.position += TimeHandler.fixedDeltaTime * TimeHandler.timeScale * Vector2.op_Implicit(__instance.velocity);
						((Component)__instance.data).gameObject.transform.position = new Vector3(((Component)__instance.data).gameObject.transform.position.x, ((Component)__instance.data).gameObject.transform.position.y, 0f);
					}
				}
				return false;
			}
			return true;
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(GunAmmo), "Shoot")]
	internal class GunUSEAMMOPatch
	{
		private static void Postfix(GunAmmo __instance, GameObject projectile)
		{
			if (!__instance.gun.player.data.stats.GetAdditionalData().useAmmo)
			{
				__instance.gun.isReloading = false;
				__instance.currentAmmo = __instance.maxAmmo;
				__instance.SetActiveBullets(false);
			}
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(HealthHandler), "DoDamage")]
	[HarmonyPriority(300)]
	internal class HealtHandlerPatchDoDamage
	{
		private static bool Prefix(HealthHandler __instance, ref Vector2 damage, Vector2 position, Color blinkColor, GameObject damagingWeapon, Player damagingPlayer, bool healthRemoval, ref bool lethal, bool ignoreBlock)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Unknown result type (might be due to invalid IL or missing references)
			CharacterData val = (CharacterData)Traverse.Create((object)__instance).Field("data").GetValue();
			Player player = val.player;
			if (!val.isPlaying)
			{
				return false;
			}
			if (val.dead)
			{
				return false;
			}
			if (__instance.isRespawning)
			{
				return false;
			}
			if ((Object)(object)damagingPlayer != (Object)null && damagingPlayer.data.stats.GetAdditionalData().firstDamage)
			{
				damagingPlayer.data.stats.GetAdditionalData().damageMult = damagingPlayer.data.stats.GetAdditionalData().damageMultMax;
				damagingPlayer.data.stats.GetAdditionalData().firstDamage = false;
			}
			if ((Object)(object)damagingPlayer != (Object)null && damagingPlayer.data.stats.GetAdditionalData().reducingDmg)
			{
				damage *= damagingPlayer.data.stats.GetAdditionalData().damageMult;
				if (damagingPlayer.data.stats.GetAdditionalData().damageMult > 0.05f)
				{
					damagingPlayer.data.stats.GetAdditionalData().damageMult -= damagingPlayer.data.stats.GetAdditionalData().reducingDmgAmt;
				}
				if (damagingPlayer.data.stats.GetAdditionalData().damageMult < 0.05f)
				{
					damagingPlayer.data.stats.GetAdditionalData().damageMult = 0.05f;
				}
			}
			if (player.data.stats.GetAdditionalData().firstHit)
			{
				player.data.stats.GetAdditionalData().firstHit = false;
				if (player.data.stats.GetAdditionalData().firstHitdmgReduction > 0f)
				{
					damage /= player.data.stats.GetAdditionalData().firstHitdmgReduction;
				}
			}
			return true;
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(Block), "blocked")]
	internal class BlockPiercePatch
	{
		private static bool Prefix(Block __instance, GameObject projectile, Vector3 forward, Vector3 hitPos)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//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_009c: 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)
			bool flag = false;
			ProjectileHit component = projectile.GetComponent<ProjectileHit>();
			HealthHandler val = (HealthHandler)Traverse.Create((object)__instance).Field("health").GetValue();
			if (projectile.GetComponent<ProjectileHit>().ownPlayer.data.stats.GetAdditionalData().blockPierce > 0f)
			{
				Vector2 val2 = Vector2.op_Implicit((component.bulletCanDealDeamage ? component.damage : 1f) * projectile.GetComponent<ProjectileHit>().ownPlayer.data.stats.GetAdditionalData().blockPierce * ((Vector3)(ref forward)).normalized);
				((Damagable)val).TakeDamage(val2, Vector2.op_Implicit(hitPos), component.projectileColor, component.ownWeapon, component.ownPlayer, true, true);
				flag = true;
			}
			if (flag)
			{
				Object.Destroy((Object)(object)projectile);
				return false;
			}
			return true;
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(ProjectileHit), "RPCA_DoHit")]
	internal class UpwardsKnockbackPatch
	{
		private static void Prefix(ProjectileHit __instance, Vector2 hitPoint, Vector2 hitNormal, Vector2 vel, int viewID, int colliderID, bool wasBlocked)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//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_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_028d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0297: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			HitInfo val = new HitInfo();
			val.point = hitPoint;
			val.normal = hitNormal;
			val.collider = null;
			if (viewID != -1)
			{
				PhotonView photonView = PhotonNetwork.GetPhotonView(viewID);
				val.collider = ((Component)photonView).GetComponentInChildren<Collider2D>();
				val.transform = ((Component)photonView).transform;
			}
			else if (colliderID != -1)
			{
				val.collider = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren<Collider2D>()[colliderID];
				val.transform = ((Component)val.collider).transform;
			}
			HealthHandler val2 = null;
			if (Object.op_Implicit((Object)(object)val.transform))
			{
				val2 = ((Component)val.transform).GetComponent<HealthHandler>();
			}
			PlayerVelocity val3 = null;
			if (Object.op_Implicit((Object)(object)val.transform))
			{
				val3 = ((Component)val.transform).GetComponentInParent<PlayerVelocity>();
			}
			if (Object.op_Implicit((Object)(object)val3))
			{
				float num = 1f;
				float num2 = Mathf.Clamp(val3.mass / 100f * num, 0f, 1f) * num;
				if (Object.op_Implicit((Object)(object)val2) && __instance.hasControl && (Object)(object)__instance.spawnedAttack.spawner != (Object)null && __instance.spawnedAttack.spawner.data.stats.GetAdditionalData().upwardsKnockback != 0f)
				{
					val2.CallTakeForce(Vector2.up * num2 * __instance.spawnedAttack.spawner.data.stats.GetAdditionalData().upwardsKnockback * Mathf.Pow(__instance.damage / 55f, 2f) * 5000f, (ForceMode2D)1, true, false, 0f);
				}
			}
			if (Object.op_Implicit((Object)(object)val.transform))
			{
				NetworkPhysicsObject component = ((Component)val.transform).GetComponent<NetworkPhysicsObject>();
				if (Object.op_Implicit((Object)(object)component) && __instance.canPushBox && (Object)(object)__instance.spawnedAttack.spawner != (Object)null && __instance.spawnedAttack.spawner.data.stats.GetAdditionalData().upwardsKnockback != 0f)
				{
					component.BulletPush(Vector2.up * ((__instance.spawnedAttack.spawner.data.stats.GetAdditionalData().upwardsKnockback + 5f) * Mathf.Pow(__instance.damage / 55f, 2f)) * 5000f, Vector2.op_Implicit(val.transform.InverseTransformPoint(((Component)component).transform.position)), __instance.spawnedAttack.spawner.data);
				}
			}
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(HealthHandler), "Heal")]
	internal class ExtraHealingPatch
	{
		private static void Prefix(HealthHandler __instance, ref float healAmount)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			Player val = (Player)ExtensionMethods.GetFieldValue((object)__instance, "player");
			healAmount *= val.data.stats.GetAdditionalData().ExtraHeal;
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(MapController), "OnPointEnd")]
	internal class MapSizePatch
	{
		private static void Postfix(MapController __instance)
		{
			float num = 0f;
			foreach (Player player in PlayerManager.instance.players)
			{
				num += player.data.stats.GetAdditionalData().mapSizeI;
			}
			num = Mathf.Clamp(MapEmbiggener.setSize + num, 0.25f, 7f);
			__instance.MapSize = num;
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(Cards), "PlayerIsAllowedCard")]
	[HarmonyPriority(int.MinValue)]
	internal class PlayerAlowedCardPatch
	{
		private static void Postfix(Cards __instance, ref bool __result, Player player, CardInfo card)
		{
			if ((Object)(object)card != (Object)null && (Object)(object)player != (Object)null && player.data.stats.GetAdditionalData().Mcnally)
			{
				__result = true;
			}
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(Cards), "GetRandomCardWithCondition")]
	internal class PlayerAlowedHiddenCardPatch
	{
		public static bool Prefix(Cards __instance, ref CardInfo __result, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats, Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool> condition)
		{
			if ((Object)(object)player != (Object)null && player.data.stats.GetAdditionalData().Mcnally)
			{
				CardInfo[] array = __instance.activeCards.Where((CardInfo card) => condition(card, player, gun, gunAmmo, data, health, gravity, block, characterStats) && __instance.PlayerIsAllowedCard(player, card)).ToArray();
				array = CollectionExtensions.AddRangeToArray<CardInfo>(array, __instance.HiddenCards.Where((CardInfo card) => condition(card, player, gun, gunAmmo, data, health, gravity, block, characterStats) && ((DefaultPool)PhotonNetwork.PrefabPool).ResourceCache.ContainsKey(((Object)card).name)).ToArray());
				array = CollectionExtensions.AddItem<CardInfo>((IEnumerable<CardInfo>)array, CardChoiceSpawnUniqueCardPatch.NullCard).ToArray();
				if (array.Length == 0)
				{
					__result = null;
					return false;
				}
				__result = CardChoicePatchGetRanomCard.OrignialGetRanomCard(array).GetComponent<CardInfo>();
				return false;
			}
			return true;
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(Cards), "GetAllCardsWithCondition", new Type[]
	{
		typeof(CardChoice),
		typeof(Player),
		typeof(Func<CardInfo, Player, bool>)
	})]
	internal class PlayerAllowedHiddenCardPatch
	{
		public static bool Prefix(Cards __instance, ref CardInfo[] __result, Player player)
		{
			if ((Object)(object)player != (Object)null && player.data.stats.GetAdditionalData().Mcnally)
			{
				Debug.Log((object)__instance.activeCards.Length);
				CardInfo[] activeCards = __instance.activeCards;
				activeCards = CollectionExtensions.AddRangeToArray<CardInfo>(activeCards, __instance.HiddenCards.Where((CardInfo card) => ((DefaultPool)PhotonNetwork.PrefabPool).ResourceCache.ContainsKey(((Object)card).name)).ToArray());
				activeCards = CollectionExtensions.AddItem<CardInfo>((IEnumerable<CardInfo>)activeCards, CardChoiceSpawnUniqueCardPatch.NullCard).ToArray();
				__result = activeCards;
				return false;
			}
			return true;
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(PickManager), "RegisterDrawValidationFunction")]
	internal class ValidationPatch
	{
		public static bool Prefix(Func<CardInfo[], CardInfo, ValidationResult> func)
		{
			PickManager.DrawValidationFunctions.Add((CardInfo[] h, CardInfo c) => (CardChoice.instance.pickrID >= 0 && (int)CardChoice.instance.pickerType > 0 && PlayerManager.instance.GetPlayerWithID(CardChoice.instance.pickrID).data.stats.GetAdditionalData().Mcnally) ? ((ValidationResult)0) : func(h, c));
			return false;
		}
	}
	[HarmonyPatch(typeof(ExtraPlayerSkins))]
	public class PoppyTeam
	{
		private static PlayerSkin Skin;

		private static readonly PlayerSkin PoppySkin = new PlayerSkin
		{
			color = new Color(0.75f, 0.501f, 0f, 0.75f),
			backgroundColor = new Color(0.75f, 0.62624997f, 0f, 0.75f),
			winText = new Color(0.75f, 0.501f, 0f, 0.5f),
			particleEffect = new Color(0.75f, 0.501f, 0f, 0f)
		};

		private const int TeamID = 68;

		[HarmonyPatch("GetTeamColorName")]
		[HarmonyPostfix]
		public static void PatchName(int teamID, ref string __result)
		{
			if (teamID == 68)
			{
				__result = "Poppy [she/her]";
			}
		}

		[HarmonyPatch("GetPlayerSkinColors")]
		[HarmonyPrefix]
		public static bool PatchGetSkin(int colorID, ref PlayerSkin __result)
		{
			//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_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			if (colorID != 68)
			{
				return true;
			}
			if ((Object)(object)Skin == (Object)null)
			{
				PlayerSkinBank val = (PlayerSkinBank)(typeof(PlayerSkinBank).GetProperty("Instance", BindingFlags.Static | BindingFlags.NonPublic)?.GetValue(null, null));
				PlayerSkin val2 = (((int)val != 0) ? val.skins[colorID % 4].currentPlayerSkin : null);
				PlayerSkin component = ((Component)Object.Instantiate<PlayerSkin>(val2)).gameObject.GetComponent<PlayerSkin>();
				Object.DontDestroyOnLoad((Object)(object)component);
				PlayerSkin poppySkin = PoppySkin;
				component.color = poppySkin.color;
				component.backgroundColor = poppySkin.backgroundColor;
				component.winText = poppySkin.winText;
				component.particleEffect = poppySkin.particleEffect;
				PlayerSkinParticle componentInChildren = ((Component)component).GetComponentInChildren<PlayerSkinParticle>();
				ParticleSystem component2 = ((Component)componentInChildren).GetComponent<ParticleSystem>();
				MainModule main = component2.main;
				MinMaxGradient startColor = ((MainModule)(ref main)).startColor;
				((MinMaxGradient)(ref startColor)).colorMin = poppySkin.backgroundColor;
				((MinMaxGradient)(ref startColor)).colorMax = poppySkin.color;
				((MainModule)(ref main)).startColor = startColor;
				ExtensionMethods.SetFieldValue((object)componentInChildren, "startColor1", (object)poppySkin.backgroundColor);
				ExtensionMethods.SetFieldValue((object)componentInChildren, "startColor2", (object)poppySkin.color);
				Skin = component;
			}
			__result = Skin;
			return false;
		}

		[HarmonyPatch(typeof(CardBarHandlerExtensions), "Rebuild")]
		[HarmonyPatch(typeof(CardBarHandlerExtensions), "Rebuild")]
		[HarmonyPostfix]
		public static void CardBarColor(CardBarHandler instance)
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: 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_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)
			CardBar[] cardBars = instance.cardBars;
			foreach (CardBar val in cardBars)
			{
				ProceduralImage component = ((Component)((Component)val).transform.GetChild(0).GetChild(0)).GetComponent<ProceduralImage>();
				Color backgroundColor = PoppySkin.backgroundColor;
				Color color = ((Graphic)component).color;
				if (((Color)(ref color)).Equals(new Color(backgroundColor.r, backgroundColor.g, backgroundColor.b, 0.9f)))
				{
					((Graphic)component).color = new Color(0f, 0f, 0f, 0f);
					TextMeshProUGUI component2 = ((Component)((Component)val).transform.GetChild(0).GetChild(1)).GetComponent<TextMeshProUGUI>();
					((TMP_Text)component2).outlineColor = Color32.op_Implicit(new Color(1f, 1f, 0f));
					((TMP_Text)component2).outlineWidth = 0.5f;
				}
			}
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(ProjectileHit), "Hit")]
	internal class ProjectileHitPatchHit
	{
		private static void Postfix(ProjectileHit __instance, ref HitInfo hit, ref Player ___ownPlayer, ref float ___damage, bool forceCall = false)
		{
			if (!((Object)(object)((Component)hit.collider).GetComponent<HealthHandler>() != (Object)null))
			{
				return;
			}
			if ((Object)(object)___ownPlayer != (Object)null && ___ownPlayer.data.stats.GetAdditionalData().firstDamage)
			{
				___ownPlayer.data.stats.GetAdditionalData().damageMult = ___ownPlayer.data.stats.GetAdditionalData().damageMultMax;
				___ownPlayer.data.stats.GetAdditionalData().firstDamage = false;
			}
			if ((Object)(object)___ownPlayer != (Object)null && ___ownPlayer.data.stats.GetAdditionalData().reducingDmg)
			{
				___damage *= ___ownPlayer.data.stats.GetAdditionalData().damageMult;
				if (___ownPlayer.data.stats.GetAdditionalData().damageMult > 0.05f)
				{
					___ownPlayer.data.stats.GetAdditionalData().damageMult -= ___ownPlayer.data.stats.GetAdditionalData().reducingDmgAmt;
				}
				if (___ownPlayer.data.stats.GetAdditionalData().damageMult < 0.05f)
				{
					___ownPlayer.data.stats.GetAdditionalData().damageMult = 0.05f;
				}
			}
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(ProjectileHit), "RPCA_DoHit")]
	internal class ProjectileHitPatchRPCA_DoHit
	{
		private static void Postfix(ProjectileHit __instance, Vector2 hitPoint, Vector2 hitNormal, Vector2 vel, ref Player ___ownPlayer, ref float ___damage, int viewID = -1, int colliderID = -1, bool wasBlocked = false)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//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_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_035e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0367: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_03da: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0411: Unknown result type (might be due to invalid IL or missing references)
			//IL_041b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0420: Unknown result type (might be due to invalid IL or missing references)
			//IL_0425: Unknown result type (might be due to invalid IL or missing references)
			//IL_042d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0494: Unknown result type (might be due to invalid IL or missing references)
			//IL_0499: Unknown result type (might be due to invalid IL or missing references)
			HitInfo val = new HitInfo();
			val.point = hitPoint;
			val.normal = hitNormal;
			val.collider = null;
			if (viewID != -1)
			{
				PhotonView photonView = PhotonNetwork.GetPhotonView(viewID);
				val.collider = ((Component)photonView).GetComponentInChildren<Collider2D>();
				val.transform = ((Component)photonView).transform;
			}
			else if (colliderID != -1)
			{
				val.collider = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren<Collider2D>()[colliderID];
				val.transform = ((Component)val.collider).transform;
			}
			if (!((Object)(object)val.collider != (Object)null) || !((Object)(object)((Component)val.collider).GetComponent<HealthHandler>() == (Object)null) || !((Object)(object)___ownPlayer != (Object)null) || !((Object)(object)val.transform != (Object)null) || !((Object)(object)((Component)___ownPlayer).GetComponent<CooldownBlock>() != (Object)null) || !(((Component)___ownPlayer).GetComponent<CooldownBlock>().duration <= 0f))
			{
				return;
			}
			Vector3 val2;
			if (___ownPlayer.data.stats.GetAdditionalData().blockMover && !___ownPlayer.data.stats.GetAdditionalData().blockPush)
			{
				if (___ownPlayer.data.view.IsMine && !PhotonNetwork.OfflineMode)
				{
					NetworkingManager.RPC(typeof(ProjectileHitPatchRPCA_DoHit), "BugFix", new object[6] { viewID, colliderID, hitPoint, hitNormal, true, ___ownPlayer.playerID });
				}
				else if (PhotonNetwork.OfflineMode)
				{
					Smooth orAddComponent = ExtensionMethods.GetOrAddComponent<Smooth>(((Component)val.transform).gameObject, false);
					orAddComponent.currentPos = val.transform.position;
					Vector3 position = val.transform.position;
					val2 = ((Component)___ownPlayer).transform.position - val.transform.position;
					orAddComponent.targetPos = position + ((Vector3)(ref val2)).normalized * ___ownPlayer.data.stats.GetAdditionalData().blockMoveStrength * 3f;
					orAddComponent.targetPos *= Mathf.Log(___ownPlayer.data.weaponHandler.gun.damage * ___ownPlayer.data.weaponHandler.gun.bulletDamageMultiplier, ___ownPlayer.data.weaponHandler.gun.projectiles[0].objectToSpawn.GetComponent<ProjectileHit>().damage) + 1f;
					orAddComponent.speed = 2f;
				}
				((Component)___ownPlayer).GetComponent<CooldownBlock>().duration = 3f;
			}
			else if (___ownPlayer.data.stats.GetAdditionalData().blockMover)
			{
				if (___ownPlayer.data.view.IsMine && !PhotonNetwork.OfflineMode)
				{
					NetworkingManager.RPC(typeof(ProjectileHitPatchRPCA_DoHit), "BugFix", new object[6] { viewID, colliderID, hitPoint, hitNormal, false, ___ownPlayer.playerID });
				}
				else if (PhotonNetwork.OfflineMode)
				{
					Smooth orAddComponent2 = ExtensionMethods.GetOrAddComponent<Smooth>(((Component)val.transform).gameObject, false);
					orAddComponent2.currentPos = val.transform.position;
					Vector3 position2 = val.transform.position;
					val2 = val.transform.position - ((Component)___ownPlayer).transform.position;
					orAddComponent2.targetPos = position2 + ((Vector3)(ref val2)).normalized * ___ownPlayer.data.stats.GetAdditionalData().blockMoveStrength * 3f;
					orAddComponent2.targetPos *= Mathf.Log(___ownPlayer.data.weaponHandler.gun.damage * ___ownPlayer.data.weaponHandler.gun.bulletDamageMultiplier, ___ownPlayer.data.weaponHandler.gun.projectiles[0].objectToSpawn.GetComponent<ProjectileHit>().damage) + 1f;
					orAddComponent2.speed = 2f;
				}
				((Component)___ownPlayer).GetComponent<CooldownBlock>().duration = 3f;
			}
		}

		[UnboundRPC]
		private static void BugFix(int viewID, int colliderID, Vector2 hitPoint, Vector2 hitNormal, bool pull, int playerID)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//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_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			HitInfo val = new HitInfo();
			val.point = hitPoint;
			val.normal = hitNormal;
			val.collider = null;
			Player playerWithID = PlayerManager.instance.GetPlayerWithID(playerID);
			if (viewID != -1)
			{
				PhotonView photonView = PhotonNetwork.GetPhotonView(viewID);
				val.collider = ((Component)photonView).GetComponentInChildren<Collider2D>();
				val.transform = ((Component)photonView).transform;
			}
			else if (colliderID != -1)
			{
				val.collider = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren<Collider2D>()[colliderID];
				val.transform = ((Component)val.collider).transform;
			}
			Vector3 val2;
			if (pull)
			{
				Smooth orAddComponent = ExtensionMethods.GetOrAddComponent<Smooth>(((Component)val.transform).gameObject, false);
				orAddComponent.currentPos = val.transform.position;
				Vector3 position = val.transform.position;
				val2 = ((Component)playerWithID).transform.position - val.transform.position;
				orAddComponent.targetPos = position + ((Vector3)(ref val2)).normalized * playerWithID.data.stats.GetAdditionalData().blockMoveStrength * (Mathf.Log(playerWithID.data.weaponHandler.gun.damage * playerWithID.data.weaponHandler.gun.bulletDamageMultiplier, playerWithID.data.weaponHandler.gun.projectiles[0].objectToSpawn.GetComponent<ProjectileHit>().damage) + 1f);
				orAddComponent.speed = 2f;
			}
			else
			{
				Smooth orAddComponent2 = ExtensionMethods.GetOrAddComponent<Smooth>(((Component)val.transform).gameObject, false);
				orAddComponent2.currentPos = val.transform.position;
				Vector3 position2 = val.transform.position;
				val2 = val.transform.position - ((Component)playerWithID).transform.position;
				orAddComponent2.targetPos = position2 + ((Vector3)(ref val2)).normalized * playerWithID.data.stats.GetAdditionalData().blockMoveStrength * (Mathf.Log(playerWithID.data.weaponHandler.gun.damage * playerWithID.data.weaponHandler.gun.bulletDamageMultiplier, playerWithID.data.weaponHandler.gun.projectiles[0].objectToSpawn.GetComponent<ProjectileHit>().damage) + 1f);
				orAddComponent2.speed = 2f;
			}
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(HealthHandler), "Revive")]
	internal class HealtHandlerPatchRevive
	{
		private static void Prefix(HealthHandler __instance, bool isFullRevive = true)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			if (isFullRevive)
			{
				((CharacterData)Traverse.Create((object)__instance).Field("data").GetValue()).stats.GetAdditionalData().remainingTotems = ((CharacterData)Traverse.Create((object)__instance).Field("data").GetValue()).stats.GetAdditionalData().totems;
			}
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(HealthHandler), "RPCA_SendTakeDamage")]
	internal class HealtHandlerPatchRPCASendTakeDamage
	{
		internal static Player GetPlayerWithID(int playerID)
		{
			for (int i = 0; i < PlayerManager.instance.players.Count; i++)
			{
				if (PlayerManager.instance.players[i].playerID == playerID)
				{
					return PlayerManager.instance.players[i];
				}
			}
			return null;
		}

		private static void SimGun(Player player, Vector2 damage)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_025a: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			SimulatedGun[] array = (SimulatedGun[])(object)new SimulatedGun[1];
			if ((Object)(object)array[0] == (Object)null)
			{
				array[0] = new GameObject("DamageGun").AddComponent<SimulatedGun>();
			}
			SimulatedGun val = array[0];
			Gun gun = player.data.weaponHandler.gun;
			val.CopyGunStatsExceptActions(gun);
			val.CopyAttackAction(gun);
			val.CopyShootProjectileAction(gun);
			((Gun)val).objectsToSpawn = ((Gun)val).objectsToSpawn.Concat(StopRecursionMono.StopRecursionSpawn).ToArray();
			((Gun)val).bursts = 0;
			((Gun)val).numberOfProjectiles = 1;
			((Gun)val).damage = Mathf.Clamp(((Vector2)(ref damage)).magnitude / 55f, 0f, player.data.maxHealth / 55f);
			if (player.data.view.IsMine || PhotonNetwork.OfflineMode)
			{
				Vector3 val2 = default(Vector3);
				((Vector3)(ref val2))..ctor(player.data.input.aimDirection.x, player.data.input.aimDirection.y, 0f);
				Debug.Log((object)("X " + val2.x + " Y " + val2.y + " Damage " + ((Vector2)(ref damage)).magnitude));
				val.SimulatedAttack(player.playerID, Vector2.op_Implicit(new Vector2(((Component)player).transform.position.x + 1.5f, ((Component)player).transform.position.y)), new Vector3(1f, 0f, 0f), 1f, 1f, (Transform)null, false);
				val.SimulatedAttack(player.playerID, Vector2.op_Implicit(new Vector2(((Component)player).transform.position.x - 1.5f, ((Component)player).transform.position.y)), new Vector3(-1f, 0f, 0f), 1f, 1f, (Transform)null, false);
				val.SimulatedAttack(player.playerID, Vector2.op_Implicit(new Vector2(((Component)player).transform.position.x + 1.5f, ((Component)player).transform.position.y + 0.5f)), new Vector3(0.5f, 1f, 0f), 1f, 1f, (Transform)null, false);
				val.SimulatedAttack(player.playerID, Vector2.op_Implicit(new Vector2(((Component)player).transform.position.x - 1.5f, ((Component)player).transform.position.y + 0.5f)), new Vector3(-0.5f, 1f, 0f), 1f, 1f, (Transform)null, false);
			}
		}

		private static void Prefix(HealthHandler __instance, ref Vector2 damage, Vector2 position, bool lethal, int playerID)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			CharacterData val = (CharacterData)Traverse.Create((object)__instance).Field("data").GetValue();
			Player player = val.player;
			Player playerWithID = GetPlayerWithID(playerID);
			if (player.data.stats.GetAdditionalData().damagingBullet && ExtensionMethods.GetOrAddComponent<FleshFragmentsCD>(((Component)player).gameObject, false).duration <= 0f)
			{
				SimGun(player, damage);
				ExtensionMethods.GetOrAddComponent<FleshFragmentsCD>(((Component)player).gameObject, false).duration = 2f;
			}
		}
	}
}
namespace CPCCore.MonoBehaviours
{
	public class CooldownBlock : MonoBehaviour
	{
		public float duration = 0f;

		private Player player;

		private PlayerActions playerActions;

		public void Awake()
		{
			player = ((Component)this).GetComponentInParent<Player>();
			playerActions = player.data.playerActions;
		}

		public void Update()
		{
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			if (playerActions != null && PlayerActionsExtension.ActionWasPressed(playerActions, "BlockMoveSwitch"))
			{
				player.data.stats.GetAdditionalData().blockPush = !player.data.stats.GetAdditionalData().blockPush;
				if (player.data.stats.GetAdditionalData().blockPush)
				{
					ColorEffect orAddComponent = ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)player).gameObject, false);
					orAddComponent.SetColor(Color.red);
					ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)ChaosPoppycarsCardsCore.Instance, 0.5f, (Action)delegate
					{
						Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false));
					});
				}
				else
				{
					ColorEffect orAddComponent2 = ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)player).gameObject, false);
					orAddComponent2.SetColor(Color.blue);
					ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)ChaosPoppycarsCardsCore.Instance, 0.5f, (Action)delegate
					{
						Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false));
					});
				}
			}
			if (!(duration <= 0f))
			{
				duration -= TimeHandler.deltaTime;
			}
		}
	}
	public class FleshFragmentsCD : MonoBehaviour
	{
		public float duration = 0f;

		public void Update()
		{
			if (!(duration <= 0f))
			{
				duration -= TimeHandler.deltaTime;
			}
		}
	}
	public class Smooth : MonoBehaviour
	{
		public Vector3 currentPos;

		public Vector3 targetPos;

		public float speed;

		private float sinTime;

		private void Start()
		{
			sinTime = 0f;
		}

		private void Update()
		{
			//IL_0002: 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_0055: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			if (currentPos != targetPos)
			{
				sinTime += TimeHandler.deltaTime * speed;
				sinTime = Mathf.Clamp(sinTime, 0f, (float)Math.PI);
				((Component)this).transform.position = Vector3.Lerp(currentPos, targetPos, 0.5f * Mathf.Sin(sinTime - (float)Math.PI / 2f) + 0.5f);
				Object.Destroy((Object)(object)this, speed + 0.1f);
			}
			else
			{
				Object.Destroy((Object)(object)this);
			}
		}
	}
	public class StopRecursionMono : MonoBehaviour
	{
		public static GameObject _stopRecursionObj;

		public static GameObject StopRecursionObj
		{
			get
			{
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Expected O, but got Unknown
				if ((Object)(object)_stopRecursionObj == (Object)null)
				{
					_stopRecursionObj = new GameObject("A_StopRecursion", new Type[1] { typeof(StopRecursion) });
					Object.DontDestroyOnLoad((Object)(object)_stopRecursionObj);
				}
				return _stopRecursionObj;
			}
		}

		public static ObjectsToSpawn[] StopRecursionSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1]
		{
			new ObjectsToSpawn
			{
				AddToProjectile = StopRecursionObj
			}
		};
	}
}
namespace CPCCore.Extensions
{
	[Serializable]
	public class CharacterStatModifiersAdditionalData
	{
		public float RainbowLeafHealth;

		public float DamageAmpDamage;

		public float HealthBouncesBounced;

		public bool useNewRespawnTime;

		public float newRespawnTime;

		public int GeeseSwarms;

		public int StunningStares;

		public int NanoMachines;

		public int remainingTotems;

		public int totems;

		public int Redstone;

		public int Glowstone;

		public bool InvisPot;

		public bool healthCase;

		public bool blockCase;

		public bool firstHit;

		public float damageMult;

		public float damageMultMax;

		public bool firstDamage;

		public bool reducingDmg;

		public float reducingDmgAmt;

		public float firstHitdmgReduction;

		public bool damagingBullet;

		public int dashes;

		public bool blockMover;

		public bool blockPush;

		public float blockMoveStrength;

		public float forcedMove;

		public bool forcedMoveEnabled;

		public bool speedyHands;

		public bool triggerFinger;

		public bool acceleratedRejuvenation;

		public bool boostedBlock;

		public int maxWarps;

		public int shroomsAmt;

		public bool hasTrident;

		public bool whynackBlockForce;

		public bool whynackAd;

		public bool whynackHarmony;

		public bool whynackMeditating;

		public bool rotatedForce;

		public bool cameraLock;

		public bool whynackUpper;

		public float rage;

		public float blockPierce;

		public float upwardsKnockback;

		public float cursorFear;

		public bool useAmmo;

		public bool Mcnally;

		public float ExtraHeal;

		public bool BlackHole;

		public bool WhiteHole;

		public float mapSizeI;

		public CPCNullData nullData;

		public CharacterStatModifiersAdditionalData()
		{
			HealthBouncesBounced = 0f;
			useNewRespawnTime = false;
			newRespawnTime = 0f;
			GeeseSwarms = 0;
			StunningStares = 0;
			NanoMachines = 0;
			remainingTotems = 0;
			totems = 0;
			Redstone = 0;
			Glowstone = 0;
			InvisPot = false;
			healthCase = false;
			blockCase = false;
			firstHit = true;
			firstHitdmgReduction = 1f;
			firstDamage = true;
			reducingDmg = false;
			damageMult = 1f;
			damageMultMax = 1f;
			reducingDmgAmt = 0f;
			damagingBullet = false;
			dashes = 0;
			blockMover = false;
			blockPush = false;
			blockMoveStrength = 0f;
			forcedMove = 0f;
			forcedMoveEnabled = false;
			speedyHands = false;
			triggerFinger = false;
			acceleratedRejuvenation = false;
			boostedBlock = false;
			maxWarps = 0;
			shroomsAmt = 0;
			hasTrident = false;
			whynackBlockForce = false;
			whynackAd = false;
			whynackHarmony = false;
			whynackMeditating = false;
			rotatedForce = false;
			cameraLock = false;
			whynackUpper = false;
			rage = 0f;
			blockPierce = 0f;
			upwardsKnockback = 0f;
			cursorFear = 0f;
			useAmmo = true;
			Mcnally = false;
			ExtraHeal = 1f;
			BlackHole = false;
			WhiteHole = false;
			mapSizeI = 0f;
			nullData = new CPCNullData();
		}
	}
	public static class CharacterStatModifiersExtension
	{
		public static readonly ConditionalWeakTable<CharacterStatModifiers, CharacterStatModifiersAdditionalData> data = new ConditionalWeakTable<CharacterStatModifiers, CharacterStatModifiersAdditionalData>();

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

		public static void AddData(this CharacterStatModifiers statModifiers, CharacterStatModifiersAdditionalData value)
		{
			try
			{
				data.Add(statModifiers, value);
			}
			catch (Exception)
			{
			}
		}
	}
	[HarmonyPatch(typeof(CharacterStatModifiers), "ResetStats")]
	internal class CharacterStatModifiersPatchResetStats
	{
		private static void Prefix(CharacterStatModifiers __instance)
		{
			__instance.GetAdditionalData().HealthBouncesBounced = 0f;
			__instance.GetAdditionalData().useNewRespawnTime = false;
			__instance.GetAdditionalData().newRespawnTime = 0f;
			__instance.GetAdditionalData().GeeseSwarms = 0;
			__instance.GetAdditionalData().StunningStares = 0;
			__instance.GetAdditionalData().NanoMachines = 0;
			__instance.GetAdditionalData().remainingTotems = 0;
			__instance.GetAdditionalData().totems = 0;
			__instance.GetAdditionalData().Redstone = 0;
			__instance.GetAdditionalData().Glowstone = 0;
			__instance.GetAdditionalData().InvisPot = false;
			__instance.GetAdditionalData().healthCase = false;
			__instance.GetAdditionalData().blockCase = false;
			__instance.GetAdditionalData().firstHit = true;
			__instance.GetAdditionalData().firstHitdmgReduction = 1f;
			__instance.GetAdditionalData().firstDamage = true;
			__instance.GetAdditionalData().reducingDmg = false;
			__instance.GetAdditionalData().damageMult = 1f;
			__instance.GetAdditionalData().damageMultMax = 1f;
			__instance.GetAdditionalData().reducingDmgAmt = 0f;
			__instance.GetAdditionalData().damagingBullet = false;
			__instance.GetAdditionalData().dashes = 0;
			__instance.GetAdditionalData().blockMover = false;
			__instance.GetAdditionalData().blockPush = false;
			__instance.GetAdditionalData().blockMoveStrength = 0f;
			__instance.GetAdditionalData().forcedMove = 0f;
			__instance.GetAdditionalData().forcedMoveEnabled = false;
			__instance.GetAdditionalData().speedyHands = false;
			__instance.GetAdditionalData().triggerFinger = false;
			__instance.GetAdditionalData().acceleratedRejuvenation = false;
			__instance.GetAdditionalData().boostedBlock = false;
			__instance.GetAdditionalData().maxWarps = 0;
			__instance.GetAdditionalData().shroomsAmt = 0;
			__instance.GetAdditionalData().hasTrident = false;
			__instance.GetAdditionalData().whynackBlockForce = false;
			__instance.GetAdditionalData().whynackAd = false;
			__instance.GetAdditionalData().whynackHarmony = false;
			__instance.GetAdditionalData().whynackMeditating = false;
			__instance.GetAdditionalData().rotatedForce = false;
			__instance.GetAdditionalData().cameraLock = false;
			__instance.GetAdditionalData().whynackUpper = false;
			__instance.GetAdditionalData().rage = 0f;
			__instance.GetAdditionalData().blockPierce = 0f;
			__instance.GetAdditionalData().upwardsKnockback = 0f;
			__instance.GetAdditionalData().cursorFear = 0f;
			__instance.GetAdditionalData().useAmmo = true;
			__instance.GetAdditionalData().Mcnally = false;
			__instance.GetAdditionalData().ExtraHeal = 1f;
			__instance.GetAdditionalData().BlackHole = false;
			__instance.GetAdditionalData().WhiteHole = false;
			__instance.GetAdditionalData().mapSizeI = 0f;
			__instance.GetAdditionalData().nullData = new CPCNullData();
		}
	}
	public class CPCNullData
	{
		public int luckInc = 0;

		public int screenWarps = 0;

		public int nullShuffles = 0;

		public float knockback = 1f;

		public int nullCurses = 0;
	}
	[Serializable]
	public class GunAdditionalData
	{
		public float criticalHitChance1 = 0f;

		public float criticalHitDamage1 = 1f;

		public int criticalHitBounces = 0;

		public float criticalHitDamageOnBounce = 0f;

		public bool guranteedCrits = false;

		public float consecutiveCritsDamage = 0f;

		public float CritSlow = 0f;

		public Color CritColor = Color.red;

		public Color DoubleCritColor = Color.cyan;

		public float criticalBulletSpeed = 1f;

		public float criticalSimulationSpeed = 1f;

		public float criticalHeal = 0f;

		public int critAmmo = 0;

		public GunAdditionalData()
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			criticalHitChance1 = 0f;
			criticalHitDamage1 = 1f;
			criticalHitBounces = 0;
			criticalHitDamageOnBounce = 0f;
			guranteedCrits = false;
			consecutiveCritsDamage = 0f;
			CritSlow = 0f;
			CritColor = Color.red;
			DoubleCritColor = Color.cyan;
			criticalBulletSpeed = 1f;
			criticalSimulationSpeed = 1f;
			criticalHeal = 0f;
			critAmmo = 0;
		}
	}
	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), "ResetStats")]
	internal class GunPatchResetStats
	{
		private static void Prefix(Gun __instance)
		{
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			__instance.GetAdditionalData().criticalHitChance1 = 0f;
			__instance.GetAdditionalData().criticalHitDamage1 = 1f;
			__instance.GetAdditionalData().criticalHitBounces = 0;
			__instance.GetAdditionalData().criticalHitDamageOnBounce = 0f;
			__instance.GetAdditionalData().consecutiveCritsDamage = 0f;
			__instance.GetAdditionalData().guranteedCrits = false;
			__instance.GetAdditionalData().CritSlow = 0f;
			__instance.GetAdditionalData().CritColor = Color.red;
			__instance.GetAdditionalData().DoubleCritColor = Color.cyan;
			__instance.GetAdditionalData().criticalBulletSpeed = 1f;
			__instance.GetAdditionalData().criticalSimulationSpeed = 1f;
			__instance.GetAdditionalData().criticalHeal = 0f;
			__instance.GetAdditionalData().critAmmo = 0;
		}
	}
	[HarmonyPatch(typeof(ApplyCardStats), "ApplyStats")]
	internal class ApplyCardStatsPatch
	{
		private static void Postfix(ApplyCardStats __instance, Player ___playerToUpgrade)
		{
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: U