Decompiled source of KeysCards v1.6.1
KeysCards.dll
Decompiled 4 months 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 CardChoiceSpawnUniqueCardPatch.CustomCategories; using CardThemeLib; using HarmonyLib; using Jotunn.Utils; using KeysCards.Cards; using ModdingUtils.Extensions; using ModdingUtils.MonoBehaviours; using ModdingUtils.Utils; using Photon.Pun; using RarityLib.Utils; using Sonigon; using TMPro; using UnboundLib; using UnboundLib.Cards; using UnboundLib.GameModes; using UnboundLib.Networking; using UnboundLib.Utils; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("KeysCards")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("KeysCards")] [assembly: AssemblyTitle("KeysCards")] [assembly: AssemblyVersion("1.0.0.0")] namespace KeysCards { internal class CardCheck : MonoBehaviour { public static int Amount(Player player, string cardName) { List<CardInfo> currentCards = player.data.currentCards; int num = 0; for (int num2 = currentCards.Count - 1; num2 >= 0; num2--) { if (currentCards[num2].cardName == cardName) { num++; } } return num; } public bool condition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return card.rarity == RarityUtils.GetRarity("Treasure"); } public static CardInfo getTreasure() { return (CardInfo)(Random.Range(0, 10) switch { 0 => Cards.instance.GetCardWithName("Giants Gauntlet"), 1 => Cards.instance.GetCardWithName("Dead Mans Boots"), 2 => Cards.instance.GetCardWithName("Grovetenders Shield"), 3 => Cards.instance.GetCardWithName("Merlins Staff"), 4 => Cards.instance.GetCardWithName("Pickpockets Dagger"), 5 => Cards.instance.GetCardWithName("Zephyrs Blessing"), 6 => Cards.instance.GetCardWithName("Demeters Bounty"), 7 => Cards.instance.GetCardWithName("Apollos Quiver"), 8 => Cards.instance.GetCardWithName("Draculas Cloak"), 9 => Cards.instance.GetCardWithName("Familiars Friend"), _ => null, }); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.keys.rounds.KeysCards", "KeysCards", "1.5.0")] [BepInProcess("Rounds.exe")] public class KeysCards : BaseUnityPlugin { private static readonly AssetBundle Bundle = AssetUtils.LoadAssetBundleFromResources("keysassets", typeof(KeysCards).Assembly); public static AssetBundle ArtAsset = Bundle; public static GameObject AngelicArt = Bundle.LoadAsset<GameObject>("C_Angelic"); public static GameObject BottomlessArt = Bundle.LoadAsset<GameObject>("C_Bottomless"); public static GameObject BoxingGloveArt = Bundle.LoadAsset<GameObject>("C_BoxingGlove"); public static GameObject NewSneakersArt = Bundle.LoadAsset<GameObject>("C_NewSneakers"); public static GameObject BunchOfKnivesArt = Bundle.LoadAsset<GameObject>("C_BunchOfKnives"); public static GameObject CloakAndDaggerArt = Bundle.LoadAsset<GameObject>("C_CloakAndDagger"); public static GameObject CompassArt = Bundle.LoadAsset<GameObject>("C_Compass"); public static GameObject CrimsonPotionArt = Bundle.LoadAsset<GameObject>("C_CrimsonPotion"); public static GameObject CeruleanPotionArt = Bundle.LoadAsset<GameObject>("C_CeruleanPotion"); public static GameObject CitrinePotionArt = Bundle.LoadAsset<GameObject>("C_CitrinePotion"); public static GameObject AlchemistArt = Bundle.LoadAsset<GameObject>("C_Alchemist"); public static GameObject TreasureMapArt = Bundle.LoadAsset<GameObject>("C_TreasureMap"); public static GameObject CursedPlunderArt = Bundle.LoadAsset<GameObject>("C_CursedPlunder"); public static GameObject DruidsBlessingArt = Bundle.LoadAsset<GameObject>("C_DruidsBlessing"); public static GameObject LootBoxArt = Bundle.LoadAsset<GameObject>("C_LootBox"); public static GameObject TreasureTroveArt = Bundle.LoadAsset<GameObject>("C_TreasureTrove"); public static GameObject MendingReloadArt = Bundle.LoadAsset<GameObject>("C_MendingReload"); public static GameObject MirrorArt = Bundle.LoadAsset<GameObject>("C_Mirror"); public static GameObject MetamorphosisArt = Bundle.LoadAsset<GameObject>("C_Metamorphosis"); public static GameObject HeartArt = Bundle.LoadAsset<GameObject>("C_Heart"); public static GameObject PincersArt = Bundle.LoadAsset<GameObject>("C_Pincers"); public static GameObject CarapaceArt = Bundle.LoadAsset<GameObject>("C_Carapace"); public static GameObject MoonwalkerArt = Bundle.LoadAsset<GameObject>("C_Moonwalker"); public static GameObject RaidBossArt = Bundle.LoadAsset<GameObject>("C_RaidBoss"); public static GameObject SentryArt = Bundle.LoadAsset<GameObject>("C_Sentry"); public static GameObject SnipersNestArt = Bundle.LoadAsset<GameObject>("C_SnipersNest"); public static GameObject WarpathArt = Bundle.LoadAsset<GameObject>("C_Warpath"); public static GameObject GoldenEggArt = Bundle.LoadAsset<GameObject>("C_TheGoldenEgg"); public static GameObject EggsBlessingArt = Bundle.LoadAsset<GameObject>("C_EggsBlessing"); public static GameObject NimbleArt = Bundle.LoadAsset<GameObject>("C_Nimble"); public static GameObject YvrellsArt = Bundle.LoadAsset<GameObject>("C_Yvrells"); public static GameObject PickpocketsArt = Bundle.LoadAsset<GameObject>("C_Pickpockets"); public static GameObject DeadMansArt = Bundle.LoadAsset<GameObject>("C_DeadMans"); public static GameObject GiantsArt = Bundle.LoadAsset<GameObject>("C_Giants"); public static GameObject GrovetendersArt = Bundle.LoadAsset<GameObject>("C_Grovetenders"); public static GameObject ZephyrsArt = Bundle.LoadAsset<GameObject>("C_Zephyrs"); public static GameObject DemetersArt = Bundle.LoadAsset<GameObject>("C_Demeters"); public static GameObject ApollosArt = Bundle.LoadAsset<GameObject>("C_Quiver"); public static GameObject VampiricArt = Bundle.LoadAsset<GameObject>("C_Vampiric"); public static GameObject GAArt = Bundle.LoadAsset<GameObject>("C_GuardianAngel"); public static GameObject PrecisionArt = Bundle.LoadAsset<GameObject>("C_Precision"); public static GameObject DefensiveDiceArt = Bundle.LoadAsset<GameObject>("C_DefensiveDice"); public static GameObject MouseArt = Bundle.LoadAsset<GameObject>("C_Mouse"); public static GameObject SawShotArt = Bundle.LoadAsset<GameObject>("C_SawShot"); public static GameObject FHArt = Bundle.LoadAsset<GameObject>("C_FasterHardware"); public static GameObject OverdriveArt = Bundle.LoadAsset<GameObject>("C_Overdrive"); public static GameObject SlowStartArt = Bundle.LoadAsset<GameObject>("C_SlowStart"); public static GameObject NimblePlusArt = Bundle.LoadAsset<GameObject>("C_NimblePlus"); public static GameObject BewitchingArt = Bundle.LoadAsset<GameObject>("C_Bewitching"); public static GameObject HexShotArt = Bundle.LoadAsset<GameObject>("C_HexShot"); public static GameObject NuclearReactorArt = Bundle.LoadAsset<GameObject>("C_NuclearReactor"); public static GameObject LibraryArt = Bundle.LoadAsset<GameObject>("C_Library"); public static GameObject AllorNothingArt = Bundle.LoadAsset<GameObject>("C_AllorNothing"); public static GameObject BindingChainsArt = Bundle.LoadAsset<GameObject>("C_BindingChains"); public static GameObject FamiliarsArt = Bundle.LoadAsset<GameObject>("C_Familiars"); public static GameObject DraculasArt = Bundle.LoadAsset<GameObject>("C_Draculas"); public static GameObject ExpeditionArt = Bundle.LoadAsset<GameObject>("C_Expedition"); public static GameObject FerocityArt = Bundle.LoadAsset<GameObject>("C_Ferocity"); public static GameObject DroneArt = Bundle.LoadAsset<GameObject>("C_Drone"); public static GameObject ScaredyCatArt = Bundle.LoadAsset<GameObject>("C_ScaredyCat"); private const string ModId = "com.keys.rounds.KeysCards"; private const string ModName = "KeysCards"; public const string Version = "1.5.0"; public const string ModInitials = "KEYS"; internal static CardCategory NonTreasure; internal static CardCategory Treasure; internal static CardCategory Iron; internal static CardCategory Egg; internal static CardCategory Hatchling; internal static CardCategory Blessing; internal static CardCategory Alchemy; internal static CardCategory Automatic; internal static CardCategory RaidPip; public static KeysCards instance { get; private set; } private void Awake() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Expected O, but got Unknown //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_01a0: 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_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: 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_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: 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_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Expected O, but got Unknown //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: 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_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Expected O, but got Unknown //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) RarityUtils.AddRarity("Treasure", 0.095f, new Color(84f / 85f, 47f / 51f, 0.41568628f), new Color(0.83137256f, 0.77254903f, 0.3372549f)); CardThemeLib.instance.CreateOrGetType("Heavenly", new CardThemeColor { bgColor = new Color(0.19f, 0.18f, 0.13f), targetColor = new Color(0.86f, 0.79f, 0.57f) }); CardThemeLib.instance.CreateOrGetType("Modifier", new CardThemeColor { bgColor = new Color(0.29411766f, 0.17254902f, 0.32156864f), targetColor = new Color(0.6901961f, 0.40392157f, 0.7490196f) }); CardThemeLib.instance.CreateOrGetType("Blueprint", new CardThemeColor { bgColor = new Color(0.1f, 0.03f, 0.3f), targetColor = new Color(0.36f, 0.321f, 0.921f) }); CardThemeLib.instance.CreateOrGetType("Ultima", new CardThemeColor { bgColor = new Color(0.5f, 0.5f, 0.5f), targetColor = new Color(1f, 0f, 0f) }); CardThemeLib.instance.CreateOrGetType("Orange", new CardThemeColor { bgColor = new Color(0.1f, 0.05f, 0.025f), targetColor = new Color(0.98f, 0.54f, 0.223f) }); CardThemeLib.instance.CreateOrGetType("Hex", new CardThemeColor { bgColor = new Color(0.04f, 0f, 0.08f), targetColor = new Color(0.44f, 0.055f, 0.88f) }); CardThemeLib.instance.CreateOrGetType("Forest", new CardThemeColor { bgColor = new Color(0.04f, 0f, 0.08f), targetColor = new Color(0.44f, 0.055f, 0.88f) }); CardThemeLib.instance.CreateOrGetType("Chains", new CardThemeColor { bgColor = new Color(0.064f, 0.053f, 0.1f), targetColor = new Color(0.64f, 0.53f, 1f) }); new Harmony("com.keys.rounds.KeysCards").PatchAll(); } private void Start() { instance = this; NonTreasure = CustomCardCategories.instance.CardCategory("__NonTreasure__"); Treasure = CustomCardCategories.instance.CardCategory("Treasure"); Iron = CustomCardCategories.instance.CardCategory("Iron"); Egg = CustomCardCategories.instance.CardCategory("Egg"); Hatchling = CustomCardCategories.instance.CardCategory("Hatchling"); Blessing = CustomCardCategories.instance.CardCategory("Blessing"); Alchemy = CustomCardCategories.instance.CardCategory("Alchemy"); Automatic = CustomCardCategories.instance.CardCategory("Automatic"); RaidPip = CustomCardCategories.instance.CardCategory("RaidPip"); CustomCard.BuildCard<Nimble>(); CustomCard.BuildCard<LootBox>(); CustomCard.BuildCard<Warpath>(); CustomCard.BuildCard<MendingReload>(); CustomCard.BuildCard<SnipersNest>(); CustomCard.BuildCard<Sentry>(); CustomCard.BuildCard<Mirror>(); CustomCard.BuildCard<RaidBoss>(); CustomCard.BuildCard<Critical>(); CustomCard.BuildCard<Alchemist>(); CustomCard.BuildCard<CrimsonPotion>(); CustomCard.BuildCard<CeruleanPotion>(); CustomCard.BuildCard<CitrinePotion>(); CustomCard.BuildCard<Moonwalker>(); CustomCard.BuildCard<TreasureTrove>(); CustomCard.BuildCard<TreasureMap>(); CustomCard.BuildCard<CompassCard>(); CustomCard.BuildCard<Metamorphosis>(); CustomCard.BuildCard<IronCarapace>(); CustomCard.BuildCard<IronPincers>(); CustomCard.BuildCard<IronHeart>(); CustomCard.BuildCard<Bounce>(); CustomCard.BuildCard<Angelic>(); CustomCard.BuildCard<NewSneakers>(); CustomCard.BuildCard<BottomlessPockets>(); CustomCard.BuildCard<TrapChest>(); CustomCard.BuildCard<BunchOfKnives>(); CustomCard.BuildCard<TheGoldenEgg>(); CustomCard.BuildCard<TheEggsBlessing>(); CustomCard.BuildCard<VampiricBlock>(); CustomCard.BuildCard<GuardianAngel>(); CustomCard.BuildCard<Precision>(); CustomCard.BuildCard<CritBlock>(); CustomCard.BuildCard<Mouse>(); CustomCard.BuildCard<AllOrNothing>(); CustomCard.BuildCard<BindingChains>(); CustomCard.BuildCard<Ferocity>(); CustomCard.BuildCard<Expedition>(); CustomCard.BuildCard<ScaredyCat>(); CustomCard.BuildCard<GiantsGauntlet>(); CustomCard.BuildCard<DeadMans>(); CustomCard.BuildCard<YvrellsStaff>(); CustomCard.BuildCard<GrovetendersShield>(); CustomCard.BuildCard<PickpocketsDagger>(); CustomCard.BuildCard<ZephyrsBlessing>(); CustomCard.BuildCard<DemetersBounty>(); CustomCard.BuildCard<ApollosQuiver>(); CustomCard.BuildCard<DraculasDagger>(); CustomCard.BuildCard<FamiliarsPlush>(); CustomCard.BuildCard<SawShot>(); CustomCard.BuildCard<SlowStart>(); CustomCard.BuildCard<DruidsBlessing>(); CustomCard.BuildCard<FasterHardware>(); CustomCard.BuildCard<Overdrive>(); CustomCard.BuildCard<NimblePlus>(); CustomCard.BuildCard<NuclearReactor>(); CustomCard.BuildCard<EclipticLibrary>(); CustomCard.BuildCard<HexShot>(); CustomCard.BuildCard<Bewitching>(); GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)GameStart); GameModeManager.AddHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)EggRoundPass); ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)instance, 1f, (Action)delegate { foreach (Card value in CardManager.cards.Values) { if (!value.cardInfo.categories.Contains(Treasure)) { value.cardInfo.categories = CollectionExtensions.AddToArray<CardCategory>(value.cardInfo.categories, NonTreasure); } } }); } private IEnumerator GameStart(IGameModeHandler gm) { foreach (Player player in PlayerManager.instance.players) { if (!CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(Treasure)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(Treasure); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(Iron); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(Hatchling); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(Blessing); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(Alchemy); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(Automatic); } } yield break; } private IEnumerator EggRoundPass(IGameModeHandler gm) { foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)((Component)player).GetComponent<HatchlingsMono>() != (Object)null) { ((Component)player).GetComponent<HatchlingsMono>().roundspassed++; ((Component)player).GetComponent<HatchlingsMono>().checkhatch(); } } yield break; } } } namespace KeysCards.Cards { internal class Alchemist : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { KeysCards.Alchemy }; block.cdMultiplier = 0.8f; cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>() != (Object)null) { ((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>().poduration = 6f; } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>() != (Object)null) { ((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>().poduration = 3f; } } protected override string GetTitle() { return "Alchemist"; } protected override string GetDescription() { return "All <b><color=#73b366>Potions</b></color> have their durations doubled"; } protected override GameObject GetCardArt() { return KeysCards.AlchemistArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Block cooldown", amount = "-20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)4; } public override string GetModName() { return "KEYS"; } } internal class AllOrNothing : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 0.75f; gun.reloadTime = 2f / 3f; block.cdAdd = 0.5f; gun.damage = 1.55f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "All or Nothing"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return KeysCards.AllorNothingArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Damage", amount = "+65%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload speed", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Health", amount = "-30%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block cooldown", amount = "+0.5s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //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_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Orange", (CardThemeColor)null); } public override string GetModName() { return "KEYS"; } } internal class Angelic : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.numberOfJumps = 1; statModifiers.movementSpeed = 1.1f; gun.damage = 1.1f; gun.gravity = 0.65f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Angelic"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return KeysCards.AngelicArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Jumps", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move speed", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+10%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Bullet gravity", amount = "-35%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //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_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Heavenly", (CardThemeColor)null); } public override string GetModName() { return "KEYS"; } } internal class ApollosQuiver : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { KeysCards.Treasure }; gun.reloadTime = 0.8f; gun.attackSpeed = 0.8f; gun.ammo = 2; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent<ApollosQuiverMono>() == (Object)null) { ((Component)player).gameObject.AddComponent<ApollosQuiverMono>(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<ApollosQuiverMono>() != (Object)null && CardCheck.Amount(player, "Apollos Quiver") == 1) { Object.Destroy((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<ApollosQuiverMono>()); } } protected override string GetTitle() { return "Apollos Quiver"; } protected override string GetDescription() { return "<b><color=#ede624>Treasure</b></color>\nGain +50% attack speed for a brief 0.5s after reloading."; } protected override GameObject GetCardArt() { return KeysCards.ApollosArt; } protected override Rarity GetRarity() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("Treasure"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Reload speed", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack speed", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Ammo", amount = "+2", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)1; } public override string GetModName() { return "KEYS"; } } public class ApollosQuiverBuffMono : ReversibleEffect { private ReversibleColorEffect colorEffect; private readonly Color color = new Color(0.75f, 0.75f, 0.05f, 0.1f); public float asBonus; public int ammoNorm; public override void OnStart() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) GunStatModifier gunStatModifier = base.gunStatModifier; gunStatModifier.attackSpeed_mult *= 1f / (1f + (float)CardCheck.Amount(base.player, "Apollos Quiver") * 0.5f); colorEffect = ((Component)base.player).gameObject.AddComponent<ReversibleColorEffect>(); ((ColorEffect)colorEffect).SetColor(color); colorEffect.SetLivesToEffect(1); } public override void OnOnDisable() { ((ReversibleEffect)this).Destroy(); } public void OnDestroy() { ((ColorEffect)colorEffect).Destroy(); } } public class ApollosQuiverMono : MonoBehaviour { private bool active = true; private float updateDelay = 0.1f; private float effectCooldown = 2f; private float timeOfLastEffect = Time.time; private float startTime = Time.time; private Player player; private Block block; private Gun gun; private void Start() { player = ((Component)this).GetComponent<Player>(); block = ((Component)this).GetComponent<Block>(); gun = ((Component)this).GetComponent<Gun>(); } public void Update() { if (!(Time.time >= startTime + updateDelay)) { return; } ResetTimer(); if (player.data.weaponHandler.gun.isReloading) { active = true; ResetEffectTimer(); } if (!player.data.weaponHandler.gun.isReloading && active) { if ((Object)(object)((Component)player).gameObject.GetComponent<ApollosQuiverBuffMono>() == (Object)null) { Object.Destroy((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<ApollosQuiverBuffMono>()); } ((Component)((Component)((Component)this).GetComponent<Player>()).transform).gameObject.AddComponent<ApollosQuiverBuffMono>(); Object.Destroy((Object)(object)((Component)((Component)this).GetComponent<Player>()).GetComponent<ApollosQuiverBuffMono>(), 0.5f); active = false; } } private void ResetTimer() { startTime = Time.time; } private void ResetEffectTimer() { timeOfLastEffect = Time.time; } } public class AutomaticMono : MonoBehaviour { public float cdMultiplier = 1f; private Player player; } internal class Bewitching : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent<AutomaticMono>() == (Object)null) { ((Component)player).gameObject.AddComponent<AutomaticMono>(); CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(KeysCards.Automatic); } if ((Object)(object)((Component)player).gameObject.GetComponent<BewitchingMono>() == (Object)null) { ((Component)player).gameObject.AddComponent<BewitchingMono>(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<BewitchingMono>() != (Object)null) { Object.Destroy((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<BewitchingMono>()); } } protected override string GetTitle() { return "Bewitching"; } protected override string GetDescription() { return "Every <color=#b53131><b>5</b></color> seconds, <color=#a89062><b>automatically</b></color> apply <b><color=#836d8a>12</color> <color=#772791>Hex</b></color> to nearby enemies\n<size=48><b><color=#787878>Hex burns 1% max health per stack over 6 seconds"; } protected override GameObject GetCardArt() { return KeysCards.BewitchingArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { return null; } protected override CardThemeColorType GetTheme() { //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_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Hex", (CardThemeColor)null); } public override string GetModName() { return "KEYS"; } } public class BewitchingMono : MonoBehaviour { private PhotonView view; public GameObject bewitchEffect; private Player player; private readonly float updateDelay = 5f; public float startTime = Time.time; private void Start() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent<Player>(); view = player.data.view; bewitchEffect = Object.Instantiate<GameObject>(KeysCards.ArtAsset.LoadAsset<GameObject>("A_Bewitching"), ((Component)player).transform); Transform transform = bewitchEffect.transform; transform.localScale *= 2f; bewitchEffect.transform.position = new Vector3(((Component)player).transform.position.x, ((Component)player).transform.position.y, ((Component)player).transform.position.z - 70f); bewitchEffect.GetComponent<Animator>().speed = 1f / ((Component)this).GetComponent<AutomaticMono>().cdMultiplier; bewitchEffect.GetComponent<Animator>().Play("Base Layer.CDStart", -1, 0f); } public void Update() { //IL_02a5: 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_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: 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_0118: Unknown result type (might be due to invalid IL or missing references) if (player.data.dead || !player.data.isPlaying) { startTime = 0f; return; } if (startTime == 0f) { startTime = Time.time; NetworkingManager.RPC(typeof(BewitchingMono), "SyncBewitch", new object[1] { player.playerID }); } if (!(Time.time >= startTime + updateDelay * ((Component)this).GetComponent<AutomaticMono>().cdMultiplier)) { return; } for (int i = 0; i < PlayerManager.instance.players.Count; i++) { Player val = PlayerManager.instance.players[i]; if (!((Object)(object)val != (Object)(object)player) || val.data.dead || !(Vector3.Distance(((Component)val).transform.position, ((Component)((Component)this).transform).transform.position) < 6f * ((Component)this).transform.localScale.x) || val.teamID == player.teamID) { continue; } if (!PhotonNetwork.OfflineMode) { if ((Object)(object)((Component)val).GetComponent<HexDebuffMono>() == (Object)null) { ((Component)val).gameObject.AddComponent<HexDebuffMono>(); ((Component)val).GetComponent<HexDebuffMono>().stacks = 12; } else { ((Component)val).GetComponent<HexDebuffMono>().stacks += 12; ((Component)val).GetComponent<HexDebuffMono>().ticks = 0; ((Component)val).GetComponent<HexDebuffMono>().effectSpawned.GetComponentInChildren<TMP_Text>().text = ((Component)val).GetComponent<HexDebuffMono>().stacks.ToString(); } } else if (((Component)player).GetComponent<PhotonView>().IsMine) { NetworkingManager.RPC(typeof(BewitchingMono), "ApplyHex12", new object[1] { val.playerID }); } } if (!PhotonNetwork.OfflineMode) { bewitchEffect.GetComponent<Animator>().speed = 1f / ((Component)this).GetComponent<AutomaticMono>().cdMultiplier; bewitchEffect.GetComponent<Animator>().Play("Base Layer.CDStart", -1, 0f); bewitchEffect.transform.position = new Vector3(((Component)player).transform.position.x, ((Component)player).transform.position.y, ((Component)player).transform.position.z - 70f); } else if (((Component)player).GetComponent<PhotonView>().IsMine) { NetworkingManager.RPC(typeof(BewitchingMono), "SyncBewitch", new object[1] { player.playerID }); } ResetTimer(); } private void OnDestroy() { Object.Destroy((Object)(object)bewitchEffect); } private void ResetTimer() { startTime = Time.time; } [UnboundRPC] private static void SyncBewitch(int player) { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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) Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == player); GameObject val2 = ((Component)val).GetComponent<BewitchingMono>().bewitchEffect; val2.GetComponent<Animator>().speed = 1f / ((Component)val).GetComponent<AutomaticMono>().cdMultiplier; val2.GetComponent<Animator>().Play("Base Layer.CDStart", -1, 0f); val2.transform.position = new Vector3(((Component)val).transform.position.x, ((Component)val).transform.position.y, ((Component)val).transform.position.z - 70f); } [UnboundRPC] private static void ApplyHex12(int player) { Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == player); if ((Object)(object)((Component)val).GetComponent<HexDebuffMono>() == (Object)null) { ((Component)val).gameObject.AddComponent<HexDebuffMono>(); ((Component)val).GetComponent<HexDebuffMono>().stacks = 12; } else { ((Component)val).GetComponent<HexDebuffMono>().stacks += 12; ((Component)val).GetComponent<HexDebuffMono>().ticks = 0; ((Component)val).GetComponent<HexDebuffMono>().effectSpawned.GetComponentInChildren<TMP_Text>().text = ((Component)val).GetComponent<HexDebuffMono>().stacks.ToString(); } } } internal class BindingChains : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; block.cdAdd = 0.25f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent<BindingChainsMono>() == (Object)null) { ((Component)player).gameObject.AddComponent<BindingChainsMono>(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Binding Chains"; } protected override string GetDescription() { return "Chains attach to nearby enemies that stun targets if they hold for 2 seconds\n<size=48><b><color=#787878>Players cannot be chained again for 5 seconds"; } protected override GameObject GetCardArt() { return KeysCards.BindingChainsArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Block cooldown", amount = "+0.25s", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //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_0014: Unknown result type (might be due to invalid IL or missing references) return CardThemeLib.instance.CreateOrGetType("Chains", (CardThemeColor)null); } public override string GetModName() { return "KEYS"; } } public class BindingChainsMono : MonoBehaviour { private GameObject chainArea; public List<Player> chained = new List<Player>(); private PhotonView view; private Player player; private readonly float updateDelay = 0.2f; public float startTime = Time.time; private void Start() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent<Player>(); view = player.data.view; chainArea = Object.Instantiate<GameObject>(KeysCards.ArtAsset.LoadAsset<GameObject>("A_ChainsArea"), ((Component)player).transform); Transform transform = chainArea.transform; transform.localScale *= 3.7f; chainArea.transform.position = new Vector3(((Component)player).transform.position.x, ((Component)player).transform.position.y, ((Component)player).transform.position.z - 10f); } public void Update() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_0170: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_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) for (int i = 0; i < PlayerManager.instance.players.Count; i++) { Player val = PlayerManager.instance.players[i]; if ((Object)(object)val != (Object)(object)player && !val.data.dead && Vector3.Distance(((Component)val).transform.position, ((Component)((Component)this).transform).transform.position) < 10f * ((Component)this).transform.localScale.x && val.teamID != player.teamID && PlayerManager.instance.CanSeePlayer(Vector2.op_Implicit(((Component)player).transform.position), val).canSee && !chained.Contains(val)) { GameObject val2 = Object.Instantiate<GameObject>(KeysCards.ArtAsset.LoadAsset<GameObject>("A_Chains"), ((Component)player).transform); Transform transform = val2.transform; transform.localScale *= 1f; val2.transform.position = new Vector3(((Component)player).transform.position.x, ((Component)player).transform.position.y, ((Component)player).transform.position.z - 8f); ((Component)val2.transform).GetComponent<LineRenderer>().SetPosition(0, ((Component)player).transform.position); ((Component)val2.transform).GetComponent<LineRenderer>().SetPosition(1, ((Component)val).transform.position); val2.AddComponent<BindingChainsObjMono>(); val2.GetComponent<BindingChainsObjMono>().player = player; val2.GetComponent<BindingChainsObjMono>().target = val; chained.Add(val); } } } } public class BindingChainsObjMono : MonoBehaviour { private PhotonView view; private Color lineColor = new Color(8f / 51f, 7f / 51f, 14f / 51f, 0.01f); public Player player; public Player target; private bool activated = false; public float decayTime = 0f; public float lineStrength = 0f; private void Start() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) ((Component)this).GetComponent<LineRenderer>().startColor = new Color(lineColor.r, lineColor.g, lineColor.b, lineColor.a / 3f); ((Component)this).GetComponent<LineRenderer>().endColor = lineColor; UpdChains(); view = player.data.view; } public void Update() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) if (player.data.dead) { DestroyChains(); } UpdChains(); if (!activated) { if (!PlayerManager.instance.CanSeePlayer(Vector2.op_Implicit(((Component)player).transform.position), target).canSee) { lineColor -= new Color(0.12f * Time.deltaTime, 0.12f * Time.deltaTime, 0.2f * Time.deltaTime, 0.2f * Time.deltaTime + lineColor.a * Time.deltaTime); lineStrength -= Time.deltaTime; if (lineStrength <= 0f) { DestroyChains(); } } else { lineStrength += Time.deltaTime; lineColor += new Color(0.12f * Time.deltaTime, 0.12f * Time.deltaTime, 0.2f * Time.deltaTime, 0.2f * Time.deltaTime + lineColor.a * Time.deltaTime); } ((Component)this).GetComponent<LineRenderer>().startColor = new Color(lineColor.r, lineColor.g, lineColor.b, lineColor.a / 3f); ((Component)this).GetComponent<LineRenderer>().endColor = lineColor; if (lineStrength >= 2f) { activated = true; if (PhotonNetwork.OfflineMode) { target.data.silenceHandler.RPCA_AddSilence(1.4f); target.data.stunHandler.AddStun(1.4f); } else if (((Component)player).GetComponent<PhotonView>().IsMine) { target.data.silenceHandler.RPCA_AddSilence(1.4f); NetworkingManager.RPC(typeof(BindingChainsObjMono), "SyncStun", new object[1] { target.playerID }); } ((Renderer)((Component)this).GetComponent<LineRenderer>()).enabled = false; } else if (target.data.dead || Vector3.Distance(((Component)target).transform.position, ((Component)player).transform.position) > 8f * ((Component)player).transform.localScale.x) { DestroyChains(); } } else if (lineStrength >= 7f) { DestroyChains(); } else { lineStrength += Time.deltaTime; } } private void DestroyChains() { ((Component)player).GetComponent<BindingChainsMono>().chained.Remove(target); Object.Destroy((Object)(object)((Component)this).gameObject); } private void UpdChains() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) ((Component)((Component)this).transform).GetComponent<LineRenderer>().SetPosition(0, ((Component)player).transform.position); ((Component)((Component)this).transform).GetComponent<LineRenderer>().SetPosition(1, ((Component)target).transform.position); } [UnboundRPC] public static void SyncStun(int target) { Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == target); val.data.stunHandler.AddStun(1.5f); } } internal class BottomlessPockets : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.movementSpeed = 0.95f; gun.damage = 1.5f; gun.ammo = 4; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Bottomless Pockets"; } protected override string GetDescription() { return "Wow!\n Those are some big pockets!"; } protected override GameObject GetCardArt() { return KeysCards.BottomlessArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Ammo", amount = "+4", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+15%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Move speed", amount = "-5%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)2; } public override string GetModName() { return "KEYS"; } } internal class Bounce : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.projectileSpeed = 0.8f; gun.damage = 1.25f; gun.knockback = 1.5f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Boxing Glove"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return KeysCards.BoxingGloveArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Knockback", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Projectile speed", amount = "-20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } public override string GetModName() { return "KEYS"; } } internal class BunchOfKnives : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 1.25f; gun.spread = 0.1f; gun.numberOfProjectiles = 1; gun.ammo = -1; gun.reloadTime = 0.75f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent<BunchOfKnivesMono>() == (Object)null) { ((Component)player).gameObject.AddComponent<BunchOfKnivesMono>(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<BunchOfKnivesMono>() != (Object)null && CardCheck.Amount(player, "Bunch of Knives") == 1) { Object.Destroy((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<BunchOfKnivesMono>()); } } protected override string GetTitle() { return "Bunch of Knives"; } protected override string GetDescription() { return "Your damage is instead dealt over 1.5s"; } protected override GameObject GetCardArt() { return KeysCards.BunchOfKnivesArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[4] { new CardInfoStat { positive = true, stat = "Damage", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Projectiles", amount = "+1", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Reload Speed", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ammo", amount = "-1", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } public override string GetModName() { return "KEYS"; } } public class BunchOfKnivesMono : MonoBehaviour { private Gun gun; private void Start() { CharacterData componentInParent = ((Component)this).GetComponentInParent<CharacterData>(); gun = componentInParent.weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(OnShoot)); } public void OnShoot(GameObject projectile) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) RayHitPoison val = projectile.AddComponent<RayHitPoison>(); val.color = Color.red; val.time = 1.5f; val.interval = 0.125f; } private void OnDestroy() { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShoot)); } } internal class CeruleanPotion : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; block.cdMultiplier = 1.1f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(KeysCards.Alchemy)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(KeysCards.Alchemy); } if ((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>() == (Object)null) { ((Component)player).gameObject.AddComponent<PotionMono>(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>() != (Object)null && CardCheck.Amount(player, "Crimson Potion") == 0 && CardCheck.Amount(player, "Citrine Potion") == 0) { if (!CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(KeysCards.Alchemy)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(KeysCards.Alchemy); } Object.Destroy((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>()); } } protected override string GetTitle() { return "Cerulean Potion"; } protected override string GetDescription() { return "<b><color=#73b366>Potion</b></color>\nBlocking grants you increased max health and +50% increased damage and projectile speed for 3 seconds"; } protected override GameObject GetCardArt() { return KeysCards.CeruleanPotionArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Cooldown", amount = "6s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block cooldown", amount = "+10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)2; } public override string GetModName() { return "KEYS"; } } public class CeruleanPotionBuffMono : ReversibleEffect { public override void OnStart() { GunStatModifier gunStatModifier = base.gunStatModifier; gunStatModifier.damage_mult *= 1.5f; CharacterDataModifier characterDataModifier = base.characterDataModifier; characterDataModifier.health_mult *= 1.5f; CharacterDataModifier characterDataModifier2 = base.characterDataModifier; characterDataModifier2.maxHealth_mult *= 1.5f; GunStatModifier gunStatModifier2 = base.gunStatModifier; gunStatModifier2.projectileSpeed_mult *= 1.5f; } public override void OnOnDisable() { ((ReversibleEffect)this).Destroy(); } } internal class CitrinePotion : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; block.cdMultiplier = 1.1f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(KeysCards.Alchemy)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(KeysCards.Alchemy); } if ((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>() == (Object)null) { ((Component)player).gameObject.AddComponent<PotionMono>(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>() != (Object)null && CardCheck.Amount(player, "Crimson Potion") == 0 && CardCheck.Amount(player, "Cerulean Potion") == 0) { if (!CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(KeysCards.Alchemy)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(KeysCards.Alchemy); } Object.Destroy((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>()); } } protected override string GetTitle() { return "Citrine Potion"; } protected override string GetDescription() { return "<b><color=#73b366>Potion</b></color>\nBlocking grants you increased mobility and +50% reload and attack speed for 3 seconds"; } protected override GameObject GetCardArt() { return KeysCards.CitrinePotionArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Cooldown", amount = "6s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block cooldown", amount = "+10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)1; } public override string GetModName() { return "KEYS"; } } public class CitrinePotionBuffMono : ReversibleEffect { public override void OnStart() { GunAmmoStatModifier gunAmmoStatModifier = base.gunAmmoStatModifier; gunAmmoStatModifier.reloadTimeMultiplier_mult *= 0.5f; base.characterStatModifiersModifier.movementSpeed_mult = 1.3f; GunStatModifier gunStatModifier = base.gunStatModifier; gunStatModifier.attackSpeed_mult *= 2f / 3f; CharacterStatModifiersModifier characterStatModifiersModifier = base.characterStatModifiersModifier; characterStatModifiersModifier.jump_mult *= 1.5f; } public override void OnOnDisable() { ((ReversibleEffect)this).Destroy(); } } internal class CompassCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.movementSpeed = 1.05f; statModifiers.attackSpeedMultiplier = 0.952381f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<MapCompassMono>() == (Object)null) { ((Component)player).gameObject.AddComponent<MapCompassMono>(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Compass"; } protected override string GetDescription() { return "Gain a random <b><color=#ede624>Treasure</b></color> if you find a matching Treasure Map card"; } protected override GameObject GetCardArt() { return KeysCards.CompassArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Move speed", amount = "+5%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Attack speed", amount = "+5%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)1; } public override string GetModName() { return "KEYS"; } } internal class CrimsonPotion : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; block.cdMultiplier = 1.1f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(KeysCards.Alchemy)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Remove(KeysCards.Alchemy); } if ((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>() == (Object)null) { ((Component)player).gameObject.AddComponent<PotionMono>(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>() != (Object)null && CardCheck.Amount(player, "Citrine Potion") == 0 && CardCheck.Amount(player, "Cerulean Potion") == 0) { if (!CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Contains(KeysCards.Alchemy)) { CharacterStatModifiersExtension.GetAdditionalData(player.data.stats).blacklistedCategories.Add(KeysCards.Alchemy); } Object.Destroy((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<PotionMono>()); } } protected override string GetTitle() { return "Crimson Potion"; } protected override string GetDescription() { return "<b><color=#73b366>Potion</b></color>\nBlocking sheds all damage over time effects and heals for 6% of your max health every second for 3 seconds"; } protected override GameObject GetCardArt() { return KeysCards.CrimsonPotionArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Cooldown", amount = "6s", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block cooldown", amount = "+10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)0; } public override string GetModName() { return "KEYS"; } } public class CrimsonPotionBuffMono : ReversibleEffect { public override void OnUpdate() { base.data.healthHandler.Heal(base.data.maxHealth * 0.06f * TimeHandler.deltaTime); } public override void OnOnDisable() { ((ReversibleEffect)this).Destroy(); } } internal class CritBlock : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 1.2f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent<CriticalMono>() == (Object)null) { ((Component)player).gameObject.AddComponent<CriticalMono>(); } ((Component)player).gameObject.GetComponent<CriticalMono>().critChance += 25; if ((Object)(object)((Component)player).gameObject.GetComponent<CritBlockMono>() == (Object)null) { ((Component)player).gameObject.AddComponent<CritBlockMono>(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (Object.op_Implicit((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<CriticalMono>())) { ((Component)player).gameObject.GetComponent<CriticalMono>().critChance -= 25; } } protected override string GetTitle() { return "Defensive Dice"; } protected override string GetDescription() { return "Your blocks can now critically strike, greatly increasing the range that bullets are deflected"; } protected override GameObject GetCardArt() { return KeysCards.DefensiveDiceArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Crit chance", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Health", amount = "+20%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)2; } public override string GetModName() { return "KEYS"; } } public class CritBlockMono : MonoBehaviour { private float startTime; private Player player; private Block block; private PhotonView view; private void Start() { player = ((Component)this).GetComponent<Player>(); block = ((Component)this).GetComponentInParent<CharacterData>().block; Block val = block; val.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(val.BlockAction, new Action<BlockTriggerType>(OnBlock)); } private void OnBlock(BlockTriggerType blockTrigger) { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) int num = 1000; if (!((Component)player).GetComponent<PhotonView>().IsMine && !PhotonNetwork.OfflineMode) { return; } num = Random.Range(1, 101); if (num <= ((Component)player).gameObject.GetComponent<CriticalMono>().critChance) { if (PhotonNetwork.OfflineMode) { GameObject val = Object.Instantiate<GameObject>(KeysCards.ArtAsset.LoadAsset<GameObject>("A_CritBlock"), ((Component)player).transform); Transform transform = val.transform; transform.localScale *= 4f; val.transform.position = new Vector3(((Component)player).transform.position.x, ((Component)player).transform.position.y, ((Component)player).transform.position.z - 90f); Object.Destroy((Object)(object)val, 0.5f); } else { NetworkingManager.RPC(typeof(CritBlockMono), "SyncCritBlock", new object[1] { player.playerID }); } startTime = Time.time; } } private void Update() { if (Time.time < startTime + 0.4f) { activefield(); } } private void activefield() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) int mask = LayerMask.GetMask(new string[1] { "Projectile" }); foreach (Collider2D item in from captured in Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)player).transform.position), 4.5f * ((Component)this).transform.localScale.x, mask) where (Object)(object)((Component)captured).gameObject.GetComponentInParent<ProjectileHit>() != (Object)null && (Object)(object)((Component)captured).gameObject.GetComponentInParent<ProjectileHit>().ownPlayer != (Object)(object)player select captured) { MoveTransform component = ((Component)((Component)item).gameObject.GetComponentInParent<ProjectileHit>()).GetComponent<MoveTransform>(); Vector3 val = ((Component)item).gameObject.transform.position - ((Component)player).transform.position; component.velocity = ((Vector3)(ref val)).normalized * 100f; view = ((Component)item).GetComponentInParent<PhotonView>(); if (Object.op_Implicit((Object)(object)view) && !view.IsMine) { } } } private void OnDestroy() { Block val = block; val.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(val.BlockAction, new Action<BlockTriggerType>(OnBlock)); } [UnboundRPC] public static void SyncCritBlock(int player) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) Player val = PlayerManager.instance.players.Find((Player p) => p.playerID == player); GameObject val2 = Object.Instantiate<GameObject>(KeysCards.ArtAsset.LoadAsset<GameObject>("A_CritBlock"), ((Component)val).transform); Transform transform = val2.transform; transform.localScale *= 3f; val2.transform.position = new Vector3(((Component)val).transform.position.x, ((Component)val).transform.position.y, ((Component)val).transform.position.z - 20f); Object.Destroy((Object)(object)val2, 0.5f); } } internal class Critical : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 1.15f; statModifiers.movementSpeed = 1.1f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent<CriticalMono>() == (Object)null) { ((Component)player).gameObject.AddComponent<CriticalMono>(); } ((Component)player).gameObject.GetComponent<CriticalMono>().critChance += 25; } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if (Object.op_Implicit((Object)(object)((Component)((Component)player).transform).gameObject.GetComponent<CriticalMono>())) { ((Component)player).gameObject.GetComponent<CriticalMono>().critChance -= 25; } } protected override string GetTitle() { return "Cloak and Dagger"; } protected override string GetDescription() { return ""; } protected override GameObject GetCardArt() { return KeysCards.CloakAndDaggerArt; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown resu