Decompiled source of KainRogueProtocol EN v0.1.2
BepInEx/plugins/KainRogueProtocol/KainRogueProtocol.dll
Decompiled 13 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Agents; using BepInEx; using BepInEx.Configuration; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using ChainedPuzzles; using Enemies; using GameData; using Gear; using HarmonyLib; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppSystem.Collections.Generic; using KainRogueProtocol.Core; using KainRogueProtocol.Corruption; using KainRogueProtocol.Data; using KainRogueProtocol.Effects; using KainRogueProtocol.Events; using KainRogueProtocol.Modifiers; using KainRogueProtocol.Networking; using KainRogueProtocol.Patches; using KainRogueProtocol.Runtime; using KainRogueProtocol.Triggers; using KainRogueProtocol.UI; using Microsoft.CodeAnalysis; using Player; using SNetwork; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; 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: AssemblyVersion("0.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace KainRogueProtocol.UI { public sealed class BuffBar { private readonly GameObject _panel; private readonly Text _text; private readonly Image _accent; public BuffBar(Transform parent) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d3: Unknown result type (might be due to invalid IL or missing references) _panel = UiFactory.CreatePanel("BuffBar", parent, new Vector2(0.5f, 1f), new Vector2(0.5f, 1f), new Vector2(680f, 38f), new Vector2(0f, -42f)); _accent = UiFactory.CreateImage("BuffAccent", _panel.transform, UiFactory.MutedTextColor); UiFactory.SetRect((Component)(object)_accent, new Vector2(0f, 0.5f), new Vector2(0f, 0.5f), new Vector2(4f, 24f), new Vector2(18f, 0f)); _text = UiFactory.CreateText("BuffBarText", _panel.transform, "KRP / NO ACTIVE CARDS", 16, (TextAnchor)4, UiFactory.MutedTextColor); UiFactory.Stretch((Component)(object)_text, 30f, 4f, 12f, 4f); } public void Refresh(RogueState state) { //IL_0044: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (state.SelectedCards.Count == 0) { ((Graphic)_accent).color = UiFactory.MutedTextColor; ((Graphic)_text).color = UiFactory.MutedTextColor; _text.text = "KRP / NO ACTIVE CARDS"; return; } ((Graphic)_accent).color = UiFactory.AccentColor; ((Graphic)_text).color = UiFactory.TextColor; _text.text = "KRP / " + string.Join(" + ", state.SelectedCards.Select((RogueCard card) => card.Name.ToUpperInvariant())); } public void SetVisible(bool visible) { _panel.SetActive(visible); } } public sealed class CardPoolPanel { private readonly GameObject _panel; private readonly Transform _gridRoot; private readonly Text _headerText; private readonly Text _promptText; private readonly List<GameObject> _entries = new List<GameObject>(); private RogueCard[] _cards = Array.Empty<RogueCard>(); private Action<RogueCard>? _onSelected; private bool _isVisible; public bool IsVisible => _isVisible; public CardPoolPanel(Transform parent) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0112: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) _panel = UiFactory.CreateRect("DevelopmentCardPoolPanel", parent, Vector2.zero, Vector2.one, Vector2.zero, Vector2.zero); UiFactory.Stretch((Component)(object)UiFactory.CreateImage("CardPoolDimmer", _panel.transform, new Color(0f, 0.005f, 0.006f, 0.9f)), 0f, 0f, 0f, 0f); GameObject val = UiFactory.CreatePanel("CardPoolFrame", _panel.transform, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(1540f, 840f), new Vector2(0f, -20f)); ((Graphic)val.GetComponent<Image>()).color = new Color(0f, 0f, 0f, 0.72f); _headerText = UiFactory.CreateText("CardPoolHeader", val.transform, "<color=#8FDCFF>Kain</color> ROGUE PROTOCOL / DEV CARD POOL", 27, (TextAnchor)3, UiFactory.AccentColor); _headerText.fontStyle = (FontStyle)1; UiFactory.SetRect((Component)(object)_headerText, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(-80f, 48f), new Vector2(40f, -44f)); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("CardPoolRule", val.transform, UiFactory.LineColor), new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(-80f, 2f), new Vector2(40f, -78f)); UiFactory.SetRect((Component)(object)UiFactory.CreateText("CardPoolSub", val.transform, "开发测试工具:点击任意卡牌立即加入当前运行状态。按 ESC 关闭。", 15, (TextAnchor)3, UiFactory.MutedTextColor), new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(-80f, 28f), new Vector2(40f, -105f)); GameObject val2 = UiFactory.CreateRect("CardPoolGrid", val.transform, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(1440f, 610f), new Vector2(0f, -42f)); _gridRoot = val2.transform; _promptText = UiFactory.CreateText("CardPoolPrompt", val.transform, "快捷键 ~ 打开本面板 / F8 常驻 UI / F7 随机三选一", 14, (TextAnchor)4, UiFactory.TextColor); UiFactory.SetRect((Component)(object)_promptText, new Vector2(0f, 0f), new Vector2(1f, 0f), new Vector2(-80f, 34f), new Vector2(40f, 34f)); _panel.SetActive(false); } public void Show(RogueCard[] cards, Action<RogueCard> onSelected) { _cards = cards; _onSelected = onSelected; RebuildEntries(); _panel.SetActive(true); _isVisible = true; } public void Tick() { if (_isVisible && Input.GetKeyDown((KeyCode)27)) { Close(); } } private void RebuildEntries() { //IL_008e: Unknown result type (might be due to invalid IL or missing references) foreach (GameObject entry in _entries) { Object.Destroy((Object)(object)entry); } _entries.Clear(); int num = Mathf.Min(_cards.Length, 24); for (int i = 0; i < num; i++) { RogueCard card = _cards[i]; int num2 = i % 4; int num3 = i / 4; float num4 = -516f + (float)num2 * 344f; float num5 = 204f - (float)num3 * 184f; CreateEntry(card, i, new Vector2(num4, num5)); } _promptText.text = ((_cards.Length > 24) ? $"显示前 24 张 / 总计 {_cards.Length} 张。按 ESC 关闭。" : $"已载入 {_cards.Length} 张卡。点击任意卡牌立即选择,按 ESC 关闭。"); } private void CreateEntry(RogueCard card, int index, Vector2 position) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) RogueCard card2 = card; GameObject entry = UiFactory.CreateCard($"CardPoolEntry_{index + 1}", _gridRoot); UiFactory.SetRect((Component)(object)entry.GetComponent<RectTransform>(), new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(320f, 156f), position); ((Graphic)entry.GetComponent<Image>()).color = new Color(0.024f, 0.038f, 0.035f, 0.95f); _entries.Add(entry); Color color = RogueUiAssetLibrary.RarityPrimaryColor(card2.Rarity); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("Accent", entry.transform, color), new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 4f), new Vector2(0f, -2f)); UiFactory.SetRect((Component)(object)UiFactory.CreateText("Index", entry.transform, $"{index + 1:00}", 14, (TextAnchor)3, UiFactory.AccentColor), new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(44f, 24f), new Vector2(34f, -24f)); RogueUiAssetLibrary.BindRarityModule(UiFactory.CreateRect("RarityModuleSlot", entry.transform, new Vector2(1f, 1f), new Vector2(1f, 1f), new Vector2(46f, 46f), new Vector2(-42f, -40f)).transform, card2.Rarity, out Image baseImage, out Image rarityGlow, out Image rarityAccent); UiFactory.Stretch((Component)(object)baseImage, 0f, 0f, 0f, 0f); UiFactory.Stretch((Component)(object)rarityGlow, -6f, -6f, -6f, -6f); UiFactory.Stretch((Component)(object)rarityAccent, 0f, 0f, 0f, 0f); Text obj = UiFactory.CreateText("Title", entry.transform, card2.Name, 18, (TextAnchor)3, UiFactory.TextColor); obj.resizeTextForBestFit = true; obj.resizeTextMinSize = 12; obj.resizeTextMaxSize = 18; UiFactory.SetRect((Component)(object)obj, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(-112f, 28f), new Vector2(84f, -24f)); Text obj2 = UiFactory.CreateText("Description", entry.transform, card2.Description, 12, (TextAnchor)0, UiFactory.TextColor); obj2.resizeTextForBestFit = true; obj2.resizeTextMinSize = 9; obj2.resizeTextMaxSize = 12; UiFactory.SetRect((Component)(object)obj2, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(-34f, 58f), new Vector2(17f, -88f)); UiFactory.SetRect((Component)(object)UiFactory.CreateText("Tags", entry.transform, (card2.Tags.Count == 0) ? "无标签" : string.Join(" / ", card2.Tags.Take(3)), 10, (TextAnchor)3, UiFactory.MutedTextColor), new Vector2(0f, 0f), new Vector2(1f, 0f), new Vector2(-34f, 22f), new Vector2(17f, 18f)); ((UnityEvent)entry.AddComponent<Button>().onClick).AddListener(UnityAction.op_Implicit((Action)delegate { Select(card2); })); EventTrigger trigger = entry.AddComponent<EventTrigger>(); AddTrigger(trigger, (EventTriggerType)0, delegate { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) entry.transform.localScale = Vector3.one * 1.018f; RogueUiAssetLibrary.SetRarityModuleState(rarityGlow, rarityAccent, highlighted: true, selected: false); }); AddTrigger(trigger, (EventTriggerType)1, delegate { //IL_000b: Unknown result type (might be due to invalid IL or missing references) entry.transform.localScale = Vector3.one; RogueUiAssetLibrary.SetRarityModuleState(rarityGlow, rarityAccent, highlighted: false, selected: false); }); } private void Select(RogueCard card) { Close(); _onSelected?.Invoke(card); } private void Close() { _panel.SetActive(false); _isVisible = false; } private static void AddTrigger(EventTrigger trigger, EventTriggerType type, Action<BaseEventData> callback) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown Entry val = new Entry { eventID = type }; ((UnityEvent<BaseEventData>)(object)val.callback).AddListener(UnityAction<BaseEventData>.op_Implicit(callback)); trigger.triggers.Add(val); } private static string DisplayRarity(string rarity) { return rarity.ToLowerInvariant() switch { "common" => "普通", "uncommon" => "优秀", "rare" => "稀有", "epic" => "史诗", "legendary" => "传说", "curse" => "腐化", "corrupted" => "腐化", _ => rarity, }; } } public sealed class CorruptionIntroPanel { private readonly GameObject _panel; private readonly Text _title; private readonly Text _body; private readonly Text _footer; private bool _isVisible; private float _hideAt = -1f; public CorruptionIntroPanel(Transform parent) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0195: 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_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) _panel = UiFactory.CreatePanel("CorruptionIntroPanel", parent, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(860f, 420f), new Vector2(0f, -40f)); _title = UiFactory.CreateText("CorruptionTitle", _panel.transform, "本局异变已确认", 28, (TextAnchor)3, UiFactory.DangerColor); UiFactory.SetRect((Component)(object)_title, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(-80f, 42f), new Vector2(42f, -42f)); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("CorruptionRule", _panel.transform, UiFactory.LineColor), new Vector2(0.5f, 1f), new Vector2(0.5f, 1f), new Vector2(780f, 2f), new Vector2(0f, -76f)); _body = UiFactory.CreateText("CorruptionBody", _panel.transform, string.Empty, 18, (TextAnchor)0, UiFactory.TextColor); _body.resizeTextForBestFit = true; _body.resizeTextMinSize = 13; _body.resizeTextMaxSize = 18; UiFactory.SetRect((Component)(object)_body, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(-84f, 260f), new Vector2(42f, -220f)); _footer = UiFactory.CreateText("CorruptionFooter", _panel.transform, "F4 查看 / 隐藏当前异变", 14, (TextAnchor)5, UiFactory.MutedTextColor); UiFactory.SetRect((Component)(object)_footer, new Vector2(0f, 0f), new Vector2(1f, 0f), new Vector2(-84f, 32f), new Vector2(42f, 34f)); _panel.SetActive(false); } public void Show(CorruptionCard[] cards, float durationSeconds) { _body.text = ((cards.Length == 0) ? "暂无已激活异变。" : string.Join(Environment.NewLine + Environment.NewLine, cards.Select((CorruptionCard card) => "[" + card.Name + "]\n" + card.Description))); _hideAt = ((durationSeconds > 0f) ? (Time.time + durationSeconds) : (-1f)); _panel.SetActive(true); _isVisible = true; } public void Toggle(CorruptionCard[] cards) { if (_isVisible) { Hide(); } else { Show(cards, 0f); } } public void Tick() { if (_isVisible && !(_hideAt < 0f) && !(Time.time < _hideAt)) { Hide(); } } private void Hide() { _panel.SetActive(false); _isVisible = false; _hideAt = -1f; } } public sealed class DebugOverlay { private readonly GameObject _panel; private readonly Text _text; private RogueState? _state; public DebugOverlay(Transform parent, bool enabled) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0077: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) _panel = UiFactory.CreatePanel("DebugOverlay", parent, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(360f, 112f), new Vector2(218f, -78f)); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("DebugAccent", _panel.transform, UiFactory.DangerColor), new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 2f), new Vector2(0f, -1f)); _text = UiFactory.CreateText("DebugText", _panel.transform, string.Empty, 13, (TextAnchor)0, UiFactory.TextColor); UiFactory.Stretch((Component)(object)_text, 14f, 8f, 12f, 8f); _panel.SetActive(enabled); } public void Refresh(RogueState state) { _state = state; Tick(); } public void Tick() { if (_state != null) { _text.text = "KAIN ROGUE PROTOCOL / PHASE 0\n" + $"SEED {_state.Seed}\n" + $"VERSION {_state.Version}\n" + $"CARDS {_state.SelectedCards.Count}"; } } public void SetVisible(bool visible) { _panel.SetActive(visible); } } public sealed class RewardChoicePanel { private const float ReferenceCardWidth = 768f; private const float ReferenceCardHeight = 1024f; private const float CardAspect = 0.75f; private const float GapRatio = 0.32f; private readonly GameObject _panel; private readonly GameObject[] _cards = (GameObject[])(object)new GameObject[3]; private readonly RectTransform[] _cardRects = (RectTransform[])(object)new RectTransform[3]; private readonly RectTransform[] _contentRoots = (RectTransform[])(object)new RectTransform[3]; private readonly Button[] _buttons = (Button[])(object)new Button[3]; private readonly Image[] _cardBodies = (Image[])(object)new Image[3]; private readonly Image[] _outerBorders = (Image[])(object)new Image[3]; private readonly Image[] _innerBorders = (Image[])(object)new Image[3]; private readonly Image[] _backgroundArts = (Image[])(object)new Image[3]; private readonly Image[] _glows = (Image[])(object)new Image[3]; private readonly Image[] _accentBars = (Image[])(object)new Image[3]; private readonly Image[] _rarityBaseImages = (Image[])(object)new Image[3]; private readonly Image[] _rarityGlowImages = (Image[])(object)new Image[3]; private readonly Image[] _rarityAccentImages = (Image[])(object)new Image[3]; private readonly Image[] _scanLines = (Image[])(object)new Image[3]; private readonly RectTransform[] _scanRects = (RectTransform[])(object)new RectTransform[3]; private readonly TextMeshProUGUI[] _keyTexts = (TextMeshProUGUI[])(object)new TextMeshProUGUI[3]; private readonly TextMeshProUGUI[] _titleTexts = (TextMeshProUGUI[])(object)new TextMeshProUGUI[3]; private readonly TextMeshProUGUI[] _descriptionTexts = (TextMeshProUGUI[])(object)new TextMeshProUGUI[3]; private readonly TextMeshProUGUI[] _tagTexts = (TextMeshProUGUI[])(object)new TextMeshProUGUI[3]; private readonly TextMeshProUGUI[] _footerTexts = (TextMeshProUGUI[])(object)new TextMeshProUGUI[3]; private readonly GameObject[][] _debugRects = new GameObject[3][]; private readonly Text _protocolStatsText; private readonly Text _centerStatusText; private readonly Text _mainTitle; private readonly Text _glitchTitle; private readonly Text _bottomPromptText; private RogueCard[] _activeCards = Array.Empty<RogueCard>(); private Action<RogueCard>? _onSelected; private bool _isVisible; private int _hoverIndex = 1; private float _nextGlitchAt; private float _glitchUntil; private int _selectedIndex = -1; private bool _layoutDebugVisible; public bool IsVisible => _isVisible; public RewardChoicePanel(Transform parent) { //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) _panel = UiFactory.CreateRect("RewardChoicePanel.VersionA", parent, Vector2.zero, Vector2.one, Vector2.zero, Vector2.zero); CreateBackground(); CreateTopStatusBar(out _protocolStatsText, out _centerStatusText); CreateHeader(out _mainTitle, out _glitchTitle); CreateSideDecor(); CreateBottomPrompt(out _bottomPromptText); GameObject val = UiFactory.CreateRect("RewardCardsRow", _panel.transform, Vector2.zero, Vector2.one, Vector2.zero, new Vector2(0f, -36f)); for (int i = 0; i < 3; i++) { CreateCard(val.transform, i); } _panel.SetActive(false); _isVisible = false; _nextGlitchAt = Time.time + 4f; } public void RefreshState(RogueState state) { _protocolStatsText.text = $"KAIN ROGUE PROTOCOL\nSEED {state.Seed}\nVERSION {state.Version}\nCARDS {state.SelectedCards.Count}"; _centerStatusText.text = ((state.SelectedCards.Count == 0) ? "KRP / NO ACTIVE CARDS" : ("KRP / ACTIVE CARDS " + state.SelectedCards.Count)); } public void Show(RogueCard[] cards, Action<RogueCard> onSelected) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) _activeCards = cards; _onSelected = onSelected; _hoverIndex = ((cards.Length > 1) ? 1 : 0); _selectedIndex = -1; _panel.SetActive(true); _isVisible = true; LayoutRewardCards(); for (int i = 0; i < _cards.Length; i++) { bool flag = i < cards.Length; _cards[i].SetActive(flag); if (flag) { RogueCard rogueCard = cards[i]; RogueUiAssetLibrary.RarityPrimaryColor(rogueCard.Rarity); Sprite cardBackground = RogueUiAssetLibrary.GetCardBackground(rogueCard); _backgroundArts[i].sprite = cardBackground; ((Graphic)_backgroundArts[i]).color = (Color)(((Object)(object)cardBackground == (Object)null) ? new Color(0f, 0f, 0f, 0f) : Color.white); RogueUiAssetLibrary.SetRarityModuleSprites(_rarityBaseImages[i], _rarityGlowImages[i], _rarityAccentImages[i], rogueCard.Rarity); ((Graphic)_accentBars[i]).color = new Color(0f, 0f, 0f, 0f); ((TMP_Text)_keyTexts[i]).text = $"[{i + 1}]"; ((TMP_Text)_titleTexts[i]).text = rogueCard.Name; ((TMP_Text)_descriptionTexts[i]).text = rogueCard.Description; ((TMP_Text)_tagTexts[i]).text = ((rogueCard.Tags.Count == 0) ? "未分类" : string.Join(" / ", rogueCard.Tags.Take(4))); ((TMP_Text)_footerTexts[i]).text = $"PRESS [{i + 1}] TO SELECT"; SetCardVisual(i, i == _hoverIndex, selected: false); } } _bottomPromptText.text = "数字键 1-3 或鼠标点击选择奖励 / REWARD SELECTION REQUIRED"; _panel.SetActive(true); _isVisible = true; } public void Tick() { if (_isVisible) { if (Input.GetKeyDown((KeyCode)49) || Input.GetKeyDown((KeyCode)257)) { Select(0); } else if (Input.GetKeyDown((KeyCode)50) || Input.GetKeyDown((KeyCode)258)) { Select(1); } else if (Input.GetKeyDown((KeyCode)51) || Input.GetKeyDown((KeyCode)259)) { Select(2); } else if (Input.GetKeyDown((KeyCode)27)) { _bottomPromptText.text = "REWARD SELECTION REQUIRED"; } else if (Input.GetKeyDown((KeyCode)291)) { SetLayoutDebugVisible(!_layoutDebugVisible); } LayoutRewardCards(); TickCards(); TickGlitchTitle(); } } private void CreateBackground() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_016d: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: 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_0216: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) UiFactory.Stretch((Component)(object)UiFactory.CreateImage("DimmerFullScreen", _panel.transform, new Color(0f, 0.006f, 0.007f, 0.82f)), 0f, 0f, 0f, 0f); for (int i = 0; i < 28; i++) { int num = -520 + i * 40; UiFactory.SetRect((Component)(object)UiFactory.CreateImage($"HorizontalScanline_{i:00}", _panel.transform, new Color(0.58f, 0.9f, 0.86f, (i % 3 == 0) ? 0.045f : 0.018f)), new Vector2(0f, 0.5f), new Vector2(1f, 0.5f), new Vector2(0f, 1f), new Vector2(0f, (float)num)); } for (int j = 0; j < 9; j++) { UiFactory.SetRect((Component)(object)UiFactory.CreateImage($"RedWarningMark_{j:00}", _panel.transform, new Color(0.9f, 0.03f, 0.02f, 0.24f)), new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2((float)(120 + j * 11), 3f), new Vector2((float)(110 + j * 175), (float)(-94 - j % 3 * 22))); } UiFactory.SetRect((Component)(object)UiFactory.CreateImage("BottomVignette", _panel.transform, new Color(0f, 0f, 0f, 0.44f)), new Vector2(0f, 0f), new Vector2(1f, 0f), new Vector2(0f, 170f), new Vector2(0f, 74f)); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("TopVignette", _panel.transform, new Color(0f, 0f, 0f, 0.35f)), new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 160f), new Vector2(0f, -80f)); } private void CreateTopStatusBar(out Text protocolStatsText, out Text centerStatusText) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0117: 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_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) GameObject val = UiFactory.CreatePanel("TopStatusBar", _panel.transform, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 100f), new Vector2(0f, -50f)); ((Graphic)val.GetComponent<Image>()).color = new Color(0f, 0f, 0f, 0.72f); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("TopRedRule", val.transform, new Color(0.93f, 0.03f, 0.02f, 0.82f)), new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 2f), new Vector2(0f, -8f)); protocolStatsText = UiFactory.CreateText("ProtocolStats", val.transform, "KAIN ROGUE PROTOCOL\nSEED 0\nVERSION 0\nCARDS 0", 13, (TextAnchor)0, Color.white); protocolStatsText.lineSpacing = 0.9f; UiFactory.SetRect((Component)(object)protocolStatsText, new Vector2(0f, 0.5f), new Vector2(0f, 0.5f), new Vector2(330f, 72f), new Vector2(198f, -8f)); centerStatusText = UiFactory.CreateText("CenterStatusText", val.transform, "KRP / NO ACTIVE CARDS", 18, (TextAnchor)4, UiFactory.MutedTextColor); UiFactory.SetRect((Component)(object)centerStatusText, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(640f, 38f), new Vector2(0f, -4f)); UiFactory.SetRect((Component)(object)UiFactory.CreateText("ExitTerminal", val.transform, "退出", 23, (TextAnchor)4, Color.white), new Vector2(1f, 0.5f), new Vector2(1f, 0.5f), new Vector2(170f, 42f), new Vector2(-118f, -2f)); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("ExitFrame", val.transform, new Color(1f, 1f, 1f, 0.12f)), new Vector2(1f, 0.5f), new Vector2(1f, 0.5f), new Vector2(180f, 2f), new Vector2(-118f, -29f)); } private void CreateHeader(out Text mainTitle, out Text glitchTitle) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_014b: 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_0181: 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_019f: 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_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) mainTitle = UiFactory.CreateText("MainTitle", _panel.transform, "<color=#8FDCFF>Kain</color> ROGUE PROTOCOL", 34, (TextAnchor)4, UiFactory.AccentColor); mainTitle.fontStyle = (FontStyle)1; UiFactory.SetRect((Component)(object)mainTitle, new Vector2(0.5f, 1f), new Vector2(0.5f, 1f), new Vector2(740f, 48f), new Vector2(0f, -175f)); glitchTitle = UiFactory.CreateText("MainTitleGlitchRed", _panel.transform, "<color=#8FDCFF>Kain</color> ROGUE PROTOCOL", 34, (TextAnchor)4, new Color(0.9f, 0.04f, 0.02f, 0f)); glitchTitle.fontStyle = (FontStyle)1; UiFactory.SetRect((Component)(object)glitchTitle, new Vector2(0.5f, 1f), new Vector2(0.5f, 1f), new Vector2(740f, 48f), new Vector2(0f, -175f)); UiFactory.SetRect((Component)(object)UiFactory.CreateText("SubtitleCN", _panel.transform, "多线程入侵协议 · 卡牌奖励选择", 16, (TextAnchor)4, UiFactory.TextColor), new Vector2(0.5f, 1f), new Vector2(0.5f, 1f), new Vector2(680f, 24f), new Vector2(0f, -214f)); UiFactory.SetRect((Component)(object)UiFactory.CreateText("SubtitleEN", _panel.transform, "SELECT ONE REWARD TO ADD TO YOUR PROTOCOL", 13, (TextAnchor)4, UiFactory.MutedTextColor), new Vector2(0.5f, 1f), new Vector2(0.5f, 1f), new Vector2(680f, 22f), new Vector2(0f, -238f)); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("HeaderRuleLeft", _panel.transform, UiFactory.LineColor), new Vector2(0.5f, 1f), new Vector2(0.5f, 1f), new Vector2(380f, 1f), new Vector2(-530f, -220f)); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("HeaderRuleRight", _panel.transform, UiFactory.LineColor), new Vector2(0.5f, 1f), new Vector2(0.5f, 1f), new Vector2(380f, 1f), new Vector2(530f, -220f)); } private void CreateSideDecor() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) GameObject val = UiFactory.CreatePanel("SideMenuLeft", _panel.transform, new Vector2(0f, 0.5f), new Vector2(0f, 0.5f), new Vector2(210f, 420f), new Vector2(124f, -78f)); ((Graphic)val.GetComponent<Image>()).color = new Color(0f, 0f, 0f, 0.34f); Text obj = UiFactory.CreateText("SideMenuText", val.transform, "REWARD\nSELECTION\n\n01 CARD POOL\n02 ACTIVE BUFFS\n03 CORRUPTION\n04 EXIT LOCKED", 12, (TextAnchor)0, UiFactory.MutedTextColor); obj.lineSpacing = 1.15f; UiFactory.Stretch((Component)(object)obj, 22f, 20f, 18f, 20f); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("SideMenuAccent", val.transform, UiFactory.AccentColor), new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(3f, 82f), new Vector2(14f, -58f)); } private void CreateBottomPrompt(out Text prompt) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) GameObject val = UiFactory.CreatePanel("BottomPromptBar", _panel.transform, new Vector2(0.5f, 0f), new Vector2(0.5f, 0f), new Vector2(980f, 54f), new Vector2(0f, 58f)); ((Graphic)val.GetComponent<Image>()).color = new Color(0f, 0f, 0f, 0.58f); prompt = UiFactory.CreateText("BottomPromptText", val.transform, "数字键 1-3 或鼠标点击选择奖励", 15, (TextAnchor)4, UiFactory.TextColor); UiFactory.Stretch((Component)(object)prompt, 24f, 6f, 24f, 6f); } private void CreateCard(Transform parent, int index) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_0651: Unknown result type (might be due to invalid IL or missing references) //IL_0689: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_072e: Unknown result type (might be due to invalid IL or missing references) //IL_073d: Unknown result type (might be due to invalid IL or missing references) //IL_074c: Unknown result type (might be due to invalid IL or missing references) //IL_075b: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) _cards[index] = UiFactory.CreateCard($"RewardCard_{index + 1}", parent); _cardRects[index] = _cards[index].GetComponent<RectTransform>(); UiFactory.SetRect((Component)(object)_cardRects[index], new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(384f, 512f), Vector2.zero); Outline component = _cards[index].GetComponent<Outline>(); if ((Object)(object)component != (Object)null) { ((Shadow)component).effectColor = new Color(0f, 0f, 0f, 0f); } _cardBodies[index] = _cards[index].GetComponent<Image>(); ((Graphic)_cardBodies[index]).color = new Color(0f, 0f, 0f, 0f); _buttons[index] = _cards[index].AddComponent<Button>(); int capturedIndex = index; ((UnityEvent)_buttons[index].onClick).AddListener(UnityAction.op_Implicit((Action)delegate { Select(capturedIndex); })); AddPointerCallbacks(_cards[index], capturedIndex); _backgroundArts[index] = UiFactory.CreateImage("CardBackgroundArt", _cards[index].transform, Color.white); UiFactory.Stretch((Component)(object)_backgroundArts[index], 0f, 0f, 0f, 0f); ((Graphic)_backgroundArts[index]).raycastTarget = false; GameObject val = UiFactory.CreateRect("CardContentRoot", _cards[index].transform, Vector2.zero, Vector2.one, Vector2.zero, Vector2.zero); _contentRoots[index] = val.GetComponent<RectTransform>(); _glows[index] = UiFactory.CreateImage("RarityGlow", _cards[index].transform, new Color(1f, 1f, 1f, 0.08f)); UiFactory.Stretch((Component)(object)_glows[index], -8f, -8f, -8f, -8f); _outerBorders[index] = UiFactory.CreateImage("CardBorderOuter", _cards[index].transform, new Color(0f, 0f, 0f, 0f)); UiFactory.SetRect((Component)(object)_outerBorders[index], new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 4f), new Vector2(0f, -2f)); _innerBorders[index] = UiFactory.CreateImage("CardBorderInner", _cards[index].transform, new Color(0f, 0f, 0f, 0f)); UiFactory.Stretch((Component)(object)_innerBorders[index], 12f, 12f, 12f, 12f); _accentBars[index] = UiFactory.CreateImage("RarityAccentBar", _cards[index].transform, new Color(0f, 0f, 0f, 0f)); UiFactory.SetRect((Component)(object)_accentBars[index], new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 5f), new Vector2(0f, -2f)); GameObject obj = UiFactory.CreateRect("CardRarityModuleSlot", val.transform, Vector2.zero, Vector2.one, Vector2.zero, Vector2.zero); ApplyTopLeftNormalizedRect(obj.GetComponent<RectTransform>(), new Rect(0.088f, 0.06f, 0.15f, 0.125f)); RogueUiAssetLibrary.BindRarityModule(obj.transform, "common", out _rarityBaseImages[index], out _rarityGlowImages[index], out _rarityAccentImages[index]); UiFactory.Stretch((Component)(object)_rarityBaseImages[index], 0f, 0f, 0f, 0f); UiFactory.Stretch((Component)(object)_rarityGlowImages[index], -8f, -8f, -8f, -8f); UiFactory.Stretch((Component)(object)_rarityAccentImages[index], 0f, 0f, 0f, 0f); _keyTexts[index] = UiFactory.CreateTmpText("KeyText", val.transform, $"[{index + 1}]", 24f, (TextAlignmentOptions)514, UiFactory.AccentColor); ((TMP_Text)_keyTexts[index]).fontStyle = (FontStyles)1; ConfigureTmp(_keyTexts[index], wrap: false, 18f, 28f); ApplyTopLeftNormalizedRect(((TMP_Text)_keyTexts[index]).rectTransform, new Rect(0.07f, 0.855f, 0.09f, 0.045f)); _titleTexts[index] = UiFactory.CreateTmpText("CardName", val.transform, string.Empty, 34f, (TextAlignmentOptions)514, UiFactory.TextColor); ((TMP_Text)_titleTexts[index]).fontStyle = (FontStyles)1; ConfigureTmp(_titleTexts[index], wrap: false, 24f, 36f); ApplyTopLeftNormalizedRect(((TMP_Text)_titleTexts[index]).rectTransform, new Rect(0.225f, 0.078f, 0.68f, 0.105f)); _descriptionTexts[index] = UiFactory.CreateTmpText("DescriptionText", val.transform, string.Empty, 20f, (TextAlignmentOptions)514, UiFactory.TextColor); ConfigureTmp(_descriptionTexts[index], wrap: true, 14f, 22f); ((TMP_Text)_descriptionTexts[index]).lineSpacing = -8f; ApplyTopLeftNormalizedRect(((TMP_Text)_descriptionTexts[index]).rectTransform, new Rect(0.13f, 0.68f, 0.74f, 0.13f)); _tagTexts[index] = UiFactory.CreateTmpText("TagRow", val.transform, string.Empty, 16f, (TextAlignmentOptions)514, UiFactory.MutedTextColor); ConfigureTmp(_tagTexts[index], wrap: false, 11f, 18f); ApplyTopLeftNormalizedRect(((TMP_Text)_tagTexts[index]).rectTransform, new Rect(0.17f, 0.832f, 0.66f, 0.055f)); _footerTexts[index] = UiFactory.CreateTmpText("FooterPrompt", val.transform, $"PRESS [{index + 1}] TO SELECT", 16f, (TextAlignmentOptions)514, UiFactory.MutedTextColor); ConfigureTmp(_footerTexts[index], wrap: false, 11f, 18f); ApplyTopLeftNormalizedRect(((TMP_Text)_footerTexts[index]).rectTransform, new Rect(0.245f, 0.923f, 0.51f, 0.045f)); CreateLayoutDebugRects(index, val.transform); _scanLines[index] = UiFactory.CreateImage("HoverScanline", _cards[index].transform, new Color(1f, 1f, 1f, 0f)); UiFactory.SetRect((Component)(object)_scanLines[index], new Vector2(0f, 0.5f), new Vector2(1f, 0.5f), new Vector2(-36f, 34f), new Vector2(18f, 0f)); _scanRects[index] = ((Component)_scanLines[index]).GetComponent<RectTransform>(); } private void AddPointerCallbacks(GameObject target, int index) { EventTrigger trigger = target.AddComponent<EventTrigger>(); AddTrigger(trigger, (EventTriggerType)0, delegate { _hoverIndex = index; }); AddTrigger(trigger, (EventTriggerType)1, delegate { if (_hoverIndex == index) { _hoverIndex = -1; } }); } private static void AddTrigger(EventTrigger trigger, EventTriggerType type, Action<BaseEventData> callback) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown Entry val = new Entry { eventID = type }; ((UnityEvent<BaseEventData>)(object)val.callback).AddListener(UnityAction<BaseEventData>.op_Implicit(callback)); trigger.triggers.Add(val); } private void TickCards() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < _activeCards.Length && i < _cards.Length; i++) { bool flag = i == _hoverIndex || _selectedIndex == i; SetCardVisual(i, flag, _selectedIndex == i); UpdateCardTypography(i); float num = (flag ? 145f : 58f); Rect rect = _cardRects[i].rect; float num2 = Mathf.Max(1f, ((Rect)(ref rect)).height); float num3 = Mathf.Repeat(Time.time * num + (float)i * 80f, num2) - num2 * 0.5f; _scanRects[i].anchoredPosition = new Vector2(18f, num3); } } private void TickGlitchTitle() { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) float time = Time.time; if (time >= _nextGlitchAt) { _glitchUntil = time + 0.12f; _nextGlitchAt = time + Random.Range(3.5f, 6.5f); } if (time < _glitchUntil) { ((Graphic)_glitchTitle).color = new Color(0.95f, 0.03f, 0.02f, 0.45f); ((Graphic)_glitchTitle).rectTransform.anchoredPosition = new Vector2(Random.Range(-4f, 4f), -175f); } else { ((Graphic)_glitchTitle).color = new Color(0.95f, 0.03f, 0.02f, 0f); ((Graphic)_glitchTitle).rectTransform.anchoredPosition = new Vector2(0f, -175f); } } private void SetCardVisual(int index, bool highlighted, bool selected) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: 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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) if (index >= 0 && index < _activeCards.Length) { Color color = RogueUiAssetLibrary.RarityPrimaryColor(_activeCards[index].Rarity); Mathf.Sin(Time.time * 3.2f + (float)index); float num = 0f; float alpha = 0f; if (selected) { num = 0f; alpha = 0f; } ((Graphic)_cardBodies[index]).color = new Color(0f, 0f, 0f, 0f); ((Graphic)_accentBars[index]).color = new Color(0f, 0f, 0f, 0f); ((Graphic)_outerBorders[index]).color = WithAlpha(color, num); ((Graphic)_innerBorders[index]).color = WithAlpha(color, num * 0.32f); ((Graphic)_glows[index]).color = WithAlpha(color, alpha); RogueUiAssetLibrary.SetRarityModuleState(_rarityGlowImages[index], _rarityAccentImages[index], highlighted, selected); ((Graphic)_scanLines[index]).color = new Color(1f, 1f, 1f, 0f); _cards[index].transform.localScale = Vector3.one * (highlighted ? 1.025f : 1f); } } private void LayoutRewardCards() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) RectTransform component = _panel.GetComponent<RectTransform>(); Rect rect = component.rect; float num = Mathf.Max(1280f, ((Rect)(ref rect)).width); rect = component.rect; float num2 = Mathf.Max(720f, ((Rect)(ref rect)).height); float num3 = num * 0.86f; float num4 = num2 * 0.78f; float num5 = Mathf.Min(num3 / 3.6399999f / 0.75f, num4); float num6 = num5 * 0.75f; float num7 = num6 * 0.32f; float num8 = (0f - (3f * num6 + 2f * num7)) * 0.5f + num6 * 0.5f; float num9 = (0f - num2) * 0.075f; for (int i = 0; i < _cardRects.Length; i++) { RectTransform obj = _cardRects[i]; obj.anchorMin = new Vector2(0.5f, 0.5f); obj.anchorMax = new Vector2(0.5f, 0.5f); obj.pivot = new Vector2(0.5f, 0.5f); obj.SetSizeWithCurrentAnchors((Axis)0, num6); obj.SetSizeWithCurrentAnchors((Axis)1, num5); obj.anchoredPosition = new Vector2(num8 + (float)i * (num6 + num7), num9); UpdateCardTypography(i); } } private void UpdateCardTypography(int index) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) Rect rect = _cardRects[index].rect; float scale = Mathf.Max(0.25f, ((Rect)(ref rect)).height / 1024f); ApplyFontScale(_titleTexts[index], 34f, 24f, 36f, scale); ApplyFontScale(_tagTexts[index], 16f, 11f, 18f, scale); ApplyFontScale(_descriptionTexts[index], 20f, 14f, 22f, scale); ApplyFontScale(_footerTexts[index], 16f, 11f, 18f, scale); ApplyFontScale(_keyTexts[index], 24f, 18f, 28f, scale); } private static void ApplyFontScale(TextMeshProUGUI text, float size, float min, float max, float scale) { ((TMP_Text)text).fontSize = size * scale; ((TMP_Text)text).fontSizeMin = min * scale; ((TMP_Text)text).fontSizeMax = max * scale; } private static void ConfigureTmp(TextMeshProUGUI text, bool wrap, float minSize, float maxSize) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) ((TMP_Text)text).enableAutoSizing = true; ((TMP_Text)text).fontSizeMin = minSize; ((TMP_Text)text).fontSizeMax = maxSize; ((TMP_Text)text).enableWordWrapping = wrap; ((TMP_Text)text).overflowMode = (TextOverflowModes)1; ((TMP_Text)text).alignment = (TextAlignmentOptions)514; ((TMP_Text)text).margin = Vector4.zero; } private static void ApplyTopLeftNormalizedRect(RectTransform target, Rect normalized) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) target.anchorMin = new Vector2(((Rect)(ref normalized)).x, 1f - ((Rect)(ref normalized)).y - ((Rect)(ref normalized)).height); target.anchorMax = new Vector2(((Rect)(ref normalized)).x + ((Rect)(ref normalized)).width, 1f - ((Rect)(ref normalized)).y); target.offsetMin = Vector2.zero; target.offsetMax = Vector2.zero; target.pivot = new Vector2(0.5f, 0.5f); target.anchoredPosition = Vector2.zero; target.sizeDelta = Vector2.zero; } private void CreateLayoutDebugRects(int index, Transform contentRoot) { //IL_0022: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: 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) GameObject[] array = (GameObject[])(object)new GameObject[6] { CreateDebugRect("DebugRarity", contentRoot, new Rect(0.088f, 0.06f, 0.15f, 0.125f), new Color(1f, 0.62f, 0f, 0.22f)), CreateDebugRect("DebugTitle", contentRoot, new Rect(0.225f, 0.078f, 0.68f, 0.105f), new Color(1f, 0.05f, 0.05f, 0.2f)), CreateDebugRect("DebugTags", contentRoot, new Rect(0.17f, 0.832f, 0.66f, 0.055f), new Color(0.25f, 1f, 0.05f, 0.2f)), CreateDebugRect("DebugDescription", contentRoot, new Rect(0.13f, 0.68f, 0.74f, 0.13f), new Color(1f, 0.25f, 0.25f, 0.18f)), CreateDebugRect("DebugSelect", contentRoot, new Rect(0.245f, 0.923f, 0.51f, 0.045f), new Color(1f, 1f, 1f, 0.2f)), CreateDebugRect("DebugKey", contentRoot, new Rect(0.07f, 0.855f, 0.09f, 0.045f), new Color(1f, 1f, 1f, 0.2f)) }; _debugRects[index] = array; GameObject[] array2 = array; for (int i = 0; i < array2.Length; i++) { array2[i].SetActive(_layoutDebugVisible); } } private static GameObject CreateDebugRect(string name, Transform parent, Rect normalized, Color color) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) Image obj = UiFactory.CreateImage(name, parent, color); ((Graphic)obj).raycastTarget = false; ApplyTopLeftNormalizedRect(((Graphic)obj).rectTransform, normalized); return ((Component)obj).gameObject; } private void SetLayoutDebugVisible(bool visible) { _layoutDebugVisible = visible; GameObject[][] debugRects = _debugRects; foreach (GameObject[] array in debugRects) { if (array != null) { GameObject[] array2 = array; for (int j = 0; j < array2.Length; j++) { array2[j].SetActive(visible); } } } } private void Select(int index) { if (index >= 0 && index < _activeCards.Length && _onSelected != null && _selectedIndex < 0) { _selectedIndex = index; RogueCard obj = _activeCards[index]; _panel.SetActive(false); _isVisible = false; _onSelected(obj); } } private static Color WithAlpha(Color color, float alpha) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) color.a = alpha; return color; } private static string DisplayRarity(string rarity) { return rarity.ToLowerInvariant() switch { "common" => "普通", "uncommon" => "优秀", "rare" => "稀有", "epic" => "史诗", "legendary" => "传说", "curse" => "腐化", "corrupted" => "腐化", _ => rarity, }; } } public sealed class RogueHudRoot { private readonly bool _debugEnabled; private readonly bool _persistentUiDefault; private RewardChoicePanel? _rewardPanel; private CardPoolPanel? _cardPoolPanel; private CorruptionIntroPanel? _corruptionPanel; private BuffBar? _buffBar; private RuntimeStatusPanel? _runtimeStatusPanel; private DebugOverlay? _debugOverlay; private GameObject? _root; private bool _persistentUiVisible; private bool _hasCursorCapture; private bool _previousCursorVisible; private CursorLockMode _previousCursorLockState; public RogueHudRoot(bool debugEnabled, bool persistentUiDefault) { _debugEnabled = debugEnabled; _persistentUiDefault = persistentUiDefault; _persistentUiVisible = persistentUiDefault; } public void Create() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) _root = new GameObject("KainRogueProtocol.HudRoot"); Object.DontDestroyOnLoad((Object)(object)_root); Canvas obj = _root.AddComponent<Canvas>(); obj.renderMode = (RenderMode)0; obj.sortingOrder = 30000; CanvasScaler obj2 = _root.AddComponent<CanvasScaler>(); obj2.uiScaleMode = (ScaleMode)1; obj2.referenceResolution = new Vector2(1920f, 1080f); obj2.matchWidthOrHeight = 0.5f; _root.AddComponent<GraphicRaycaster>(); EnsureEventSystem(); _rewardPanel = new RewardChoicePanel(_root.transform); _cardPoolPanel = new CardPoolPanel(_root.transform); _corruptionPanel = new CorruptionIntroPanel(_root.transform); _buffBar = new BuffBar(_root.transform); _runtimeStatusPanel = new RuntimeStatusPanel(_root.transform); _debugOverlay = new DebugOverlay(_root.transform, _debugEnabled); SetPersistentUiVisible(_persistentUiDefault); RogueLogger.Info("Created Phase 0 UI root."); } public void ShowRewards(RogueCard[] cards, Action<RogueCard> onSelected) { _rewardPanel?.Show(cards, onSelected); } public void ShowCardPool(RogueCard[] cards, Action<RogueCard> onSelected) { _cardPoolPanel?.Show(cards, onSelected); } public void ShowCorruptions(CorruptionCard[] cards, float durationSeconds) { _corruptionPanel?.Show(cards, durationSeconds); } public void ToggleCorruptions(CorruptionCard[] cards) { _corruptionPanel?.Toggle(cards); } public void RefreshState(RogueState state) { _rewardPanel?.RefreshState(state); _buffBar?.Refresh(state); _debugOverlay?.Refresh(state); } public void Tick() { _rewardPanel?.Tick(); _cardPoolPanel?.Tick(); _corruptionPanel?.Tick(); _runtimeStatusPanel?.Tick(); _debugOverlay?.Tick(); UpdateCursorCapture(); } public void LateTick() { UpdateCursorCapture(); } public void ReleaseCursorCapture() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (_hasCursorCapture) { Cursor.visible = _previousCursorVisible; Cursor.lockState = _previousCursorLockState; _hasCursorCapture = false; } } public void TogglePersistentUi() { SetPersistentUiVisible(!_persistentUiVisible); } private void SetPersistentUiVisible(bool visible) { _persistentUiVisible = visible; _buffBar?.SetVisible(visible); _runtimeStatusPanel?.SetVisible(visible); _debugOverlay?.SetVisible(visible && _debugEnabled); } private void UpdateCursorCapture() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) RewardChoicePanel? rewardPanel = _rewardPanel; bool num = (rewardPanel != null && rewardPanel.IsVisible) || (_cardPoolPanel?.IsVisible ?? false); RogueInputBlocker.BlockGameplayInput = num; RogueModalCursorGuard.SetModalActive(num); if (num) { if (!_hasCursorCapture) { _previousCursorVisible = Cursor.visible; _previousCursorLockState = Cursor.lockState; _hasCursorCapture = true; RogueLogger.Info($"KRP modal UI captured cursor. PreviousVisible={_previousCursorVisible}, PreviousLock={_previousCursorLockState}."); } Cursor.lockState = (CursorLockMode)0; Cursor.visible = true; } else { ReleaseCursorCapture(); } } private static void EnsureEventSystem() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) EventSystem val = Object.FindObjectOfType<EventSystem>(); if ((Object)(object)val != (Object)null) { if ((Object)(object)((Component)val).GetComponent<StandaloneInputModule>() == (Object)null) { ((Component)val).gameObject.AddComponent<StandaloneInputModule>(); RogueLogger.Info("Attached StandaloneInputModule to existing EventSystem."); } ((Behaviour)val).enabled = true; } else { GameObject val2 = new GameObject("KainRogueProtocol.EventSystem"); Object.DontDestroyOnLoad((Object)val2); val2.AddComponent<EventSystem>(); val2.AddComponent<StandaloneInputModule>(); } } } internal static class RogueUiAssetLibrary { private static readonly Dictionary<string, Sprite?> SpriteCache = new Dictionary<string, Sprite>(StringComparer.OrdinalIgnoreCase); public static Sprite? GetCardBackground(RogueCard card) { string cardBackgroundPath = GetCardBackgroundPath(card); if (!string.IsNullOrWhiteSpace(cardBackgroundPath)) { return LoadSprite(cardBackgroundPath); } return null; } public static void BindRarityModule(Transform parent, string rarity, out Image baseImage, out Image glowImage, out Image accentImage) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) baseImage = UiFactory.CreateImage("RarityBaseImage", parent, Color.white); glowImage = UiFactory.CreateImage("RarityGlowImage", parent, Color.white); accentImage = UiFactory.CreateImage("RarityAccentImage", parent, Color.white); SetRarityModuleSprites(baseImage, glowImage, accentImage, rarity); baseImage.preserveAspect = true; glowImage.preserveAspect = true; accentImage.preserveAspect = true; ((Graphic)baseImage).raycastTarget = false; ((Graphic)glowImage).raycastTarget = false; ((Graphic)accentImage).raycastTarget = false; SetRarityModuleState(glowImage, accentImage, highlighted: false, selected: false); } public static void SetRarityModuleSprites(Image? baseImage, Image? glowImage, Image? accentImage, string rarity) { string text = NormalizeRarity(rarity); if ((Object)(object)baseImage != (Object)null) { baseImage.sprite = LoadSprite("Custom/KainRogueProtocol/UI/rarity_modules/" + text + "/png256/rarity_module_" + text + "_base_256.png"); SetImageAlpha(baseImage, 1f); } if ((Object)(object)glowImage != (Object)null) { glowImage.sprite = LoadSprite("Custom/KainRogueProtocol/UI/rarity_modules/" + text + "/png256/rarity_module_" + text + "_glow_256.png"); } if ((Object)(object)accentImage != (Object)null) { accentImage.sprite = LoadSprite("Custom/KainRogueProtocol/UI/rarity_modules/" + text + "/png256/rarity_module_" + text + "_accent_256.png"); } } public static void SetRarityModuleState(Image? glowImage, Image? accentImage, bool highlighted, bool selected) { float num = 0.5f + Mathf.Sin(Time.time * 2.25f) * 0.5f; float alpha = (selected ? 1f : (highlighted ? (0.64f + num * 0.12f) : 0.35f)); float alpha2 = (selected ? 0.85f : (highlighted ? (0.4f + num * 0.1f) : 0.18f)); SetImageAlpha(glowImage, alpha); SetImageAlpha(accentImage, alpha2); } public static Color RarityPrimaryColor(string rarity) { //IL_0044: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) return (Color)(NormalizeRarity(rarity) switch { "rare" => new Color(0f, 0.83f, 1f, 1f), "epic" => new Color(1f, 0.71f, 0.18f, 1f), "legendary" => new Color(1f, 0.2f, 0.2f, 1f), _ => new Color(0.9f, 0.9f, 0.9f, 1f), }); } private static string NormalizeRarity(string rarity) { return rarity.ToLowerInvariant() switch { "rare" => "rare", "epic" => "epic", "legendary" => "legendary", _ => "common", }; } private static string? GetCardBackgroundPath(RogueCard card) { string text = card.PersistentID switch { 100301 => "Custom/KainRogueProtocol/UI/card_backgrounds/batch02_1086x1448/cold_blade_rhythm_background.png", 100302 => "Custom/KainRogueProtocol/UI/card_backgrounds/batch02_1086x1448/stable_formation_background.png", 100303 => "Custom/KainRogueProtocol/UI/card_backgrounds/batch02_1086x1448/defense_calibration_background.png", 100304 => "Custom/KainRogueProtocol/UI/card_backgrounds/runtime_768x1024/chamber_prime_background.png", 100305 => "Custom/KainRogueProtocol/UI/card_backgrounds/batch02_1086x1448/bullet_tax_background.png", 100312 => "Custom/KainRogueProtocol/UI/card_backgrounds/runtime_768x1024/backstab_protocol_background.png", 100313 => "Custom/KainRogueProtocol/UI/card_backgrounds/runtime_768x1024/precision_recycle_background.png", 100316 => "Custom/KainRogueProtocol/UI/card_backgrounds/batch01_1086x1448/StressResponse.png", 100317 => "Custom/KainRogueProtocol/UI/card_backgrounds/batch01_1086x1448/MutualSupply.png", _ => null, }; if (!string.IsNullOrWhiteSpace(text)) { return text; } if (card.Effects.Any((RogueCardEffect effect) => string.Equals(effect.Type, "CoordinatedHeavyStrike", StringComparison.OrdinalIgnoreCase))) { return "Custom/KainRogueProtocol/UI/card_backgrounds/batch01_1086x1448/CoordinatedHeavyStrike.png"; } return null; } private static Sprite? LoadSprite(string relativePath) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) if (SpriteCache.TryGetValue(relativePath, out Sprite value)) { return value; } try { string path = ResolvePluginPath(relativePath); if (!File.Exists(path)) { SpriteCache[relativePath] = null; return null; } Texture2D val = new Texture2D(2, 2, (TextureFormat)4, false); if (!ImageConversion.LoadImage(val, Il2CppStructArray<byte>.op_Implicit(File.ReadAllBytes(path)), false)) { Object.Destroy((Object)(object)val); SpriteCache[relativePath] = null; return null; } ((Texture)val).wrapMode = (TextureWrapMode)1; Sprite val2 = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), 100f); SpriteCache[relativePath] = val2; return val2; } catch { SpriteCache[relativePath] = null; return null; } } private static string ResolvePluginPath(string relativePath) { string location = typeof(RogueUiAssetLibrary).Assembly.Location; return Path.GetFullPath(Path.Combine(string.IsNullOrWhiteSpace(location) ? Paths.PluginPath : (Path.GetDirectoryName(location) ?? Paths.PluginPath), relativePath.Replace('/', Path.DirectorySeparatorChar))); } private static void SetImageAlpha(Image? image, float alpha) { //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_001a: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)image == (Object)null)) { Color color = ((Graphic)image).color; color.a = alpha; ((Graphic)image).color = color; } } } public sealed class RuntimeStatusPanel { private readonly GameObject _panel; private readonly Text _text; public RuntimeStatusPanel(Transform parent) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0077: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) _panel = UiFactory.CreatePanel("RuntimeStatusPanel", parent, new Vector2(0.5f, 1f), new Vector2(0.5f, 1f), new Vector2(680f, 30f), new Vector2(0f, -83f)); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("RuntimeStatusAccent", _panel.transform, UiFactory.AccentColor), new Vector2(0f, 0.5f), new Vector2(0f, 0.5f), new Vector2(4f, 18f), new Vector2(18f, 0f)); _text = UiFactory.CreateText("RuntimeStatusText", _panel.transform, string.Empty, 13, (TextAnchor)4, UiFactory.TextColor); _text.resizeTextForBestFit = true; _text.resizeTextMinSize = 10; _text.resizeTextMaxSize = 13; UiFactory.Stretch((Component)(object)_text, 30f, 3f, 12f, 3f); } public void Tick() { _text.text = RogueGameplayRuntime.GetRuntimeStatusText(Time.time); } public void SetVisible(bool visible) { _panel.SetActive(visible); } } public static class UiFactory { public static readonly Color PanelColor = new Color(0.015f, 0.018f, 0.016f, 0.88f); public static readonly Color CardColor = new Color(0.035f, 0.052f, 0.048f, 0.94f); public static readonly Color CardInnerColor = new Color(0.055f, 0.075f, 0.068f, 0.62f); public static readonly Color AccentColor = new Color(0.95f, 0.62f, 0.12f, 1f); public static readonly Color DangerColor = new Color(0.82f, 0.08f, 0.05f, 1f); public static readonly Color TextColor = new Color(0.86f, 0.94f, 0.88f, 1f); public static readonly Color MutedTextColor = new Color(0.46f, 0.62f, 0.57f, 1f); public static readonly Color LineColor = new Color(0.75f, 0.92f, 0.82f, 0.22f); public static GameObject CreatePanel(string name, Transform parent, Vector2 anchorMin, Vector2 anchorMax, Vector2 sizeDelta, Vector2 anchoredPosition) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) GameObject obj = CreateRect(name, parent, anchorMin, anchorMax, sizeDelta, anchoredPosition); ((Graphic)obj.AddComponent<Image>()).color = PanelColor; return obj; } public static GameObject CreateRect(string name, Transform parent, Vector2 anchorMin, Vector2 anchorMax, Vector2 sizeDelta, Vector2 anchoredPosition) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown GameObject val = new GameObject(name); val.transform.SetParent(parent, false); RectTransform obj = val.AddComponent<RectTransform>(); obj.anchorMin = anchorMin; obj.anchorMax = anchorMax; obj.sizeDelta = sizeDelta; obj.anchoredPosition = anchoredPosition; return val; } public static Image CreateImage(string name, Transform parent, Color color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.SetParent(parent, false); Image obj = val.AddComponent<Image>(); ((Graphic)obj).color = color; return obj; } public static Text CreateText(string name, Transform parent, string value, int fontSize, TextAnchor alignment) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return CreateText(name, parent, value, fontSize, alignment, TextColor); } public static Text CreateText(string name, Transform parent, string value, int fontSize, TextAnchor alignment, Color color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.SetParent(parent, false); Text obj = val.AddComponent<Text>(); obj.text = value; obj.font = Resources.GetBuiltinResource<Font>("Arial.ttf"); obj.fontSize = fontSize; obj.alignment = alignment; ((Graphic)obj).color = color; obj.horizontalOverflow = (HorizontalWrapMode)0; obj.verticalOverflow = (VerticalWrapMode)0; obj.supportRichText = true; return obj; } public static TextMeshProUGUI CreateTmpText(string name, Transform parent, string value, float fontSize, TextAlignmentOptions alignment, Color color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.SetParent(parent, false); TextMeshProUGUI obj = val.AddComponent<TextMeshProUGUI>(); ((TMP_Text)obj).text = value; ((TMP_Text)obj).fontSize = fontSize; ((TMP_Text)obj).alignment = alignment; ((Graphic)obj).color = color; ((TMP_Text)obj).richText = true; ((TMP_Text)obj).enableWordWrapping = true; ((TMP_Text)obj).overflowMode = (TextOverflowModes)1; ((Graphic)obj).raycastTarget = false; return obj; } public static GameObject CreateCard(string name, Transform parent) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown GameObject val = new GameObject(name); val.transform.SetParent(parent, false); ((Graphic)val.AddComponent<Image>()).color = CardColor; Outline obj = val.AddComponent<Outline>(); ((Shadow)obj).effectColor = LineColor; ((Shadow)obj).effectDistance = new Vector2(1f, -1f); return val; } public static void SetRect(Component component, Vector2 anchorMin, Vector2 anchorMax, Vector2 sizeDelta, Vector2 anchoredPosition) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) RectTransform component2 = component.GetComponent<RectTransform>(); component2.anchorMin = anchorMin; component2.anchorMax = anchorMax; component2.sizeDelta = sizeDelta; component2.anchoredPosition = anchoredPosition; } public static void Stretch(Component component, float left, float bottom, float right, float top) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) RectTransform component2 = component.GetComponent<RectTransform>(); component2.anchorMin = Vector2.zero; component2.anchorMax = Vector2.one; component2.offsetMin = new Vector2(left, bottom); component2.offsetMax = new Vector2(0f - right, 0f - top); } public static Color RarityColor(string rarity) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) return (Color)(rarity.ToLowerInvariant() switch { "common" => new Color(0.72f, 0.78f, 0.72f, 1f), "rare" => new Color(0.36f, 0.84f, 0.78f, 1f), "epic" => new Color(0.72f, 0.46f, 0.96f, 1f), "legendary" => new Color(1f, 0.66f, 0.16f, 1f), "curse" => new Color(0.92f, 0.12f, 0.08f, 1f), _ => MutedTextColor, }); } } } namespace KainRogueProtocol.Triggers { public sealed class TriggerRegistry { private readonly RogueEventDispatcher _events; public TriggerRegistry(RogueEventDispatcher events) { _events = events; } public void OnEnemyDamaged(EnemyDamagedContext context) { _events.OnEnemyDamaged(context); } public void OnEnemyKilled(EnemyKilledContext context) { _events.OnEnemyKilled(context); } public void OnMeleeHit(MeleeHitContext context) { _events.OnMeleeHit(context); } public void OnResourcePackUsed(ResourcePackUsedContext context) { _events.OnResourcePackUsed(context); } public void OnHealthChanged(HealthChangedContext context) { _events.OnHealthChanged(context); } } } namespace KainRogueProtocol.Runtime { public static class RogueGameplayRuntime { private readonly struct PlayerDamageStamp { public ulong PlayerId { get; } public PlayerAgent Player { get; } public float Timestamp { get; } public bool IsMelee { get; } public bool IsWeakspot { get; } public bool WasSleepingTarget { get; } public PlayerDamageStamp(ulong playerId, PlayerAgent player, float timestamp, bool isMelee, bool isWeakspot, bool wasSleepingTarget = false) { PlayerId = playerId; Player = player; Timestamp = timestamp; IsMelee = isMelee; IsWeakspot = isWeakspot; WasSleepingTarget = wasSleepingTarget; } } private readonly struct LastFullChargeHit { public ulong PlayerId { get; } public float Timestamp { get; } public LastFullChargeHit(ulong playerId, float timestamp) { PlayerId = playerId; Timestamp = timestamp; } } private readonly struct RecentMeleeHit { public ulong EnemyInstanceId { get; } public float Timestamp { get; } public bool IsWeakspot { get; } public bool WasSleepingTarget { get; } public RecentMeleeHit(ulong enemyInstanceId, float timestamp, bool isWeakspot, bool wasSleepingTarget) { EnemyInstanceId = enemyInstanceId; Timestamp = timestamp; IsWeakspot = isWeakspot; WasSleepingTarget = wasSleepingTarget; } } private readonly struct ScanPresence { public int PlayerCount { get; } public Vector3 Position { get; } public float ExpiresAt { get; } public ScanPresence(int playerCount, Vector3 position, float expiresAt) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) PlayerCount = playerCount; Position = position; ExpiresAt = expiresAt; } } private readonly struct StressResponseRuntimeStatus { public ulong PlayerId { get; } public int Stacks { get; } public float ExpiresAt { get; } public float DamagePercent { get; } public float MovePercent { get; } public StressResponseRuntimeStatus(ulong playerId, int stacks, float expiresAt, float damagePercent, float movePercent) { PlayerId = playerId; Stacks = stacks; ExpiresAt = expiresAt; DamagePercent = damagePercent; MovePercent = movePercent; } } private static readonly Dictionary<ulong, PlayerAgent> KnownPlayers = new Dictionary<ulong, PlayerAgent>(); private static readonly Dictionary<int, PlayerAgent> KnownPlayersByAgentId = new Dictionary<int, PlayerAgent>(); private static readonly Dictionary<int, PlayerAgent> KnownPlayersByUnityId = new Dictionary<int, PlayerAgent>(); private static readonly HashSet<ulong> LoggedKnownPlayers = new HashSet<ulong>(); private static readonly Dictionary<ulong, List<PlayerDamageStamp>> RecentEnemyDamage = new Dictionary<ulong, List<PlayerDamageStamp>>(); private static readonly Dictionary<ulong, LastFullChargeHit> LastFullChargeHits = new Dictionary<ulong, LastFullChargeHit>(); private static readonly Dictionary<ulong, float> CoordinatedStrikeCooldowns = new Dictionary<ulong, float>(); private static readonly Dictionary<ulong, float> ChamberNextReadyAt = new Dictionary<ulong, float>(); private static readonly Dictionary<ulong, float> ChamberShotExpiresAt = new Dictionary<ulong, float>(); private static readonly Dictionary<ulong, int> SoulSiphonStacks = new Dictionary<ulong, int>(); private static readonly Dictionary<ulong, RecentMeleeHit> LastMeleeHitsByPlayer = new Dictionary<ulong, RecentMeleeHit>(); private static readonly Dictionary<ulong, float> AppliedMoveSpeedBonuses = new Dictionary<ulong, float>(); private static readonly Dictionary<ulong, StressResponseRuntimeStatus> StressResponseStatuses = new Dictionary<ulong, StressResponseRuntimeStatus>(); private static readonly Dictionary<ulong, ScanPresence> ActiveScanPlayers = new Dictionary<ulong, ScanPresence>(); private static readonly Dictionary<ulong, int> MagazineKillCounts = new Dictionary<ulong, int>(); private static readonly Dictionary<ulong, bool> SettlementReloadReady = new Dictionary<ulong, bool>(); private static readonly Dictionary<int, bool> ReloadingLastFrame = new Dictionary<int, bool>(); private static readonly Dictionary<ulong, BulletWeapon> LastBulletWeaponsByPlayer = new Dictionary<ulong, BulletWeapon>(); private static readonly Dictionary<ulong, int> WeakspotStreaksByPlayer = new Dictionary<ulong, int>(); private static readonly Dictionary<ulong, float> PrecisionRecycleReadyAt = new Dictionary<ulong, float>(); private static readonly Dictionary<int, PlayerAgent> ReviveTargetsByInteraction = new Dictionary<int, PlayerAgent>(); private static readonly Dictionary<ulong, float> FieldMedicRescuerNormalizeUntil = new Dictionary<ulong, float>(); private static readonly Dictionary<ulong, float> FieldMedicForcedSlowUntil = new Dictionary<ulong, float>(); private static readonly Dictionary<ulong, Dictionary<ulong, float>> RecentAttackersByEnemy = new Dictionary<ulong, Dictionary<ulong, float>>(); private static readonly Dictionary<ulong, float> CrossfireReadyAt = new Dictionary<ulong, float>(); private static readonly RogueProcessedEventRegistry ProcessedEvents = new RogueProcessedEventRegistry(); private static readonly RogueTriggerGuard TriggerGuard = new RogueTriggerGuard(); private static bool _mirroringResource; private static float _nextBloodDebtBleedAt; private static PlayerDataBlock? _playerDataBlock; private static float _baseWalkMoveSpeed; private static float _baseRunMoveSpeed; private static float _baseCrouchMoveSpeed; private static float _baseAirMoveSpeed; private static float _appliedPlayerDataMoveMultiplier = 1f; private static int _unresolvedDamageSourceLogCount; private static int _singlePlayerFallbackLogCount; private static int _soulSiphonTraceLogCount; public static RogueEventDispatcher? Events { get; private set; } public static RogueModifierRegistry? Modifiers { get; private set; } public static bool MutualSupplyActive { get; set; } public static bool CoordinatedHeavyStrikeActive { get; set; } public static bool StressResponseActive { get; set; } public static bool BloodDebtActive { get; set; } public static bool ExplosiveHeadActive { get; set; } public static bool GiantRegenerationActive { get; set; } public static bool ChamberActive { get; set; } public static float ChamberDamageMultiplier { get; set; } = 3f; public static float ChamberReadySeconds { get; set; } = 3f; public static bool SoulSiphonStrikeActive { get; set; } public static float SoulSiphonMeleeDamagePercent { get; set; } = 0.02f; public static int SoulSiphonMaxStacks { get; set; } = 25; public static bool BulletTaxActive { get; set; } public static float BulletTaxAmmoStandardRel { get; set; } = 0.05f; public static float BulletTaxAmmoSpecialRel { get; set; } = 0.05f; public static HashSet<uint> BulletTaxLargeEnemyIds { get; set; } = new HashSet<uint>(); public static float BulletTaxLargeEnemyHealthThreshold { get; set; } = 40f; public static bool ColdBladeRhythmActive { get; set; } public static float ColdBladeChargeSpeedPercent { get; set; } = 0.25f; public static float ColdBladeNextChargeSpeedPercent { get; set; } = 0.25f; public static float ColdBladeNextChargeDuration { get; set; } = 8f; public static bool StableFormationActive { get; set; } public static float StableFormationDamageReductionPerExtraPlayer { get; set; } = 0.1f; public static bool DefenseCalibrationActive { get; set; } public static float DefenseCalibrationLockSpeedPercent { get; set; } = 0.2f; public static float DefenseCalibrationAmmoCostPercent { get; set; } = -0.3f; public static bool SettlementProtocolActive { get; set; } public static int SettlementKillsRequired { get; set; } = 3; public static float SettlementReloadSpeedPercent { get; set; } = 0.75f; public static bool RapidHardeningActive { get; set; } public static float RapidHardeningFoamDurationMultiplier { get; set; } = 2f; public static bool DoorSealExpertActive { get; set; } public static float DoorSealExpertDurabilityPercent { get; set; } = 0.5f; public static bool TrackingCalibrationActive { get; set; } public static float TrackingCalibrationDamagePercent { get; set; } = 0.1f; public static bool FieldMedicActive { get; set; } public static float FieldMedicReviveSpeedPercent { get; set; } = 10f; public static float FieldMedicRevivedMoveSpeedPercent { get; set; } = -0.99f; public static float FieldMedicDebuffSeconds { get; set; } = 10f; public static bool BackstabProtocolActive { get; set; } public static float BackstabProtocolBackDamagePercent { get; set; } = 0.5f; public static float BackstabProtocolFrontDamagePercent {