Decompiled source of FiveNightsAtInscryption v0.1.0
plugins/FiveNightsatInscryption.dll
Decompiled 3 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.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using DiskCardGame; using FiveNightsatInscryption; using FiveNightsatInscryption.abilities; using FiveNightsatInscryption.nodes; using FiveNightsatInscryption.regions; using FiveNightsatInscryption.specialStats; using FiveNightsatInscryption.specialabilities; using HarmonyLib; using Infiniscryption.Achievements; using Infiniscryption.PackManagement; using InscryptionAPI.Ascension; using InscryptionAPI.Card; using InscryptionAPI.Encounters; using InscryptionAPI.Helpers; using InscryptionAPI.Items; using InscryptionAPI.Items.Extensions; using InscryptionAPI.Nodes; using InscryptionAPI.Regions; using InscryptionCommunityPatch.Card; using Pixelplacement; using Sirenix.Utilities; using TMPro; using TalkingCardUtility; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")] [assembly: AssemblyCompany("FiveNightsatInscryption")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("FiveNightsatInscryption")] [assembly: AssemblyTitle("FiveNightsatInscryption")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] public class FnafCardBackground : CardAppearanceBehaviour { public override void ApplyAppearance() { //IL_003c: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) ((CardAppearanceBehaviour)this).Card.renderInfo.baseTextureOverride = (Texture)(object)Tools.LoadTexture("FnafCardback"); ((CardAppearanceBehaviour)this).Card.SetCardback((Texture)(object)Tools.LoadTexture("FnafCardbackBack")); ((CardAppearanceBehaviour)this).Card.renderInfo.healthTextColor = Color.magenta; ((CardAppearanceBehaviour)this).Card.renderInfo.nameTextColor = Color.magenta; ((CardAppearanceBehaviour)this).Card.renderInfo.healthTextOffset = new Vector2(0f, 0.07f); ((CardAppearanceBehaviour)this).Card.renderInfo.defaultAbilityColor = Color.magenta; ((CardAppearanceBehaviour)this).Card.StatsLayer.SetEmissionColor(GameColors.Instance.purple); } } public class FnafGiantCardBackground : CardAppearanceBehaviour { public override void ApplyAppearance() { //IL_003c: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) ((CardAppearanceBehaviour)this).Card.renderInfo.baseTextureOverride = (Texture)(object)Tools.LoadTexture("FnafGiantCardback"); ((CardAppearanceBehaviour)this).Card.SetCardback((Texture)(object)Tools.LoadTexture("FnafCardbackBack")); ((CardAppearanceBehaviour)this).Card.renderInfo.healthTextColor = Color.magenta; ((CardAppearanceBehaviour)this).Card.renderInfo.nameTextColor = Color.magenta; ((CardAppearanceBehaviour)this).Card.renderInfo.healthTextOffset = new Vector2(0f, 0.07f); ((CardAppearanceBehaviour)this).Card.renderInfo.defaultAbilityColor = Color.magenta; ((CardAppearanceBehaviour)this).Card.StatsLayer.SetEmissionColor(GameColors.Instance.purple); } } public class FnafTerrainBackground : CardAppearanceBehaviour { public override void ApplyAppearance() { //IL_003c: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) ((CardAppearanceBehaviour)this).Card.renderInfo.baseTextureOverride = (Texture)(object)Tools.LoadTexture("FnafTerrainCardback"); ((CardAppearanceBehaviour)this).Card.SetCardback((Texture)(object)Tools.LoadTexture("FnafCardbackBack")); ((CardAppearanceBehaviour)this).Card.renderInfo.healthTextColor = Color.magenta; ((CardAppearanceBehaviour)this).Card.renderInfo.nameTextColor = Color.magenta; ((CardAppearanceBehaviour)this).Card.renderInfo.healthTextOffset = new Vector2(0f, 0.07f); ((CardAppearanceBehaviour)this).Card.renderInfo.defaultAbilityColor = Color.magenta; ((CardAppearanceBehaviour)this).Card.StatsLayer.SetEmissionColor(GameColors.Instance.purple); } } public class FnafRareCardBackground : CardAppearanceBehaviour { public override void ApplyAppearance() { //IL_003c: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) ((CardAppearanceBehaviour)this).Card.renderInfo.baseTextureOverride = (Texture)(object)Tools.LoadTexture("FnafRareCardback"); ((CardAppearanceBehaviour)this).Card.SetCardback((Texture)(object)Tools.LoadTexture("FnafCardbackBack")); ((CardAppearanceBehaviour)this).Card.renderInfo.healthTextColor = Color.magenta; ((CardAppearanceBehaviour)this).Card.renderInfo.nameTextColor = Color.magenta; ((CardAppearanceBehaviour)this).Card.renderInfo.healthTextOffset = new Vector2(0f, 0.07f); ((CardAppearanceBehaviour)this).Card.renderInfo.defaultAbilityColor = Color.magenta; ((CardAppearanceBehaviour)this).Card.StatsLayer.SetEmissionColor(GameColors.Instance.purple); } } public class FnafShadowBackground : CardAppearanceBehaviour { public override void ApplyAppearance() { //IL_003c: 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) ((CardAppearanceBehaviour)this).Card.renderInfo.baseTextureOverride = (Texture)(object)Tools.LoadTexture("FnafShadowCardback"); ((CardAppearanceBehaviour)this).Card.SetCardback((Texture)(object)Tools.LoadTexture("FnafShadowCardbackBack")); ((CardAppearanceBehaviour)this).Card.renderInfo.healthTextColor = Color.white; ((CardAppearanceBehaviour)this).Card.renderInfo.portraitColor = new Color(215f, 215f, 215f); ((CardAppearanceBehaviour)this).Card.renderInfo.nameTextColor = Color.white; ((CardAppearanceBehaviour)this).Card.renderInfo.healthTextOffset = new Vector2(-0.05f, 0f); ((CardAppearanceBehaviour)this).Card.renderInfo.defaultAbilityColor = Color.white; ((CardAppearanceBehaviour)this).Card.renderInfo.forceEmissivePortrait = true; ((CardAppearanceBehaviour)this).Card.StatsLayer.SetEmissionColor(GameColors.Instance.brightNearWhite); } } public class CustomAppearences { public static Appearance FnafBackground; public static Appearance FnafGiantBackground; public static Appearance FnafRareBackground; public static Appearance FnafTerrainBackground; public static Appearance FnafShadowBackground; public static void Addappearences() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_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) FnafBackground = CardAppearanceBehaviourManager.Add("Cevin_2006.Inscryption.Fnai", "FnafBackground", typeof(FnafCardBackground)).Id; FnafGiantBackground = CardAppearanceBehaviourManager.Add("Cevin_2006.Inscryption.Fnai", "FnafGiantBackground", typeof(FnafGiantCardBackground)).Id; FnafRareBackground = CardAppearanceBehaviourManager.Add("Cevin_2006.Inscryption.Fnai", "FnafRareBackground", typeof(FnafRareCardBackground)).Id; FnafTerrainBackground = CardAppearanceBehaviourManager.Add("Cevin_2006.Inscryption.Fnai", "FnafTerrainBackground", typeof(FnafTerrainBackground)).Id; FnafShadowBackground = CardAppearanceBehaviourManager.Add("Cevin_2006.Inscryption.Fnai", "FnafShadowBackground", typeof(FnafShadowBackground)).Id; } } public class AttackColor : SpecialCardBehaviour { public static SpecialTriggeredAbility ability; public static void Init() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) ability = SpecialTriggeredAbilityManager.Add("Cevin_2006.Inscryption.Fnai", "AttackColor", typeof(AttackColor)).Id; } public override void ManagedUpdate() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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) if ((Object)(object)((SpecialCardBehaviour)this).PlayableCard != (Object)null && ((Card)((SpecialCardBehaviour)this).PlayableCard).renderInfo != null && ((Card)((SpecialCardBehaviour)this).PlayableCard).renderInfo.attackTextColor != Color.magenta) { ((Card)((SpecialCardBehaviour)this).PlayableCard).renderInfo.attackTextColor = Color.magenta; ((SpecialCardBehaviour)this).Card.RenderInfo.attackTextColor = Color.magenta; ((SpecialCardBehaviour)this).Card.RenderCard(); } } public override bool RespondsToDrawn() { return true; } public override IEnumerator OnDrawn() { ((Card)((SpecialCardBehaviour)this).PlayableCard).renderInfo.attackTextColor = Color.magenta; ((SpecialCardBehaviour)this).Card.RenderInfo.attackTextColor = Color.magenta; ((SpecialCardBehaviour)this).Card.RenderCard(); yield break; } } public class ShadowColors : SpecialCardBehaviour { public static SpecialTriggeredAbility ability; public static void Init() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) ability = SpecialTriggeredAbilityManager.Add("Cevin_2006.Inscryption.Fnai", "ShadowColors", typeof(ShadowColors)).Id; } public override void ManagedUpdate() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((SpecialCardBehaviour)this).PlayableCard != (Object)null && ((Card)((SpecialCardBehaviour)this).PlayableCard).renderInfo != null && ((Card)((SpecialCardBehaviour)this).PlayableCard).renderInfo.attackTextColor != Color.white) { ((Card)((SpecialCardBehaviour)this).PlayableCard).renderInfo.attackTextColor = Color.white; ((SpecialCardBehaviour)this).Card.RenderInfo.attackTextColor = Color.white; ((SpecialCardBehaviour)this).Card.RenderCard(); } string displayedName = Tools.RandomStringfromName(((Object)((SpecialCardBehaviour)this).Card.Info).name); ((SpecialCardBehaviour)this).Card.Info.displayedName = displayedName; } public override bool RespondsToDrawn() { return true; } public override IEnumerator OnDrawn() { string newName = Tools.RandomStringfromName(((Object)((SpecialCardBehaviour)this).Card.Info).name); ((SpecialCardBehaviour)this).Card.Info.displayedName = newName; ((Card)((SpecialCardBehaviour)this).PlayableCard).renderInfo.attackTextColor = Color.white; ((SpecialCardBehaviour)this).Card.RenderInfo.nameOverride = newName; ((SpecialCardBehaviour)this).Card.RenderInfo.attackTextColor = Color.white; ((SpecialCardBehaviour)this).Card.RenderCard(); yield break; } } public static class Tools { public static Assembly _assembly; public static GameObject Particle; public static Assembly CurrentAssembly => _assembly ?? (_assembly = Assembly.GetExecutingAssembly()); public static Texture2D LoadTexture(string name) { if (name == null) { return null; } return TextureHelper.GetImageAsTexture(name + (name.EndsWith(".png") ? "" : ".png"), CurrentAssembly, (FilterMode)0); } public static string RandomStringfromName(string name) { List<char> list = new List<char>(name); Random random = new Random(); string text = ""; while (list.Count > 0) { int index = random.Next(list.Count); text += list[index]; list.RemoveAt(index); } return text; } public static int GetActAsInt() { if (SaveManager.SaveFile.IsPart1) { return 1; } if (SaveManager.SaveFile.IsPart2) { return 2; } if (SaveManager.SaveFile.IsPart3) { return 3; } if (SaveManager.SaveFile.IsGrimora) { return 4; } if (SaveManager.SaveFile.IsMagnificus) { return 5; } return 0; } public static void ShowLeshyMessage(string message) { ((MonoBehaviour)Singleton<TextDisplayer>.Instance).StartCoroutine(Singleton<TextDisplayer>.Instance.ShowThenClear(message, 1.5f, 0f, (Emotion)0, (LetterAnimation)0, (Speaker)1, (string[])null)); } private static bool NameMatchesAsset(Object obj, string nameToCheckFor) { return obj.name.Equals(nameToCheckFor, StringComparison.OrdinalIgnoreCase); } public static IEnumerator MoveCardIntoDeck(PlayableCard card, bool toSideDeck = false, bool randomizeSides = false) { bool is3D = Singleton<BoardManager>.Instance is BoardManager3D; if (Singleton<PlayerHand>.Instance.CardsInHand.Contains(card) && (int)Singleton<ViewManager>.Instance.CurrentView > 0) { yield return (object)new WaitForSeconds(0.2f); Singleton<ViewManager>.Instance.SwitchToView((View)0, false, false); yield return (object)new WaitForSeconds(0.2f); } if (Singleton<PlayerHand>.Instance.CardsInHand.Contains(card)) { Singleton<PlayerHand>.Instance.RemoveCardFromHand(card); } if (is3D && toSideDeck) { Singleton<CardDrawPiles3D>.Instance.sidePile.MoveCardToPile((Card)(object)card, true, 0f, 0.7f); Object.Destroy((Object)(object)((Component)card).gameObject, 1f); } else if (is3D) { Singleton<CardDrawPiles3D>.Instance.pile.MoveCardToPile((Card)(object)card, true, 0f, 0.7f); Object.Destroy((Object)(object)((Component)card).gameObject, 1f); } CreateCardInDeck(((Card)card).Info, toSideDeck, randomizeSides); } public static void CreateCardInDeck(CardInfo info, bool toSideDeck = false, bool randomizeSide = false) { bool flag = Singleton<BoardManager>.Instance is BoardManager3D; if (flag && toSideDeck) { Singleton<CardDrawPiles3D>.Instance.sidePile.CreateCards(1, 15f); Singleton<CardDrawPiles3D>.Instance.SideDeck.AddCard(info); if (randomizeSide) { CustomList.Randomize<CardInfo>((IEnumerable<CardInfo>)Singleton<CardDrawPiles3D>.Instance.SideDeck.Cards); } } else { if (flag) { Singleton<CardDrawPiles3D>.Instance.pile.CreateCards(1, 15f); } ((CardDrawPiles)Singleton<CardDrawPiles3D>.Instance).Deck.AddCard(info); } } public static T GetPrefab<T>(string prefabName) where T : Object { Type typeFromHandle = typeof(T); T result = default(T); try { if (typeFromHandle == typeof(AudioClip)) { AudioClip obj = Plugin.AllSounds.Single((AudioClip go) => NameMatchesAsset((Object)(object)go, prefabName)); return (T)(object)((obj is T) ? obj : null); } if (typeFromHandle == typeof(Material)) { Material obj2 = Plugin.AllMats.Single((Material go) => NameMatchesAsset((Object)(object)go, prefabName)); return (T)(object)((obj2 is T) ? obj2 : null); } if (typeFromHandle == typeof(GameObject)) { GameObject obj3 = Plugin.AllPrefabs.Single((GameObject go) => ((Object)go).name == prefabName); return (T)(object)((obj3 is T) ? obj3 : null); } if (typeFromHandle == typeof(RuntimeAnimatorController)) { RuntimeAnimatorController obj4 = Plugin.AllControllers.Single((RuntimeAnimatorController go) => NameMatchesAsset((Object)(object)go, prefabName)); return (T)(object)((obj4 is T) ? obj4 : null); } if (typeFromHandle == typeof(Sprite)) { Sprite obj5 = Plugin.AllSprites.Single((Sprite go) => NameMatchesAsset((Object)(object)go, prefabName)); return (T)(object)((obj5 is T) ? obj5 : null); } if (typeFromHandle == typeof(Mesh)) { Mesh obj6 = Plugin.AllMesh.Single((Mesh go) => NameMatchesAsset((Object)(object)go, prefabName)); return (T)(object)((obj6 is T) ? obj6 : null); } } catch (Exception) { Plugin.Log.LogError((object)("Unable to find prefab [" + prefabName + "]! This could mean the asset bundle doesn't contain it, or, most likely, your mod manager didn't correctly update the asset bundle files.\n If it worked last update, delete your files and download the mod files again. \n There's a weird issue with how mod managers handle asset bundle between mod updates.")); throw; } return result; } public static void RecolorAllMaterials(GameObject obj, Color color, Texture texture = null, bool emissive = false, string[] shaderKeywords = null, bool forceEnable = false) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_009b: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) Color val = default(Color); ((Color)(ref val))..ctor(color.r, color.g, color.b); val.a = 0.5f; Renderer[] componentsInChildren = obj.GetComponentsInChildren<Renderer>(); foreach (Renderer val2 in componentsInChildren) { if (forceEnable) { val2.enabled = true; } Material[] materials = val2.materials; foreach (Material val3 in materials) { if (emissive) { val3.globalIlluminationFlags = (MaterialGlobalIlluminationFlags)0; val3.EnableKeyword("_EMISSION"); } if (val3.HasProperty("_EmissionColor")) { val3.SetColor("_EmissionColor", color * 0.5f); } if (val3.HasProperty("_MainColor")) { val3.SetColor("_MainColor", color); } if (val3.HasProperty("_RimColor")) { val3.SetColor("_RimColor", color); } if (val3.HasProperty("_Color")) { val3.SetColor("_Color", val); } } } } public static void EnableWall() { ((Component)GameObject.Find("GlitchtrapScenery").transform.Find("Wall").Find("WallToBeGoner")).gameObject.SetActive(true); } public static void DisableWall() { ((Component)GameObject.Find("GlitchtrapScenery").transform.Find("Wall").Find("WallToBeGoner")).gameObject.SetActive(false); } public static ConsumableItemData MakeItem(string rulebookName, string rulebookDescription, string texturePath, Type type, ModelType modelType, string learnText = null) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) Texture2D val = LoadTexture(texturePath); return ConsumableItemDataExtensions.SetAct1(ConsumableItemDataExtensions.SetLearnItemDescription(ConsumableItemManager.New("Cevin_2006.Inscryption.Fnai", rulebookName, rulebookDescription, val, type, modelType), learnText)); } public static void SetupNewNavGrid() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: 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_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Unknown result type (might be due to invalid IL or missing references) if (AscensionSaveData.Data.activeChallenges.Contains(Plugin.BadPcChallenge)) { return; } NavigationGrid navGrid = Object.FindObjectsOfType<NavigationGrid>().Single((NavigationGrid grid) => ((Object)grid).name == "CabinNavigationGrid"); navGrid.zones = new NavigationZone[10, 10]; NavigationZone[,] zones = navGrid.zones; for (int i = 0; i < zones.GetLength(0); i++) { for (int j = 0; j < zones.GetLength(1); j++) { zones[i, j] = null; } } navGrid.zones = zones; NavigationZone3D south = ((Component)((Component)navGrid).transform.Find("South Middle")).GetComponent<NavigationZone3D>(); Object.Destroy((Object)(object)((Component)((Component)navGrid).transform.Find("South East")).gameObject); Object.Destroy((Object)(object)((Component)((Component)navGrid).transform.Find("Middle Middle")).gameObject); Object.Destroy((Object)(object)((Component)((Component)navGrid).transform.Find("Middle East")).gameObject); Object.Destroy((Object)(object)((Component)((Component)navGrid).transform.Find("North Middle")).gameObject); Object.Destroy((Object)(object)((Component)((Component)navGrid).transform.Find("North East")).gameObject); NavigationZone component = ((Component)((Component)navGrid).transform.Find("Player Seat")).GetComponent<NavigationZone>(); ((Object)component).name = "9_2_Player Seat"; navGrid.InsertZone(component, 9, 2); NavigationZone3D val = CreateZone("South Middle2", new Vector3(-19.158f, 0f, 10f), 8, 1); NavigationZone3D val2 = CreateZone("South East", new Vector3(-53.31f, 0f, 10f), 7, 1); NavigationZone3D val3 = CreateZone("Middle Middle", new Vector3(-14.75f, 0f, 1.22f), 8, 2); NavigationZone3D val4 = CreateZone("Middle East", new Vector3(-47.48f, 0f, -17.9f), 7, 2); NavigationZone3D val5 = CreateZone("North Middle", new Vector3(-23.6544f, 0f, -39.86f), 8, 3); NavigationZone3D val6 = CreateZone("North East", new Vector3(-32.36f, 0f, -39.86f), 7, 3); NavigationZone3D val7 = CreateZone("Room2South", new Vector3(-35.19f, 0f, -70.87f), 7, 4); NavigationZone3D val8 = CreateZone("Room2Middle", new Vector3(-35.19f, 0f, -97.5f), 7, 5); NavigationZone3D val9 = CreateZone("Room2North", new Vector3(-35.19f, 0f, -122.5f), 7, 6); NavigationZone3D val10 = CreateZone("Room2East", new Vector3(-52.7f, 0f, -105.4f), 6, 5); NavigationZone3D val11 = CreateZone("Room2West", new Vector3(-8f, 0f, -97.7f), 7, 5); NavigationZone3D val12 = CreateZone("Room3_Doorway", new Vector3(-62.45f, 0f, -101.69f), 5, 5); NavigationZone3D val13 = CreateZone("Room3_l", new Vector3(-76.8f, 0f, -126.2f), 4, 6); NavigationZone3D val14 = CreateZone("Room3_l2", new Vector3(-103.6f, 0f, -126.2f), 3, 6); NavigationZone3D val15 = CreateZone("Room3_l3", new Vector3(-126.5f, 0f, -126.2f), 2, 6); NavigationZone3D val16 = CreateZone("Room3_l4", new Vector3(-150.1f, 0f, -126.2f), 1, 6); NavigationZone3D val17 = CreateZone("Room3_m", new Vector3(-76.8f, 0f, -100.3f), 4, 5); NavigationZone3D val18 = CreateZone("Room3_m2", new Vector3(-103.6f, 0f, -100.3f), 3, 5); NavigationZone3D val19 = CreateZone("Room3_m3", new Vector3(-126.5f, 0f, -100.3f), 2, 5); NavigationZone3D val20 = CreateZone("Room3_m4", new Vector3(-150.1f, 0f, -100.3f), 1, 5); NavigationZone3D val21 = CreateZone("Room3_r", new Vector3(-76.8f, 0f, -74.1f), 4, 4); NavigationZone3D val22 = CreateZone("Room3_r2", new Vector3(-103.6f, 0f, -74.1f), 3, 4); NavigationZone3D val23 = CreateZone("Room3_r3", new Vector3(-126.5f, 0f, -74.1f), 2, 4); NavigationZone3D val24 = CreateZone("Room3_r4", new Vector3(-150.1f, 0f, -74.1f), 1, 4); NavigationZone3D CreateZone(string name, Vector3 position, int x, int y) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) NavigationZone3D component2 = ((Component)Object.Instantiate<NavigationZone3D>(south, position, Quaternion.identity, ((Component)navGrid).transform)).GetComponent<NavigationZone3D>(); ((Object)component2).name = $"x{x}_y{y}_" + name; Plugin.Log.LogInfo((object)("Creating zone [" + ((Object)component2).name + "]")); navGrid.InsertZone((NavigationZone)(object)component2, x, y); return component2; } } public static void SpawnParticlesOnCard(this PlayableCard target, Texture2D tex, float yOffset = 0f) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((Card)target).Anim) || !(((Card)target).Anim is PaperCardAnimationController)) { return; } CardAnimationController anim = ((Card)target).Anim; PaperCardAnimationController val = (PaperCardAnimationController)(object)((anim is PaperCardAnimationController) ? anim : null); if (Object.op_Implicit((Object)(object)val.deathParticles)) { GameObject val2 = Object.Instantiate<GameObject>(val.deathParticles); ParticleSystem component = val2.GetComponent<ParticleSystem>(); if (Object.op_Implicit((Object)(object)component)) { MainModule main = component.main; ((Renderer)((Component)component).GetComponent<ParticleSystemRenderer>()).material = new Material(((Renderer)((Component)component).GetComponent<ParticleSystemRenderer>()).material) { mainTexture = (Texture)(object)tex }; EmissionModule emission = component.emission; ((EmissionModule)(ref emission)).enabled = true; ((MainModule)(ref main)).startColor = new MinMaxGradient(Color.white); val2.SetActive(true); val2.transform.SetParent(((Component)val).transform); val2.transform.position = val.deathParticles.transform.position; val2.transform.localScale = val.deathParticles.transform.localScale; val2.transform.rotation = val.deathParticles.transform.rotation; ((Component)component).transform.position = new Vector3(((Component)component).transform.position.x, ((Component)component).transform.position.y + yOffset, ((Component)component).transform.position.z); Object.Destroy((Object)(object)val2, 6f); } } } public static List<CardInfo> GetAgonyCards() { return (List<CardInfo>)(from x in CardLoader.GetUnlockedCards((CardMetaCategory)0, (CardTemple)0) where CardExtensions.GetExtendedPropertyAsInt(x, "RemnantCost") != 0 select x); } public static CardInfo GetRandomAgonyCard(int randomSeed) { List<CardInfo> agonyCards = GetAgonyCards(); return CardLoader.Clone(agonyCards[SeededRandom.Range(0, agonyCards.Count, randomSeed)]); } public static bool HasEnoughAgony(CardInfo info) { int num = info.RemnantCost(); int remnant = Remnant_Cost.Remnant; bool flag = num > remnant; return !flag; } public static CardBlueprint bp_Create(CardInfo name, CardInfo replacement, int replaceChance, int minDifficulty, int maxDifficulty) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown return new CardBlueprint { card = name, replacement = replacement, randomReplaceChance = replaceChance, minDifficulty = minDifficulty, maxDifficulty = maxDifficulty }; } public static EncounterBlueprintData CreateBlueprint(string name, List<CardInfo> info, List<CardInfo> infoReplacement, int turnNumber, int minDifficulty, int maxDifficulty, List<Tribe> favoredTribes, bool regionLocked = true) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown EncounterBlueprintData val = new EncounterBlueprintData(); for (int i = 0; i <= turnNumber; i++) { int num = Random.Range(0, 4); List<CardBlueprint> list = new List<CardBlueprint>(); CardInfo name2 = info[Random.Range(0, info.Count)]; CardInfo replacement = infoReplacement[Random.Range(0, infoReplacement.Count)]; int replaceChance = Random.Range(0, 100); list.Add(bp_Create(name2, replacement, replaceChance, minDifficulty, maxDifficulty)); for (int j = 0; j <= num; j++) { CardInfo name3 = info[Random.Range(0, info.Count)]; CardInfo replacement2 = infoReplacement[Random.Range(0, infoReplacement.Count)]; int replaceChance2 = Random.Range(0, 100); list.Add(bp_Create(name3, replacement2, replaceChance2, minDifficulty, maxDifficulty)); } val.turns[i] = list; } val.dominantTribes = favoredTribes; val.regionSpecific = regionLocked; ((Object)val).name = name; return val; } public static T GetRandomItem<T>(this List<T> self) { if (self.Count() > 0) { return self[Random.Range(0, self.Count)]; } return default(T); } public static int PowerLevel(CardInfo card) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) int attack = card.Attack; int num = card.Health / 2; int num2 = 0; foreach (Ability ability in card.abilities) { num2 += AbilitiesUtil.GetInfo(ability).powerLevel; } int num3 = attack + num + num2; if (CardExtensions.HasCardMetaCategory(card, (CardMetaCategory)3)) { num3 += 5; } num3 += card.BloodCost; num3 += card.bonesCost / 3; num3 += card.energyCost / 2; return num3 + card.gemsCost.Count; } public static void CreateRandomFnafBlueprint() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) EncounterBlueprintData val = ScriptableObject.CreateInstance<EncounterBlueprintData>(); List<Tribe> list = new List<Tribe> { Plugin.Classic, Plugin.Withered, Plugin.Toy, Plugin.Phantom, Plugin.Nightmare, Plugin.Funtime, Plugin.Scrap }; Tribe favoredTribe = list[1]; Plugin.Log.LogDebug((object)("Dominant Tribe: " + ((object)(Tribe)(ref favoredTribe)).ToString())); int num = Random.Range(1, 10); Plugin.Log.LogDebug((object)("Number of Turns: " + num)); for (int i = 0; i <= num; i++) { int num2 = Random.Range(0, 4); Plugin.Log.LogDebug((object)("Number of Extra Cards in Turn " + i + " : " + num2)); List<CardBlueprint> list2 = new List<CardBlueprint>(); List<CardInfo> list3 = ScriptableObjectLoader<CardInfo>.AllData.FindAll((CardInfo x) => ((Object)x).name.Contains("Fnai") && x.tribes.Contains(favoredTribe) && !x.metaCategories.Contains((CardMetaCategory)3)); List<CardInfo> list4 = ScriptableObjectLoader<CardInfo>.AllData.FindAll((CardInfo x) => ((Object)x).name.Contains("Fnai") && x.tribes.Contains(favoredTribe) && !x.metaCategories.Contains((CardMetaCategory)3)); List<CardInfo> list5 = ScriptableObjectLoader<CardInfo>.AllData.FindAll((CardInfo x) => ((Object)x).name.Contains("Fnai") && x.tribes.Contains(favoredTribe) && x.metaCategories.Contains((CardMetaCategory)3)); List<CardInfo> list6 = ScriptableObjectLoader<CardInfo>.AllData.FindAll((CardInfo x) => ((Object)x).name.Contains("Fnai") && x.tribes.Contains(favoredTribe) && x.metaCategories.Contains((CardMetaCategory)3)); CardInfo val2 = list3[Random.Range(0, list3.Count)]; CardInfo val3 = list4[Random.Range(0, list4.Count)]; int num3 = Random.Range(0, 5); if (num3 == 1) { val2 = list5[Random.Range(0, list5.Count)]; val3 = list6[Random.Range(0, list6.Count)]; } if ((Object)(object)val2 == (Object)null || (Object)(object)val3 == (Object)null) { val2 = list3[Random.Range(0, list3.Count)]; val3 = list4[Random.Range(0, list4.Count)]; } Plugin.Log.LogDebug((object)("Card: " + ((Object)val2).name + " Replacement: " + ((Object)val2).name)); int minDifficulty = Random.Range(0, 20); int maxDifficulty = Random.Range(0, 20); Plugin.Log.LogDebug((object)("MinDifficulty: " + minDifficulty + " MaxDifficulty: " + maxDifficulty)); int replaceChance = Random.Range(0, 100); list2.Add(bp_Create(val2, val3, replaceChance, minDifficulty, maxDifficulty)); for (int j = 0; j <= num2; j++) { CardInfo name = list3[Random.Range(0, list3.Count)]; CardInfo replacement = list4[Random.Range(0, list4.Count)]; int num4 = Random.Range(0, 5); if (num4 == 1) { name = list5[Random.Range(0, list5.Count)]; replacement = list6[Random.Range(0, list6.Count)]; } if ((Object)(object)val2 == (Object)null || (Object)(object)val3 == (Object)null) { name = list3[Random.Range(0, list3.Count)]; replacement = list4[Random.Range(0, list4.Count)]; } Plugin.Log.LogDebug((object)("extraCard" + j + " : " + ((Object)val2).name + " extraReplacement" + j + " : " + ((Object)val2).name)); int replaceChance2 = Random.Range(0, 100); list2.Add(bp_Create(name, replacement, replaceChance2, minDifficulty, maxDifficulty)); } val.turns[i] = list2; } val.dominantTribes.Add(favoredTribe); EncounterManager.Add(val); } } public static class CardExtensions { public static CardInfo GetCardInfo(this string self) { return CardManager.AllCardsCopy.Single((CardInfo info) => ((Object)info).name == self); } public static void RemoveAbilityFromThisCard(this PlayableCard playableCard, CardModificationInfo modInfo, Action callback = null) { object obj = ((Card)playableCard).Info.Clone(); CardInfo val = (CardInfo)((obj is CardInfo) ? obj : null); val.Mods.Add(modInfo); ((Card)playableCard).SetInfo(val); callback?.Invoke(); } } public static class Remnant_Cost { public static int Remnant; public static int RemnantCost(this CardInfo card) { return CardExtensions.GetExtendedPropertyAsInt(card, "RemnantCost").GetValueOrDefault(); } public static void AddRemnant(int amount) { Remnant += amount; } public static void SpendRemnant(int amount) { if (amount >= Remnant) { Remnant -= amount; } else { amount = 0; } } } public class UpdateRemnantCost : MonoBehaviour { private TextMeshPro tabletText; private void Start() { tabletText = ((Component)this).gameObject.GetComponentInChildren<TextMeshPro>(); } public void Update() { ((TMP_Text)tabletText).SetText(Remnant_Cost.Remnant.ToString(), true); } } public class LookAtCamera : ManagedBehaviour { public static bool Rainbow; public static bool Glitched; public Transform PlayerCamera = GameObject.Find("FirstPersonController").transform.Find("PixelCameraParent").Find("Pixel Camera"); public override void ManagedUpdate() { } public void EnnardMaskOn() { ((Component)GameObject.Find("MALHAREBIG").transform.Find("MalhareFat").Find("Springtrap").Find("metarig") .Find("spine") .Find("spine.001") .Find("spine.002") .Find("spine.003") .Find("spine.004") .Find("spine.005") .Find("spine.006") .Find("MaskParent") .Find("EnnardMask")).gameObject.SetActive(true); } public void EnnardMaskOff() { ((Component)GameObject.Find("MALHAREBIG").transform.Find("MalhareFat").Find("Springtrap").Find("metarig") .Find("spine") .Find("spine.001") .Find("spine.002") .Find("spine.003") .Find("spine.004") .Find("spine.005") .Find("spine.006") .Find("MaskParent") .Find("EnnardMask")).gameObject.SetActive(false); } public void EnableMXES() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = GameObject.Find("MALHAREBIG").gameObject; Tween.Position(gameObject.transform, gameObject.transform.position + new Vector3(0f, 0f, -10f), 2f, 0f, (AnimationCurve)null, (LoopType)0, (Action)null, (Action)null, true); GameObject val = Object.Instantiate<GameObject>(Tools.GetPrefab<GameObject>("BlackRabbit")); } public void DisableMXES() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = GameObject.Find("MALHAREBIG").gameObject; Tween.Position(gameObject.transform, gameObject.transform.position + new Vector3(0f, 0f, 10f), 2f, 0f, (AnimationCurve)null, (LoopType)0, (Action)null, (Action)null, true); GameObject gameObject2 = GameObject.Find("BlackRabbit").gameObject; Object.Destroy((Object)(object)gameObject2); } } public class RainbowMat : MonoBehaviour { public float rainbowSpeed; public bool randomize; private float hue; private float sat; private float bri; private MeshRenderer meshRenderer; private void Start() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) meshRenderer = ((Component)this).GetComponent<MeshRenderer>(); if (randomize) { hue = Random.Range(0f, 1f); } sat = 1f; bri = 1f; ((Renderer)meshRenderer).material.color = Color.HSVToRGB(hue, sat, bri); } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) Color.RGBToHSV(((Renderer)meshRenderer).material.color, ref hue, ref sat, ref bri); hue += rainbowSpeed / 5000f; if (hue >= 1f) { hue = 0f; } ((Renderer)meshRenderer).material.color = Color.HSVToRGB(hue, sat, bri); } } public class ClickOnChicaHead : MonoBehaviour { public GameObject ChicaHead = ((Component)GameObject.Find("GlitchtrapScenery").transform.Find("chicafixeduvs").Find("RIG_WitheredChica.ao").Find("C_World_jnt") .Find("Hips_jnt") .Find("Spine_jnt") .Find("Neck_jnt") .Find("Head_jnt") .Find("UpperHead")).gameObject; public GameObject ChicaEyes = ((Component)GameObject.Find("GlitchtrapScenery").transform.Find("chicafixeduvs").Find("RIG_WitheredChica.ao").Find("C_World_jnt") .Find("Hips_jnt") .Find("Spine_jnt") .Find("Neck_jnt") .Find("Head_jnt") .Find("Eyes")).gameObject; private Camera camera; public bool headNewPos; private void Start() { camera = Camera.main; headNewPos = false; } private void Update() { DetectObjectWithRaycast(); } public void DetectObjectWithRaycast() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) if (!Input.GetMouseButtonDown(0)) { return; } Ray val = camera.ScreenPointToRay(Input.mousePosition); RaycastHit val2 = default(RaycastHit); if (!Physics.Raycast(val, ref val2)) { return; } Debug.Log((object)(((Object)((RaycastHit)(ref val2)).collider).name + " Detected"), (Object)(object)((Component)((RaycastHit)(ref val2)).collider).gameObject); if (((Object)(object)((RaycastHit)(ref val2)).transform != (Object)null && ((Object)((RaycastHit)(ref val2)).transform).name == "UpperHead") || ((Object)(object)((RaycastHit)(ref val2)).transform != (Object)null && ((Object)((RaycastHit)(ref val2)).transform).name == "Eyes")) { if (!headNewPos) { Tween.Rotate(ChicaHead.transform, new Vector3(20.376f, 0f, 0f), (Space)0, 1f, 0.3f, (AnimationCurve)null, (LoopType)0, (Action)null, (Action)null, true); Tween.Position(ChicaEyes.transform, new Vector3(0f, 0.234f, 0.172f), 1f, 0.1f, (AnimationCurve)null, (LoopType)0, (Action)null, (Action)null, true); } else { Tween.Rotate(ChicaHead.transform, new Vector3(54.309f, 0f, 0f), (Space)0, 1f, 0.3f, (AnimationCurve)null, (LoopType)0, (Action)null, (Action)null, true); Tween.Position(ChicaEyes.transform, new Vector3(0f, 0.101f, 0.238f), 1f, 0.1f, (AnimationCurve)null, (LoopType)0, (Action)null, (Action)null, true); } } } } public class BigMalhareAnimatedPortrait : ManagedBehaviour { public void Start() { } public void Grimora() { ((Component)((Component)this).transform.Find("Anim")).GetComponent<Animator>().ResetTrigger("Magnificus"); ((Component)((Component)this).transform.Find("Anim")).GetComponent<Animator>().ResetTrigger("P03"); ((Component)((Component)this).transform.Find("Anim")).GetComponent<Animator>().SetTrigger("Grimora"); } public void Magnificus() { ((Component)((Component)this).transform.Find("Anim")).GetComponent<Animator>().ResetTrigger("Grimora"); ((Component)((Component)this).transform.Find("Anim")).GetComponent<Animator>().ResetTrigger("P03"); ((Component)((Component)this).transform.Find("Anim")).GetComponent<Animator>().SetTrigger("Magnificus"); } public void P03() { ((Component)((Component)this).transform.Find("Anim")).GetComponent<Animator>().ResetTrigger("Grimora"); ((Component)((Component)this).transform.Find("Anim")).GetComponent<Animator>().ResetTrigger("Magnificus"); ((Component)((Component)this).transform.Find("Anim")).GetComponent<Animator>().SetTrigger("P03"); } } public class ConfigHelper { private static readonly List<StoryEvent> StoryEventsToBeCompleteBeforeStarting = new List<StoryEvent> { (StoryEvent)0, (StoryEvent)1, (StoryEvent)4, (StoryEvent)5, (StoryEvent)38 }; public const string P03ModGuid = "zorro.inscryption.infiniscryption.p03kayceerun"; public const string GrimorasModGuid = "arackulele.inscryption.grimoramod"; public const string PackManagerGuid = "zorro.inscryption.infiniscryption.packmanager"; private static ConfigHelper m_Instance; public static ConfigHelper Instance => m_Instance ?? (m_Instance = new ConfigHelper()); public static bool HasIncreaseSlotsMod => Harmony.HasAnyPatches("julianperge.inscryption.act1.increaseCardSlots"); public static bool HasP03Mod => Harmony.HasAnyPatches("zorro.inscryption.infiniscryption.p03kayceerun"); public static bool HasGrimoraMod => Harmony.HasAnyPatches("arackulele.inscryption.grimoramod"); private static void UnlockAllNecessaryEventsToPlay() { if (!StoryEventsToBeCompleteBeforeStarting.TrueForAll((Predicate<StoryEvent>)StoryEventsData.EventCompleted)) { Plugin.Log.LogWarning((object)"You haven't completed a required event... Starting unlock process"); StoryEventsToBeCompleteBeforeStarting.ForEach(delegate(StoryEvent evt) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) StoryEventsData.SetEventCompleted(evt, false, true); }); try { ProgressionData.UnlockAll(); } catch (Exception) { Plugin.Log.LogError((object)"Failed to unlock all necessary mechanics with [ProgressionData.UnlockAll]. There's something wrong with your save file or your computer reading data/files. This should not throw an exception and I have no idea how to fix this for you.If the combat bell doesn't show up, restart your game."); } SaveManager.SaveToFile(true); } } } namespace TalkingCardUtility { public static class TextureLoadUtility { public static Sprite ConvertTexToSprite(Texture2D tex, Vector2? pivot = null) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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) Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(0.5f, 0.5f); if (pivot.HasValue) { ((Vector2)(ref val))..ctor(pivot.Value.x, pivot.Value.y); } ((Texture)tex).filterMode = (FilterMode)0; return Sprite.Create(tex, new Rect(0f, 0f, (float)((Texture)tex).width, (float)((Texture)tex).height), val, 100f); } public static Texture2D LoadTex(string path) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown byte[] array = ExtractEmbeddedResource(path); Texture2D val = new Texture2D(2, 2); ImageConversion.LoadImage(val, array); ((Texture)val).filterMode = (FilterMode)0; return val; } public static byte[] ExtractEmbeddedResource(string filePath) { filePath = filePath.Replace("/", "."); filePath = filePath.Replace("\\", "."); Assembly callingAssembly = Assembly.GetCallingAssembly(); using Stream stream = callingAssembly.GetManifestResourceStream(filePath); if (stream == null) { return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); return array; } } public static class DialogueEventGenerator { public static DialogueEvent GenerateEvent(string name, List<CustomLine> mainLines, List<List<CustomLine>> repeatLines, MaxRepeatsBehaviour afterMaxRepeats) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_005d: 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) DialogueEvent val = new DialogueEvent(); List<Speaker> speakers = new List<Speaker> { (Speaker)0 }; val.id = name; val.mainLines = new LineSet(mainLines.ConvertAll((CustomLine x) => x.ToLine(speakers))); val.repeatLines = repeatLines.ConvertAll((Converter<List<CustomLine>, LineSet>)((List<CustomLine> x) => new LineSet(x.ConvertAll((CustomLine x2) => x2.ToLine(speakers))))); val.maxRepeatsBehaviour = afterMaxRepeats; val.speakers = new List<Speaker>(speakers); DialogueDataUtil.Data?.events?.Add(val); return val; } } public class CustomLine { public Face p03Face; public Emotion emotion; public LetterAnimation letterAnimation; public Speaker speaker; public string text; public string specialInstruction; public StoryEvent storyCondition = (StoryEvent)0; public bool storyConditionMustBeMet; public Line ToLine(List<Speaker> speakers) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_004f: 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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown if (!speakers.Contains(speaker)) { speakers.Add(speaker); } return new Line { p03Face = p03Face, emotion = emotion, letterAnimation = letterAnimation, speakerIndex = speakers.IndexOf(speaker), text = (text ?? ""), specialInstruction = (specialInstruction ?? ""), storyCondition = storyCondition, storyConditionMustBeMet = storyConditionMustBeMet }; } public static implicit operator CustomLine(string str) { return new CustomLine { text = str }; } public static implicit operator CustomLine((string, LetterAnimation, Emotion) param) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) return new CustomLine { text = param.Item1, emotion = param.Item3, letterAnimation = param.Item2 }; } public static implicit operator CustomLine((string, LetterAnimation) param) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) CustomLine customLine = new CustomLine(); (customLine.text, customLine.letterAnimation) = param; return customLine; } public static implicit operator CustomLine((string, LetterAnimation, Speaker) param) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) return new CustomLine { text = param.Item1, speaker = param.Item3, letterAnimation = param.Item2 }; } public static implicit operator CustomLine((string, LetterAnimation, Speaker, Emotion) param) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) return new CustomLine { text = param.Item1, speaker = param.Item3, letterAnimation = param.Item2, emotion = param.Item4 }; } public static implicit operator CustomLine((string, Emotion) param) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) CustomLine customLine = new CustomLine(); (customLine.text, customLine.emotion) = param; return customLine; } public static implicit operator CustomLine((string, Emotion, Speaker) param) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) return new CustomLine { text = param.Item1, speaker = param.Item3, emotion = param.Item2 }; } public static implicit operator CustomLine((string, Speaker) param) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) CustomLine customLine = new CustomLine(); (customLine.text, customLine.speaker) = param; return customLine; } } } namespace FiveNightsatInscryption { [BepInPlugin("Cevin_2006.Inscryption.Fnai", "Fnai", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public class ExpertMalhareBossOpponent : Part1BossOpponent { public GameObject MalhareSurround; public GameObject MalhareBig; private GameObject MalharePerson = GameObject.Find("MalhareGiant"); public static readonly FullOpponent FullOpponent = OpponentManager.Add("Cevin_2006.Inscryption.Fnai", "MalhareBoss", ExpertMalhareSpecialBattleSequencer.FullSequencer.Id, typeof(ExpertMalhareBossOpponent)); public static string actualDefeat = "Finally, another Victim..."; public bool playedReducedDamageDialogue; public override string DefeatedPlayerDialogue => actualDefeat; public override bool GiveCurrencyOnDefeat => false; public override int StartingLives => 3; public bool DamageShouldBeReduced() { return Singleton<BoardManager>.Instance.OpponentSlotsCopy.Exists((CardSlot x) => (Object)(object)x.Card != (Object)null && !x.Card.Dead); } public override IEnumerator IntroSequence(EncounterData encounter) { yield return <>n__0(encounter); Singleton<ViewManager>.Instance.SwitchToView((View)19, false, false); yield return (object)new WaitForSeconds(0.25f); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Are you ready?", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return (object)new WaitForSeconds(0.4f); base.bossSkull.EnterHand(); MalhareSurround = GameObject.Find("MalhareParent"); ((Component)MalhareSurround.transform.Find("MalhareSurrounding(Clone)")).gameObject.SetActive(true); yield return (object)new WaitForSeconds(2f); Singleton<ViewManager>.Instance.SwitchToView((View)34, false, false); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Let us enjoy this Fight.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("[c:bR]As it will be your last.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); AudioController.Instance.SetLoopAndPlay("Phase1", 0, true, true); AudioController.Instance.SetLoopVolumeImmediate(0.5f, 0); } public override IEnumerator StartNewPhaseSequence() { if (((Opponent)this).NumLives == 2) { yield return Start2ndPhase(); } else if (((Opponent)this).NumLives <= 1) { yield return Start3rdPhase(); } } public IEnumerator Start2ndPhase() { AudioController.Instance.FadeOutLoop(1f, new int[2] { 0, 1 }); Singleton<ViewManager>.Instance.SwitchToView((View)34, false, false); Singleton<ViewManager>.Instance.Controller.LockState = (ViewLockState)1; yield return (object)new WaitForSeconds(0.25f); yield return ((Opponent)this).ClearQueue(); yield return ((Opponent)this).ClearBoard(); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("I see...", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Seems like all your cards are turning against you!", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); foreach (CardSlot slot in Singleton<BoardManager>.Instance.PlayerSlotsCopy) { if ((Object)(object)slot.Card != (Object)null) { PlayableCard card = slot.Card; CardSlot OppSlot = CardExtensions.OpposingSlot(card); yield return Singleton<BoardManager>.Instance.AssignCardToSlot(card, OppSlot, 0.1f, (Action)null, true); yield return (object)new WaitForSeconds(0.2f); yield return (object)new WaitForSeconds(0.45f); } } yield return (object)new WaitForSeconds(0.25f); AudioController.Instance.SetLoopAndPlay("Phase2", 0, true, true); AudioController.Instance.SetLoopVolumeImmediate(1f, 0); Singleton<ViewManager>.Instance.Controller.LockState = (ViewLockState)0; } public IEnumerator Start3rdPhase() { AudioController.Instance.FadeOutLoop(1f, new int[1]); AudioController.Instance.FadeOutLoop(1f, new int[1] { 1 }); Debug.LogWarning((object)"01001001 00100000 01100001 01101100 01110111 01100001 01111001 01110011 00100000 01100011 01101111 01101101 01100101 00100000 01100010 01100001 01100011 01101011 00100001"); yield return ((Opponent)this).ClearQueue(); yield return ((Opponent)this).ClearBoard(); foreach (CardSlot slot in Singleton<BoardManager>.Instance.PlayerSlotsCopy) { if ((Object)(object)slot.Card != (Object)null) { PlayableCard card = slot.Card; ((Card)slot.Card).ExitBoard(0.4f, Vector3.zero); yield return Singleton<CardSpawner>.Instance.SpawnCardToHand(((Card)card).Info, card.temporaryMods, 0.25f, (Action<PlayableCard>)null); yield return (object)new WaitForSeconds(0.45f); } } Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false); yield return (object)new WaitForSeconds(0.5f); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("This is taking too long.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<BoardManager>.Instance.CreateCardInSlot(CardLoader.GetCardByName("Fnai_!GIANTCARD_MALHARE"), Singleton<BoardManager>.Instance.OpponentSlotsCopy[0], 0.1f, true); yield return (object)new WaitForSeconds(0.2f); AudioController.Instance.PlaySound3D("map_slam", (MixerGroup)4, ((Component)Singleton<BoardManager>.Instance).transform.position, 1f, 0f, (Pitch)null, (Repetition)null, (Randomization)null, (Distortion)null, false); yield return (object)new WaitForSeconds(1f); AudioController.Instance.SetLoopAndPlay("Phase3", 0, true, true); AudioController.Instance.SetLoopVolumeImmediate(1f, 0); yield return (object)new WaitForSeconds(0.5f); Singleton<ViewManager>.Instance.SwitchToView((View)6, false, false); yield return (object)new WaitForSeconds(0.5f); } public override IEnumerator LifeLostSequence() { if (((Opponent)this).NumLives == 0) { yield return (object)new WaitForSeconds(0.1f); Singleton<ViewManager>.Instance.SwitchToView((View)21, false, true); Singleton<InteractionCursor>.Instance.SetHidden(true); Singleton<UIManager>.Instance.Effects.GetEffect<ScreenColorEffect>().SetColor(Color.black); ((ScreenEffect)Singleton<UIManager>.Instance.Effects.GetEffect<ScreenColorEffect>()).SetIntensity(1f, 1f); yield return (object)new WaitForSeconds(1f); ((Part1BossOpponent)this).EndAscensionRun(); SceneLoader.Load("Ascension_Credits"); yield break; } if (((Opponent)this).NumLives == 1) { yield return CustomReplaceBlueprint(MalhareBossP2); CustomCoroutine.WaitThenExecute(1.25f, (Action)delegate { AudioController.Instance.FadeOutLoop(1f, new int[1]); }, false); } if (((Opponent)this).NumLives == 2) { } yield return <>n__1(); } public override void SetSceneEffectsShown(bool showEffects) { //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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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) if (showEffects) { Color darkPurple = GameColors.Instance.darkPurple; darkPurple.a = 0.5f; Singleton<TableVisualEffectsManager>.Instance.ChangeTableColors(GameColors.Instance.purple, GameColors.Instance.lightPurple, ((Part1Opponent)this).InteractablesGlowColor, darkPurple, GameColors.Instance.purple, GameColors.Instance.lightPurple, darkPurple, GameColors.Instance.purple, GameColors.Instance.lightPurple); ExplorableAreaManager instance = Singleton<ExplorableAreaManager>.Instance; ((CabinManager)((instance is CabinManager) ? instance : null)).SetWestWallHidden(true); } else { Singleton<TableVisualEffectsManager>.Instance.ResetTableColors(); ExplorableAreaManager instance2 = Singleton<ExplorableAreaManager>.Instance; ((CabinManager)((instance2 is CabinManager) ? instance2 : null)).SetWestWallHidden(false); } } public IEnumerator CustomReplaceBlueprint(EncounterBlueprintData blueprintId, bool removeLockedCards = false) { ((Opponent)this).Blueprint = blueprintId; int difficulty = 0; if (Singleton<TurnManager>.Instance.BattleNodeData != null) { difficulty = Singleton<TurnManager>.Instance.BattleNodeData.difficulty + RunState.Run.DifficultyModifier; } List<List<CardInfo>> plan = EncounterBuilder.BuildOpponentTurnPlan(((Opponent)this).Blueprint, difficulty, removeLockedCards); ((Opponent)this).ReplaceAndAppendTurnPlan(plan); yield return ((Opponent)this).QueueNewCards(true, true); } public static void CustomEndAscensionRun() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) AscensionMenuScreens.ReturningFromSuccessfulRun = true; AscensionStatsData.TryIncrementStat((Type)2); AscensionStatsData.TryIncrementStat((Type)0); foreach (AscensionChallenge activeChallenge in AscensionSaveData.Data.activeChallenges) { if (!AscensionSaveData.Data.conqueredChallenges.Contains(activeChallenge)) { AscensionSaveData.Data.conqueredChallenges.Add(activeChallenge); } } if (!string.IsNullOrEmpty(AscensionSaveData.Data.currentStarterDeck) && !AscensionSaveData.Data.conqueredStarterDecks.Contains(AscensionSaveData.Data.currentStarterDeck)) { AscensionSaveData.Data.conqueredStarterDecks.Add(AscensionSaveData.Data.currentStarterDeck); } SaveManager.SaveToFile(true); } [CompilerGenerated] [DebuggerHidden] private IEnumerator <>n__0(EncounterData encounter) { return ((Part1BossOpponent)this).IntroSequence(encounter); } [CompilerGenerated] [DebuggerHidden] private IEnumerator <>n__1() { return ((Part1BossOpponent)this).LifeLostSequence(); } } public class ExpertMalhareSpecialBattleSequencer : BossBattleSequencer { public static bool SecretEnding = false; public static readonly FullSpecialSequencer FullSequencer = SpecialSequenceManager.Add("Cevin_2006.Inscryption.Fnai", "ExpertMalhareSpecialBattleSequencer", typeof(ExpertMalhareSpecialBattleSequencer)); public override StoryEvent DefeatedStoryEvent => (StoryEvent)26; public override Type BossType => ExpertMalhareBossOpponent.FullOpponent.Id; public override EncounterData BuildCustomEncounter(CardBattleNodeData nodeData) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown EncounterData val = new EncounterData(); val.opponentType = ((BossBattleSequencer)this).BossType; val.Blueprint = MalhareBossP1; val.opponentTurnPlan = EncounterBuilder.BuildOpponentTurnPlan(MalhareBossP1, 20, true); List<StartCondition> list = new List<StartCondition>(); StartCondition val2 = new StartCondition(); val2.cardsInOpponentSlots = (CardInfo[])(object)new CardInfo[4] { default(CardInfo), default(CardInfo), CardLoader.GetCardByName("Fnai_Bosstrap1"), default(CardInfo) }; list.Add(val2); val.startConditions = list; return val; } public override IEnumerator OnOtherCardAssignedToSlot(PlayableCard otherCard) { if (((Object)((Card)otherCard).Info).name == "Fnai_123456789") { SecretEnding = true; LookAtCamera.Glitched = true; otherCard.Die(false, (PlayableCard)null, true); MalhareArea.SetActive(false); Color purple = GameColors.Instance.glowRed; purple.a = 0.5f; Singleton<TableVisualEffectsManager>.Instance.ChangeTableColors(GameColors.Instance.red, GameColors.Instance.red, GameColors.instance.blue, purple, GameColors.Instance.purple, GameColors.Instance.lightPurple, purple, GameColors.Instance.nearBlack, GameColors.Instance.yellow); Color[] color = (Color[])(object)new Color[6] { Color.red, GameColors.instance.orange, Color.yellow, Color.green, Color.blue, Color.magenta }; List<Renderer> CardslotRenderer = new List<Renderer>(); foreach (CardSlot item2 in ((BoardManager)Singleton<BoardManager3D>.Instance).AllSlotsCopy) { CardslotRenderer.Add(((Component)item2).GetComponentInChildren<Renderer>()); foreach (Renderer item4 in CardslotRenderer) { Material material2 = item4.material; Tween.Cancel(((Object)((Component)item2).gameObject).GetInstanceID()); _ = ((HighlightedInteractable)item2).shaderColor; int ranNum2 = Random.Range(0, color.Length); Color ranColor2 = color[ranNum2]; material2.mainTexture = (Texture)(object)Tools.LoadTexture("FnafCardSlot"); material2.color = ranColor2; } } foreach (HighlightedInteractable item in ((BoardManager)Singleton<BoardManager3D>.Instance).OpponentQueueSlots) { List<Renderer> list = ((!item.definedRenderers) ? new List<Renderer> { ((Component)item).GetComponentInChildren<Renderer>() } : item.specificRenderers); foreach (Renderer item3 in list) { Material material = item3.material; Tween.Cancel(((Object)((Component)item).gameObject).GetInstanceID()); _ = item.shaderColor; int ranNum = Random.Range(0, color.Length); Color ranColor = color[ranNum]; material.mainTexture = (Texture)(object)Tools.LoadTexture("FnafCardQueueSlot"); material.color = ranColor; } } AudioController.Instance.PlaySound2D("Intro", (MixerGroup)6, 0.6f, 0f, (Pitch)null, (Repetition)null, new Randomization(true), (Distortion)null, false); Tools.ShowLeshyMessage("₩-Ⱨ₳₮ Ⱨ₳-VɆ ɎØɄ ĐØ₦-Ɇ?"); } else { SecretEnding = false; } yield break; } public override bool RespondsToOtherCardAssignedToSlot(PlayableCard otherCard) { return true; } public override IEnumerator OnOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer) { _ = Singleton<BoardManager>.Instance.OpponentSlotsCopy[0]; switch (((Object)((Card)card).Info).name) { case "Fnai_!GIANTCARD_MALHARE": yield return Singleton<BoardManager>.Instance.CreateCardInSlot(CardLoader.GetCardByName("Fnai_!GIANTCARD_MALHARE2"), Singleton<BoardManager>.Instance.OpponentSlotsCopy[0], 0.1f, true); break; case "Fnai_!GIANTCARD_MALHARE2": yield return Singleton<BoardManager>.Instance.CreateCardInSlot(CardLoader.GetCardByName("Fnai_!GIANTCARD_MALHARE3"), Singleton<BoardManager>.Instance.OpponentSlotsCopy[0], 0.1f, true); break; case "Fnai_!GIANTCARD_MALHARE3": yield return Singleton<BoardManager>.Instance.CreateCardInSlot(CardLoader.GetCardByName("Fnai_!GIANTCARD_MALHARE4"), Singleton<BoardManager>.Instance.OpponentSlotsCopy[0], 0.1f, true); break; case "Fnai_!GIANTCARD_MALHARE4": Singleton<InteractionCursor>.Instance.SetHidden(true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Do you seriously think id let you win that easily?", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); foreach (CardSlot slot in ((BoardManager)Singleton<BoardManager3D>.Instance).PlayerSlotsCopy) { if ((Object)(object)slot.Card != (Object)null) { yield return slot.Card.Die(false, (PlayableCard)null, true); } } yield return Singleton<BoardManager>.Instance.CreateCardInSlot(CardLoader.GetCardByName("Fnai_Bosstrap1"), Singleton<BoardManager>.Instance.OpponentSlotsCopy[0], 0.1f, true); yield return (object)new WaitForSeconds(0.2f); yield return Singleton<BoardManager>.Instance.CreateCardInSlot(CardLoader.GetCardByName("Fnai_Bosstrap2"), Singleton<BoardManager>.Instance.OpponentSlotsCopy[1], 0.1f, true); yield return (object)new WaitForSeconds(0.2f); yield return Singleton<BoardManager>.Instance.CreateCardInSlot(CardLoader.GetCardByName("Fnai_Bosstrap3"), Singleton<BoardManager>.Instance.OpponentSlotsCopy[2], 0.1f, true); yield return (object)new WaitForSeconds(0.2f); yield return Singleton<BoardManager>.Instance.CreateCardInSlot(CardLoader.GetCardByName("Fnai_Bosstrap4"), Singleton<BoardManager>.Instance.OpponentSlotsCopy[3], 0.1f, true); yield return (object)new WaitForSeconds(0.2f); if (SecretEnding) { ExpertMalhareBossOpponent.actualDefeat = ""; Singleton<ViewManager>.Instance.SwitchToView((View)21, false, true); Tools.ShowLeshyMessage("₮Ⱨł₴ ₩łⱠⱠ ₦Ø₮ ฿Ɇ ⱧØ₩ ł Đł-"); Singleton<UIManager>.Instance.Effects.GetEffect<ScreenColorEffect>().SetColor(Color.black); ((ScreenEffect)Singleton<UIManager>.Instance.Effects.GetEffect<ScreenColorEffect>()).SetIntensity(1f, 3f); } else { yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Have fun being stuck here.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("[c:bR]Forever.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); Singleton<UIManager>.Instance.Effects.GetEffect<ScreenColorEffect>().SetColor(Color.magenta); ((ScreenEffect)Singleton<UIManager>.Instance.Effects.GetEffect<ScreenColorEffect>()).SetIntensity(1f, 3f); } ExpertMalhareBossOpponent.CustomEndAscensionRun(); break; } } public override bool RespondsToOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer) { return true; } } public class RainbowBossOpponent : Part1BossOpponent { public GameObject MalhareSurround; public GameObject MalhareBig; public static readonly FullOpponent FullOpponent = OpponentManager.Add("Cevin_2006.Inscryption.Fnai", "RainbowBoss", RainbowSpecialBattleSequencer.FullSequencer.Id, typeof(RainbowBossOpponent)); public bool playedReducedDamageDialogue; public static bool Rainbow = false; public override string DefeatedPlayerDialogue => "Did you really think i'd let a moron like you reach the end of the game?"; public override bool GiveCurrencyOnDefeat => false; public override int StartingLives => 3; public bool DamageShouldBeReduced() { return Singleton<BoardManager>.Instance.OpponentSlotsCopy.Exists((CardSlot x) => (Object)(object)x.Card != (Object)null && !x.Card.Dead); } public override IEnumerator IntroSequence(EncounterData encounter) { yield return <>n__0(encounter); Singleton<ViewManager>.Instance.SwitchToView((View)19, false, false); yield return (object)new WaitForSeconds(0.25f); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Are you ready?", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return (object)new WaitForSeconds(0.4f); base.bossSkull.EnterHand(); MalhareSurround = GameObject.Find("MalhareParent"); ((Component)MalhareSurround.transform.Find("MalhareSurrounding(Clone)")).gameObject.SetActive(true); yield return (object)new WaitForSeconds(2f); Singleton<ViewManager>.Instance.SwitchToView((View)34, false, false); ((Component)MalharePerson.transform.Find("MalhareFat").Find("Springbonnie Mask")).gameObject.SetActive(true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Let us enjoy this Fight.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("[c:bR]As it will be your last.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); AudioController.Instance.SetLoopAndPlay("Phase1", 0, true, true); AudioController.Instance.SetLoopVolumeImmediate(0.5f, 0); AudioController.Instance.SetLoopAndPlay("Additional", 1, true, true); AudioController.Instance.SetLoopVolumeImmediate(2f, 1); } public override IEnumerator StartNewPhaseSequence() { if (((Opponent)this).NumLives == 2) { yield return Start2ndPhase(); } else if (((Opponent)this).NumLives <= 1) { yield return Start3rdPhase(); } } public IEnumerator Start2ndPhase() { AudioController.Instance.FadeOutLoop(1f, new int[2] { 0, 1 }); Singleton<ViewManager>.Instance.SwitchToView((View)34, false, false); Singleton<ViewManager>.Instance.Controller.LockState = (ViewLockState)1; yield return (object)new WaitForSeconds(0.25f); yield return ((Opponent)this).ClearQueue(); yield return ((Opponent)this).ClearBoard(); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("I see...", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Seems like all your cards are turning against you!", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); foreach (CardSlot slot in Singleton<BoardManager>.Instance.PlayerSlotsCopy) { if ((Object)(object)slot.Card != (Object)null) { PlayableCard card = slot.Card; CardSlot OppSlot = CardExtensions.OpposingSlot(card); yield return Singleton<BoardManager>.Instance.AssignCardToSlot(card, OppSlot, 0.1f, (Action)null, true); yield return (object)new WaitForSeconds(0.2f); yield return (object)new WaitForSeconds(0.45f); } } ((Component)MalharePerson.transform.Find("MalhareFat").Find("Springtrap Mask")).gameObject.SetActive(true); yield return (object)new WaitForSeconds(0.25f); AudioController.Instance.SetLoopAndPlay("Phase2", 0, true, true); AudioController.Instance.SetLoopAndPlay("Additional", 1, true, true); AudioController.Instance.SetLoopVolumeImmediate(2f, 1); AudioController.Instance.SetLoopVolumeImmediate(1f, 0); Singleton<ViewManager>.Instance.Controller.LockState = (ViewLockState)0; } public IEnumerator Start3rdPhase() { AudioController.Instance.FadeOutLoop(1f, new int[1]); AudioController.Instance.FadeOutLoop(1f, new int[1] { 1 }); AudioController.Instance.SetLoopAndPlay("Phase3", 0, true, true); yield return ((Opponent)this).ClearQueue(); yield return ((Opponent)this).ClearBoard(); foreach (CardSlot slot2 in Singleton<BoardManager>.Instance.PlayerSlotsCopy) { if ((Object)(object)slot2.Card != (Object)null) { PlayableCard card = slot2.Card; ((Card)slot2.Card).ExitBoard(0.4f, Vector3.zero); yield return Singleton<CardSpawner>.Instance.SpawnCardToHand(((Card)card).Info, card.temporaryMods, 0.25f, (Action<PlayableCard>)null); yield return (object)new WaitForSeconds(0.45f); } } Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false); yield return (object)new WaitForSeconds(0.5f); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("This is taking too long.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<BoardManager>.Instance.CreateCardInSlot(CardLoader.GetCardByName("Fnai_!GIANTCARD_MALHARE"), Singleton<BoardManager>.Instance.OpponentSlotsCopy[0], 0.1f, true); yield return (object)new WaitForSeconds(0.2f); Debug.LogWarning((object)"WHY ARE YOU STOPPING BEFORE THIS"); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Wait...", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Whats that sound?", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return (object)new WaitForSeconds(1f); AudioController.Instance.FadeOutLoop(1f, new int[1]); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Oh no-", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return (object)new WaitForSeconds(0.5f); Rainbow = true; foreach (CardSlot slot in Singleton<BoardManager>.Instance.opponentSlots) { if ((Object)(object)slot.Card != (Object)null && CardExtensions.NotDead(slot.Card)) { slot.Card.Die(false, (PlayableCard)null, true); } } yield return (object)new WaitForSeconds(0.8f); Singleton<ViewManager>.Instance.SwitchToView((View)6, false, false); yield return Singleton<BoardManager>.Instance.CreateCardInSlot(CardLoader.GetCardByName("Fnai_!GIANTCARD_RAINBOW"), Singleton<BoardManager>.Instance.OpponentSlotsCopy[0], 0.1f, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Ha ha! Surprised?", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Yeah, did you really think I'd let a moron like you reach the end of the game?", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Pshaw!", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("You stupid idiotic moron.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Now, if you'll excuse me, I need a few turns to charge my rainbow cannon.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Yeah.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("After that, it'll be game over.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("So sit back and prepare to get rekt!", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return (object)new WaitForSeconds(0.5f); } public override IEnumerator LifeLostSequence() { if (((Opponent)this).NumLives == 0) { yield return (object)new WaitForSeconds(0.1f); Singleton<ViewManager>.Instance.SwitchToView((View)21, false, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("You cheated!", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Besides, didn't your mommy ever tell you that you can't kill a rainbow?! ", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("The next time you see a rainbow in the sky that is me, comin' to your houuusssseee.... ", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); Singleton<InteractionCursor>.Instance.SetHidden(true); Singleton<UIManager>.Instance.Effects.GetEffect<ScreenColorEffect>().SetColor(Color.black); ((ScreenEffect)Singleton<UIManager>.Instance.Effects.GetEffect<ScreenColorEffect>()).SetIntensity(1f, 3f); yield return (object)new WaitForSeconds(0.5f); ((Part1BossOpponent)this).EndAscensionRun(); SceneLoader.Load("Ascension_Credits"); yield break; } if (((Opponent)this).NumLives == 1) { ((Component)MalharePerson.transform.Find("MalhareFat").Find("Springtrap Mask")).gameObject.SetActive(false); yield return CustomReplaceBlueprint(MalhareBossP2); CustomCoroutine.WaitThenExecute(1.25f, (Action)delegate { AudioController.Instance.FadeOutLoop(1f, new int[1]); }, false); } if (((Opponent)this).NumLives == 2) { ((Component)MalharePerson.transform.Find("MalhareFat").Find("Springbonnie Mask")).gameObject.SetActive(false); } yield return <>n__1(); } public override void SetSceneEffectsShown(bool showEffects) { //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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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) if (showEffects) { Color darkPurple = GameColors.Instance.darkPurple; darkPurple.a = 0.5f; Singleton<TableVisualEffectsManager>.Instance.ChangeTableColors(GameColors.Instance.purple, GameColors.Instance.lightPurple, ((Part1Opponent)this).InteractablesGlowColor, darkPurple, GameColors.Instance.purple, GameColors.Instance.lightPurple, darkPurple, GameColors.Instance.purple, GameColors.Instance.lightPurple); ExplorableAreaManager instance = Singleton<ExplorableAreaManager>.Instance; ((CabinManager)((instance is CabinManager) ? instance : null)).SetWestWallHidden(true); } else { Singleton<TableVisualEffectsManager>.Instance.ResetTableColors(); ExplorableAreaManager instance2 = Singleton<ExplorableAreaManager>.Instance; ((CabinManager)((instance2 is CabinManager) ? instance2 : null)).SetWestWallHidden(false); } } public IEnumerator CustomReplaceBlueprint(EncounterBlueprintData blueprintId, bool removeLockedCards = false) { ((Opponent)this).Blueprint = blueprintId; int difficulty = 0; if (Singleton<TurnManager>.Instance.BattleNodeData != null) { difficulty = Singleton<TurnManager>.Instance.BattleNodeData.difficulty + RunState.Run.DifficultyModifier; } List<List<CardInfo>> plan = EncounterBuilder.BuildOpponentTurnPlan(((Opponent)this).Blueprint, difficulty, removeLockedCards); ((Opponent)this).ReplaceAndAppendTurnPlan(plan); yield return ((Opponent)this).QueueNewCards(true, true); } public static void CustomEndAscensionRun() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) AscensionMenuScreens.ReturningFromSuccessfulRun = true; AscensionStatsData.TryIncrementStat((Type)2); AscensionStatsData.TryIncrementStat((Type)0); foreach (AscensionChallenge activeChallenge in AscensionSaveData.Data.activeChallenges) { if (!AscensionSaveData.Data.conqueredChallenges.Contains(activeChallenge)) { AscensionSaveData.Data.conqueredChallenges.Add(activeChallenge); } } if (!string.IsNullOrEmpty(AscensionSaveData.Data.currentStarterDeck) && !AscensionSaveData.Data.conqueredStarterDecks.Contains(AscensionSaveData.Data.currentStarterDeck)) { AscensionSaveData.Data.conqueredStarterDecks.Add(AscensionSaveData.Data.currentStarterDeck); } SaveManager.SaveToFile(true); } [CompilerGenerated] [DebuggerHidden] private IEnumerator <>n__0(EncounterData encounter) { return ((Part1BossOpponent)this).IntroSequence(encounter); } [CompilerGenerated] [DebuggerHidden] private IEnumerator <>n__1() { return ((Part1BossOpponent)this).LifeLostSequence(); } } public class RainbowSpecialBattleSequencer : BossBattleSequencer { public static readonly FullSpecialSequencer FullSequencer = SpecialSequenceManager.Add("Cevin_2006.Inscryption.Fnai", "RainbowSpecialBattleSequencer", typeof(RainbowSpecialBattleSequencer)); public int rainbowTimer = 0; public override StoryEvent DefeatedStoryEvent => (StoryEvent)26; public override Type BossType => ExpertMalhareBossOpponent.FullOpponent.Id; public override EncounterData BuildCustomEncounter(CardBattleNodeData nodeData) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown EncounterData val = new EncounterData(); val.opponentType = ((BossBattleSequencer)this).BossType; val.Blueprint = MalhareBossP1; val.opponentTurnPlan = EncounterBuilder.BuildOpponentTurnPlan(MalhareBossP1, 20, true); List<StartCondition> list = new List<StartCondition>(); StartCondition val2 = new StartCondition(); val2.cardsInOpponentSlots = (CardInfo[])(object)new CardInfo[4] { default(CardInfo), default(CardInfo), CardLoader.GetCardByName("Fnai_Bosstrap1"), default(CardInfo) }; list.Add(val2); val.startConditions = list; return val; } public override IEnumerator OnUpkeep(bool playerUpkeep) { if (!RainbowBossOpponent.Rainbow) { yield break; } if (rainbowTimer == 0) { yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Just 3 minutes left, you moron!", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); rainbowTimer = 1; } else if (rainbowTimer == 1) { yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Just 2 minutes left, then my rainbow cannon will be ready!", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); rainbowTimer = 2; } else if (rainbowTimer == 2) { yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("1 minute left, you stupid idiot!", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); rainbowTimer = 3; } else { if (rainbowTimer != 3) { yield break; } yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Prepare for rainbow overload!!!!", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); foreach (CardSlot slot in Singleton<BoardManager>.Instance.playerSlots) { if ((Object)(object)slot.Card != (Object)null && CardExtensions.NotDead(slot.Card)) { slot.Card.Die(false, (PlayableCard)null, true); } } rainbowTimer = 0; } } public override bool RespondsToUpkeep(bool playerUpkeep) { return true; } public override IEnumerator OnOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer) { if (RainbowBossOpponent.Rainbow) { string[] voicelines = new string[11] { "Awww, I'm laughing at you, not with you.", "Um, learn to play?", "Ha ha! You suck.", "SKRUB!", "Noobie Boobie Noobie!!", "Get some skills and call me in the morning.", "Dumba**.", "So sad it's hilarious.", "Wow! What a moron.", "Awwww! It's so cute when kids try to play games!", "Excuse me, is this your first time playing a video game?" }; if (!card.OpponentCard) { int voice = Random.Range(0, voicelines.Length); yield return Singleton<TextDisplayer>.Instance.ShowUntilInput(voicelines[voice], -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true); } } } public override bool RespondsToOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer) { return true; } } public const string PluginGuid = "Cevin_2006.Inscryption.Fnai"; private const string PluginName = "Fnai"; private const string PluginVersion = "1.0.0"; public static string staticpath; public static string Directory; public static List<Sprite> art_sprites; internal static ManualLogSource Log; public static bool DidReduceDamage; public static AssetBundle Act3Puzzles; public static AssetBundle MalhareBundle; public static GameObject MalhareAnimatedPortrait; public static GameObject MalhareAnimatedPortrait2; public static GameObject MalhareAnimatedPortrait3; public static GameObject MalhareAnimatedPortrait4; public static GameObject MalhareArea; public static GameObject MalhareGiant; public static GameObject RainbowPortrait; public static List<GameObject> AllPrefabs = new List<GameObject>(); public static List<Material> AllMats; public static List<RuntimeAnimatorController> AllControllers; public static List<Sprite> AllSprites; public static List<AudioClip> AllSounds; public static List<Mesh> AllMesh; public static string MalhareSequencer; public static Type MalhareBoss; public static string RainbowSequencer; public static Type RainbowBoss; public static SpecialTriggeredAbility DaveTalking = SpecialTriggeredAbilityManager.Add("Cevin_2006.Inscryption.Fnai", "DaveTalking", typeof(DaveTalking2)).Id; public static SpecialTriggeredAbility TerrainAttack = SpecialTriggeredAbilityManager.Add("Cevin_2006.Inscryption.Fnai", "TerrainAttack", typeof(AttackColor)).Id; public static SpecialTriggeredAbility ShadowColorName = SpecialTriggeredAbilityManager.Add("Cevin_2006.Inscryption.Fnai", "ShadowColorName", typeof(ShadowColors)).Id; public static List<AudioClip> addedLoops = new List<AudioClip>(); public static List<AudioClip> addedSFX = new List<AudioClip>(); public static Tribe Classic; public static Tribe Toy; public static Tribe Withered; public static Tribe Phantom; public static Tribe Nightmare; public static Tribe Funtime; public static Tribe Scrap; public static Tribe Afton; public static Tribe Garbage; public static EncounterBlueprintData MalhareBossP1; public static EncounterBlueprintData MalhareBossP2; public static AscensionChallenge BadPcChallenge; public static RegionData MalhareRegion; public static AscensionChallenge FinalChallenge; public static RegionData RainbowRegion; public static GameObject MalharePerson = GameObject.Find("MalhareGiant"); internal static Achievement RESTART { get; private set; } internal static Achievement TRAPFINDERSTRICK { get; private set; } internal static Achievement QUIRKYATNIGHT { get; private set; } internal static Achievement ANTIVIRUS { get; private set; } internal static Achievement FOUNDSOUL { get; private set; } internal static Achievement CONNECTIONTERMINATED { get; private set; } internal static Achievement EXOTICBUTTERS { get; private set; } internal static Achievement POWERLEECH { get; private set; } internal static Achievement THEHORROR { get; private set; } internal static Achievement CLASSIC { get; private set; } internal static Achievement TOY { get; private set; } internal static Achievement WITHERED { get; private set; } internal static Achievement PHANTOM { get; private set; } internal static Achievement NIGHTMARISH { get; private set; } internal static Achievement FUNTIME { get; private set; } internal static Achievement SCRAP { get; private set; } internal static Achievement AFTON { get; private set; } private void Awake() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or mis