Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of SuspiciousTentacle v2.1.8
SuspiciousTentacle.dll
Decompiled 2 years agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using Aetherium.CoreModules; using BepInEx; using BepInEx.Configuration; using IL.RoR2; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using R2API; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using UnityEngine; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyCompany("SuspiciousTentacle")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("SuspiciousTentacle")] [assembly: AssemblyTitle("SuspiciousTentacle")] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [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 SuspiciousTentacle { internal class BellyBehavior : MonoBehaviour { internal CharacterBody parentBody; internal SuspiciousTentacle ST; private GameObject localBelly; private Renderer bellyRend; private Color BaseColor = new Color(0.2f, 0.2f, 0.2f, 1f); public void Awake() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) Transform child = ((Component)this).transform.GetChild(0); if (Object.op_Implicit((Object)(object)child)) { ((Component)child).transform.localScale = new Vector3(0.2f, 0.25f, 0.5f); localBelly = ((Component)child).gameObject; bellyRend = localBelly.GetComponent<Renderer>(); } ColorBelly(); } public void ColorBelly() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06d5: Unknown result type (might be due to invalid IL or missing references) //IL_06f2: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_06b1: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_0693: Unknown result type (might be due to invalid IL or missing references) //IL_0698: Unknown result type (might be due to invalid IL or missing references) //IL_06ff: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_04aa: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Unknown result type (might be due to invalid IL or missing references) //IL_053e: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0623: Unknown result type (might be due to invalid IL or missing references) //IL_0628: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0604: 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_05e6: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) if ((Object)parentBody == (Object)null) { return; } Color baseColor = default(Color); switch (BodyCatalog.GetBodyName(parentBody.bodyIndex)) { case "CommandoBody": { string name8 = ((Object)SkinCatalog.GetBodySkinDef(parentBody.bodyIndex, (int)parentBody.skinIndex)).name; string text8 = name8; if (!(text8 == "skinCommandoDefault")) { if (text8 == "skinCommandoAlt") { BaseColor = new Color(10f / 51f, 0.1764706f, 8f / 51f); } else { BaseColor = new Color(0f, 0f, 0f); } } else { BaseColor = new Color(8f / 51f, 8f / 51f, 8f / 51f); } break; } case "CaptainBody": { string name7 = ((Object)SkinCatalog.GetBodySkinDef(parentBody.bodyIndex, (int)parentBody.skinIndex)).name; string text7 = name7; if (!(text7 == "skinCaptainDefault")) { if (text7 == "skinCaptainAlt") { BaseColor = new Color(38f / 51f, 38f / 51f, 38f / 51f); } else { BaseColor = new Color(0f, 0f, 0f); } } else { BaseColor = new Color(20f / 51f, 20f / 51f, 20f / 51f); } break; } case "CrocoBody": { string name5 = ((Object)SkinCatalog.GetBodySkinDef(parentBody.bodyIndex, (int)parentBody.skinIndex)).name; string text5 = name5; if (!(text5 == "skinCrocoDefault")) { if (text5 == "skinCrocoAlt") { BaseColor = new Color(16f / 51f, 1f / 3f, 20f / 51f); } else { BaseColor = new Color(0f, 0f, 0f); } } else { BaseColor = new Color(0.23529412f, 5f / 51f, 8f / 51f); } break; } case "EngiBody": { string name4 = ((Object)SkinCatalog.GetBodySkinDef(parentBody.bodyIndex, (int)parentBody.skinIndex)).name; string text4 = name4; if (!(text4 == "skinEngiDefault")) { if (text4 == "skinEngiAlt") { BaseColor = new Color(0.16862746f, 10f / 51f, 8f / 51f); } else { BaseColor = new Color(0f, 0f, 0f); } } else { BaseColor = new Color(5f / 51f, 0.05490196f, 0.23529412f); } break; } case "HuntressBody": { string name2 = ((Object)SkinCatalog.GetBodySkinDef(parentBody.bodyIndex, (int)parentBody.skinIndex)).name; string text2 = name2; if (!(text2 == "skinHuntressDefault")) { if (text2 == "skinHuntressAlt") { BaseColor = new Color(10f / 51f, 5f / 51f, 8f / 51f); } else { BaseColor = new Color(0f, 0f, 0f); } } else { BaseColor = new Color(4f / 51f, 5f / 51f, 0.11764706f); } break; } case "LoaderBody": { string name3 = ((Object)SkinCatalog.GetBodySkinDef(parentBody.bodyIndex, (int)parentBody.skinIndex)).name; string text3 = name3; if (!(text3 == "skinLoaderDefault")) { if (text3 == "skinLoaderAlt") { BaseColor = new Color(6f / 85f, 0.09019608f, 18f / 85f); } else { BaseColor = new Color(0f, 0f, 0f); } } else { BaseColor = new Color(6f / 85f, 0.09019608f, 8f / 85f); } break; } case "MageBody": { string name6 = ((Object)SkinCatalog.GetBodySkinDef(parentBody.bodyIndex, (int)parentBody.skinIndex)).name; string text6 = name6; if (!(text6 == "skinMageDefault")) { if (text6 == "skinMageAlt") { BaseColor = new Color(1f / 17f, 4f / 51f, 5f / 51f); } else { BaseColor = new Color(0f, 0f, 0f); } } else { BaseColor = new Color(0.050980393f, 1f / 17f, 1f / 15f); } break; } case "MercBody": { string name = ((Object)SkinCatalog.GetBodySkinDef(parentBody.bodyIndex, (int)parentBody.skinIndex)).name; string text = name; if (!(text == "skinMercDefault")) { if (text == "skinMercAlt") { BaseColor = new Color(8f / 51f, 0f, 0f); } else { BaseColor = new Color(0f, 0f, 0f); } } else { BaseColor = new Color(7f / 85f, 5f / 51f, 0.16862746f); } break; } default: BaseColor = new Color(0.2f, 0.2f, 0.2f, 1f); break; } BaseColor = baseColor; bellyRend.material.color = BaseColor; } public void LateUpdate() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) if (!((Object)ST == (Object)null) && !((Object)parentBody == (Object)null)) { float num = ST.GrowthProgress(parentBody); if (Object.op_Implicit((Object)(object)localBelly)) { Vector3 val = Vector3.Lerp(new Vector3(0.2f, 0.25f, 0.5f), Vector3.one, num); localBelly.transform.localScale = Vector3.Lerp(localBelly.transform.localScale, val, Time.deltaTime); } } } } [BepInPlugin("com.RuneFoxMods.SuspiciousTentacle", "SuspiciousTentacle", "1.0.9")] public class SuspiciousTentacle : BaseUnityPlugin { public const string PluginGUID = "com.RuneFoxMods.SuspiciousTentacle"; public const string PluginName = "SuspiciousTentacle"; public const string PluginVersion = "1.1.10"; private static ItemDef SusTentacleItemDef = ScriptableObject.CreateInstance<ItemDef>(); private static ItemDef CommonEggItemDef = ScriptableObject.CreateInstance<ItemDef>(); private static ItemDef UncommonEggItemDef = ScriptableObject.CreateInstance<ItemDef>(); private static ItemDef LegendaryEggItemDef = ScriptableObject.CreateInstance<ItemDef>(); private static ItemDef BossEggItemDef = ScriptableObject.CreateInstance<ItemDef>(); private static ItemDef LunarEggItemDef = ScriptableObject.CreateInstance<ItemDef>(); private static GameObject TentaclePrefab; private static GameObject BellyPrefab; private StatHooks hooks = new StatHooks(); public static AssetBundle bundle; private BuffDef EggGrowthDebuff; private string EggDesc = "Can be used as an item for cauldrons and printers :3"; private Dictionary<CharacterBody, float> EggSpawnTimers = new Dictionary<CharacterBody, float>(); private Dictionary<CharacterBody, Queue<ItemDef>> eggQueue = new Dictionary<CharacterBody, Queue<ItemDef>>(); public static ConfigEntry<float> EggGrowthTime { get; set; } public static ConfigEntry<float> TimeBetweenEggs { get; set; } public static ConfigEntry<float> UncommonRarity { get; set; } public static ConfigEntry<float> LegendaryRarity { get; set; } public static ConfigEntry<float> LunarRarity { get; set; } public static ConfigEntry<float> BossRarity { get; set; } public static ConfigEntry<float> SlowDownExponent { get; set; } public static ConfigEntry<bool> IsDebuff { get; set; } public static ConfigEntry<bool> UseLunar { get; set; } public static ConfigEntry<bool> SlowdownCurve { get; set; } public static ConfigEntry<bool> ShowBelly { get; set; } public static ConfigEntry<int> EggNum { get; set; } public static ConfigEntry<bool> EggOverLoad { get; set; } public static ConfigEntry<int> Egglogbase { get; set; } public void Start() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown AssetLoad(); ApplyConfigs(); hooks.Init(); DefineItems(); AddTokens(); CreateBuff(); LoadItems(); ConfigBullShit(); CharacterBody.OnBuffFinalStackLost += new hook_OnBuffFinalStackLost(SpawnEgg); CharacterBody.OnClientBuffsChanged += new hook_OnClientBuffsChanged(test); CharacterBody.onBodyInventoryChangedGlobal += CharacterBody_onBodyInventoryChangedGlobal; StatHooks.GetStatCoefficients += AddGrowthDebuff; } private void ConfigBullShit() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Expected O, but got Unknown ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(IsDebuff)); ModSettingsManager.AddOption((BaseOption)new SliderOption(TimeBetweenEggs)); new SliderConfig { min = 0f, max = 1f }; ModSettingsManager.AddOption((BaseOption)new SliderOption(EggGrowthTime)); new SliderConfig { min = 1f, max = 240f }; ModSettingsManager.AddOption((BaseOption)new IntSliderOption(Egglogbase)); new IntSliderConfig { min = 2, max = 10 }; ModSettingsManager.AddOption((BaseOption)new StepSliderOption(UncommonRarity)); new StepSliderConfig { min = 1f, max = 100f, increment = 1f }; ModSettingsManager.AddOption((BaseOption)new StepSliderOption(LegendaryRarity)); new StepSliderConfig { min = 1f, max = 100f, increment = 1f }; ModSettingsManager.AddOption((BaseOption)new StepSliderOption(BossRarity)); new StepSliderConfig { min = 1f, max = 100f, increment = 1f }; ModSettingsManager.AddOption((BaseOption)new StepSliderOption(LunarRarity)); new StepSliderConfig { min = 1f, max = 100f, increment = 1f }; ModSettingsManager.AddOption((BaseOption)new SliderOption(SlowDownExponent)); new SliderConfig { min = 0f, max = 1f }; ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(EggOverLoad)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SlowdownCurve)); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(EggNum)); new IntSliderConfig { min = 1, max = 10 }; ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ShowBelly)); } private void LoadItems() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemDisplayRuleDict val2 = TentacleDisplayRules(); if (!ItemAPI.Add(new CustomItem(SusTentacleItemDef, val2))) { Debug.Log((object)"SusTent: Error Loading SusTentacle Item"); } if (!ItemAPI.Add(new CustomItem(CommonEggItemDef, val))) { Debug.Log((object)"SusTent: Error Loading SusTentacle Item"); } if (!ItemAPI.Add(new CustomItem(UncommonEggItemDef, val))) { Debug.Log((object)"SusTent: Error Loading SusTentacle Item"); } if (!ItemAPI.Add(new CustomItem(LegendaryEggItemDef, val))) { Debug.Log((object)"SusTent: Error Loading SusTentacle Item"); } if (UseLunar.Value && !ItemAPI.Add(new CustomItem(LunarEggItemDef, val))) { Debug.Log((object)"SusTent: Error Loading SusTentacle Item"); } if (!ItemAPI.Add(new CustomItem(BossEggItemDef, val))) { Debug.Log((object)"SusTent: Error Loading SusTentacle Item"); } } private void ApplyConfigs() { UseLunar = ((BaseUnityPlugin)this).Config.Bind<bool>("Config", "Enable Lunar Eggs", false, "Enables Lunar eggs. Only use if you have a mod like LunarScrap that can use them"); ShowBelly = ((BaseUnityPlugin)this).Config.Bind<bool>("Config", "Enables Belly display", false, "this feature is considered deprecated as body blend is way better"); EggGrowthTime = ((BaseUnityPlugin)this).Config.Bind<float>("Config", "Egg Growth Time", 60f, "How long each batch of eggs takes"); TimeBetweenEggs = ((BaseUnityPlugin)this).Config.Bind<float>("Config", "Time Between Eggs", 0.5f, "How long the pause between eggs is when laying a batch"); UncommonRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Drop Rate", "Uncommon Egg Rarity", 35f, "Chance at getting an Uncommon Egg. (Set between 0-100)"); LegendaryRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Drop Rate", "Legendary Egg Rarity", 5f, "Chance at getting an Legendary Egg. (Set between 0-100)"); LunarRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Drop Rate", "Lunar Egg Rarity", 10f, "Chance at getting an Lunar Egg. (Set between 0-100)"); BossRarity = ((BaseUnityPlugin)this).Config.Bind<float>("Drop Rate", "Boss Egg Rarity", 10f, "Chance at getting an Boss Egg. (Set between 0-100)"); SlowDownExponent = ((BaseUnityPlugin)this).Config.Bind<float>("Debuff", "Slowdown Exponent", 0.99f, "Max Slowdown is calculated using the formula: 1-1/(1+tentacleCount)^exponent. Between 0-1 is a good value"); SlowdownCurve = ((BaseUnityPlugin)this).Config.Bind<bool>("Debuff", "Slowdown Curve", true, "default is true if set to false max slowdown is used all the time regardless of belly growth"); IsDebuff = ((BaseUnityPlugin)this).Config.Bind<bool>("Debuff", "Debuff/Buff", true, "whether this counts as debuff for blast shower/Ben's Raincoat/Abyssal Medkit purposes :3"); EggNum = ((BaseUnityPlugin)this).Config.Bind<int>("Egg", "Egg Count", 1, "Amount of eggs dropped per tentacle it will increase the queue so decrease time between eggs config to compensate"); EggOverLoad = ((BaseUnityPlugin)this).Config.Bind<bool>("Egg", "eggoverload", false, "when set to true egg growth time will be increased based on a log of the amount of eggs"); Egglogbase = ((BaseUnityPlugin)this).Config.Bind<int>("Egg", "Egg log base", 10, "the base for which the log base will be set to"); } private static void AssetLoad() { using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SuspiciousTentacle.belly")) { bundle = AssetBundle.LoadFromStream(stream); } Debug.Log((object)"SusTent: Assets loaded"); BellyPrefab = bundle.LoadAsset<GameObject>("Assets/Resources/BellyBase.prefab"); if (Object.op_Implicit((Object)(object)BellyPrefab)) { BellyPrefab.AddComponent<BellyBehavior>(); } TentaclePrefab = bundle.LoadAsset<GameObject>("Assets/Resources/SuspiciousTentacle.prefab"); } private ItemDisplayRuleDict TentacleDisplayRules() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0186: 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) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: 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_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: 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) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: 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_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_0475: 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_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04cd: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: 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_0503: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_050d: Unknown result type (might be due to invalid IL or missing references) //IL_050e: 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_0520: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Unknown result type (might be due to invalid IL or missing references) //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_058f: Unknown result type (might be due to invalid IL or missing references) //IL_05c6: Unknown result type (might be due to invalid IL or missing references) //IL_05cf: Unknown result type (might be due to invalid IL or missing references) //IL_05fd: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_0633: Unknown result type (might be due to invalid IL or missing references) //IL_0638: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_0650: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_0677: 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_0692: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_06b3: Unknown result type (might be due to invalid IL or missing references) //IL_06d3: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_070a: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Unknown result type (might be due to invalid IL or missing references) //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_072a: 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_074a: Unknown result type (might be due to invalid IL or missing references) //IL_074b: Unknown result type (might be due to invalid IL or missing references) //IL_0754: 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_078b: Unknown result type (might be due to invalid IL or missing references) //IL_0790: Unknown result type (might be due to invalid IL or missing references) //IL_07a6: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07c1: Unknown result type (might be due to invalid IL or missing references) //IL_07c6: Unknown result type (might be due to invalid IL or missing references) //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07cc: Unknown result type (might be due to invalid IL or missing references) //IL_07ec: Unknown result type (might be due to invalid IL or missing references) //IL_07f5: Unknown result type (might be due to invalid IL or missing references) //IL_0823: Unknown result type (might be due to invalid IL or missing references) //IL_0828: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_0859: Unknown result type (might be due to invalid IL or missing references) //IL_085e: Unknown result type (might be due to invalid IL or missing references) //IL_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0864: Unknown result type (might be due to invalid IL or missing references) //IL_086d: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08a9: Unknown result type (might be due to invalid IL or missing references) //IL_08bf: Unknown result type (might be due to invalid IL or missing references) //IL_08c4: Unknown result type (might be due to invalid IL or missing references) //IL_08da: Unknown result type (might be due to invalid IL or missing references) //IL_08df: Unknown result type (might be due to invalid IL or missing references) //IL_08e4: Unknown result type (might be due to invalid IL or missing references) //IL_08e5: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.one * 0.4f; ItemDisplayRuleDict val2 = new ItemDisplayRuleDict((ItemDisplayRule[])(object)new ItemDisplayRule[2] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = BellyPrefab, childName = "Stomach", localPos = new Vector3(0f, 0.07f, -0.01f), localAngles = new Vector3(277.1241f, 359.5891f, 261.3644f), localScale = new Vector3(0.25f, 0.15f, 0.2f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = TentaclePrefab, childName = "Pelvis", localPos = new Vector3(0f, 0.0604f, -0.0569f), localAngles = new Vector3(63.3116f, 0f, 323.8518f), localScale = new Vector3(0.025f, 0.025f, 0.025f) } }); val2.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[2] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = BellyPrefab, childName = "Stomach", localPos = new Vector3(0f, 0f, 0f), localAngles = new Vector3(293.9061f, 350.9999f, 270.0001f), localScale = new Vector3(0.2f, 0.15f, 0.15f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = TentaclePrefab, childName = "Pelvis", localPos = new Vector3(0f, 0.0929f, -0.0146f), localAngles = new Vector3(50.6317f, 0f, 0f), localScale = new Vector3(0.025f, 0.025f, 0.025f) } }); val2.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[0]); val2.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[2] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = BellyPrefab, childName = "Stomach", localPos = new Vector3(-0.0001f, -0.0265f, -0.012f), localAngles = new Vector3(281.6966f, 351f, 270.0001f), localScale = new Vector3(0.2f, 0.175f, 0.2f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = TentaclePrefab, childName = "Pelvis", localPos = new Vector3(0f, 0.1035f, -0.058f), localAngles = new Vector3(57.6637f, 0f, 0f), localScale = new Vector3(0.025f, 0.025f, 0.025f) } }); val2.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[2] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = BellyPrefab, childName = "Stomach", localPos = new Vector3(0.0101f, -0.0003f, 0.0271f), localAngles = new Vector3(285.4578f, 356.7288f, 263.8447f), localScale = new Vector3(0.2f, 0.15f, 0.15f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = TentaclePrefab, childName = "Pelvis", localPos = new Vector3(0f, 0.1035f, -0.058f), localAngles = new Vector3(57.6637f, 0f, 0f), localScale = new Vector3(0.025f, 0.025f, 0.025f) } }); val2.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[2] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = BellyPrefab, childName = "Stomach", localPos = new Vector3(-0.0005f, -0.0722f, 0.0158f), localAngles = new Vector3(278.2904f, 333.7606f, 288.1437f), localScale = new Vector3(0.2f, 0.15f, 0.175f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = TentaclePrefab, childName = "Pelvis", localPos = new Vector3(0f, 0.1692f, -0.038f), localAngles = new Vector3(52.8342f, 0f, 0f), localScale = new Vector3(0.025f, 0.025f, 0.025f) } }); val2.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[0]); val2.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[2] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = BellyPrefab, childName = "Stomach", localPos = new Vector3(-0.0001f, -0.0229f, 0.0099f), localAngles = new Vector3(280.0172f, 338.5141f, 282.8109f), localScale = new Vector3(0.2f, 0.17f, 0.175f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = TentaclePrefab, localPos = new Vector3(-0.0128f, 0.1827f, -0.0483f), localAngles = new Vector3(72.2033f, 0f, 0f), localScale = new Vector3(0.025f, 0.025f, 0.025f) } }); val2.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[2] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = BellyPrefab, childName = "Stomach", localPos = new Vector3(0f, -0.3115f, -0.9505f), localAngles = new Vector3(279.7174f, 356.7131f, 90.5223f), localScale = new Vector3(2.75f, 2.5f, 2f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = TentaclePrefab, childName = "Hip", localPos = new Vector3(0f, 1.1898f, -1.0954f), localAngles = new Vector3(45.4947f, 0f, 0f), localScale = new Vector3(0.35f, 0.35f, 0.3f) } }); val2.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[2] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = BellyPrefab, childName = "Stomach", localPos = new Vector3(-0.0164f, 0.1507f, 0.0245f), localAngles = new Vector3(288.7136f, 10.3394f, 261.6913f), localScale = new Vector3(0.25f, 0.2f, 0.2f) }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = TentaclePrefab, childName = "Pelvis", localPos = new Vector3(0f, 0.0519f, -0.016f), localAngles = new Vector3(72.8418f, 0f, 0f), localScale = new Vector3(0.035f, 0.035f, 0.03f) } }); return val2; } private void CreateBuff() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) EggGrowthDebuff = ScriptableObject.CreateInstance<BuffDef>(); EggGrowthDebuff.buffColor = new Color(0f, 100f, 100f); EggGrowthDebuff.canStack = true; EggGrowthDebuff.isDebuff = IsDebuff.Value; ((Object)EggGrowthDebuff).name = "SuspiciousTentacle: Egg Growth Timer"; EggGrowthDebuff.iconSprite = bundle.LoadAsset<Sprite>("Assets/Resources/EggBuffIcon.png"); if (!ContentAddition.AddBuffDef(EggGrowthDebuff)) { Debug.Log((object)"SusTent: unable to add Buff to buff catalouge"); } } public int EggMasterCount(CharacterBody character) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) return character.inventory.GetItemCount(CommonEggItemDef.itemIndex) + character.inventory.GetItemCount(UncommonEggItemDef.itemIndex) + character.inventory.GetItemCount(LegendaryEggItemDef.itemIndex) + character.inventory.GetItemCount(BossEggItemDef.itemIndex) + character.inventory.GetItemCount(LunarEggItemDef.itemIndex); } private void setTierWhenAvailable(ItemDef itemDef, ItemTier tier) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) itemDef.deprecatedTier = tier; } private void DefineItems() { ((Object)SusTentacleItemDef).name = "SUSPICIOUSTENTACLE_NAME"; SusTentacleItemDef.nameToken = "SUSPICIOUSTENTACLE_NAME"; SusTentacleItemDef.pickupToken = "SUSPICIOUSTENTACLE_PICKUP"; SusTentacleItemDef.descriptionToken = "SUSPICIOUSTENTACLE_DESC"; SusTentacleItemDef.loreToken = "SUSPICIOUSTENTACLE_LORE"; setTierWhenAvailable(SusTentacleItemDef, (ItemTier)3); SusTentacleItemDef.pickupIconSprite = bundle.LoadAsset<Sprite>("Assets/Resources/SuspiciousTentacle.png"); SusTentacleItemDef.pickupModelPrefab = bundle.LoadAsset<GameObject>("Assets/Resources/SuspiciousTentacleDisplay.prefab"); SusTentacleItemDef.canRemove = true; SusTentacleItemDef.hidden = false; SusTentacleItemDef.tags = (ItemTag[])(object)new ItemTag[2] { (ItemTag)4, (ItemTag)11 }; ((Object)CommonEggItemDef).name = "COMMONEGG_NAME"; CommonEggItemDef.nameToken = "COMMONEGG_NAME"; CommonEggItemDef.pickupToken = "COMMONEGG_PICKUP"; CommonEggItemDef.descriptionToken = "COMMONEGG_DESC"; CommonEggItemDef.loreToken = "COMMONEGG_LORE"; setTierWhenAvailable(CommonEggItemDef, (ItemTier)0); CommonEggItemDef.pickupIconSprite = bundle.LoadAsset<Sprite>("Assets/Resources/CommonEggIcon.png"); CommonEggItemDef.pickupModelPrefab = bundle.LoadAsset<GameObject>("Assets/Resources/CommonEgg.prefab"); CommonEggItemDef.canRemove = true; CommonEggItemDef.hidden = false; CommonEggItemDef.tags = (ItemTag[])(object)new ItemTag[2] { (ItemTag)9, (ItemTag)10 }; ((Object)UncommonEggItemDef).name = "UNCOMMONEGG_NAME"; UncommonEggItemDef.nameToken = "UNCOMMONEGG_NAME"; UncommonEggItemDef.pickupToken = "UNCOMMONEGG_PICKUP"; UncommonEggItemDef.descriptionToken = "UNCOMMONEGG_DESC"; UncommonEggItemDef.loreToken = "UNCOMMONEGG_LORE"; setTierWhenAvailable(UncommonEggItemDef, (ItemTier)1); UncommonEggItemDef.pickupIconSprite = bundle.LoadAsset<Sprite>("Assets/Resources/UncommonEggIcon.png"); UncommonEggItemDef.pickupModelPrefab = bundle.LoadAsset<GameObject>("Assets/Resources/UncommonEgg.prefab"); UncommonEggItemDef.canRemove = true; UncommonEggItemDef.hidden = false; UncommonEggItemDef.tags = (ItemTag[])(object)new ItemTag[2] { (ItemTag)9, (ItemTag)10 }; ((Object)LegendaryEggItemDef).name = "LEGENDARYEGG_NAME"; LegendaryEggItemDef.nameToken = "LEGENDARYEGG_NAME"; LegendaryEggItemDef.pickupToken = "LEGENDARYEGG_PICKUP"; LegendaryEggItemDef.descriptionToken = "LEGENDARYEGG_DESC"; LegendaryEggItemDef.loreToken = "LEGENDARYEGG_LORE"; setTierWhenAvailable(LegendaryEggItemDef, (ItemTier)2); LegendaryEggItemDef.pickupIconSprite = bundle.LoadAsset<Sprite>("Assets/Resources/LegendaryEggIcon.png"); LegendaryEggItemDef.pickupModelPrefab = bundle.LoadAsset<GameObject>("Assets/Resources/LegendaryEgg.prefab"); LegendaryEggItemDef.canRemove = true; LegendaryEggItemDef.hidden = false; LegendaryEggItemDef.tags = (ItemTag[])(object)new ItemTag[2] { (ItemTag)9, (ItemTag)10 }; ((Object)LunarEggItemDef).name = "LUNAREGG_NAME"; LunarEggItemDef.nameToken = "LUNAREGG_NAME"; LunarEggItemDef.pickupToken = "LUNAREGG_PICKUP"; LunarEggItemDef.descriptionToken = "LUNAREGG_DESC"; LunarEggItemDef.loreToken = "LUNAREGG_LORE"; setTierWhenAvailable(LunarEggItemDef, (ItemTier)3); LunarEggItemDef.pickupIconSprite = bundle.LoadAsset<Sprite>("Assets/Resources/LunarEggIcon.png"); LunarEggItemDef.pickupModelPrefab = bundle.LoadAsset<GameObject>("Assets/Resources/LunarEgg.prefab"); LunarEggItemDef.canRemove = true; LunarEggItemDef.hidden = false; LunarEggItemDef.tags = (ItemTag[])(object)new ItemTag[2] { (ItemTag)9, (ItemTag)10 }; ((Object)BossEggItemDef).name = "BOSSEGG_NAME"; BossEggItemDef.nameToken = "BOSSEGG_NAME"; BossEggItemDef.pickupToken = "BOSSEGG_PICKUP"; BossEggItemDef.descriptionToken = "BOSSEGG_DESC"; BossEggItemDef.loreToken = "BOSSEGG_LORE"; setTierWhenAvailable(BossEggItemDef, (ItemTier)4); BossEggItemDef.pickupIconSprite = bundle.LoadAsset<Sprite>("Assets/Resources/BossEggIcon.png"); BossEggItemDef.pickupModelPrefab = bundle.LoadAsset<GameObject>("Assets/Resources/BossEgg.prefab"); BossEggItemDef.canRemove = true; BossEggItemDef.hidden = false; BossEggItemDef.tags = (ItemTag[])(object)new ItemTag[2] { (ItemTag)9, (ItemTag)10 }; } private void AddTokens() { LanguageAPI.Add("SUSPICIOUSTENTACLE_NAME", "Suspicious Tentacle"); LanguageAPI.Add("SUSPICIOUSTENTACLE_PICKUP", "Baby on board"); LanguageAPI.Add("SUSPICIOUSTENTACLE_DESC", "Grow an egg<style=cStack>(+1 per stack)</style> over time.\n Decreases movement speed as the egg(s) grows. <style=cStack>Additional Tentacles increase slow effect</style>"); LanguageAPI.Add("SUSPICIOUSTENTACLE_LORE", "It's not connected to anything, where are the eggs even coming from?"); LanguageAPI.Add("COMMONEGG_NAME", "Common Egg"); LanguageAPI.Add("COMMONEGG_PICKUP", "feeling cute"); LanguageAPI.Add("COMMONEGG_DESC", EggDesc); LanguageAPI.Add("COMMONEGG_LORE", "crazy?"); LanguageAPI.Add("UNCOMMONEGG_NAME", "Uncommon Egg"); LanguageAPI.Add("UNCOMMONEGG_PICKUP", "might delete"); LanguageAPI.Add("UNCOMMONEGG_DESC", EggDesc); LanguageAPI.Add("UNCOMMONEGG_LORE", "cbt"); LanguageAPI.Add("LEGENDARYEGG_NAME", "Legendary Egg"); LanguageAPI.Add("LEGENDARYEGG_PICKUP", "later"); LanguageAPI.Add("LEGENDARYEGG_DESC", "let me know on discord if you use the base belly model so I know if I'm free to get rid of the code but I probably won't"); LanguageAPI.Add("LEGENDARYEGG_LORE", "i am using these to shitpost"); LanguageAPI.Add("LUNAREGG_NAME", "Lunar Egg"); LanguageAPI.Add("LUNAREGG_PICKUP", "does anyone even use these ping me on discord if you do cause i'm curious"); LanguageAPI.Add("LUNAREGG_DESC", EggDesc); LanguageAPI.Add("LUNAREGG_LORE", "trolled"); LanguageAPI.Add("BOSSEGG_NAME", "Boss Egg"); LanguageAPI.Add("BOSSEGG_PICKUP", "why are the majority of boss items just glorified drones"); LanguageAPI.Add("BOSSEGG_DESC", "thought of a quirky idea void eggs and printers"); LanguageAPI.Add("BOSSEGG_LORE", "balls"); } private void CharacterBody_onBodyInventoryChangedGlobal(CharacterBody obj) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) BellyBehavior componentInChildren = ((Component)obj.modelLocator.modelTransform).GetComponentInChildren<BellyBehavior>(); if (obj.inventory.GetItemCount(SusTentacleItemDef.itemIndex) != 0 && Object.op_Implicit((Object)(object)componentInChildren)) { if (ShowBelly.Value) { componentInChildren.parentBody = obj; componentInChildren.ST = this; } else { ((Renderer)((Component)componentInChildren).gameObject.GetComponentInChildren<MeshRenderer>()).enabled = false; } } } private void test4(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { orig.Invoke(self, body); if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.modelLocator) || !Object.op_Implicit((Object)(object)body.modelLocator.modelTransform)) { return; } BellyBehavior componentInChildren = ((Component)body.modelLocator.modelTransform).GetComponentInChildren<BellyBehavior>(); if (Object.op_Implicit((Object)(object)componentInChildren)) { if (ShowBelly.Value) { componentInChildren.parentBody = body; componentInChildren.ST = this; } else { ((Renderer)((Component)componentInChildren).gameObject.GetComponentInChildren<MeshRenderer>()).enabled = false; } } } private CharacterBody test3(orig_SpawnBody orig, CharacterMaster self, Vector3 position, Quaternion rotation) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = orig.Invoke(self, position, rotation); if (Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(ItemCatalog.FindItemIndex(((Object)SusTentacleItemDef).name)) > 0) { BellyBehavior componentInChildren = ((Component)self.GetBody().modelLocator.modelTransform).GetComponentInChildren<BellyBehavior>(); BellyBehavior componentInChildren2 = ((Component)val.modelLocator.modelTransform).GetComponentInChildren<BellyBehavior>(); if (Object.op_Implicit((Object)(object)componentInChildren)) { if (ShowBelly.Value) { componentInChildren.parentBody = val; componentInChildren.ST = this; } else { ((Renderer)((Component)componentInChildren).gameObject.GetComponentInChildren<MeshRenderer>()).enabled = false; } } } return val; } private void test(orig_OnClientBuffsChanged orig, CharacterBody self) { self.RecalculateStats(); orig.Invoke(self); } private void test7(orig_OnInventoryChanged orig, CharacterBody self) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) int itemCount = self.inventory.GetItemCount(SusTentacleItemDef.itemIndex); orig.Invoke(self); int itemCount2 = self.inventory.GetItemCount(SusTentacleItemDef.itemIndex); if (itemCount == 0 && itemCount2 >= 1) { BellyBehavior componentInChildren = ((Component)self.modelLocator.modelTransform).GetComponentInChildren<BellyBehavior>(); if (Object.op_Implicit((Object)(object)componentInChildren) && ShowBelly.Value) { componentInChildren.parentBody = self; componentInChildren.ST = this; } else { ((Renderer)((Component)componentInChildren).gameObject.GetComponentInChildren<MeshRenderer>()).enabled = false; } } } private void AddGrowthDebuff(CharacterBody sender, StatHooks.StatHookEventArgs args) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) if (sender.HasBuff(EggGrowthDebuff.buffIndex)) { float num = 1f - 1f / (1f + Mathf.Pow((float)sender.inventory.GetItemCount(SusTentacleItemDef), SlowDownExponent.Value)); if (SlowdownCurve.Value) { } num *= GrowthProgress(sender); args.moveSpeedMultAdd -= num; } } public float GrowthProgress(CharacterBody character) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (!EggOverLoad.Value) { return 1f - (float)character.GetBuffCount(EggGrowthDebuff.buffIndex) / EggGrowthTime.Value; } return 1f - (float)character.GetBuffCount(EggGrowthDebuff.buffIndex) / EggGrowthTime.Value * Mathf.Log((float)EggMasterCount(character), (float)Egglogbase.Value); } private void SpawnEgg(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) if (buffDef.buffIndex == EggGrowthDebuff.buffIndex) { int itemCount = self.inventory.GetItemCount(SusTentacleItemDef); itemCount *= EggNum.Value; if (itemCount == 0) { itemCount = 1; } for (int i = 0; i < itemCount; i++) { bool flag = Util.CheckRoll(UncommonRarity.Value, self.master); bool flag2 = Util.CheckRoll(LunarRarity.Value, self.master); bool flag3 = Util.CheckRoll(BossRarity.Value, self.master); bool flag4 = Util.CheckRoll(LegendaryRarity.Value, self.master); ItemDef item = CommonEggItemDef; if (flag) { item = UncommonEggItemDef; } if (flag2 && UseLunar.Value) { item = LunarEggItemDef; } if (flag3) { item = BossEggItemDef; } if (flag4) { item = LegendaryEggItemDef; } if (!eggQueue.ContainsKey(self)) { eggQueue.Add(self, new Queue<ItemDef>()); } eggQueue[self].Enqueue(item); } EggSpawnTimers[self] = 0f; } orig.Invoke(self, buffDef); } private void GrowEgg(orig_FixedUpdate orig, CharacterBody self, CharacterBody character) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { int count = GetCount(self, SusTentacleItemDef); if (count > 0 && !self.HasBuff(EggGrowthDebuff.buffIndex) && EggOverLoad.Value) { for (int i = 1; (float)i <= EggGrowthTime.Value * Mathf.Log((float)EggMasterCount(character), (float)Egglogbase.Value); i++) { self.AddTimedBuff(EggGrowthDebuff.buffIndex, (float)i); } } if (count > 0 && !self.HasBuff(EggGrowthDebuff.buffIndex) && !EggOverLoad.Value) { for (int j = 1; (float)j <= EggGrowthTime.Value; j++) { self.AddTimedBuff(EggGrowthDebuff.buffIndex, (float)j); } } if (eggQueue.ContainsKey(self)) { Queue<ItemDef> queue = eggQueue[self]; if (queue.Count != 0) { float num = EggSpawnTimers[self]; num -= Time.fixedDeltaTime; if (EggSpawnTimers[self] <= 0f) { ItemDef val = queue.Dequeue(); float num2 = Random.Range(0f, 2f); Vector3 insideUnitSphere = Random.insideUnitSphere; PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(ItemCatalog.FindItemIndex(((Object)val).name)), self.coreTransform.position, self.coreTransform.forward * (10f + num2) + insideUnitSphere); num = TimeBetweenEggs.Value; } EggSpawnTimers[self] = num; } } } orig.Invoke(self); } private int GetCount(CharacterBody body, ItemDef itemDef) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return 0; } return body.inventory.GetItemCount(itemDef); } private int GetCountMaster(CharacterMaster master, ItemDef itemDef) { if (!Object.op_Implicit((Object)(object)master) || !Object.op_Implicit((Object)(object)master.inventory)) { return 0; } return master.inventory.GetItemCount(itemDef); } } } namespace Aetherium.CoreModules { public abstract class CoreModule { public abstract string Name { get; } public abstract void Init(); } public class StatHooks : CoreModule { public class StatHookEventArgs : EventArgs { public float healthMultAdd = 0f; public float baseHealthAdd = 0f; public float baseShieldAdd = 0f; public float regenMultAdd = 0f; public float baseRegenAdd = 0f; public float baseMoveSpeedAdd = 0f; public float moveSpeedMultAdd = 0f; public float jumpPowerMultAdd = 0f; public float damageMultAdd = 0f; public float baseDamageAdd = 0f; public float baseAttackSpeedAdd = 0f; public float attackSpeedMultAdd = 0f; public float critAdd = 0f; public float armorAdd = 0f; } public delegate void StatHookEventHandler(CharacterBody sender, StatHookEventArgs args); [CompilerGenerated] private static class <>O { public static Manipulator <0>__IL_CBRecalcStats; } public override string Name => "StatHooks (from TILER2 originally)"; public static event StatHookEventHandler GetStatCoefficients; public override void Init() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown object obj = <>O.<0>__IL_CBRecalcStats; if (obj == null) { Manipulator val = IL_CBRecalcStats; <>O.<0>__IL_CBRecalcStats = val; obj = (object)val; } CharacterBody.RecalculateStats += (Manipulator)obj; } internal static void IL_CBRecalcStats(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0a47: Unknown result type (might be due to invalid IL or missing references) //IL_0a6c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); StatHookEventArgs statMods = null; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Action<CharacterBody>>((Action<CharacterBody>)delegate(CharacterBody cb) { statMods = new StatHookEventArgs(); StatHooks.GetStatCoefficients?.Invoke(cb, statMods); }); int locBaseHealthIndex = -1; int locHealthMultIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseMaxHealth"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelMaxHealth") }) && val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseHealthIndex) }) && val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locBaseHealthIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locHealthMultIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseHealthIndex) })) { val.GotoPrev(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseMaxHealth") }); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseHealthIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origMaxHealth) => origMaxHealth + statMods.baseHealthAdd)); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locHealthMultIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origHealthMult) => origHealthMult + statMods.healthMultAdd)); } val.Index = 0; int locBaseShieldIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseMaxShield"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelMaxShSield") }) && val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseShieldIndex) })) { val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origBaseShield) => origBaseShield + statMods.baseShieldAdd)); } val.Index = 0; int locRegenMultIndex = -1; int locFinalRegenIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locFinalRegenIndex), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "set_regen") }) && val.TryGotoPrev(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locRegenMultIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locFinalRegenIndex) })) { val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locRegenMultIndex) }); val.EmitDelegate<Func<float>>((Func<float>)(() => statMods.baseRegenAdd)); val.Emit(OpCodes.Add); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchMul(x) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origRegenMult) => origRegenMult + statMods.regenMultAdd)); } val.Index = 0; int locBaseSpeedIndex = -1; int locSpeedMultIndex = -1; int locSpeedDivIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseMoveSpeed"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelMoveSpeed") }) && val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseSpeedIndex) }) && val.TryGotoNext(new Func<Instruction, bool>[6] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locBaseSpeedIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locSpeedMultIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locSpeedDivIndex), (Instruction x) => ILPatternMatchingExt.MatchDiv(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseSpeedIndex) })) { val.GotoPrev(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelMoveSpeed") }); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseSpeedIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origBaseMoveSpeed) => origBaseMoveSpeed + statMods.baseMoveSpeedAdd)); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locSpeedMultIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origMoveSpeedMult) => origMoveSpeedMult + statMods.moveSpeedMultAdd)); } val.Index = 0; int num = 0; if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[6] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseJumpPower"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelJumpPower"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, num), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchAdd(x) })) { val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origJumpPower) => origJumpPower * (1f + statMods.jumpPowerMultAdd))); } val.Index = 0; int locBaseDamageIndex = -1; int locDamageMultIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseDamage"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelDamage") }) && val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseDamageIndex) }) && val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locBaseDamageIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locDamageMultIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseDamageIndex) })) { val.GotoPrev(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseDamage") }); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseDamageIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origDamage) => origDamage + statMods.baseDamageAdd)); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locDamageMultIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origDamageMult) => origDamageMult + statMods.damageMultAdd)); } val.Index = 0; int locBaseAttackSpeedIndex = -1; int locAttackSpeedMultIndex = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseAttackSpeed"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "levelAttackSpeed") }) && val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseAttackSpeedIndex) }) && val.TryGotoNext(new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locBaseAttackSpeedIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locAttackSpeedMultIndex), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseAttackSpeedIndex) })) { val.GotoPrev(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseAttackSpeed") }); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locBaseAttackSpeedIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origSpeed) => origSpeed + statMods.baseAttackSpeedAdd)); val.GotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, locAttackSpeedMultIndex) }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origSpeedMult) => origSpeedMult + statMods.attackSpeedMultAdd)); } val.Index = 0; int locOrigCrit = -1; if (val.TryGotoNext(new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, locOrigCrit), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "set_crit") })) { val.Emit(OpCodes.Ldloc, locOrigCrit); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float origCrit) => origCrit + statMods.critAdd)); val.Emit(OpCodes.Stloc, locOrigCrit); } val.Index = 0; if (val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "baseArmor") }) && val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_armor") }) && val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_armor") })) { val.EmitDelegate<Func<float, float>>((Func<float, float>)((float oldArmor) => oldArmor + statMods.armorAdd)); } } } }