Decompiled source of Root Core v1.4.10

Root Core Modual.dll

Decompiled 3 weeks 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 System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using CardChoiceSpawnUniqueCardPatch.CustomCategories;
using CardThemeLib;
using DrawNCards;
using HarmonyLib;
using ItemShops.Extensions;
using ItemShops.Utils;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using ModdingUtils.Extensions;
using ModdingUtils.Utils;
using Nullmanager;
using Photon.Pun;
using RarityLib.Utils;
using RootCore.CardConditions;
using Steamworks;
using TMPro;
using TabInfo.Utils;
using UnboundLib;
using UnboundLib.GameModes;
using UnboundLib.Networking;
using UnboundLib.Utils;
using UnboundLib.Utils.UI;
using UnityEditor;
using UnityEditor.ProjectWindowCallback;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
using UnityEngine.UI.ProceduralImage;
using WillsWackyManagers.Utils;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: SecurityPermission(8, SkipVerification = true)]
[assembly: AssemblyVersion("1.4.10.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(/*Could not decode attribute arguments.*/)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace RootCore
{
	public class CardList : MonoBehaviour
	{
		public RootCardInfo[] CardsToRegester;

		internal static Dictionary<string, RootCardInfo> ModCards = new Dictionary<string, RootCardInfo>();

		public static RootCardInfo GetCardInfo(string cardName)
		{
			return (ModCards == null || !ModCards.ContainsKey(cardName)) ? null : ModCards[cardName];
		}

		public static List<RootCardInfo> GetCardsWithCondition(Func<RootCardInfo, bool> condition)
		{
			return Enumerable.ToList<RootCardInfo>(Enumerable.Where<RootCardInfo>((IEnumerable<RootCardInfo>)(object)ModCards.Values, condition));
		}
	}
	[Serializable]
	public class CharacterStatModifiersRootData : Object
	{
		public class NullData : Object
		{
			public float Health_multiplier;

			public float MovmentSpeed_multiplier;

			public float Damage_multiplier;

			public int gun_Reflects;

			public int gun_Ammo;

			public float Lifesteal;

			public float block_cdMultiplier;

			public int Revives;

			public NullData()
			{
				Health_multiplier = 1f;
				MovmentSpeed_multiplier = 1f;
				Damage_multiplier = 1f;
				Lifesteal = 0f;
				block_cdMultiplier = 1f;
				gun_Reflects = 0;
				gun_Ammo = 0;
				Revives = 0;
			}
		}

		public float shieldEfectiveness;

		public int freeCards;

		public int ammoCap;

		public int bulletCap;

		public int trueMaxAmmo;

		public CardInfo lockedCard;

		public float witchTimeDuration;

		public bool stillShoping;

		public int knowledge;

		public float hpCulling;

		public int nullsPerPoint;

		public NullData nullData;

		public bool simple;

		public CardInfo perpetualCard;

		public CardInfo DelayedCard;

		public float damageCap;

		public float damageCapWindow;

		public string SteamID;

		public float damageCapFilled;

		public float flatProjectileDamage;

		public float flatHPboost;

		public float tempflatHPboost;

		public CharacterStatModifiersRootData()
		{
			reset();
			knowledge = 0;
			SteamID = "";
			stillShoping = false;
			freeCards = 0;
		}

		public void reset()
		{
			shieldEfectiveness = 1f;
			ammoCap = -1;
			bulletCap = -1;
			trueMaxAmmo = 3;
			lockedCard = null;
			witchTimeDuration = 0f;
			hpCulling = 0f;
			nullsPerPoint = 0;
			nullData = new NullData();
			simple = false;
			perpetualCard = null;
			DelayedCard = null;
			damageCap = 0f;
			damageCapWindow = 0f;
			damageCapFilled = 0f;
			flatProjectileDamage = 0f;
			flatHPboost = 0f;
		}
	}
	public static class CharacterStatModifiersExtension : Object
	{
		public static readonly ConditionalWeakTable<CharacterStatModifiers, CharacterStatModifiersRootData> data = new ConditionalWeakTable<CharacterStatModifiers, CharacterStatModifiersRootData>();

		public static CharacterStatModifiersRootData GetRootData(this CharacterStatModifiers characterstats)
		{
			return data.GetOrCreateValue(characterstats);
		}

		public static CharacterStatModifiersRootData GetRootData(this Player player)
		{
			return player.data.stats.GetRootData();
		}

		public static void AddData(this CharacterStatModifiers characterstats, CharacterStatModifiersRootData value)
		{
			try
			{
				data.Add(characterstats, value);
			}
			catch (Exception)
			{
			}
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	internal class CharacterStatModifiersPatchResetStats : Object
	{
		private static void Prefix(CharacterStatModifiers __instance)
		{
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			__instance.GetRootData().reset();
			Transform[] componentsInChildren = ((Component)__instance).gameObject.GetComponentsInChildren<Transform>();
			Transform[] array = componentsInChildren;
			foreach (Transform val in array)
			{
				if (((Object)((Component)val).gameObject).name == "ShieldStone")
				{
					val.localScale = new Vector3(0.05f, 0.05f, 0.05f);
				}
			}
		}
	}
	public class ClaseInterface : Object
	{
	}
	public static class Colour : Object
	{
		public static Color New(double r, double g, double b, double a = 1.0)
		{
			//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_0011: Unknown result type (might be due to invalid IL or missing references)
			return new Color((float)r, (float)g, (float)b, (float)a);
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("Systems.R00t.CoreModual", "Root Core", "1.4.10")]
	[BepInProcess("Rounds.exe")]
	public class Core : BaseUnityPlugin
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c : Object
		{
			public static readonly <>c <>9 = new <>c();

			public static Predicate<BaseUnityPlugin> <>9__11_2;

			public static UnityAction <>9__11_0;

			public static Func<Player, CardInfo, bool> <>9__11_1;

			public static UnityAction<bool> <>9__13_0;

			public static UnityAction<bool> <>9__13_1;

			public static Action<Player> <>9__14_0;

			public static Action<Player> <>9__15_0;

			public static Action<Player> <>9__16_0;

			internal bool <Start>b__11_2(BaseUnityPlugin plugin)
			{
				return plugin.Info.Metadata.GUID == "com.willuwontu.rounds.tabinfo";
			}

			internal void <Start>b__11_0()
			{
			}

			internal bool <Start>b__11_1(Player player, CardInfo cardinfo)
			{
				return (Object)(object)cardinfo.sourceCard == (Object)null || cardinfo.sourceCard.allowMultiple || !player.HasCard(cardinfo.sourceCard);
			}

			internal void <NewGUI>b__13_0(bool value)
			{
				Credits = value;
				PlayerPrefs.SetInt("Systems.R00t.CoreModual.Credits", value ? 1 : 0);
			}

			internal void <NewGUI>b__13_1(bool value)
			{
				DEBUG.Value = value;
			}

			internal void <GameStart>b__14_0(Player player)
			{
				//IL_003b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0040: Unknown result type (might be due to invalid IL or missing references)
				//IL_0059: Unknown result type (might be due to invalid IL or missing references)
				if (player.data.view.IsMine)
				{
					Type typeFromHandle = typeof(Core);
					Object[] obj = new Object[2]
					{
						(object)player.playerID,
						default(Object)
					};
					CSteamID steamID = SteamUser.GetSteamID();
					obj[1] = (Object)((UInt64)(ref steamID.m_SteamID)).ToString();
					NetworkingManager.RPC(typeFromHandle, "SetSteamID", (object[])(object)obj);
					Debug(String.Format("My SteamID is {0}", (object)SteamUser.GetSteamID().m_SteamID));
				}
			}

			internal void <PointStart>b__15_0(Player player)
			{
				CharacterData data = player.data;
				data.maxHealth += player.GetRootData().flatHPboost;
				CharacterData data2 = player.data;
				data2.health += player.GetRootData().flatHPboost;
				player.GetRootData().tempflatHPboost = player.GetRootData().flatHPboost;
			}

			internal void <PointEnd>b__16_0(Player player)
			{
				CharacterData data = player.data;
				data.maxHealth -= player.GetRootData().tempflatHPboost;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass12_0 : Object
		{
			public RootCardInfo card;

			internal void <RegesterCards>b__0()
			{
				((Collection<CardInfo>)(object)CardManager.activeCards).Add((CardInfo)(object)card);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass12_1 : Object
		{
			public CardCondition condition;

			public <>c__DisplayClass12_0 CS$<>8__locals1;

			internal bool <RegesterCards>b__1(Player player, CardInfo cardinfo)
			{
				return (Object)(object)cardinfo != (Object)(object)CS$<>8__locals1.card || condition.IsPlayerAllowedCard(player);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass17_0 : Object
		{
			public int playerID;

			internal bool <SetSteamID>b__0(Player p)
			{
				return p.playerID == playerID;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass18_0 : Object
		{
			public CardInfo card;

			public Func<Player, bool> func;

			internal bool <AddCardRquirement>b__0(Player p, CardInfo c)
			{
				return (Object)(object)c == (Object)(object)card && func.Invoke(p);
			}
		}

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

			private object <>2__current;

			public IGameModeHandler gm;

			public Core <>4__this;

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

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

			[DebuggerHidden]
			public <GameStart>d__14(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;
				PlayerManager.instance.players.ForEach((Action<Player>)delegate(Player player)
				{
					//IL_003b: Unknown result type (might be due to invalid IL or missing references)
					//IL_0040: Unknown result type (might be due to invalid IL or missing references)
					//IL_0059: Unknown result type (might be due to invalid IL or missing references)
					if (player.data.view.IsMine)
					{
						Type typeFromHandle = typeof(Core);
						Object[] obj = new Object[2]
						{
							(object)player.playerID,
							default(Object)
						};
						CSteamID steamID = SteamUser.GetSteamID();
						obj[1] = (Object)((UInt64)(ref steamID.m_SteamID)).ToString();
						NetworkingManager.RPC(typeFromHandle, "SetSteamID", (object[])(object)obj);
						Debug(String.Format("My SteamID is {0}", (object)SteamUser.GetSteamID().m_SteamID));
					}
				});
				return false;
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				throw new NotSupportedException();
			}
		}

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

			private object <>2__current;

			public IGameModeHandler gm;

			public Core <>4__this;

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

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

			[DebuggerHidden]
			public <PointEnd>d__16(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;
				PlayerManager.instance.players.ForEach((Action<Player>)delegate(Player player)
				{
					CharacterData data = player.data;
					data.maxHealth -= player.GetRootData().tempflatHPboost;
				});
				return false;
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <PointStart>d__15 : Object, IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public IGameModeHandler gm;

			public Core <>4__this;

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

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

			[DebuggerHidden]
			public <PointStart>d__15(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;
				PlayerManager.instance.players.ForEach((Action<Player>)delegate(Player player)
				{
					CharacterData data = player.data;
					data.maxHealth += player.GetRootData().flatHPboost;
					CharacterData data2 = player.data;
					data2.health += player.GetRootData().flatHPboost;
					player.GetRootData().tempflatHPboost = player.GetRootData().flatHPboost;
				});
				return false;
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				throw new NotSupportedException();
			}
		}

		private const string ModId = "Systems.R00t.CoreModual";

		private const string ModName = "Root Core";

		public const string Version = "1.4.10";

		public static ConfigEntry<bool> DEBUG;

		public static bool Credits;

		public static Core instance;

		private static CardCategory[] _noLotteryCategories;

		private static bool test = true;

		public static CardCategory[] NoLotteryCategories
		{
			get
			{
				if (_noLotteryCategories == null)
				{
					_noLotteryCategories = (CardCategory[])(object)new CardCategory[2]
					{
						CustomCardCategories.instance.CardCategory("CardManipulation"),
						CustomCardCategories.instance.CardCategory("NoRandom")
					};
				}
				return _noLotteryCategories;
			}
		}

		private void Awake()
		{
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			instance = this;
			DEBUG = ((BaseUnityPlugin)this).Config.Bind<bool>("Root", "Debug", false, "Enable to turn on concole spam from our mod");
			Credits = PlayerPrefs.GetInt("Systems.R00t.CoreModual.Credits", 1) != 0;
			AssetUtils.LoadAssetBundleFromResources("rootcore", typeof(Core).Assembly);
			Harmony val = new Harmony("Systems.R00t.CoreModual");
			val.PatchAll(typeof(Core).Assembly);
		}

		private void Start()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Expected O, but got Unknown
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Expected O, but got Unknown
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Expected O, but got Unknown
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: 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_01cc: Expected O, but got Unknown
			//IL_01c7: 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_0220: Unknown result type (might be due to invalid IL or missing references)
			//IL_0226: Expected O, but got Unknown
			CardThemeLib.instance.CreateOrGetType("DarknessBlack", new CardThemeColor
			{
				bgColor = Colour.New(0.1978, 0.1088, 0.1321),
				targetColor = Colour.New(0.0978, 0.1088, 0.1321)
			});
			CardThemeLib.instance.CreateOrGetType("RootCake", new CardThemeColor
			{
				bgColor = Colour.New(0.7134047, 0.0, 1.0, 0.5176471),
				targetColor = Colour.New(0.2971698, 0.6546086, 1.0)
			});
			CardThemeLib.instance.CreateOrGetType("Abnormality", new CardThemeColor
			{
				bgColor = Colour.New(0.212, 0.031, 0.031),
				targetColor = Colour.New(0.933, 0.949, 0.612)
			});
			CardThemeLib.instance.CreateOrGetType("Inscryption", new CardThemeColor
			{
				bgColor = Colour.New(0.51, 0.455, 0.333),
				targetColor = Colour.New(0.641, 0.222, 0.143)
			});
			if (Chainloader.Plugins.Exists((Predicate<BaseUnityPlugin>)((BaseUnityPlugin plugin) => plugin.Info.Metadata.GUID == "com.willuwontu.rounds.tabinfo")))
			{
				TabInfoRegesterer.Setup();
			}
			object obj = <>c.<>9__11_0;
			if (obj == null)
			{
				UnityAction val = delegate
				{
				};
				<>c.<>9__11_0 = val;
				obj = (object)val;
			}
			Unbound.RegisterMenu("Root Settings", (UnityAction)obj, (Action<GameObject>)NewGUI, (GameObject)null, true);
			GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)GameStart);
			GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)PointStart);
			GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd);
			CardManager.categories.Add("Root");
			Cards.instance.AddCardValidationFunction((Func<Player, CardInfo, bool>)((Player player, CardInfo cardinfo) => (Object)(object)cardinfo.sourceCard == (Object)null || cardinfo.sourceCard.allowMultiple || !player.HasCard(cardinfo.sourceCard)));
		}

		public static void RegesterCards(CardList list, bool betaOverwriteDoNotUse = false)
		{
			//IL_0001: 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_027a: Expected O, but got Unknown
			//IL_030c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0316: Expected O, but got Unknown
			//IL_037c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Expected O, but got Unknown
			string modVertion = String.Concat(((Object)((MemberInfo)new StackTrace().GetFrame(1).GetMethod()).ReflectedType.Assembly.GetName().Version).ToString(), " ").Replace(".0 ", "");
			RootCardInfo[] cardsToRegester = list.CardsToRegester;
			for (int i = 0; i < cardsToRegester.Length; i++)
			{
				<>c__DisplayClass12_0 CS$<>8__locals1 = new <>c__DisplayClass12_0();
				CS$<>8__locals1.card = cardsToRegester[i];
				if ((Object)(object)CS$<>8__locals1.card == (Object)null || !CS$<>8__locals1.card.Build)
				{
					continue;
				}
				if (test)
				{
					Debug(JsonUtility.ToJson((object)CS$<>8__locals1.card));
					test = false;
				}
				CS$<>8__locals1.card.modVertion = modVertion;
				if (CS$<>8__locals1.card.Author == "Tessy")
				{
					CS$<>8__locals1.card.Author = "Izzy";
				}
				((Object)CS$<>8__locals1.card).name = String.Concat((string[])(object)new String[6]
				{
					"Root-Card  ",
					CS$<>8__locals1.card.Key,
					" (",
					CS$<>8__locals1.card.Tag,
					")",
					betaOverwriteDoNotUse ? "  BETA" : ""
				});
				if (betaOverwriteDoNotUse && CardList.ModCards.ContainsKey(CS$<>8__locals1.card.Key))
				{
					CardManager.cards.Remove(((Object)CardList.ModCards[CS$<>8__locals1.card.Key]).name);
					Cards.instance.hiddenCards.Remove((CardInfo)(object)CardList.ModCards[CS$<>8__locals1.card.Key]);
					CardList.ModCards.Remove(CS$<>8__locals1.card.Key);
				}
				CardList.ModCards.Add(CS$<>8__locals1.card.Key, CS$<>8__locals1.card);
				PhotonNetwork.PrefabPool.RegisterPrefab(((Object)CS$<>8__locals1.card).name, ((Component)CS$<>8__locals1.card).gameObject);
				CustomCardCategories.instance.UpdateAndPullCategoriesFromCard((CardInfo)(object)CS$<>8__locals1.card);
				if (CS$<>8__locals1.card.Hidden)
				{
					Cards.instance.AddHiddenCard((CardInfo)(object)CS$<>8__locals1.card);
				}
				else if (CS$<>8__locals1.card.Restricted)
				{
					Cards.instance.AddHiddenCard((CardInfo)(object)CS$<>8__locals1.card);
					ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)instance, 15, (Action)delegate
					{
						((Collection<CardInfo>)(object)CardManager.activeCards).Add((CardInfo)(object)CS$<>8__locals1.card);
					});
				}
				else if (CS$<>8__locals1.card.Tag == "Root")
				{
					CardManager.cards.Add(((Object)CS$<>8__locals1.card).name, new Card(String.Concat(CS$<>8__locals1.card.Tag, " (", ((Object)list).name, ")"), Unbound.config.Bind<bool>(String.Concat("Cards: ", CS$<>8__locals1.card.Tag), ((Object)CS$<>8__locals1.card).name, !CS$<>8__locals1.card.StartDisabled, (ConfigDescription)null), (CardInfo)(object)CS$<>8__locals1.card));
				}
				else
				{
					CardManager.cards.Add(((Object)CS$<>8__locals1.card).name, new Card(CS$<>8__locals1.card.Tag ?? "", Unbound.config.Bind<bool>(String.Concat("Cards: ", CS$<>8__locals1.card.Tag), ((Object)CS$<>8__locals1.card).name, !CS$<>8__locals1.card.StartDisabled, (ConfigDescription)null), (CardInfo)(object)CS$<>8__locals1.card));
				}
				if (Enumerable.Contains<CardCategory>((IEnumerable<CardCategory>)(object)((CardInfo)CS$<>8__locals1.card).categories, CustomCardCategories.instance.CardCategory("SkipReroleCard")))
				{
					WillInterface.cardsSkippedForRerolls(CS$<>8__locals1.card);
				}
				CS$<>8__locals1.card.Setup();
				CardCondition[] components = ((Component)CS$<>8__locals1.card).GetComponents<CardCondition>();
				for (int j = 0; j < components.Length; j++)
				{
					<>c__DisplayClass12_1 CS$<>8__locals0 = new <>c__DisplayClass12_1();
					CS$<>8__locals0.CS$<>8__locals1 = CS$<>8__locals1;
					CS$<>8__locals0.condition = components[j];
					Cards.instance.AddCardValidationFunction((Func<Player, CardInfo, bool>)((Player player, CardInfo cardinfo) => (Object)(object)cardinfo != (Object)(object)CS$<>8__locals0.CS$<>8__locals1.card || CS$<>8__locals0.condition.IsPlayerAllowedCard(player)));
				}
			}
		}

		private void NewGUI(GameObject menu)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			TextMeshProUGUI val = default(TextMeshProUGUI);
			MenuHandler.CreateText("Root Settings", menu, ref val, 60, false, default(Nullable<Color>), (TMP_FontAsset)null, (Material)null, default(Nullable<TextAlignmentOptions>));
			MenuHandler.CreateToggle(Credits, "Card Credits", menu, (UnityAction<bool>)delegate(bool value)
			{
				Credits = value;
				PlayerPrefs.SetInt("Systems.R00t.CoreModual.Credits", value ? 1 : 0);
			}, 50, false, new Nullable<Color>(Color.magenta), (TMP_FontAsset)null, (Material)null, default(Nullable<TextAlignmentOptions>));
			MenuHandler.CreateToggle(DEBUG.Value, "Debug Mode", menu, (UnityAction<bool>)delegate(bool value)
			{
				DEBUG.Value = value;
			}, 50, false, new Nullable<Color>(Color.red), (TMP_FontAsset)null, (Material)null, default(Nullable<TextAlignmentOptions>));
		}

		[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
		internal IEnumerator GameStart(IGameModeHandler gm)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return (IEnumerator)(object)new <GameStart>d__14(0)
			{
				<>4__this = this,
				gm = gm
			};
		}

		[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
		internal IEnumerator PointStart(IGameModeHandler gm)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return (IEnumerator)(object)new <PointStart>d__15(0)
			{
				<>4__this = this,
				gm = gm
			};
		}

		[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
		internal IEnumerator PointEnd(IGameModeHandler gm)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return (IEnumerator)(object)new <PointEnd>d__16(0)
			{
				<>4__this = this,
				gm = gm
			};
		}

		[UnboundRPC]
		private static void SetSteamID(int playerID, string steamID)
		{
			<>c__DisplayClass17_0 CS$<>8__locals0 = new <>c__DisplayClass17_0();
			CS$<>8__locals0.playerID = playerID;
			Debug(String.Format("Player{0}'s SteamID is {1}", (object)CS$<>8__locals0.playerID, (object)steamID));
			Player val = PlayerManager.instance.players.Find((Predicate<Player>)((Player p) => p.playerID == CS$<>8__locals0.playerID));
			if (val != null)
			{
				val.GetRootData().SteamID = steamID;
			}
		}

		public static void AddCardRquirement(CardInfo card, Func<Player, bool> func)
		{
			<>c__DisplayClass18_0 CS$<>8__locals0 = new <>c__DisplayClass18_0();
			CS$<>8__locals0.card = card;
			CS$<>8__locals0.func = func;
			Cards.instance.AddCardValidationFunction((Func<Player, CardInfo, bool>)((Player p, CardInfo c) => (Object)(object)c == (Object)(object)CS$<>8__locals0.card && CS$<>8__locals0.func.Invoke(p)));
		}

		public static void Debug(object message)
		{
			if (message == null)
			{
				message = "{{NULL}}";
			}
			if (DEBUG.Value)
			{
				Debug.Log((object)String.Concat("ROOT=>", (message != null) ? message.ToString() : null));
			}
		}
	}
	public abstract class CustomProjectileHit : ProjectileHit
	{
		public override void Hit(HitInfo hit, bool forceCall = false)
		{
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			int num = -1;
			if (Object.op_Implicit((Object)(object)hit.transform))
			{
				PhotonView component = ((Component)hit.transform.root).GetComponent<PhotonView>();
				if (Object.op_Implicit((Object)(object)component))
				{
					num = component.ViewID;
				}
			}
			int num2 = -1;
			if (num == -1)
			{
				Collider2D[] componentsInChildren = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren<Collider2D>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					if ((Object)(object)componentsInChildren[i] == (Object)(object)hit.collider)
					{
						num2 = i;
					}
				}
			}
			HealthHandler val = null;
			if (Object.op_Implicit((Object)(object)hit.transform))
			{
				val = ((Component)hit.transform).GetComponent<HealthHandler>();
			}
			bool flag = false;
			if (Object.op_Implicit((Object)(object)val))
			{
				if (base.playersHit.Contains(val))
				{
					return;
				}
				if (base.view.IsMine && ((Component)val).GetComponent<Block>().IsBlocking())
				{
					flag = true;
				}
				((ProjectileHit)this).HoldPlayer(val);
			}
			if (base.view.IsMine || forceCall)
			{
				if (base.sendCollisions)
				{
					base.view.RPC("RPCA_DoCusomeHit", (RpcTarget)0, (object[])(object)new Object[6]
					{
						(object)hit.point,
						(object)hit.normal,
						(object)Vector2.op_Implicit(base.move.velocity),
						(object)num,
						(object)num2,
						(object)flag
					});
				}
				else
				{
					RPCA_DoCusomeHit(hit.point, hit.normal, Vector2.op_Implicit(base.move.velocity), num, num2, flag);
				}
			}
		}

		public abstract void RPCA_DoCusomeHit(Vector2 hitPoint, Vector2 hitNormal, Vector2 vel, int viewID = -1, int colliderID = -1, bool wasBlocked = false);
	}
	public class EtherialCard : OnAddEffect
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass0_0 : Object
		{
			public Player player;

			public CardInfo card;

			internal void <OnAdd>b__0()
			{
				player.RemoveCardFromCardBar(card);
				player.data.currentCards.Remove(card);
				card.Show(player);
			}
		}

		public override void OnAdd(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Expected O, but got Unknown
			<>c__DisplayClass0_0 CS$<>8__locals0 = new <>c__DisplayClass0_0();
			CS$<>8__locals0.player = player;
			CS$<>8__locals0.card = ((Component)this).GetComponent<CardInfo>().sourceCard;
			ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Core.instance, 10, (Action)delegate
			{
				CS$<>8__locals0.player.RemoveCardFromCardBar(CS$<>8__locals0.card);
				CS$<>8__locals0.player.data.currentCards.Remove(CS$<>8__locals0.card);
				CS$<>8__locals0.card.Show(CS$<>8__locals0.player);
			});
		}
	}
	public class HandAjuster : MonoBehaviour
	{
		private Player player;

		private int actuallAdjustment;

		public int Adjustment;

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

		private void Start()
		{
			int pickerDraws = DrawNCards.GetPickerDraws(player.playerID);
			actuallAdjustment = Mathf.Clamp(pickerDraws + Adjustment, 1, 30) - pickerDraws;
			DrawNCards.SetPickerDraws(player.playerID, pickerDraws + actuallAdjustment);
		}

		private void OnDestroy()
		{
			int pickerDraws = DrawNCards.GetPickerDraws(player.playerID);
			DrawNCards.SetPickerDraws(player.playerID, pickerDraws - actuallAdjustment);
		}
	}
	public static class NullInterface : Object
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass3_0 : Object
		{
			public Player player;

			internal void <ApplyNullStuffsToPlayer>b__1(Rarity r)
			{
				//IL_0008: 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)
				if (r.relativeRarity <= RarityUtils.GetRarityData(RootCardInfo.GetRarity(RootCardInfo.CardRarity.Legendary)).relativeRarity)
				{
					NullManager.instance.SetRarityNullStats(player, r.value, "Root_Cards", GetLedgStatsForPlayer(player));
				}
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass3_1 : Object
		{
			public int legNullcound;

			public <>c__DisplayClass3_0 CS$<>8__locals1;

			internal void <ApplyNullStuffsToPlayer>b__0(Rarity r)
			{
				//IL_0008: 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)
				if (r.relativeRarity <= RarityUtils.GetRarityData(RootCardInfo.GetRarity(RootCardInfo.CardRarity.Legendary)).relativeRarity)
				{
					legNullcound += PlayerExtensions.GetNullCount(CS$<>8__locals1.player, r.value);
				}
			}
		}

		public static void SetAntiCard(CardInfo card)
		{
			CardInfoExtension.SetAntiCard(card);
			card.cardBase = NullManager.instance.AntiCardBase;
		}

		public static void MarkUnNullable(CardInfo card)
		{
			CardInfoExtension.MarkUnNullable(card);
		}

		public static void NeedsNull(CardInfo card)
		{
			CardInfoExtension.NeedsNull(card);
		}

		internal static void ApplyNullStuffsToPlayer(Player player, RootStatModifiers modifiers)
		{
			<>c__DisplayClass3_0 <>c__DisplayClass3_ = new <>c__DisplayClass3_0();
			<>c__DisplayClass3_.player = player;
			Gun component = ((Component)((Component)<>c__DisplayClass3_.player).GetComponent<Holding>().holdable).GetComponent<Gun>();
			GunAmmo componentInChildren = ((Component)component).GetComponentInChildren<GunAmmo>();
			CharacterData component2 = ((Component)<>c__DisplayClass3_.player).GetComponent<CharacterData>();
			HealthHandler component3 = ((Component)<>c__DisplayClass3_.player).GetComponent<HealthHandler>();
			((Component)<>c__DisplayClass3_.player).GetComponent<Movement>();
			Gravity component4 = ((Component)<>c__DisplayClass3_.player).GetComponent<Gravity>();
			Block component5 = ((Component)<>c__DisplayClass3_.player).GetComponent<Block>();
			CharacterStatModifiers component6 = ((Component)<>c__DisplayClass3_.player).GetComponent<CharacterStatModifiers>();
			CharacterStatModifiersExtension.AjustNulls(component6, modifiers.nulls);
			CharacterStatModifiersRootData.NullData nullData = component6.GetRootData().nullData;
			<>c__DisplayClass3_1 CS$<>8__locals0 = new <>c__DisplayClass3_1();
			CS$<>8__locals0.CS$<>8__locals1 = <>c__DisplayClass3_;
			int nullCount = PlayerExtensions.GetNullCount(CS$<>8__locals0.CS$<>8__locals1.player, (Rarity)(-1));
			CS$<>8__locals0.legNullcound = 0;
			Enumerable.ToList<Rarity>(RarityUtils.Rarities.Values).ForEach((Action<Rarity>)delegate(Rarity r)
			{
				//IL_0008: 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)
				if (r.relativeRarity <= RarityUtils.GetRarityData(RootCardInfo.GetRarity(RootCardInfo.CardRarity.Legendary)).relativeRarity)
				{
					CS$<>8__locals0.legNullcound += PlayerExtensions.GetNullCount(CS$<>8__locals0.CS$<>8__locals1.player, r.value);
				}
			});
			nullData.Health_multiplier *= modifiers.Null_Health_multiplier;
			component2.maxHealth *= Mathf.Pow(modifiers.Null_Health_multiplier, (float)nullCount);
			nullData.MovmentSpeed_multiplier *= modifiers.Null_MovmentSpeed_multiplier;
			component6.movementSpeed *= Mathf.Pow(modifiers.Null_MovmentSpeed_multiplier, (float)nullCount);
			nullData.Damage_multiplier *= modifiers.Null_Damage_multiplier;
			component.damage *= Mathf.Pow(modifiers.Null_Damage_multiplier, (float)nullCount);
			nullData.Lifesteal += modifiers.Null_Lifesteal;
			component6.lifeSteal += (float)nullCount * modifiers.Null_Lifesteal;
			nullData.block_cdMultiplier *= modifiers.Null_block_cdMultiplier;
			component5.cdMultiplier *= Mathf.Pow(modifiers.Null_block_cdMultiplier, (float)nullCount);
			nullData.gun_Reflects += modifiers.Null_gun_Reflects;
			component.reflects += nullCount * modifiers.Null_gun_Reflects;
			nullData.gun_Ammo += modifiers.Null_gun_Ammo;
			componentInChildren.maxAmmo += nullCount * modifiers.Null_gun_Ammo;
			nullData.Revives += modifiers.Null_Revives;
			component6.respawns += CS$<>8__locals0.legNullcound * modifiers.Null_Revives;
			NullManager.instance.SetAdditionalNullStats(CS$<>8__locals0.CS$<>8__locals1.player, "Root_Cards", GetStatsForPlayer(CS$<>8__locals0.CS$<>8__locals1.player));
			Enumerable.ToList<Rarity>(RarityUtils.Rarities.Values).ForEach((Action<Rarity>)delegate(Rarity r)
			{
				//IL_0008: 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)
				if (r.relativeRarity <= RarityUtils.GetRarityData(RootCardInfo.GetRarity(RootCardInfo.CardRarity.Legendary)).relativeRarity)
				{
					NullManager.instance.SetRarityNullStats(CS$<>8__locals0.CS$<>8__locals1.player, r.value, "Root_Cards", GetLedgStatsForPlayer(CS$<>8__locals0.CS$<>8__locals1.player));
				}
			});
		}

		public static CardInfoStat[] GetStatsForPlayer(Player player)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Expected O, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Expected O, but got Unknown
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Expected O, but got Unknown
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Expected O, but got Unknown
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: 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_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Expected O, but got Unknown
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Expected O, but got Unknown
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_0251: Expected O, but got Unknown
			CharacterStatModifiersRootData.NullData nullData = player.GetRootData().nullData;
			List<CardInfoStat> val = new List<CardInfoStat>();
			if (nullData.Health_multiplier > 1f)
			{
				val.Add(new CardInfoStat
				{
					positive = true,
					stat = "Health",
					amount = String.Format("+{0}%", (object)(int)((nullData.Health_multiplier - 1f) * 100f)),
					simepleAmount = (SimpleAmount)0
				});
			}
			if (nullData.MovmentSpeed_multiplier > 1f)
			{
				val.Add(new CardInfoStat
				{
					positive = true,
					stat = "Movemet Speed",
					amount = String.Format("+{0}%", (object)(int)((nullData.MovmentSpeed_multiplier - 1f) * 100f)),
					simepleAmount = (SimpleAmount)0
				});
			}
			if (nullData.Lifesteal > 0f)
			{
				val.Add(new CardInfoStat
				{
					positive = true,
					stat = "Lifesteal",
					amount = String.Format("+{0}%", (object)(int)(nullData.Lifesteal * 100f)),
					simepleAmount = (SimpleAmount)0
				});
			}
			if (nullData.block_cdMultiplier < 1f)
			{
				val.Add(new CardInfoStat
				{
					positive = true,
					stat = "Block Cooldown",
					amount = String.Format("-{0}%", (object)(int)((1f - nullData.block_cdMultiplier) * 100f)),
					simepleAmount = (SimpleAmount)0
				});
			}
			if (nullData.Damage_multiplier > 1f)
			{
				val.Add(new CardInfoStat
				{
					positive = true,
					stat = "Damage",
					amount = String.Format("+{0}%", (object)(int)((nullData.Damage_multiplier - 1f) * 100f)),
					simepleAmount = (SimpleAmount)0
				});
			}
			if (nullData.gun_Reflects > 0)
			{
				val.Add(new CardInfoStat
				{
					positive = true,
					stat = String.Concat("Bounce", (nullData.gun_Reflects == 1) ? "" : "s"),
					amount = String.Format("+{0}", (object)nullData.gun_Reflects),
					simepleAmount = (SimpleAmount)0
				});
			}
			if (nullData.gun_Ammo > 0)
			{
				val.Add(new CardInfoStat
				{
					positive = true,
					stat = "Ammo",
					amount = String.Format("+{0}", (object)nullData.gun_Ammo),
					simepleAmount = (SimpleAmount)0
				});
			}
			return val.ToArray();
		}

		public static CardInfoStat[] GetLedgStatsForPlayer(Player player)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Expected O, but got Unknown
			CharacterStatModifiersRootData.NullData nullData = player.GetRootData().nullData;
			List<CardInfoStat> val = new List<CardInfoStat>();
			if (nullData.Revives > 0)
			{
				val.Add(new CardInfoStat
				{
					positive = true,
					stat = (((nullData.Revives == 1) ? "Life" : "Lives") ?? ""),
					amount = String.Format("+{0}", (object)nullData.Revives),
					simepleAmount = (SimpleAmount)0
				});
			}
			return val.ToArray();
		}
	}
	public abstract class OnAddEffect : MonoBehaviour
	{
		public void Run(Player player)
		{
			Gun component = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>();
			GunAmmo componentInChildren = ((Component)component).GetComponentInChildren<GunAmmo>();
			CharacterData component2 = ((Component)player).GetComponent<CharacterData>();
			HealthHandler component3 = ((Component)player).GetComponent<HealthHandler>();
			Gravity component4 = ((Component)player).GetComponent<Gravity>();
			Block component5 = ((Component)player).GetComponent<Block>();
			CharacterStatModifiers component6 = ((Component)player).GetComponent<CharacterStatModifiers>();
			OnAdd(player, component, componentInChildren, component2, component3, component4, component5, component6);
		}

		public abstract void OnAdd(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats);
	}
	public class PhotonPool : MonoBehaviour
	{
		public List<GameObject> Prefabs;

		public void Regester()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			Enumerator<GameObject> enumerator = Prefabs.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					GameObject current = enumerator.Current;
					PhotonNetwork.PrefabPool.RegisterPrefab(((Object)current).name, current);
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
		}
	}
	public class ProjectileAdder : MonoBehaviour
	{
		public ProjectilesToSpawn[] projectiles;

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

		public void OnDestroy()
		{
			Gun gun = ((Component)this).GetComponentInParent<WeaponHandler>().gun;
			List<ProjectilesToSpawn> val = Enumerable.ToList<ProjectilesToSpawn>((IEnumerable<ProjectilesToSpawn>)(object)gun.projectiles);
			ProjectilesToSpawn[] array = projectiles;
			foreach (ProjectilesToSpawn val2 in array)
			{
				val.Remove(val2);
			}
			gun.projectiles = val.ToArray();
		}
	}
	public class RootBlockTrigger : MonoBehaviour
	{
		public UnityEvent triggerEvent;

		public UnityEvent triggerEventEarly;

		public bool delayOtherActions;

		public UnityEvent triggerFirstBlockThatDelaysOthers;

		public UnityEvent triggerSuperFirstBlock;

		public UnityEvent successfulBlockEvent;

		public UnityEvent blockRechargeEvent;

		private BlockEffect[] effects;

		public float cooldown;

		private float lastTriggerTime = -5f;

		public BlockTriggerType blackListedType = (BlockTriggerType)1;

		public float cooldownSuccess;

		private float lastTriggerTimeSuccessful = -5f;

		private void Start()
		{
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Expected O, but got Unknown
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Expected O, but got Unknown
			effects = ((Component)this).GetComponents<BlockEffect>();
			Block componentInParent = ((Component)this).GetComponentInParent<Block>();
			componentInParent.SuperFirstBlockAction = (Action<BlockTriggerType>)(object)Delegate.Combine((Delegate)(object)componentInParent.SuperFirstBlockAction, (Delegate)(object)new Action<BlockTriggerType>(DoSuperFirstBlock));
			componentInParent.FirstBlockActionThatDelaysOthers = (Action<BlockTriggerType>)(object)Delegate.Combine((Delegate)(object)componentInParent.FirstBlockActionThatDelaysOthers, (Delegate)(object)new Action<BlockTriggerType>(DoFirstBlockThatDelaysOthers));
			componentInParent.BlockAction = (Action<BlockTriggerType>)(object)Delegate.Combine((Delegate)(object)componentInParent.BlockAction, (Delegate)(object)new Action<BlockTriggerType>(DoBlock));
			componentInParent.BlockActionEarly = (Action<BlockTriggerType>)(object)Delegate.Combine((Delegate)(object)componentInParent.BlockActionEarly, (Delegate)(object)new Action<BlockTriggerType>(DoBlockEarly));
			componentInParent.BlockProjectileAction = (Action<GameObject, Vector3, Vector3>)(object)Delegate.Combine((Delegate)(object)componentInParent.BlockProjectileAction, (Delegate)(object)new Action<GameObject, Vector3, Vector3>(DoBlockedProjectile));
			componentInParent.BlockRechargeAction = (Action)Delegate.Combine((Delegate)(object)componentInParent.BlockRechargeAction, (Delegate)new Action(DoBlockRecharge));
			if (delayOtherActions)
			{
				((Component)this).GetComponentInParent<Block>().delayOtherActions = true;
			}
		}

		private void OnDestroy()
		{
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Expected O, but got Unknown
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Expected O, but got Unknown
			Block componentInParent = ((Component)this).GetComponentInParent<Block>();
			if (Object.op_Implicit((Object)(object)componentInParent) && componentInParent.SuperFirstBlockAction != null)
			{
				componentInParent.SuperFirstBlockAction = (Action<BlockTriggerType>)(object)Delegate.Remove((Delegate)(object)componentInParent.SuperFirstBlockAction, (Delegate)(object)new Action<BlockTriggerType>(DoSuperFirstBlock));
			}
			if (Object.op_Implicit((Object)(object)componentInParent) && componentInParent.FirstBlockActionThatDelaysOthers != null)
			{
				componentInParent.FirstBlockActionThatDelaysOthers = (Action<BlockTriggerType>)(object)Delegate.Remove((Delegate)(object)componentInParent.FirstBlockActionThatDelaysOthers, (Delegate)(object)new Action<BlockTriggerType>(DoFirstBlockThatDelaysOthers));
			}
			if (Object.op_Implicit((Object)(object)componentInParent) && componentInParent.BlockAction != null)
			{
				componentInParent.BlockAction = (Action<BlockTriggerType>)(object)Delegate.Remove((Delegate)(object)componentInParent.BlockAction, (Delegate)(object)new Action<BlockTriggerType>(DoBlock));
			}
			if (Object.op_Implicit((Object)(object)componentInParent) && componentInParent.BlockActionEarly != null)
			{
				componentInParent.BlockActionEarly = (Action<BlockTriggerType>)(object)Delegate.Remove((Delegate)(object)componentInParent.BlockActionEarly, (Delegate)(object)new Action<BlockTriggerType>(DoBlockEarly));
			}
			if (Object.op_Implicit((Object)(object)componentInParent) && componentInParent.BlockProjectileAction != null)
			{
				componentInParent.BlockProjectileAction = (Action<GameObject, Vector3, Vector3>)(object)Delegate.Remove((Delegate)(object)componentInParent.BlockProjectileAction, (Delegate)(object)new Action<GameObject, Vector3, Vector3>(DoBlockedProjectile));
			}
			if (Object.op_Implicit((Object)(object)componentInParent) && componentInParent.BlockRechargeAction != null)
			{
				componentInParent.BlockRechargeAction = (Action)Delegate.Remove((Delegate)(object)componentInParent.BlockRechargeAction, (Delegate)new Action(DoBlockRecharge));
			}
		}

		public void DoSuperFirstBlock(BlockTriggerType triggerType)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			if (triggerType != blackListedType && !(lastTriggerTime + cooldown > Time.time))
			{
				triggerSuperFirstBlock.Invoke();
			}
		}

		public void DoFirstBlockThatDelaysOthers(BlockTriggerType triggerType)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			if (triggerType != blackListedType && !(lastTriggerTime + cooldown > Time.time))
			{
				triggerFirstBlockThatDelaysOthers.Invoke();
			}
		}

		public void DoBlockEarly(BlockTriggerType triggerType)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			if (triggerType != blackListedType && !(lastTriggerTime + cooldown > Time.time))
			{
				triggerEventEarly.Invoke();
			}
		}

		public void DoBlock(BlockTriggerType triggerType)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			if (triggerType != blackListedType && !(lastTriggerTime + cooldown > Time.time))
			{
				lastTriggerTime = Time.time;
				triggerEvent.Invoke();
			}
		}

		public void DoBlockedProjectile(GameObject projectile, Vector3 forward, Vector3 hitPos)
		{
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			if (!(lastTriggerTimeSuccessful + cooldownSuccess > Time.time))
			{
				lastTriggerTimeSuccessful = Time.time;
				successfulBlockEvent.Invoke();
				for (int i = 0; i < effects.Length; i++)
				{
					effects[i].DoBlockedProjectile(projectile, forward, hitPos);
				}
			}
		}

		public void DoBlockRecharge()
		{
			blockRechargeEvent.Invoke();
		}
	}
	public class RootCardInfo : CardInfo
	{
		public enum CardRarity : Enum
		{
			Trinket,
			Common,
			Scarce,
			Uncommon,
			Exotic,
			Rare,
			Epic,
			Legendary,
			Mythical,
			Divine,
			Unique
		}

		[HideInInspector]
		public string modVertion;

		[Header("Root Settings")]
		public CardRarity cardRarity;

		public string Key;

		public bool Hidden = false;

		public bool Restricted = false;

		public bool Reassign = true;

		public bool AntiCard = false;

		public bool IsCurse = false;

		public bool Nullable = true;

		public bool NeedsNull = false;

		public bool PickPhaseOnly = false;

		public string Tag = "root";

		public string Author;

		public bool Build = true;

		public bool StartDisabled = false;

		public bool Perminent = false;

		public CardInfo AlternetSource;

		public static Rarity GetRarity(CardRarity rarity)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			return RarityUtils.GetRarity(((Object)rarity).ToString());
		}

		public void Setup()
		{
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Expected O, but got Unknown
			CardInfoExtension.GetAdditionalData(((Component)this).GetComponent<CardInfo>()).canBeReassigned = Reassign;
			if (Chainloader.Plugins.Exists((Predicate<BaseUnityPlugin>)((BaseUnityPlugin plugin) => plugin.Info.Metadata.GUID == "com.Root.Null")))
			{
				if (AntiCard)
				{
					NullInterface.SetAntiCard(((Component)this).GetComponent<CardInfo>());
				}
				if (!Nullable)
				{
					NullInterface.MarkUnNullable(((Component)this).GetComponent<CardInfo>());
				}
				if (NeedsNull)
				{
					NullInterface.NeedsNull(((Component)this).GetComponent<CardInfo>());
				}
			}
			if (IsCurse)
			{
				WillInterface.FlagCurse(((Component)this).GetComponent<CardInfo>());
			}
			ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Core.instance, 5, (Action)([CompilerGenerated] () =>
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				base.rarity = GetRarity(cardRarity);
			}));
			if (cardRarity == CardRarity.Unique || Perminent)
			{
				base.allowMultiple = false;
			}
			base.sourceCard = (CardInfo)(((object)AlternetSource) ?? ((object)this));
		}

		public void Start()
		{
			if ((Object)(object)AlternetSource != (Object)null)
			{
				base.sourceCard = AlternetSource;
			}
			((TMP_Text)((Component)((Component)((Component)this).gameObject.GetComponentInChildren<CardVisuals>()).transform.Find("Canvas/Front/ModVertionNumber")).GetComponent<TextMeshProUGUI>()).text = modVertion;
			if (Core.Credits)
			{
				Transform val = ((Component)((Component)this).gameObject.GetComponentInChildren<CardVisuals>()).transform.Find("Canvas/Front/ModNameText");
				((Component)val).gameObject.SetActive(true);
				((TMP_Text)((Component)val).GetComponent<TextMeshProUGUI>()).text = Tag;
				Transform val2 = ((Component)((Component)this).gameObject.GetComponentInChildren<CardVisuals>()).transform.Find("Canvas/Front/AuthorNameText");
				((Component)val2).gameObject.SetActive(true);
				((TMP_Text)((Component)val2).GetComponent<TextMeshProUGUI>()).text = String.Concat("Card Idea By:\n", Author);
			}
		}
	}
	public class RootStatModifiers : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass28_0 : Object
		{
			public int playerID;

			internal bool <RPC_UsedAmmo>b__0(Player p)
			{
				return p.playerID == playerID;
			}
		}

		public int nulls = 0;

		public int WhichTime = 0;

		public bool knowledge = false;

		public float ShieldStoneSize = 1f;

		public float shieldEfectiveness = 1f;

		public float projectileSizeMult = 1f;

		public int ammoCap = -1;

		public int bulletCap = -1;

		public int wishes = 0;

		public float hpCulling;

		public int nullsPerPoint;

		public bool usedAmmo = false;

		public bool invertion = false;

		public bool simple = false;

		public float damageCap = 0f;

		public float damageCapWindow = 0f;

		public GameObject AddObjectToOpponents = null;

		public GameObject AddObjectToTeam = null;

		public GameObject AddObjectToFreinds = null;

		public float Null_Health_multiplier = 1f;

		public float Null_MovmentSpeed_multiplier = 1f;

		public float Null_Damage_multiplier = 1f;

		public float Null_block_cdMultiplier = 1f;

		public int Null_gun_Reflects = 0;

		public int Null_gun_Ammo = 0;

		public float Null_Lifesteal = 0f;

		public int Null_Revives = 0;

		public void Apply(Player player)
		{
			//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_044c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0451: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0589: Unknown result type (might be due to invalid IL or missing references)
			//IL_058e: Unknown result type (might be due to invalid IL or missing references)
			//IL_048c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0498: Unknown result type (might be due to invalid IL or missing references)
			//IL_0529: Unknown result type (might be due to invalid IL or missing references)
			//IL_0535: Unknown result type (might be due to invalid IL or missing references)
			//IL_05db: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e7: Unknown result type (might be due to invalid IL or missing references)
			Gun component = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>();
			GunAmmo componentInChildren = ((Component)component).GetComponentInChildren<GunAmmo>();
			CharacterData component2 = ((Component)player).GetComponent<CharacterData>();
			HealthHandler component3 = ((Component)player).GetComponent<HealthHandler>();
			((Component)player).GetComponent<Movement>();
			Gravity component4 = ((Component)player).GetComponent<Gravity>();
			Block component5 = ((Component)player).GetComponent<Block>();
			CharacterStatModifiers component6 = ((Component)player).GetComponent<CharacterStatModifiers>();
			component.projectileSize += 1f;
			component.projectileSize *= projectileSizeMult;
			component.projectileSize -= 1f;
			component6.GetRootData().witchTimeDuration += WhichTime;
			component6.GetRootData().shieldEfectiveness *= shieldEfectiveness;
			if (damageCap != 0f)
			{
				if (component6.GetRootData().damageCap != 0f)
				{
					component6.GetRootData().damageCap = Mathf.Min(component6.GetRootData().damageCap, damageCap);
				}
				else
				{
					component6.GetRootData().damageCap = damageCap;
				}
			}
			if (component6.GetRootData().damageCapWindow != 0f && damageCapWindow != 0f)
			{
				component6.GetRootData().damageCapWindow = Mathf.Min(component6.GetRootData().damageCapWindow, damageCapWindow);
			}
			else
			{
				component6.GetRootData().damageCapWindow = damageCapWindow;
			}
			if (ammoCap > 0)
			{
				component6.GetRootData().ammoCap = ammoCap;
			}
			if (bulletCap > 0)
			{
				component6.GetRootData().bulletCap = bulletCap;
			}
			if (knowledge)
			{
				component6.GetRootData().knowledge++;
			}
			if (simple)
			{
				player.GetRootData().simple = true;
			}
			component6.GetRootData().hpCulling = 1f - (1f - component6.GetRootData().hpCulling) * (1f - hpCulling);
			if (((Component)this).GetComponent<RootCardInfo>().Key.ContainsOR("Genie", "Efreet"))
			{
				PlayerExtension.GetAdditionalData(player).bankAccount.Deposit("Wish", wishes);
			}
			else
			{
				component6.GetRootData().freeCards += wishes;
			}
			component6.GetRootData().nullsPerPoint += nullsPerPoint;
			NullInterface.ApplyNullStuffsToPlayer(player, this);
			Transform[] componentsInChildren = ((Component)player).gameObject.GetComponentsInChildren<Transform>();
			Transform[] array = componentsInChildren;
			foreach (Transform val in array)
			{
				if (((Object)((Component)val).gameObject).name == "ShieldStone")
				{
					val.localScale *= ShieldStoneSize;
				}
			}
			if (invertion)
			{
				float maxHealth = component.damage * 55f * component.bulletDamageMultiplier;
				component.damage = component2.maxHealth / 55f;
				player.data.maxHealth = maxHealth;
			}
			if (player.GetRootData().ammoCap != -1)
			{
				GunAmmo componentInChildren2 = ((Component)component).GetComponentInChildren<GunAmmo>();
				componentInChildren2.maxAmmo = Mathf.Clamp(componentInChildren2.maxAmmo, 1, player.GetRootData().ammoCap);
				usedAmmo = false;
			}
			if (player.GetRootData().bulletCap != -1)
			{
				component.numberOfProjectiles = Mathf.Clamp(component.numberOfProjectiles, 1, player.GetRootData().bulletCap);
			}
			if (PhotonNetwork.IsMasterClient && usedAmmo)
			{
				int num = new Random().Next(18) + 7;
				NetworkingManager.RPC(typeof(RootStatModifiers), "RPC_UsedAmmo", (object[])(object)new Object[2]
				{
					(object)num,
					(object)player.playerID
				});
			}
			if (Object.op_Implicit((Object)(object)AddObjectToOpponents))
			{
				Enumerator<Player> enumerator = PlayerManager.instance.players.GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						Player current = enumerator.Current;
						if (current.teamID != player.teamID)
						{
							component6.objectsAddedToPlayer.Add(Object.Instantiate<GameObject>(AddObjectToOpponents, ((Component)current).transform.position, ((Component)current).transform.rotation, ((Component)current).transform));
						}
					}
				}
				finally
				{
					((IDisposable)enumerator).Dispose();
				}
			}
			if (Object.op_Implicit((Object)(object)AddObjectToTeam))
			{
				Enumerator<Player> enumerator2 = PlayerManager.instance.players.GetEnumerator();
				try
				{
					while (enumerator2.MoveNext())
					{
						Player current2 = enumerator2.Current;
						if (current2.teamID == player.teamID)
						{
							component6.objectsAddedToPlayer.Add(Object.Instantiate<GameObject>(AddObjectToTeam, ((Component)current2).transform.position, ((Component)current2).transform.rotation, ((Component)current2).transform));
						}
					}
				}
				finally
				{
					((IDisposable)enumerator2).Dispose();
				}
			}
			if (!Object.op_Implicit((Object)(object)AddObjectToFreinds))
			{
				return;
			}
			Enumerator<Player> enumerator3 = PlayerManager.instance.players.GetEnumerator();
			try
			{
				while (enumerator3.MoveNext())
				{
					Player current3 = enumerator3.Current;
					if (current3.teamID == player.teamID && current3.playerID != player.playerID)
					{
						component6.objectsAddedToPlayer.Add(Object.Instantiate<GameObject>(AddObjectToFreinds, ((Component)current3).transform.position, ((Component)current3).transform.rotation, ((Component)current3).transform));
					}
				}
			}
			finally
			{
				((IDisposable)enumerator3).Dispose();
			}
		}

		[UnboundRPC]
		public static void RPC_UsedAmmo(int ammo, int playerID)
		{
			<>c__DisplayClass28_0 CS$<>8__locals0 = new <>c__DisplayClass28_0();
			CS$<>8__locals0.playerID = playerID;
			Player val = PlayerManager.instance.players.Find((Predicate<Player>)((Player p) => p.playerID == CS$<>8__locals0.playerID));
			GunAmmo componentInChildren = ((Component)((Component)val).GetComponent<Holding>().holdable).GetComponentInChildren<GunAmmo>();
			componentInChildren.maxAmmo += ammo;
		}
	}
	internal class TabinfoInterface : Object
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass2_0 : Object
		{
			public Func<Player, string> calculation;

			internal string <SetUp>b__0(Player player)
			{
				return String.Format("{0:F0}", (object)(Single.Parse(calculation.Invoke(player)) + player.GetRootData().flatProjectileDamage));
			}
		}

		private static Dictionary<string, StatCategory> Categories = new Dictionary<string, StatCategory>();

		internal static void RegesterInfo(string category, string name, Func<Player, bool> displayCondition, Func<Player, string> displayValue, int priority)
		{
			if (!Categories.ContainsKey(category))
			{
				Categories.Add(category, TabInfoManager.RegisterCategory(category, priority));
			}
			StatCategory val = Categories[category];
			TabInfoManager.RegisterStat(val, name, displayCondition, displayValue);
		}

		internal static void SetUp()
		{
			<>c__DisplayClass2_0 CS$<>8__locals0 = new <>c__DisplayClass2_0();
			CS$<>8__locals0.calculation = TabInfoManager.basicStats._stats["damage"].displayValue;
			TabInfoManager.basicStats._stats["damage"].displayValue = (Player player) => String.Format("{0:F0}", (object)(Single.Parse(CS$<>8__locals0.calculation.Invoke(player)) + player.GetRootData().flatProjectileDamage));
		}
	}
	public class TabInfoRegesterer : Object
	{
		private static bool canRegester = false;

		public static string cat = "Root Stats";

		public static void RegesterInfo(string category, string name, Func<Player, bool> displayCondition, Func<Player, string> displayValue, int priority = 6)
		{
			if (canRegester)
			{
				InternalRegester(category, name, displayCondition, displayValue, priority);
			}
		}

		internal static void InternalRegester(string category, string name, Func<Player, bool> displayCondition, Func<Player, string> displayValue, int priority)
		{
			TabinfoInterface.RegesterInfo(category, name, displayCondition, displayValue, priority);
		}

		public static void Setup()
		{
			canRegester = true;
			TabinfoInterface.SetUp();
			RegesterInfo(cat, "ROOT:", (Player p) => p.GetRootData().SteamID == "76561198060618523", (Player p) => "Player Is Root");
			RegesterInfo(cat, "Eternal Card", (Player p) => (Object)(object)p.GetRootData().lockedCard != (Object)null, (Player p) => p.GetRootData().lockedCard.cardName ?? "");
			RegesterInfo(cat, "Wishes", delegate(Player p)
			{
				BankAccount bankAccount = PlayerExtension.GetAdditionalData(p).bankAccount;
				Dictionary<string, int> obj = new Dictionary<string, int>();
				obj.Add("Wish", 1);
				return bankAccount.HasFunds(obj);
			}, (Player p) => String.Format("{0}", (object)PlayerExtension.GetAdditionalData(p).bankAccount.Money["Wish"]));
			RegesterInfo(cat, "Block Efectiveness", (Player p) => p.GetRootData().shieldEfectiveness != 1f, (Player p) => String.Format("{0}", (object)Math.Round((double)(p.GetRootData().shieldEfectiveness * 100f), 1)));
			RegesterInfo(cat, "HP Culling", (Player p) => p.GetRootData().hpCulling != 0f, (Player p) => String.Format("{0}%", (object)Math.Round((double)(p.GetRootData().hpCulling * 100f), 1)));
		}
	}
	public class UpsidedownHandler : MonoBehaviour
	{
		public Gravity Gravity;

		public LayerMask mask;

		public CircleCollider2D circleCollider;

		public CharacterData data;

		public PlayerVelocity velocity;

		public void Awake()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			Gravity = ((Component)this).GetComponent<Gravity>();
			mask = ((Component)this).GetComponentInChildren<LegRaycasters>().mask;
			circleCollider = ((Component)this).GetComponent<CircleCollider2D>();
			data = ((Component)this).GetComponentInParent<CharacterData>();
			velocity = ((Component)this).GetComponentInParent<PlayerVelocity>();
		}

		public void Start()
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			Gravity gravity = Gravity;
			gravity.gravityForce *= -1f;
			PlayerJump component = ((Component)this).GetComponent<PlayerJump>();
			component.upForce *= -1f;
			((Component)this).transform.localScale = new Vector3(((Component)this).transform.localScale.x * -1f, ((Component)this).transform.localScale.y, ((Component)this).transform.localScale.z);
			((Component)this).transform.rotation = Quaternion.Euler(0f, 0f, 180f);
			((Behaviour)((Component)this).GetComponentInChildren<LegRaycasters>()).enabled = false;
		}

		public void FixedUpdate()
		{
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			if (!data.isPlaying || Gravity.gravityForce >= 0f)
			{
				return;
			}
			if (velocity.simulated && !velocity.isKinematic)
			{
				PlayerVelocity obj = velocity;
				obj.velocity += Vector2.up * Time.fixedDeltaTime * TimeHandler.timeScale * 20f;
			}
			float num = (circleCollider.radius + 0.2f) * Mathf.Abs(((Component)this).transform.localScale.x);
			RaycastHit2D[] array = Physics2D.RaycastAll(Vector2.op_Implicit(((Component)this).transform.position), Vector2.up, num, LayerMask.op_Implicit(mask));
			RaycastHit2D[] array2 = array;
			for (int i = 0; i < array2.Length; i++)
			{
				RaycastHit2D val = array2[i];
				if (Object.op_Implicit((Object)(object)((RaycastHit2D)(ref val)).transform) && (Object)(object)((RaycastHit2D)(ref val)).transform.root != (Object)(object)((Component)this).transform.root)
				{
					data.TouchGround(Vector2.op_Implicit(((RaycastHit2D)(ref val)).point), Vector2.op_Implicit(((RaycastHit2D)(ref val)).normal), ((RaycastHit2D)(ref val)).rigidbody, ((RaycastHit2D)(ref val)).transform);
					break;
				}
			}
		}
	}
	public static class UtilityExtenions : Object
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass11_0 : Object
		{
			public CardInfo card;

			internal bool <IsHiddenCard>b__0(Card c)
			{
				return (Object)(object)c.cardInfo == (Object)(object)card;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass14_0 : Object
		{
			public CardInfo card;

			internal bool <RemoveCardFromCardBar>b__0(CardBarButton b)
			{
				return (Object)(object)b.card == (Object)(object)card;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass3_0 : Object
		{
			public CardInfo card;

			internal bool <CardCount>b__0(CardInfo c)
			{
				return (Object)(object)c == (Object)(object)card;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_0 : Object
		{
			public Player player;

			public CardInfo card;

			internal bool <OpponentHasCard>b__0(Player p)
			{
				return p.teamID != player.teamID && p.HasCard(card);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass7_0 : Object
		{
			public Player player;

			public CardInfo card;

			internal bool <TeammateHasCard>b__0(Player p)
			{
				return p.teamID == player.teamID && p.playerID != player.playerID && p.HasCard(card);
			}
		}

		public static bool HasCard(this Player player, string cardKey)
		{
			return CardList.ModCards.ContainsKey(cardKey) && player.HasCard((CardInfo)(object)CardList.GetCardInfo(cardKey));
		}

		public static bool HasCard(this Player player, CardInfo card)
		{
			return player.data.currentCards.Contains(card);
		}

		public static int CardCount(this Player player, string cardKey)
		{
			return CardList.ModCards.ContainsKey(cardKey) ? player.CardCount((CardInfo)(object)CardList.GetCardInfo(cardKey)) : 0;
		}

		public static int CardCount(this Player player, CardInfo card)
		{
			<>c__DisplayClass3_0 CS$<>8__locals0 = new <>c__DisplayClass3_0();
			CS$<>8__locals0.card = card;
			return Enumerable.Count<CardInfo>((IEnumerable<CardInfo>)(object)player.data.currentCards, (Func<CardInfo, bool>)((CardInfo c) => (Object)(object)c == (Object)(object)CS$<>8__locals0.card));
		}

		public static bool OpponentHasCard(this Player player, string cardKey)
		{
			return CardList.ModCards.ContainsKey(cardKey) && player.OpponentHasCard((CardInfo)(object)CardList.GetCardInfo(cardKey));
		}

		public static bool OpponentHasCard(this Player player, CardInfo card)
		{
			<>c__DisplayClass5_0 CS$<>8__locals0 = new <>c__DisplayClass5_0();
			CS$<>8__locals0.player = player;
			CS$<>8__locals0.card = card;
			return Enumerable.Any<Player>((IEnumerable<Player>)(object)PlayerManager.instance.players, (Func<Player, bool>)((Player p) => p.teamID != CS$<>8__locals0.player.teamID && p.HasCard(CS$<>8__locals0.card)));
		}

		public static bool TeammateHasCard(this Player player, string cardKey)
		{
			return CardList.ModCards.ContainsKey(cardKey) && player.TeammateHasCard((CardInfo)(object)CardList.GetCardInfo(cardKey));
		}

		public static bool TeammateHasCard(this Player player, CardInfo card)
		{
			<>c__DisplayClass7_0 CS$<>8__locals0 = new <>c__DisplayClass7_0();
			CS$<>8__locals0.player = player;
			CS$<>8__locals0.card = card;
			return Enumerable.Any<Player>((IEnumerable<Player>)(object)PlayerManager.instance.players, (Func<Player, bool>)((Player p) => p.teamID == CS$<>8__locals0.player.teamID && p.playerID != CS$<>8__locals0.player.playerID && p.HasCard(CS$<>8__locals0.card)));
		}

		public static void GiveCard(this Player player, string cardKey)
		{
			player.GiveCard((CardInfo)(object)CardList.GetCardInfo(cardKey));
		}

		public static void GiveCard(this Player player, CardInfo card)
		{
			Cards.instance.AddCardToPlayer(player, card, false, "", 0f, 0f, true);
			CardBarUtils.instance.ShowAtEndOfPhase(player, card);
		}

		public static bool IsAllowedCard(this Player player, CardInfo card)
		{
			return Cards.instance.PlayerIsAllowedCard(player, card);
		}

		public static bool IsHiddenCard(this CardInfo card)
		{
			<>c__DisplayClass11_0 CS$<>8__locals0 = new <>c__DisplayClass11_0();
			CS$<>8__locals0.card = card;
			return !Enumerable.Any<Card>((IEnumerable<Card>)(object)CardManager.cards.Values, (Func<Card, bool>)((Card c) => (Object)(object)c.cardInfo == (Object)(object)CS$<>8__locals0.card));
		}

		public static void RPC_Others(this MonoBehaviour behaviour, string method, params object[] data)
		{
			NetworkingManager.RPC_Others(((Object)behaviour).GetType(), method, data);
		}

		public static void RPC(this MonoBehaviour behaviour, string method, params object[] data)
		{
			NetworkingManager.RPC(((Object)behaviour).GetType(), method, data);
		}

		public static void RemoveCardFromCardBar(this Player player, CardInfo card)
		{
			<>c__DisplayClass14_0 CS$<>8__locals0 = new <>c__DisplayClass14_0();
			CS$<>8__locals0.card = card;
			CardBar val = CardBarUtils.instance.PlayersCardBar(player);
			IEnumerable<CardBarButton> val2 = Enumerable.Where<CardBarButton>((IEnumerable<CardBarButton>)(object)((Component)val).GetComponentsInChildren<CardBarButton>(), (Func<CardBarButton, bool>)((CardBarButton b) => (Object)(object)b.card == (Object)(object)CS$<>8__locals0.card));
			IEnumerator<CardBarButton> enumerator = val2.GetEnumerator();
			try
			{
				while (((IEnumerator)enumerator).MoveNext())
				{
					CardBarButton current = enumerator.Current;
					Object.Destroy((Object)(object)((Component)current).gameObject);
				}
			}
			finally
			{
				if (enumerator != null)
				{
					((IDisposable)enumerator).Dispose();
				}
			}
		}

		public static void Show(this CardInfo card, Player player = null)
		{
			if ((Object)(object)player == (Object)null)
			{
				player = PlayerManager.instance.players[0];
			}
			((MonoBehaviour)Core.instance).StartCoroutine(CardBarUtils.instance.ShowImmediate(player, card));
		}

		public static bool ContainsOR(this string str, params string[] checks)
		{
			if (checks.Length == 0)
			{
				return true;
			}
			foreach (string text in checks)
			{
				if (str.Contains(text))
				{
					return true;
				}
			}
			return false;
		}

		public static bool ContainsAND(this string str, params string[] checks)
		{
			if (checks.Length == 0)
			{
				return true;
			}
			foreach (string text in checks)
			{
				if (!str.Contains(text))
				{
					return false;
				}
			}
			return true;
		}

		public static bool ContainsXOR(this string str, params string[] checks)
		{
			if (checks.Length < 2)
			{
				return false;
			}
			bool flag = false;
			foreach (string text in checks)
			{
				if (str.Contains(text))
				{
					if (flag)
					{
						return false;
					}
					flag = true;
				}
			}
			return flag;
		}

		public static int IndexOf(this Array array, object value)
		{
			return Array.IndexOf(array, value);
		}
	}
	public class WillInterface : Object
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass0_0 : Object
		{
			public CardInfo card;

			internal void <FlagCurse>b__0()
			{
				CurseManager.instance.RegisterCurse(card);
				List<CardCategory> val = Enumerable.ToList<CardCategory>((IEnumerable<CardCategory>)(object)card.categories);
				val.Add(CurseManager.instance.curseCategory);
				card.categories = val.ToArray();
			}
		}

		public static void FlagCurse(CardInfo card)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			<>c__DisplayClass0_0 CS$<>8__locals0 = new <>c__DisplayClass0_0();
			CS$<>8__locals0.card = card;
			ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Core.instance, 3, (Action)delegate
			{
				CurseManager.instance.RegisterCurse(CS$<>8__locals0.card);
				List<CardCategory> val = Enumerable.ToList<CardCategory>((IEnumerable<CardCategory>)(object)CS$<>8__locals0.card.categories);
				val.Add(CurseManager.instance.curseCategory);
				CS$<>8__locals0.card.categories = val.ToArray();
			});
		}

		internal static void cardsSkippedForRerolls(RootCardInfo card)
		{
			RerollManager.instance.cardsSkippedForRerolls.Add((CardInfo)(object)card);
		}
	}
}
namespace RootCore.Patches
{
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	internal class ApplyCardStatsPatch : Object
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass0_0 : Object
		{
			public Player ___playerToUpgrade;

			internal void <Postfix>b__0(OnAddEffect effect)
			{
				effect.Run(___playerToUpgrade);
			}
		}

		private static void Postfix(ApplyCardStats __instance, Player ___playerToUpgrade)
		{
			<>c__DisplayClass0_0 CS$<>8__locals0 = new <>c__DisplayClass0_0();
			CS$<>8__locals0.___playerToUpgrade = ___playerToUpgrade;
			RootStatModifiers component = ((Component)__instance).GetComponent<RootStatModifiers>();
			if ((Object)(object)component != (Object)null)
			{
				component.Apply(CS$<>8__locals0.___playerToUpgrade);
			}
			Enumerable.ToList<OnAddEffect>((IEnumerable<OnAddEffect>)(object)((Component)__instance).GetComponents<OnAddEffect>()).ForEach((Action<OnAddEffect>)delegate(OnAddEffect effect)
			{
				effect.Run(CS$<>8__locals0.___playerToUpgrade);
			});
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	internal class DevConsolePatchSend : Object
	{
		private static void Prefix(string message)
		{
			Core.Debug(message);
			Player playerWithActorID = PlayerManager.instance.GetPlayerWithActorID(PhotonNetwork.LocalPlayer.ActorNumber);
			Core.Debug(playerWithActorID);
			if ((Object)(object)playerWithActorID != (Object)null && playerWithActorID.GetRootData().freeCards > 0 && !GameManager.instance.battleOngoing)
			{
				NetworkingManager.RPC(typeof(DevConsolePatchSend), "AddCardToPlayer", (object[])(object)new Object[2]
				{
					(Object)message,
					(object)PhotonNetwork.LocalPlayer.ActorNumber
				});
			}
		}

		[UnboundRPC]
		public static void AddCardToPlayer(string message, int playerActorNumber)
		{
			Core.Debug(String.Concat(message, " ", ((Int32)(ref playerActorNumber)).ToString()));
			Player playerWithActorID = PlayerManager.instance.GetPlayerWithActorID(playerActorNumber);
			Core.Debug(playerWithActorID);
			if (!((Object)(object)playerWithActorID != (Object)null) || playerWithActorID.GetRootData().freeCards <= 0 || GameManager.instance.battleOngoing)
			{
				return;
			}
			CardInfo[] array = Enumerable.ToArray<CardInfo>((IEnumerable<CardInfo>)(object)CardChoice.instance.cards);
			int num = -1;
			float num2 = 0f;
			for (int i = 0; i < array.Length; i++)
			{
				string text = ((Component)array[i]).GetComponent<CardInfo>().cardName.ToUpper();
				text = text.Replace(" ", "");
				string text2 = message.ToUpper();
				text2 = text2.Replace(" ", "");
				float num3 = 0f;
				for (int j = 0; j < text2.Length; j++)
				{
					if (text.Length > j && text2[j] == text[j])
					{
						num3 += 1f / (float)text2.Length;
					}
				}
				num3 -= (float)Mathf.Abs(text2.Length - text.Length) * 0.001f;
				if (num3 > 0.1f && num3 > num2)
				{
					num2 = num3;
					num = i;
				}
			}
			if (num != -1)
			{
				playerWithActorID.GiveCard(array[num]);
				playerWithActorID.GetRootData().freeCards--;
			}
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	public class GunPatchApplyProjectileStats : Object
	{
		public static void Postfix(Gun __instance, GameObject obj)
		{
			ProjectileHit component = obj.GetComponent<ProjectileHit>();
			component.damage += __instance.player.GetRootData().flatProjectileDamage;
		}
	}
	[Serializable]
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	internal class HealthHandlerPatchDoDamage : Object
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass1_0 : Object
		{
			public HealthHandler __instance;

			public Vector2 damage;

			internal void <Postfix>b__0()
			{
				__instance.stats.GetRootData().damageCapFilled -= ((Vector2)(ref damage)).magnitude;
			}
		}

		[HarmonyPriority(0)]
		private static void Prefix(HealthHandler __instance, ref Vector2 damage)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			if (__instance.stats.GetRootData().damageCap > 0f)
			{
				damage = clampMagnatued(damage, __instance.data.maxHealth * __instance.stats.GetRootData().damageCap - __instance.stats.GetRootData().damageCapFilled);
			}
		}

		private static void Postfix(HealthHandler __instance, Vector2 damage)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Expected O, but got Unknown
			<>c__DisplayClass1_0 CS$<>8__locals0 = new <>c__DisplayClass1_0();
			CS$<>8__locals0.__instance = __instance;
			CS$<>8__locals0.damage = damage;
			if (CS$<>8__locals0.__instance.stats.GetRootData().damageCapWindow > 0f)
			{
				CS$<>8__locals0.__instance.stats.GetRootData().damageCapFilled += ((Vector2)(ref CS$<>8__locals0.damage)).magnitude;
				ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)Core.instance, CS$<>8__locals0.__instance.stats.GetRootData().damageCapWindow, (Action)delegate
				{
					CS$<>8__locals0.__instance.stats.GetRootData().damageCapFilled -= ((Vector2)(ref CS$<>8__locals0.damage)).magnitude;
				});
			}
		}

		private static Vector2 clampMagnatued(Vector2 vector, float max)
		{
			//IL_001a: 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_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: 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_0028: Unknown result type (might be due to invalid IL or missing references)
			float magnitude = ((Vector2)(ref vector)).magnitude;
			if (magnitude <= max)
			{
				return vector;
			}
			return ((Vector2)(ref vector)).normalized * max;
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	public class IzzyTeam : Object
	{
		private static PlayerSkin Skin;

		private static readonly PlayerSkin IzzySkin = new PlayerSkin
		{
			color = Colour.New(0.98, 0.204, 1.0),
			backgroundColor = Colour.New(0.98, 0.204, 1.0, 0.24),
			winText = Colour.New(0.98, 0.204, 1.0),
			particleEffect = Colour.New(0.778, 0.096, 0.631)
		};

		private const int TeamID = 93;

		[HarmonyPatch("GetTeamColorName")]
		[HarmonyPostfix]
		public static void PatchName(int teamID, ref string __result)
		{
			if (teamID == 93)
			{
				__result = "Izzy  (:";
			}
		}

		[HarmonyPatch(/*Could not decode attribute arguments.*/)]
		[HarmonyPostfix]
		public static void FixCardChoice(CardChoiceVisuals __instance, int pickerID)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			ParticleSystem component = __instance.currentSkin.GetComponent<ParticleSystem>();
			if (component.startColor == IzzySkin.color)
			{
				component.startColor = Colour.New(IzzySkin.color.r, IzzySkin.color.g, IzzySkin.color.b, 0.14);
			}
		}

		[HarmonyPatch(/*Could not decode attribute arguments.*/)]
		[HarmonyPatch(/*Could not decode attribute arguments.*/)]
		[HarmonyPostfix]
		public static void FixCardBar(CardBarHandler instance)
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: 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_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			CardBar[] cardBars = instance.cardBars;
			foreach (CardBar val in cardBars)
			{
				ProceduralImage component = ((Component)((Component)val).transform.GetChild(0).GetChild(0)).GetComponent<ProceduralImage>();
				if (((Graphic)component).color.r == IzzySkin.backgroundColor.r && ((Graphic)component).color.g == IzzySkin.backgroundColor.g && ((Graphic)component).color.b == IzzySkin.backgroundColor.b)
				{
					((Graphic)component).color = Colour.New(IzzySkin.color.r, IzzySkin.color.g, IzzySkin.color.b, 0.14);
					TextMeshProUGUI component2 = ((Component)((Component)component).transform.parent.GetChild(1)).GetComponent<TextMeshProUGUI>();
					((TMP_Text)component2).outlineColor = Color32.op_Implicit(Color.cyan);
					((TMP_Text)component2).outlineWidth = 0.4f;
				}
			}
		}

		[HarmonyPatch("GetPlayerSkinColors")]
		[HarmonyPrefix]
		public static bool PatchGetSkin(int colorID, ref PlayerSkin __result)
		{
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			if (colorID != 93)
			{
				return true;
			}
			if ((Object)(object)Skin == (Object)null)
			{
				PropertyInfo property = typeof(PlayerSkinBank).GetProperty("Instance", (BindingFlags)40);
				PlayerSkinBank val = (PlayerSkinBank)((property != null) ? property.GetValue((object)null, (object[])null) : null);
				PlayerSkin val2 = (((int)val != 0) ? val.skins[colorID % 4].currentPlayerSkin : null);
				PlayerSkin component = ((Component)Object.Instantiate<PlayerSkin>(val2)).gameObject.GetComponent<PlayerSkin>();
				Object.DontDestroyOnLoad((Object)(object)component);
				PlayerSkin izzySkin = IzzySkin;
				component.color = izzySkin.color;
				component.backgroundColor = izzySkin.backgroundColor;
				component.winText = izzySkin.winText;
				component.particleEffect = izzySkin.particleEffect;
				PlayerSkinParticle componentInChildren = ((Component)component).GetComponentInChildren<PlayerSkinParticle>();
				ParticleSystem component2 = ((Component)componentInChildren).GetComponent<ParticleSystem>();
				MainModule main = component2.main;
				MinMaxGradient startColor = ((MainModule)(ref main)).startColor;
				((MinMaxGradient)(ref startColor)).colorMin = izzySkin.backgroundColor;
				((MinMaxGradient)(ref startColor)).colorMax = izzySkin.color;
				((MainModule)(ref main)).startColor = startColor;
				ExtensionMethods.SetFieldValue((object)componentInChildren, "startColor1", (object)izzySkin.backgroundColor);
				ExtensionMethods.SetFieldValue((object)componentInChildren, "startColor2", (object)izzySkin.color);
				Skin = component;
			}
			__result = Skin;
			return false;
		}
	}
	[Serializable]
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	public class PerminentCardPatch : Object
	{
		[HarmonyPatch(/*Could not decode attribute arguments.*/)]
		[HarmonyPrefix]
		public static bool AddPrefix(Player player, CardInfo card)
		{
			return !(card is RootCardInfo rootCardInfo) || !rootCardInfo.Perminent || !player.HasCard(card);
		}

		[HarmonyPatch(/*Could not decode attribute arguments.*/)]
		[HarmonyPrefix]
		public static bool RPCAddPrefix(string cardObjectName, int playerID)
		{
			CardInfo cardWithObjectName = Cards.instance.GetCardWithObjectName(cardObjectName);
			Player playerWithID = PlayerManager.instance.GetPlayerWithID(playerID);
			return !(cardWithObjectName is RootCardInfo rootCardInfo) || !rootCardInfo.Perminent || !playerWithID.HasCard(cardWithObjectName);
		}

		[HarmonyPatch("RemoveAllCardsFromPlayer")]
		public static void Prefix(Player player, out CardInfo[] __state)
		{
			__state = Enumerable.ToArray<CardInfo>(Enumerable.Where<CardInfo>((IEnumerable<CardInfo>)(object)player.data.currentCards, (Func<CardInfo, bool>)((CardInfo card) => card is RootCardInfo rootCardInfo && rootCardInfo.Perminent)));
		}

		[HarmonyPatch("RemoveAllCardsFromPlayer")]
		public static void Postfix(Player player, ref CardInfo[] __state)
		{
			Cards.instance.AddCardsToPlayer(player, __state, false, (string[])null, (float[])null, (float[])null, true);
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	public class AllowedCardPatch : Object
	{
		private static void Postfix(Player player, CardInfo card, ref bool __result, Cards __instance)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Invalid comparison between Unknown and I4
			if (card != null && player != null)
			{
				if (player.GetRootData().simple)
				{
					__result = __result && (int)card.rarity == 0;
				}
				if (card is RootCardInfo rootCardInfo && rootCardInfo.PickPhaseOnly && (!CardChoice.instance.isPlaying || CardChoice.instance.picks < 1 || CardChoice.instance.spawnedCards.Count >= ((Component)CardChoice.instance).transform.childCount))
				{
					__result = false;
				}
			}
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	public class ToggleCardsMenuPatch : Object
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c : Object
		{
			public static readonly <>c <>9 = new <>c();

			public static Action<Transform> <>9__0_2;

			public static Action<Transform> <>9__0_5;

			public static Action <>9__0_0;

			internal void <Postfix>b__0_0()
			{
				//IL_002d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Expected O, but got Unknown
				//IL_007a: Unknown result type (might be due to invalid IL or missing references)
				//IL_007f: Unknown result type (might be due to invalid IL or missing references)
				//IL_011b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0120: Unknown result type (might be due to invalid IL or missing references)
				//IL_0186: Unknown result type (might be due to invalid IL or missing references)
				//IL_019e: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
				//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
				//IL_0237: Unknown result type (might be due to invalid IL or missing references)
				//IL_0241: Expected O, but got Unknown
				//IL_0244: Unknown result type (might be due to invalid IL or missing references)
				//IL_0249: Unknown result type (might be due to invalid IL or missing references)
				//IL_0275: Unknown result type (might be due to invalid IL or missing references)
				//IL_027a: Unknown result type (might be due to invalid IL or missing references)
				//IL_027d: Expected O, but got Unknown
				//IL_0282: Expected O, but got Unknown
				//IL_0303: Unknown result type (might be due to invalid IL or missing references)
				<>c__DisplayClass0_0 CS$<>8__locals0 = new <>c__DisplayClass0_0();
				List<Transform> val = new List<Transform>();
				Transform val2 = (Transform)typeof(ToggleCardsMenuHandler).GetField("categoryContent", (BindingFlags)36).GetValue((object)ToggleCardsMenuHandler.instance);
				Dictionary<string, Transform> val3 = new Dictionary<string, Transform>();
				int childCount = val2.childCount;
				for (int i = 0; i < childCount; i++)
				{
					Transform child = val2.GetChild(i);
					val3.Add(((Object)child).name, child);
				}
				Enumerator<string> enumerator = CardManager.categories.GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						string current = enumerator.Current;
						val.Add(val3[current]);
					}
				}
				finally
				{
					((IDisposable)enumerator).Dispose();
				}
				Transform val4 = val3["Root"];
				val.Remove(val4);
				CS$<>8__locals0.shefron = Object.Instantiate<GameObject>(((Component)((Component)((Component)val4).GetComponentInChildren<Toggle>()).transform.parent.GetChild(0)).gameObject, ((Component)((Component)val4).GetComponentInChildren<Toggle>()).transform.parent, true);
				CS$<>8__locals0.shefron.transform.localPosition = Vector2.op_Implicit(new Vector2(60f, 2f));
				((TMP_Text)CS$<>8__locals0.shefron.GetComponent<TextMeshProUGUI>()).text = ">";
				((TMP_Text)CS$<>8__locals0.shefron.GetComponent<TextMeshProUGUI>()).fontSizeMin = 20f;
				((Graphic)CS$<>8__locals0.shefron.GetComponent<TextMeshProUGUI>()).color = Colour.New(1.0, 1.0, 0.6);
				CS$<>8__locals0.rootCatagorys = new List<Transform>();
				Enumerator<string, Transform> enumerator2 = val3.GetEnumerator();
				try
				{
					while (enumerator2.MoveNext())
					{
						KeyValuePair<string, Transform> current2 = enumerator2.Current;
						if (current2.Key.StartsWith("Root ("))
						{
							CS$<>8__locals0.rootCatagorys.Add(current2.Value);
							((Component)current2.Value).gameObject.SetActive(false);
						}
					}
				}
				finally
				{
					((IDisposable)enumerator2).Dispose();
				}
				List<Transform> rootCatagorys = CS$<>8__locals0.rootCatagorys;
				val.RemoveAll((Predicate<Transform>)rootCatagorys.Contains);
				((UnityEvent)((Component)val4).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
				{
					//IL_0046: Unknown result type (might be due to invalid IL or missing references)
					((TMP_Text)CS$<>8__locals0.shefron.GetComponent<TextMeshProUGUI>()).text = "v";
					((Graphic)CS$<>8__locals0.shefron.GetComponent<TextMeshProUGUI>()).color = Colour.New(0.4, 1.0, 0.6);
					CS$<>8__locals0.rootCatagorys.ForEach((Action<Transform>)delegate(Transform catagory)
					{
						//IL_0045: Unknown result type (might be due to invalid IL or missing references)
						//IL_004f: Expected O, but got Unknown
						<>c__DisplayClass0_1 CS$<>8__locals1 = new <>c__DisplayClass0_1
						{
							catagory = catagory
						};
						

Root_Cards_DC_Compat.dll

Decompiled 3 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using RootCore;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: SecurityPermission(8, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(/*Could not decode attribute arguments.*/)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
[Serializable]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("root.DeckCustomizationCompat", "DeckCustomizationCompat", "1.0.1")]
[BepInProcess("Rounds.exe")]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class DeckCustomizationCompat : BaseUnityPlugin
{
	public void Awake()
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		new Harmony("root.DeckCustomizationCompat").PatchAll();
	}

	public static void Postfix(ref List<CardInfo> __result)
	{
		__result.RemoveAll((Predicate<CardInfo>)((CardInfo card) => ((RootCardInfo)(((card is RootCardInfo) ? card : null)?)).Restricted ?? false));
	}
}

RootCoreRoundsTrackerPatch.dll

Decompiled 3 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using RootCore;
using RoundsTracker;
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("RootCoreRoundsTrackerPatch")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RootCoreRoundsTrackerPatch")]
[assembly: AssemblyTitle("RootCoreRoundsTrackerPatch")]
[assembly: AssemblyVersion("1.2.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

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

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

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace RootCoreRoundsTrackerPatch
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("Systems.R00t.TrackerPatch", "Root Core Tracker Patch", "1.2.0")]
	[BepInProcess("Rounds.exe")]
	public class Patch : BaseUnityPlugin
	{
		private const string ModId = "Systems.R00t.TrackerPatch";

		private const string ModName = "Root Core Tracker Patch";

		public const string Version = "1.2.0";

		public void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			Harmony val = new Harmony("Systems.R00t.TrackerPatch");
			val.PatchAll(typeof(Patch).Assembly);
		}
	}
	[HarmonyPatch(typeof(DC), "ExtractModName")]
	public class fixExtractModName
	{
		public static void Postfix(string objectName, ref string __result)
		{
			if (__result == "Vanilla" && !string.IsNullOrEmpty(objectName))
			{
				if (objectName.Contains("(Root)"))
				{
					__result = "Root Cards";
				}
				else if (objectName.Contains("(Curse)"))
				{
					__result = "Root Curses";
				}
				else if (objectName.Contains("(Genie)"))
				{
					__result = "Genie";
				}
			}
		}
	}
	[HarmonyPatch(typeof(DC), "ParseObjectName")]
	public class ParseObjectName
	{
		public static void Postfix(string objectName, ref CardData __result)
		{
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Expected O, but got Unknown
			if (!(__result.mod_name == "Root Cards") && !(__result.mod_name == "Root Curses") && !(__result.mod_name == "Genie"))
			{
				return;
			}
			string text = objectName.Substring("Root-Card  ".Length);
			text = text.Substring(0, text.IndexOf(" "));
			RootCardInfo cardInfo = CardList.GetCardInfo(text);
			if (!((Object)(object)cardInfo != (Object)null))
			{
				return;
			}
			__result.card_name = ((CardInfo)cardInfo).cardName;
			__result.rarity = ((object)(Rarity)(ref ((CardInfo)cardInfo).rarity)).ToString();
			__result.description = ((CardInfo)cardInfo).cardDestription;
			__result.color_theme = ((object)(CardThemeColorType)(ref ((CardInfo)cardInfo).colorTheme)).ToString();
			__result.allow_multiple = ((CardInfo)cardInfo).allowMultiple;
			List<Stat> list = new List<Stat>();
			try
			{
				if (((CardInfo)cardInfo).cardStats != null)
				{
					CardInfoStat[] cardStats = ((CardInfo)cardInfo).cardStats;
					foreach (CardInfoStat val in cardStats)
					{
						list.Add(new Stat
						{
							stat = (val.stat ?? ""),
							amount = (val.amount ?? ""),
							positive = val.positive
						});
					}
				}
			}
			catch
			{
			}
			__result.stats = list;
			if (cardInfo.Key != "Cake_Toggle" && cardInfo.Key.StartsWith("Cake_"))
			{
				CardData obj2 = __result;
				obj2.card_name += $" ({((CardInfo)cardInfo).rarity})";
			}
		}
	}
	[HarmonyPatch(typeof(DC), "FromInfo")]
	public class fixFromInfo
	{
		public static void Postfix(CardInfo info, ref CardData __result)
		{
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			RootCardInfo val = (RootCardInfo)(object)((info is RootCardInfo) ? info : null);
			if (val != null)
			{
				if (val.Key != "Cake_Toggle" && val.Key.StartsWith("Cake_"))
				{
					CardData obj = __result;
					obj.card_name += $" ({((CardInfo)val).rarity})";
				}
				__result.mod_name = ((val.Tag == "Genie") ? "Genie" : ((val.Tag == "Curse") ? "Root Curses" : "Root Cards"));
			}
		}
	}
}