Decompiled source of Root Core v1.4.2

Root Core Modual.dll

Decompiled 2 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 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.2.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)
		{
			if (ModCards != null && ModCards.ContainsKey(cardName))
			{
				return ModCards[cardName];
			}
			return null;
		}

		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_0046: Unknown result type (might be due to invalid IL or missing references)
			__instance.GetRootData().reset();
			Transform[] componentsInChildren = ((Component)__instance).gameObject.GetComponentsInChildren<Transform>();
			foreach (Transform val in componentsInChildren)
			{
				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_0008: 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.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("Systems.R00t.CoreModual", "Root Core", "1.4.2")]
	[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__10_0;

			public static UnityAction <>9__10_1;

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

			public static UnityAction<bool> <>9__12_0;

			public static UnityAction<bool> <>9__12_1;

			public static Action<Player> <>9__13_0;

			public static Action<Player> <>9__14_0;

			public static Action<Player> <>9__15_0;

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

			internal void <Start>b__10_1()
			{
			}

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

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

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

			internal void <GameStart>b__13_0(Player player)
			{
				//IL_0037: 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_0054: 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__14_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__15_0(Player player)
			{
				CharacterData data = player.data;
				data.maxHealth -= player.GetRootData().tempflatHPboost;
			}
		}

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

			internal void <RegesterCards>b__0()
			{
				((Collection<CardInfo>)(object)(ObservableCollection<CardInfo>)typeof(CardManager).GetField("activeCards", (BindingFlags)40).GetValue((object)null)).Add((CardInfo)(object)card);
			}
		}

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

			public <>c__DisplayClass11_0 CS$<>8__locals1;

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

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

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

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

			public Func<Player, bool> func;

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

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

			private object <>2__current;

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

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

			[DebuggerHidden]
			public <GameStart>d__13(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_0037: 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_0054: 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__15 : Object, IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

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

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

			[DebuggerHidden]
			public <PointEnd>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().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__14 : Object, IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

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

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

			[DebuggerHidden]
			public <PointStart>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)
				{
					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.2";

		public static ConfigEntry<bool> DEBUG;

		public static bool Credits;

		public static Core instance;

		private static CardCategory[] _noLotteryCategories;

		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_0058: Unknown result type (might be due to invalid IL or missing references)
			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);
			new Harmony("Systems.R00t.CoreModual").PatchAll();
		}

		private void Start()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Expected O, but got Unknown
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Expected O, but got Unknown
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: 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_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Expected O, but got Unknown
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Expected O, but got Unknown
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: 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__10_1;
			if (obj == null)
			{
				UnityAction val = delegate
				{
				};
				<>c.<>9__10_1 = 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_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Expected O, but got Unknown
			//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Expected O, but got Unknown
			//IL_0326: Unknown result type (might be due to invalid IL or missing references)
			//IL_0330: 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__DisplayClass11_0 CS$<>8__locals0 = new <>c__DisplayClass11_0();
				CS$<>8__locals0.card = cardsToRegester[i];
				if ((Object)(object)CS$<>8__locals0.card == (Object)null || !CS$<>8__locals0.card.Build)
				{
					continue;
				}
				CS$<>8__locals0.card.modVertion = modVertion;
				if (CS$<>8__locals0.card.Author == "Tessy")
				{
					CS$<>8__locals0.card.Author = "Izzy";
				}
				((Object)CS$<>8__locals0.card).name = String.Concat((string[])(object)new String[6]
				{
					"Root-Card  ",
					CS$<>8__locals0.card.Key,
					" (",
					CS$<>8__locals0.card.Tag,
					")",
					betaOverwriteDoNotUse ? "  BETA" : ""
				});
				if (betaOverwriteDoNotUse && CardList.ModCards.ContainsKey(CS$<>8__locals0.card.Key))
				{
					CardManager.cards.Remove(((Object)CardList.ModCards[CS$<>8__locals0.card.Key]).name);
					Cards.instance.hiddenCards.Remove((CardInfo)(object)CardList.ModCards[CS$<>8__locals0.card.Key]);
					CardList.ModCards.Remove(CS$<>8__locals0.card.Key);
				}
				CardList.ModCards.Add(CS$<>8__locals0.card.Key, CS$<>8__locals0.card);
				PhotonNetwork.PrefabPool.RegisterPrefab(((Object)CS$<>8__locals0.card).name, ((Component)CS$<>8__locals0.card).gameObject);
				CustomCardCategories.instance.UpdateAndPullCategoriesFromCard((CardInfo)(object)CS$<>8__locals0.card);
				if (CS$<>8__locals0.card.Hidden)
				{
					Cards.instance.AddHiddenCard((CardInfo)(object)CS$<>8__locals0.card);
				}
				else if (CS$<>8__locals0.card.Restricted)
				{
					Cards.instance.AddHiddenCard((CardInfo)(object)CS$<>8__locals0.card);
					ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)instance, 15, (Action)delegate
					{
						((Collection<CardInfo>)(object)(ObservableCollection<CardInfo>)typeof(CardManager).GetField("activeCards", (BindingFlags)40).GetValue((object)null)).Add((CardInfo)(object)CS$<>8__locals0.card);
					});
				}
				else if (CS$<>8__locals0.card.Tag == "Root")
				{
					CardManager.cards.Add(((Object)CS$<>8__locals0.card).name, new Card(String.Concat(CS$<>8__locals0.card.Tag, " (", ((Object)list).name, ")"), Unbound.config.Bind<bool>(String.Concat("Cards: ", CS$<>8__locals0.card.Tag), ((Object)CS$<>8__locals0.card).name, !CS$<>8__locals0.card.StartDisabled, (ConfigDescription)null), (CardInfo)(object)CS$<>8__locals0.card));
				}
				else
				{
					CardManager.cards.Add(((Object)CS$<>8__locals0.card).name, new Card(CS$<>8__locals0.card.Tag ?? "", Unbound.config.Bind<bool>(String.Concat("Cards: ", CS$<>8__locals0.card.Tag), ((Object)CS$<>8__locals0.card).name, !CS$<>8__locals0.card.StartDisabled, (ConfigDescription)null), (CardInfo)(object)CS$<>8__locals0.card));
				}
				if (Enumerable.Contains<CardCategory>((IEnumerable<CardCategory>)(object)((CardInfo)CS$<>8__locals0.card).categories, CustomCardCategories.instance.CardCategory("SkipReroleCard")))
				{
					WillInterface.cardsSkippedForRerolls(CS$<>8__locals0.card);
				}
				CS$<>8__locals0.card.Setup();
				CardCondition[] components = ((Component)CS$<>8__locals0.card).GetComponents<CardCondition>();
				for (int j = 0; j < components.Length; j++)
				{
					<>c__DisplayClass11_1 CS$<>8__locals1 = new <>c__DisplayClass11_1();
					CS$<>8__locals1.CS$<>8__locals1 = CS$<>8__locals0;
					CS$<>8__locals1.condition = components[j];
					Cards.instance.AddCardValidationFunction((Func<Player, CardInfo, bool>)((Player player, CardInfo cardinfo) => (Object)(object)cardinfo != (Object)(object)CS$<>8__locals1.CS$<>8__locals1.card || CS$<>8__locals1.condition.IsPlayerAllowedCard(player)));
				}
			}
		}

		private void NewGUI(GameObject menu)
		{
			//IL_000d: 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_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: 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__13(0);
		}

		[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__14(0);
		}

		[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__15(0);
		}

		[UnboundRPC]
		private static void SetSteamID(int playerID, string steamID)
		{
			<>c__DisplayClass16_0 CS$<>8__locals0 = new <>c__DisplayClass16_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__DisplayClass17_0 CS$<>8__locals0 = new <>c__DisplayClass17_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_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: 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)
			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_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: 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_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				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_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				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>();
			((Component)<>c__DisplayClass3_.player).GetComponent<HealthHandler>();
			((Component)<>c__DisplayClass3_.player).GetComponent<Movement>();
			((Component)<>c__DisplayClass3_.player).GetComponent<Gravity>();
			Block component3 = ((Component)<>c__DisplayClass3_.player).GetComponent<Block>();
			CharacterStatModifiers component4 = ((Component)<>c__DisplayClass3_.player).GetComponent<CharacterStatModifiers>();
			CharacterStatModifiersExtension.AjustNulls(component4, modifiers.nulls);
			CharacterStatModifiersRootData.NullData nullData = component4.GetRootData().nullData;
			<>c__DisplayClass3_1 CS$<>8__locals0 = new <>c__DisplayClass3_1
			{
				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_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				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;
			component4.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;
			component4.lifeSteal += (float)nullCount * modifiers.Null_Lifesteal;
			nullData.block_cdMultiplier *= modifiers.Null_block_cdMultiplier;
			component3.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;
			component4.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_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				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_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_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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: Expected O, but got Unknown
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Expected O, but got Unknown
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Expected O, but got Unknown
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: 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)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Expected O, but got Unknown
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Expected O, but got Unknown
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: 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_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Expected O, but got Unknown
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: 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_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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
			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_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: 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_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Expected O, but got Unknown
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: 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_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Expected O, but got Unknown
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: 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_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			if (triggerType != blackListedType && !(lastTriggerTime + cooldown > Time.time))
			{
				triggerSuperFirstBlock.Invoke();
			}
		}

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

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

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

		public void DoBlockedProjectile(GameObject projectile, Vector3 forward, Vector3 hitPos)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			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;

		public bool Restricted;

		public bool Reassign = true;

		public bool AntiCard;

		public bool IsCurse;

		public bool Nullable = true;

		public bool NeedsNull;

		public bool PickPhaseOnly;

		public string Tag = "root";

		public string Author;

		public bool Build = true;

		public bool StartDisabled;

		public bool Perminent;

		public CardInfo AlternetSource;

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

		public void Setup()
		{
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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 obj = ((Component)((Component)this).gameObject.GetComponentInChildren<CardVisuals>()).transform.Find("Canvas/Front/ModNameText");
				((Component)obj).gameObject.SetActive(true);
				((TMP_Text)((Component)obj).GetComponent<TextMeshProUGUI>()).text = Tag;
				Transform obj2 = ((Component)((Component)this).gameObject.GetComponentInChildren<CardVisuals>()).transform.Find("Canvas/Front/AuthorNameText");
				((Component)obj2).gameObject.SetActive(true);
				((TMP_Text)((Component)obj2).GetComponent<TextMeshProUGUI>()).text = String.Concat("Card Idea By:\n", Author);
			}
		}
	}
	public class RootStatModifiers : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass27_0 : Object
		{
			public CharacterStatModifiers characterStats;

			internal void <Apply>b__0()
			{
				characterStats.GetRootData().knowledge++;
			}
		}

		[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;

		public int WhichTime;

		public bool knowledge;

		public float ShieldStoneSize = 1f;

		public float shieldEfectiveness = 1f;

		public float projectileSizeMult = 1f;

		public int ammoCap = -1;

		public int bulletCap = -1;

		public int wishes;

		public float hpCulling;

		public int nullsPerPoint;

		public bool usedAmmo;

		public bool invertion;

		public bool simple;

		public float damageCap;

		public float damageCapWindow;

		public GameObject AddObjectToOpponents;

		public GameObject AddObjectToTeam;

		public GameObject AddObjectToFreinds;

		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;

		public int Null_gun_Ammo;

		public float Null_Lifesteal;

		public int Null_Revives;

		public void Apply(Player player)
		{
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Expected O, but got Unknown
			//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0417: Unknown result type (might be due to invalid IL or missing references)
			//IL_041c: Unknown result type (might be due to invalid IL or missing references)
			//IL_03be: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0530: 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_0450: Unknown result type (might be due to invalid IL or missing references)
			//IL_045c: Unknown result type (might be due to invalid IL or missing references)
			//IL_04db: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0578: Unknown result type (might be due to invalid IL or missing references)
			//IL_0584: Unknown result type (might be due to invalid IL or missing references)
			<>c__DisplayClass27_0 CS$<>8__locals0 = new <>c__DisplayClass27_0();
			Gun component = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>();
			((Component)component).GetComponentInChildren<GunAmmo>();
			CharacterData component2 = ((Component)player).GetComponent<CharacterData>();
			((Component)player).GetComponent<HealthHandler>();
			((Component)player).GetComponent<Movement>();
			((Component)player).GetComponent<Gravity>();
			((Component)player).GetComponent<Block>();
			CS$<>8__locals0.characterStats = ((Component)player).GetComponent<CharacterStatModifiers>();
			component.projectileSize += 1f;
			component.projectileSize *= projectileSizeMult;
			component.projectileSize -= 1f;
			CS$<>8__locals0.characterStats.GetRootData().witchTimeDuration += WhichTime;
			CS$<>8__locals0.characterStats.GetRootData().shieldEfectiveness *= shieldEfectiveness;
			if (damageCap != 0f)
			{
				if (CS$<>8__locals0.characterStats.GetRootData().damageCap != 0f)
				{
					CS$<>8__locals0.characterStats.GetRootData().damageCap = Mathf.Min(CS$<>8__locals0.characterStats.GetRootData().damageCap, damageCap);
				}
				else
				{
					CS$<>8__locals0.characterStats.GetRootData().damageCap = damageCap;
				}
			}
			if (CS$<>8__locals0.characterStats.GetRootData().damageCapWindow != 0f && damageCapWindow != 0f)
			{
				CS$<>8__locals0.characterStats.GetRootData().damageCapWindow = Mathf.Min(CS$<>8__locals0.characterStats.GetRootData().damageCapWindow, damageCapWindow);
			}
			else
			{
				CS$<>8__locals0.characterStats.GetRootData().damageCapWindow = damageCapWindow;
			}
			if (ammoCap > 0)
			{
				CS$<>8__locals0.characterStats.GetRootData().ammoCap = ammoCap;
			}
			if (bulletCap > 0)
			{
				CS$<>8__locals0.characterStats.GetRootData().bulletCap = bulletCap;
			}
			if (knowledge)
			{
				ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Core.instance, 1, (Action)delegate
				{
					CS$<>8__locals0.characterStats.GetRootData().knowledge++;
				});
			}
			if (simple)
			{
				player.GetRootData().simple = true;
			}
			CS$<>8__locals0.characterStats.GetRootData().hpCulling = 1f - (1f - CS$<>8__locals0.characterStats.GetRootData().hpCulling) * (1f - hpCulling);
			if (((Component)this).GetComponent<RootCardInfo>().Key.ContainsOR("Genie", "Efreet"))
			{
				PlayerExtension.GetAdditionalData(player).bankAccount.Deposit("Wish", wishes);
			}
			else
			{
				CS$<>8__locals0.characterStats.GetRootData().freeCards += wishes;
			}
			CS$<>8__locals0.characterStats.GetRootData().nullsPerPoint += nullsPerPoint;
			NullInterface.ApplyNullStuffsToPlayer(player, this);
			Transform[] componentsInChildren = ((Component)player).gameObject.GetComponentsInChildren<Transform>();
			foreach (Transform val in componentsInChildren)
			{
				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 componentInChildren = ((Component)component).GetComponentInChildren<GunAmmo>();
				componentInChildren.maxAmmo = Mathf.Clamp(componentInChildren.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
				});
			}
			Enumerator<Player> enumerator;
			if (Object.op_Implicit((Object)(object)AddObjectToOpponents))
			{
				enumerator = PlayerManager.instance.players.GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						Player current = enumerator.Current;
						if (current.teamID != player.teamID)
						{
							CS$<>8__locals0.characterStats.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 = PlayerManager.instance.players.GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						Player current2 = enumerator.Current;
						if (current2.teamID == player.teamID)
						{
							CS$<>8__locals0.characterStats.objectsAddedToPlayer.Add(Object.Instantiate<GameObject>(AddObjectToTeam, ((Component)current2).transform.position, ((Component)current2).transform.rotation, ((Component)current2).transform));
						}
					}
				}
				finally
				{
					((IDisposable)enumerator).Dispose();
				}
			}
			if (!Object.op_Implicit((Object)(object)AddObjectToFreinds))
			{
				return;
			}
			enumerator = PlayerManager.instance.players.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					Player current3 = enumerator.Current;
					if (current3.teamID == player.teamID && current3.playerID != player.playerID)
					{
						CS$<>8__locals0.characterStats.objectsAddedToPlayer.Add(Object.Instantiate<GameObject>(AddObjectToFreinds, ((Component)current3).transform.position, ((Component)current3).transform.rotation, ((Component)current3).transform));
					}
				}
			}
			finally
			{
				((IDisposable)enumerator).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;
			GunAmmo componentInChildren = ((Component)((Component)PlayerManager.instance.players.Find((Predicate<Player>)((Player p) => p.playerID == CS$<>8__locals0.playerID))).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));
			}
			TabInfoManager.RegisterStat(Categories[category], 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 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)
			{
				if (p.teamID != player.teamID)
				{
					return p.HasCard(card);
				}
				return false;
			}
		}

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

			public CardInfo card;

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

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

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

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

		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)
		{
			if (CardList.ModCards.ContainsKey(cardKey))
			{
				return player.OpponentHasCard((CardInfo)(object)CardList.GetCardInfo(cardKey));
			}
			return false;
		}

		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)
		{
			if (CardList.ModCards.ContainsKey(cardKey))
			{
				return player.TeammateHasCard((CardInfo)(object)CardList.GetCardInfo(cardKey));
			}
			return false;
		}

		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;
			IEnumerator<CardBarButton> enumerator = Enumerable.Where<CardBarButton>((IEnumerable<CardBarButton>)(object)((Component)CardBarUtils.instance.PlayersCardBar(player)).GetComponentsInChildren<CardBarButton>(), (Func<CardBarButton, bool>)((CardBarButton b) => (Object)(object)b.card == (Object)(object)CS$<>8__locals0.card)).GetEnumerator();
			try
			{
				while (((IEnumerator)enumerator).MoveNext())
				{
					Object.Destroy((Object)(object)((Component)enumerator.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_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: 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_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			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_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: 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_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_000a: Unknown result type (might be due to invalid IL or missing references)
			if (((Vector2)(ref vector)).magnitude <= max)
			{
				return vector;
			}
			return ((Vector2)(ref vector)).normalized * max;
		}
	}
	[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)
		{
			if (card is RootCardInfo rootCardInfo && rootCardInfo.Perminent)
			{
				return !player.HasCard(card);
			}
			return true;
		}

		[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);
			if (cardWithObjectName is RootCardInfo rootCardInfo && rootCardInfo.Perminent)
			{
				return !playerWithID.HasCard(cardWithObjectName);
			}
			return true;
		}

		[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_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: 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_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Expected O, but got Unknown
				//IL_006f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0074: Unknown result type (might be due to invalid IL or missing references)
				//IL_010c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0111: Unknown result type (might be due to invalid IL or missing references)
				//IL_0174: Unknown result type (might be due to invalid IL or missing references)
				//IL_018a: Unknown result type (might be due to invalid IL or missing references)
				//IL_018f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0195: Unknown result type (might be due to invalid IL or missing references)
				//IL_019a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0218: Unknown result type (might be due to invalid IL or missing references)
				//IL_0222: Expected O, but got Unknown
				//IL_0223: Unknown result type (might be due to invalid IL or missing references)
				//IL_0228: Unknown result type (might be due to invalid IL or missing references)
				//IL_024f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0254: Unknown result type (might be due to invalid IL or missing references)
				//IL_0257: Expected O, but got Unknown
				//IL_025c: Expected O, but got Unknown
				//IL_02d6: 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_0044: 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_003d: Unknown result type (might be due to invalid IL or missing references)
						//IL_0047: Expected O, but got Unknown
						<>c__DisplayClass0_1 CS$<>8__locals1 = new <>c__DisplayClass0_1
						{
							catagory = catagory
						};
						if (!((Component)CS$<>8__locals1.catagory).gameObject.activeSelf)
						{
							((Component)CS$<>8__locals1.catagory).gameObject.SetActive(true);
							ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Core.instance, 2, (Action)delegate
							{
								//IL_0007: Unknown result type (might be due to invalid IL or missing references)
								//IL_000c: Unknown result type (might be due to invalid IL or missing references)
								//IL_0016: Unknown result type (might be due to invalid IL or missing references)
								//IL_001b: Unknown result type (might be due to invalid IL or missing references)
								Transform catagory2 = CS$<>8__locals1.catagory;
								catagory2.localPosition += Vector3.right * 8f;
							});
						}
					});
				});
				Enumerator<Transform> enumerator3 = val.GetEnumerator();
				try
				{
					while (enumerator3.MoveNext())
					{
						ButtonClickedEvent onClick = ((Component)enumerator3.Current).GetComponent<Button>().onClick;
						UnityAction obj = CS$<>8__locals0.<>9__4;
						if (obj == null)
						{
							UnityAction val5 = delegate
							{
								//IL_0044: Unknown result type (might be due to invalid IL or missing references)
								((TMP_Text)CS$<>8__locals0.shefron.GetComponent<TextMeshProUGUI>()).text = ">";
								((Graphic)CS$<>8__locals0.shefron.GetComponent<TextMeshProUGUI>()).color = Colour.New(1.0, 1.0, 0.6);
								CS$<>8__locals0.rootCatagorys.ForEach((Action<Transform>)delegate(Transform catagory)
								{
									((Component)catagory).gameObject.SetActive(false);
								});
							};
							UnityAction val6 = val5;
							CS$<>8__locals0.<>9__4 = val5;
							obj = val6;
						}
						((UnityEvent)onClick).AddListener(obj);
					}
				}
				finally
				{
					((IDisposable)enumerator3).Dispose();
				}
				((Component)((Component)val4).GetComponentInChildren<Toggle>()).gameObject.SetActive(false);
				TextMeshProUGUI obj2 = ((Component)ToggleCardsMenuHandler.scrollViews["Root"].Find("Viewport/Content")).gameObject.AddComponent<TextMeshProUGUI>();
				((Graphic)obj2).color = Colour.New(0.6, 0.5, 0.8);
				((TMP_Text)obj2).text = "  \r\n   Welcome to Root Cards,\r\n   this is a modular mod created by Lilith and Izzy.\r\n   \r\n   Cards added by different modules are separated into\r\n   sub-categories seen to the right under the 'Root' tab.\r\n   \r\n   If no sub-categories showed up after selecting 'Root'\r\n   it is likely that you do not have any modules installed.\r\n   please note that the core module does \r\n   almost nothing by itself, merely adding functionality\r\n   for the actual content moduals.\r\n   \r\n   We hope you enjoy our cards.\r\n   \r\n   If you have any feedback, or would like to report a bug,\r\n   please reach out to @__root__ in the RMC discord server.\r\n   ";
				((TMP_Text)obj2).fontSize = 20f;
			}

			internal void <Postfix>b__0_2(Transform catagory)
			{
				//IL_003d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0047: Expected O, but got Unknown
				<>c__DisplayClass0_1 CS$<>8__locals0 = new <>c__DisplayClass0_1
				{
					catagory = catagory
				};
				if (!((Component)CS$<>8__locals0.catagory).gameObject.activeSelf)
				{
					((Component)CS$<>8__locals0.catagory).gameObject.SetActive(true);
					ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Core.instance, 2, (Action)delegate
					{
						//IL_0007: Unknown result type (might be due to invalid IL or missing references)
						//IL_000c: Unknown result type (might be due to invalid IL or missing references)
						//IL_0016: Unknown result type (might be due to invalid IL or missing references)
						//IL_001b: Unknown result type (might be due to invalid IL or missing references)
						Transform catagory2 = CS$<>8__locals0.catagory;
						catagory2.localPosition += Vector3.right * 8f;
					});
				}
			}

			internal void <Postfix>b__0_5(Transform catagory)
			{
				((Component)catagory).gameObject.SetActive(false);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass0_0 : Object
		{
			public GameObject shefron;

			public List<Transform> rootCatagorys;

			public UnityAction <>9__4;

			internal void <Postfix>b__1()
			{
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				((TMP_Text)shefron.GetComponent<TextMeshProUGUI>()).text = "v";
				((Graphic)shefron.GetComponent<TextMeshProUGUI>()).color = Colour.New(0.4, 1.0, 0.6);
				rootCatagorys.ForEach((Action<Transform>)delegate(Transform catagory)
				{
					//IL_003d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0047: Expected O, but got Unknown
					<>c__DisplayClass0_1 CS$<>8__locals0 = new <>c__DisplayClass0_1
					{
						catagory = catagory
					};
					if (!((Component)CS$<>8__locals0.catagory).gameObject.activeSelf)
					{
						((Component)CS$<>8__locals0.catagory).gameObject.SetActive(true);
						ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Core.instance, 2, (Action)delegate
						{
							//IL_0007: Unknown result type (might be due to invalid IL or missing references)
							//IL_000c: Unknown result type (might be due to invalid IL or missing references)
							//IL_0016: Unknown result type (might be due to invalid IL or missing references)
							//IL_001b: Unknown result type (might be due to invalid IL or missing references)
							Transform catagory2 = CS$<>8__locals0.catagory;
							catagory2.localPosition += Vector3.right * 8f;
						});
					}
				});
			}

			internal void <Postfix>b__4()
			{
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				((TMP_Text)shefron.GetComponent<TextMeshProUGUI>()).text = ">";
				((Graphic)shefron.GetComponent<TextMeshProUGUI>()).color = Colour.New(1.0, 1.0, 0.6);
				rootCatagorys.ForEach((Action<Transform>)delegate(Transform catagory)
				{
					((Component)catagory).gameObject.SetActive(false);
				});
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass0_1 : Object
		{
			public Transform catagory;

			internal void <Postfix>b__3()
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				Transform obj = catagory;
				obj.localPosition += Vector3.right * 8f;
			}
		}

		public static void Postfix()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			Core instance = Core.instance;
			object obj = <>c.<>9__0_0;
			if (obj == null)
			{
				Action val = delegate
				{
					//IL_002c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0032: Expected O, but got Unknown
					//IL_006f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0074: Unknown result type (might be due to invalid IL or missing references)
					//IL_010c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0111: Unknown result type (might be due to invalid IL or missing references)
					//IL_0174: Unknown result type (might be due to invalid IL or missing references)
					//IL_018a: Unknown result type (might be due to invalid IL or missing references)
					//IL_018f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0195: Unknown result type (might be due to invalid IL or missing references)
					//IL_019a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0218: Unknown result type (might be due to invalid IL or missing references)
					//IL_0222: Expected O, but got Unknown
					//IL_0223: Unknown result type (might be due to invalid IL or missing references)
					//IL_0228: Unknown result type (might be due to invalid IL or missing references)
					//IL_024f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0254: Unknown result type (might be due to invalid IL or missing references)
					//IL_0257: Expected O, but got Unknown
					//IL_025c: Expected O, but got Unknown
					//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
					<>c__DisplayClass0_0 CS$<>8__locals0 = new <>c__DisplayClass0_0();
					List<Transform> val2 = new List<Transform>();
					Transform val3 = (Transform)typeof(ToggleCardsMenuHandler).GetField("categoryContent", (BindingFlags)36).GetValue((object)ToggleCardsMenuHandler.instance);
					Dictionary<string, Transform> val4 = new Dictionary<string, Transform>();
					int childCount = val3.childCount;
					for (int i = 0; i < childCount; i++)
					{
						Transform child = val3.GetChild(i);
						val4.Add(((Object)child).name, child);
					}
					Enumerator<string> enumerator = CardManager.categories.GetEnumerator();
					try
					{
						while (enumerator.MoveNext())
						{
							string current = enumerator.Current;
							val2.Add(val4[current]);
						}
					}
					finally
					{
						((IDisposable)enumerator).Dispose();
					}
					Transform val5 = val4["Root"];
					val2.Remove(val5);
					CS$<>8__locals0.shefron = Object.Instantiate<GameObject>(((Component)((Component)((Component)val5).GetComponentInChildren<Toggle>()).transform.parent.GetChild(0)).gameObject, ((Component)((Component)val5).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 = val4.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;
					val2.RemoveAll((Predicate<Transform>)rootCatago

Root_Cards_DC_Compat.dll

Decompiled 2 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));
	}
}