Decompiled source of LarrysCards v0.2.3

LarrysCards.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using ClassesManagerReborn;
using ClassesManagerReborn.Util;
using HarmonyLib;
using Jotunn.Utils;
using LarrysCards.Cards.BulletMods;
using LarrysCards.Cards.Classes.Magnet;
using LarrysCards.Cards.Classes.Shulker;
using LarrysCards.Cards.Debuff;
using LarrysCards.Cards.General;
using LarrysCards.Patches;
using LarrysMod;
using ModdingUtils.Extensions;
using ModdingUtils.Utils;
using Photon.Pun;
using RarityLib.Utils;
using SimulationChamber;
using Sonigon;
using SoundImplementation;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.GameModes;
using UnboundLib.Utils;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LarrysCards")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+27fc15eef2a76f3e045134868e38eb6db04eb52b")]
[assembly: AssemblyProduct("LarrysCards")]
[assembly: AssemblyTitle("LarrysCards")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LarrysCards
{
	internal static class Assets
	{
		private static readonly AssetBundle Bundle = AssetUtils.LoadAssetBundleFromResources("coolroundsartlol", typeof(LarrysCards).Assembly);

		public static GameObject BlackMarketArt = Bundle.LoadAsset<GameObject>("C_BlackMarket");

		public static GameObject BadBlackMarketArt = Bundle.LoadAsset<GameObject>("C_BadBlackMarket");

		public static GameObject CardCopierArt = Bundle.LoadAsset<GameObject>("C_CardCopier");

		public static GameObject OldCardCopierArt = Bundle.LoadAsset<GameObject>("C_OldCardCopier");

		public static GameObject AnvilArt = Bundle.LoadAsset<GameObject>("C_Anvil");

		public static GameObject ShulkerArt = Bundle.LoadAsset<GameObject>("C_Shulker");

		public static GameObject StalkerArt = Bundle.LoadAsset<GameObject>("C_StalkerBullets");

		public static GameObject ShulkerShotsArt = Bundle.LoadAsset<GameObject>("C_ShulkerShots");

		public static GameObject ActivatorArt = Bundle.LoadAsset<GameObject>("C_Activator");

		public static GameObject MagnetArt = Bundle.LoadAsset<GameObject>("C_Magnet");

		public static GameObject MagnetShotsArt = Bundle.LoadAsset<GameObject>("C_MagnetShots");

		public static GameObject UltraDefenseArt = Bundle.LoadAsset<GameObject>("C_UltraDefense");

		public static GameObject UltraDefendedArt = Bundle.LoadAsset<GameObject>("C_UltraDefended");

		public static GameObject ZigZagArt = Bundle.LoadAsset<GameObject>("C_ZigZag");

		public static GameObject MultiplyingSlimeArt = Bundle.LoadAsset<GameObject>("C_MultiplyingSlime");

		public static GameObject MultipliedSlimeArt = Bundle.LoadAsset<GameObject>("C_MultipliedSlime");
	}
	internal static class Conditions
	{
		public static bool CommonCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			bool flag = true;
			if (ClassesRegistry.Get(card) != null)
			{
				flag = ClassesRegistry.Get(card).PlayerIsAllowedCard(player);
			}
			return ((int)card.rarity == 0 || (int)card.rarity == 1) && flag;
		}

		public static bool RareCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Invalid comparison between Unknown and I4
			bool flag = true;
			if (ClassesRegistry.Get(card) != null)
			{
				flag = ClassesRegistry.Get(card).PlayerIsAllowedCard(player);
			}
			return (int)card.rarity == 2 && flag;
		}

		public static bool NotCommonOrUncommonCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			bool flag = true;
			if (ClassesRegistry.Get(card) != null)
			{
				flag = ClassesRegistry.Get(card).PlayerIsAllowedCard(player);
			}
			return (int)card.rarity != 0 && (int)card.rarity != 1 && flag;
		}

		public static bool AnyCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			bool flag = true;
			if (ClassesRegistry.Get(card) != null)
			{
				flag = ClassesRegistry.Get(card).PlayerIsAllowedCard(player);
			}
			return !LarrysCards.MyCursedCards.Contains(card) && flag;
		}
	}
	[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("larppaliz.rounds.larryscards", "Larrys's Cards Remake", "0.2.3")]
	[BepInProcess("Rounds.exe")]
	public class LarrysCards : BaseUnityPlugin
	{
		[CompilerGenerated]
		private sealed class <DoubleCardPickEnd>d__23 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public IGameModeHandler gm;

			public LarrysCards <>4__this;

			private DualPickEffect[] <>s__1;

			private int <>s__2;

			private DualPickEffect <effect>5__3;

			private CardInfo <card>5__4;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>s__1 = null;
				<effect>5__3 = null;
				<card>5__4 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				if (<>1__state != 0)
				{
					return false;
				}
				<>1__state = -1;
				<>s__1 = Object.FindObjectsOfType<DualPickEffect>();
				for (<>s__2 = 0; <>s__2 < <>s__1.Length; <>s__2++)
				{
					<effect>5__3 = <>s__1[<>s__2];
					<card>5__4 = <effect>5__3.player.data.currentCards.Last();
					Cards.instance.AddCardToPlayer(<effect>5__3.player, <card>5__4, false, "", 0f, 0f, true);
					CardBarUtils.instance.ShowCard(<effect>5__3.player, <card>5__4);
					<card>5__4 = null;
					<effect>5__3 = null;
				}
				<>s__1 = null;
				GameModeManager.AddOnceHook("RoundStart", (Func<IGameModeHandler, IEnumerator>)instance.RoundStartDoubleCardPick);
				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 <PickStart>d__21 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public IGameModeHandler gm;

			public LarrysCards <>4__this;

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

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

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

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

			private bool MoveNext()
			{
				if (<>1__state != 0)
				{
					return false;
				}
				<>1__state = -1;
				<>4__this.AddCardToPlayerOnPickStart();
				<>4__this.BoosterPackRemove();
				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 <PrepareDoubleCardPick>d__24 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public IGameModeHandler gm;

			public LarrysCards <>4__this;

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

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

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

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

			private bool MoveNext()
			{
				if (<>1__state != 0)
				{
					return false;
				}
				<>1__state = -1;
				GameModeManager.AddOnceHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)instance.DoubleCardPickEnd);
				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 <ResetCardChoiceOverrideSlots>d__28 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public IGameModeHandler gm;

			public LarrysCards <>4__this;

			private List<Player>.Enumerator <>s__1;

			private Player <target>5__2;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>s__1 = default(List<Player>.Enumerator);
				<target>5__2 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				if (<>1__state != 0)
				{
					return false;
				}
				<>1__state = -1;
				LarrysCards_CardExtraInfoPatch.DestroyObject();
				<>s__1 = PlayerManager.instance.players.GetEnumerator();
				try
				{
					while (<>s__1.MoveNext())
					{
						<target>5__2 = <>s__1.Current;
						LarrysCards_CardChoicesPatch.ClearOverridedSlots(<target>5__2);
						<target>5__2 = null;
					}
				}
				finally
				{
					((IDisposable)<>s__1).Dispose();
				}
				<>s__1 = default(List<Player>.Enumerator);
				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 <ResetCardChoiceStuff>d__27 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public IGameModeHandler gm;

			public LarrysCards <>4__this;

			private List<Player>.Enumerator <>s__1;

			private Player <target>5__2;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>s__1 = default(List<Player>.Enumerator);
				<target>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())
					{
						<target>5__2 = <>s__1.Current;
						LarrysCards_CardChoicesPatch.ClearForcedChoices(<target>5__2);
						<target>5__2 = null;
					}
				}
				finally
				{
					((IDisposable)<>s__1).Dispose();
				}
				<>s__1 = default(List<Player>.Enumerator);
				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 <RoundEnd>d__20 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public IGameModeHandler gm;

			public LarrysCards <>4__this;

			private List<int> <winners>5__1;

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

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

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

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

			private bool MoveNext()
			{
				if (<>1__state != 0)
				{
					return false;
				}
				<>1__state = -1;
				<>4__this.PlayersItsDonefor = (Player[])(object)new Player[50];
				<winners>5__1 = <>4__this.GetRoundWinners();
				<>4__this.WinnerCardPower(<winners>5__1);
				<>4__this.BoosterPackPower(<winners>5__1);
				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 <RoundStartDoubleCardPick>d__25 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public IGameModeHandler gm;

			public LarrysCards <>4__this;

			private DualPickEffect[] <>s__1;

			private int <>s__2;

			private DualPickEffect <effect>5__3;

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

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

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

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

			private bool MoveNext()
			{
				if (<>1__state != 0)
				{
					return false;
				}
				<>1__state = -1;
				<>s__1 = Object.FindObjectsOfType<DualPickEffect>();
				for (<>s__2 = 0; <>s__2 < <>s__1.Length; <>s__2++)
				{
					<effect>5__3 = <>s__1[<>s__2];
					CardBarUtils.instance.HideCard(<effect>5__3.player);
					Object.Destroy((Object)(object)<effect>5__3);
					<effect>5__3 = null;
				}
				<>s__1 = null;
				return false;
			}

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

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

		private const string ModId = "larppaliz.rounds.larryscards";

		private const string ModName = "Larrys's Cards Remake";

		public const string Version = "0.2.3";

		public const string ModInitials = "LCrm";

		public GameObject optionsMenu;

		public static List<CardInfo> MyCursedCards = new List<CardInfo>();

		public int[] WinnerDraws = new int[50];

		public Player[] PlayersItsDonefor;

		public static LarrysCards instance { get; private set; }

		private void Awake()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Expected O, but got Unknown
			instance = this;
			Harmony val = new Harmony("larppaliz.rounds.larryscards");
			val.PatchAll();
			GameModeManager.AddHook("PickStart", (Func<IGameModeHandler, IEnumerator>)PickStart);
			GameModeManager.AddHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)RoundEnd);
			GameModeManager.AddHook("GameEnd", (Func<IGameModeHandler, IEnumerator>)ResetCardChoiceStuff);
			GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)ResetCardChoiceStuff);
			GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)ResetCardChoiceOverrideSlots);
		}

		private void Start()
		{
			//IL_081b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0825: Expected O, but got Unknown
			CustomCard.BuildCard<DoubleShot>();
			CustomCard.BuildCard<BlockingMaster>();
			CustomCard.BuildCard<Rebuild>();
			CustomCard.BuildCard<FocusedShots>();
			CustomCard.BuildCard<SprayAndPray>();
			CustomCard.BuildCard<SuperBurst>();
			CustomCard.BuildCard<BulletStream>();
			CustomCard.BuildCard<SuperShotgun>();
			CustomCard.BuildCard<QuickswitchMagazine>();
			CustomCard.BuildCard<AnvilCard>();
			CustomCard.BuildCard<TimelessBullets>();
			CustomCard.BuildCard<DualBurst>();
			CustomCard.BuildCard<IWantOneToo>();
			CustomCard.BuildCard<CardDealer>();
			CustomCard.BuildCard<GiveItToMeLater>((Action<CardInfo>)delegate(CardInfo c)
			{
				GiveItToMeLater.CardInfo = c;
			});
			CustomCard.BuildCard<DoubleIt>((Action<CardInfo>)delegate(CardInfo c)
			{
				DoubleIt.CardInfo = c;
			});
			CustomCard.BuildCard<StaticBullets>((Action<CardInfo>)delegate(CardInfo c)
			{
				StaticBullets.CardInfo = c;
			});
			CustomCard.BuildCard<LaunchingBullets>((Action<CardInfo>)delegate(CardInfo c)
			{
				StaticBullets.CardInfo = c;
			});
			CustomCard.BuildCard<ReversingBullets>((Action<CardInfo>)delegate(CardInfo c)
			{
				ReversingBullets.CardInfo = c;
			});
			CustomCard.BuildCard<GrenadeBullets>((Action<CardInfo>)delegate(CardInfo c)
			{
				GrenadeBullets.CardInfo = c;
			});
			CustomCard.BuildCard<FuseBullets>();
			CustomCard.BuildCard<BouncesToBullets>();
			CustomCard.BuildCard<ExtraDamage>();
			CustomCard.BuildCard<LightSpeedBuckshot>();
			CustomCard.BuildCard<BarrelMod>();
			CustomCard.BuildCard<MoonBullets>();
			CustomCard.BuildCard<ActivatorCard>((Action<CardInfo>)delegate(CardInfo c)
			{
				ActivatorCard.CardInfo = c;
			});
			CustomCard.BuildCard<AccelleratingBullets>((Action<CardInfo>)delegate(CardInfo c)
			{
				AccelleratingBullets.CardInfo = c;
			});
			CustomCard.BuildCard<GravityInverterBullets>((Action<CardInfo>)delegate(CardInfo c)
			{
				GravityInverterBullets.CardInfo = c;
			});
			CustomCard.BuildCard<BadHoming>((Action<CardInfo>)delegate(CardInfo c)
			{
				BadHoming.CardInfo = c;
			});
			CustomCard.BuildCard<SplitBullets>((Action<CardInfo>)delegate(CardInfo c)
			{
				SplitBullets.CardInfo = c;
			});
			CustomCard.BuildCard<HoppingBullets>((Action<CardInfo>)delegate(CardInfo c)
			{
				HoppingBullets.CardInfo = c;
			});
			CustomCard.BuildCard<PlayerControlledBullets>((Action<CardInfo>)delegate(CardInfo c)
			{
				PlayerControlledBullets.CardInfo = c;
			});
			CustomCard.BuildCard<StalkerBullets>((Action<CardInfo>)delegate(CardInfo c)
			{
				StalkerBullets.CardInfo = c;
			});
			CustomCard.BuildCard<LagBullets>((Action<CardInfo>)delegate(CardInfo c)
			{
				LagBullets.CardInfo = c;
			});
			CustomCard.BuildCard<BugBullets>((Action<CardInfo>)delegate(CardInfo c)
			{
				BugBullets.CardInfo = c;
			});
			CustomCard.BuildCard<CardTricks>();
			CustomCard.BuildCard<Copier>((Action<CardInfo>)delegate(CardInfo c)
			{
				Copier.CardInfo = c;
			});
			CustomCard.BuildCard<OldCopier>((Action<CardInfo>)delegate(CardInfo c)
			{
				OldCopier.CardInfo = c;
			});
			CustomCard.BuildCard<UltraDefense>((Action<CardInfo>)delegate(CardInfo c)
			{
				UltraDefense.CardInfo = c;
			});
			CustomCard.BuildCard<MultiplyingSlime>((Action<CardInfo>)delegate(CardInfo c)
			{
				MultiplyingSlime.CardInfo = c;
			});
			CustomCard.BuildCard<BlackMarket>((Action<CardInfo>)delegate(CardInfo c)
			{
				BlackMarket.CardInfo = c;
			});
			CustomCard.BuildCard<RiceMarket>((Action<CardInfo>)delegate(CardInfo c)
			{
				RiceMarket.CardInfo = c;
			});
			CustomCard.BuildCard<DarkWebDeals>((Action<CardInfo>)delegate(CardInfo c)
			{
				DarkWebDeals.CardInfo = c;
			});
			CustomCard.BuildCard<UltimateCopyCat>((Action<CardInfo>)delegate(CardInfo c)
			{
				UltimateCopyCat.CardInfo = c;
			});
			CustomCard.BuildCard<Rice>((Action<CardInfo>)delegate(CardInfo c)
			{
				Rice.CardInfo = c;
			});
			CustomCard.BuildCard<BlackMarketCopy>((Action<CardInfo>)delegate(CardInfo c)
			{
				BlackMarketCopy.CardInfo = c;
			});
			CustomCard.BuildCard<UltraDefenseCopy>((Action<CardInfo>)delegate(CardInfo c)
			{
				UltraDefenseCopy.CardInfo = c;
			});
			CustomCard.BuildCard<MultipliedSlime>((Action<CardInfo>)delegate(CardInfo c)
			{
				MultipliedSlime.CardInfo = c;
			});
			CustomCard.BuildCard<TrueEvil>((Action<CardInfo>)delegate(CardInfo c)
			{
				TrueEvil.CardInfo = c;
			});
			CustomCard.BuildCard<PlotArmor>((Action<CardInfo>)delegate(CardInfo c)
			{
				PlotArmor.CardInfo = c;
			});
			CustomCard.BuildCard<BigMonkeAttack>((Action<CardInfo>)delegate(CardInfo c)
			{
				BigMonkeAttack.CardInfo = c;
			});
			CustomCard.BuildCard<BounceSabotage>((Action<CardInfo>)delegate(CardInfo c)
			{
				BounceSabotage.CardInfo = c;
			});
			CustomCard.BuildCard<StickySabotage>((Action<CardInfo>)delegate(CardInfo c)
			{
				StickySabotage.CardInfo = c;
			});
			CustomCard.BuildCard<EvilCurse>((Action<CardInfo>)delegate(CardInfo card)
			{
				EvilCurse.CardInfo = card;
			});
			CustomCard.BuildCard<BigMonkeCurse>((Action<CardInfo>)delegate(CardInfo card)
			{
				BigMonkeCurse.CardInfo = card;
			});
			CustomCard.BuildCard<CurseofTheTroopers>((Action<CardInfo>)delegate(CardInfo card)
			{
				CurseofTheTroopers.CardInfo = card;
			});
			CustomCard.BuildCard<BounceCurse>((Action<CardInfo>)delegate(CardInfo card)
			{
				BounceCurse.CardInfo = card;
			});
			CustomCard.BuildCard<StickySolution>((Action<CardInfo>)delegate(CardInfo card)
			{
				StickySolution.CardInfo = card;
			});
			CustomCard.BuildCard<ShulkerShots>((Action<CardInfo>)delegate(CardInfo card)
			{
				ShulkerShots.CardInfo = card;
			});
			CustomCard.BuildCard<ExtraShulks>((Action<CardInfo>)delegate(CardInfo card)
			{
				ExtraShulks.CardInfo = card;
			});
			CustomCard.BuildCard<DoubleShulks>((Action<CardInfo>)delegate(CardInfo card)
			{
				DoubleShulks.CardInfo = card;
			});
			CustomCard.BuildCard<FasterShulks>((Action<CardInfo>)delegate(CardInfo card)
			{
				FasterShulks.CardInfo = card;
			});
			CustomCard.BuildCard<StoppingShulks>((Action<CardInfo>)delegate(CardInfo card)
			{
				StoppingShulks.CardInfo = card;
			});
			CustomCard.BuildCard<TeleportingShulks>((Action<CardInfo>)delegate(CardInfo card)
			{
				TeleportingShulks.CardInfo = card;
			});
			CustomCard.BuildCard<LongerTP>((Action<CardInfo>)delegate(CardInfo card)
			{
				LongerTP.CardInfo = card;
			});
			CustomCard.BuildCard<LessTPDelay>((Action<CardInfo>)delegate(CardInfo card)
			{
				LessTPDelay.CardInfo = card;
			});
			CustomCard.BuildCard<MagnetShots>((Action<CardInfo>)delegate(CardInfo card)
			{
				MagnetShots.CardInfo = card;
			});
			CustomCard.BuildCard<LessMagnetDelay>((Action<CardInfo>)delegate(CardInfo card)
			{
				LessMagnetDelay.CardInfo = card;
			});
			CustomCard.BuildCard<LessMagnetCooldown>((Action<CardInfo>)delegate(CardInfo card)
			{
				LessMagnetCooldown.CardInfo = card;
			});
			CustomCard.BuildCard<MoreMagnetRange>((Action<CardInfo>)delegate(CardInfo card)
			{
				MoreMagnetRange.CardInfo = card;
			});
			CustomCard.BuildCard<MagnetTeleport>((Action<CardInfo>)delegate(CardInfo card)
			{
				MagnetTeleport.CardInfo = card;
			});
			CustomCard.BuildCard<MagnetStop>((Action<CardInfo>)delegate(CardInfo card)
			{
				MagnetStop.CardInfo = card;
			});
			foreach (CardInfo myCursedCard in MyCursedCards)
			{
				if ((Object)(object)myCursedCard != (Object)new CardInfo() && (Object)(object)myCursedCard != (Object)null)
				{
					Cards.instance.AddHiddenCard(myCursedCard);
					((Behaviour)myCursedCard).enabled = false;
				}
			}
		}

		public static void CreateWorkingExplosion(Player player, Vector3 position, float maxRange = 5f, Gun ownerGun = null)
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fb: 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)
			GameObject val = Resources.Load<GameObject>("0 cards/Explosive bullet");
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			Gun component = val.GetComponent<Gun>();
			GameObject effect = component.objectsToSpawn[0].effect;
			if ((Object)(object)effect == (Object)null)
			{
				return;
			}
			GameObject val2 = Object.Instantiate<GameObject>(effect, position, Quaternion.identity);
			((Object)val2).name = "CustomExplosion";
			CircleCollider2D component2 = val2.GetComponent<CircleCollider2D>();
			if ((Object)(object)component2 != (Object)null)
			{
				((Collider2D)component2).isTrigger = true;
			}
			Explosion component3 = val2.GetComponent<Explosion>();
			if (!((Object)(object)component3 == (Object)null))
			{
				SpawnedAttack val3 = val2.AddComponent<SpawnedAttack>();
				val3.spawner = player;
				val2.AddComponent<PhotonView>();
				if ((Object)(object)ownerGun == (Object)null)
				{
					ownerGun = player.data.weaponHandler.gun;
				}
				component3.damage = 30f;
				component3.range = 4f;
				component3.hitPlayerAction = null;
				component3.HitTargetAction = null;
				component3.DealDamageAction = null;
				component3.DealHealAction = null;
				float num = component.damage / 2f + 0.5f;
				val2.transform.localScale = new Vector3(num, num, num);
				Transform child = val2.transform.GetChild(4);
				((Component)child).gameObject.SetActive(num >= 2f && num < 10f);
				child.rotation = new Quaternion(child.rotation.x, child.rotation.y + 90f, child.rotation.z, child.rotation.w);
				child = val2.transform.GetChild(5);
				((Component)child).gameObject.SetActive(num >= 10f);
				child.rotation = new Quaternion(child.rotation.x, child.rotation.y + 90f, child.rotation.z, child.rotation.w);
				int num2 = Random.Range(0, 9);
				SoundImpactModifier soundImpactModifier = ((Component)(from card in CardManager.cards.Values
					select card.cardInfo into card
					where card.cardName.ToLower() == "EXPLOSIVE BULLET".ToLower()
					select card).First()).GetComponent<Gun>().soundImpactModifier;
				SoundManager.Instance.Play(soundImpactModifier.impactEnvironment, val2.transform);
				Object.Destroy((Object)(object)val2, 2f);
			}
		}

		public static bool allowCard(Player player, CardInfo card)
		{
			bool flag = true;
			if (ClassesRegistry.Get(card) != null)
			{
				flag = ClassesRegistry.Get(card).PlayerIsAllowedCard(player);
			}
			return card.allowMultiple || (!card.allowMultiple && !player.data.currentCards.Contains(card) && flag);
		}

		public List<int> GetRoundWinners()
		{
			return new List<int>(GameModeManager.CurrentHandler.GetRoundWinners());
		}

		public void WinnerCardPower(List<int> winners)
		{
			WinnerCardEffect[] array = Object.FindObjectsOfType<WinnerCardEffect>();
			foreach (WinnerCardEffect winnerCardEffect in array)
			{
				if ((Object)(object)winnerCardEffect != (Object)null && winners.Contains(winnerCardEffect.player.teamID))
				{
					CardInfo val = Cards.instance.GetRandomCardWithCondition(winnerCardEffect.player, winnerCardEffect.player.data.weaponHandler.gun, ((Component)winnerCardEffect.player.data.weaponHandler.gun).GetComponent<GunAmmo>(), winnerCardEffect.player.data, winnerCardEffect.player.data.healthHandler, ((Component)winnerCardEffect.player).GetComponent<Gravity>(), winnerCardEffect.player.data.block, ((Component)winnerCardEffect.player.data).GetComponent<CharacterStatModifiers>(), (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)Conditions.CommonCondition, 1000);
					if ((Object)(object)val == (Object)null)
					{
						CardInfo[] array2 = ((ObservableCollection<CardInfo>)typeof(CardManager).GetField("activeCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)).ToList().Concat((List<CardInfo>)typeof(CardManager).GetField("inactiveCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)).ToArray();
						val = Cards.instance.DrawRandomCardWithCondition(array2, winnerCardEffect.player, winnerCardEffect.player.data.weaponHandler.gun, ((Component)winnerCardEffect.player.data.weaponHandler.gun).GetComponent<GunAmmo>(), winnerCardEffect.player.data, winnerCardEffect.player.data.healthHandler, ((Component)winnerCardEffect.player).GetComponent<Gravity>(), winnerCardEffect.player.data.block, ((Component)winnerCardEffect.player.data).GetComponent<CharacterStatModifiers>(), (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)Conditions.CommonCondition, 1000);
					}
					if ((Object)(object)val != (Object)null)
					{
						Cards.instance.AddCardToPlayer(winnerCardEffect.player, val, false, "", 0f, 0f, true);
						CardBarUtils.instance.ShowAtEndOfPhase(winnerCardEffect.player, val);
					}
				}
			}
		}

		public void BoosterPackPower(List<int> winners)
		{
			BoosterPackEffect[] array = Object.FindObjectsOfType<BoosterPackEffect>();
			foreach (BoosterPackEffect boosterPackEffect in array)
			{
				if (!((Object)(object)boosterPackEffect != (Object)null) || !((Object)(object)boosterPackEffect.player != (Object)null) || !winners.Contains(boosterPackEffect.player.teamID))
				{
					continue;
				}
				CardInfo val = null;
				for (int j = 0; j < 2; j++)
				{
					val = Cards.instance.GetRandomCardWithCondition(boosterPackEffect.player, boosterPackEffect.player.data.weaponHandler.gun, ((Component)boosterPackEffect.player.data.weaponHandler.gun).GetComponent<GunAmmo>(), boosterPackEffect.player.data, boosterPackEffect.player.data.healthHandler, ((Component)boosterPackEffect.player).GetComponent<Gravity>(), boosterPackEffect.player.data.block, ((Component)boosterPackEffect.player.data).GetComponent<CharacterStatModifiers>(), (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)Conditions.AnyCondition, 1000);
					if ((Object)(object)val != (Object)null)
					{
						Cards.instance.AddCardToPlayer(boosterPackEffect.player, val, false, "", 0f, 0f, true);
						CardBarUtils.instance.ShowAtEndOfPhase(boosterPackEffect.player, val);
					}
				}
				val = Cards.instance.GetRandomCardWithCondition(boosterPackEffect.player, boosterPackEffect.player.data.weaponHandler.gun, ((Component)boosterPackEffect.player.data.weaponHandler.gun).GetComponent<GunAmmo>(), boosterPackEffect.player.data, boosterPackEffect.player.data.healthHandler, ((Component)boosterPackEffect.player).GetComponent<Gravity>(), boosterPackEffect.player.data.block, ((Component)boosterPackEffect.player.data).GetComponent<CharacterStatModifiers>(), (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)Conditions.RareCondition, 1000);
				if ((Object)(object)val != (Object)null)
				{
					Cards.instance.AddCardToPlayer(boosterPackEffect.player, val, false, "", 0f, 0f, true);
					CardBarUtils.instance.ShowAtEndOfPhase(boosterPackEffect.player, val);
				}
			}
		}

		public void BoosterPackRemove()
		{
			BoosterPackEffect[] array = Object.FindObjectsOfType<BoosterPackEffect>();
			foreach (BoosterPackEffect boosterPackEffect in array)
			{
				while (boosterPackEffect.player.data.currentCards.Contains(boosterPackEffect.card))
				{
					Cards.instance.RemoveCardFromPlayer(boosterPackEffect.player, boosterPackEffect.card, (SelectionType)2);
				}
			}
		}

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

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

		public void AddCardToPlayerOnPickStart()
		{
			AddCardPickStart[] array = Object.FindObjectsOfType<AddCardPickStart>();
			foreach (AddCardPickStart addCardPickStart in array)
			{
				if ((Object)(object)addCardPickStart != (Object)null && (Object)(object)addCardPickStart.player != (Object)null)
				{
					Random random = new Random();
					if (random.Next(100) < addCardPickStart.chance || addCardPickStart.chance == 0)
					{
						Cards.instance.AddCardToPlayer(addCardPickStart.player, addCardPickStart.card, false, "", 0f, 0f, true);
						CardBarUtils.instance.ShowAtEndOfPhase(addCardPickStart.player, addCardPickStart.card);
					}
				}
			}
		}

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

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

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

		public static Vector2 RotatedBy(Vector2 spinningpoint, float degrees, Vector2 center = default(Vector2))
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			double num = (float)((double)degrees * (Math.PI / 180.0));
			float num2 = (float)Math.Cos(num);
			float num3 = (float)Math.Sin(num);
			Vector2 val = spinningpoint - center;
			Vector2 result = center;
			result.x += val.x * num2 - val.y * num3;
			result.y += val.x * num3 + val.y * num2;
			return result;
		}

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

		[IteratorStateMachine(typeof(<ResetCardChoiceOverrideSlots>d__28))]
		private IEnumerator ResetCardChoiceOverrideSlots(IGameModeHandler gm)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <ResetCardChoiceOverrideSlots>d__28(0)
			{
				<>4__this = this,
				gm = gm
			};
		}
	}
	public class ProjectileAdder : MonoBehaviour
	{
		public ProjectilesToSpawn[] projectiles;

		public void Start()
		{
			Gun gun = ((Component)this).GetComponentInParent<WeaponHandler>().gun;
			List<ProjectilesToSpawn> list = gun.projectiles.ToList();
			list.AddRange(projectiles);
			gun.projectiles = list.ToArray();
		}

		public void OnDestroy()
		{
			Gun gun = ((Component)this).GetComponentInParent<WeaponHandler>().gun;
			List<ProjectilesToSpawn> list = gun.projectiles.ToList();
			ProjectilesToSpawn[] array = projectiles;
			foreach (ProjectilesToSpawn item in array)
			{
				list.Remove(item);
			}
			gun.projectiles = list.ToArray();
		}
	}
	public class AddCardPickStart : MonoBehaviour
	{
		public Player player;

		public CardInfo card;

		public int chance = 0;

		public void Start()
		{
			player = ((Component)this).gameObject.GetComponentInParent<Player>();
		}
	}
}
namespace LarrysCards.Patches
{
	public class ForcedCardRequest
	{
		public Func<Player, bool> condition = (Player _) => true;

		public Func<Player, CardInfo> customRoll;

		public CardInfo card;

		public int slot;

		public bool fill;

		public bool reverse;

		public ForcedCardRequest Clone()
		{
			return new ForcedCardRequest
			{
				card = card,
				slot = slot,
				fill = fill,
				reverse = reverse,
				customRoll = customRoll,
				condition = condition
			};
		}
	}
	[HarmonyPatch(typeof(CardChoice), "SpawnUniqueCard")]
	public static class LarrysCards_CardChoicesPatch
	{
		public static Dictionary<int, List<ForcedCardRequest>> pendingForcedCards = new Dictionary<int, List<ForcedCardRequest>>();

		public static Dictionary<int, List<ForcedCardRequest>> readyForcedCards = new Dictionary<int, List<ForcedCardRequest>>();

		private static Dictionary<int, List<int>> overridedSlotsThisRun = new Dictionary<int, List<int>>();

		public static void AddForcedCardChoice(Player player, ForcedCardRequest fcr)
		{
			if (!pendingForcedCards.ContainsKey(player.playerID))
			{
				pendingForcedCards.Add(player.playerID, new List<ForcedCardRequest>());
			}
			pendingForcedCards[player.playerID].Add(fcr);
		}

		public static bool RemoveForcedCardChoice(Player player, ForcedCardRequest fcr)
		{
			if (!pendingForcedCards.ContainsKey(player.playerID))
			{
				return false;
			}
			return pendingForcedCards[player.playerID].Remove(fcr);
		}

		public static void RemoveFromReadyForcedCards(int playerID, ForcedCardRequest fcr)
		{
			if (readyForcedCards.ContainsKey(playerID) && readyForcedCards[playerID].Contains(fcr))
			{
				readyForcedCards[playerID].Remove(fcr);
			}
		}

		public static void ClearForcedChoices(Player player)
		{
			int key = PlayerManager.instance.players.IndexOf(player);
			if (pendingForcedCards == null)
			{
				pendingForcedCards = new Dictionary<int, List<ForcedCardRequest>>();
			}
			if (pendingForcedCards.ContainsKey(key))
			{
				pendingForcedCards.Remove(key);
			}
		}

		public static void ClearOverridedSlots(Player player)
		{
			int key = PlayerManager.instance.players.IndexOf(player);
			if (overridedSlotsThisRun == null)
			{
				overridedSlotsThisRun = new Dictionary<int, List<int>>();
			}
			if (overridedSlotsThisRun.ContainsKey(key))
			{
				overridedSlotsThisRun[key] = new List<int>();
			}
		}

		public static void SetBetterSlots(Player player, int maxCount)
		{
			int[] array = new int[maxCount];
			foreach (ForcedCardRequest item in readyForcedCards[player.playerID])
			{
				if (item.reverse)
				{
					item.slot = maxCount - item.slot - 1;
				}
				if (item.slot == -1)
				{
					int num = 0;
					for (int i = 0; i < 100; i++)
					{
						if (array[num] > 0)
						{
							num = Random.Range(0, maxCount);
						}
					}
					if (array[num] != 0)
					{
						break;
					}
					item.slot = num;
				}
				else
				{
					for (int j = 0; j < maxCount; j++)
					{
						if (array[item.slot] <= 0)
						{
							break;
						}
						if (item.reverse)
						{
							item.slot--;
						}
						else
						{
							item.slot++;
						}
					}
				}
				if (item.slot >= 0 && item.slot < maxCount)
				{
					array[item.slot]++;
				}
			}
		}

		[HarmonyPriority(0)]
		[HarmonyAfter(new string[] { "com.Root.Null", "com.willuwontu.rounds.cards", "pykess.rounds.plugins.cardchoicespawnuniquecardpatch", "pykess.rounds.plugins.pickphaseshenanigans" })]
		public static void Postfix(ref CardChoice __instance, ref GameObject __result, ref List<GameObject> ___spawnedCards, ref Transform[] ___children, ref int ___pickrID)
		{
			//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Expected O, but got Unknown
			if (___pickrID < 0 || ___pickrID > PlayerManager.instance.players.Count || (Object)(object)PlayerManager.instance == (Object)null || PlayerManager.instance.players == null)
			{
				return;
			}
			Player player = PlayerManager.instance.players[___pickrID];
			if ((Object)(object)player == (Object)null || pendingForcedCards == null || (Object)(object)__instance == (Object)null || (Object)(object)__result == (Object)null || ___spawnedCards == null || ___children == null || !pendingForcedCards.ContainsKey(___pickrID))
			{
				return;
			}
			if (overridedSlotsThisRun == null)
			{
				overridedSlotsThisRun = new Dictionary<int, List<int>>();
			}
			if (___spawnedCards.Count == 0)
			{
				readyForcedCards = pendingForcedCards.ToDictionary((KeyValuePair<int, List<ForcedCardRequest>> entry) => entry.Key, (KeyValuePair<int, List<ForcedCardRequest>> entry) => (from fcr in entry.Value
					where fcr.condition(player)
					select fcr.Clone()).ToList());
				SetBetterSlots(player, ___children.Count());
			}
			for (int i = 0; i < readyForcedCards[___pickrID].Count; i++)
			{
				ForcedCardRequest forcedCardRequest = readyForcedCards[___pickrID][i];
				int slot = forcedCardRequest.slot;
				if (___spawnedCards.Count != slot)
				{
					continue;
				}
				CardInfo val = null;
				if (forcedCardRequest.customRoll == null)
				{
					val = forcedCardRequest.card;
				}
				if ((Object)(object)val == (Object)null && forcedCardRequest.customRoll != null)
				{
					val = forcedCardRequest.customRoll?.Invoke(player);
				}
				if ((Object)(object)val == (Object)null)
				{
					val = Rice.CardInfo;
					MonoBehaviour.print((object)"Card was null, turned it into RICE");
				}
				if (!overridedSlotsThisRun.ContainsKey(player.playerID))
				{
					overridedSlotsThisRun.Add(player.playerID, new List<int>());
				}
				CollectionExtensions.AddItem<int>((IEnumerable<int>)overridedSlotsThisRun[player.playerID], slot);
				RemoveFromReadyForcedCards(player.playerID, forcedCardRequest);
				GameObject old = __result;
				if (!((Object)(object)LarrysCards.instance == (Object)null) && !((Object)(object)((Component)val).gameObject == (Object)null))
				{
					ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)LarrysCards.instance, 3, (Action)delegate
					{
						PhotonNetwork.Destroy(old);
					});
					__result = (GameObject)typeof(CardChoice).GetMethod("Spawn", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(__instance, new object[3]
					{
						((Component)val).gameObject,
						__result.transform.position,
						__result.transform.rotation
					});
					__result.GetComponent<CardInfo>().sourceCard = val;
					((Behaviour)((Component)__result.GetComponentInChildren<DamagableEvent>()).GetComponent<Collider2D>()).enabled = false;
				}
				break;
			}
		}
	}
	public class CardExtraInfo : MonoBehaviour
	{
		public Func<Player, CardExtraInfo, CardInfo> propCard;
	}
	[HarmonyPatch(typeof(CardChoice), "Update")]
	public static class LarrysCards_CardExtraInfoPatch
	{
		public static GameObject shownObject;

		public static int selectedCard = -1;

		public static int spawnedCount = 0;

		public static List<CardInfo> getCardsFromGameObjects(List<GameObject> gameObjects)
		{
			List<CardInfo> list = new List<CardInfo>();
			foreach (GameObject gameObject in gameObjects)
			{
				if (!((Object)(object)gameObject == (Object)null) && Object.op_Implicit((Object)(object)gameObject.GetComponent<CardInfo>()))
				{
					CardInfo component = gameObject.GetComponent<CardInfo>();
					list.Add(component);
				}
			}
			return list;
		}

		public static void DestroyObject()
		{
			selectedCard = -1;
			if (!((Object)(object)shownObject == (Object)null))
			{
				Object.Destroy((Object)(object)shownObject);
				shownObject = null;
			}
		}

		public static void Postfix(ref CardChoice __instance, ref int ___currentlySelectedCard, ref List<GameObject> ___spawnedCards, ref Transform[] ___children)
		{
			//IL_0166: 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_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: 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_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: 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_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_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)CardChoiceVisuals.instance != (Object)null))
			{
				return;
			}
			if (__instance.IsPicking)
			{
				int num = ___currentlySelectedCard;
				int count = ___spawnedCards.Count;
				if (spawnedCount != count)
				{
					DestroyObject();
				}
				spawnedCount = count;
				if (num != selectedCard)
				{
					DestroyObject();
				}
				selectedCard = num;
				if (!((Object)(object)shownObject == (Object)null))
				{
					return;
				}
				List<CardInfo> cardsFromGameObjects = getCardsFromGameObjects(___spawnedCards);
				if (num < 0 || num > ___spawnedCards.Count - 1)
				{
					return;
				}
				GameObject val = ___spawnedCards[num];
				Player val2 = PlayerManager.instance.players[__instance.pickrID];
				if ((Object)(object)val2 == (Object)null || cardsFromGameObjects.Count - 1 < num || num < 0 || (Object)(object)val == (Object)null || (Object)(object)val.GetComponent<CardExtraInfo>() == (Object)null)
				{
					return;
				}
				CardExtraInfo component = val.GetComponent<CardExtraInfo>();
				if (component.propCard != null)
				{
					CardInfo val3 = component.propCard(val2, component);
					Transform transform = ___spawnedCards[num].transform;
					Vector3 val4 = transform.right;
					if (transform.position.x > 0f)
					{
						val4 *= -1f;
					}
					Quaternion rotation = transform.rotation;
					if (((Quaternion)(ref rotation)).eulerAngles.z == 0f)
					{
						val4 = transform.up * -1.3f;
					}
					shownObject = __instance.AddCardVisual(val3, new Vector3(0f, 0f, 0f));
					Vector3 val5 = val4 * 12f;
					val5.x *= transform.localScale.x;
					val5.y *= transform.localScale.y;
					val5.z *= transform.localScale.z;
					shownObject.transform.localScale = transform.localScale * 0.8f;
					shownObject.transform.position = transform.position + val5;
					ExtensionMethods.AddZPosition(shownObject.transform, -15f);
					shownObject.transform.rotation = transform.rotation;
				}
			}
			else
			{
				DestroyObject();
			}
		}
	}
	[Serializable]
	[HarmonyPatch(typeof(Cards), "PlayerIsAllowedCard")]
	public class LarrysCards_PlayerAllowedCard
	{
		public static void Postfix(ref bool __result, Player player, CardInfo card)
		{
			if (__result && !((Object)(object)player == (Object)null) && !((Object)(object)card == (Object)null) && (Object)(object)card == (Object)(object)ActivatorCard.CardInfo)
			{
				__result = Object.op_Implicit((Object)(object)((Component)player).GetComponent<ActivatorMono>());
			}
		}
	}
	[HarmonyPatch(typeof(ProjectileCollision))]
	internal class LarrysCards_ProjectileCollisionPatch
	{
		[HarmonyPatch("HitSurface")]
		[HarmonyPrefix]
		public static bool hitSurface(ProjectileCollision __instance, ref HasToStop __result, GameObject projectile, HitInfo hit)
		{
			if ((Object)(object)projectile.GetComponent<ProjectileHit>().ownPlayer == (Object)(object)((Component)__instance).GetComponentInParent<ProjectileHit>().ownPlayer)
			{
				return false;
			}
			return true;
		}
	}
}
namespace LarrysCards.Cards.General
{
	internal class AnvilCard : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			gun.damage = 2.5f;
			gun.gravity = 2f;
		}

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

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

		protected override string GetTitle()
		{
			return "Anvil Bullets";
		}

		protected override string GetDescription()
		{
			return "Almost as heavy as...";
		}

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

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[3]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "DMG",
					amount = "+150%",
					simepleAmount = (SimpleAmount)7
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Bounces",
					amount = "Reset",
					simepleAmount = (SimpleAmount)7
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Bullet Gravity",
					amount = "+100%",
					simepleAmount = (SimpleAmount)7
				}
			};
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	internal class BarrelMod : CustomCard
	{
		public static GameObject objectToSpawn;

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			gun.damage = 1.5f;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			gun.destroyBulletAfter *= 4f;
			gun.spread /= 2f;
		}

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

		protected override string GetTitle()
		{
			return "Barrel Modficiations";
		}

		protected override string GetDescription()
		{
			return "";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[3]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "DMG",
					amount = "+50%",
					simepleAmount = (SimpleAmount)2
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Bullet Range",
					amount = "4x",
					simepleAmount = (SimpleAmount)3
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Spread",
					amount = "-50%",
					simepleAmount = (SimpleAmount)1
				}
			};
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	public class SuperBulletMono : MonoBehaviour
	{
		public Player player;

		public void Start()
		{
			player = ((Component)this).gameObject.GetComponentInParent<Player>();
		}
	}
	internal class BlackMarket : CustomCard
	{
		public static CardInfo CardInfo;

		public override void Callback()
		{
			ExtensionMethods.GetOrAddComponent<CardExtraInfo>(((Component)this).gameObject, false).propCard = (Player _, CardExtraInfo __) => BlackMarketCopy.CardInfo;
		}

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			LarrysMod.instance.PlayerDrawsIncrease(player, 2);
			Player[] playersInTeam = PlayerManager.instance.GetPlayersInTeam(player.teamID);
			foreach (Player val in playersInTeam)
			{
				if ((Object)(object)val != (Object)null && (Object)(object)val != (Object)(object)player)
				{
					CardInfo cardInfo = BlackMarketCopy.CardInfo;
					Cards.instance.AddCardToPlayer(val, cardInfo, false, "", 0f, 0f);
					CardBarUtils.instance.ShowAtEndOfPhase(val, cardInfo);
				}
			}
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			LarrysMod.instance.PlayerDrawsIncrease(player, -2);
		}

		protected override string GetTitle()
		{
			return "Black Market";
		}

		protected override string GetDescription()
		{
			return "<color=#00ff00>Teammates</color> get a <color=#5c7c9c>Black Market Benefits</color> card";
		}

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

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[1]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Card Draws",
					amount = "+2",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	internal class BlackMarketCopy : CustomCard
	{
		public static CardInfo CardInfo;

		public override bool GetEnabled()
		{
			return false;
		}

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

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

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			LarrysMod.instance.PlayerDrawsIncrease(player, -2);
		}

		protected override string GetTitle()
		{
			return "Black Market Benefits";
		}

		protected override string GetDescription()
		{
			return "I wouldnt trust your friend over there.";
		}

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

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[1]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Card Draws",
					amount = "+1",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	internal class BlockingMaster : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			block.additionalBlocks = 2;
			statModifiers.health = 0.6f;
		}

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

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

		protected override string GetTitle()
		{
			return "Blocking Master";
		}

		protected override string GetDescription()
		{
			return "Blocking triggers two delayed blocks";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[1]
			{
				new CardInfoStat
				{
					positive = false,
					stat = "Health",
					amount = "-40%",
					simepleAmount = (SimpleAmount)7
				}
			};
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	internal class BoosterPack : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			cardInfo.allowMultiple = false;
		}

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

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

		protected override string GetTitle()
		{
			return "Booster Pack";
		}

		protected override string GetDescription()
		{
			return "Win the next round to open";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[2]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Cards",
					amount = "2",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Rare Card",
					amount = "1",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	public class BoosterPackEffect : MonoBehaviour
	{
		public Player player;

		public CardInfo card;

		public void Start()
		{
			player = ((Component)this).gameObject.GetComponentInParent<Player>();
		}
	}
	internal class BouncesToBullets : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			int numberOfProjectiles = gun.numberOfProjectiles;
			if (gun.reflects > 0)
			{
				gun.numberOfProjectiles = gun.reflects;
			}
			else
			{
				gun.numberOfProjectiles = 1;
			}
			gun.reflects = numberOfProjectiles;
		}

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

		protected override string GetTitle()
		{
			return "Bounces to Bullets";
		}

		protected override string GetDescription()
		{
			return "Swap your bounces and bullets amounts";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

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

		protected override CardInfoStat[] GetStats()
		{
			return (CardInfoStat[])(object)new CardInfoStat[0];
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	internal class BulletStream : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			if (gun.bursts == 0)
			{
				gun.bursts++;
			}
			gun.bursts += 6;
			gun.spread = 0.125f;
			gun.timeBetweenBullets = 0.05f;
			gun.damage = 0.4f;
		}

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

		protected override string GetTitle()
		{
			return "Bullet Stream";
		}

		protected override string GetDescription()
		{
			return "";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[4]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Bursts",
					amount = "+6",
					simepleAmount = (SimpleAmount)1
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Burst Delay",
					amount = "0.05",
					simepleAmount = (SimpleAmount)1
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Spread",
					amount = "+45°",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "DMG",
					amount = "-60%",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	internal class CardDealer : CustomCard
	{
		private CardInfo[] gottencards;

		private Player[] GottenCardPlayer = (Player[])(object)new Player[20];

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

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			for (int i = 0; i < PlayerManager.instance.players.Count; i++)
			{
				Player val = PlayerManager.instance.players[i];
				if (val.teamID == player.teamID)
				{
					CardInfo val2 = Cards.instance.NORARITY_GetRandomCardWithCondition(val, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)Conditions.AnyCondition, 1000);
					if ((Object)(object)val2 == (Object)null)
					{
						CardInfo[] array = ((ObservableCollection<CardInfo>)typeof(CardManager).GetField("activeCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)).ToList().Concat((List<CardInfo>)typeof(CardManager).GetField("inactiveCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)).ToArray();
						val2 = Cards.instance.DrawRandomCardWithCondition(array, val, (Gun)null, (GunAmmo)null, (CharacterData)null, (HealthHandler)null, (Gravity)null, (Block)null, (CharacterStatModifiers)null, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)Conditions.AnyCondition, 1000);
					}
					CollectionExtensions.AddItem<Player>((IEnumerable<Player>)GottenCardPlayer, val);
					CollectionExtensions.AddItem<CardInfo>((IEnumerable<CardInfo>)gottencards, val2);
					CollectionExtensions.AddItem<Player>((IEnumerable<Player>)GottenCardPlayer, val);
					CollectionExtensions.AddItem<CardInfo>((IEnumerable<CardInfo>)gottencards, val2);
					CharacterData data2 = player.data;
					data2.maxHealth *= 1.1f;
					Cards.instance.AddCardsToPlayer(val, (CardInfo[])(object)new CardInfo[2] { val2, val2 }, (bool[])null, (string[])null, (float[])null, (float[])null, true);
					CardBarUtils.instance.ShowAtEndOfPhase(val, val2);
				}
				else
				{
					CardInfo val3 = Cards.instance.NORARITY_GetRandomCardWithCondition(val, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)Conditions.CommonCondition, 1000);
					if ((Object)(object)val3 == (Object)null)
					{
						CardInfo[] array2 = ((ObservableCollection<CardInfo>)typeof(CardManager).GetField("activeCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)).ToList().Concat((List<CardInfo>)typeof(CardManager).GetField("inactiveCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)).ToArray();
						val3 = Cards.instance.DrawRandomCardWithCondition(array2, val, (Gun)null, (GunAmmo)null, (CharacterData)null, (HealthHandler)null, (Gravity)null, (Block)null, (CharacterStatModifiers)null, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)Conditions.CommonCondition, 1000);
					}
					CollectionExtensions.AddItem<Player>((IEnumerable<Player>)GottenCardPlayer, val);
					CollectionExtensions.AddItem<CardInfo>((IEnumerable<CardInfo>)gottencards, val3);
					CharacterData data3 = player.data;
					data3.maxHealth *= 1.1f;
					Cards.instance.AddCardToPlayer(val, val3, false, "", 0f, 0f, true);
					CardBarUtils.instance.ShowAtEndOfPhase(val, val3);
				}
			}
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			for (int i = 0; i < PlayerManager.instance.players.Count; i++)
			{
				Player val = PlayerManager.instance.players[i];
				for (int j = 0; j < gottencards.Length; j++)
				{
					if ((Object)(object)GottenCardPlayer[j] == (Object)(object)val)
					{
						Cards.instance.RemoveCardFromPlayer(val, gottencards[j], (SelectionType)1);
						gottencards[j] = null;
						GottenCardPlayer[j] = null;
					}
				}
			}
		}

		protected override string GetTitle()
		{
			return "Unfair Card Dealer";
		}

		protected override string GetDescription()
		{
			return "";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Expected O, but got Unknown
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: 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_010f: Expected O, but got Unknown
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[7]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Health / Player",
					amount = "+10%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "",
					amount = "",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Get",
					amount = "<color=#00ff00>You & Teammates</color>",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Card & Copy",
					amount = "+1",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "",
					amount = "",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Get",
					amount = "<color=#ff0000>Enemies</color>",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "<color=#a4a49c>COMMON</color> Card",
					amount = "+1",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	internal class CardTricks : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false;
			cardInfo.allowMultiple = false;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			Random random = new Random();
			List<Player> list = new List<Player>();
			foreach (Player player2 in PlayerManager.instance.players)
			{
				if (player2.data.currentCards.Count > 0)
				{
					list.Add(player2);
				}
			}
			CardInfo val = Rice.CardInfo;
			if (list.Count > 0)
			{
				Player val2 = list[random.Next(list.Count)];
				for (int num = val2.data.currentCards.Count - 1; num >= 0; num--)
				{
					val = val2.data.currentCards[num];
					if ((Object)(object)val != (Object)null && LarrysCards.allowCard(player, val))
					{
						break;
					}
				}
			}
			Cards.instance.AddCardToPlayer(player, val, false, "", 0f, 0f, true);
			CardBarUtils.instance.ShowAtEndOfPhase(player, val);
		}

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

		protected override string GetTitle()
		{
			return "Card Tricks";
		}

		protected override string GetDescription()
		{
			return "Get a copy of the newest card from a random player";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

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

		protected override CardInfoStat[] GetStats()
		{
			return (CardInfoStat[])(object)new CardInfoStat[0];
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	internal class CardUpgrade : CustomCard
	{
		public CardInfo oldCard;

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

		public bool HigherRarityCondition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: 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_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			Rarity rarityData = RarityUtils.GetRarityData(card.rarity);
			Rarity rarity = RarityUtils.GetRarity("Legendary");
			for (int i = 0; i < RarityUtils.Rarities.Count; i++)
			{
				if (RarityUtils.Rarities[i] == rarityData)
				{
					Random random = new Random();
					rarity = RarityUtils.GetRarity(RarityUtils.Rarities[i + (RarityUtils.Rarities.Count - i - 1)].name);
				}
			}
			return card.rarity == rarity;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			gun.damage += 0.27272728f;
			oldCard = player.data.currentCards.Last();
			CardInfo cardInfo = BlackMarketCopy.CardInfo;
			if ((Object)(object)oldCard != (Object)null)
			{
				cardInfo = Cards.instance.NORARITY_GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)HigherRarityCondition, 1000);
				if ((Object)(object)cardInfo == (Object)null)
				{
					cardInfo = Cards.instance.NORARITY_GetRandomCardWithCondition(player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)null, 1000);
				}
				Cards.instance.RemoveCardFromPlayer(player, player.data.currentCards.Count - 1);
				Cards.instance.AddCardToPlayer(player, cardInfo, false, "", 0f, 0f, true);
				CardBarUtils.instance.ShowAtEndOfPhase(player, cardInfo);
			}
		}

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

		protected override string GetTitle()
		{
			return "Card Upgrade";
		}

		protected override string GetDescription()
		{
			return "Replace your newest card with a random one of a higher rarity";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[1]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Damage",
					amount = "+15",
					simepleAmount = (SimpleAmount)7
				}
			};
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	internal class Copier : CustomCard
	{
		public static CardInfo CardInfo;

		public override void Callback()
		{
			ExtensionMethods.GetOrAddComponent<CardExtraInfo>(((Component)this).gameObject, false).propCard = delegate(Player player, CardExtraInfo _)
			{
				CardInfo val = null;
				for (int num = player.data.currentCards.Count - 1; num >= 0; num--)
				{
					CardInfo val2 = player.data.currentCards[num];
					if ((Object)(object)val2 != (Object)null && LarrysCards.allowCard(player, val2))
					{
						val = val2;
						break;
					}
				}
				if ((Object)(object)val == (Object)null)
				{
					val = Rice.CardInfo;
				}
				return val;
			};
		}

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

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			CardInfo val = null;
			for (int num = player.data.currentCards.Count - 1; num >= 0; num--)
			{
				CardInfo val2 = player.data.currentCards[num];
				if ((Object)(object)val2 != (Object)null && LarrysCards.allowCard(player, val2))
				{
					val = val2;
					break;
				}
			}
			if ((Object)(object)val == (Object)null)
			{
				val = Rice.CardInfo;
			}
			Cards.instance.AddCardToPlayer(player, val, false, "", 0f, 0f, true);
		}

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

		protected override string GetTitle()
		{
			return "Card Copier";
		}

		protected override string GetDescription()
		{
			return "Get a copy of your newest card that allows duplicates";
		}

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

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

		protected override CardInfoStat[] GetStats()
		{
			return (CardInfoStat[])(object)new CardInfoStat[0];
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	internal class DarkWebDeals : CustomCard
	{
		public static CardInfo CardInfo;

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

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			LarrysCards_CardChoicesPatch.AddForcedCardChoice(player, new ForcedCardRequest
			{
				customRoll = (Player player) => Cards.instance.GetRandomCardWithCondition(player, player.data.weaponHandler.gun, ((Component)player.data.weaponHandler.gun).GetComponent<GunAmmo>(), player.data, player.data.healthHandler, ((Component)player).GetComponent<Gravity>(), player.data.block, ((Component)player.data).GetComponent<CharacterStatModifiers>(), (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)Conditions.NotCommonOrUncommonCondition, 1000),
				slot = 0,
				fill = true
			});
			LarrysMod.instance.PlayerDrawsIncrease(player, 1);
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			LarrysCards_CardChoicesPatch.RemoveForcedCardChoice(player, new ForcedCardRequest
			{
				customRoll = (Player player) => Cards.instance.GetRandomCardWithCondition(player, player.data.weaponHandler.gun, ((Component)player.data.weaponHandler.gun).GetComponent<GunAmmo>(), player.data, player.data.healthHandler, ((Component)player).GetComponent<Gravity>(), player.data.block, ((Component)player.data).GetComponent<CharacterStatModifiers>(), (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)Conditions.NotCommonOrUncommonCondition, 1000),
				slot = 0,
				fill = true
			});
			LarrysMod.instance.PlayerDrawsIncrease(player, -1);
		}

		protected override string GetTitle()
		{
			return "Dark Web Deals";
		}

		protected override string GetDescription()
		{
			return "Your card draws will always have a <color=#ff00f4>RARE+</color> card";
		}

		protected override GameObject GetCardArt()
		{
			return null;
		}

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

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[1]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Card Draws",
					amount = "+1",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

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

		public override string GetModName()
		{
			return "LCrm";
		}
	}
	internal class DoubleIt : CustomCard
	{
		public static CardInfo CardInfo;

		public override void Callback()
		{
			ExtensionMethods.GetOrAddComponent<CardExtraInfo>(((Component)this).gameObject, false).propCard = (Player _, CardExtraInfo __) => GiveItToMeLater.CardInfo;
		}

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

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			LarrysCards_CardChoicesPatch.AddForcedCardChoice(player, new ForcedCardRequest
			{
				card = GiveItToMeLater.CardInfo,
				slot = 0,
				fill = true,
				reverse = true,
				condition = (Player player) => !Object.op_Implicit((Object)(object)((Component)player).gameObject.GetComponent<DualPickEffect>())
			});
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			LarrysCards_CardChoicesPatch.AddForcedCardChoice(player, new ForcedCardRequest
			{
				card = GiveItToMeLater.CardInfo,
				slot = 0,
				fill = true,
				reverse = true,
				condition = (Player player) => !Object.op_Implicit((Object)(object)((Component)player).gameObject.GetComponent<DualPickEffect>())
			});
		}

		protected override string GetTitle()
		{
			return "Double it & Give it to me later";
		}

		protected override string GetDescription()
		{
			return "Adds a <color=#62f2f7>GIVE IT TO ME LATER</color