Decompiled source of CotLMiniMods v1.3.0
plugins/CotlMiniMods/CotlMiniMods.dll
Decompiled 2 weeks 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.Configuration; using BepInEx.Logging; using COTL_API.CustomFollowerCommand; using COTL_API.CustomInventory; using COTL_API.CustomLocalization; using COTL_API.CustomSettings; using COTL_API.CustomStructures; using COTL_API.CustomTarotCard; using COTL_API.CustomTasks; using COTL_API.Guid; using COTL_API.Helpers; using CotLMiniMods; using CotLMiniMods.API; using CotLMiniMods.CCommands.Tasks; using CotLMiniMods.CustomFollowerCommands; using CotLMiniMods.Helpers; using CotLMiniMods.Interactions; using CotLMiniMods.Items; using CotLMiniMods.Meals; using CotLMiniMods.Patches.Rituals; using CotLMiniMods.Rituals; using CotLMiniMods.Structures; using CotLMiniMods.Structures.Mines; using CotLMiniMods.Structures.Productivity; using CotLMiniMods.Structures.Proxies; using CotLMiniMods.Tarots; using CotLTemplateMod.CustomFollowerCommands; using DG.Tweening; using DG.Tweening.Core; using DG.Tweening.Plugins.Options; using FMOD.Studio; using HarmonyLib; using I2.Loc; using Lamb.UI; using Lamb.UI.Assets; using Lamb.UI.BuildMenu; using Lamb.UI.FollowerInteractionWheel; using Lamb.UI.FollowerSelect; using Lamb.UI.KitchenMenu; using Lamb.UI.Menus.PlayerMenu; using Lamb.UI.PauseDetails; using Lamb.UI.Rituals; using MMTools; using Microsoft.CodeAnalysis; using Sirenix.Serialization.Utilities; using Spine; using Spine.Unity; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; using src.Extensions; using src.UI; using src.UI.InfoCards; using src.UI.Items; using src.UI.Menus; using src.UINavigator; [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 = ".NET Standard 2.0")] [assembly: AssemblyCompany("CotlMiniMods")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+d69c754b7744cbc5e7b4e03d47c58a9c0c0862ee")] [assembly: AssemblyProduct("CotlMiniMods")] [assembly: AssemblyTitle("CotlMiniMods")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace CotLTemplateMod.Patches { [HarmonyPatch] internal class RelicResetPatch { public static RelicType temp; [HarmonyPatch(typeof(PlayerFarming), "Start")] [HarmonyPostfix] public static void PlayerFarming_Start_(PlayerFarming __instance) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Invalid comparison between Unknown and I4 //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) ManualLogSource log = Plugin.Log; Scene activeScene = SceneManager.GetActiveScene(); log.LogInfo((object)("Scene currently is " + ((Scene)(ref activeScene)).name)); activeScene = SceneManager.GetActiveScene(); if (!((Scene)(ref activeScene)).name.Contains("Dungeon")) { return; } Plugin.Log.LogInfo((object)("Reapplying wished cards, count is " + Plugin.wishedCards.Count)); foreach (TarotCard wishedCard in Plugin.wishedCards) { Plugin.Log.LogInfo((object)("Reapplying wished card " + ((object)(Card)(ref wishedCard.CardType)).ToString())); if (CoopManager.CoopActive) { TrinketManager.AddTrinket(wishedCard, PlayerFarming.players[0]); TrinketManager.AddTrinket(wishedCard, PlayerFarming.players[1]); } else { TrinketManager.AddTrinket(wishedCard, __instance); } } Plugin.wishedCards.Clear(); if ((int)Plugin.relicData <= 0) { return; } Plugin.Log.LogInfo((object)("Adding wished relic " + ((object)(RelicType)(ref Plugin.relicData)).ToString())); RelicData relicData = EquipmentManager.GetRelicData(Plugin.relicData); if ((Object)(object)relicData == (Object)null) { Plugin.Log.LogInfo((object)"RelicData is null, skipping relic patch"); return; } if (CoopManager.CoopActive) { PlayerFarming.players[0].currentRelicType = Plugin.relicData; PlayerFarming.players[0].playerRelic.EquipRelic(relicData, false, false); PlayerFarming.players[1].currentRelicType = Plugin.relicData; PlayerFarming.players[1].playerRelic.EquipRelic(relicData, false, false); } else { __instance.currentRelicType = Plugin.relicData; __instance.playerRelic.EquipRelic(relicData, true, false); } Plugin.relicData = (RelicType)0; } [HarmonyPatch(typeof(UITarotChoiceOverlayController), "Show")] [HarmonyBefore(new string[] { "InfernoDragon0.cotl.SuperchargedTarots" })] [HarmonyPrefix] public static bool UITarotChoiceOverlayController_Show(UITarotChoiceOverlayController __instance, TarotCard card1, TarotCard card2, bool instant) { Plugin.Log.LogInfo((object)"Hiding proxy cards"); LinqExtensions.ForEach<Card>((IEnumerable<Card>)Plugin.proxyTrials.Keys, (Action<Card>)delegate(Card x) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) CustomTarotCardManager.CustomTarotCardList.Remove(x); }); LinqExtensions.ForEach<Card>((IEnumerable<Card>)Plugin.proxyAugments.Keys, (Action<Card>)delegate(Card x) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) CustomTarotCardManager.CustomTarotCardList.Remove(x); }); return true; } [HarmonyPatch(typeof(UITarotChoiceOverlayController), "Show")] [HarmonyPostfix] public static void UITarotChoiceOverlayController_Show_Post(UITarotChoiceOverlayController __instance, TarotCard card1, TarotCard card2, bool instant) { Plugin.Log.LogInfo((object)"Restoring proxy cards"); LinqExtensions.ForEach<KeyValuePair<Card, CustomTarotCard>>((IEnumerable<KeyValuePair<Card, CustomTarotCard>>)Plugin.proxyTrials, (Action<KeyValuePair<Card, CustomTarotCard>>)delegate(KeyValuePair<Card, CustomTarotCard> x) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) CustomTarotCardManager.CustomTarotCardList.Add(x.Key, x.Value); }); LinqExtensions.ForEach<KeyValuePair<Card, CustomTarotCard>>((IEnumerable<KeyValuePair<Card, CustomTarotCard>>)Plugin.proxyAugments, (Action<KeyValuePair<Card, CustomTarotCard>>)delegate(KeyValuePair<Card, CustomTarotCard> x) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) CustomTarotCardManager.CustomTarotCardList.Add(x.Key, x.Value); }); } } [HarmonyPatch] internal class TrialsOfTheGodPatch { [CompilerGenerated] private sealed class <HealthRegen>d__13 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private UnitObject[] <enemies>5__1; private UnitObject[] <>s__2; private int <>s__3; private UnitObject <unit>5__4; private UIBossHUD <uiBossHUD>5__5; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <HealthRegen>d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <enemies>5__1 = null; <>s__2 = null; <unit>5__4 = null; <uiBossHUD>5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Invalid comparison between Unknown and I4 //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; <enemies>5__1 = Object.FindObjectsOfType<UnitObject>(); <>s__2 = <enemies>5__1; for (<>s__3 = 0; <>s__3 < <>s__2.Length; <>s__3++) { <unit>5__4 = <>s__2[<>s__3]; if ((int)<unit>5__4.health.team == 2) { Plugin.Log.LogInfo((object)("Healing " + ((Object)<unit>5__4).name)); <unit>5__4.health.Heal(<unit>5__4.health.totalHP * (<unit>5__4.isBoss ? 0.03f : 0.05f)); ShowHPBar showHpBar = <unit>5__4.health.showHpBar; if (showHpBar != null) { showHpBar.OnHit(((Component)<unit>5__4).gameObject, new Vector3(0f, 0f, 0f), (AttackTypes)9, false); } <uiBossHUD>5__5 = Object.FindObjectOfType<UIBossHUD>(); UIBossHUD obj = <uiBossHUD>5__5; if (obj != null) { obj.OnBossHit(((Component)<unit>5__4).gameObject, new Vector3(0f, 0f, 0f), (AttackTypes)9, false); } <uiBossHUD>5__5 = null; <unit>5__4 = null; } } <>s__2 = null; <enemies>5__1 = null; break; } <>2__current = (object)new WaitForSeconds(3f); <>1__state = 1; return true; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <LeshySpawnDuplicateTrial>d__11 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private UnitObject[] <enemies>5__1; private UnitObject[] <>s__2; private int <>s__3; private UnitObject <unit>5__4; private EnemyFollower <enemyFollower>5__5; private UnitObject[] <enemies2>5__6; private int <triggerTimes>5__7; private int <limit>5__8; private int <i>5__9; private GameObject <newMob>5__10; private Health <newHealth>5__11; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <LeshySpawnDuplicateTrial>d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <enemies>5__1 = null; <>s__2 = null; <unit>5__4 = null; <enemyFollower>5__5 = null; <enemies2>5__6 = null; <newMob>5__10 = null; <newHealth>5__11 = null; <>1__state = -2; } private bool MoveNext() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Invalid comparison between Unknown and I4 switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; <enemies>5__1 = Object.FindObjectsOfType<UnitObject>(); if (<enemies>5__1.Length >= mobLimit) { Plugin.Log.LogInfo((object)"Trial of Leshy (Trial) skipped, too many enemies to spawn duplicates"); break; } <>s__2 = <enemies>5__1; for (<>s__3 = 0; <>s__3 < <>s__2.Length; <>s__3++) { <unit>5__4 = <>s__2[<>s__3]; if (((Component)<unit>5__4).gameObject.TryGetComponent<EnemyFollower>(ref <enemyFollower>5__5)) { Plugin.Log.LogInfo((object)("Trial of Leshy (Trial) skipped because it is a follower " + ((Object)<unit>5__4).name)); } else { <enemies2>5__6 = Object.FindObjectsOfType<UnitObject>(); if (<enemies2>5__6.Length >= mobLimit) { Plugin.Log.LogInfo((object)"Trial of Leshy (Trial) skipped, too many enemies to spawn duplicates"); break; } if ((int)<unit>5__4.health.team == 2 && !(<unit>5__4.health.HP <= 1f) && !<unit>5__4.isBoss) { <triggerTimes>5__7 = Plugin.proxyTrialsEnabled.Count; <limit>5__8 = mobLimit - <enemies2>5__6.Length; <triggerTimes>5__7 = Mathf.Clamp(<triggerTimes>5__7, 0, <limit>5__8); <i>5__9 = 0; while (<i>5__9 < <triggerTimes>5__7) { Plugin.Log.LogInfo((object)("Trial of Leshy (Trial) triggered on " + ((Object)<unit>5__4).name)); <newMob>5__10 = Object.Instantiate<GameObject>(((Component)<unit>5__4).gameObject, ((Component)<unit>5__4).transform.parent, true); <newHealth>5__11 = <newMob>5__10.GetComponent<Health>(); Health obj = <newHealth>5__11; obj.totalHP /= 2f; <newHealth>5__11.HP = Mathf.Clamp(<unit>5__4.health.HP / 2f, 1f, <newHealth>5__11.totalHP); <newMob>5__10 = null; <newHealth>5__11 = null; <i>5__9++; } <enemyFollower>5__5 = null; <enemies2>5__6 = null; <unit>5__4 = null; } } } <>s__2 = null; <enemies>5__1 = null; break; } <>2__current = (object)new WaitForSeconds(10f); <>1__state = 1; return true; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <PoisonTrial>d__7 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float duration; private UnitObject[] <enemies>5__1; private UnitObject[] <>s__2; private int <>s__3; private UnitObject <unit>5__4; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <PoisonTrial>d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <enemies>5__1 = null; <>s__2 = null; <unit>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Invalid comparison between Unknown and I4 //IL_009f: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; <enemies>5__1 = Object.FindObjectsOfType<UnitObject>(); <>s__2 = <enemies>5__1; for (<>s__3 = 0; <>s__3 < <>s__2.Length; <>s__3++) { <unit>5__4 = <>s__2[<>s__3]; if ((int)<unit>5__4.health.team == 2) { TrapPoison.CreatePoison(((Component)<unit>5__4).transform.position, 1, 1f, ((Component)<unit>5__4).transform.parent, false); } <unit>5__4 = null; } <>s__2 = null; <enemies>5__1 = null; break; } <>2__current = (object)new WaitForSeconds(duration); <>1__state = 1; return true; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <PoisonTrialPlayer>d__6 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float duration; public GameObject gameObject; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <PoisonTrialPlayer>d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; TrapPoison.CreatePoison(gameObject.transform.position, 1, 1f, gameObject.transform.parent, false); break; } <>2__current = (object)new WaitForSeconds(duration); <>1__state = 1; return true; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static int killCount = 0; public static int timer = 0; public static int mobLimit = 12; public static float previousLeshyAugmentTrigger = 0f; public static float minLeshyAugmentDelay = 3f; [HarmonyPatch(typeof(PlayerFarming), "Start")] [HarmonyPostfix] public static void PlayerFarming_Start_(PlayerFarming __instance) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Invalid comparison between Unknown and I4 //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) ManualLogSource log = Plugin.Log; Scene activeScene = SceneManager.GetActiveScene(); log.LogInfo((object)("Scene currently is " + ((Scene)(ref activeScene)).name)); Plugin.Log.LogInfo((object)"Reset kill count"); killCount = 0; Plugin.Log.LogInfo((object)("Active Trials: " + Plugin.proxyTrialsEnabled.Count)); foreach (Card item in Plugin.proxyTrialsEnabled) { Card current = item; Plugin.Log.LogInfo((object)("Active Trial: " + ((object)(Card)(ref current)).ToString())); } Plugin.Log.LogInfo((object)("Active Augments: " + Plugin.proxyAugmentsEnabled.Count)); foreach (Card item2 in Plugin.proxyAugmentsEnabled) { Card current2 = item2; Plugin.Log.LogInfo((object)("Active Augment: " + ((object)(Card)(ref current2)).ToString())); } activeScene = SceneManager.GetActiveScene(); if (!((Scene)(ref activeScene)).name.Contains("Dungeon")) { return; } Plugin.Log.LogInfo((object)("Reapplying wished cards, count is " + Plugin.wishedCards.Count)); foreach (TarotCard wishedCard in Plugin.wishedCards) { Plugin.Log.LogInfo((object)("Reapplying wished card " + ((object)(Card)(ref wishedCard.CardType)).ToString())); if (CoopManager.CoopActive) { TrinketManager.AddTrinket(wishedCard, PlayerFarming.players[0]); TrinketManager.AddTrinket(wishedCard, PlayerFarming.players[1]); } else { TrinketManager.AddTrinket(wishedCard, __instance); } } Plugin.wishedCards.Clear(); if ((int)Plugin.relicData > 0) { Plugin.Log.LogInfo((object)("Adding wished relic " + ((object)(RelicType)(ref Plugin.relicData)).ToString())); RelicData relicData = EquipmentManager.GetRelicData(Plugin.relicData); if ((Object)(object)relicData == (Object)null) { Plugin.Log.LogInfo((object)"RelicData is null, skipping relic patch"); return; } if (CoopManager.CoopActive) { PlayerFarming.players[0].currentRelicType = Plugin.relicData; PlayerFarming.players[0].playerRelic.EquipRelic(relicData, false, false); PlayerFarming.players[1].currentRelicType = Plugin.relicData; PlayerFarming.players[1].playerRelic.EquipRelic(relicData, false, false); } else { __instance.currentRelicType = Plugin.relicData; __instance.playerRelic.EquipRelic(relicData, true, false); } Plugin.relicData = (RelicType)0; } if (Plugin.proxyTrialsEnabled.Contains(Plugin.KallamarCard)) { Plugin.Log.LogInfo((object)"Trial of Kallamar (augment) triggered"); int num = Mathf.Clamp(15 - Plugin.proxyAugmentsEnabled.Count, 1, 15); int num2 = Mathf.Clamp(10 - Plugin.proxyTrialsEnabled.Count, 1, 10); ((MonoBehaviour)__instance).StartCoroutine(PoisonTrialPlayer(num, ((Component)__instance).gameObject)); ((MonoBehaviour)__instance).StartCoroutine(PoisonTrial(num2)); } if (Plugin.proxyAugmentsEnabled.Contains(Plugin.PersistenceCard)) { Plugin.Log.LogInfo((object)("Augment of Persistence triggered on " + ((Object)__instance).name)); ((MonoBehaviour)__instance).StartCoroutine(HealthRegen()); } if (Plugin.proxyTrialsEnabled.Contains(Plugin.LeshyCard)) { Plugin.Log.LogInfo((object)("Trial of Leshy (Trial) triggered " + ((Object)__instance).name)); ((MonoBehaviour)__instance).StartCoroutine(LeshySpawnDuplicateTrial()); } if (Plugin.proxyTrialsEnabled.Contains(Plugin.NarinderCard)) { float num3 = 0.25f * (float)Plugin.proxyAugmentsEnabled.Count; PlayerController playerController = __instance.playerController; playerController.DodgeDelay *= 1f + num3; Plugin.Log.LogInfo((object)("Trial of Narinder (Augment) Dodge cooldown increased to " + __instance.playerController.DodgeDelay)); } } [IteratorStateMachine(typeof(<PoisonTrialPlayer>d__6))] public static IEnumerator PoisonTrialPlayer(float duration, GameObject gameObject) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <PoisonTrialPlayer>d__6(0) { duration = duration, gameObject = gameObject }; } [IteratorStateMachine(typeof(<PoisonTrial>d__7))] public static IEnumerator PoisonTrial(float duration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <PoisonTrial>d__7(0) { duration = duration }; } [HarmonyPatch(typeof(HealthPlayer), "DealDamage")] [HarmonyPostfix] public static void HealthPlayer_DealDamage_Post(ref bool __result, HealthPlayer __instance, GameObject Attacker, Vector3 AttackLocation) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Invalid comparison between Unknown and I4 //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) if (!__result) { return; } if (Plugin.proxyTrialsEnabled.Contains(Plugin.HeketCard)) { int num = 10 * Plugin.proxyTrialsEnabled.Count; if (Random.Range(0, 100) < num) { Plugin.Log.LogInfo((object)"Trial of Heket (Trial) triggered"); foreach (PlayerFarming player in PlayerFarming.players) { if (player.RunTrinkets.Count > 0) { Plugin.Log.LogInfo((object)"Trial Trigger: Removing tarot card"); TrinketManager.RemoveRandomTrinket(player); } else { Plugin.Log.LogInfo((object)"Trial Trigger: No tarot card to remove, losing 1 max HP"); HealthPlayer health = player.health; ((Health)health).totalHP = ((Health)health).totalHP - 1f; } } } int num2 = 10 * Plugin.proxyAugmentsEnabled.Count; if (num2 > 0) { Plugin.Log.LogInfo((object)("Trial of Heket (Augment) triggered, losing " + num2 + " curse charges")); foreach (PlayerFarming player2 in PlayerFarming.players) { player2.playerSpells.faithAmmo.Ammo = Mathf.Clamp(player2.playerSpells.faithAmmo.Ammo - player2.playerSpells.faithAmmo.Total * ((float)num2 / 100f), 0f, player2.playerSpells.faithAmmo.Total); } } } if (!Plugin.proxyTrialsEnabled.Contains(Plugin.ShamuraCard)) { return; } float num3 = 0.1f * (float)Plugin.proxyTrialsEnabled.Count; Plugin.Log.LogInfo((object)("Trial of Shamura (Trial) triggered, healing all enemies by " + num3 * 100f + "%")); UnitObject[] array = Object.FindObjectsOfType<UnitObject>(); UnitObject[] array2 = array; foreach (UnitObject val in array2) { if ((int)val.health.team == 2) { val.health.Heal(val.health.totalHP * num3); ShowHPBar showHpBar = val.health.showHpBar; if (showHpBar != null) { showHpBar.OnHit(((Component)val).gameObject, new Vector3(0f, 0f, 0f), (AttackTypes)9, false); } UIBossHUD val2 = Object.FindObjectOfType<UIBossHUD>(); if (val2 != null) { val2.OnBossHit(((Component)val).gameObject, new Vector3(0f, 0f, 0f), (AttackTypes)9, false); } } } } [HarmonyPatch(typeof(Health), "DealDamage")] [HarmonyPostfix] public static void Health_DealDamage_post(Health __instance, GameObject Attacker, Vector3 AttackLocation) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Invalid comparison between Unknown and I4 //IL_004a: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) if ((int)__instance.team == 2 && !((Object)(object)Attacker.GetComponent<Health>() == (Object)null) && (int)Attacker.GetComponent<Health>().team == 1) { if (Plugin.proxyAugmentsEnabled.Contains(Plugin.BombardmentCard)) { Plugin.Log.LogInfo((object)"Augment of Bombardment triggered"); Bomb.CreateBomb(AttackLocation, __instance, Attacker.transform.parent, 1f); Bomb.CreateBomb(AttackLocation, __instance, Attacker.transform.parent, 1f); AudioManager.Instance.PlayOneShot("event:/boss/spider/bomb_shoot", Attacker.transform.position); } if (Plugin.proxyTrialsEnabled.Contains(Plugin.ShamuraCard)) { Plugin.Log.LogInfo((object)"Trial of Shamura (Augment) triggered, enemy gains damage reduction"); float num = 0.005f * (float)Plugin.proxyAugmentsEnabled.Count; __instance.DamageModifier = Mathf.Clamp(__instance.DamageModifier - num, 0.1f, 1000f); } } } [HarmonyPatch(typeof(Health), "DealDamage")] [HarmonyPrefix] public static bool Health_DealDamage_pre(ref bool __result, Health __instance, float Damage, GameObject Attacker, Vector3 AttackLocation) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Invalid comparison between Unknown and I4 //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) if ((int)__instance.team == 1 && Plugin.proxyTrialsEnabled.Contains(Plugin.NarinderCard)) { int num = 10 * Plugin.proxyTrialsEnabled.Count; if (Random.Range(0, 100) < num) { Plugin.Log.LogInfo((object)"Trial of Narinder (Trial) triggered: execute player"); __instance.DamageModifier = 9999f; __result = true; return false; } } if ((int)__instance.team == 2) { if (Plugin.proxyAugmentsEnabled.Contains(Plugin.ResistanceCard) && Random.Range(0, 100) < 25) { Plugin.Log.LogInfo((object)("Augment of Resistance triggered on " + ((Object)__instance).name)); __result = false; return false; } if (Plugin.proxyTrialsEnabled.Contains(Plugin.LeshyCard)) { if (Time.time - previousLeshyAugmentTrigger < minLeshyAugmentDelay) { Plugin.Log.LogInfo((object)"Trial of Leshy (Augment) skipped, too soon since last trigger"); return true; } previousLeshyAugmentTrigger = Time.time; if (__instance.HP - Damage <= 0f) { return true; } EnemyFollower val = default(EnemyFollower); if (((Component)__instance).gameObject.TryGetComponent<EnemyFollower>(ref val)) { Plugin.Log.LogInfo((object)("Trial of Leshy (Augment) skipped because it is a follower " + ((Object)__instance).name)); return true; } UnitObject[] array = Object.FindObjectsOfType<UnitObject>(); if (array.Length >= mobLimit) { Plugin.Log.LogInfo((object)"Trial of Leshy (Augment) skipped, too many enemies to spawn duplicates"); } else { int num2 = 5 * Plugin.proxyAugmentsEnabled.Count; if (Random.Range(0, 100) < num2) { Plugin.Log.LogInfo((object)("Trial of Leshy (Augment) triggered on " + ((Object)__instance).name)); UnitObject val2 = null; int num3 = 0; UnitObject[] array2 = array; foreach (UnitObject val3 in array2) { if ((Object)(object)val3.health == (Object)(object)__instance) { val2 = val3; } } if ((Object)(object)val2 != (Object)null && val2.isBoss) { Plugin.Log.LogInfo((object)"Trial of Leshy (Augment) boss spawn skipped"); return true; } GameObject val4 = Object.Instantiate<GameObject>(((Component)__instance).gameObject, ((Component)__instance).transform.parent); Health component = val4.GetComponent<Health>(); component.totalHP /= 2f; component.HP = Mathf.Clamp(__instance.HP / 2f, 1f, component.totalHP); } } } } return true; } [IteratorStateMachine(typeof(<LeshySpawnDuplicateTrial>d__11))] public static IEnumerator LeshySpawnDuplicateTrial() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <LeshySpawnDuplicateTrial>d__11(0); } [HarmonyPatch(typeof(UnitObject), "OnEnable")] [HarmonyPostfix] public static void UnitObject_OnEnable(UnitObject __instance) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((int)__instance.health.team == 2 && Plugin.proxyAugmentsEnabled.Contains(Plugin.SwarmCard)) { Plugin.Log.LogInfo((object)("Augment of Swarm triggered on " + ((Object)__instance).name)); __instance.maxSpeed *= 1.2f; __instance.SpeedMultiplier *= 1.2f; } } [IteratorStateMachine(typeof(<HealthRegen>d__13))] public static IEnumerator HealthRegen() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <HealthRegen>d__13(0); } [HarmonyPatch(typeof(PlayerWeapon), "DoAttackRoutine")] [HarmonyPostfix] public static void PlayerWeapon_DoAttackRoutine(PlayerWeapon __instance) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) if (Plugin.proxyAugmentsEnabled.Contains(Plugin.CurseCard)) { FaithAmmo faithAmmo = __instance.playerFarming.playerSpells.faithAmmo; faithAmmo.Ammo -= __instance.playerFarming.playerSpells.faithAmmo.Total * 0.05f; } } [HarmonyPatch(typeof(UnitObject), "OnDie")] [HarmonyPostfix] public static void UnitObject_OnDie(UnitObject __instance) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Invalid comparison between Unknown and I4 //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Invalid comparison between Unknown and I4 //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) if ((int)__instance.health.team != 2) { return; } killCount++; if (Plugin.proxyAugmentsEnabled.Contains(Plugin.ExplosionCard)) { Plugin.Log.LogInfo((object)("Augment of Explosion triggered on " + ((Object)__instance).name)); Explosion.CreateExplosion(((Component)__instance).transform.position, (Team)2, __instance.health, 2f, 1f, 0f, false, 1f, (AttackFlags)0, false); } if (Plugin.proxyAugmentsEnabled.Contains(Plugin.GraceCard)) { Plugin.Log.LogInfo((object)("Augment of Grace triggered on " + ((Object)__instance).name)); UnitObject[] array = Object.FindObjectsOfType<UnitObject>(); UnitObject[] array2 = array; foreach (UnitObject val in array2) { if ((Object)(object)val == (Object)(object)__instance || (int)val.health.team != 2) { continue; } Health health = val.health; if (health.HP > 0f) { health.Heal(health.totalHP * 0.25f); ShowHPBar showHpBar = health.showHpBar; if (showHpBar != null) { showHpBar.OnHit(((Component)health).gameObject, new Vector3(0f, 0f, 0f), (AttackTypes)9, false); } UIBossHUD val2 = Object.FindObjectOfType<UIBossHUD>(); if (val2 != null) { val2.OnBossHit(((Component)health).gameObject, new Vector3(0f, 0f, 0f), (AttackTypes)9, false); } } } } if (Plugin.proxyAugmentsEnabled.Contains(Plugin.BloodpactCard)) { UnitObject[] array3 = Object.FindObjectsOfType<UnitObject>(); Plugin.Log.LogInfo((object)("Augment of Bloodpact triggered on " + ((Object)__instance).name)); UnitObject[] array4 = array3; foreach (UnitObject val3 in array4) { if ((int)val3.health.team == 2) { TrapPoison.CreatePoison(((Component)val3).transform.position, 1, 1f, ((Component)val3).transform.parent, false); } } } if (!Plugin.proxyAugmentsEnabled.Contains(Plugin.NarinderCard)) { return; } Plugin.Log.LogInfo((object)("Trial of Narinder (Trial) Vulnerability triggered on " + ((Object)__instance).name)); float num = 0.01f * (float)Plugin.proxyTrialsEnabled.Count; foreach (PlayerFarming player in PlayerFarming.players) { HealthPlayer health2 = player.health; ((Health)health2).DamageModifier = ((Health)health2).DamageModifier + num; } } [HarmonyPatch(typeof(PlayerFarming), "DodgeRoll")] [HarmonyPrefix] public static bool PlayerFarming_DodgeRoll_Pre(PlayerFarming __instance, ref bool __result) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) if (Plugin.proxyAugmentsEnabled.Contains(Plugin.DissonanceCard) && __instance.playerSpells.faithAmmo.Ammo < 0.2f * __instance.playerSpells.faithAmmo.Total) { __result = false; return false; } return true; } [HarmonyPatch(typeof(PlayerFarming), "DodgeRoll")] [HarmonyPostfix] public static void PlayerFarming_DodgeRoll_Post(PlayerFarming __instance, ref bool __result) { //IL_0006: 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) if (Plugin.proxyAugmentsEnabled.Contains(Plugin.DissonanceCard) & __result) { Plugin.Log.LogInfo((object)"Augment of Dissonance triggered"); __instance.playerSpells.faithAmmo.Ammo = Mathf.Clamp(__instance.playerSpells.faithAmmo.Ammo - __instance.playerSpells.faithAmmo.Total * 0.2f, 0f, __instance.playerSpells.faithAmmo.Total); } if (Plugin.proxyAugmentsEnabled.Contains(Plugin.DeathCard) & __result) { Plugin.Log.LogInfo((object)"Augment of Exhaustion triggered"); __instance.playerController.RunSpeed = Mathf.Clamp(__instance.playerController.RunSpeed - 0.1f, 1f, 9999f); } } } } namespace CotLTemplateMod.CustomFollowerCommands { internal class EatWaiterTask : FollowerTask_EatMeal { public EatWaiterTask(int mealID) : base(mealID) { } public override Vector3 UpdateDestination(Follower follower) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) return follower.Brain.LastPosition; } public override void OnStart() { ((FollowerTask)this).SetState((FollowerTaskState)4); } } } namespace CotLMiniMods { internal class ConfigListener { public static void AddConfigEntries() { CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "Enable Chef Job", Plugin.chefJob, (Action<bool>)null); CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "Enable Waiter Job", Plugin.waiterJob, (Action<bool>)null); CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "Enable Fisher Job", Plugin.fisherJob, (Action<bool>)null); CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "Enable Reaper Job", Plugin.reaperJob, (Action<bool>)null); CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "Enable Custom Food", Plugin.customFood, (Action<bool>)null); CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "Enable Custom Rituals", Plugin.customRituals, (Action<bool>)null); CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "Enable Custom Structures", Plugin.customStructures, (Action<bool>)null); CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "Death Cat Repeat", Plugin.deathCatRepeat, (Action<bool>)null); CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "Shrimp Chef Repeat", Plugin.shrimpChefRepeat, (Action<bool>)null); CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "Player Eat unlimited", Plugin.playerEatMore, (Action<bool>)null); CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "Kitchen Discount", Plugin.kitchenDiscount, (Action<bool>)null); CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "Skip Splash", Plugin.skipSplash, (Action<bool>)null); CustomSettingsManager.AddBepInExConfig("CotLMiniMods", "One Click Shrine Collection", Plugin.oneClickShrineCollection, (Action<bool>)null); } } [BepInPlugin("InfernoDragon0.cotl.CotLChef", "CotLMiniMods", "1.3.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [HarmonyPatch] public class Plugin : BaseUnityPlugin { public const string PluginGuid = "InfernoDragon0.cotl.CotLChef"; public const string PluginName = "CotLMiniMods"; public const string PluginVer = "1.3.0"; internal static ManualLogSource Log; internal static readonly Harmony Harmony = new Harmony("InfernoDragon0.cotl.CotLChef"); internal static string PluginPath; internal static WaiterCommand waiterTask; internal static FisherCommand fisherTask; internal static DivorceCommand DivorceCommand; internal static FlipCoinCommand FlipCoinCommand; internal static KnucklebonesCommand KnucklebonesCommand; internal static BoneMineCommand BoneMineCommand; internal static SilkMineCommand SilkMineCommand; internal static CrystalMineCommand CrystalMineCommand; internal static HRManagementStructure HRManagementStructure; internal static CrystalMineStructure CrystalMineStructure; internal static FishingStructure FishingStructure; internal static BoneMineStructure BoneMineStructure; internal static SilkMineStructure SilkMineStructure; internal static WishingWellStructure WishingWellStructure; internal static WaiterDeskStructure WaiterDeskStructure; internal static ChefDeskStructure ChefDeskStructure; internal static Structures_LuckyNarinder Structures_LuckyNarinder; internal static Structures_StudyTable Structures_StudyTable; internal static Structures_Telescope Structures_Telescope; internal static Structures_AlchemyCauldron Structures_AlchemyCauldron; internal static Structures_EndlessPit Structures_EndlessPit; internal static Structures_RelicGenerator Structures_RelicGenerator; internal static ITEM_TYPE StrangeMaterialItem; internal static ITEM_TYPE StrangeEnergyItem; internal static ConfigEntry<bool> biggerShrine; internal static ConfigEntry<int> shrineSize; internal static ConfigEntry<bool> oneClickShrineCollection; internal static ConfigEntry<bool> skipSplash; internal static ConfigEntry<bool> kitchenDiscount; internal static ConfigEntry<bool> playerEatMore; internal static ConfigEntry<bool> deathCatRepeat; internal static ConfigEntry<bool> shrimpChefRepeat; internal static ConfigEntry<bool> chefJob; internal static ConfigEntry<bool> fisherJob; internal static ConfigEntry<bool> waiterJob; internal static ConfigEntry<bool> reaperJob; internal static ConfigEntry<bool> customFood; internal static ConfigEntry<bool> customStructures; internal static ConfigEntry<bool> customRituals; internal static ConfigEntry<bool> customTarots; internal static ConfigEntry<bool> telescopeGivesQuest; internal static ConfigEntry<bool> relicNoReset; internal static ConfigEntry<bool> NoExhaustMating; internal static ConfigEntry<string> localizationConfig; internal static bool SinnedToday = false; public static List<TarotCard> wishedCards = new List<TarotCard>(); public static RelicType relicData = (RelicType)0; public static Dictionary<Card, CustomTarotCard> proxyTrials = new Dictionary<Card, CustomTarotCard>(); public static Dictionary<Card, CustomTarotCard> proxyAugments = new Dictionary<Card, CustomTarotCard>(); public static List<Card> proxyTrialsEnabled = new List<Card>(); public static List<Card> proxyAugmentsEnabled = new List<Card>(); public static Card LeshyCard; public static Card KallamarCard; public static Card HeketCard; public static Card ShamuraCard; public static Card NarinderCard; public static Card GraceCard; public static Card BombardmentCard; public static Card DeathCard; public static Card DissonanceCard; public static Card BloodpactCard; public static Card CurseCard; public static Card PersistenceCard; public static Card SwarmCard; public static Card ResistanceCard; public static Card ExplosionCard; private void Awake() { //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0560: Unknown result type (might be due to invalid IL or missing references) //IL_0575: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_038f: 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_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_048b: 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_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04cc: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0537: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_05b1: Unknown result type (might be due to invalid IL or missing references) //IL_05bc: Unknown result type (might be due to invalid IL or missing references) //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_05d2: Unknown result type (might be due to invalid IL or missing references) //IL_05dd: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Unknown result type (might be due to invalid IL or missing references) //IL_0669: Unknown result type (might be due to invalid IL or missing references) //IL_0670: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_067c: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_0694: Unknown result type (might be due to invalid IL or missing references) //IL_0699: Unknown result type (might be due to invalid IL or missing references) //IL_06a3: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06c7: Unknown result type (might be due to invalid IL or missing references) //IL_06d9: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_0740: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_074c: Unknown result type (might be due to invalid IL or missing references) //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_0758: Unknown result type (might be due to invalid IL or missing references) //IL_075d: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Unknown result type (might be due to invalid IL or missing references) //IL_0770: Unknown result type (might be due to invalid IL or missing references) //IL_0775: Unknown result type (might be due to invalid IL or missing references) //IL_077c: Unknown result type (might be due to invalid IL or missing references) //IL_0781: Unknown result type (might be due to invalid IL or missing references) //IL_0788: Unknown result type (might be due to invalid IL or missing references) //IL_078d: Unknown result type (might be due to invalid IL or missing references) //IL_0794: Unknown result type (might be due to invalid IL or missing references) //IL_0799: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_07ac: Unknown result type (might be due to invalid IL or missing references) //IL_07b1: Unknown result type (might be due to invalid IL or missing references) //IL_07bb: Unknown result type (might be due to invalid IL or missing references) //IL_07cd: Unknown result type (might be due to invalid IL or missing references) //IL_07df: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Unknown result type (might be due to invalid IL or missing references) //IL_0803: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_0827: Unknown result type (might be due to invalid IL or missing references) //IL_0839: Unknown result type (might be due to invalid IL or missing references) //IL_084b: Unknown result type (might be due to invalid IL or missing references) //IL_085d: Unknown result type (might be due to invalid IL or missing references) ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded CotLMiniMods!"); Log = ((BaseUnityPlugin)this).Logger; PluginPath = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location); biggerShrine = ((BaseUnityPlugin)this).Config.Bind<bool>("", "biggerShrine", true, "Increases max capacity of shrine"); shrineSize = ((BaseUnityPlugin)this).Config.Bind<int>("", "shrineSize", 2000, "Max capacity of shrine"); oneClickShrineCollection = ((BaseUnityPlugin)this).Config.Bind<bool>("", "oneClickShrineCollection", true, "Instantly collect all souls in one click from shrine"); skipSplash = ((BaseUnityPlugin)this).Config.Bind<bool>("", "skipSplash", true, "Skips the splash screen"); kitchenDiscount = ((BaseUnityPlugin)this).Config.Bind<bool>("", "kitchenDiscount", true, "Enables a 50% food discount on Kitchen 1"); playerEatMore = ((BaseUnityPlugin)this).Config.Bind<bool>("", "playerEatMore", true, "Allows you to eat as many times as you want per day."); deathCatRepeat = ((BaseUnityPlugin)this).Config.Bind<bool>("", "deathCatRepeat", false, "Allows you to re-challenge The one who waits as many times as you want."); shrimpChefRepeat = ((BaseUnityPlugin)this).Config.Bind<bool>("", "shrimpChefRepeat", false, "Allows you to re-challenge Chef Rakshasa as many times as you want."); chefJob = ((BaseUnityPlugin)this).Config.Bind<bool>("", "chefJob", true, "Allows followers to take on the chef role."); fisherJob = ((BaseUnityPlugin)this).Config.Bind<bool>("", "fisherJob", true, "Allows you to command followers to fish (different loot table)."); waiterJob = ((BaseUnityPlugin)this).Config.Bind<bool>("", "waiterJob", true, "Allows followers to take on the waiter role. If you enable this, followers will not walk towards food, but wait for someone to serve."); reaperJob = ((BaseUnityPlugin)this).Config.Bind<bool>("", "reaperJob", true, "Allows followers to bury other followers in an Endless Pit."); customFood = ((BaseUnityPlugin)this).Config.Bind<bool>("", "customFood", false, "Adds custom food (partial implementation, not ready yet)."); customStructures = ((BaseUnityPlugin)this).Config.Bind<bool>("", "customStructures", true, "Adds Custom Structures."); customRituals = ((BaseUnityPlugin)this).Config.Bind<bool>("", "customRituals", true, "Adds Custom Rituals."); customTarots = ((BaseUnityPlugin)this).Config.Bind<bool>("", "customTarots", true, "Adds Custom Tarots."); telescopeGivesQuest = ((BaseUnityPlugin)this).Config.Bind<bool>("", "telescopeGivesQuest", true, "Set to true if the telescope should give quests in the morning. False will provide Strange Material at a lower rate in the day."); relicNoReset = ((BaseUnityPlugin)this).Config.Bind<bool>("", "relicNoReset", true, "Set to true for the Relic Infuser to work, and getting to keep relics after runs."); NoExhaustMating = ((BaseUnityPlugin)this).Config.Bind<bool>("", "NoExhaustMating", true, "Set to true to allow mating without exhausting the follower."); localizationConfig = ((BaseUnityPlugin)this).Config.Bind<string>("", "Localization", "English", "Set to your preferred language (you must have localization files for this mod)"); ConfigListener.AddConfigEntries(); TimeManager.OnNewDayStarted = (Action)Delegate.Combine(TimeManager.OnNewDayStarted, new Action(OnNewDayStarted)); CustomLocalizationManager.LoadLocalization("English", Path.Combine(PluginPath, "Assets/Localization/" + localizationConfig.Value + ".language")); if (waiterJob.Value) { waiterTask = new WaiterCommand(); CustomFollowerCommandManager.Add((CustomFollowerCommand)(object)waiterTask); } if (fisherJob.Value) { fisherTask = new FisherCommand(); CustomFollowerCommandManager.Add((CustomFollowerCommand)(object)fisherTask); } if (customFood.Value) { CustomMealManager.AddAll(); } if (customStructures.Value) { HRManagementStructure = new HRManagementStructure(); CustomStructureManager.Add((CustomStructure)(object)HRManagementStructure); CrystalMineStructure = new CrystalMineStructure(); CustomStructureManager.Add((CustomStructure)(object)CrystalMineStructure); WishingWellStructure = new WishingWellStructure(); CustomStructureManager.Add((CustomStructure)(object)WishingWellStructure); FishingStructure = new FishingStructure(); CustomStructureManager.Add((CustomStructure)(object)FishingStructure); BoneMineStructure = new BoneMineStructure(); CustomStructureManager.Add((CustomStructure)(object)BoneMineStructure); SilkMineStructure = new SilkMineStructure(); CustomStructureManager.Add((CustomStructure)(object)SilkMineStructure); WaiterDeskStructure = new WaiterDeskStructure(); CustomStructureManager.Add((CustomStructure)(object)WaiterDeskStructure); ChefDeskStructure = new ChefDeskStructure(); CustomStructureManager.Add((CustomStructure)(object)ChefDeskStructure); Structures_LuckyNarinder = new Structures_LuckyNarinder(); CustomStructureManager.Add((CustomStructure)(object)Structures_LuckyNarinder); Structures_StudyTable = new Structures_StudyTable(); CustomStructureManager.Add((CustomStructure)(object)Structures_StudyTable); Structures_Telescope = new Structures_Telescope(); CustomStructureManager.Add((CustomStructure)(object)Structures_Telescope); Structures_AlchemyCauldron = new Structures_AlchemyCauldron(); CustomStructureManager.Add((CustomStructure)(object)Structures_AlchemyCauldron); Structures_EndlessPit = new Structures_EndlessPit(); CustomStructureManager.Add((CustomStructure)(object)Structures_EndlessPit); Structures_RelicGenerator = new Structures_RelicGenerator(); CustomStructureManager.Add((CustomStructure)(object)Structures_RelicGenerator); CustomStructureManager.Add((CustomStructure)(object)new Structures_StrangeGenerator()); CustomStructureManager.Add((CustomStructure)(object)new Structures_EnergyController()); CustomStructureManager.Add((CustomStructure)(object)new Structures_StasisChamber()); CustomStructureManager.Add((CustomStructure)(object)new Structures_AIOQuarry()); CustomStructureManager.Add((CustomStructure)(object)new Structures_AIOFarmer()); CustomStructureManager.Add((CustomStructure)(object)new Structures_GiftTree()); CustomStructureManager.Add((CustomStructure)(object)new Structures_Boutique()); BoneMineCommand = new BoneMineCommand(); CustomFollowerCommandManager.Add((CustomFollowerCommand)(object)BoneMineCommand); SilkMineCommand = new SilkMineCommand(); CustomFollowerCommandManager.Add((CustomFollowerCommand)(object)SilkMineCommand); CrystalMineCommand = new CrystalMineCommand(); CustomFollowerCommandManager.Add((CustomFollowerCommand)(object)CrystalMineCommand); StrangeMaterialItem = CustomItemManager.Add((CustomInventoryItem)(object)new StrangeMaterialItem()); StrangeEnergyItem = CustomItemManager.Add((CustomInventoryItem)(object)new StrangeEnergyItem()); } DivorceCommand = new DivorceCommand(); CustomFollowerCommandManager.Add((CustomFollowerCommand)(object)DivorceCommand); FlipCoinCommand = new FlipCoinCommand(); CustomFollowerCommandManager.Add((CustomFollowerCommand)(object)FlipCoinCommand); KnucklebonesCommand = new KnucklebonesCommand(); CustomFollowerCommandManager.Add((CustomFollowerCommand)(object)KnucklebonesCommand); CustomFollowerCommandManager.Add((CustomFollowerCommand)(object)new Command_ForIHaveSinned()); if (customRituals.Value) { CustomRitualManager.Add(new DistributionRitual()); CustomRitualManager.Add(new RitualFrenzyRitual()); CustomRitualManager.Add(new FusionRitual()); CustomRitualManager.Add(new YouthRitual()); CustomRitualManager.Add(new ReversalRitual()); CustomRitualManager.Add(new MistletoeRitual()); CustomRitualManager.Add(new MassResurrectionRitual()); CustomRitualManager.Add(new ExiledRitual()); CustomRitualManager.Add(new MassacreRitual()); } if (customTarots.Value) { Log.LogInfo((object)"Added tarots"); CustomTarotCardManager.Add((CustomTarotCard)(object)new Tarot_StrangeExtraction()); ProxyTarot_Trial_Leshy proxyTarot_Trial_Leshy = new ProxyTarot_Trial_Leshy(); ProxyTarot_Trial_Kallamar proxyTarot_Trial_Kallamar = new ProxyTarot_Trial_Kallamar(); ProxyTarot_Trial_Heket proxyTarot_Trial_Heket = new ProxyTarot_Trial_Heket(); ProxyTarot_Trial_Shamura proxyTarot_Trial_Shamura = new ProxyTarot_Trial_Shamura(); ProxyTarot_Trial_Narinder proxyTarot_Trial_Narinder = new ProxyTarot_Trial_Narinder(); LeshyCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Trial_Leshy); KallamarCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Trial_Kallamar); HeketCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Trial_Heket); ShamuraCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Trial_Shamura); NarinderCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Trial_Narinder); proxyTrials.Add(LeshyCard, (CustomTarotCard)(object)proxyTarot_Trial_Leshy); proxyTrials.Add(KallamarCard, (CustomTarotCard)(object)proxyTarot_Trial_Kallamar); proxyTrials.Add(HeketCard, (CustomTarotCard)(object)proxyTarot_Trial_Heket); proxyTrials.Add(ShamuraCard, (CustomTarotCard)(object)proxyTarot_Trial_Shamura); proxyTrials.Add(NarinderCard, (CustomTarotCard)(object)proxyTarot_Trial_Narinder); ProxyTarot_Augment_Grace proxyTarot_Augment_Grace = new ProxyTarot_Augment_Grace(); ProxyTarot_Augment_Bombardment proxyTarot_Augment_Bombardment = new ProxyTarot_Augment_Bombardment(); ProxyTarot_Augment_Exhaustion proxyTarot_Augment_Exhaustion = new ProxyTarot_Augment_Exhaustion(); ProxyTarot_Augment_Dissonance proxyTarot_Augment_Dissonance = new ProxyTarot_Augment_Dissonance(); ProxyTarot_Augment_Bloodpact proxyTarot_Augment_Bloodpact = new ProxyTarot_Augment_Bloodpact(); ProxyTarot_Augment_Curse proxyTarot_Augment_Curse = new ProxyTarot_Augment_Curse(); ProxyTarot_Augment_Persistence proxyTarot_Augment_Persistence = new ProxyTarot_Augment_Persistence(); ProxyTarot_Augment_Swarm proxyTarot_Augment_Swarm = new ProxyTarot_Augment_Swarm(); ProxyTarot_Augment_Resistance proxyTarot_Augment_Resistance = new ProxyTarot_Augment_Resistance(); ProxyTarot_Augment_Explosion proxyTarot_Augment_Explosion = new ProxyTarot_Augment_Explosion(); GraceCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Augment_Grace); BombardmentCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Augment_Bombardment); DeathCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Augment_Exhaustion); DissonanceCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Augment_Dissonance); BloodpactCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Augment_Bloodpact); CurseCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Augment_Curse); PersistenceCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Augment_Persistence); SwarmCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Augment_Swarm); ResistanceCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Augment_Resistance); ExplosionCard = CustomTarotCardManager.Add((CustomTarotCard)(object)proxyTarot_Augment_Explosion); proxyAugments.Add(GraceCard, (CustomTarotCard)(object)proxyTarot_Augment_Grace); proxyAugments.Add(BombardmentCard, (CustomTarotCard)(object)proxyTarot_Augment_Bombardment); proxyAugments.Add(DeathCard, (CustomTarotCard)(object)proxyTarot_Augment_Exhaustion); proxyAugments.Add(DissonanceCard, (CustomTarotCard)(object)proxyTarot_Augment_Dissonance); proxyAugments.Add(BloodpactCard, (CustomTarotCard)(object)proxyTarot_Augment_Bloodpact); proxyAugments.Add(CurseCard, (CustomTarotCard)(object)proxyTarot_Augment_Curse); proxyAugments.Add(PersistenceCard, (CustomTarotCard)(object)proxyTarot_Augment_Persistence); proxyAugments.Add(SwarmCard, (CustomTarotCard)(object)proxyTarot_Augment_Swarm); proxyAugments.Add(ResistanceCard, (CustomTarotCard)(object)proxyTarot_Augment_Resistance); proxyAugments.Add(ExplosionCard, (CustomTarotCard)(object)proxyTarot_Augment_Explosion); } } private void OnNewDayStarted() { SinnedToday = false; Log.LogInfo((object)"You can now sin again."); } private void OnEnable() { Harmony.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded CotLMiniMods!"); } private void OnDisable() { Harmony.UnpatchSelf(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Unloaded CotLMiniMods!"); } } } namespace CotLMiniMods.Tarots { public class ProxyTarot_Augment_Bloodpact : CustomTarotCard { public override string InternalName => "ProxyTarot_Augment_Bloodpact"; public override string Skin => "Trinkets/NoCorruption"; public override string LocalisedName(int upgradeIndex) { return "<color=\"purple\">Augment: Bloodpact</color>"; } public override string LocalisedLore() { return "Augment of Bloodpact"; } public override string LocalisedDescription(int upgradeIndex) { return "When an enemy dies, all enemies <color=\"yellow\">spawn a poison puddle under them</color>."; } } public class ProxyTarot_Augment_Bombardment : CustomTarotCard { public override string InternalName => "ProxyTarot_Augment_Bombardment"; public override string Skin => "Trinkets/NoCorruption"; public override string LocalisedName(int upgradeIndex) { return "<color=\"purple\">Augment: Bombardment</color>"; } public override string LocalisedLore() { return "Augment of Bombardment"; } public override string LocalisedDescription(int upgradeIndex) { return "Attacking an enemy will spawn <color=\"yellow\">2 bombs</color>."; } } public class ProxyTarot_Augment_Curse : CustomTarotCard { public override string InternalName => "ProxyTarot_Augment_Curse"; public override string Skin => "Trinkets/NoCorruption"; public override string LocalisedName(int upgradeIndex) { return "<color=\"purple\">Augment: Curse</color>"; } public override string LocalisedLore() { return "Augment of Curse"; } public override string LocalisedDescription(int upgradeIndex) { return "Each time you attack, you lose <color=\"yellow\">5% Curse Charge</color>."; } } public class ProxyTarot_Augment_Exhaustion : CustomTarotCard { public override string InternalName => "ProxyTarot_Augment_Exhaustion"; public override string Skin => "Trinkets/NoCorruption"; public override string LocalisedName(int upgradeIndex) { return "<color=\"purple\">Augment: Exhaustion</color>"; } public override string LocalisedLore() { return "Augment of Exhaustion"; } public override string LocalisedDescription(int upgradeIndex) { return "Each time you dodge, you lose <color=\"yellow\">0.1 movement speed</color>. Minimum 1.0 movement speed."; } } public class ProxyTarot_Augment_Dissonance : CustomTarotCard { public override string InternalName => "ProxyTarot_Augment_Dissonance"; public override string Skin => "Trinkets/NoCorruption"; public override string LocalisedName(int upgradeIndex) { return "<color=\"purple\">Augment: Dissonance</color>"; } public override string LocalisedLore() { return "Augment of Dissonance"; } public override string LocalisedDescription(int upgradeIndex) { return "Dodging requires 20% Curse Charge. <color=\"yellow\">You cannot dodge if you have less than 20% Curse Charge</color>."; } } public class ProxyTarot_Augment_Explosion : CustomTarotCard { public override string InternalName => "ProxyTarot_Augment_Explosion"; public override string Skin => "Trinkets/NoCorruption"; public override string LocalisedName(int upgradeIndex) { return "<color=\"purple\">Augment: Explosion</color>"; } public override string LocalisedLore() { return "Augment of Explosion"; } public override string LocalisedDescription(int upgradeIndex) { return "Enemies <color=\"yellow\">explode</color> on death."; } } public class ProxyTarot_Augment_Grace : CustomTarotCard { public override string InternalName => "ProxyTarot_Augment_Grace"; public override string Skin => "Trinkets/NoCorruption"; public override string LocalisedName(int upgradeIndex) { return "<color=\"purple\">Augment: Grace</color>"; } public override string LocalisedLore() { return "Augment of Grace"; } public override string LocalisedDescription(int upgradeIndex) { return "When an enemy dies, all other enemies <color=\"yellow\">heal by 25% of their Max HP</color>."; } } public class ProxyTarot_Augment_Persistence : CustomTarotCard { public override string InternalName => "ProxyTarot_Augment_Persistence"; public override string Skin => "Trinkets/NoCorruption"; public override string LocalisedName(int upgradeIndex) { return "<color=\"purple\">Augment: Persistence</color>"; } public override string LocalisedLore() { return "Augment of Persistence"; } public override string LocalisedDescription(int upgradeIndex) { return "Enemies <color=\"yellow\">heal 5% of their health every 3 second</color>. Bosses <color=\"yellow\">heal 3% of their health every 3 second</color>."; } } public class ProxyTarot_Augment_Resistance : CustomTarotCard { public override string InternalName => "ProxyTarot_Augment_Resistance"; public override string Skin => "Trinkets/NoCorruption"; public override string LocalisedName(int upgradeIndex) { return "<color=\"purple\">Augment: Resistance</color>"; } public override string LocalisedLore() { return "Augment of Resistance"; } public override string LocalisedDescription(int upgradeIndex) { return "Enemies have a <color=\"yellow\">25% chance of not taking damage from hits</color>."; } } public class ProxyTarot_Augment_Swarm : CustomTarotCard { public override string InternalName => "ProxyTarot_Augment_Swarm"; public override string Skin => "Trinkets/NoCorruption"; public override string LocalisedName(int upgradeIndex) { return "<color=\"purple\">Augment: Swarm</color>"; } public override string LocalisedLore() { return "Augment of Swarm"; } public override string LocalisedDescription(int upgradeIndex) { return "Enemies movement speed is <color=\"yellow\">increased by 20%</color>."; } } public class ProxyTarot_Trial_Heket : CustomTarotCard { public override string InternalName => "ProxyTarot_Trial_Heket"; public override string Skin => "Trinkets/CoopGoodTiming"; public override string LocalisedName(int upgradeIndex) { return "<color=\"red\">Trial of Heket</color>"; } public override string LocalisedLore() { return "We <color=\"yellow\">Hunger...</color>"; } public override string LocalisedDescription(int upgradeIndex) { return "Each <color=\"purple\">Active Augment</color>, whenever you take damage, <color=\"yellow\">you lose 10% Curse Charge</color>.\r\nEach <color=\"red\">Active Trial</color>, whenever you take damage, you have a <color=\"yellow\">10% chance of losing a tarot card</color>."; } } public class ProxyTarot_Trial_Kallamar : CustomTarotCard { public override string InternalName => "ProxyTarot_Trial_Kallamar"; public override string Skin => "Trinkets/CoopGoodTiming"; public override string LocalisedName(int upgradeIndex) { return "<color=\"red\">Trial of Kallamar</color>"; } public override string LocalisedLore() { return "Step <color=\"yellow\">Carefully..</color>"; } public override string LocalisedDescription(int upgradeIndex) { return "Each <color=\"purple\">Active Augment</color>, this effect speeds up by 1 second. Every 15 seconds, <color=\"yellow\">a pool of poison is spawned on your location</color>. \r\nEach <color=\"red\">Active Trial</color>, this effect speeds up by 1 second. Every 10 seconds, <color=\"yellow\">all enemies drop a pool of poison</color>. "; } } public class ProxyTarot_Trial_Leshy : CustomTarotCard { public override string InternalName => "ProxyTarot_Trial_Leshy"; public override string Skin => "Trinkets/CoopGoodTiming"; public override string LocalisedName(int upgradeIndex) { return "<color=\"red\">Trial of Leshy</color>"; } public override string LocalisedLore() { return "PURE... <color=\"yellow\">CHAOS!</color>"; } public override string LocalisedDescription(int upgradeIndex) { return "Each <color=\"purple\">Active Augment</color>, whenever a non-boss enemy takes non lethal damage, there is a <color=\"yellow\">5% chance they duplicate at half of their current health</color>. Mob Spawns are limited to 12.\r\nEach <color=\"red\">Active Trial</color>, a copy of each non-boss enemy will <color=\"yellow\">spawn every 10 seconds at half of their current health</color>. "; } } public class ProxyTarot_Trial_Narinder : CustomTarotCard { public override string InternalName => "ProxyTarot_Trial_Narinder"; public override string Skin => "Trinkets/CoopGoodTiming"; public override string LocalisedName(int upgradeIndex) { return "<color=\"red\">Trial of Narinder</color>"; } public override string LocalisedLore() { return "TRYING TO OUTRUN.. <color=\"yellow\">DEATH?</color> Poor little Lamb.... HAHAHAHA"; } public override string LocalisedDescription(int upgradeIndex) { return "Each <color=\"purple\">Active Augment</color> will increase your <color=\"yellow\">dodge cooldown by 25%</color>.\r\nEach <color=\"red\">Active Trial</color> will grant enemies a <color=\"yellow\">10% chance of instantly killing you on hit</color>, and increases your <color=\"yellow\">Vulnerability to Damage by 1% for each enemy you have killed during the run</color>."; } } public class ProxyTarot_Trial_Shamura : CustomTarotCard { public override string InternalName => "ProxyTarot_Trial_Shamura"; public override string Skin => "Trinkets/CoopGoodTiming"; public override string LocalisedName(int upgradeIndex) { return "<color=\"red\">Trial of Shamura</color>"; } public override string LocalisedLore() { return "<color=\"yellow\">Peace</color> was never an option."; } public override string LocalisedDescription(int upgradeIndex) { return "Each <color=\"purple\">Active Augment</color>, whenever enemies take damage, their <color=\"yellow\">damage reduction increases by 0.5%, up to 90%</color>.\r\nEach <color=\"red\">Active Trial</color>, whenever you take damage, <color=\"yellow\">all enemies will heal for 10% of their max health</color>."; } } public class Tarot_StrangeExtraction : CustomTarotCard { public override string InternalName => "STRANGE_EXTRACTION"; public override string Skin => "Trinkets/Sun"; public override string LocalisedName(int upgradeIndex) { return "<color=\"red\">Strange Extraction</color>"; } public override string LocalisedLore() { return "Our enemies.. <color=\"yellow\">they possess it..</color>"; } public override string LocalisedDescription(int upgradeIndex) { return "When an enemy dies, they are converted into <color=\"red\">Strange Material</color>."; } public override InventoryItem GetItemToDrop(TarotCard card) { //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_000c: Expected O, but got Unknown return new InventoryItem(Plugin.StrangeMaterialItem); } } } namespace CotLMiniMods.Structures { internal class CustomEnergyStructure : CustomStructure, IEnergyProvider { public int currentEnergy = 0; public int maxEnergy = 1000; public int regenRate = 0; public override string InternalName => "Custom_Energy_Structure"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/endlesspit.png")); public override int BuildDurationMinutes => 30; public int EnergyCurrent { get { return currentEnergy; } set { currentEnergy = value; } } public virtual int EnergyMax { get { return maxEnergy; } set { maxEnergy = value; } } public virtual int EnergyRegenRate { get { return 1; } set { regenRate = value; } } public virtual bool CanAdd => false; public virtual bool CanRemove => true; public virtual bool WorksAtNight => true; public virtual bool WorksAtDay => true; public override string GetLocalizedName() { return "Custom Energy Structure"; } public override string GetLocalizedDescription() { return "Structure that uses or generates Strange Energy"; } public int AddEnergy(int amount) { int result = 0; if (amount < 0) { return result; } if (EnergyCurrent + amount >= EnergyMax) { result = EnergyMax - EnergyCurrent; EnergyCurrent = EnergyMax; } else { EnergyCurrent += amount; result = amount; } return result; } public int RemoveEnergy(int amount) { int result = 0; if (amount < 0) { return result; } if (EnergyCurrent - amount <= 0) { result = EnergyCurrent; EnergyCurrent = 0; } else { result = amount; EnergyCurrent -= amount; } return result; } } internal class Structures_EndlessPit : CustomEnergyStructure, ITaskProvider { public int energyPerFollower = 1; public override string InternalName => "Structures_EndlessPit"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/endlesspit.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 20), new ItemCost(Plugin.StrangeMaterialItem, 10) }; public override Category Category => (Category)0; public override Categories StructureCategories => (Categories)13; public override int EnergyRegenRate { get { return ((StructureBrain)this).Data.Inventory.Count * energyPerFollower; } set { energyPerFollower = value; } } public override bool CanAdd => false; public override bool CanRemove => true; public override bool WorksAtNight => true; public override bool WorksAtDay => true; public override string GetLocalizedName() { return "Endless Pit of Gluttony"; } public override string GetLocalizedDescription() { return "A pit that emits Strange Energy from dead followers. Max 10000 Energy Stored"; } public override void OnAdded() { TimeManager.OnNewPhaseStarted = (Action)Delegate.Combine(TimeManager.OnNewPhaseStarted, new Action(((StructureBrain)this).OnNewPhaseStarted)); EnergyMax = 10000; } public override void OnRemoved() { TimeManager.OnNewPhaseStarted = (Action)Delegate.Remove(TimeManager.OnNewPhaseStarted, new Action(((StructureBrain)this).OnNewPhaseStarted)); } public override void OnNewPhaseStarted() { Plugin.Log.LogInfo((object)"Add more energy"); AddEnergy(EnergyRegenRate); } public void GetAvailableTasks(ScheduledActivity activity, SortedList<float, FollowerTask> sortedTasks) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) int num = 0; foreach (Structures_DeadWorshipper item in StructureManager.GetAllStructuresOfType<Structures_DeadWorshipper>((FollowerLocation)1)) { if (!((StructureBrain)item).Data.Rotten && !((StructureBrain)item).ReservedForTask) { num++; } } if ((int)activity == 0 && !((StructureBrain)this).ReservedForTask && num != 0 && Plugin.reaperJob.Value) { FollowerTask_Reaper followerTask_Reaper = new FollowerTask_Reaper(((StructureBrain)this).Data.ID); sortedTasks.Add(((FollowerTask)followerTask_Reaper).Priorty, (FollowerTask)(object)followerTask_Reaper); } } public FollowerTask GetOverrideTask(FollowerBrain brain) { throw new NotImplementedException(); } public bool CheckOverrideComplete() { return true; } } internal class Structures_StrangeGenerator : CustomEnergyStructure { public int energyPerFollower = 1; public override string InternalName => "Structures_StrangeGenerator"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/generator.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 200), new ItemCost(Plugin.StrangeMaterialItem, 3) }; public override Category Category => (Category)0; public override Categories StructureCategories => (Categories)13; public override int EnergyRegenRate { get { return 1000; } set { energyPerFollower = value; } } public override bool CanAdd => false; public override bool CanRemove => true; public override bool WorksAtNight => true; public override bool WorksAtDay => true; public override string GetLocalizedName() { return "Strange Generator"; } public override string GetLocalizedDescription() { return "A machine that converts Strange Material to Strange Energy on demand. Max 10000 Energy Stored."; } public override void OnAdded() { ((StructureBrain)this).OnAdded(); EnergyMax = 10000; } } internal class FridgeStructure : CustomStructure { public override string InternalName => "Fridge_Structure"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/cotlpc.png")); } internal class HRManagementStructure : CustomStructure { public override string InternalName => "HR_Management"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/cotlpc.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 30) }; public override Category Category => (Category)0; public override Categories StructureCategories => (Categories)13; public override string GetLocalizedName() { return "Follower Manager"; } public override string GetLocalizedDescription() { return "A modern device to manage your followers remotely."; } public override void OnAdded() { ((StructureBrain)this).OnAdded(); } } internal class Structures_AlchemyCauldron : CustomStructure { public ITEM_TYPE SelectedCookItem = (ITEM_TYPE)45; public override string InternalName => "Structures_AlchemyCauldron"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/cauldron.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 750), new ItemCost(Plugin.StrangeMaterialItem, 25) }; public List<ITEM_TYPE> CookItems => new List<ITEM_TYPE> { (ITEM_TYPE)45, (ITEM_TYPE)46, (ITEM_TYPE)47, (ITEM_TYPE)48, (ITEM_TYPE)49, (ITEM_TYPE)124, (ITEM_TYPE)123, (ITEM_TYPE)127, (ITEM_TYPE)125, (ITEM_TYPE)122, (ITEM_TYPE)126 }; public override Category Category => (Category)0; public override Categories StructureCategories => (Categories)13; public override string GetLocalizedName() { return "Alchemy Cauldron"; } public override string GetLocalizedDescription() { return "A Cauldron that allows you to fabricate necklaces using the power of Strange Materials."; } public override void OnAdded() { ((StructureBrain)this).OnAdded(); } } internal class Structures_AugmentTable : CustomStructure { public override string InternalName => "Structures_AugmentTable"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/cauldron.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 500), new ItemCost(Plugin.StrangeMaterialItem, 8) }; public override Category Category => (Category)0; public override Categories StructureCategories => (Categories)13; public override string GetLocalizedName() { return "Augment Table"; } public override string GetLocalizedDescription() { return "A machine that helps infuse The Lamb with Strange Material."; } public override void OnAdded() { ((StructureBrain)this).OnAdded(); } } internal class Structures_EnergyController : CustomEnergyStructure { public int energyPerPhase = 0; public bool timeFrozen = false; public override string InternalName => "Structures_EnergyController"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/wireless.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 1000), new ItemCost(Plugin.StrangeMaterialItem, 25) }; public override Category Category => (Category)0; public override Categories StructureCategories => (Categories)13; public override int EnergyRegenRate => 0; public override bool CanAdd => true; public override bool CanRemove => true; public override bool WorksAtNight => true; public override bool WorksAtDay => true; public override string GetLocalizedName() { return "Energy Controller"; } public override string GetLocalizedDescription() { return "A device that collects and transfers Strange Energy. Stores up to 10000 Strange Energy"; } public override void OnAdded() { ((StructureBrain)this).OnAdded(); EnergyMax = 10000; TimeManager.OnNewPhaseStarted = (Action)Delegate.Combine(TimeManager.OnNewPhaseStarted, new Action(((StructureBrain)this).OnNewPhaseStarted)); } public override void OnRemoved() { TimeManager.OnNewPhaseStarted = (Action)Delegate.Remove(TimeManager.OnNewPhaseStarted, new Action(((StructureBrain)this).OnNewPhaseStarted)); } public override void OnNewPhaseStarted() { Plugin.Log.LogInfo((object)"Collecting energy.."); foreach (StructureBrain item in StructureManager.StructuresAtLocation((FollowerLocation)1)) { if (!(item is Structures_EnergyController) && item is CustomEnergyStructure customEnergyStructure && customEnergyStructure.CanRemove) { Plugin.Log.LogInfo((object)("Found energy structure: " + ((CustomStructure)customEnergyStructure).InternalName + " with " + customEnergyStructure.EnergyCurrent + " energy")); int amount = ((customEnergyStructure.EnergyCurrent + base.EnergyCurrent < customEnergyStructure.EnergyMax) ? customEnergyStructure.EnergyCurrent : (EnergyMax - base.EnergyCurrent)); Plugin.Log.LogInfo((object)("Before adding, this structure has " + base.EnergyCurrent + " energy")); AddEnergy(amount); customEnergyStructure.RemoveEnergy(amount); Plugin.Log.LogInfo((object)("Now this structure has " + base.EnergyCurrent + " energy")); } } Plugin.Log.LogInfo((object)"Distributing Energy.."); foreach (StructureBrain item2 in StructureManager.StructuresAtLocation((FollowerLocation)1)) { if (!(item2 is Structures_EnergyController) && item2 is CustomEnergyStructure customEnergyStructure2 && customEnergyStructure2.CanAdd) { Plugin.Log.LogInfo((object)("Found to add structure: " + ((CustomStructure)customEnergyStructure2).InternalName + " with " + customEnergyStructure2.EnergyCurrent + " energy")); int amount2 = ((customEnergyStructure2.EnergyCurrent + base.EnergyCurrent < EnergyMax) ? base.EnergyCurrent : (EnergyMax - base.EnergyCurrent)); Plugin.Log.LogInfo((object)("Before removing, that structure has " + customEnergyStructure2.EnergyCurrent + " energy")); RemoveEnergy(amount2); customEnergyStructure2.AddEnergy(amount2); Plugin.Log.LogInfo((object)("Now that structure has " + customEnergyStructure2.EnergyCurrent + " energy")); Plugin.Log.LogInfo((object)("Now this structure has " + base.EnergyCurrent + " energy")); } } } } internal class Structures_StasisChamber : CustomEnergyStructure { public int energyPerPhase = 50; public bool timeFrozen = false; public override string InternalName => "Structures_StasisChamber"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/stasis.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 150), new ItemCost(Plugin.StrangeMaterialItem, 10) }; public override Category Category => (Category)0; public override Categories StructureCategories => (Categories)13; public override int EnergyRegenRate => 0; public override bool CanAdd => true; public override bool CanRemove => false; public override bool WorksAtNight => true; public override bool WorksAtDay => true; public override string GetLocalizedName() { return "Stasis Chamber"; } public override string GetLocalizedDescription() { return "An exotic machine that uses Strange Material to freeze time."; } public override void OnAdded() { ((StructureBrain)this).OnAdded(); EnergyMax = 1000; } } internal class SprinklerStructure : CustomStructure { public override string InternalName => "Sprinkler_Structure"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/cotlpc.png")); } internal class Structures_RelicGenerator : CustomStructure { public override string InternalName => "Structures_RelicGenerator"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/Icon_Pond.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 666), new ItemCost(Plugin.StrangeMaterialItem, 6) }; public override Category Category => (Category)0; public override Categories StructureCategories => (Categories)13; public override string GetLocalizedName() { return "Infernal Infuser"; } public override string GetLocalizedDescription() { return "Trials of the Gods: Activate trials and augments to make your runs more challenging! Can you rise up to be the ultimate lamb?"; } } internal class WishingWellStructure : CustomStructure { public override string InternalName => "Wishing_Well"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/Icon_Pond.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 500), new ItemCost((ITEM_TYPE)86, 5), new ItemCost(Plugin.StrangeMaterialItem, 10) }; public override Category Category => (Category)0; public override Categories StructureCategories => (Categories)13; public override string GetLocalizedName() { return "Wishing Well v2"; } public override string GetLocalizedDescription() { return "Empower yourself with Tarot Cards and Relics of your choice at the start of a new run. Only one relic can be chosen."; } } } namespace CotLMiniMods.Structures.Proxies { internal class ChefDeskStructure : CustomStructure, ITaskProvider { public ITEM_TYPE SelectedCookItem = (ITEM_TYPE)57; public override string InternalName => "Chef_Desk_Structure"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/chefdesk.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 10), new ItemCost((ITEM_TYPE)35, 5), new ItemCost((ITEM_TYPE)1, 10) }; public List<ITEM_TYPE> CookItems => new List<ITEM_TYPE> { (ITEM_TYPE)57, (ITEM_TYPE)69, (ITEM_TYPE)100, (ITEM_TYPE)112, (ITEM_TYPE)108, (ITEM_TYPE)106, (ITEM_TYPE)58, (ITEM_TYPE)80, (ITEM_TYPE)109, (ITEM_TYPE)107 }; public override string GetLocalizedName() { return "Sous Chef Desk"; } public override string GetLocalizedDescription() { return "A Desk for the Sous Chef to create Signature Dishes."; } public bool CheckOverrideComplete() { return true; } public void GetAvailableTasks(ScheduledActivity activity, SortedList<float, FollowerTask> sortedTasks) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) if ((int)activity == 0 && !((StructureBrain)this).ReservedForTask) { if (Interaction_FollowerKitchen.FollowerKitchens.Count > 0 && ((Interaction_Kitchen)Interaction_FollowerKitchen.FollowerKitchens[0]).StructureInfo.QueuedMeals.Count > 0) { FollowerTask_CookCustom followerTask_CookCustom = new FollowerTask_CookCustom(((StructureBrain)this).Data.ID); sortedTasks.Add(((FollowerTask)followerTask_CookCustom).Priorty, (FollowerTask)(object)followerTask_CookCustom); } if (FollowerManager.GetHungriestFollowerBrain().GetHungerScore() > 0f) { Debug.Log((object)("Someone is hungry at " + FollowerManager.GetHungriestFollowerBrain().GetHungerScore())); FollowerTask_CookCustom followerTask_CookCustom2 = new FollowerTask_CookCustom(((StructureBrain)this).Data.ID); sortedTasks.Add(((FollowerTask)followerTask_CookCustom2).Priorty, (FollowerTask)(object)followerTask_CookCustom2); } } } public FollowerTask GetOverrideTask(FollowerBrain brain) { throw new NotImplementedException(); } } internal class WaiterDeskStructure : CustomStructure, ITaskProvider { public override string InternalName => "Waiter_Desk_Structure"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/waiterdesk.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 10), new ItemCost((ITEM_TYPE)35, 5), new ItemCost((ITEM_TYPE)1, 10) }; public override string GetLocalizedName() { return "Waiter Desk"; } public override string GetLocalizedDescription() { return "A Desk to allow followers to serve food to other followers."; } public bool CheckOverrideComplete() { return true; } public void GetAvailableTasks(ScheduledActivity activity, SortedList<float, FollowerTask> sortedTasks) { //IL_00f2: Unknown result type (might be due to invalid IL or missing references) int num = 0; foreach (Structures_Meal item in StructureManager.GetAllStructuresOfType<Structures_Meal>((FollowerLocation)1)) { if (!((StructureBrain)item).Data.Rotten && !((StructureBrain)item).Data.Burned && !((StructureBrain)item).ReservedForTask) { num++; } } foreach (Interaction_FollowerKitchen followerKitchen in Interaction_FollowerKitchen.FollowerKitchens) { foreach (InventoryItem item2 in followerKitchen.foodStorage.StructureInfo.Inventory) { if (item2.UnreservedQuantity > 0) { num++; } } } if ((int)activity == 0 && !((StructureBrain)this).ReservedForTask && num != 0) { WaiterTask waiterTask = new WaiterTask(((StructureBrain)this).Data.ID); sortedTasks.Add(((FollowerTask)waiterTask).Priorty, (FollowerTask)(object)waiterTask); } } public FollowerTask GetOverrideTask(FollowerBrain brain) { throw new NotImplementedException(); } } } namespace CotLMiniMods.Structures.Productivity { internal class Structures_LuckyNarinder : CustomStructure, ITaskProvider { public override string InternalName => "Structures_LuckyNarinder"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/luckynarinder.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 15), new ItemCost((ITEM_TYPE)81, 5), new ItemCost((ITEM_TYPE)82, 5) }; public override string GetLocalizedName() { return "Lucky Narinder Statue"; } public override string GetLocalizedDescription() { return "Follower can admire this statue and pray to it. Provides Faith."; } public bool CheckOverrideComplete() { return true; } public void GetAvailableTasks(ScheduledActivity activity, SortedList<float, FollowerTask> sortedTasks) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) if ((int)activity == 0 && !((StructureBrain)this).ReservedForTask) { FollowerTask_DevoteNarinder followerTask_DevoteNarinder = new FollowerTask_DevoteNarinder(((StructureBrain)this).Data.ID); sortedTasks.Add(((FollowerTask)followerTask_DevoteNarinder).Priorty, (FollowerTask)(object)followerTask_DevoteNarinder); } } public FollowerTask GetOverrideTask(FollowerBrain brain) { throw new NotImplementedException(); } } internal class Structures_StudyTable : CustomStructure, ITaskProvider { public override string InternalName => "Structures_StudyTable"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/study.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 15), new ItemCost((ITEM_TYPE)81, 7), new ItemCost((ITEM_TYPE)35, 10) }; public override string GetLocalizedName() { return "Study Table"; } public override string GetLocalizedDescription() { return "Allows your followers to research in Strange Materials. Invest Gold to increase generation. The follower will gain loyalty as well."; } public bool CheckOverrideComplete() { return true; } public void GetAvailableTasks(ScheduledActivity activity, SortedList<float, FollowerTask> sortedTasks) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) if ((int)activity == 0 && !((StructureBrain)this).ReservedForTask) { FollowerTask_StudyResearch followerTask_StudyResearch = new FollowerTask_StudyResearch(((StructureBrain)this).Data.ID); sortedTasks.Add(((FollowerTask)followerTask_StudyResearch).Priorty, (FollowerTask)(object)followerTask_StudyResearch); } } public FollowerTask GetOverrideTask(FollowerBrain brain) { throw new NotImplementedException(); } } internal class Structures_Telescope : CustomStructure, ITaskProvider { public bool UsedForTheDay = false; public override string InternalName => "Structures_Telescope"; public override Sprite Sprite => TextureHelper.CreateSpriteFromPath(Path.Combine(Plugin.PluginPath, "Assets/telescope.png")); public override int BuildDurationMinutes => 30; public override List<ItemCost> Cost => new List<ItemCost> { new ItemCost((ITEM_TYPE)20, 15), new ItemCost((ITEM_TYPE)81, 5), new ItemCost((ITEM_TYPE)82, 5) }; public override string GetLocalizedName() { return "Telescope"; } public override string GetLocalizedDescription() { return "Allows your followers to see the stars, and gain inspiration."; } public bool CheckOverrideComplete() { return true; } public void GetAvailableTasks(ScheduledActivity activity, SortedList<float, FollowerTask> sortedTasks) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) if ((int)activity == 0 && !((StructureBrain)this).ReservedForTask && !UsedForTheDay) { FollowerTask_Stargazing followerTask_Stargazing = new FollowerTask_Stargazing(((StructureBrain)this).Data.ID); sortedT