Decompiled source of CardDataLib v1.0.1
CardDataLib.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using CardDataLib.CardData; using CardDataLib.CardData.Buffs; using CardDataLib.CardData.Buildings; using CardDataLib.CardData.DOT; using CardDataLib.CardData.Monsters; using CardDataLib.CardData.Towers; using CardDataLib.Corrections; using CardsShared; using HarmonyLib; using Microsoft.Win32; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("CardDataLib")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+92cb8e781c2b7299aa8e8fe6980996fe51a3226e")] [assembly: AssemblyProduct("CardDataLib")] [assembly: AssemblyTitle("CardDataLib")] [assembly: AssemblyVersion("1.0.0.0")] namespace CardDataLib { public static class CardDataLibAPI { private static readonly Dictionary<string, Sprite> _spriteCache = new Dictionary<string, Sprite>(); private static Sprite FindSpriteByName(string spriteName) { if (_spriteCache.TryGetValue(spriteName, out var value)) { return value; } Sprite[] array = Resources.FindObjectsOfTypeAll<Sprite>(); foreach (Sprite val in array) { if (((Object)val).name == spriteName) { _spriteCache[spriteName] = val; return val; } } return null; } public static void AttachSpritesToCards() { HashSet<string> hashSet = new HashSet<string>(); foreach (CardDisplayData allCard in Plugin.CardDisplayDataCollection.AllCards) { Sprite val = FindSpriteByName(allCard.SpriteName); if ((Object)(object)val != (Object)null) { allCard.Sprite = val; } else if (!string.IsNullOrWhiteSpace(allCard.SpriteName)) { hashSet.Add(allCard.SpriteName); } } if (hashSet.Count > 0) { if (hashSet.Count == 1) { Plugin.Log.LogInfo((object)("The sprite " + hashSet.First() + " was not found in the current scene.")); } else { Plugin.Log.LogInfo((object)("The sprites " + string.Join(", ", hashSet) + " were not found in the current scene.")); } } } public static void LoadAllCards() { if (Plugin.CardDisplayDataCollection.AllCards.Count == 0) { CardsRegisterManager.RegisterAllCards(); } Plugin.Log.LogInfo((object)$"Loaded {Plugin.CardDisplayDataCollection.AllCards.Count} cards."); } public static List<CardDisplayData> GetAllCards() { return Plugin.CardDisplayDataCollection.AllCards.ToList(); } public static List<CardDisplayData> FilterCards(Category? category = null, Subcategory? subcategory = null, AcquisitionType? acquisitionType = null, bool? unlocked = null) { return Plugin.CardDisplayDataCollection.AllCards.Where((CardDisplayData card) => (!category.HasValue || card.Category == category.Value) && (!subcategory.HasValue || (Subcategory?)card.Subcategory == subcategory) && (!acquisitionType.HasValue || (card.AcquisitionType & acquisitionType.Value) != 0) && (!unlocked.HasValue || card.Unlocked == unlocked.Value)).ToList(); } public static CardDisplayData GetCard(string cardUnlockName = null, string cardTitle = null) { if (string.IsNullOrEmpty(cardTitle) && string.IsNullOrEmpty(cardUnlockName)) { Plugin.Log.LogWarning((object)"GetCard called without cardTitle or cardUnlockName."); return null; } return ((IEnumerable<CardDisplayData>)Plugin.CardDisplayDataCollection.AllCards).FirstOrDefault((Func<CardDisplayData, bool>)((CardDisplayData card) => (cardUnlockName != null && card.UnlockName == cardUnlockName) || (cardTitle != null && card.Title == cardTitle))); } public static void SyncCardUnlockedStatus() { SyncCardUnclocked.SyncCardUnlockedStatus(); } } [BepInPlugin("AgusBut.CardDataLib", "CardDataLib", "1.0.1")] public class Plugin : BaseUnityPlugin { public static class CardDisplayDataCollection { public static List<CardDisplayData> AllCards { get; } = new List<CardDisplayData>(); } public static Plugin Instance { get; private set; } public static ManualLogSource Log { get; private set; } public static event Action OnCardSyncComplete; internal static void RaiseOnCardSyncComplete() { Plugin.OnCardSyncComplete?.Invoke(); } private void Awake() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown Instance = this; Log = ((BaseUnityPlugin)this).Logger; Harmony val = new Harmony("AgusBut.CardDataLib"); val.PatchAll(); CardDataLibAPI.LoadAllCards(); SceneManager.activeSceneChanged += OnActiveSceneChanged; ((BaseUnityPlugin)this).Logger.LogInfo((object)"CardDataLib loaded successfully."); } private void OnActiveSceneChanged(Scene oldScene, Scene newScene) { if (((Scene)(ref newScene)).name == "MainMenu") { CardDataLibAPI.AttachSpritesToCards(); ((MonoBehaviour)Instance).StartCoroutine(WaitThenCorrectMainMenuCards()); } if (((Scene)(ref newScene)).name == "GameScene") { CardsInSceneCorrector cardsInSceneCorrector = new CardsInSceneCorrector(); cardsInSceneCorrector.CorrectGameSceneCards(); CardDataLibAPI.AttachSpritesToCards(); RaiseOnCardSyncComplete(); } } private IEnumerator WaitThenCorrectMainMenuCards() { while ((Object)(object)GameObject.Find("Canvas/UpgradeMenu/SlidingScreen") == (Object)null) { yield return null; } CardsInSceneCorrector corrector = new CardsInSceneCorrector(); corrector.CorrectMainMenuCards(); UpgradeButtonFixer.FixAllButtons(); } } } namespace CardDataLib.Corrections { internal class CardsInSceneCorrector { private int researchBreakthroughCounter = 0; internal static readonly FieldInfo unlockNameField = AccessTools.Field(typeof(UpgradeCard), "unlockName"); private static readonly Dictionary<string, UpgradeCard> cardsMissingDependency = new Dictionary<string, UpgradeCard>(); private static readonly Dictionary<(string title, string unlockName), string> unlockNameCorrections = new Dictionary<(string, string), string> { { ("Round Shot I", "ObeliskArmor1"), "CannonArmor1" }, { ("Round Shot II", "ObeliskArmor2"), "CannonArmor2" }, { ("Round Shot III", "ObeliskArmor3"), "CannonArmor3" }, { ("Area of Effect III", "MortarBlast2"), "MortarBlast3" }, { ("Dark Night I", "ParticleCannonHealth1"), "VampireLairHealth1" }, { ("Dark Night II", "ParticleCannonHealth2"), "VampireLairHealth2" }, { ("Dark Night III", "ParticleCannonHealth3"), "VampireLairHealth3" }, { ("Gothic Horror", "ParticleCannonDamage1"), "VampireLairDamage1" }, { ("Feast II", "ParticleCannonBleed2"), "VampireLairBleed2" }, { ("Slow Cooker II", "BurnSpeed"), "BurnSpeed1" }, { ("Seance I", "HauntedHouse"), "Seance1" }, { ("Seance II", "HauntedHouse"), "Seance2" }, { ("Seance III", "HauntedHouse"), "Seance3" }, { ("Savings Account I", "ManaBank"), "Savings1" }, { ("Savings Account II", "ManaBank"), "Savings2" }, { ("Building - Mana Siphon", ""), "ManaSiphon" }, { ("Gold Rush!", "Mine"), "GoldRush" }, { ("Scholarships I", "University"), "Scholarships1" }, { ("Scholarships II", "University"), "Scholarships2" }, { ("Scholarships III", "University"), "Scholarships3" }, { ("Sorcery I", "ManaGen1"), "Sourcery1" }, { ("Sorcery II", "ManaGen2"), "Sourcery2" }, { ("Sorcery III", "ManaGen3"), "Sourcery3" }, { ("Life Steal I", "ManaGen1"), "LifeSteal1" }, { ("Life Steal II", "ManaGen2"), "LifeSteal2" }, { ("Life Steal III", "ManaGen3"), "LifeSteal3" }, { ("Fortification I", "TowerHealth1"), "Fortification1" }, { ("Fortification II", "TowerHealth4"), "Fortification2" }, { ("Fortification III", "TowerHealth7"), "Fortification3" }, { ("Fortification IV", "TowerHealth10"), "Fortification4" }, { ("Frugal I", ""), "Frugal1" }, { ("Frugal II", ""), "Frugal2" }, { ("Frugal III", ""), "Frugal3" }, { ("Frugal IV", ""), "Frugal4" }, { ("Frugal V", ""), "Frugal5" }, { ("Frugal VI", ""), "Frugal6" }, { ("Monster Armor I", ""), "MonsterArmor1" }, { ("Monster Armor II", ""), "MonsterArmor2" }, { ("Monster Armor III", ""), "MonsterArmor3" }, { ("Monster Armor IV", ""), "MonsterArmor4" }, { ("Monster Armor V", ""), "MonsterArmor5" }, { ("Monster Armor VI", ""), "MonsterArmor6" }, { ("Monster Armor VII", ""), "MonsterArmor7" }, { ("Monster Armor VIII", ""), "MonsterArmor8" }, { ("Monster Armor IX", ""), "MonsterArmor9" }, { ("Monster Armor X", ""), "MonsterArmor10" }, { ("Monster Armor XI", ""), "MonsterArmor11" }, { ("Monster Armor XII", ""), "MonsterArmor12" }, { ("Monster Armor XIII", ""), "MonsterArmor13" }, { ("Monster Armor XIV", ""), "MonsterArmor14" }, { ("Monster Armor XV", ""), "MonsterArmor15" }, { ("Monster Armor XVI", ""), "MonsterArmor16" }, { ("Monster Armor XVII", ""), "MonsterArmor17" }, { ("Monster Armor XVIII", ""), "MonsterArmor18" }, { ("Monster Armor XIX", ""), "MonsterArmor19" }, { ("Monster Armor XX", ""), "MonsterArmor20" }, { ("Destruction I", ""), "MonsterDestruction1" }, { ("Destruction II", ""), "MonsterDestruction2" }, { ("Destruction III", ""), "MonsterDestruction3" }, { ("Quickness I", ""), "MonsterQuickness1" }, { ("Quickness II", ""), "MonsterQuickness2" }, { ("Quickness III", ""), "MonsterQuickness3" }, { ("Quickness IV", ""), "MonsterQuickness4" }, { ("Monster Health I", ""), "MonsterHealth1" }, { ("Monster Health II", ""), "MonsterHealth2" }, { ("Monster Health III", ""), "MonsterHealth3" }, { ("Monster Health IV", ""), "MonsterHealth4" }, { ("Monster Health V", ""), "MonsterHealth5" }, { ("Monster Health VI", ""), "MonsterHealth6" }, { ("Monster Health VII", ""), "MonsterHealth7" }, { ("Monster Health VIII", ""), "MonsterHealth8" }, { ("Monster Health IX", ""), "MonsterHealth9" }, { ("Monster Health X", ""), "MonsterHealth10" }, { ("Monster Health XI", ""), "MonsterHealth11" }, { ("Monster Health XII", ""), "MonsterHealth12" }, { ("Monster Health XIII", ""), "MonsterHealth13" }, { ("Monster Health XIV", ""), "MonsterHealth14" }, { ("Monster Health XV", ""), "MonsterHealth15" }, { ("Monster Health XVI", ""), "MonsterHealth16" }, { ("Monster Health XVII", ""), "MonsterHealth17" }, { ("Monster Health XVIII", ""), "MonsterHealth18" }, { ("Monster Health XIX", ""), "MonsterHealth19" }, { ("Monster Health XX", ""), "MonsterHealth20" }, { ("Speed I", ""), "MonsterSpeed1" }, { ("Speed II", ""), "MonsterSpeed2" }, { ("Speed III", ""), "MonsterSpeed3" }, { ("Speed IV", ""), "MonsterSpeed4" }, { ("Speed V", ""), "MonsterSpeed5" }, { ("Speed VI", ""), "MonsterSpeed6" }, { ("Speed VII", ""), "MonsterSpeed7" }, { ("Speed VIII", ""), "MonsterSpeed8" }, { ("Speed IX", ""), "MonsterSpeed9" }, { ("Speed X", ""), "MonsterSpeed10" }, { ("Speed XI", ""), "MonsterSpeed11" }, { ("Speed XII", ""), "MonsterSpeed12" }, { ("Speed XIII", ""), "MonsterSpeed13" }, { ("Speed XIV", ""), "MonsterSpeed14" }, { ("Speed XV", ""), "MonsterSpeed15" }, { ("Perserverance I", ""), "MonsterPerserverance1" }, { ("Perserverance II", ""), "MonsterPerserverance2" }, { ("Perserverance III", ""), "MonsterPerserverance3" }, { ("Perserverance IV", ""), "MonsterPerserverance4" }, { ("Perserverance V", ""), "MonsterPerserverance5" }, { ("Perserverance VI", ""), "MonsterPerserverance6" }, { ("Monster Shields I", ""), "MonsterShields1" }, { ("Monster Shields II", ""), "MonsterShields2" }, { ("Monster Shields III", ""), "MonsterShields3" }, { ("Monster Shields IV", ""), "MonsterShields4" }, { ("Monster Shields V", ""), "MonsterShields5" }, { ("Monster Shields VI", ""), "MonsterShields6" }, { ("Monster Shields VII", ""), "MonsterShields7" }, { ("Monster Shields VIII", ""), "MonsterShields8" }, { ("Monster Shields IX", ""), "MonsterShields9" }, { ("Monster Shields X", ""), "MonsterShields10" }, { ("Monster Shields XI", ""), "MonsterShields11" }, { ("Monster Shields XII", ""), "MonsterShields12" }, { ("Monster Shields XIII", ""), "MonsterShields13" }, { ("Monster Shields XIV", ""), "MonsterShields14" }, { ("Monster Shields XV", ""), "MonsterShields15" }, { ("Monster Shields XVI", ""), "MonsterShields16" }, { ("Monster Shields XVII", ""), "MonsterShields17" }, { ("Monster Shields XVIII", ""), "MonsterShields18" }, { ("Monster Shields XIX", ""), "MonsterShields19" }, { ("Monster Shields XX", ""), "MonsterShields20" }, { ("Protection I", ""), "MonsterProtection1" }, { ("Protection II", ""), "MonsterProtection2" }, { ("Protection III", ""), "MonsterProtection3" }, { ("Protection IV", ""), "MonsterProtection4" }, { ("Protection V", ""), "MonsterProtection5" }, { ("Protection VI", ""), "MonsterProtection6" }, { ("Protection VII", ""), "MonsterProtection7" }, { ("Protection VIII", ""), "MonsterProtection8" }, { ("Tower - Tesla Coil", ""), "TeslaCoil" } }; private static readonly Dictionary<string, string> titleCorrections = new Dictionary<string, string> { { "Building - Mana Siphon", "Mana Siphon" }, { "Tower - Cannon", "Cannon" }, { "Tower - Encampment", "Encampment" }, { "Tower - Flame Thrower", "Flame Thrower" }, { "Tower - Frost Keep", "Frost Keep" }, { "Tower - Lookout", "Lookout" }, { "Tower - Monument", "Monument" }, { "Tower - Mortar", "Mortar" }, { "Tower - Obelisk", "Obelisk" }, { "Tower - Particle Cannon", "Particle Cannon" }, { "Tower - Poison Sprayer", "Poison Sprayer" }, { "Tower - Radar", "Radar" }, { "Tower - Shredder", "Shredder" }, { "Tower - Tesla Coil", "Tesla Coil" }, { "Tower - Vampire Lair", "Vampire Lair" }, { "Building - Haunted House", "Haunted House" }, { "Building - Mana Bank", "Mana Bank" }, { "Building - Mine", "Mine" }, { "Building - University", "University" }, { "Ricochet ", "Ricochet" }, { "Quality over Quantity", "Quality over Quantity I" }, { "Pyrochemistry I", "Fuel Saturation I" }, { "Pyrochemistry II", "Fuel Saturation II" }, { "Pyrochemistry III", "Fuel Saturation III" }, { "Pyrochemistry IV", "Fuel Saturation IV" }, { "Immolation", "Pyrochemistry" }, { "Fumes I", "Fumigation I" }, { "Fumes II", "Fumigation II" }, { "Fumes III", "Fumigation III" } }; internal void CorrectGameSceneCards() { UpgradeCard[] array = Object.FindObjectsOfType<UpgradeCard>(); if (array == null || array.Length == 0) { Plugin.Log.LogWarning((object)"No UpgradeCard objects found in the scene."); return; } researchBreakthroughCounter = 0; UpgradeCard[] array2 = array; foreach (UpgradeCard val in array2) { try { CorrectGameSceneCard(val); } catch (Exception arg) { Plugin.Log.LogError((object)$"Exception while processing card '{((val != null) ? ((Object)val).name : null)}': {arg}"); } } AttachMissingDependencies(); SyncCardUnclocked.SyncCardUnlockedStatus(); } private void CorrectGameSceneCard(UpgradeCard card) { if (!string.IsNullOrEmpty(card.description) && card.description.EndsWith(".")) { card.description = card.description.Substring(0, card.description.Length - 1); } string text = ((string)unlockNameField.GetValue(card)) ?? ""; if (card.title == "Research Breakthrough!" && text == "University") { researchBreakthroughCounter++; string text2 = null; if (researchBreakthroughCounter == 1) { text2 = "Research1"; } else if (researchBreakthroughCounter == 2) { text2 = "Research2"; } else if (researchBreakthroughCounter == 3) { text2 = "Research3"; } if (text2 != null) { unlockNameField.SetValue(card, text2); } else { Plugin.Log.LogWarning((object)"Extra Research Breakthrough! card found beyond 3 instances."); } return; } if (unlockNameCorrections.TryGetValue((card.title, text), out var value)) { unlockNameField.SetValue(card, value); } if (titleCorrections.TryGetValue(card.title, out var value2)) { card.title = value2; } switch (text) { case "GlobalCritLevel2": case "Frugal6": case "MonsterDestruction2": case "MonsterDestruction3": if (!cardsMissingDependency.ContainsKey(text)) { cardsMissingDependency.Add(text, card); } break; } } private void AttachDependency(string parentUnlockName, string childUnlockName) { UpgradeCard[] array = Object.FindObjectsOfType<UpgradeCard>(); foreach (UpgradeCard val in array) { if ((string)unlockNameField.GetValue(val) == parentUnlockName && cardsMissingDependency.TryGetValue(childUnlockName, out var value)) { if (val.unlocks == null) { val.unlocks = new List<UpgradeCard>(); } if (!val.unlocks.Contains(value)) { val.unlocks.Add(value); } } } } private void AttachMissingDependencies() { AttachDependency("GlobalCritLevel1", "GlobalCritLevel2"); AttachDependency("Frugal5", "Frugal6"); AttachDependency("MonsterDestruction1", "MonsterDestruction2"); AttachDependency("MonsterDestruction2", "MonsterDestruction3"); } internal void CorrectMainMenuCards() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown GameObject obj = GameObject.Find("Canvas/UpgradeMenu/SlidingScreen/TeslaCoil"); Transform val = ((obj != null) ? obj.transform : null); if (!((Object)(object)val != (Object)null)) { return; } foreach (Transform item in val) { Transform val2 = item; if (!((Object)val2).name.Contains("HealthDamage1") || !((Object)val2).name.EndsWith("(2)")) { continue; } Transform val3 = val2.Find("Title"); if ((Object)(object)val3 != (Object)null) { Text component = ((Component)val3).GetComponent<Text>(); if ((Object)(object)component != (Object)null) { component.text = "Power Surge III"; } else { Plugin.Log.LogWarning((object)("Text component not found on " + ((Object)val2).name + "/Title")); } } } } } internal class SyncCardUnclocked { internal static void SyncCardUnlockedStatus() { SyncCardUnlockedFromRegistry(); UpgradeCard[] array = Object.FindObjectsOfType<UpgradeCard>(); if (array != null && array.Length != 0) { SyncCardUnlockedFromScene(); } } private static void SyncCardUnlockedFromScene() { UpgradeCard[] array = Object.FindObjectsOfType<UpgradeCard>(); foreach (UpgradeCard val in array) { string upgradeTitle = val.title; string upgradeUnlockName = (string)CardsInSceneCorrector.unlockNameField.GetValue(val); bool unlocked = val.unlocked; CardDisplayData val2 = ((IEnumerable<CardDisplayData>)Plugin.CardDisplayDataCollection.AllCards).FirstOrDefault((Func<CardDisplayData, bool>)((CardDisplayData c) => c.Title == upgradeTitle && c.UnlockName == upgradeUnlockName)); if (val2 != null) { val2.Unlocked = unlocked; } } } private static void SyncCardUnlockedFromRegistry() { using RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Software\\Die of Death Games\\Rogue Tower"); if (registryKey == null) { Plugin.Log.LogWarning((object)"Registry path not found: Software\\Die of Death Games\\Rogue Tower"); return; } string[] valueNames = registryKey.GetValueNames(); foreach (CardDisplayData card in Plugin.CardDisplayDataCollection.AllCards) { if (string.IsNullOrEmpty(card.UnlockName)) { continue; } string text = valueNames.FirstOrDefault((string name) => name.Contains("_h") && name.Split(new string[1] { "_h" }, 2, StringSplitOptions.None)[0] == card.UnlockName); if (text != null) { if (registryKey.GetValue(text) is int num && num == 1) { card.Unlocked = true; } else { card.Unlocked = false; } } } } } internal static class UnlockNameCorrector { internal static bool TryCorrect(UpgradeButton button, out string corrected) { corrected = null; Transform transform = ((Component)button).transform; Transform val = ((transform != null) ? transform.parent : null); string text = ((transform != null) ? ((Object)transform).name : null); string text2 = ((val != null) ? ((Object)val).name : null); if (string.IsNullOrEmpty(text2) || string.IsNullOrEmpty(text)) { return false; } if ((text2 == "VampireLair" || text2 == "Monument" || text2 == "ParticleCannon") && text.StartsWith("ArmorDamage")) { int num = (text.EndsWith(" (2)") ? 3 : ((!text.EndsWith(" (1)")) ? 1 : 2)); corrected = $"{text2}Armor{num}"; return true; } return false; } } internal static class UpgradeButtonFixer { private static readonly FieldRef<UpgradeButton, string> unlockStringRef = AccessTools.FieldRefAccess<UpgradeButton, string>("unlockString"); internal static void FixAllButtons() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown GameObject val = GameObject.Find("Canvas/UpgradeMenu/SlidingScreen"); if ((Object)(object)val == (Object)null) { Plugin.Log.LogError((object)"❌ Could not find SlidingScreen."); return; } foreach (Transform item in val.transform) { Transform val2 = item; string name = ((Object)val2).name; if (name != "VampireLair" && name != "Monument" && name != "ParticleCannon") { continue; } foreach (Transform item2 in val2) { Transform val3 = item2; string name2 = ((Object)val3).name; UpgradeButton component = ((Component)val3).GetComponent<UpgradeButton>(); string corrected; if ((Object)(object)component == (Object)null) { Plugin.Log.LogError((object)("❌ No UpgradeButton on: " + val3.GetHierarchyPath())); } else if (UnlockNameCorrector.TryCorrect(component, out corrected)) { unlockStringRef.Invoke(component) = corrected; } } } } internal static string GetHierarchyPath(this Transform current) { string text = ((Object)current).name; while ((Object)(object)current.parent != (Object)null) { current = current.parent; text = ((Object)current).name + "/" + text; } return text; } } [HarmonyPatch(typeof(UpgradeButton), "Unlock")] internal class UpgradeButton_UnlockFix { private static readonly FieldRef<UpgradeButton, string> unlockStringRef = AccessTools.FieldRefAccess<UpgradeButton, string>("unlockString"); private static void Prefix(UpgradeButton __instance) { if (UnlockNameCorrector.TryCorrect(__instance, out var corrected)) { unlockStringRef.Invoke(__instance) = corrected; } } } } namespace CardDataLib.CardData { internal class CardsRegisterManager { internal static void RegisterAllCards() { DrawBuffCards.Register(); GoldBuffCards.Register(); ManaBuffCards.Register(); CritsBuffCards.Register(); TowerBuffCards.Register(); TreeBuffCards.Register(); ManaSiphonCards.Register(); MineCards.Register(); ManaBankCards.Register(); HauntedHouseCards.Register(); UniversityCards.Register(); DOTBleedCards.Register(); DOTBurnCards.Register(); DOTPoisonCards.Register(); MonstersHealthBuffCards.Register(); MonstersArmorBuffCards.Register(); MonstersShieldBuffCards.Register(); MonstersDamageBuffCards.Register(); MonstersMoveSpeedBuffCards.Register(); MonstersSlowDebuffCards.Register(); MonstersHasteBuffCards.Register(); MonstersGoldDebuffCards.Register(); MonstersTowerDamageBuffCards.Register(); BallistaCards.Register(); MortarCards.Register(); TeslaCoilCards.Register(); FrostKeepCards.Register(); FlameThrowerCards.Register(); PoisonSprayerCards.Register(); SawbladeCards.Register(); EncampmentCards.Register(); LookoutCards.Register(); VampireLairCards.Register(); CannonCards.Register(); MonumentCards.Register(); RadarCards.Register(); ObeliskCards.Register(); ParticleCannonCards.Register(); } } } namespace CardDataLib.CardData.Towers { public static class BallistaCards { internal static void Register() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_0114: 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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0214: 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_022a: 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_023c: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Expected O, but got Unknown //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Expected O, but got Unknown //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Expected O, but got Unknown //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Expected O, but got Unknown //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_0400: 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_0416: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0428: 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_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Expected O, but got Unknown //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04cd: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Expected O, but got Unknown //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0506: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_053d: Unknown result type (might be due to invalid IL or missing references) //IL_053f: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Expected O, but got Unknown //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Unknown result type (might be due to invalid IL or missing references) //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_05b1: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05c2: Expected O, but got Unknown //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Unknown result type (might be due to invalid IL or missing references) //IL_05df: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_060e: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Unknown result type (might be due to invalid IL or missing references) //IL_0615: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_061e: Unknown result type (might be due to invalid IL or missing references) //IL_0628: Expected O, but got Unknown //IL_062a: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_0645: Unknown result type (might be due to invalid IL or missing references) //IL_0650: Unknown result type (might be due to invalid IL or missing references) //IL_065b: Unknown result type (might be due to invalid IL or missing references) //IL_0662: Unknown result type (might be due to invalid IL or missing references) //IL_0679: Unknown result type (might be due to invalid IL or missing references) //IL_0680: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0687: Unknown result type (might be due to invalid IL or missing references) //IL_0689: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Expected O, but got Unknown //IL_069c: Unknown result type (might be due to invalid IL or missing references) //IL_06a1: Unknown result type (might be due to invalid IL or missing references) //IL_06ac: Unknown result type (might be due to invalid IL or missing references) //IL_06b7: Unknown result type (might be due to invalid IL or missing references) //IL_06c2: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_06d4: Unknown result type (might be due to invalid IL or missing references) //IL_06df: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06e8: Unknown result type (might be due to invalid IL or missing references) //IL_06ed: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_06f6: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Expected O, but got Unknown //IL_0702: Unknown result type (might be due to invalid IL or missing references) //IL_0707: Unknown result type (might be due to invalid IL or missing references) //IL_0712: Unknown result type (might be due to invalid IL or missing references) //IL_071d: Unknown result type (might be due to invalid IL or missing references) //IL_0728: Unknown result type (might be due to invalid IL or missing references) //IL_0733: Unknown result type (might be due to invalid IL or missing references) //IL_073a: Unknown result type (might be due to invalid IL or missing references) //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_0758: Unknown result type (might be due to invalid IL or missing references) //IL_075a: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0761: Unknown result type (might be due to invalid IL or missing references) //IL_0766: Unknown result type (might be due to invalid IL or missing references) //IL_0768: Unknown result type (might be due to invalid IL or missing references) //IL_0772: Expected O, but got Unknown //IL_0774: Unknown result type (might be due to invalid IL or missing references) //IL_0779: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_078f: Unknown result type (might be due to invalid IL or missing references) //IL_079a: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_07ac: Unknown result type (might be due to invalid IL or missing references) //IL_07c3: Unknown result type (might be due to invalid IL or missing references) //IL_07ca: Unknown result type (might be due to invalid IL or missing references) //IL_07cc: Unknown result type (might be due to invalid IL or missing references) //IL_07d1: Unknown result type (might be due to invalid IL or missing references) //IL_07d3: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07da: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Expected O, but got Unknown //IL_07e6: Unknown result type (might be due to invalid IL or missing references) //IL_07eb: Unknown result type (might be due to invalid IL or missing references) //IL_07f6: Unknown result type (might be due to invalid IL or missing references) //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_080c: Unknown result type (might be due to invalid IL or missing references) //IL_0817: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Unknown result type (might be due to invalid IL or missing references) //IL_0835: Unknown result type (might be due to invalid IL or missing references) //IL_083c: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_0845: Unknown result type (might be due to invalid IL or missing references) //IL_084a: Unknown result type (might be due to invalid IL or missing references) //IL_084c: Unknown result type (might be due to invalid IL or missing references) //IL_0856: Expected O, but got Unknown //IL_0858: Unknown result type (might be due to invalid IL or missing references) //IL_085d: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_0873: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0889: Unknown result type (might be due to invalid IL or missing references) //IL_0890: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ae: Unknown result type (might be due to invalid IL or missing references) //IL_08b0: Unknown result type (might be due to invalid IL or missing references) //IL_08b5: Unknown result type (might be due to invalid IL or missing references) //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08bc: Unknown result type (might be due to invalid IL or missing references) //IL_08be: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Expected O, but got Unknown //IL_08ca: Unknown result type (might be due to invalid IL or missing references) //IL_08cf: Unknown result type (might be due to invalid IL or missing references) //IL_08da: Unknown result type (might be due to invalid IL or missing references) //IL_08e5: Unknown result type (might be due to invalid IL or missing references) //IL_08f0: Unknown result type (might be due to invalid IL or missing references) //IL_08fb: Unknown result type (might be due to invalid IL or missing references) //IL_0902: Unknown result type (might be due to invalid IL or missing references) //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_0914: Unknown result type (might be due to invalid IL or missing references) //IL_0916: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_091d: Unknown result type (might be due to invalid IL or missing references) //IL_0922: Unknown result type (might be due to invalid IL or missing references) //IL_0924: Unknown result type (might be due to invalid IL or missing references) //IL_092e: Expected O, but got Unknown //IL_0930: Unknown result type (might be due to invalid IL or missing references) //IL_0935: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_094b: Unknown result type (might be due to invalid IL or missing references) //IL_0956: Unknown result type (might be due to invalid IL or missing references) //IL_0961: Unknown result type (might be due to invalid IL or missing references) //IL_0968: Unknown result type (might be due to invalid IL or missing references) //IL_097f: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_0988: Unknown result type (might be due to invalid IL or missing references) //IL_098d: Unknown result type (might be due to invalid IL or missing references) //IL_098f: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_0996: Unknown result type (might be due to invalid IL or missing references) //IL_09a0: Expected O, but got Unknown //IL_09a2: Unknown result type (might be due to invalid IL or missing references) //IL_09a7: Unknown result type (might be due to invalid IL or missing references) //IL_09b2: Unknown result type (might be due to invalid IL or missing references) //IL_09bd: Unknown result type (might be due to invalid IL or missing references) //IL_09c8: Unknown result type (might be due to invalid IL or missing references) //IL_09d3: Unknown result type (might be due to invalid IL or missing references) //IL_09da: Unknown result type (might be due to invalid IL or missing references) //IL_09f1: Unknown result type (might be due to invalid IL or missing references) //IL_09f8: Unknown result type (might be due to invalid IL or missing references) //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_09ff: Unknown result type (might be due to invalid IL or missing references) //IL_0a01: Unknown result type (might be due to invalid IL or missing references) //IL_0a06: Unknown result type (might be due to invalid IL or missing references) //IL_0a08: Unknown result type (might be due to invalid IL or missing references) //IL_0a12: Expected O, but got Unknown //IL_0a14: Unknown result type (might be due to invalid IL or missing references) //IL_0a19: Unknown result type (might be due to invalid IL or missing references) //IL_0a24: Unknown result type (might be due to invalid IL or missing references) //IL_0a2f: Unknown result type (might be due to invalid IL or missing references) //IL_0a3a: Unknown result type (might be due to invalid IL or missing references) //IL_0a45: Unknown result type (might be due to invalid IL or missing references) //IL_0a4c: Unknown result type (might be due to invalid IL or missing references) //IL_0a57: Unknown result type (might be due to invalid IL or missing references) //IL_0a5e: Unknown result type (might be due to invalid IL or missing references) //IL_0a60: Unknown result type (might be due to invalid IL or missing references) //IL_0a65: Unknown result type (might be due to invalid IL or missing references) //IL_0a67: Unknown result type (might be due to invalid IL or missing references) //IL_0a6c: Unknown result type (might be due to invalid IL or missing references) //IL_0a6e: Unknown result type (might be due to invalid IL or missing references) //IL_0a78: Expected O, but got Unknown //IL_0a7a: Unknown result type (might be due to invalid IL or missing references) //IL_0a7f: Unknown result type (might be due to invalid IL or missing references) //IL_0a8a: Unknown result type (might be due to invalid IL or missing references) //IL_0a95: Unknown result type (might be due to invalid IL or missing references) //IL_0aa0: Unknown result type (might be due to invalid IL or missing references) //IL_0aab: Unknown result type (might be due to invalid IL or missing references) //IL_0ab2: Unknown result type (might be due to invalid IL or missing references) //IL_0ac9: Unknown result type (might be due to invalid IL or missing references) //IL_0ad0: Unknown result type (might be due to invalid IL or missing references) //IL_0ad2: Unknown result type (might be due to invalid IL or missing references) //IL_0ad7: Unknown result type (might be due to invalid IL or missing references) //IL_0ad9: Unknown result type (might be due to invalid IL or missing references) //IL_0ade: Unknown result type (might be due to invalid IL or missing references) //IL_0ae0: Unknown result type (might be due to invalid IL or missing references) //IL_0aea: Expected O, but got Unknown //IL_0aec: Unknown result type (might be due to invalid IL or missing references) //IL_0af1: Unknown result type (might be due to invalid IL or missing references) //IL_0afc: Unknown result type (might be due to invalid IL or missing references) //IL_0b07: Unknown result type (might be due to invalid IL or missing references) //IL_0b12: Unknown result type (might be due to invalid IL or missing references) //IL_0b1d: Unknown result type (might be due to invalid IL or missing references) //IL_0b24: Unknown result type (might be due to invalid IL or missing references) //IL_0b3b: Unknown result type (might be due to invalid IL or missing references) //IL_0b42: Unknown result type (might be due to invalid IL or missing references) //IL_0b44: Unknown result type (might be due to invalid IL or missing references) //IL_0b49: Unknown result type (might be due to invalid IL or missing references) //IL_0b4b: Unknown result type (might be due to invalid IL or missing references) //IL_0b50: Unknown result type (might be due to invalid IL or missing references) //IL_0b52: Unknown result type (might be due to invalid IL or missing references) //IL_0b5c: Expected O, but got Unknown //IL_0b5e: Unknown result type (might be due to invalid IL or missing references) //IL_0b63: Unknown result type (might be due to invalid IL or missing references) //IL_0b6e: Unknown result type (might be due to invalid IL or missing references) //IL_0b79: Unknown result type (might be due to invalid IL or missing references) //IL_0b84: Unknown result type (might be due to invalid IL or missing references) //IL_0b8f: Unknown result type (might be due to invalid IL or missing references) //IL_0b96: Unknown result type (might be due to invalid IL or missing references) //IL_0ba1: Unknown result type (might be due to invalid IL or missing references) //IL_0ba8: Unknown result type (might be due to invalid IL or missing references) //IL_0baa: Unknown result type (might be due to invalid IL or missing references) //IL_0baf: Unknown result type (might be due to invalid IL or missing references) //IL_0bb1: Unknown result type (might be due to invalid IL or missing references) //IL_0bb6: Unknown result type (might be due to invalid IL or missing references) //IL_0bb8: Unknown result type (might be due to invalid IL or missing references) //IL_0bc2: Expected O, but got Unknown //IL_0bc4: Unknown result type (might be due to invalid IL or missing references) //IL_0bc9: Unknown result type (might be due to invalid IL or missing references) //IL_0bd4: Unknown result type (might be due to invalid IL or missing references) //IL_0bdf: Unknown result type (might be due to invalid IL or missing references) //IL_0bea: Unknown result type (might be due to invalid IL or missing references) //IL_0bf5: Unknown result type (might be due to invalid IL or missing references) //IL_0bfc: Unknown result type (might be due to invalid IL or missing references) //IL_0c13: Unknown result type (might be due to invalid IL or missing references) //IL_0c1a: Unknown result type (might be due to invalid IL or missing references) //IL_0c1c: Unknown result type (might be due to invalid IL or missing references) //IL_0c21: Unknown result type (might be due to invalid IL or missing references) //IL_0c23: Unknown result type (might be due to invalid IL or missing references) //IL_0c28: Unknown result type (might be due to invalid IL or missing references) //IL_0c2a: Unknown result type (might be due to invalid IL or missing references) //IL_0c34: Expected O, but got Unknown //IL_0c36: Unknown result type (might be due to invalid IL or missing references) //IL_0c3b: Unknown result type (might be due to invalid IL or missing references) //IL_0c46: Unknown result type (might be due to invalid IL or missing references) //IL_0c51: Unknown result type (might be due to invalid IL or missing references) //IL_0c5c: Unknown result type (might be due to invalid IL or missing references) //IL_0c67: Unknown result type (might be due to invalid IL or missing references) //IL_0c6e: Unknown result type (might be due to invalid IL or missing references) //IL_0c79: Unknown result type (might be due to invalid IL or missing references) //IL_0c80: Unknown result type (might be due to invalid IL or missing references) //IL_0c82: Unknown result type (might be due to invalid IL or missing references) //IL_0c87: Unknown result type (might be due to invalid IL or missing references) //IL_0c89: Unknown result type (might be due to invalid IL or missing references) //IL_0c8e: Unknown result type (might be due to invalid IL or missing references) //IL_0c90: Unknown result type (might be due to invalid IL or missing references) //IL_0c9a: Expected O, but got Unknown //IL_0c9c: Unknown result type (might be due to invalid IL or missing references) //IL_0ca1: Unknown result type (might be due to invalid IL or missing references) //IL_0cac: Unknown result type (might be due to invalid IL or missing references) //IL_0cb7: Unknown result type (might be due to invalid IL or missing references) //IL_0cc2: Unknown result type (might be due to invalid IL or missing references) //IL_0ccd: Unknown result type (might be due to invalid IL or missing references) //IL_0cd4: Unknown result type (might be due to invalid IL or missing references) //IL_0cdf: Unknown result type (might be due to invalid IL or missing references) //IL_0ce6: Unknown result type (might be due to invalid IL or missing references) //IL_0ce8: Unknown result type (might be due to invalid IL or missing references) //IL_0ced: Unknown result type (might be due to invalid IL or missing references) //IL_0cef: Unknown result type (might be due to invalid IL or missing references) //IL_0cf4: Unknown result type (might be due to invalid IL or missing references) //IL_0cf6: Unknown result type (might be due to invalid IL or missing references) //IL_0d00: Expected O, but got Unknown //IL_0d02: Unknown result type (might be due to invalid IL or missing references) //IL_0d07: Unknown result type (might be due to invalid IL or missing references) //IL_0d12: Unknown result type (might be due to invalid IL or missing references) //IL_0d1d: Unknown result type (might be due to invalid IL or missing references) //IL_0d28: Unknown result type (might be due to invalid IL or missing references) //IL_0d33: Unknown result type (might be due to invalid IL or missing references) //IL_0d3a: Unknown result type (might be due to invalid IL or missing references) //IL_0d45: Unknown result type (might be due to invalid IL or missing references) //IL_0d4c: Unknown result type (might be due to invalid IL or missing references) //IL_0d4e: Unknown result type (might be due to invalid IL or missing references) //IL_0d53: Unknown result type (might be due to invalid IL or missing references) //IL_0d55: Unknown result type (might be due to invalid IL or missing references) //IL_0d5a: Unknown result type (might be due to invalid IL or missing references) //IL_0d5c: Unknown result type (might be due to invalid IL or missing references) //IL_0d66: Expected O, but got Unknown //IL_0d68: Unknown result type (might be due to invalid IL or missing references) //IL_0d6d: Unknown result type (might be due to invalid IL or missing references) //IL_0d78: Unknown result type (might be due to invalid IL or missing references) //IL_0d83: Unknown result type (might be due to invalid IL or missing references) //IL_0d8e: Unknown result type (might be due to invalid IL or missing references) //IL_0d99: Unknown result type (might be due to invalid IL or missing references) //IL_0da0: Unknown result type (might be due to invalid IL or missing references) //IL_0dab: Unknown result type (might be due to invalid IL or missing references) //IL_0db2: Unknown result type (might be due to invalid IL or missing references) //IL_0db4: Unknown result type (might be due to invalid IL or missing references) //IL_0db9: Unknown result type (might be due to invalid IL or missing references) //IL_0dbb: Unknown result type (might be due to invalid IL or missing references) //IL_0dc0: Unknown result type (might be due to invalid IL or missing references) //IL_0dc2: Unknown result type (might be due to invalid IL or missing references) //IL_0dcc: Expected O, but got Unknown //IL_0dce: Unknown result type (might be due to invalid IL or missing references) //IL_0dd3: Unknown result type (might be due to invalid IL or missing references) //IL_0dde: Unknown result type (might be due to invalid IL or missing references) //IL_0de9: Unknown result type (might be due to invalid IL or missing references) //IL_0df4: Unknown result type (might be due to invalid IL or missing references) //IL_0dff: Unknown result type (might be due to invalid IL or missing references) //IL_0e06: Unknown result type (might be due to invalid IL or missing references) //IL_0e11: Unknown result type (might be due to invalid IL or missing references) //IL_0e18: Unknown result type (might be due to invalid IL or missing references) //IL_0e1a: Unknown result type (might be due to invalid IL or missing references) //IL_0e1f: Unknown result type (might be due to invalid IL or missing references) //IL_0e21: Unknown result type (might be due to invalid IL or missing references) //IL_0e26: Unknown result type (might be due to invalid IL or missing references) //IL_0e28: Unknown result type (might be due to invalid IL or missing references) //IL_0e32: Expected O, but got Unknown //IL_0e34: Unknown result type (might be due to invalid IL or missing references) //IL_0e39: Unknown result type (might be due to invalid IL or missing references) //IL_0e44: Unknown result type (might be due to invalid IL or missing references) //IL_0e4f: Unknown result type (might be due to invalid IL or missing references) //IL_0e5a: Unknown result type (might be due to invalid IL or missing references) //IL_0e65: Unknown result type (might be due to invalid IL or missing references) //IL_0e6c: Unknown result type (might be due to invalid IL or missing references) //IL_0e77: Unknown result type (might be due to invalid IL or missing references) //IL_0e7e: Unknown result type (might be due to invalid IL or missing references) //IL_0e80: Unknown result type (might be due to invalid IL or missing references) //IL_0e85: Unknown result type (might be due to invalid IL or missing references) //IL_0e87: Unknown result type (might be due to invalid IL or missing references) //IL_0e8c: Unknown result type (might be due to invalid IL or missing references) //IL_0e8e: Unknown result type (might be due to invalid IL or missing references) //IL_0e98: Expected O, but got Unknown //IL_0e9a: Unknown result type (might be due to invalid IL or missing references) //IL_0e9f: Unknown result type (might be due to invalid IL or missing references) //IL_0eaa: Unknown result type (might be due to invalid IL or missing references) //IL_0eb5: Unknown result type (might be due to invalid IL or missing references) //IL_0ec0: Unknown result type (might be due to invalid IL or missing references) //IL_0ecb: Unknown result type (might be due to invalid IL or missing references) //IL_0ed2: Unknown result type (might be due to invalid IL or missing references) //IL_0edd: Unknown result type (might be due to invalid IL or missing references) //IL_0ee4: Unknown result type (might be due to invalid IL or missing references) //IL_0ee6: Unknown result type (might be due to invalid IL or missing references) //IL_0eeb: Unknown result type (might be due to invalid IL or missing references) //IL_0eed: Unknown result type (might be due to invalid IL or missing references) //IL_0ef2: Unknown result type (might be due to invalid IL or missing references) //IL_0ef4: Unknown result type (might be due to invalid IL or missing references) //IL_0efe: Expected O, but got Unknown Plugin.CardDisplayDataCollection.AllCards.AddRange(new List<CardDisplayData> { new CardDisplayData { Title = "Ballista", Description = "Fires a bolt every 3 seconds dealing damage to a single enemy", SpriteName = "Ballista", UnlockName = "Ballista", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaHealth1", "BallistaArmor1", "BallistaShield1" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Broadhead Bolts I", Description = "All ballistas deal +1 damage to health", SpriteName = "Ballista", UnlockName = "BallistaHealth1", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaBleed1", "BallistaHealth2" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Broadhead Bolts II", Description = "All ballistas deal +2 damage to health", SpriteName = "Ballista", UnlockName = "BallistaHealth2", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaSlow1", "BallistaHealth3" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Broadhead Bolts III", Description = "All ballistas deal +3 damage to health", SpriteName = "Ballista", UnlockName = "BallistaHealth3", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaDamage1" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Heavy Shafts I", Description = "All ballistas deal +1 damage to armor", SpriteName = "Ballista", UnlockName = "BallistaArmor1", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaBurn1", "BallistaArmor2" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Heavy Shafts II", Description = "All ballistas deal +2 damage to armor", SpriteName = "Ballista", UnlockName = "BallistaArmor2", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaRange1", "BallistaArmor3" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Heavy Shafts III", Description = "All ballistas deal +3 damage to armor", SpriteName = "Ballista", UnlockName = "BallistaArmor3", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaDamage2" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Enchanted Bolts I", Description = "All ballistas deal +1 damage to shields", SpriteName = "Ballista", UnlockName = "BallistaShield1", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaPoison1", "BallistaShield2" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Enchanted Bolts II", Description = "All ballistas deal +2 damage to shields", SpriteName = "Ballista", UnlockName = "BallistaShield2", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaManaBolts1", "BallistaShield3" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Enchanted Bolts III", Description = "All ballistas deal +3 damage to shields", SpriteName = "Ballista", UnlockName = "BallistaShield3", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaDamage3" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Frost Bolts I", Description = "All ballistas slow enemies for 5% of the damage they deal", SpriteName = "Ballista", UnlockName = "BallistaSlow1", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaSlow2" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Frost Bolts II", Description = "All ballistas slow enemies for an additional 5% of the damage they deal", SpriteName = "Ballista", UnlockName = "BallistaSlow2", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaFreeze" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Freezing Bolts", Description = "All ballistas gain a 3% chance to freeze enemies", SpriteName = "Ballista", UnlockName = "BallistaFreeze", UnlockedByDefault = true, Unlocks = new List<string>(), Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Flaming Bolts I", Description = "All ballistas deal 25% burn damage", SpriteName = "Ballista", UnlockName = "BallistaBurn1", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaBurn2" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Flaming Bolts II", Description = "All ballistas deal 25% burn damage", SpriteName = "Ballista", UnlockName = "BallistaBurn2", UnlockedByDefault = true, Unlocks = new List<string>(), Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Advanced Balistics", Description = "All ballistas gain +15% crit chance", SpriteName = "Ballista", UnlockName = "BallistaDamage1", UnlockedByDefault = true, Unlocks = new List<string> { "GlobalHealth1" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Advanced Balistics", Description = "All ballistas gain +15% crit chance", SpriteName = "Ballista", UnlockName = "BallistaDamage2", UnlockedByDefault = true, Unlocks = new List<string> { "GlobalArmor1" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Advanced Balistics", Description = "All ballistas gain +15% crit chance", SpriteName = "Ballista", UnlockName = "BallistaDamage3", UnlockedByDefault = true, Unlocks = new List<string> { "GlobalShield1" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Jagged Heads I", Description = "All ballistas deal 25% bleed damage", SpriteName = "Ballista", UnlockName = "BallistaBleed1", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaBleed2" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Jagged Heads II", Description = "All ballistas deal 25% bleed damage", SpriteName = "Ballista", UnlockName = "BallistaBleed2", UnlockedByDefault = true, Unlocks = new List<string>(), Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Longbow I", Description = "Double the range bonus elevation gives all ballistas", SpriteName = "Ballista", UnlockName = "BallistaRange1", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaRange2" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Longbow II", Description = "Triple the range bonus elevation gives all ballistas", SpriteName = "Ballista", UnlockName = "BallistaRange2", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaRange3" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Longbow III", Description = "Quadruple the range bonus elevation gives all ballistas", SpriteName = "Ballista", UnlockName = "BallistaRange3", UnlockedByDefault = true, Unlocks = new List<string>(), Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Mana Bolts I", Description = "Ballistas now consume a small amount of mana and gain +4 base damage", SpriteName = "Ballista", UnlockName = "BallistaManaBolts1", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaManaBolts2" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Mana Bolts II", Description = "Ballistas now consume a medium amount of mana and gain +4 base damage", SpriteName = "Ballista", UnlockName = "BallistaManaBolts2", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaManaBolts3" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Mana Bolts III", Description = "Ballistas now consume a large amount of mana and gain +4 base damage", SpriteName = "Ballista", UnlockName = "BallistaManaBolts3", UnlockedByDefault = true, Unlocks = new List<string>(), Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Poison Bolts I", Description = "All ballistas deal 25% poison damage", SpriteName = "Ballista", UnlockName = "BallistaPoison1", UnlockedByDefault = true, Unlocks = new List<string> { "BallistaPoison2" }, Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Poison Bolts II", Description = "All ballistas deal 25% poison damage", SpriteName = "Ballista", UnlockName = "BallistaPoison2", UnlockedByDefault = true, Unlocks = new List<string>(), Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Monster Studies", Description = "All towers gain +1 damage to health", SpriteName = "Ballista", UnlockName = "GlobalHealth1", UnlockedByDefault = true, Unlocks = new List<string>(), Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Monster Studies", Description = "All towers gain +1 damage to armor", SpriteName = "Ballista", UnlockName = "GlobalArmor1", UnlockedByDefault = true, Unlocks = new List<string>(), Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Monster Studies", Description = "All towers gain +1 damage to shields", SpriteName = "Ballista", UnlockName = "GlobalShield1", UnlockedByDefault = true, Unlocks = new List<string>(), Unlocked = true, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)1 }, new CardDisplayData { Title = "Better Bolts", Description = "Ballistas permanently gain +1 damage to health", SpriteName = "Ballista", UnlockName = "BalistaPHealth", UnlockedByDefault = false, Unlocks = new List<string>(), Unlocked = false, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)4 }, new CardDisplayData { Title = "Better Bolts", Description = "Ballistas permanently gain +1 damage to armor", SpriteName = "Ballista", UnlockName = "BalistaPArmor", UnlockedByDefault = false, Unlocks = new List<string>(), Unlocked = false, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)4 }, new CardDisplayData { Title = "Better Bolts", Description = "Ballistas permanently gain +1 damage to shield", SpriteName = "Ballista", UnlockName = "BalistaPShield", UnlockedByDefault = false, Unlocks = new List<string>(), Unlocked = false, Category = (Category)0, Subcategory = (Subcategory)0, AcquisitionType = (AcquisitionType)4 } }); } } public static class CannonCards { internal static void Register() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0126: 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_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Expected O, but got Unknown //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Expected O, but got Unknown //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Expected O, but got Unknown //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04cd: Unknown result type (might be due to invalid IL or missing references) //IL_04cf: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Expected O, but got Unknown //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Expected O, but got Unknown //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_05ac: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b5: Unknown result type (might be due to invalid IL or missing references) //IL_05ba: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05c2: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05ce: Expected O, but got Unknown //IL_05d0: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_061a: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_0629: Unknown result type (might be due to invalid IL or missing references) //IL_062b: Unknown result type (might be due to invalid IL or missing references) //IL_0635: Expected O, but got Unknown //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_0652: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_066f: Unknown result type (might be due to invalid IL or missing references) //IL_0686: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_0694: Unknown result type (might be due to invalid IL or missing references) //IL_0697: Unknown result type (might be due to invalid IL or missing references) //IL_069c: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Expected O, but got Unknown //IL_06aa: Unknown result type (might be due to invalid IL or missing references) //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06ba: Unknown result type (might be due to invalid IL or missing references) //IL_06c5: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06e2: Unknown result type (might be due to invalid IL or missing references) //IL_06ed: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_06f6: Unknown result type (might be due to invalid IL or missing references) //IL_06fb: Unknown result type (might be due to invalid IL or missing references) //IL_06fe: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_0705: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Expected O, but got Unknown //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_0721: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) //IL_0737: Unknown result type (might be due to invalid IL or missing references) //IL_0742: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Unknown result type (might be due to invalid IL or missing references) //IL_076e: Unknown result type (might be due to invalid IL or missing references) //IL_0771: Unknown result type (might be due to invalid IL or missing references) //IL_0776: Unknown result type (might be due to invalid IL or missing references) //IL_0778: Unknown result type (might be due to invalid IL or missing references) //IL_0782: Expecte
CardsShared.dll
Decompiled a month agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("CardsShared")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+92cb8e781c2b7299aa8e8fe6980996fe51a3226e")] [assembly: AssemblyProduct("CardsShared")] [assembly: AssemblyTitle("CardsShared")] [assembly: AssemblyVersion("1.0.0.0")] namespace CardsShared; public enum Category { Tower, DOT, Building, Buff, Monster } public enum Subcategory { Ballista, Mortar, TeslaCoil, FrostKeep, FlameThrower, PoisonSprayer, Shredder, Encampment, Lookout, VampireLair, Cannon, Monument, Radar, Obelisk, ParticleCannon, DOTBleed, DOTBurn, DOTPoison, ManaSiphon, Mine, ManaBank, HauntedHouse, University, DrawBuff, GoldBuff, ManaBuff, CritsBuff, TowerBuff, TreeBuff, MonsterHealthBuff, MonsterArmorBuff, MonsterShieldBuff, MonsterDamageBuff, MonsterMoveSpeedBuff, MonsterSlowDebuff, MonsterHasteBuff, MonsterTowerDamageBuff, MonsterGoldDebuff } [Flags] public enum AcquisitionType { None = 0, AlwaysInRun = 1, StoreUnlocksInRun = 2, StoreAppliesPermanent = 4 } public class CardDisplayData { public string Title; public string Description; public string SpriteName; public Sprite Sprite; public string UnlockName; public bool UnlockedByDefault; public bool Unlocked; public List<string> Unlocks; public Category Category; public Subcategory Subcategory; public AcquisitionType AcquisitionType; } public class CardTree { public CardDisplayData Card; public List<CardTree> Children = new List<CardTree>(); } public static class CardTreeBuilder { public static List<CardTree> BuildCardTrees(List<CardDisplayData> cards) { List<CardDisplayData> list = cards.Where((CardDisplayData c) => !string.IsNullOrEmpty(c.UnlockName)).ToList(); HashSet<string> reverseLookup = new HashSet<string>(from unlock in list.Where((CardDisplayData c) => c.Unlocks != null).SelectMany((CardDisplayData c) => c.Unlocks) where !string.IsNullOrEmpty(unlock) select unlock); List<CardDisplayData> source = list.Where((CardDisplayData c) => !reverseLookup.Contains(c.UnlockName)).ToList(); Dictionary<string, CardTree> nodeMap = new Dictionary<string, CardTree>(); foreach (CardDisplayData item in list) { if (nodeMap.ContainsKey(item.UnlockName)) { Debug.LogWarning((object)("[CardTreeBuilder] Duplicate UnlockName detected and skipped: " + item.UnlockName)); continue; } nodeMap[item.UnlockName] = new CardTree { Card = item }; } foreach (CardTree value2 in nodeMap.Values) { List<string> unlocks = value2.Card.Unlocks; if (unlocks == null) { continue; } foreach (string item2 in unlocks) { if (!string.IsNullOrEmpty(item2) && nodeMap.TryGetValue(item2, out var value)) { value2.Children.Add(value); } } } return (from r in source where nodeMap.ContainsKey(r.UnlockName) select nodeMap[r.UnlockName]).ToList(); } } public static class CardTreeUtils { public static List<CardDisplayData> GetAllDescendants(CardTree root) { List<CardDisplayData> list = new List<CardDisplayData>(); CollectDescendants(root, list); return list; } private static void CollectDescendants(CardTree node, List<CardDisplayData> collected) { foreach (CardTree child in node.Children) { collected.Add(child.Card); CollectDescendants(child, collected); } } }