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 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("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;
}
}
}
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
{
}
[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.0.0")]
[BepInProcess("Rounds.exe")]
public class Core : BaseUnityPlugin
{
[Serializable]
[CompilerGenerated]
private sealed class <>c : Object
{
public static readonly <>c <>9 = new <>c();
public static Predicate<BaseUnityPlugin> <>9__11_0;
public static UnityAction <>9__11_1;
public static Func<Player, CardInfo, bool> <>9__11_2;
public static UnityAction<bool> <>9__13_0;
public static UnityAction<bool> <>9__13_1;
public static Action<Player> <>9__14_0;
public static Action<Player> <>9__15_0;
public static Action<Player> <>9__16_0;
internal bool <Start>b__11_0(BaseUnityPlugin plugin)
{
return plugin.Info.Metadata.GUID == "com.willuwontu.rounds.tabinfo";
}
internal void <Start>b__11_1()
{
}
internal bool <Start>b__11_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__13_0(bool value)
{
Credits = value;
PlayerPrefs.SetInt("Systems.R00t.CoreModual.Credits", value ? 1 : 0);
}
internal void <NewGUI>b__13_1(bool value)
{
DEBUG.Value = value;
}
internal void <GameStart>b__14_0(Player player)
{
//IL_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__15_0(Player player)
{
CharacterData data = player.data;
data.maxHealth += player.GetRootData().flatHPboost;
player.GetRootData().tempflatHPboost = player.GetRootData().flatHPboost;
}
internal void <PointEnd>b__16_0(Player player)
{
CharacterData data = player.data;
data.maxHealth -= player.GetRootData().tempflatHPboost;
}
}
[CompilerGenerated]
private sealed class <>c__DisplayClass12_0 : Object
{
public RootCardInfo card;
internal void <RegesterCards>b__0()
{
((Collection<CardInfo>)(object)(ObservableCollection<CardInfo>)typeof(CardManager).GetField("activeCards", (BindingFlags)40).GetValue((object)null)).Add((CardInfo)(object)card);
}
}
[CompilerGenerated]
private sealed class <>c__DisplayClass12_1 : Object
{
public CardCondition condition;
public <>c__DisplayClass12_0 CS$<>8__locals1;
internal bool <RegesterCards>b__1(Player player, CardInfo cardinfo)
{
if (!((Object)(object)cardinfo != (Object)(object)CS$<>8__locals1.card))
{
return condition.IsPlayerAllowedCard(player);
}
return true;
}
}
[CompilerGenerated]
private sealed class <>c__DisplayClass17_0 : Object
{
public int playerID;
internal bool <SetSteamID>b__0(Player p)
{
return p.playerID == playerID;
}
}
[CompilerGenerated]
private sealed class <>c__DisplayClass18_0 : Object
{
public CardInfo card;
public Func<Player, bool> func;
internal bool <AddCardRquirement>b__0(Player p, CardInfo c)
{
if ((Object)(object)c == (Object)(object)card)
{
return func.Invoke(p);
}
return false;
}
}
private const string ModId = "Systems.R00t.CoreModual";
private const string ModName = "Root Core";
public const string Version = "1.0.0";
public static ConfigEntry<bool> DEBUG;
public static bool Credits;
public static Core instance;
public static List<BaseUnityPlugin> plugins;
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_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: 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_0048: Expected O, but got Unknown
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Expected O, but got Unknown
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Expected O, but got Unknown
//IL_00da: Unknown result type (might be due to invalid IL or missing references)
//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Unknown result type (might be due to invalid IL or missing references)
//IL_011e: Unknown result type (might be due to invalid IL or missing references)
//IL_0128: Expected O, but got Unknown
//IL_0123: Unknown result type (might be due to invalid IL or missing references)
//IL_0198: Unknown result type (might be due to invalid IL or missing references)
//IL_019d: Unknown result type (might be due to invalid IL or missing references)
//IL_01a3: Expected O, but got Unknown
CardThemeLib.instance.CreateOrGetType("DarknessBlack", new CardThemeColor
{
bgColor = new Color(0.1978f, 0.1088f, 0.1321f),
targetColor = new Color(0.0978f, 0.1088f, 0.1321f)
});
CardThemeLib.instance.CreateOrGetType("RootCake", new CardThemeColor
{
bgColor = new Color(0.7134047f, 0f, 1f, 44f / 85f),
targetColor = new Color(0.2971698f, 0.6546086f, 1f)
});
CardThemeLib.instance.CreateOrGetType("Abnormality", new CardThemeColor
{
bgColor = new Color(0.212f, 0.031f, 0.031f),
targetColor = new Color(0.933f, 0.949f, 0.612f)
});
CardThemeLib.instance.CreateOrGetType("Inscryption", new CardThemeColor
{
bgColor = new Color(0.51f, 0.455f, 0.333f),
targetColor = new Color(0.641f, 0.222f, 0.143f)
});
plugins = (List<BaseUnityPlugin>)typeof(Chainloader).GetField("_plugins", (BindingFlags)40).GetValue((object)null);
if (plugins.Exists((Predicate<BaseUnityPlugin>)((BaseUnityPlugin plugin) => plugin.Info.Metadata.GUID == "com.willuwontu.rounds.tabinfo")))
{
TabInfoRegesterer.Setup();
}
object obj = <>c.<>9__11_1;
if (obj == null)
{
UnityAction val = delegate
{
};
<>c.<>9__11_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_0230: Unknown result type (might be due to invalid IL or missing references)
//IL_023a: Expected O, but got Unknown
//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
//IL_02f5: Expected O, but got Unknown
//IL_037b: Unknown result type (might be due to invalid IL or missing references)
//IL_0385: Expected O, but got Unknown
RootCardInfo[] cardsToRegester = list.CardsToRegester;
for (int i = 0; i < cardsToRegester.Length; i++)
{
<>c__DisplayClass12_0 <>c__DisplayClass12_ = new <>c__DisplayClass12_0();
<>c__DisplayClass12_.card = cardsToRegester[i];
<>c__DisplayClass12_1 CS$<>8__locals0 = new <>c__DisplayClass12_1();
CS$<>8__locals0.CS$<>8__locals1 = <>c__DisplayClass12_;
if ((Object)(object)CS$<>8__locals0.CS$<>8__locals1.card == (Object)null || !CS$<>8__locals0.CS$<>8__locals1.card.Build)
{
continue;
}
((Object)CS$<>8__locals0.CS$<>8__locals1.card).name = String.Concat((string[])(object)new String[6]
{
"Root-Card ",
CS$<>8__locals0.CS$<>8__locals1.card.Key,
" (",
CS$<>8__locals0.CS$<>8__locals1.card.Tag,
")",
betaOverwriteDoNotUse ? " BETA" : ""
});
if (betaOverwriteDoNotUse && CardList.ModCards.ContainsKey(CS$<>8__locals0.CS$<>8__locals1.card.Key))
{
CardManager.cards.Remove(((Object)CardList.ModCards[CS$<>8__locals0.CS$<>8__locals1.card.Key]).name);
Cards.instance.hiddenCards.Remove((CardInfo)(object)CardList.ModCards[CS$<>8__locals0.CS$<>8__locals1.card.Key]);
CardList.ModCards.Remove(CS$<>8__locals0.CS$<>8__locals1.card.Key);
}
CardList.ModCards.Add(CS$<>8__locals0.CS$<>8__locals1.card.Key, CS$<>8__locals0.CS$<>8__locals1.card);
PhotonNetwork.PrefabPool.RegisterPrefab(((Object)CS$<>8__locals0.CS$<>8__locals1.card).name, ((Component)CS$<>8__locals0.CS$<>8__locals1.card).gameObject);
if (CS$<>8__locals0.CS$<>8__locals1.card.Hidden)
{
Cards.instance.AddHiddenCard((CardInfo)(object)CS$<>8__locals0.CS$<>8__locals1.card);
CustomCardCategories.instance.UpdateAndPullCategoriesFromCard((CardInfo)(object)CS$<>8__locals0.CS$<>8__locals1.card);
}
else if (CS$<>8__locals0.CS$<>8__locals1.card.Restricted)
{
Cards.instance.AddHiddenCard((CardInfo)(object)CS$<>8__locals0.CS$<>8__locals1.card);
CustomCardCategories.instance.UpdateAndPullCategoriesFromCard((CardInfo)(object)CS$<>8__locals0.CS$<>8__locals1.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.CS$<>8__locals1.card);
});
}
else if (CS$<>8__locals0.CS$<>8__locals1.card.Tag == "Root")
{
CardManager.cards.Add(((Object)CS$<>8__locals0.CS$<>8__locals1.card).name, new Card(String.Concat(CS$<>8__locals0.CS$<>8__locals1.card.Tag, " (", ((Object)list).name, ")"), Unbound.config.Bind<bool>(String.Concat("Cards: ", CS$<>8__locals0.CS$<>8__locals1.card.Tag), ((Object)CS$<>8__locals0.CS$<>8__locals1.card).name, !CS$<>8__locals0.CS$<>8__locals1.card.StartDisabled, (ConfigDescription)null), (CardInfo)(object)CS$<>8__locals0.CS$<>8__locals1.card));
}
else
{
CardManager.cards.Add(((Object)CS$<>8__locals0.CS$<>8__locals1.card).name, new Card(CS$<>8__locals0.CS$<>8__locals1.card.Tag ?? "", Unbound.config.Bind<bool>(String.Concat("Cards: ", CS$<>8__locals0.CS$<>8__locals1.card.Tag), ((Object)CS$<>8__locals0.CS$<>8__locals1.card).name, !CS$<>8__locals0.CS$<>8__locals1.card.StartDisabled, (ConfigDescription)null), (CardInfo)(object)CS$<>8__locals0.CS$<>8__locals1.card));
}
if (Enumerable.Contains<CardCategory>((IEnumerable<CardCategory>)(object)((CardInfo)CS$<>8__locals0.CS$<>8__locals1.card).categories, CustomCardCategories.instance.CardCategory("SkipReroleCard")))
{
WillInterface.cardsSkippedForRerolls(CS$<>8__locals0.CS$<>8__locals1.card);
}
CS$<>8__locals0.CS$<>8__locals1.card.Setup();
CS$<>8__locals0.condition = ((Component)CS$<>8__locals0.CS$<>8__locals1.card).GetComponent<CardCondition>();
if (CS$<>8__locals0.condition != null)
{
Cards.instance.AddCardValidationFunction((Func<Player, CardInfo, bool>)((Player player, CardInfo cardinfo) => (Object)(object)cardinfo != (Object)(object)CS$<>8__locals0.CS$<>8__locals1.card || CS$<>8__locals0.condition.IsPlayerAllowedCard(player)));
}
}
}
private void NewGUI(GameObject menu)
{
//IL_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)
{
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));
}
});
yield break;
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
internal IEnumerator PointStart(IGameModeHandler gm)
{
PlayerManager.instance.players.ForEach((Action<Player>)delegate(Player player)
{
CharacterData data = player.data;
data.maxHealth += player.GetRootData().flatHPboost;
player.GetRootData().tempflatHPboost = player.GetRootData().flatHPboost;
});
yield break;
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
internal IEnumerator PointEnd(IGameModeHandler gm)
{
PlayerManager.instance.players.ForEach((Action<Player>)delegate(Player player)
{
CharacterData data = player.data;
data.maxHealth -= player.GetRootData().tempflatHPboost;
});
yield break;
}
[UnboundRPC]
private static void SetSteamID(int playerID, string steamID)
{
<>c__DisplayClass17_0 CS$<>8__locals0 = new <>c__DisplayClass17_0();
CS$<>8__locals0.playerID = playerID;
Debug(String.Format("Player{0}'s SteamID is {1}", (object)CS$<>8__locals0.playerID, (object)steamID));
Player val = PlayerManager.instance.players.Find((Predicate<Player>)((Player p) => p.playerID == CS$<>8__locals0.playerID));
if (val != null)
{
val.GetRootData().SteamID = steamID;
}
}
public static void AddCardRquirement(CardInfo card, Func<Player, bool> func)
{
<>c__DisplayClass18_0 CS$<>8__locals0 = new <>c__DisplayClass18_0();
CS$<>8__locals0.card = card;
CS$<>8__locals0.func = func;
Cards.instance.AddCardValidationFunction((Func<Player, CardInfo, bool>)((Player p, CardInfo c) => (Object)(object)c == (Object)(object)CS$<>8__locals0.card && CS$<>8__locals0.func.Invoke(p)));
}
public static void Debug(object message)
{
if (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 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
}
[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 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_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Expected O, but got Unknown
CardInfoExtension.GetAdditionalData(((Component)this).GetComponent<CardInfo>()).canBeReassigned = Reassign;
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);
}));
base.sourceCard = (CardInfo)(((object)AlternetSource) ?? ((object)this));
}
public void Start()
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Expected O, but got Unknown
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_0118: Expected O, but got Unknown
//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)AlternetSource != (Object)null)
{
base.sourceCard = AlternetSource;
}
if (Core.Credits)
{
GameObject val = new GameObject("ModNameText");
RectTransform[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<RectTransform>();
RectTransform val2 = Enumerable.FirstOrDefault<RectTransform>((IEnumerable<RectTransform>)(object)componentsInChildren, (Func<RectTransform, bool>)((RectTransform obj) => ((Object)((Component)obj).gameObject).name == "EdgePart (1)"));
if ((Object)(object)val2 != (Object)null)
{
GameObject gameObject = ((Component)val2).gameObject;
val.gameObject.transform.SetParent(gameObject.transform);
}
TextMeshProUGUI val3 = val.gameObject.AddComponent<TextMeshProUGUI>();
((TMP_Text)val3).text = Tag;
val.transform.localEulerAngles = new Vector3(0f, 0f, 135f);
val.transform.localScale = Vector3.one;
val.transform.localPosition = new Vector3(-50f, -50f, 0f);
((TMP_Text)val3).alignment = (TextAlignmentOptions)1026;
((TMP_Text)val3).alpha = 0.1f;
((TMP_Text)val3).fontSize = 60f;
val = new GameObject("AuthorNameText");
val2 = Enumerable.FirstOrDefault<RectTransform>((IEnumerable<RectTransform>)(object)componentsInChildren, (Func<RectTransform, bool>)((RectTransform obj) => ((Object)((Component)obj).gameObject).name == "EdgePart (2)"));
if ((Object)(object)val2 != (Object)null)
{
GameObject gameObject2 = ((Component)val2).gameObject;
val.gameObject.transform.SetParent(gameObject2.transform);
}
val3 = val.gameObject.AddComponent<TextMeshProUGUI>();
((TMP_Text)val3).text = String.Concat("Card Idea By:\n", Author);
((TMP_Text)val3).autoSizeTextContainer = true;
val.transform.localEulerAngles = new Vector3(0f, 0f, 135f);
val.transform.localScale = Vector3.one;
val.transform.localPosition = new Vector3(-75f, -75f, 0f);
((TMP_Text)val3).alignment = (TextAlignmentOptions)1026;
((TMP_Text)val3).alpha = 0.1f;
((TMP_Text)val3).fontSize = 54f;
}
}
}
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_02de: Unknown result type (might be due to invalid IL or missing references)
//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
//IL_0406: Unknown result type (might be due to invalid IL or missing references)
//IL_040b: Unknown result type (might be due to invalid IL or missing references)
//IL_03ad: Unknown result type (might be due to invalid IL or missing references)
//IL_0491: Unknown result type (might be due to invalid IL or missing references)
//IL_0496: Unknown result type (might be due to invalid IL or missing references)
//IL_051f: Unknown result type (might be due to invalid IL or missing references)
//IL_0524: Unknown result type (might be due to invalid IL or missing references)
//IL_043f: Unknown result type (might be due to invalid IL or missing references)
//IL_044b: Unknown result type (might be due to invalid IL or missing references)
//IL_04ca: Unknown result type (might be due to invalid IL or missing references)
//IL_04d6: Unknown result type (might be due to invalid IL or missing references)
//IL_0567: Unknown result type (might be due to invalid IL or missing references)
//IL_0573: 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.Contains("Genie"))
{
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)
{
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__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 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 Postfix(string message, int playerViewID)
{
Core.Debug(String.Concat(message, " ", ((Int32)(ref playerViewID)).ToString()));
Player playerWithViewID = GetPlayerWithViewID(playerViewID, PlayerManager.instance.players);
Core.Debug(playerWithViewID);
if (!((Object)(object)playerWithViewID != (Object)null) || playerWithViewID.GetRootData().freeCards <= 0 || GameManager.instance.battleOngoing)
{
return;
}
CardInfo[] cards = CardChoice.instance.cards;
int num = -1;
float num2 = 0f;
for (int i = 0; i < cards.Length; i++)
{
string text = ((Component)cards[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)
{
playerWithViewID.GiveCard(cards[num]);
playerWithViewID.GetRootData().freeCards--;
}
}
internal static Player GetPlayerWithViewID(int viewID, List<Player> players)
{
for (int i = 0; i < players.Count; i++)
{
if (players[i].data.view.ViewID == viewID)
{
return players[i];
}
}
return null;
}
}
[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;
}
}
[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_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_00da: Unknown result type (might be due to invalid IL or missing references)
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: Expected O, but got Unknown
//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_018f: Unknown result type (might be due to invalid IL or missing references)
//IL_0194: Unknown result type (might be due to invalid IL or missing references)
//IL_0197: Expected O, but got Unknown
//IL_019c: Expected O, but got Unknown
//IL_0201: 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.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
{
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
{
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 = new Color(0.6f, 0.5f, 0.8f);
((TMP_Text)obj2).text = " \r\n Welcome to Root Cards,\r\n this is a modular mod created by Lilith and Tessy.\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 List<Transform> rootCatagorys;
public UnityAction <>9__4;
internal void <Postfix>b__1()
{
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()
{
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_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_00da: Unknown result type (might be due to invalid IL or missing references)
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: Expected O, but got Unknown
//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_018f: Unknown result type (might be due to invalid IL or missing references)
//IL_0194: Unknown result type (might be due to invalid IL or missing references)
//IL_0197: Expected O, but got Unknown
//IL_019c: Expected O, but got Unknown
//IL_0201: 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.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>)rootCatagorys.Contains);
((UnityEvent)((Component)val5).GetComponent<Button>().onClick).AddListener((UnityAction)delegate
{
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 = val2.GetEnumerator();
try
{
while (enumerator3.MoveNext())
{
ButtonClickedEvent onClick = ((Component)enumerator3.Current).GetComponent<Button>().onClick;
UnityAction obj2 = CS$<>8__locals0.<>9__4;
if (obj2 == null)
{
UnityAction val6 = delegate
{
CS$<>8__locals0.rootCatagorys.ForEach((Action<Transform>)delegate(Transform catagory)
{
((Component)catagory).gameObject.SetActive(false);
});
};
UnityAction val7 = val6;
CS$<>8__locals0.<>9__4 = val6;
obj2 = val7;
}
((UnityEvent)onClick).AddListener(obj2);
}
}
finally
{
((IDisposable)enumerator3).Dispose();
}
((Component)((Component)val5).GetComponentInChildren<Toggle>()).gameObject.SetActive(false);
TextMeshProUGUI obj3 = ((Component)ToggleCardsMenuHandler.scrollViews["Root"].Find("Viewport/Content")).gameObject.AddComponent<TextMeshProUGUI>();
((Graphic)obj3).color = new Color(0.6f, 0.5f, 0.8f);
((TMP_Text)obj3).text = " \r\n Welcome to Root Cards,\r\n this is a modular mod created by Lilith and Tessy.\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)obj3).fontSize = 20f;
};
<>c.<>9__0_0 = val;
obj = (object)val;
}
ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)instance, 0.75f, (Action)obj);
}
}
}
namespace RootCore.CardConditions
{
public abstract class CardCondition : MonoBehaviour
{
[HideInInspector]
public CardInfo cardInfo => ((Component)this).GetComponent<CardInfo>();
public abstract bool IsPlayerAllowedCard(Player player);
}
public class HasTeammatesCondition : CardCondition
{
[CompilerGenerated]
private sealed class <>c__DisplayClass0_0 : Object
{
public Player player;
internal bool <IsPlayerAllowedCard>b__0(Player p)
{
if (p.teamID == player.teamID)
{
return p.playerID != player.playerID;
}
return false;
}
}
public override bool IsPlayerAllowedCard(Player player)
{
<>c__DisplayClass0_0 CS$<>8__locals0 = new <>c__DisplayClass0_0();
CS$<>8__locals0.player = player;
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));
}
}
public class MinTeamCountCondition : CardCondition
{
public int Count;
public override bool IsPlayerAllowedCard(Player player)
{
return Enumerable.Count<int>(Enumerable.Distinct<int>(Enumerable.Select<Player, int>((IEnumerable<Player>)(object)PlayerManager.instance.players, (Func<Player, int>)((Player p) => p.teamID)))) >= Count;
}
}
public class NeedsRegenCondition : CardCondition
{
public int minRegen;
public override bool IsPlayerAllowedCard(Player player)
{
return player.data.healthHandler.regeneration >= (float)minRegen;
}
}
public class UniqueToTeamCondition : CardCondition
{
[CompilerGenerated]
private sealed class <>c__DisplayClass0_0 : Object
{
public Player player;
public UniqueToTeamCondition <>4__this;
internal bool <IsPlayerAllowedCard>b__0(Player p)
{
if (p.teamID == player.teamID)
{
return p.HasCard(<>4__this.cardInfo);
}
return false;
}
}
public override bool IsPlayerAllowedCard(Player player)
{
<>c__DisplayClass0_0 CS$<>8__locals0 = new <>c__DisplayClass0_0();
CS$<>8__locals0.player = player;
CS$<>8__locals0.<>4__this = this;
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.<>4__this.cardInfo)));
}
}
}
namespace RootCore.ArtStuffs
{
public class CardStatVarHandler : MonoBehaviour
{
[CompilerGenerated]
private sealed class <>c__DisplayClass1_0 : Object
{
public string key;
public CardStatVarHandler <>4__this;
internal void <Start>b__0(TextMeshProUGUI text)
{
if (((TMP_Text)text).text.Contains(String.Concat("%", key, "%")))
{
((TMP_Text)text).text = ((TMP_Text)text).text.Replace(String.Concat("%", key, "%"), VarMap[key].Invoke(((Component)<>4__this).gameObject));
}
}
}
public static Dictionary<string, Func<GameObject, string>> VarMap = new Dictionary<string, Func<GameObject, string>>();
public 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)
Enumerator<string, Func<GameObject, string>> enumerator = VarMap.Keys.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
<>c__DisplayClass1_0 CS$<>8__locals0 = new <>c__DisplayClass1_0();
CS$<>8__locals0.<>4__this = this;
CS$<>8__locals0.key = enumerator.Current;
Enumerable.ToList<TextMeshProUGUI>((IEnumerable<TextMeshProUGUI>)(object)((Component)this).gameObject.GetComponentsInChildren<TextMeshProUGUI>()).ForEach((Action<TextMeshProUGUI>)delegate(TextMeshProUGUI text)
{
if (((TMP_Text)text).text.Contains(String.Concat("%", CS$<>8__locals0.key, "%")))
{
((TMP_Text)text).text = ((TMP_Text)text).text.Replace(String.Concat("%", CS$<>8__locals0.key, "%"), VarMap[CS$<>8__locals0.key].Invoke(((Component)CS$<>8__locals0.<>4__this).gameObject));
}
});
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
}
public class CardTypeGraber : MonoBehaviour
{
public static Dictionary<CardCategory, string> map;
private void Awake()
{
if (map == null)
{
Dictionary<CardCategory, string> obj = new Dictionary<CardCategory, string>();
obj.Add(CurseManager.instance.curseCategory, "Curse");
obj.Add(CustomCardCategories.instance.CardCategory("ProjectileAugment"), "Projectile Augment");
obj.Add(CustomCardCategories.instance.CardCategory("GivesNulls"), "Distillery");
map = obj;
}
}
private void Start()
{
TextMeshProUGUI component = ((Component)this).GetComponent<TextMeshProUGUI>();
CardInfo componentInParent = ((Component)this).GetComponentInParent<CardInfo>();
if (componentInParent != null && Enumerable.Any<CardCategory>(Enumerable.Intersect<CardCategory>((IEnumerable<CardCategory>)(object)componentInParent.categories, (IEnumerable<CardCategory>)(object)map.Keys)))
{
((TMP_Text)component).text = map[Enumerable.First<CardCategory>((IEnumerable<CardCategory>)(object)componentInParent.categories, (Func<CardCategory, bool>)((CardCategory c) => Enumerable.Contains<CardCategory>((IEnumerable<CardCategory>)(object)map.Keys, c)))];
}
else
{
((TMP_Text)component).text = "";
}
}
}
}