Decompiled source of LookingGlass v1.10.0
plugins/LookingGlass/LookingGlass.dll
Decompiled a week 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.Collections.ObjectModel; using System.Diagnostics; using System.Globalization; 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 System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HG; using LeTai.Asset.TranslucentImage; using LookingGlass.AutoSortItems; using LookingGlass.Base; using LookingGlass.BuffDescriptions; using LookingGlass.BuffTimers; using LookingGlass.CommandItemCount; using LookingGlass.CommandWindowBlur; using LookingGlass.DPSMeterStuff; using LookingGlass.EquipTimerFix; using LookingGlass.EscapeToCloseMenu; using LookingGlass.HiddenItems; using LookingGlass.HidePickupNotifs; using LookingGlass.ItemCounters; using LookingGlass.ItemStatsNameSpace; using LookingGlass.LookingGlassLanguage; using LookingGlass.PickupNotifsDuration; using LookingGlass.ResizeCommandWindow; using LookingGlass.StatsDisplay; using Microsoft.CodeAnalysis; using MonoMod.RuntimeDetour; using RiskOfOptions; using RiskOfOptions.Components.Options; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.ContentManagement; using RoR2.Items; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("DropPod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.10.0.0")] [assembly: AssemblyInformationalVersion("1.10.0+1a6d4467b48a3ef40d6db6a7171b5d8e99c55ece")] [assembly: AssemblyProduct("LookingGlass")] [assembly: AssemblyTitle("LookingGlass")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/Wet-Boys/LookingGlass")] [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 LookingGlass { [BepInPlugin("droppod.lookingglass", "LookingGlass", "1.10.0")] public class BasePlugin : BaseUnityPlugin { internal static BasePlugin instance; internal AutoSortItemsClass autoSortItems; internal NoWindowBlur noWindowBlur; internal ButtonsToCloseMenu buttonsToCloseMenu; internal HidePickupNotifications hidePickupNotifications; internal ItemStats itemStats; internal CommandItemCountClass commandItemCountClass; internal ModifyCommandWindow resizeCommandWindowClass; internal StatsDisplayClass statsDisplayClass; internal DPSMeter dpsMeter; internal ItemCounter itemCounter; internal BuffTimersClass buffTimers; internal CooldownFixer equipFixer; internal UnHiddenItems unHiddenItems; internal BuffDescriptionsClass buffDescriptions; internal PickupNotifDurationClass pickupNotifDurationClass; public static byte[] logo; public static Sprite logo2; public void Awake() { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) Log.Init(((BaseUnityPlugin)this).Logger); instance = this; try { string path = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "icons"); int num = Random.Range(0, Directory.GetFiles(path).Length); int num2 = 0; string[] files = Directory.GetFiles(path); foreach (string path2 in files) { if (num2 == num) { logo = File.ReadAllBytes(path2); } num2++; } Texture2D val = LoadTexture(logo, 256, 256); logo2 = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0f, 0f), 100f, 1u, (SpriteMeshType)1, new Vector4(0f, 0f, 0f, 0f), true); ModSettingsManager.SetModIcon(logo2); } catch (Exception) { } autoSortItems = new AutoSortItemsClass(); noWindowBlur = new NoWindowBlur(); buttonsToCloseMenu = new ButtonsToCloseMenu(); hidePickupNotifications = new HidePickupNotifications(); commandItemCountClass = new CommandItemCountClass(); resizeCommandWindowClass = new ModifyCommandWindow(); statsDisplayClass = new StatsDisplayClass(); buffTimers = new BuffTimersClass(); dpsMeter = new DPSMeter(); itemCounter = new ItemCounter(); equipFixer = new CooldownFixer(); unHiddenItems = new UnHiddenItems(); buffDescriptions = new BuffDescriptionsClass(); pickupNotifDurationClass = new PickupNotifDurationClass(); ((MonoBehaviour)this).StartCoroutine(CheckPlayerStats()); ((ResourceAvailability)(ref ItemCatalog.availability)).CallWhenAvailable((Action)delegate { itemStats = new ItemStats(); }); } private void Update() { if (ButtonsToCloseMenu.buttonsToClickOnMove.Count != 0 && Input.anyKeyDown && !Input.GetMouseButtonDown(0)) { ButtonsToCloseMenu.CloseMenuAfterFrame(); } dpsMeter.Update(); } private IEnumerator CheckPlayerStats() { yield return (object)new WaitForSeconds(StatsDisplayClass.statsDisplayUpdateInterval.Value); try { statsDisplayClass.CalculateStuff(); } catch (Exception arg) { Debug.Log((object)$"Attempted to update stats but got exception: {arg}"); } ((MonoBehaviour)this).StartCoroutine(CheckPlayerStats()); } public static Texture2D LoadTexture(byte[] bytes, int width, int height) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown Texture2D val = new Texture2D(width, height, (TextureFormat)5, false, false); ImageConversion.LoadImage(val, bytes); ((Texture)val).filterMode = (FilterMode)0; return val; } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } internal class Utils { public static float CalculateChanceWithNullableMaster(float baseChance, CharacterMaster master) { if (Object.op_Implicit((Object)(object)master)) { return CalculateChanceWithLuck(baseChance, master.luck); } return baseChance; } public static float CalculateChanceWithLuck(float baseChance, float luckIn) { if (ItemStats.capChancePercentage.Value) { baseChance = Mathf.Min(baseChance, 1f); } float num = Mathf.Floor(baseChance); float num2 = baseChance % 1f; int num3 = Mathf.CeilToInt(luckIn); if (num3 > 0) { return num + (1f - Mathf.Pow(1f - num2, (float)(num3 + 1))); } if (num3 < 0) { return num + Mathf.Pow(num2, (float)(Mathf.Abs(num3) + 1)); } return baseChance; } public static float GetLuckFromCachedUserBody(CharacterBody cachedUserBody) { if (Object.op_Implicit((Object)(object)cachedUserBody) && Object.op_Implicit((Object)(object)cachedUserBody.master)) { return cachedUserBody.master.luck; } return cachedUserBody.inventory.GetItemCount(Items.Clover) - cachedUserBody.inventory.GetItemCount(Items.LunarBadLuck); } public static float GetExponentialRechargeTime(float baseCooldown, float extraPercent, int count) { return baseCooldown * Mathf.Pow(1f - extraPercent, (float)(count - 1)); } public static float GetExponentialStacking(float basePercent, float extraPercent, int count) { return 1f - (1f - basePercent) * Mathf.Pow(1f - extraPercent, (float)(count - 1)); } public static float GetHyperbolicStacking(float basePercent, float extraPercent, int count) { return 1f - 1f / (1f + basePercent + extraPercent * (float)(count - 1)); } public static float GetBandolierStacking(int count) { return 1f - 1f / Mathf.Pow(1f + (float)count, 0.33f); } public static string DictToString<TKey, TValue>(Dictionary<TKey, TValue> dict) { string text = "{\n"; foreach (KeyValuePair<TKey, TValue> item in dict) { text += $"[{item.Key}] = {item.Value}\n"; } return text + "}"; } } public static class PluginInfo { public const string PLUGIN_GUID = "droppod.lookingglass"; public const string PLUGIN_NAME = "LookingGlass"; public const string PLUGIN_VERSION = "1.10.0"; } } namespace LookingGlass.StatsDisplay { public class SliderWithText : MonoBehaviour { public Slider slider; public TMP_InputField inputField; public string formatString = "f0"; public UnityEvent<float> onValueChanged = new UnityEvent<float>(); private float _value; public float Value { get { return _value; } set { if (_value != value) { _value = value; onValueChanged.Invoke(_value); } UpdateControls(); } } public void Setup(Slider slider, TMP_InputField inputField, float min, float max) { this.slider = slider; this.inputField = inputField; ((Behaviour)inputField).enabled = true; slider.minValue = min; slider.maxValue = max; ((UnityEvent<float>)(object)slider.onValueChanged).AddListener((UnityAction<float>)SliderChanged); ((UnityEvent<string>)(object)inputField.onEndEdit).AddListener((UnityAction<string>)OnTextEdited); ((UnityEvent<string>)(object)inputField.onSubmit).AddListener((UnityAction<string>)OnTextEdited); } private void UpdateControls() { slider.value = Value; inputField.text = Value.ToString(formatString, CultureInfo.InvariantCulture); } private void SliderChanged(float newValue) { Value = newValue; } private void OnTextEdited(string newText) { if (float.TryParse(newText, out var result)) { Value = Mathf.Clamp(result, slider.minValue, slider.maxValue); } else { Value = _value; } } } internal class StatsDisplayClass : BaseThing { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__30_0; internal void <SetupRiskOfOptions>b__30_0() { CreatePositionWindow(detachedPosition); } } public static ConfigEntry<bool> statsDisplay; public static ConfigEntry<bool> useSecondaryStatsDisplay; public static ConfigEntry<string> secondaryStatsDisplayString; public static ConfigEntry<string> statsDisplayString; public static ConfigEntry<float> statsDisplaySize; public static ConfigEntry<float> statsDisplayUpdateInterval; public static ConfigEntry<bool> builtInColors; public static ConfigEntry<bool> statsDisplayOverrideHeight; public static ConfigEntry<int> statsDisplayOverrideHeightValue; public static ConfigEntry<int> floatPrecision; public static ConfigEntry<bool> statsDisplayAttached; public static ConfigEntry<Vector2> detachedPosition; public static Dictionary<string, Func<CharacterBody, string>> statDictionary = new Dictionary<string, Func<CharacterBody, string>>(); internal static CharacterBody cachedUserBody = null; private Transform statTracker; private TextMeshProUGUI textComponent; private GameObject textComponentGameObject; private LayoutElement layoutElement; private Image cachedImage; private static Hook overrideHook; private static Hook overrideHook2; private bool scoreBoardOpen; private const string syntaxList = " \n luck \n baseDamage \n crit \n attackSpeed \n armor \n armorDamageReduction \n regen \n speed \n availableJumps \n maxJumps \n killCount \n mountainShrines \n experience \n level \n maxHealth \n maxBarrier \n barrierDecayRate \n maxShield \n acceleration \n jumpPower \n maxJumpHeight \n damage \n critMultiplier \n bleedChance \n visionDistance \n critHeal \n cursePenalty \n hasOneShotProtection \n isGlass \n canPerformBackstab \n canReceiveBackstab \n healthPercentage \n goldPortal \n msPortal \n shopPortal \n dps \n currentCombatDamage \n remainingComboDuration \n maxCombo \n maxComboThisRun \n currentCombatKills \n maxKillCombo \n maxKillComboThisRun \n critWithLuck \n bleedChanceWithLuck \n velocity \n teddyBearBlockChance \n saferSpacesCD \n instaKillChance \n voidPortal \n difficultyCoefficient \n stage"; private bool isRiskUI; private float originalFontSize = -1f; private VerticalLayoutGroup layoutGroup; public StatsDisplayClass() { Setup(); SetupRiskOfOptions(); } public void Setup() { //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Expected O, but got Unknown //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Expected O, but got Unknown statsDisplay = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<bool>("Stats Display", "StatsDisplay", true, "Enables Stats Display"); statsDisplayString = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<string>("Stats Display", "Stats Display String", "<size=120%>Stats</size>\nLuck: [luck]\nDamage: [damage]\nCrit Chance: [critWithLuck]\nAttack Speed: [attackSpeed]\nArmor: [armor] | [armorDamageReduction]\nRegen: [regen]\nSpeed: [speed]\nJumps: [availableJumps]/[maxJumps]\nKills: [killCount]\nMountain Shrines: [mountainShrines]\nDPS: [dps]\nCombo: [currentCombatDamage]\nCombo Timer: [remainingComboDuration]\nMax Combo: [maxCombo]", "String for the stats display. You can customize this with Unity Rich Text if you want, see \n https://docs.unity3d.com/Packages/[email protected]/manual/RichText.html for more info. \nAvailable syntax for the [] stuff is: \n luck \n baseDamage \n crit \n attackSpeed \n armor \n armorDamageReduction \n regen \n speed \n availableJumps \n maxJumps \n killCount \n mountainShrines \n experience \n level \n maxHealth \n maxBarrier \n barrierDecayRate \n maxShield \n acceleration \n jumpPower \n maxJumpHeight \n damage \n critMultiplier \n bleedChance \n visionDistance \n critHeal \n cursePenalty \n hasOneShotProtection \n isGlass \n canPerformBackstab \n canReceiveBackstab \n healthPercentage \n goldPortal \n msPortal \n shopPortal \n dps \n currentCombatDamage \n remainingComboDuration \n maxCombo \n maxComboThisRun \n currentCombatKills \n maxKillCombo \n maxKillComboThisRun \n critWithLuck \n bleedChanceWithLuck \n velocity \n teddyBearBlockChance \n saferSpacesCD \n instaKillChance \n voidPortal \n difficultyCoefficient \n stage"); statsDisplaySize = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<float>("Stats Display", "StatsDisplay font size", -1f, "General font size of the stats display menu. If set to -1, will copy the font size from the objective panel"); statsDisplayUpdateInterval = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<float>("Stats Display", "StatsDisplay update interval", 0.33f, "The interval at which stats display updates, in seconds. Lower values will increase responsiveness, but may potentially affect performance"); builtInColors = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<bool>("Stats Display", "Use default colors", true, "Uses the default styling for stats display syntax items."); builtInColors.SettingChanged += BuiltInColors_SettingChanged; statsDisplayOverrideHeight = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<bool>("Stats Display", "Override Stats Display Height", false, "Sets a user-specified height for Stats Display (may be necessary if you get particularly creative with formatting)"); statsDisplayOverrideHeightValue = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<int>("Stats Display", "Stats Display Height Value", 7, "Height, in lines of full-size text, for the Stats Display panel"); floatPrecision = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<int>("Stats Display", "StatsDisplay Float Precision", 2, "How many decimal points will be used in floating point values"); floatPrecision.SettingChanged += BuiltInColors_SettingChanged; useSecondaryStatsDisplay = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<bool>("Stats Display", "Use Secondary StatsDisplay", false, "Will enable the use of the secondary stats display string. This will overwrite the stats display string whenever the scoreboard is held open."); secondaryStatsDisplayString = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<string>("Stats Display", "Secondary Stats Display String", "<size=120%>Stats</size>\nLuck: [luck]\nDamage: [damage]\nCrit Chance: [critWithLuck]\nBleed Chance: [bleedChanceWithLuck]\nAttack Speed: [attackSpeed]\nArmor: [armor] | [armorDamageReduction]\nRegen: [regen]\nSpeed: [speed]\nJumps: [availableJumps]/[maxJumps]\nKills: [killCount]\nMountain Shrines: [mountainShrines]\nMax Combo: [maxCombo]\n<size=120%>Portals:</size> \n<size=50%>Gold:[goldPortal] Shop:[shopPortal] Celestial:[msPortal] Void:[voidPortal]</size>", "Secondary string for the stats display. You can customize this with Unity Rich Text if you want, see \n https://docs.unity3d.com/Packages/[email protected]/manual/RichText.html for more info. \nAvailable syntax for the [] stuff is: \n luck \n baseDamage \n crit \n attackSpeed \n armor \n armorDamageReduction \n regen \n speed \n availableJumps \n maxJumps \n killCount \n mountainShrines \n experience \n level \n maxHealth \n maxBarrier \n barrierDecayRate \n maxShield \n acceleration \n jumpPower \n maxJumpHeight \n damage \n critMultiplier \n bleedChance \n visionDistance \n critHeal \n cursePenalty \n hasOneShotProtection \n isGlass \n canPerformBackstab \n canReceiveBackstab \n healthPercentage \n goldPortal \n msPortal \n shopPortal \n dps \n currentCombatDamage \n remainingComboDuration \n maxCombo \n maxComboThisRun \n currentCombatKills \n maxKillCombo \n maxKillComboThisRun \n critWithLuck \n bleedChanceWithLuck \n velocity \n teddyBearBlockChance \n saferSpacesCD \n instaKillChance \n voidPortal \n difficultyCoefficient \n stage"); StatsDisplayDefinitions.SetupDefs(); Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(1810f, 1015f); statsDisplayAttached = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<bool>("Stats Display", "Attach To Objective Panel", true, "If enabled, will be attached to below the objective panel, otherwise position can be configured"); detachedPosition = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<Vector2>("Stats Display", "Stats Display Position", val, $"Position of detached Stats Display.\n[Default: {val.x:f0}, {val.y:f0}]"); statsDisplayAttached.SettingChanged += Attached_SettingChanged; detachedPosition.SettingChanged += DetachedPosition_SettingChanged; MethodInfo? method = typeof(ScoreboardController).GetMethod("OnEnable", BindingFlags.Instance | BindingFlags.NonPublic); MethodInfo method2 = typeof(StatsDisplayClass).GetMethod("OnEnable", BindingFlags.Instance | BindingFlags.NonPublic); overrideHook = new Hook((MethodBase)method, method2, (object)this); MethodInfo? method3 = typeof(ScoreboardController).GetMethod("OnDisable", BindingFlags.Instance | BindingFlags.NonPublic); method2 = typeof(StatsDisplayClass).GetMethod("OnDisable", BindingFlags.Instance | BindingFlags.NonPublic); overrideHook2 = new Hook((MethodBase)method3, method2, (object)this); } private void OnEnable(Action<ScoreboardController> orig, ScoreboardController self) { scoreBoardOpen = true; CalculateStuff(); orig(self); } private void OnDisable(Action<ScoreboardController> orig, ScoreboardController self) { scoreBoardOpen = false; CalculateStuff(); orig(self); } private void BuiltInColors_SettingChanged(object sender, EventArgs e) { StatsDisplayDefinitions.SetupDefs(); } private void Attached_SettingChanged(object sender, EventArgs e) { if (Object.op_Implicit((Object)(object)statTracker)) { Object.DestroyImmediate((Object)(object)((Component)statTracker).gameObject); CalculateStuff(); } } private void DetachedPosition_SettingChanged(object sender, EventArgs e) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)statTracker) && !statsDisplayAttached.Value) { Transform parent = statTracker.parent; RectTransform val = (RectTransform)(object)((parent is RectTransform) ? parent : null); Transform obj = statTracker; ((RectTransform)((obj is RectTransform) ? obj : null)).anchoredPosition3D = new Vector3(detachedPosition.Value.x, detachedPosition.Value.y, 0f - val.anchoredPosition3D.z); } } public void SetupRiskOfOptions() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00d8: 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_00e9: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Expected O, but got Unknown //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //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_01a2: Expected O, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Expected O, but got Unknown //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(statsDisplay, new CheckBoxConfig { restartRequired = false })); ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(statsDisplayString, new InputFieldConfig { restartRequired = false, lineType = (LineType)2, submitOn = (SubmitEnum)4, richText = false })); ModSettingsManager.AddOption((BaseOption)new SliderOption(statsDisplaySize, new SliderConfig { restartRequired = false, min = -1f, max = 100f })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(builtInColors, new CheckBoxConfig { restartRequired = false })); ModSettingsManager.AddOption((BaseOption)new SliderOption(statsDisplayUpdateInterval, new SliderConfig { restartRequired = false, min = 0.01f, max = 1f, formatString = "{0:F2}s" })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(statsDisplayOverrideHeight, new CheckBoxConfig { restartRequired = false })); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(statsDisplayOverrideHeightValue, new IntSliderConfig { restartRequired = false, min = 0, max = 100 })); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(floatPrecision, new IntSliderConfig { restartRequired = false, min = 0, max = 5 })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(useSecondaryStatsDisplay, new CheckBoxConfig { restartRequired = false })); ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(secondaryStatsDisplayString, new InputFieldConfig { restartRequired = false, lineType = (LineType)2, submitOn = (SubmitEnum)4, richText = false })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(statsDisplayAttached, new CheckBoxConfig { restartRequired = false })); string key = ((ConfigEntryBase)detachedPosition).Definition.Key; string section = ((ConfigEntryBase)detachedPosition).Definition.Section; string description = ((ConfigEntryBase)detachedPosition).Description.Description; object obj = <>c.<>9__30_0; if (obj == null) { UnityAction val = delegate { CreatePositionWindow(detachedPosition); }; <>c.<>9__30_0 = val; obj = (object)val; } ModSettingsManager.AddOption((BaseOption)new GenericButtonOption(key, section, description, "Open", (UnityAction)obj)); } public void CalculateStuff() { //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Expected O, but got Unknown //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_045d: 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_046a: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)cachedUserBody)) { try { cachedUserBody = LocalUserManager.GetFirstLocalUser().cachedBody; } catch (Exception) { } } if (!statsDisplay.Value || !Object.op_Implicit((Object)(object)cachedUserBody)) { return; } string text = ((useSecondaryStatsDisplay.Value && scoreBoardOpen) ? secondaryStatsDisplayString.Value : statsDisplayString.Value); foreach (string key in statDictionary.Keys) { text = Regex.Replace(text, "(?<!\\\\)\\[" + key + "\\]", statDictionary[key](cachedUserBody)); } if (!Object.op_Implicit((Object)(object)statTracker)) { GameObject val = Run.instance.uiInstances[0]; if (statsDisplayAttached.Value) { VerticalLayoutGroup[] componentsInChildren = val.GetComponentsInChildren<VerticalLayoutGroup>(); foreach (VerticalLayoutGroup val2 in componentsInChildren) { if (!(((Object)((Component)val2).gameObject).name == "RightInfoBar")) { continue; } Transform val3 = ((Component)val2).transform.Find("ObjectivePanel"); GameObject val4 = (Object.op_Implicit((Object)(object)val3.Find("Label")) ? ((Component)val3.Find("Label")).gameObject : null); bool active = false; if (Object.op_Implicit((Object)(object)val4)) { active = val4.activeSelf; val4.SetActive(true); } GameObject val5 = Object.Instantiate<GameObject>(((Component)val3).gameObject); val5.transform.parent = ((Component)val3.parent).transform; ((Object)val5).name = "PlayerStats"; if (Object.op_Implicit((Object)(object)val4)) { val4.SetActive(active); } if (Object.op_Implicit((Object)(object)val5.transform.Find("StripContainer"))) { Object.Destroy((Object)(object)((Component)val5.transform.Find("StripContainer")).gameObject); } if (Object.op_Implicit((Object)(object)val5.transform.Find("Minimap"))) { Object.DestroyImmediate((Object)(object)((Component)val5.transform.Find("Minimap")).gameObject); } if (Object.op_Implicit((Object)(object)val5.GetComponent<HudObjectiveTargetSetter>())) { Object.Destroy((Object)(object)val5.GetComponent<HudObjectiveTargetSetter>()); } if (Object.op_Implicit((Object)(object)val5.GetComponent<ObjectivePanelController>())) { Object.Destroy((Object)(object)val5.GetComponent<ObjectivePanelController>()); } RectTransform component = val5.GetComponent<RectTransform>(); layoutGroup = val5.GetComponent<VerticalLayoutGroup>(); textComponent = val5.GetComponentInChildren<TextMeshProUGUI>(); layoutElement = val5.GetComponentInChildren<LayoutElement>(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)layoutGroup) || !Object.op_Implicit((Object)(object)textComponent) || !Object.op_Implicit((Object)(object)layoutElement)) { layoutGroup = null; textComponent = null; layoutElement = null; Object.DestroyImmediate((Object)(object)val5); break; } ((Transform)component).localPosition = Vector3.zero; ((Transform)component).localEulerAngles = Vector3.zero; ((Transform)component).localScale = Vector3.one; ((Behaviour)layoutGroup).enabled = false; ((Behaviour)layoutGroup).enabled = true; ((TMP_Text)textComponent).alignment = (TextAlignmentOptions)257; ((Graphic)textComponent).color = Color.white; textComponentGameObject = ((Component)textComponent).gameObject; if (Object.op_Implicit((Object)(object)val5.transform.Find("Seperator"))) { isRiskUI = true; VerticalLayoutGroup component2 = ((Component)val5.transform.Find("Seperator")).GetComponent<VerticalLayoutGroup>(); ((LayoutGroup)component2).padding.top = 0; ((LayoutGroup)component2).childAlignment = (TextAnchor)0; } statTracker = val5.transform; break; } } else { HUD componentInParent = val.GetComponentInParent<HUD>(); if (Object.op_Implicit((Object)(object)componentInParent)) { GameObject val6 = new GameObject("PlayerStats"); RectTransform val7 = val6.AddComponent<RectTransform>(); Transform transform = componentInParent.mainUIPanel.transform; RectTransform val8 = (RectTransform)(object)((transform is RectTransform) ? transform : null); ((Transform)val7).SetParent((Transform)(object)val8, false); val7.anchoredPosition3D = new Vector3(detachedPosition.Value.x, detachedPosition.Value.y, 0f - val8.anchoredPosition3D.z); Vector2 anchorMax = (val7.anchorMin = -val8.anchorMin / (val8.anchorMax - val8.anchorMin)); val7.anchorMax = anchorMax; val7.sizeDelta = Vector2.zero; layoutGroup = val6.AddComponent<VerticalLayoutGroup>(); layoutElement = val6.AddComponent<LayoutElement>(); textComponent = val6.AddComponent<TextMeshProUGUI>(); ((TMP_Text)textComponent).fontSize = 16f; ((Graphic)textComponent).color = Color.white; ((TMP_Text)textComponent).enableWordWrapping = false; textComponentGameObject = ((Component)textComponent).gameObject; statTracker = (Transform)(object)val7; } } } if (Object.op_Implicit((Object)(object)textComponentGameObject)) { textComponentGameObject.SetActive(true); } if (Object.op_Implicit((Object)(object)textComponent) && Object.op_Implicit((Object)(object)layoutElement)) { ((TMP_Text)textComponent).text = text; int num = (statsDisplayOverrideHeight.Value ? statsDisplayOverrideHeightValue.Value : text.Split('\n').Length); if (originalFontSize == -1f) { originalFontSize = ((TMP_Text)textComponent).fontSize; } ((TMP_Text)textComponent).fontSize = ((statsDisplaySize.Value == -1f) ? originalFontSize : statsDisplaySize.Value); ((MonoBehaviour)Run.instance).StartCoroutine(FixScaleAfterFrame(num)); if (statsDisplayAttached.Value) { if (!Object.op_Implicit((Object)(object)cachedImage)) { cachedImage = ((Component)((Component)layoutElement).transform.parent).GetComponent<Image>(); } if (Object.op_Implicit((Object)(object)cachedImage)) { ((Behaviour)cachedImage).enabled = num != 0; } } if (isRiskUI && Object.op_Implicit((Object)(object)layoutGroup)) { ((LayoutGroup)layoutGroup).padding.bottom = (int)((float)num / 16f * 50f); } } else { layoutGroup = null; textComponent = null; layoutElement = null; if (Object.op_Implicit((Object)(object)statTracker)) { Log.Debug("Somehow statTracker [" + ((Object)((Component)statTracker).gameObject).name + "] got set but other items didn't attempting to delete it and try again."); Object.DestroyImmediate((Object)(object)((Component)statTracker).gameObject); } } } private IEnumerator FixScaleAfterFrame(int nlines) { yield return (object)new WaitForEndOfFrame(); float preferredHeight = (statsDisplayOverrideHeight.Value ? (((TMP_Text)textComponent).fontSize * (float)(nlines + 1)) : ((TMP_Text)textComponent).renderedHeight); layoutElement.preferredHeight = preferredHeight; } private static void CreatePositionWindow(ConfigEntry<Vector2> configEntry) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected O, but got Unknown //IL_00ef: 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_0123: 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_0153: 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_017b: 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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: 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_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Expected O, but got Unknown GameObject canvasObj = new GameObject("Vector2 Popup"); canvasObj.layer = LayerIndex.ui.intVal; Canvas obj = canvasObj.AddComponent<Canvas>(); obj.renderMode = (RenderMode)0; obj.sortingOrder = 10; CanvasScaler obj2 = canvasObj.AddComponent<CanvasScaler>(); obj2.uiScaleMode = (ScaleMode)1; obj2.referenceResolution = new Vector2(1920f, 1080f); obj2.screenMatchMode = (ScreenMatchMode)1; canvasObj.AddComponent<CanvasRenderer>(); canvasObj.AddComponent<GraphicRaycaster>(); canvasObj.AddComponent<RooEscapeRouter>().escapePressed.AddListener(new UnityAction(Close)); GameObject val = new GameObject("Window"); RectTransform windowRect = val.AddComponent<RectTransform>(); ((Transform)windowRect).SetParent(canvasObj.transform, false); windowRect.anchorMin = new Vector2(0.5f, 0.5f); windowRect.anchorMax = new Vector2(0.5f, 0.5f); windowRect.pivot = new Vector2(0.5f, 0.5f); windowRect.sizeDelta = new Vector2(450f, 160f); val.AddComponent<VerticalLayoutGroup>(); GameObject val2 = new GameObject("Background"); RectTransform obj3 = val2.AddComponent<RectTransform>(); ((Transform)obj3).SetParent(((Component)windowRect).transform, false); obj3.anchorMin = new Vector2(-0.25f, -0.25f); obj3.anchorMax = new Vector2(1.25f, 1.25f); obj3.pivot = new Vector2(0.5f, 0.5f); ((Graphic)val2.AddComponent<Image>()).color = new Color(0.125f, 0.25f, 0.4f, 1f); val2.AddComponent<LayoutElement>().ignoreLayout = true; GameObject sliderPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/SettingsSliderControl.prefab").WaitForCompletion(); CreateSlider("X", 0, 0f, 1920f); CreateSlider("Y", 1, 0f, 1080f); GameObject obj4 = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/GenericMenuButton.prefab").WaitForCompletion(), (Transform)(object)windowRect); obj4.GetComponent<LanguageTextMeshController>().token = "Close"; obj4.AddComponent<LayoutElement>().minHeight = 32f; ((UnityEvent)((Button)obj4.GetComponentInChildren<HGButton>()).onClick).AddListener(new UnityAction(Close)); void Close() { Object.Destroy((Object)(object)canvasObj); } void CreateSlider(string name, int index, float min, float max) { //IL_004f: 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_00a1: Unknown result type (might be due to invalid IL or missing references) GameObject val3 = Object.Instantiate<GameObject>(sliderPrefab, (Transform)(object)windowRect); SettingsSlider component = val3.GetComponent<SettingsSlider>(); ((BaseSettingsControl)component).nameLabel.token = name; Slider slider = component.slider; ((Component)slider).GetComponent<RectTransform>().sizeDelta = new Vector2(300f, 40f); Object.DestroyImmediate((Object)(object)component); Object.DestroyImmediate((Object)(object)val3.GetComponent<SelectableDescriptionUpdater>()); SliderWithText sliderWithText = val3.AddComponent<SliderWithText>(); sliderWithText.Setup(slider, val3.GetComponentInChildren<TMP_InputField>(), min, max); sliderWithText.onValueChanged.AddListener((UnityAction<float>)delegate(float newValue) { //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_002a: Unknown result type (might be due to invalid IL or missing references) Vector2 value2 = configEntry.Value; ((Vector2)(ref value2))[index] = newValue; configEntry.Value = value2; }); Vector2 value = configEntry.Value; sliderWithText.Value = ((Vector2)(ref value))[index]; } } } internal class StatsDisplayDefinitions { internal static string floatPrecision; internal static void SetupDefs() { string utilityString = (StatsDisplayClass.builtInColors.Value ? "<style=\"cIsUtility>" : ""); string damageString = (StatsDisplayClass.builtInColors.Value ? "<style=\"cIsDamage>" : ""); string healingString = (StatsDisplayClass.builtInColors.Value ? "<style=\"cIsHealing>" : ""); string healthString = (StatsDisplayClass.builtInColors.Value ? "<style=\"cIsHealth>" : ""); string voidString = (StatsDisplayClass.builtInColors.Value ? "<style=\"cIsVoid>" : ""); string styleString = (StatsDisplayClass.builtInColors.Value ? "</style>" : ""); floatPrecision = "0." + new string('#', StatsDisplayClass.floatPrecision.Value); StatsDisplayClass.statDictionary.Clear(); StatsDisplayClass.statDictionary.Add("luck", (CharacterBody cachedUserBody) => utilityString + Utils.GetLuckFromCachedUserBody(cachedUserBody).ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("baseDamage", (CharacterBody cachedUserBody) => damageString + cachedUserBody.baseDamage.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("crit", (CharacterBody cachedUserBody) => damageString + cachedUserBody.crit.ToString(floatPrecision) + "%" + styleString); StatsDisplayClass.statDictionary.Add("attackSpeed", (CharacterBody cachedUserBody) => damageString + cachedUserBody.attackSpeed.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("armor", (CharacterBody cachedUserBody) => healingString + cachedUserBody.armor.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("armorDamageReduction", (CharacterBody cachedUserBody) => healingString + (100f - 100f * (100f / (100f + cachedUserBody.armor))).ToString(floatPrecision) + "%" + styleString); StatsDisplayClass.statDictionary.Add("regen", (CharacterBody cachedUserBody) => healingString + cachedUserBody.regen.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("speed", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.moveSpeed.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("availableJumps", (CharacterBody cachedUserBody) => (!Object.op_Implicit((Object)(object)cachedUserBody.characterMotor)) ? (utilityString + "N/A" + styleString) : $"{utilityString}{cachedUserBody.maxJumpCount - cachedUserBody.characterMotor.jumpCount}{styleString}"); StatsDisplayClass.statDictionary.Add("maxJumps", (CharacterBody cachedUserBody) => $"{utilityString}{cachedUserBody.maxJumpCount}{styleString}"); StatsDisplayClass.statDictionary.Add("killCount", (CharacterBody cachedUserBody) => $"{healthString}{cachedUserBody.killCountServer}{styleString}"); StatsDisplayClass.statDictionary.Add("mountainShrines", (CharacterBody cachedUserBody) => string.Format("{0}{1}{2}", utilityString, (TeleporterInteraction.instance != null) ? ((object)TeleporterInteraction.instance.shrineBonusStacks) : "N/A", styleString)); StatsDisplayClass.statDictionary.Add("experience", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.experience.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("level", (CharacterBody cachedUserBody) => $"{utilityString}{cachedUserBody.level}{styleString}"); StatsDisplayClass.statDictionary.Add("maxHealth", (CharacterBody cachedUserBody) => $"{healthString}{cachedUserBody.maxHealth}{styleString}"); StatsDisplayClass.statDictionary.Add("maxBarrier", (CharacterBody cachedUserBody) => $"{utilityString}{cachedUserBody.maxBarrier}{styleString}"); StatsDisplayClass.statDictionary.Add("barrierDecayRate", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.barrierDecayRate.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("maxShield", (CharacterBody cachedUserBody) => $"{utilityString}{cachedUserBody.maxShield}{styleString}"); StatsDisplayClass.statDictionary.Add("acceleration", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.acceleration.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("jumpPower", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.jumpPower.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("maxJumpHeight", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.maxJumpHeight.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("damage", (CharacterBody cachedUserBody) => damageString + cachedUserBody.damage.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("critMultiplier", (CharacterBody cachedUserBody) => damageString + cachedUserBody.critMultiplier.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("bleedChance", (CharacterBody cachedUserBody) => damageString + cachedUserBody.bleedChance.ToString(floatPrecision) + "%" + styleString); StatsDisplayClass.statDictionary.Add("visionDistance", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.visionDistance.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("critHeal", (CharacterBody cachedUserBody) => healingString + cachedUserBody.critHeal.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("cursePenalty", (CharacterBody cachedUserBody) => utilityString + cachedUserBody.cursePenalty.ToString(floatPrecision) + styleString); StatsDisplayClass.statDictionary.Add("hasOneShotProtection", (CharacterBody cachedUserBody) => (!Object.op_Implicit((Object)(object)cachedUserBody.healthComponent)) ? (utilityString + "N/A" + styleString) : $"{utilityString}{cachedUserBody.oneShotProtectionFraction * cachedUserBody.healthComponent.fullCombinedHealth - cachedUserBody.healthComponent.missingCombinedHealth >= 0f}{styleString}"); StatsDisplayClass.statDictionary.Add("isGlass", (CharacterBody cachedUserBody) => $"{utilityString}{cachedUserBody.isGlass}{styleString}"); StatsDisplayClass.statDictionary.Add("canPerformBackstab", (CharacterBody cachedUserBody) => $"{damageString}{cachedUserBody.canPerformBackstab}{styleString}"); StatsDisplayClass.statDictionary.Add("canReceiveBackstab", (CharacterBody cachedUserBody) => $"{damageString}{cachedUserBody.canReceiveBackstab}{styleString}"); StatsDisplayClass.statDictionary.Add("healthPercentage", (CharacterBody cachedUserBody) => (!Object.op_Implicit((Object)(object)cachedUserBody.healthComponent)) ? (healthString + "N/A" + styleString) : (healthString + (cachedUserBody.healthComponent.combinedHealthFraction * 100f).ToString(floatPrecision) + styleString)); StatsDisplayClass.statDictionary.Add("goldPortal", (CharacterBody cachedUserBody) => damageString + ((TeleporterInteraction.instance != null) ? TeleporterInteraction.instance.shouldAttemptToSpawnGoldshoresPortal.ToString() : "N/A") + styleString); StatsDisplayClass.statDictionary.Add("msPortal", (CharacterBody cachedUserBody) => utilityString + ((TeleporterInteraction.instance != null) ? TeleporterInteraction.instance.shouldAttemptToSpawnMSPortal.ToString() : "N/A") + styleString); StatsDisplayClass.statDictionary.Add("shopPortal", (CharacterBody cachedUserBody) => utilityString + ((TeleporterInteraction.instance != null) ? TeleporterInteraction.instance.shouldAttemptToSpawnShopPortal.ToString() : "N/A") + styleString); StatsDisplayClass.statDictionary.Add("voidPortal", delegate { if (TeleporterInteraction.instance == null) { return voidString + "N/A" + styleString; } PortalSpawner[] portalSpawners = TeleporterInteraction.instance.portalSpawners; foreach (PortalSpawner val in portalSpawners) { if (((Object)val.portalSpawnCard).name == "iscVoidPortal" && val.NetworkwillSpawn) { return voidString + "True" + styleString; } } return voidString + "False" + styleString; }); StatsDisplayClass.statDictionary.Add("dps", (CharacterBody cachedUserBody) => $"{damageString}{(float)BasePlugin.instance.dpsMeter.damageDealtSincePeriod / 5f}{styleString}"); StatsDisplayClass.statDictionary.Add("currentCombatDamage", (CharacterBody cachedUserBody) => $"{damageString}{BasePlugin.instance.dpsMeter.currentCombatDamage}{styleString}"); StatsDisplayClass.statDictionary.Add("remainingComboDuration", (CharacterBody cachedUserBody) => $"{utilityString}{(int)BasePlugin.instance.dpsMeter.timer + 1}{styleString}"); StatsDisplayClass.statDictionary.Add("maxCombo", (CharacterBody cachedUserBody) => $"{damageString}{BasePlugin.instance.dpsMeter.maxCombo}{styleString}"); StatsDisplayClass.statDictionary.Add("maxComboThisRun", (CharacterBody cachedUserBody) => $"{damageString}{BasePlugin.instance.dpsMeter.maxRunCombo}{styleString}"); StatsDisplayClass.statDictionary.Add("currentCombatKills", (CharacterBody cachedUserBody) => $"{damageString}{BasePlugin.instance.dpsMeter.currentComboKills}{styleString}"); StatsDisplayClass.statDictionary.Add("maxKillCombo", (CharacterBody cachedUserBody) => $"{damageString}{BasePlugin.instance.dpsMeter.maxCombo}{styleString}"); StatsDisplayClass.statDictionary.Add("maxKillComboThisRun", (CharacterBody cachedUserBody) => $"{damageString}{BasePlugin.instance.dpsMeter.maxRunCombo}{styleString}"); StatsDisplayClass.statDictionary.Add("critWithLuck", delegate(CharacterBody cachedUserBody) { float num3 = Utils.CalculateChanceWithLuck(cachedUserBody.crit / 100f, Utils.GetLuckFromCachedUserBody(cachedUserBody)) * 100f; return damageString + num3.ToString(floatPrecision) + "%" + styleString; }); StatsDisplayClass.statDictionary.Add("bleedChanceWithLuck", delegate(CharacterBody cachedUserBody) { float num2 = Utils.CalculateChanceWithLuck(cachedUserBody.bleedChance / 100f, Utils.GetLuckFromCachedUserBody(cachedUserBody)) * 100f; return damageString + num2.ToString(floatPrecision) + "%" + styleString; }); StatsDisplayClass.statDictionary.Add("velocity", delegate(CharacterBody cachedUserBody) { //IL_0016: 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) Rigidbody component = ((Component)cachedUserBody).GetComponent<Rigidbody>(); if (Object.op_Implicit((Object)(object)component)) { string text = utilityString; Vector3 velocity = component.velocity; return text + ((Vector3)(ref velocity)).magnitude.ToString(floatPrecision) + styleString; } return utilityString + "N/A" + styleString; }); StatsDisplayClass.statDictionary.Add("teddyBearBlockChance", delegate(CharacterBody cachedUserBody) { int itemCount3 = cachedUserBody.inventory.GetItemCount(Items.Bear); return utilityString + (0.15f * (float)itemCount3 / (0.15f * (float)itemCount3 + 1f) * 100f).ToString(floatPrecision) + "%" + styleString; }); StatsDisplayClass.statDictionary.Add("saferSpacesCD", delegate(CharacterBody cachedUserBody) { int itemCount2 = cachedUserBody.inventory.GetItemCount(Items.BearVoid); return (itemCount2 == 0) ? (utilityString + "N/A" + styleString) : (utilityString + (15f * Mathf.Pow(0.9f, (float)itemCount2)).ToString(floatPrecision) + "s" + styleString); }); StatsDisplayClass.statDictionary.Add("instaKillChance", delegate(CharacterBody cachedUserBody) { int itemCount = cachedUserBody.inventory.GetItemCount(Items.CritGlassesVoid); float num = Utils.CalculateChanceWithLuck(0.005f * (float)itemCount, Utils.GetLuckFromCachedUserBody(cachedUserBody)) * 100f; return damageString + num.ToString(floatPrecision) + "%" + styleString; }); StatsDisplayClass.statDictionary.Add("difficultyCoefficient", (CharacterBody cachedUserBody) => $"{utilityString}{Run.instance.difficultyCoefficient}{styleString}"); StatsDisplayClass.statDictionary.Add("stage", (CharacterBody cachedUserBody) => utilityString + Language.GetString(Stage.instance.sceneDef.nameToken) + styleString); } } } namespace LookingGlass.ResizeCommandWindow { internal class ModifyCommandWindow : BaseThing { public static ConfigEntry<bool> resize; public static ConfigEntry<float> opacity; public ModifyCommandWindow() { Setup(); } public void Setup() { resize = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<bool>("Command Settings", "Resize Command Window", true, "Resizes the command window to fit modded items"); opacity = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<float>("Command Settings", "Command Window Opacity", 50f, "Changes the Opacity of the regular command window"); SetupRiskOfOptions(); } public void SetupRiskOfOptions() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(resize, new CheckBoxConfig { restartRequired = false })); ModSettingsManager.AddOption((BaseOption)new SliderOption(opacity, new SliderConfig { restartRequired = false })); } internal void ResizeWindow(PickupPickerController controller) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) Transform val = controller.panelInstance.transform.Find("MainPanel"); if (val != null) { Transform val2 = val.Find("Juice/BG"); if (val2 != null) { Color color = ((Graphic)((Component)val2).GetComponent<Image>()).color; ((Graphic)((Component)val2).GetComponent<Image>()).color = new Color(color.r, color.g, color.b, opacity.Value / 100f); } } if (resize.Value && ((Object)controller).name.StartsWith("CommandCube")) { GridLayoutGroup componentInChildren = ((Component)controller.panelInstance.transform).GetComponentInChildren<GridLayoutGroup>(); int num = ((Component)componentInChildren).transform.childCount - 1; componentInChildren.constraint = (Constraint)2; if (val != null) { RectTransform component = ((Component)val).GetComponent<RectTransform>(); int num2 = 12; int num3 = Mathf.CeilToInt(Mathf.Sqrt((float)num) + 2f); componentInChildren.constraintCount = Mathf.Min(num2, num3) - 2; float num4 = (float)Mathf.Min(num3, num2) * (component.sizeDelta.x / 8f); num3 = ((num3 <= num2) ? num3 : (num3 + 1 + num3 - num2)); float num5 = (float)num3 * (component.sizeDelta.x / 8f); component.sizeDelta = new Vector2(num5, num4); ((MonoBehaviour)Run.instance).StartCoroutine(FixColumnCountAndStuff(componentInChildren, controller)); } } } public static IEnumerator FixColumnCountAndStuff(GridLayoutGroup gridLayoutGroup, PickupPickerController panel) { yield return (object)new WaitForEndOfFrame(); int num = 1; float y = ((Component)((Component)gridLayoutGroup).transform.GetChild(1)).GetComponent<RectTransform>().anchoredPosition.y; for (int i = 2; i < ((Component)gridLayoutGroup).transform.childCount; i++) { if (((Component)((Component)gridLayoutGroup).transform.GetChild(i)).GetComponent<RectTransform>().anchoredPosition.y == y) { num++; } } panel.panelInstanceController.maxColumnCount = num; panel.panelInstanceController.SetPickupOptions(panel.options); } } } namespace LookingGlass.PickupNotifsDuration { internal class PickupNotifDurationClass : BaseThing { [CompilerGenerated] private static class <>O { public static IsDisabledDelegate <0>__NotificationsDisabled; } private static Hook overrideHook; public static ConfigEntry<float> notificationDuration; public PickupNotifDurationClass() { Setup(); SetupRiskOfOptions(); } public void Setup() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown MethodInfo? method = typeof(CharacterMasterNotificationQueue).GetMethod("PushNotification", BindingFlags.Instance | BindingFlags.NonPublic); MethodInfo method2 = typeof(PickupNotifDurationClass).GetMethod("PushNotification", BindingFlags.Instance | BindingFlags.NonPublic); overrideHook = new Hook((MethodBase)method, method2, (object)this); notificationDuration = ((BaseUnityPlugin)BasePlugin.instance).Config.Bind<float>("Misc", "Pickup Notifications Duration", 6f, "Duration of pickup notifications. 6s is the vanilla duration"); } public void SetupRiskOfOptions() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown ConfigEntry<float> obj = notificationDuration; SliderConfig val = new SliderConfig { restartRequired = false, min = 0.01f, max = 24f, formatString = "{0:F1}s" }; object obj2 = <>O.<0>__NotificationsDisabled; if (obj2 == null) { IsDisabledDelegate val2 = NotificationsDisabled; <>O.<0>__NotificationsDisabled = val2; obj2 = (object)val2; } ((BaseOptionConfig)val).checkIfDisabled = (IsDisabledDelegate)obj2; ModSettingsManager.AddOption((BaseOption)new SliderOption(obj, val)); } private static bool NotificationsDisabled() { return HidePickupNotifications.disablePickupNotifications.Value; } private void PushNotification(Action<CharacterMasterNotificationQueue, NotificationInfo, float> orig, CharacterMasterNotificationQueue self, NotificationInfo info, float duration) { duration = notificationDuration.Value; orig(self, info, duration); } } } namespace LookingGlass.LookingGlassLanguage { public static class LookingGlassLanguageAPI { public static void SetupToken(Language language, string token, string value) { language.stringsByToken["LG_TOKEN_" + token] = value; } } } namespace LookingGlass.ItemStatsNameSpace { internal class ItemCooldownReduction { private static readonly Dictionary<int, int> SkillCooldownReduction; private static readonly Dictionary<int, int> SkillReductionValueIndex; public static int GetItemTargetSkill(int itemIndex) { if (!SkillCooldownReduction.TryGetValue(itemIndex, out var value)) { return 0; } return value; } public static int GetReductionValueIndex(int itemIndex) { if (!SkillReductionValueIndex.TryGetValue(itemIndex, out var value)) { return 0; } return value; } public static bool hasSkillCooldown(int itemIndex) { return SkillCooldownReduction.ContainsKey(itemIndex); } static ItemCooldownReduction() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected I4, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected I4, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected I4, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected I4, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected I4, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected I4, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected I4, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected I4, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Expected I4, but got Unknown //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected I4, but got Unknown SkillCooldownReduction = new Dictionary<int, int>(); SkillReductionValueIndex = new Dictionary<int, int>(); SkillCooldownReduction.Add((int)Items.AlienHead.itemIndex, -1); SkillReductionValueIndex.Add((int)Items.AlienHead.itemIndex, 0); SkillCooldownReduction.Add((int)Items.UtilitySkillMagazine.itemIndex, 2); SkillReductionValueIndex.Add((int)Items.UtilitySkillMagazine.itemIndex, -1); SkillCooldownReduction.Add((int)Items.HalfAttackSpeedHalfCooldowns.itemIndex, -1); SkillReductionValueIndex.Add((int)Items.HalfAttackSpeedHalfCooldowns.itemIndex, 0); SkillCooldownReduction.Add((int)Items.LunarBadLuck.itemIndex, -1); SkillReductionValueIndex.Add((int)Items.LunarBadLuck.itemIndex, 0); SkillCooldownReduction.Add((int)Items.EquipmentMagazineVoid.itemIndex, 3); SkillReductionValueIndex.Add((int)Items.EquipmentMagazineVoid.itemIndex, -1); } } public class ItemDefinitions { public static Dictionary<int, ItemStatsDef> allItemDefinitions = new Dictionary<int, ItemStatsDef>(); public static void RegisterItemStatsDef(ItemStatsDef itemStatsDef, ItemIndex itemIndex) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected I4, but got Unknown allItemDefinitions.Add((int)itemIndex, itemStatsDef); } internal static void RegisterAll() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected I4, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected I4, but got Unknown //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected I4, but got Unknown //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Expected I4, but got Unknown //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Expected I4, but got Unknown //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Expected I4, but got Unknown //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Expected I4, but got Unknown //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Expected I4, but got Unknown //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0448: Expected I4, but got Unknown //IL_04cd: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Expected I4, but got Unknown //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Expected I4, but got Unknown //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Expected I4, but got Unknown //IL_0605: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Expected I4, but got Unknown //IL_066d: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Expected I4, but got Unknown //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_0730: Expected I4, but got Unknown //IL_07b5: Unknown result type (might be due to invalid IL or missing references) //IL_07c0: Expected I4, but got Unknown //IL_081d: Unknown result type (might be due to invalid IL or missing references) //IL_0828: Expected I4, but got Unknown //IL_0885: Unknown result type (might be due to invalid IL or missing references) //IL_0890: Expected I4, but got Unknown //IL_0915: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Expected I4, but got Unknown //IL_097d: Unknown result type (might be due to invalid IL or missing references) //IL_0988: Expected I4, but got Unknown //IL_09e6: Unknown result type (might be due to invalid IL or missing references) //IL_09f1: Expected I4, but got Unknown //IL_0a4e: Unknown result type (might be due to invalid IL or missing references) //IL_0a59: Expected I4, but got Unknown //IL_0ab6: Unknown result type (might be due to invalid IL or missing references) //IL_0ac1: Expected I4, but got Unknown //IL_0b1e: Unknown result type (might be due to invalid IL or missing references) //IL_0b29: Expected I4, but got Unknown //IL_0b87: Unknown result type (might be due to invalid IL or missing references) //IL_0b92: Expected I4, but got Unknown //IL_0bf0: Unknown result type (might be due to invalid IL or missing references) //IL_0bfb: Expected I4, but got Unknown //IL_0c58: Unknown result type (might be due to invalid IL or missing references) //IL_0c63: Expected I4, but got Unknown //IL_0cc0: Unknown result type (might be due to invalid IL or missing references) //IL_0ccb: Expected I4, but got Unknown //IL_0d2f: Unknown result type (might be due to invalid IL or missing references) //IL_0d3a: Expected I4, but got Unknown //IL_0da5: Unknown result type (might be due to invalid IL or missing references) //IL_0db0: Expected I4, but got Unknown //IL_0e0d: Unknown result type (might be due to invalid IL or missing references) //IL_0e18: Expected I4, but got Unknown //IL_0e7c: Unknown result type (might be due to invalid IL or missing references) //IL_0e87: Expected I4, but got Unknown //IL_0ee4: Unknown result type (might be due to invalid IL or missing references) //IL_0eef: Expected I4, but got Unknown //IL_0f75: Unknown result type (might be due to invalid IL or missing references) //IL_0f80: Expected I4, but got Unknown //IL_1013: Unknown result type (might be due to invalid IL or missing references) //IL_101e: Expected I4, but got Unknown //IL_107b: Unknown result type (might be due to invalid IL or missing references) //IL_1086: Expected I4, but got Unknown //IL_10e3: Unknown result type (might be due to invalid IL or missing references) //IL_10ee: Expected I4, but got Unknown //IL_114c: Unknown result type (might be due to invalid IL or missing references) //IL_1157: Expected I4, but got Unknown //IL_11b4: Unknown result type (might be due to invalid IL or missing references) //IL_11bf: Expected I4, but got Unknown //IL_121c: Unknown result type (might be due to invalid IL or missing references) //IL_1227: Expected I4, but got Unknown //IL_12ac: Unknown result type (might be due to invalid IL or missing references) //IL_12b7: Expected I4, but got Unknown //IL_1314: Unknown result type (might be due to invalid IL or missing references) //IL_131f: Expected I4, but got Unknown //IL_137c: Unknown result type (might be due to invalid IL or missing references) //IL_1387: Expected I4, but got Unknown //IL_13e4: Unknown result type (might be due to invalid IL or missing references) //IL_13ef: Expected I4, but got Unknown //IL_144c: Unknown result type (might be due to invalid IL or missing references) //IL_1457: Expected I4, but got Unknown //IL_14b4: Unknown result type (might be due to invalid IL or missing references) //IL_14bf: Expected I4, but got Unknown //IL_1544: Unknown result type (might be due to invalid IL or missing references) //IL_154f: Expected I4, but got Unknown //IL_15ac: Unknown result type (might be due to invalid IL or missing references) //IL_15b7: Expected I4, but got Unknown //IL_1614: Unknown result type (might be due to invalid IL or missing references) //IL_161f: Expected I4, but got Unknown //IL_167c: Unknown result type (might be due to invalid IL or missing references) //IL_1687: Expected I4, but got Unknown //IL_170c: Unknown result type (might be due to invalid IL or missing references) //IL_1717: Expected I4, but got Unknown //IL_179c: Unknown result type (might be due to invalid IL or missing references) //IL_17a7: Expected I4, but got Unknown //IL_1804: Unknown result type (might be due to invalid IL or missing references) //IL_180f: Expected I4, but got Unknown //IL_186c: Unknown result type (might be due to invalid IL or missing references) //IL_1877: Expected I4, but got Unknown //IL_18fc: Unknown result type (might be due to invalid IL or missing references) //IL_1907: Expected I4, but got Unknown //IL_1964: Unknown result type (might be due to invalid IL or missing references) //IL_196f: Expected I4, but got Unknown //IL_19f4: Unknown result type (might be due to invalid IL or missing references) //IL_19ff: Expected I4, but got Unknown //IL_1a5c: Unknown result type (might be due to invalid IL or missing references) //IL_1a67: Expected I4, but got Unknown //IL_1ac4: Unknown result type (might be due to invalid IL or missing references) //IL_1acf: Expected I4, but got Unknown //IL_1b2d: Unknown result type (might be due to invalid IL or missing references) //IL_1b38: Expected I4, but got Unknown //IL_1bbd: Unknown result type (might be due to invalid IL or missing references) //IL_1bc8: Expected I4, but got Unknown //IL_1ca4: Unknown result type (might be due to invalid IL or missing references) //IL_1caf: Expected I4, but got Unknown //IL_1d5c: Unknown result type (might be due to invalid IL or missing references) //IL_1d67: Expected I4, but got Unknown //IL_1dec: Unknown result type (might be due to invalid IL or missing references) //IL_1df7: Expected I4, but got Unknown //IL_1e54: Unknown result type (might be due to invalid IL or missing references) //IL_1e5f: Expected I4, but got Unknown //IL_1f1a: Unknown result type (might be due to invalid IL or missing references) //IL_1f25: Expected I4, but got Unknown //IL_1f82: Unknown result type (might be due to invalid IL or missing references) //IL_1f8d: Expected I4, but got Unknown //IL_1fea: Unknown result type (might be due to invalid IL or missing references) //IL_1ff5: Expected I4, but got Unknown //IL_2052: Unknown result type (might be due to invalid IL or missing references) //IL_205d: Expected I4, but got Unknown //IL_20e2: Unknown result type (might be due to invalid IL or missing references) //IL_20ed: Expected I4, but got Unknown //IL_214a: Unknown result type (might be due to invalid IL or missing references) //IL_2155: Expected I4, but got Unknown //IL_21b2: Unknown result type (might be due to invalid IL or missing references) //IL_21bd: Expected I4, but got Unknown //IL_221a: Unknown result type (might be due to invalid IL or missing references) //IL_2225: Expected I4, but got Unknown //IL_2282: Unknown result type (might be due to invalid IL or missing references) //IL_228d: Expected I4, but got Unknown //IL_22ea: Unknown result type (might be due to invalid IL or missing references) //IL_22f5: Expected I4, but got Unknown //IL_2352: Unknown result type (might be due to invalid IL or missing references) //IL_235d: Expected I4, but got Unknown //IL_23ba: Unknown result type (might be due to invalid IL or missing references) //IL_23c5: Expected I4, but got Unknown //IL_2422: Unknown result type (might be due to invalid IL or missing references) //IL_242d: Expected I4, but got Unknown //IL_248a: Unknown result type (might be due to invalid IL or missing references) //IL_2495: Expected I4, but got Unknown //IL_24f2: Unknown result type (might be due to invalid IL or missing references) //IL_24fd: Expected I4, but got Unknown //IL_2582: Unknown result type (might be due to invalid IL or missing references) //IL_258d: Expected I4, but got Unknown //IL_25ea: Unknown result type (might be due to invalid IL or missing references) //IL_25f5: Expected I4, but got Unknown //IL_267a: Unknown result type (might be due to invalid IL or missing references) //IL_2685: Expected I4, but got Unknown //IL_26e2: Unknown result type (might be due to invalid IL or missing references) //IL_26ed: Expected I4, but got Unknown //IL_2772: Unknown result type (might be due to invalid IL or missing references) //IL_277d: Expected I4, but got Unknown //IL_27da: Unknown result type (might be due to invalid IL or missing references) //IL_27e5: Expected I4, but got Unknown //IL_2842: Unknown result type (might be due to invalid IL or missing references) //IL_284d: Expected I4, but got Unknown //IL_28aa: Unknown result type (might be due to invalid IL or missing references) //IL_28b5: Expected I4, but got Unknown //IL_2912: Unknown result type (might be due to invalid IL or missing references) //IL_291d: Expected I4, but got Unknown //IL_297a: Unknown result type (might be due to invalid IL or missing references) //IL_2985: Expected I4, but got Unknown //IL_29e2: Unknown result type (might be due to invalid IL or missing references) //IL_29ed: Expected I4, but got Unknown //IL_2a72: Unknown result type (might be due to invalid IL or missing references) //IL_2a7d: Expected I4, but got Unknown //IL_2b02: Unknown result type (might be due to invalid IL or missing references) //IL_2b0d: Expected I4, but got Unknown //IL_2b99: Unknown result type (might be due to invalid IL or missing references) //IL_2ba4: Expected I4, but got Unknown //IL_2c01: Unknown result type (might be due to invalid IL or missing references) //IL_2c0c: Expected I4, but got Unknown //IL_2c91: Unknown result type (might be due to invalid IL or missing references) //IL_2c9c: Expected I4, but got Unknown //IL_2cf9: Unknown result type (might be due to invalid IL or missing references) //IL_2d04: Expected I4, but got Unknown //IL_2d61: Unknown result type (might be due to invalid IL or missing references) //IL_2d6c: Expected I4, but got Unknown //IL_2dc9: Unknown result type (might be due to invalid IL or missing references) //IL_2dd4: Expected I4, but got Unknown //IL_2e31: Unknown result type (might be due to invalid IL or missing references) //IL_2e3c: Expected I4, but got Unknown //IL_2e99: Unknown result type (might be due to invalid IL or missing references) //IL_2ea4: Expected I4, but got Unknown //IL_2f51: Unknown result type (might be due to invalid IL or missing references) //IL_2f5c: Expected I4, but got Unknown //IL_2fef: Unknown result type (might be due to invalid IL or missing references) //IL_2ffa: Expected I4, but got Unknown //IL_3057: Unknown result type (might be due to invalid IL or missing references) //IL_3062: Expected I4, but got Unknown //IL_30bf: Unknown result type (might be due to invalid IL or missing references) //IL_30ca: Expected I4, but got Unknown //IL_3127: Unknown result type (might be due to invalid IL or missing references) //IL_3132: Expected I4, but got Unknown //IL_31b7: Unknown result type (might be due to invalid IL or missing references) //IL_31c2: Expected I4, but got Unknown //IL_321f: Unknown result type (might be due to invalid IL or missing references) //IL_322a: Expected I4, but got Unknown //IL_3287: Unknown result type (might be due to invalid IL or missing references) //IL_3292: Expected I4, but got Unknown //IL_32ef: Unknown result type (might be due to invalid IL or missing references) //IL_32fa: Expected I4, but got Unknown //IL_338d: Unknown result type (might be due to invalid IL or missing references) //IL_3398: Expected I4, but got Unknown //IL_33f5: Unknown result type (might be due to invalid IL or missing references) //IL_3400: Expected I4, but got Unknown //IL_345d: Unknown result type (might be due to invalid IL or missing references) //IL_3468: Expected I4, but got Unknown //IL_34c5: Unknown result type (might be due to invalid IL or missing references) //IL_34d0: Expected I4, but got Unknown //IL_3555: Unknown result type (might be due to invalid IL or missing references) //IL_3560: Expected I4, but got Unknown //IL_35e5: Unknown result type (might be due to invalid IL or missing references) //IL_35f0: Expected I4, but got Unknown //IL_364d: Unknown result type (might be due to invalid IL or missing references) //IL_3658: Expected I4, but got Unknown //IL_36de: Unknown result type (might be due to invalid IL or missing references) //IL_36e9: Expected I4, but got Unknown //IL_376e: Unknown result type (might be due to invalid IL or missing references) //IL_3779: Expected I4, but got Unknown //IL_37d6: Unknown result type (might be due to invalid IL or missing references) //IL_37e1: Expected I4, but got Unknown //IL_3866: Unknown result type (might be due to invalid IL or missing references) //IL_3871: Expected I4, but got Unknown //IL_38f6: Unknown result type (might be due to invalid IL or missing references) //IL_3901: Expected I4, but got Unknown //IL_395e: Unknown result type (might be due to invalid IL or missing references) //IL_3969: Expected I4, but got Unknown //IL_39ee: Unknown result type (might be due to invalid IL or missing references) //IL_39f9: Expected I4, but got Unknown //IL_3a56: Unknown result type (might be due to invalid IL or missing references) //IL_3a61: Expected I4, but got Unknown //IL_3ae6: Unknown result type (might be due to invalid IL or missing references) //IL_3af1: Expected I4, but got Unknown //IL_3b76: Unknown result type (might be due to invalid IL or missing references) //IL_3b81: Expected I4, but got Unknown //IL_3bde: Unknown result type (might be due to invalid IL or missing references) //IL_3be9: Expected I4, but got Unknown //IL_3c6f: Unknown result type (might be due to invalid IL or missing references) //IL_3c7a: Expected I4, but got Unknown //IL_3cff: Unknown result type (might be due to invalid IL or missing references) //IL_3d0a: Expected I4, but got Unknown //IL_3d8f: Unknown result type (might be due to invalid IL or missing references) //IL_3d9a: Expected I4, but got Unknown //IL_3e1f: Unknown result type (might be due to invalid IL or missing references) //IL_3e2a: Expected I4, but got Unknown //IL_3e87: Unknown result type (might be due to invalid IL or missing references) //IL_3e92: Expected I4, but got Unknown //IL_3f17: Unknown result type (might be due to invalid IL or missing references) //IL_3f22: Expected I4, but got Unknown //IL_3f7f: Unknown result type (might be due to invalid IL or missing references) //IL_3f8a: Expected I4, but got Unknown //IL_3fe7: Unknown result type (might be due to invalid IL or missing references) //IL_3ff2: Expected I4, but got Unknown //IL_4056: Unknown result type (might be due to invalid IL or missing references) //IL_4061: Expected I4, but got Unknown //IL_40be: Unknown result type (might be due to invalid IL or missing references) //IL_40c9: Expected I4, but got Unknown //IL_412d: Unknown result type (might be due to invalid IL or missing references) //IL_4138: Expected I4, but got Unknown //IL_41bd: Unknown result type (might be due to invalid IL or missing references) //IL_41c8: Expected I4, but got Unknown //IL_4225: Unknown result type (might be due to invalid IL or missing references) //IL_4230: Expected I4, but got Unknown //IL_428d: Unknown result type (might be due to invalid IL or missing references) //IL_4298: Expected I4, but got Unknown //IL_432b: Unknown result type (might be due to invalid IL or missing references) //IL_4336: Expected I4, but got Unknown //IL_439a: Unknown result type (might be due to invalid IL or missing references) //IL_43a5: Expected I4, but got Unknown //IL_4402: Unknown result type (might be due to invalid IL or missing references) //IL_440d: Expected I4, but got Unknown //IL_44a0: Unknown result type (might be due to invalid IL or missing references) //IL_44ab: Expected I4, but got Unknown //IL_4530: Unknown result type (might be due to invalid IL or missing references) //IL_453b: Expected I4, but got Unknown //IL_4598: Unknown result type (might be due to invalid IL or missing references) //IL_45a3: Expected I4, but got Unknown ItemStatsDef itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Block Chance: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { Utils.GetHyperbolicStacking(0.15f, 0.15f, stackCount) }; allItemDefinitions.Add((int)Items.Bear.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Min Bonus Movement Speed: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.descriptions.Add("Orb Interval: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Seconds); itemStatsDef.descriptions.Add("Max Stacks: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.07f * (float)stackCount, 10f - (1f - 3f / (3f + (float)stackCount - 1f)) * 5f, 2 + stackCount }; allItemDefinitions.Add((int)Items.SpeedBoostPickup.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Bonus Damage: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.2f * (float)stackCount }; allItemDefinitions.Add((int)Items.BossDamageBonus.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Skill Charges: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { stackCount }; allItemDefinitions.Add((int)Items.SecondarySkillMagazine.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Bonus Health: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Health); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.FlatHealth); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 25 * stackCount }; allItemDefinitions.Add((int)Items.FlatHealth.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Max Attack Speed: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.descriptions.Add("Range: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Meters); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.2f + 0.2f * (float)stackCount, 15 + 5 * stackCount }; allItemDefinitions.Add((int)Items.LowerHealthHigherDamage.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Fireworks: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 4 + 4 * stackCount }; allItemDefinitions.Add((int)Items.Firework.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Healing: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Healing); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.PercentHealing); itemStatsDef.descriptions.Add("Radius: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Meters); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.0225f + 0.0225f * (float)stackCount, 1.5f + 1.5f * (float)stackCount }; allItemDefinitions.Add((int)Items.Mushroom.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Healing: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Healing); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.FlatHealing); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 3f * (float)stackCount }; allItemDefinitions.Add((int)Items.HealWhileSafe.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Damage Per Kill: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.descriptions.Add("Max Stacks: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.025f + 0.01f * (float)stackCount, 5 + 5 * stackCount }; allItemDefinitions.Add((int)Items.IncreaseDamageOnMultiKill.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Bonus Damage: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.75f * (float)stackCount }; allItemDefinitions.Add((int)Items.Crowbar.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Bonus Damage: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.2f * (float)stackCount }; allItemDefinitions.Add((int)Items.FragileDamageBonus.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Sprint Bonus: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.25f * (float)stackCount }; allItemDefinitions.Add((int)Items.SprintBonus.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Bonus Damage: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.2f * (float)stackCount }; allItemDefinitions.Add((int)Items.NearbyDamageBonus.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Total Damage: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.descriptions.Add("Burn Duration: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number); itemStatsDef.descriptions.Add("Radius: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Meters); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 2.25f + 0.75f * (float)stackCount, 1.5f + 1.5f * (float)stackCount, 8f + 4f * (float)stackCount }; allItemDefinitions.Add((int)Items.IgniteOnKill.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Max Launch Count: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number); itemStatsDef.descriptions.Add("Max Damage Bonus: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 1 + stackCount, 0.2f + (float)stackCount }; allItemDefinitions.Add((int)Items.KnockBackHitEnemies.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Crit Chance: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { Utils.CalculateChanceWithLuck(0.1f * (float)stackCount, luck) }; allItemDefinitions.Add((int)Items.CritGlasses.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Healing: <style=cIsHealing>20</style> + "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Healing); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.PercentHealth); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.05f * (float)stackCount }; allItemDefinitions.Add((int)Items.Medkit.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Attack Speed: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.descriptions.Add("Movement Speed: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.075f * (float)stackCount, 0.07f * (float)stackCount }; allItemDefinitions.Add((int)Items.AttackSpeedAndMoveSpeed.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Healing: <style=cIsHealing>8</style> + "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Healing); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.PercentHealth); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.02f * (float)stackCount }; allItemDefinitions.Add((int)Items.Tooth.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Bonus Armor: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Armor); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 100f * (float)stackCount }; allItemDefinitions.Add((int)Items.OutOfCombatArmor.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Movement Speed: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.14f * (float)stackCount }; allItemDefinitions.Add((int)Items.Hoof.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Shield Strength: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.PercentHealth); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.08f * (float)stackCount }; allItemDefinitions.Add((int)Items.PersonalShield.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Charges: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { stackCount }; allItemDefinitions.Add((int)Items.HealingPotion.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Damage Reduction: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Armor); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 5 * stackCount }; allItemDefinitions.Add((int)Items.ArmorPlate.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Gold Gained: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Gold); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { (float)(3 * stackCount) * Run.instance.difficultyCoefficient }; allItemDefinitions.Add((int)Items.GoldOnHurt.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Charges: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Utility); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Number); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { stackCount }; allItemDefinitions.Add((int)Items.TreasureCache.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Attack Speed: "); itemStatsDef.valueTypes.Add(ItemStatsDef.ValueType.Damage); itemStatsDef.measurementUnits.Add(ItemStatsDef.MeasurementUnits.Percentage); itemStatsDef.calculateValuesNew = (float luck, int stackCount, float procChance) => new List<float> { 0.15f * (float)stackCount }; allItemDefinitions.Add((int)Items.Syringe.itemIndex, itemStatsDef); itemStatsDef = new ItemStatsDef(); itemStatsDef.descriptions.Add("Bomb Chance: "); itemStatsDef.val