Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of ValheimRunemons v0.1.0
plugins/Pokeheim.dll
Decompiled 3 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using Jotunn; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Splatform; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Playables; using UnityEngine.Rendering; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Valheim Runemons")] [assembly: AssemblyCompany("Disrod")] [assembly: AssemblyProduct("Valheim Runemons")] [assembly: AssemblyCopyright("Copyright © 2026 Disrod")] [assembly: ComVisible(false)] [assembly: AssemblyFileVersion("0.1.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("0.1.0.0")] namespace Pokeheim; internal static class Commands { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static ConsoleEvent <>9__2_0; public static ConsoleEvent <>9__2_1; public static Func<SpeciesDef, bool> <>9__2_60; public static Func<SpeciesDef, string> <>9__2_61; public static Func<string, string> <>9__2_62; public static ConsoleEvent <>9__2_2; public static ConsoleEvent <>9__2_3; public static ConsoleEvent <>9__2_4; public static ConsoleOptionsFetcher <>9__2_5; public static ConsoleEvent <>9__2_6; public static Func<AltarDef, string> <>9__2_63; public static ConsoleOptionsFetcher <>9__2_7; public static ConsoleEvent <>9__2_8; public static ConsoleOptionsFetcher <>9__2_9; public static ConsoleEvent <>9__2_10; public static ConsoleOptionsFetcher <>9__2_11; public static ConsoleEvent <>9__2_12; public static ConsoleOptionsFetcher <>9__2_13; public static ConsoleEvent <>9__2_14; public static ConsoleOptionsFetcher <>9__2_15; public static Func<SpeciesDef, string> <>9__2_64; public static ConsoleEvent <>9__2_16; public static Func<SpeciesDef, string> <>9__2_65; public static ConsoleOptionsFetcher <>9__2_17; public static Func<SpeciesDef, bool> <>9__2_66; public static ConsoleEvent <>9__2_18; public static Func<SpeciesDef, float> <>9__2_67; public static ConsoleEvent <>9__2_19; public static ConsoleOptionsFetcher <>9__2_20; public static Func<SpeciesDef, float> <>9__2_68; public static ConsoleEvent <>9__2_21; public static ConsoleOptionsFetcher <>9__2_22; public static ConsoleEvent <>9__2_23; public static Func<(SpeciesDef def, float chance), string> <>9__2_69; public static ConsoleEvent <>9__2_24; public static ConsoleEvent <>9__2_25; public static ConsoleEvent <>9__2_26; public static ConsoleEvent <>9__2_27; public static ConsoleOptionsFetcher <>9__2_28; public static Func<List<SpeciesDef>, IEnumerable<SpeciesDef>> <>9__2_70; public static Func<MegaStoneDef, string> <>9__2_72; public static ConsoleEvent <>9__2_29; public static Func<MegaStoneDef, string> <>9__2_73; public static ConsoleOptionsFetcher <>9__2_30; public static ConsoleEvent <>9__2_31; public static ConsoleEvent <>9__2_32; public static ConsoleEvent <>9__2_33; public static ConsoleEvent <>9__2_34; public static ConsoleOptionsFetcher <>9__2_35; public static ConsoleEvent <>9__2_36; public static ConsoleOptionsFetcher <>9__2_37; public static ConsoleEvent <>9__2_38; public static Func<MoveDef, bool> <>9__2_74; public static Func<MoveDef, string> <>9__2_75; public static ConsoleEvent <>9__2_39; public static Func<MoveDef, bool> <>9__2_76; public static Func<MoveDef, string> <>9__2_77; public static ConsoleOptionsFetcher <>9__2_40; public static Func<MoveDef, bool> <>9__2_78; public static Func<MoveDef, string> <>9__2_79; public static ConsoleEvent <>9__2_41; public static Func<MoveDef, bool> <>9__2_80; public static Func<MoveDef, string> <>9__2_81; public static ConsoleOptionsFetcher <>9__2_42; public static ConsoleEvent <>9__2_43; public static ConsoleEvent <>9__2_44; public static Func<FossilDef, string> <>9__2_83; public static ConsoleEvent <>9__2_45; public static Func<FossilDef, string> <>9__2_84; public static ConsoleOptionsFetcher <>9__2_46; public static Func<GameObject, bool> <>9__2_85; public static Func<GameObject, string> <>9__2_86; public static ConsoleEvent <>9__2_47; public static ConsoleEvent <>9__2_48; public static Func<MeshFilter, bool> <>9__2_88; public static Func<Renderer, bool> <>9__2_89; public static ConsoleEvent <>9__2_49; public static Func<AltarDef, string> <>9__2_91; public static ConsoleEvent <>9__2_50; public static ConsoleOptionsFetcher <>9__2_51; public static Func<AltarDef, string> <>9__2_92; public static ConsoleOptionsFetcher <>9__2_52; public static ConsoleOptionsFetcher <>9__2_53; public static ConsoleEvent <>9__2_54; public static ConsoleEvent <>9__2_55; public static ConsoleEvent <>9__2_56; public static ConsoleEvent <>9__2_57; public static ConsoleEvent <>9__2_58; public static ConsoleEvent <>9__2_59; public static Func<EffectData, bool> <>9__4_0; public static Func<EffectData, string> <>9__4_1; public static Func<GameObject, bool> <>9__7_0; public static Func<GameObject, string> <>9__7_1; public static Func<GameObject, bool> <>9__7_5; public static Func<GameObject, string> <>9__7_2; public static Func<string, bool> <>9__7_3; public static Func<string, string> <>9__7_4; public static Func<SpeciesDef, bool> <>9__12_0; public static Func<SpeciesDef, int> <>9__12_1; public static Func<SpeciesDef, bool> <>9__12_2; public static Func<SpeciesDef, string> <>9__12_3; public static Func<SpeciesDef, bool> <>9__12_4; public static Func<SpeciesDef, string> <>9__12_5; public static Func<SpeciesDef, string> <>9__12_6; public static Func<SpeciesDef, bool> <>9__15_0; public static Func<SpeciesDef, bool> <>9__24_1; public static Func<SpeciesDef, string> <>9__24_2; internal void <Register>b__2_0(ConsoleEventArgs args) { bool flag = Object.op_Implicit((Object)(object)Console.instance) && ((Terminal)Console.instance).IsCheatsEnabled(); string[] help = Help; foreach (string text in help) { if (flag || PlayerCommands.Contains(text.Split(new char[1] { ' ' })[0])) { args.Context.AddString(" " + text); } } } internal void <Register>b__2_1(ConsoleEventArgs args) { DmgLog.Show = !DmgLog.Show; args.Context.AddString("Runemons damage log: " + (DmgLog.Show ? "on" : "off")); } internal void <Register>b__2_2(ConsoleEventArgs args) { string text = Stats.SelfTest() + ChartTest() + MegaTest(); string text2 = string.Join(", ", from d in GameData.Species.Values where d.InDex && !d.inGame select d.id into i orderby i select i); if (GameData.Species.Count > 0 && text2 != "arceus, mewtwo") { text = text + "coming-soon list: got [" + text2 + "], want [arceus, mewtwo]\n"; } Logger.LogInfo((object)("[Pokeheim] coming-soon list: " + text2)); args.Context.AddString((text == "") ? "Runemons selftest: all passed" : ("Runemons selftest FAILED:\n" + text)); Logger.LogInfo((object)("[Pokeheim] selftest: " + ((text == "") ? "all passed" : ("FAILED\n" + text)))); } internal bool <Register>b__2_60(SpeciesDef d) { return d.InDex && !d.inGame; } internal string <Register>b__2_61(SpeciesDef d) { return d.id; } internal string <Register>b__2_62(string i) { return i; } internal void <Register>b__2_3(ConsoleEventArgs args) { GameData.Reload(); Regions.Rebuild(); MoveEffects.Reload(); Special.Reload(); args.Context.AddString($"Reloaded: {GameData.Species.Count} species, {GameData.Moves.Count} moves. New species, colors and recipes need a restart."); } internal void <Register>b__2_4(ConsoleEventArgs args) { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) if (args.Length < 2 || !GameData.Species.TryGetValue(args[1].ToLower(), out var value)) { args.Context.AddString("Usage: ph_spawn <species> [level]. Species: " + string.Join(", ", GameData.Species.Keys)); return; } Player localPlayer = Player.m_localPlayer; args.Context.AddString("Spawned " + SpawnWild(value, args.TryParameterInt(2, Random.Range(2, 11)), ((Component)localPlayer).transform.position + ((Component)localPlayer).transform.forward * 3f)); } internal List<string> <Register>b__2_5() { return new List<string>(GameData.Species.Keys); } internal void <Register>b__2_6(ConsoleEventArgs args) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) args.Context.AddString(Legendary.Command((args.Length > 1) ? args[1].ToLower() : "", ((Component)Player.m_localPlayer).transform.position, Player.m_localPlayer.GetPlayerName())); } internal List<string> <Register>b__2_7() { return Altars.All.Select((AltarDef a) => a.id).Concat(Altars.All.SelectMany(Legendary.Members)).ToList(); } internal string <Register>b__2_63(AltarDef a) { return a.id; } internal void <Register>b__2_8(ConsoleEventArgs args) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (args.Length < 2 && Object.op_Implicit((Object)(object)Player.m_localPlayer)) { Terminal context = args.Context; string text = BossFight.Report(((Component)Player.m_localPlayer).transform.position); context.AddString((text != null && text.Length > 0) ? text : "No altar boss near you. Give a species id: ph_bosscheck articuno"); } else { args.Context.AddString(Legendary.Check((args.Length > 1) ? args[1].ToLower() : "")); } } internal List<string> <Register>b__2_9() { return Altars.All.SelectMany(Legendary.Members).ToList(); } internal void <Register>b__2_10(ConsoleEventArgs args) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) args.Context.AddString(BirdFlight.Command(args.Length > 1 && args[1].ToLower() == "on", ((Component)Player.m_localPlayer).transform.position)); } internal List<string> <Register>b__2_11() { return new List<string> { "on", "off" }; } internal void <Register>b__2_12(ConsoleEventArgs args) { Perf.Logging = ((args.Length > 1) ? (args[1].ToLower() == "on") : (!Perf.Logging)); Logger.LogInfo((object)("[Pokeheim] ph_perf logging " + (Perf.Logging ? "on" : "off"))); args.Context.AddString("ph_perf logging " + (Perf.Logging ? "on: a line every 5 s in LogOutput.log" : "off")); } internal List<string> <Register>b__2_13() { return new List<string> { "on", "off" }; } internal void <Register>b__2_14(ConsoleEventArgs args) { args.Context.AddString(Perf.Toggle((args.Length > 1) ? args[1].ToLower() : "")); } internal List<string> <Register>b__2_15() { return Perf.Switches.ToList(); } internal void <Register>b__2_16(ConsoleEventArgs args) { if (args.Length < 2 || !GameData.Species.TryGetValue(args[1].ToLower(), out var value) || value.sighting == null) { args.Context.AddString("Usage: ph_mythical <species>. Mythicals: " + string.Join(", ", Sightings.Mythicals.Select((SpeciesDef d) => d.id))); return; } Player localPlayer = Player.m_localPlayer; Logger.LogInfo((object)("[Pokeheim] ph_mythical " + value.id + ": conditions " + (Sightings.Holds(value, localPlayer) ? "hold" : "do not hold") + " here")); args.Context.AddString(Sightings.Spawn(value, localPlayer) ?? "No dry ground in its biome 30-50 m away."); } internal string <Register>b__2_64(SpeciesDef d) { return d.id; } internal List<string> <Register>b__2_17() { return Sightings.Mythicals.Select((SpeciesDef d) => d.id).ToList(); } internal string <Register>b__2_65(SpeciesDef d) { return d.id; } internal void <Register>b__2_18(ConsoleEventArgs args) { //IL_0084: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) Player localPlayer = Player.m_localPlayer; List<SpeciesDef> list = GameData.Species.Values.Where((SpeciesDef d) => d.InDex).ToList(); int num = args.TryParameterInt(1, 5); int num2 = 0; int count = list.Count; foreach (SpeciesDef item in list) { float num3 = (float)num2++ * (float)Math.PI * 2f / (float)count; SpawnWild(item, num, ((Component)localPlayer).transform.position + new Vector3(Mathf.Cos(num3), 0f, Mathf.Sin(num3)) * 8f); } args.Context.AddString($"Spawned {count} creatures at level {num}."); } internal bool <Register>b__2_66(SpeciesDef d) { return d.InDex; } internal void <Register>b__2_19(ConsoleEventArgs args) { Player localPlayer = Player.m_localPlayer; string text = ((args.Length > 1) ? args[1].ToLower() : ""); if (text == "pause") { if (_modelParade == null) { args.Context.AddString("ph_parade is not running."); return; } _paradePaused = !_paradePaused; args.Context.AddString(_paradePaused ? "ph_parade paused ('ph_parade pause' again to go on)." : "ph_parade going on."); Logger.LogInfo((object)("[Pokeheim] parade " + (_paradePaused ? "paused" : "resumed"))); return; } bool flag = _modelParade != null; StopModelParade(localPlayer); if (text == "stop") { args.Context.AddString(flag ? "ph_parade stopped." : "ph_parade is not running."); return; } List<SpeciesDef> list = ParadeList(); if (text == "random") { int num = Mathf.Clamp(args.TryParameterInt(2, 50), 1, list.Count); float num2 = Mathf.Max(0.1f, args.TryParameterFloat(3, 4f)); List<SpeciesDef> all = list.OrderBy((SpeciesDef _) => Random.value).Take(num).ToList(); _paradePaused = false; _modelParade = ((MonoBehaviour)localPlayer).StartCoroutine(ModelParade(all, 0, num2)); args.Context.AddString($"ph_parade random: {num} models, 3 every {num2:0.##} s. 'ph_parade pause' / 'ph_parade stop'."); Logger.LogInfo((object)$"[Pokeheim] parade random started: {num} models, every {num2:0.##} s"); return; } int num3 = args.TryParameterInt(1, 1); if (num3 < 1 || num3 > list.Count) { args.Context.AddString($"Usage: ph_parade [<1-{list.Count}> [seconds]] | pause | stop"); return; } float num4 = Mathf.Max(0.1f, args.TryParameterFloat(2, 0.75f)); _paradePaused = false; _modelParade = ((MonoBehaviour)localPlayer).StartCoroutine(ModelParade(list, num3 - 1, num4)); args.Context.AddString($"ph_parade: #{num3} to #{list.Count}, 3 every {num4:0.##} s (~{(float)(list.Count - num3 + 1) / 3f * num4 / 60f:0} min). 'ph_parade pause' / 'ph_parade stop'."); Logger.LogInfo((object)$"[Pokeheim] parade started at #{num3} {list[num3 - 1].id} of {list.Count}, every {num4:0.##} s"); } internal float <Register>b__2_67(SpeciesDef _) { return Random.value; } internal List<string> <Register>b__2_20() { return new List<string> { "stop", "pause", "random" }; } internal void <Register>b__2_21(ConsoleEventArgs args) { Player localPlayer = Player.m_localPlayer; if (!Object.op_Implicit((Object)(object)localPlayer)) { return; } string text = ((args.Length > 1) ? args[1].ToLower() : ""); if (text == "pause") { if (_modelParade == null) { args.Context.AddString("ph_attackparade is not running."); return; } _paradePaused = !_paradePaused; args.Context.AddString(_paradePaused ? "ph_attackparade paused ('ph_attackparade pause' again to go on)." : "ph_attackparade going on."); Logger.LogInfo((object)("[Pokeheim] attackparade " + (_paradePaused ? "paused" : "resumed"))); return; } bool flag = _modelParade != null; StopModelParade(localPlayer); if (text == "stop") { args.Context.AddString(flag ? "ph_attackparade stopped." : "ph_attackparade is not running."); return; } List<SpeciesDef> list = ParadeList(); if (text == "random") { int num = Mathf.Clamp(args.TryParameterInt(2, 50), 1, list.Count); float num2 = Mathf.Max(3f, args.TryParameterFloat(3, 6f)); List<SpeciesDef> all = list.OrderBy((SpeciesDef _) => Random.value).Take(num).ToList(); _paradePaused = false; _modelParade = ((MonoBehaviour)localPlayer).StartCoroutine(AttackParade(all, 0, num2)); args.Context.AddString($"ph_attackparade random: {num} models, {num2:0.#} s each. 'ph_attackparade pause' / 'ph_attackparade stop'."); Logger.LogInfo((object)$"[Pokeheim] attackparade random started: {num} models, {num2:0.#} s each"); return; } int num3 = args.TryParameterInt(1, 1); if (num3 < 1 || num3 > list.Count) { args.Context.AddString($"Usage: ph_attackparade [<1-{list.Count}> [seconds]] | random [n] [seconds] | pause | stop"); return; } float num4 = Mathf.Max(3f, args.TryParameterFloat(2, 6f)); _paradePaused = false; _modelParade = ((MonoBehaviour)localPlayer).StartCoroutine(AttackParade(list, num3 - 1, num4)); args.Context.AddString($"ph_attackparade: #{num3} to #{list.Count}, {num4:0.#} s each (~{(float)(list.Count - num3 + 1) * num4 / 60f:0} min). Type 'heal' to heal yourself; 'ph_attackparade pause' / 'ph_attackparade stop'."); Logger.LogInfo((object)$"[Pokeheim] attackparade started at #{num3} {list[num3 - 1].id} of {list.Count}, {num4:0.#} s each"); } internal float <Register>b__2_68(SpeciesDef _) { return Random.value; } internal List<string> <Register>b__2_22() { return new List<string> { "stop", "pause", "random" }; } internal void <Register>b__2_23(ConsoleEventArgs args) { int num = 0; PokeCreature[] array = Object.FindObjectsByType<PokeCreature>((FindObjectsSortMode)0); foreach (PokeCreature pokeCreature in array) { if (pokeCreature.IsWild) { ZNetView component = ((Component)pokeCreature).GetComponent<ZNetView>(); if (Object.op_Implicit((Object)(object)component) && component.IsValid()) { component.ClaimOwnership(); ZNetScene.instance.Destroy(((Component)pokeCreature).gameObject); num++; } } } Logger.LogInfo((object)$"[Pokeheim] ph_clear: removed {num} wild creatures"); args.Context.AddString($"Removed {num} wild Runemon (only ones loaded near you; companions untouched)."); } internal void <Register>b__2_24(ConsoleEventArgs args) { //IL_000b: 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) Region region = Regions.At(((Component)Player.m_localPlayer).transform.position); args.Context.AddString((!Regions.Ready) ? "Regions are still being built, try again in a few seconds." : ((region == null) ? "No region here (ocean?)." : ($"{region.name} ({region.biome}, {Regions.All.Count} regions in this world): " + string.Join(", ", region.cohort.Select(((SpeciesDef def, float chance) x) => x.def.name + " " + Regions.Pct(x.chance) + (Regions.IsWaterSpecies(x.def) ? " (water)" : "")))))); } internal string <Register>b__2_69((SpeciesDef def, float chance) x) { return x.def.name + " " + Regions.Pct(x.chance) + (Regions.IsWaterSpecies(x.def) ? " (water)" : ""); } internal void <Register>b__2_25(ConsoleEventArgs args) { Inventory inventory = ((Humanoid)Player.m_localPlayer).GetInventory(); Give(inventory, "PH_Belt", 1); foreach (TrainerRuneDef rune in GameData.Items.trainerRunes.runes) { Give(inventory, GameData.TrainerRuneId(rune.tier), 1); } foreach (RuneDef rune2 in GameData.Items.runes) { Give(inventory, GameData.RuneId(rune2.biome), 20); } foreach (SpiritDef spirit in GameData.Items.spirits) { Give(inventory, GameData.SpiritId(spirit.biome), 20); } foreach (FoodDef food in GameData.Items.foods) { Give(inventory, food.id, 5); } args.Context.AddString("Kit added (whatever fits in your inventory)."); } internal void <Register>b__2_26(ConsoleEventArgs args) { BoxData data = Box.Data; if (data == null) { args.Context.AddString("No player."); return; } args.Context.AddString(string.Format("Belt {0}, Warden Rune {1} (level cap {2}), seen {3}, caught {4}", Belt.Worn() ? "worn" : "NOT worn (sockets locked)", data.trainer, Belt.LevelCap, data.seen.Count, data.caught.Count)); for (int i = 0; i < 3; i++) { Mon mon = Box.InSocket(i); args.Context.AddString(string.Format(" {0}. {1}", i + 1, (mon == null) ? "empty" : (mon.Summary() + (mon.fainted ? " [fainted]" : "") + (Party.IsOut(mon) ? " [out]" : "")))); } } internal void <Register>b__2_27(ConsoleEventArgs args) { if (args.Length < 2 || !GameData.Species.TryGetValue(args[1].ToLower(), out var value)) { args.Context.AddString("Usage: ph_give <species> [level]. Species: " + string.Join(", ", GameData.Species.Keys)); } else { args.Context.AddString(GiveMon(value, args.TryParameterInt(2, GameData.BandFor(value).minLevel))); } } internal List<string> <Register>b__2_28() { return GameData.Species.Keys.ToList(); } internal void <Register>b__2_29(ConsoleEventArgs args) { <>c__DisplayClass2_0 CS$<>8__locals5 = new <>c__DisplayClass2_0 { args = args }; SpeciesDef speciesDef = ((CS$<>8__locals5.args.Length < 2) ? null : GameData.Megas.Values.SelectMany((List<SpeciesDef> l) => l).FirstOrDefault((SpeciesDef f) => f.stone == CS$<>8__locals5.args[1].ToLower())); if (speciesDef == null) { CS$<>8__locals5.args.Context.AddString("Usage: ph_givemega <stone> [level]. Stones: " + string.Join(", ", GameData.Items.megaStones.Select((MegaStoneDef s) => s.id))); } else { Give(((Humanoid)Player.m_localPlayer).GetInventory(), GameData.MegaStoneId(speciesDef.stone), 1); CS$<>8__locals5.args.Context.AddString(Mega.StoneName(speciesDef.stone) + " + " + GiveMon(GameData.Species[speciesDef.megaOf], CS$<>8__locals5.args.TryParameterInt(2, 50))); } } internal IEnumerable<SpeciesDef> <Register>b__2_70(List<SpeciesDef> l) { return l; } internal string <Register>b__2_72(MegaStoneDef s) { return s.id; } internal List<string> <Register>b__2_30() { return GameData.Items.megaStones.Select((MegaStoneDef s) => s.id).ToList(); } internal string <Register>b__2_73(MegaStoneDef s) { return s.id; } internal void <Register>b__2_31(ConsoleEventArgs args) { if (Box.Data != null) { Box.Data.specialLeft = 0f; Box.Save(); Logger.LogInfo((object)"[Pokeheim] ph_special: special cooldown reset"); args.Context.AddString("Special move ready."); } } internal void <Register>b__2_32(ConsoleEventArgs args) { Mon mon = BoxEntry(args); if (mon != null) { string text = (Party.IsOut(mon) ? null : Party.Toggle(mon)); args.Context.AddString(text ?? ("Go, " + mon.Def.name + "!")); } } internal void <Register>b__2_33(ConsoleEventArgs args) { Mon mon = BoxEntry(args); if (mon != null && Party.IsOut(mon)) { Party.Toggle(mon); args.Context.AddString(mon.Def.name + ", come back!"); } } internal void <Register>b__2_34(ConsoleEventArgs args) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) Player localPlayer = Player.m_localPlayer; if (!Object.op_Implicit((Object)(object)localPlayer) || args.Length < 2 || !GameData.Moves.TryGetValue(args[1], out var value)) { args.Context.AddString("Moves: " + string.Join(", ", GameData.Moves.Keys)); return; } PokeCreature pokeCreature = Party.OutNow().FirstOrDefault(); Vector3 val = (Vector3)((!Object.op_Implicit((Object)(object)pokeCreature)) ? ((Character)localPlayer).GetHeadPoint() : (((??)((Component)pokeCreature).GetComponentInChildren<PokeRig>()?.Mouth) ?? pokeCreature.Character.GetCenterPoint())); Vector3 val2 = ((Component)localPlayer).transform.position + ((Component)localPlayer).transform.forward * 8f + Vector3.up; Fx.Play(value.castFx, val, pokeCreature?.Mon?.Def, MoveLooks.TintOf(value)); if (pokeCreature != null) { ((Component)pokeCreature).GetComponentInChildren<PokeRig>()?.Lunge(); } bool flag = value.kind == "support" && value.trigger != "near"; float num = MoveLooks.Play(value, val, flag ? ((Component)localPlayer).transform.position : val2, flag ? ((Component)localPlayer).transform : null, 0f, (Character)(Object.op_Implicit((Object)(object)pokeCreature) ? ((object)pokeCreature.Character) : ((object)localPlayer))); Fx.Play(value.hitFx, flag ? ((Character)localPlayer).GetCenterPoint() : val2, pokeCreature?.Mon?.Def, MoveLooks.TintOf(value)); args.Context.AddString((value.Look != null) ? $"{value.name}: look {value.Look.id} ({value.Look.kind}), lands after {num:0.00}s" : ((value.vfx == null) ? (value.name + " has no vfx (vanilla effects only)") : $"{value.name}: {value.vfx.style}, lands after {num:0.00}s")); } internal List<string> <Register>b__2_35() { return GameData.Moves.Keys.ToList(); } internal void <Register>b__2_36(ConsoleEventArgs args) { if (args.Length < 2 || !GameData.Looks.TryGetValue(args[1], out var value)) { args.Context.AddString("Looks: " + string.Join(", ", GameData.Looks.Keys)); } else { args.Context.AddString(MoveLooks.Show(value)); } } internal List<string> <Register>b__2_37() { return GameData.Looks.Keys.ToList(); } internal void <Register>b__2_38(ConsoleEventArgs args) { args.Context.AddString(MoveLooks.Gallery()); } internal void <Register>b__2_39(ConsoleEventArgs args) { if (args.Length < 2 || !GameData.Moves.TryGetValue(args[1], out var value) || value.kind != "support") { args.Context.AddString("Support moves: " + string.Join(", ", from m in GameData.Moves.Values where m.kind == "support" select m.id)); } else { args.Context.AddString(Support.Force(value)); } } internal bool <Register>b__2_74(MoveDef m) { return m.kind == "support"; } internal string <Register>b__2_75(MoveDef m) { return m.id; } internal List<string> <Register>b__2_40() { return (from m in GameData.Moves.Values where m.kind == "support" select m.id).ToList(); } internal bool <Register>b__2_76(MoveDef m) { return m.kind == "support"; } internal string <Register>b__2_77(MoveDef m) { return m.id; } internal void <Register>b__2_41(ConsoleEventArgs args) { if (args.Length < 2 || !GameData.Moves.TryGetValue(args[1], out var value) || value.kind != "stance") { args.Context.AddString("Stance moves: " + string.Join(", ", from m in GameData.Moves.Values where m.kind == "stance" select m.id)); } else { args.Context.AddString(Stance.Force(value)); } } internal bool <Register>b__2_78(MoveDef m) { return m.kind == "stance"; } internal string <Register>b__2_79(MoveDef m) { return m.id; } internal List<string> <Register>b__2_42() { return (from m in GameData.Moves.Values where m.kind == "stance" select m.id).ToList(); } internal bool <Register>b__2_80(MoveDef m) { return m.kind == "stance"; } internal string <Register>b__2_81(MoveDef m) { return m.id; } internal void <Register>b__2_43(ConsoleEventArgs args) { Mon mon = BoxEntry(args); if (mon != null) { Progress.SetLevel(mon, args.TryParameterInt(2, mon.level + 1)); Box.Save(); args.Context.AddString(mon.Summary()); } } internal void <Register>b__2_44(ConsoleEventArgs args) { Player localPlayer = Player.m_localPlayer; if (!Object.op_Implicit((Object)(object)localPlayer)) { return; } int num = args.TryParameterInt(1, 1); foreach (EvoItemDef evoItem in GameData.Items.evoItems) { ((Humanoid)localPlayer).GetInventory().AddItem(ObjectDB.instance.GetItemPrefab(GameData.EvoItemId(evoItem.id)), num); } args.Context.AddString($"gave {num} of each of {GameData.Items.evoItems.Count} evolution items"); } internal void <Register>b__2_45(ConsoleEventArgs args) { <>c__DisplayClass2_1 CS$<>8__locals4 = new <>c__DisplayClass2_1 { args = args }; Player localPlayer = Player.m_localPlayer; if (!Object.op_Implicit((Object)(object)localPlayer)) { return; } int num = CS$<>8__locals4.args.TryParameterInt(2, 1); List<FossilDef> list = GameData.Items.fossils.Where((FossilDef f) => CS$<>8__locals4.args.Length < 2 || f.id.ToLower() == CS$<>8__locals4.args[1].ToLower()).ToList(); foreach (FossilDef item in list) { ((Humanoid)localPlayer).GetInventory().AddItem(ObjectDB.instance.GetItemPrefab(GameData.FossilId(item.id)), num); } CS$<>8__locals4.args.Context.AddString(string.Format("gave {0} of: {1}", num, string.Join(", ", list.Select((FossilDef f) => f.name)))); } internal string <Register>b__2_83(FossilDef f) { return f.name; } internal List<string> <Register>b__2_46() { return GameData.Items.fossils.Select((FossilDef f) => f.id.ToLower()).ToList(); } internal string <Register>b__2_84(FossilDef f) { return f.id.ToLower(); } internal void <Register>b__2_47(ConsoleEventArgs args) { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) Player localPlayer = Player.m_localPlayer; if (Object.op_Implicit((Object)(object)localPlayer)) { List<GameObject> list = (from i in ObjectDB.instance.m_items where Object.op_Implicit((Object)(object)i) && ((Object)i).name.StartsWith("PH_") orderby ((Object)i).name select i).ToList(); for (int num = 0; num < list.Count; num++) { Vector3 val = ((Component)localPlayer).transform.position + ((Component)localPlayer).transform.forward * (2f + (float)(num / 8) * 0.7f) + ((Component)localPlayer).transform.right * (((float)(num % 8) - 3.5f) * 0.7f) + Vector3.up * 0.5f; Object.Instantiate<GameObject>(list[num], val, Quaternion.identity); } Logger.LogInfo((object)$"[Pokeheim] ph_items: dropped {list.Count} items"); args.Context.AddString($"dropped {list.Count} items"); } } internal bool <Register>b__2_85(GameObject i) { return Object.op_Implicit((Object)(object)i) && ((Object)i).name.StartsWith("PH_"); } internal string <Register>b__2_86(GameObject i) { return ((Object)i).name; } internal void <Register>b__2_48(ConsoleEventArgs args) { //IL_004c: 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_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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) Player localPlayer = Player.m_localPlayer; GameObject prefab = ZNetScene.instance.GetPrefab("PH_Master"); if (!Object.op_Implicit((Object)(object)localPlayer) || !Object.op_Implicit((Object)(object)prefab)) { args.Context.AddString("no player or no PH_Master"); return; } Vector3 val = ((Component)localPlayer).transform.position + ((Component)localPlayer).transform.forward * 4f; Object.Instantiate<GameObject>(prefab, val, Quaternion.LookRotation(-((Component)localPlayer).transform.forward)); Logger.LogInfo((object)$"[Pokeheim] ph_master: The Master spawned at {val}"); args.Context.AddString("The Master is here (revived fossils come at level " + Master.ReviveLevel() + ")"); } internal void <Register>b__2_49(ConsoleEventArgs args) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass2_2 CS$<>8__locals2 = new <>c__DisplayClass2_2 { p = Player.m_localPlayer }; CampDecor campDecor = (Object.op_Implicit((Object)(object)CS$<>8__locals2.p) ? (from c in Object.FindObjectsByType<CampDecor>((FindObjectsSortMode)0) orderby Vector3.Distance(((Component)c).transform.position, ((Component)CS$<>8__locals2.p).transform.position) select c).FirstOrDefault() : null); if (!Object.op_Implicit((Object)(object)campDecor)) { args.Context.AddString("no Master camp loaded near you"); return; } foreach (Transform item in ((Component)campDecor).transform) { Transform val = item; Renderer[] componentsInChildren = ((Component)val).GetComponentsInChildren<Renderer>(true); int num = ((Component)val).GetComponentsInChildren<MeshFilter>(true).Count((MeshFilter f) => !Object.op_Implicit((Object)(object)f.sharedMesh)); string text = $"{((Object)val).name} at {val.position:F1}: {componentsInChildren.Count((Renderer r) => r.enabled && ((Component)r).gameObject.activeInHierarchy)}/{componentsInChildren.Length} renderers on, {num} meshes missing"; Logger.LogInfo((object)("[Pokeheim] ph_camp " + text)); args.Context.AddString(text); } } internal bool <Register>b__2_88(MeshFilter f) { return !Object.op_Implicit((Object)(object)f.sharedMesh); } internal bool <Register>b__2_89(Renderer r) { return r.enabled && ((Component)r).gameObject.activeInHierarchy; } internal void <Register>b__2_50(ConsoleEventArgs args) { //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_028e: 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_02a2: 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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: 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_01bc: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass2_3 CS$<>8__locals5 = new <>c__DisplayClass2_3 { p = Player.m_localPlayer }; string text = ((args.Length > 1 && args[1].ToLower() == "monument") ? "PH_FossilMonument" : "PH_MasterCamp"); if (!Object.op_Implicit((Object)(object)CS$<>8__locals5.p) || ZDOMan.instance == null) { return; } if (args.Length > 1 && args[1].ToLower() == "altar") { AltarDef altarDef = ((args.Length > 2) ? Altars.Get(args[2].ToLower()) : Altars.All.FirstOrDefault()); if (altarDef == null) { args.Context.AddString("Unknown group. Groups: " + string.Join(", ", Altars.All.Select((AltarDef a) => a.id))); return; } string text2 = Altars.LocationName(altarDef); if (!Altars.Nearest(altarDef, ((Component)CS$<>8__locals5.p).transform.position, out var pos)) { args.Context.AddString("no " + text2 + " known here (only the host has the list)"); return; } Minimap.instance.AddPin(pos, (PinType)6, altarDef.title, false, false, 0L, default(PlatformUserID)); Logger.LogInfo((object)$"[Pokeheim] ph_find: {text2} at {pos:F0}"); args.Context.AddString($"{text2} at {pos:F0}, {Vector3.Distance(pos, ((Component)CS$<>8__locals5.p).transform.position):F0} m away (pinned until you log out)"); return; } List<ZDO> list = new List<ZDO>(); int num = 0; while (!ZDOMan.instance.GetAllZDOsWithPrefabIterative(text, list, ref num)) { } if (list.Count == 0) { args.Context.AddString("no " + text + " known here (on a server only the host sees far ones)"); return; } Vector3 position = list.OrderBy((ZDO z) => Vector3.Distance(z.GetPosition(), ((Component)CS$<>8__locals5.p).transform.position)).First().GetPosition(); Minimap.instance.AddPin(position, (PinType)6, text, false, false, 0L, default(PlatformUserID)); Logger.LogInfo((object)$"[Pokeheim] ph_find: {text} at {position:F0}"); args.Context.AddString($"{text} at {position:F0}, {Vector3.Distance(position, ((Component)CS$<>8__locals5.p).transform.position):F0} m away (pinned until you log out)"); } internal string <Register>b__2_91(AltarDef a) { return a.id; } internal List<string> <Register>b__2_51() { return new List<string> { "master", "monument", "altar" }; } internal List<string> <Register>b__2_52() { return Altars.All.Select((AltarDef a) => a.id).Append("restore").ToList(); } internal string <Register>b__2_92(AltarDef a) { return a.id; } internal List<string> <Register>b__2_53() { return BossAttacks.DemoKinds.Append("all").ToList(); } internal void <Register>b__2_54(ConsoleEventArgs args) { Mon mon = BoxEntry(args); if (mon != null) { mon.ot = "Trader"; Box.Save(); args.Context.AddString(mon.Summary() + " now has OT Trader: trade evolutions show its Evolve button"); } } internal void <Register>b__2_55(ConsoleEventArgs args) { Mon mon = BoxEntry(args); if (mon != null) { Progress.Gain(mon, args.TryParameterInt(2, 100)); args.Context.AddString(mon.Summary() + $" XP {mon.xp}"); } } internal void <Register>b__2_56(ConsoleEventArgs args) { if (Box.Data == null) { return; } foreach (Mon mon in Box.Data.mons) { mon.fainted = false; mon.hp = mon.MaxHp; PokeCreature pokeCreature = Party.Instance(mon); if (Object.op_Implicit((Object)(object)pokeCreature)) { pokeCreature.Character.SetHealth(pokeCreature.Character.GetMaxHealth()); } } Box.Save(); args.Context.AddString("Healed."); } internal void <Register>b__2_57(ConsoleEventArgs args) { string text = ((args.Length > 1) ? args[1] : "Boar"); GameObject val = ZNetScene.instance.GetPrefab(text) ?? ZNetScene.instance.GetPrefab("PH_" + text.ToLower()); if (Object.op_Implicit((Object)(object)val)) { Models.Describe(val, args.Context); } else { args.Context.AddString("No prefab " + text); } } internal void <Register>b__2_58(ConsoleEventArgs args) { string text = ((args.Length > 1) ? args[1].ToLowerInvariant() : ""); List<string> list = new List<string>(); foreach (KeyValuePair<int, GameObject> namedPrefab in ZNetScene.instance.m_namedPrefabs) { GameObject value = namedPrefab.Value; if (!Object.op_Implicit((Object)(object)value) || ((Object)namedPrefab.Value).name.StartsWith("PH_")) { continue; } string name = ((Object)value).name; string text2 = name.ToLowerInvariant(); if (!(text != "") || text2.Contains(text)) { string text3 = (Object.op_Implicit((Object)(object)value.GetComponent<Projectile>()) ? "projectile" : (Object.op_Implicit((Object)(object)value.GetComponent<Aoe>()) ? "aoe" : ((text2.StartsWith("fx_") || text2.StartsWith("vfx_") || text2.StartsWith("sfx_")) ? "fx" : null))); if (text3 != null) { list.Add(text3 + "\t" + name); } } } list.Sort(); Logger.LogInfo((object)(string.Format("[Pokeheim] ph_dumpprefabs{0}: {1} prefabs", (text == "") ? "" : (" " + text), list.Count) + Environment.NewLine + string.Join(Environment.NewLine, list))); args.Context.AddString($"Logged {list.Count} vanilla prefab names (kind, name) to LogOutput.log"); } internal void <Register>b__2_59(ConsoleEventArgs args) { string text = DumpAttacks(); args.Context.AddString("Wrote " + text); } internal bool <Fxs>b__4_0(EffectData e) { return e != null && Object.op_Implicit((Object)(object)e.m_prefab); } internal string <Fxs>b__4_1(EffectData e) { return ((Object)e.m_prefab).name; } internal bool <DumpAttacks>b__7_0(GameObject go) { return Object.op_Implicit((Object)(object)go) && !((Object)go).name.StartsWith("PH_"); } internal string <DumpAttacks>b__7_1(GameObject go) { return ((Object)go).name; } internal bool <DumpAttacks>b__7_5(GameObject i) { return Object.op_Implicit((Object)(object)i); } internal string <DumpAttacks>b__7_2(GameObject go) { return ((Object)go).name; } internal bool <DumpAttacks>b__7_3(string n) { string text = n.ToLowerInvariant(); return text.StartsWith("fx_") || text.StartsWith("vfx_") || text.StartsWith("sfx_"); } internal string <DumpAttacks>b__7_4(string n) { return n; } internal bool <ParadeList>b__12_0(SpeciesDef d) { return d.InDex; } internal int <ParadeList>b__12_1(SpeciesDef d) { return d.dex; } internal bool <ParadeList>b__12_2(SpeciesDef d) { return d.IsForm; } internal string <ParadeList>b__12_3(SpeciesDef d) { return d.id; } internal bool <ParadeList>b__12_4(SpeciesDef d) { return d.IsMega; } internal string <ParadeList>b__12_5(SpeciesDef d) { return d.id; } internal string <ParadeList>b__12_6(SpeciesDef d) { return d.megaOf; } internal bool <ModelParade>b__15_0(SpeciesDef d) { return Object.op_Implicit((Object)(object)ZNetScene.instance.GetPrefab(CreatureFactory.PrefabName(d))); } internal bool <MegaTest>b__24_1(SpeciesDef s) { return s.IsMega && s.special != null; } internal string <MegaTest>b__24_2(SpeciesDef s) { return s.id; } } [CompilerGenerated] private sealed class <>c__DisplayClass2_0 { public ConsoleEventArgs args; internal bool <Register>b__71(SpeciesDef f) { return f.stone == args[1].ToLower(); } } [CompilerGenerated] private sealed class <>c__DisplayClass2_1 { public ConsoleEventArgs args; internal bool <Register>b__82(FossilDef f) { return args.Length < 2 || f.id.ToLower() == args[1].ToLower(); } } [CompilerGenerated] private sealed class <>c__DisplayClass2_2 { public Player p; internal float <Register>b__87(CampDecor c) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) return Vector3.Distance(((Component)c).transform.position, ((Component)p).transform.position); } } [CompilerGenerated] private sealed class <>c__DisplayClass2_3 { public Player p; internal float <Register>b__90(ZDO z) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) return Vector3.Distance(z.GetPosition(), ((Component)p).transform.position); } } private static readonly string[] PlayerCommands = new string[6] { "ph_help", "ph_box", "ph_summon", "ph_recall", "ph_region", "ph_dmglog" }; private static readonly string[] Help = new string[43] { "ph_help - this list", "ph_dmglog - toggle the on-screen panel of the last 15 move hits with every multiplier (also in the log while on)", "ph_selftest - check stat, XP, catch, type-chart and mega math", "ph_box - list your belt sockets", "ph_reload - re-read the JSON files (numbers, moves, chart; not new species/colors/recipes)", "ph_give <species> [level] - a bound rune holding a new Runemon (cheat)", "ph_spawn <species> [level] - spawn a wild one in front of you (cheat)", "ph_shrinefight [group|member] - spawn an altar group around you (default: the first group, birds); the reward is for the member named (cheat)", "ph_bosscheck [species id] - what any altar member's special does to you; no id = each fight near you: members' flight phase, dormancy, mechanic state (cheat)", "ph_fly on|off - flying altar members (role flight) within 40 m take off and circle you, or land (cheat)", "ph_perf on|off - log fps, players, Runemon counts and our code's ms per second every 5 s (LogOutput.log)", "ph_perf_toggle <animators|renderers|shadows|flight|specials|event> - switch one altar-bird subsystem off/on to find what costs frame rate (cheat)", "ph_mythical <species> - force a mythical sighting near you now (conditions skipped; real level) (cheat)", "ph_spawnall [level] - spawn one of every species in a ring around you (cheat)", "ph_attackparade [<n> [seconds]] / random [n] [seconds] / pause / stop - look check: each model in turn spawns 8 m ahead and uses its attack on you (real damage; vanilla 'heal' restores you), then shows its support look, then is removed; default 6 s each (cheat)", "ph_parade [<n> [seconds]] / ph_parade pause / ph_parade stop - model check: every model (species, each Mega after its base) 3 at a time, labelled '#<n> <id>', next 3 every 0.75 s (or the seconds given); n starts at that index; pause toggles; 'ph_parade random [n] [seconds]' shows n random models (default 50, 4 s) (cheat)", "ph_clear - remove every wild Runemon that is loaded around you (companions stay) (cheat)", "ph_region - the region you stand in and its Runemon with their spawn chances", "ph_kit - a Rune Belt, every Warden Rune, 20 of every rune, 20 of every Spirit (cheat)", "ph_summon <socket #> / ph_recall <socket #> - send out / call back", "ph_level <socket 1-3> <level> - set a party Runemon's level, up or down (then Evolve in the party menu) (cheat)", "ph_evoitems [count] - every evolution item (cheat)", "ph_fossil [ancient|archaic] [count] - fossils (default: one of each) (cheat)", "ph_items - drop one of each modded item in front of you, to see their models (cheat)", "ph_master - spawn The Master in front of you (cheat)", "ph_camp - log every part of the nearest Master camp (position, meshes shown, meshes missing)", "ph_find master|monument|altar [group] - pin the nearest Master camp / fossil monument / altar of a group (default birds) the game has data for (host) (cheat)", "ph_bosstest <group>|restore - teleport to that altar with the gear, foods and party a player would have for its fight (Data/bosstest.json); restore gives your own back (host) (cheat)", "ph_bossattack <kind>|all [dry] - the nearest Pokémon fires a demo boss attack (projectile, lob, strike, zone, wave) at you; dry = no damage (cheat)", "ph_trade <socket #> - make a party Runemon count as traded (OT 'Trader') to test trade evolutions (cheat)", "ph_xp <socket #> <amount> - give XP (up to the level cap) (cheat)", "ph_heal - revive and fully heal your party (cheat)", "ph_givemega <stone> [level] - that Mega Stone + a bound rune of a Runemon that uses it (default Lv50) (cheat)", "ph_special - the special move is ready again (cheat)", "ph_support <move> - your first Runemon out casts that support move now, ignoring gear, trigger and cooldown (cheat)", "ph_stance <move> - you get that mythical stance now, no cooldown (cheat)", "ph_tint <hue> <saturation> <value> - recolor the nearest creature live and print the JSON values (cheat)", "ph_movefx <move> - play a move's visuals and sounds from your first party creature out (or you) at a spot ahead", "ph_look <look> - play one vanilla-style move look (Data/looks.json) from your first party creature out (or you) at a spot ahead", "ph_lookgallery - every move look in turn, one every 2.5 s, named on screen (again = stop)", "ph_dumpattacks - write vanilla-attacks.md (creature attacks, projectiles, Aoes, fx names) next to the plugin DLL", "ph_dumpprefabs [filter] - log every vanilla prefab name (projectiles, Aoes, fx_/vfx_/sfx_) once per line, for the boss attacks; filter keeps names containing it (LogOutput.log)", "ph_animinfo <species or vanilla prefab> - list a body's animation clips and events (for the model pipeline)" }; private static Coroutine _modelParade; private static bool _paradePaused; private static readonly List<GameObject> _paradeShown = new List<GameObject>(); public static void Register() { //IL_0034: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_009c: Expected O, but got Unknown //IL_00df: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_0133: Expected O, but got Unknown //IL_015a: 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_0165: Expected O, but got Unknown //IL_018d: 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_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown //IL_01e4: 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_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Expected O, but got Unknown //IL_023b: 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_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Expected O, but got Unknown //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Expected O, but got Unknown //IL_0292: 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_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Expected O, but got Unknown //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Expected O, but got Unknown //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Expected O, but got Unknown //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Expected O, but got Unknown //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Expected O, but got Unknown //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Expected O, but got Unknown //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Expected O, but got Unknown //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Expected O, but got Unknown //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Expected O, but got Unknown //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Expected O, but got Unknown //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Expected O, but got Unknown //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Expected O, but got Unknown //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Expected O, but got Unknown //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Expected O, but got Unknown //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Expected O, but got Unknown //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_055f: Expected O, but got Unknown //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Expected O, but got Unknown //IL_05b9: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Expected O, but got Unknown //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_05dd: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Expected O, but got Unknown //IL_062b: Unknown result type (might be due to invalid IL or missing references) //IL_0616: Unknown result type (might be due to invalid IL or missing references) //IL_061b: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Expected O, but got Unknown //IL_0664: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_0654: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Expected O, but got Unknown //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_0693: Expected O, but got Unknown //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Expected O, but got Unknown //IL_06df: Unknown result type (might be due to invalid IL or missing references) //IL_06e4: Unknown result type (might be due to invalid IL or missing references) //IL_06ea: Expected O, but got Unknown //IL_0712: Unknown result type (might be due to invalid IL or missing references) //IL_0704: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Expected O, but got Unknown //IL_074b: Unknown result type (might be due to invalid IL or missing references) //IL_0736: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_0741: Expected O, but got Unknown //IL_076f: Unknown result type (might be due to invalid IL or missing references) //IL_0774: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Expected O, but got Unknown //IL_07a2: Unknown result type (might be due to invalid IL or missing references) //IL_0794: Unknown result type (might be due to invalid IL or missing references) //IL_0799: Unknown result type (might be due to invalid IL or missing references) //IL_079f: Expected O, but got Unknown //IL_07c6: Unknown result type (might be due to invalid IL or missing references) //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07d1: Expected O, but got Unknown //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_07eb: Unknown result type (might be due to invalid IL or missing references) //IL_07f0: Unknown result type (might be due to invalid IL or missing references) //IL_07f6: Expected O, but got Unknown //IL_0832: Unknown result type (might be due to invalid IL or missing references) //IL_081d: Unknown result type (might be due to invalid IL or missing references) //IL_0822: Unknown result type (might be due to invalid IL or missing references) //IL_0828: Expected O, but got Unknown //IL_086b: Unknown result type (might be due to invalid IL or missing references) //IL_0856: Unknown result type (might be due to invalid IL or missing references) //IL_085b: Unknown result type (might be due to invalid IL or missing references) //IL_0861: Expected O, but got Unknown //IL_088f: Unknown result type (might be due to invalid IL or missing references) //IL_0894: Unknown result type (might be due to invalid IL or missing references) //IL_089a: Expected O, but got Unknown //IL_08c2: Unknown result type (might be due to invalid IL or missing references) //IL_08b4: Unknown result type (might be due to invalid IL or missing references) //IL_08b9: Unknown result type (might be due to invalid IL or missing references) //IL_08bf: Expected O, but got Unknown //IL_08fb: Unknown result type (might be due to invalid IL or missing references) //IL_08e6: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_08f1: Expected O, but got Unknown //IL_0934: Unknown result type (might be due to invalid IL or missing references) //IL_091f: Unknown result type (might be due to invalid IL or missing references) //IL_0924: Unknown result type (might be due to invalid IL or missing references) //IL_092a: Expected O, but got Unknown //IL_096d: Unknown result type (might be due to invalid IL or missing references) //IL_0958: Unknown result type (might be due to invalid IL or missing references) //IL_095d: Unknown result type (might be due to invalid IL or missing references) //IL_0963: Expected O, but got Unknown //IL_0991: Unknown result type (might be due to invalid IL or missing references) //IL_0996: Unknown result type (might be due to invalid IL or missing references) //IL_099c: Expected O, but got Unknown //IL_09c4: Unknown result type (might be due to invalid IL or missing references) //IL_09db: Unknown result type (might be due to invalid IL or missing references) //IL_09b6: Unknown result type (might be due to invalid IL or missing references) //IL_09bb: Unknown result type (might be due to invalid IL or missing references) //IL_09c1: Expected O, but got Unknown //IL_0a0d: Expected O, but got Unknown //IL_0a08: Unknown result type (might be due to invalid IL or missing references) //IL_0a1f: Unknown result type (might be due to invalid IL or missing references) //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_09ff: Unknown result type (might be due to invalid IL or missing references) //IL_0a05: Expected O, but got Unknown //IL_0a51: Expected O, but got Unknown //IL_0a4c: Unknown result type (might be due to invalid IL or missing references) //IL_0a3e: Unknown result type (might be due to invalid IL or missing references) //IL_0a43: Unknown result type (might be due to invalid IL or missing references) //IL_0a49: Expected O, but got Unknown //IL_0a85: Unknown result type (might be due to invalid IL or missing references) //IL_0a70: Unknown result type (might be due to invalid IL or missing references) //IL_0a75: Unknown result type (might be due to invalid IL or missing references) //IL_0a7b: Expected O, but got Unknown //IL_0abe: Unknown result type (might be due to invalid IL or missing references) //IL_0aa9: Unknown result type (might be due to invalid IL or missing references) //IL_0aae: Unknown result type (might be due to invalid IL or missing references) //IL_0ab4: Expected O, but got Unknown //IL_0af7: Unknown result type (might be due to invalid IL or missing references) //IL_0ae2: Unknown result type (might be due to invalid IL or missing references) //IL_0ae7: Unknown result type (might be due to invalid IL or missing references) //IL_0aed: Expected O, but got Unknown //IL_0b30: Unknown result type (might be due to invalid IL or missing references) //IL_0b1b: Unknown result type (might be due to invalid IL or missing references) //IL_0b20: Unknown result type (might be due to invalid IL or missing references) //IL_0b26: Expected O, but got Unknown //IL_0b69: Unknown result type (might be due to invalid IL or missing references) //IL_0b54: Unknown result type (might be due to invalid IL or missing references) //IL_0b59: Unknown result type (might be due to invalid IL or missing references) //IL_0b5f: Expected O, but got Unknown //IL_0ba2: Unknown result type (might be due to invalid IL or missing references) //IL_0bb9: Unknown result type (might be due to invalid IL or missing references) //IL_0bcd: Expected O, but got Unknown //IL_0bc8: Unknown result type (might be due to invalid IL or missing references) //IL_0b8d: Unknown result type (might be due to invalid IL or missing references) //IL_0b92: Unknown result type (might be due to invalid IL or missing references) //IL_0b98: Expected O, but got Unknown object obj = <>c.<>9__2_0; if (obj == null) { ConsoleEvent val = delegate(ConsoleEventArgs args) { bool flag = Object.op_Implicit((Object)(object)Console.instance) && ((Terminal)Console.instance).IsCheatsEnabled(); string[] help = Help; foreach (string text in help) { if (flag || PlayerCommands.Contains(text.Split(new char[1] { ' ' })[0])) { args.Context.AddString(" " + text); } } }; <>c.<>9__2_0 = val; obj = (object)val; } new ConsoleCommand("ph_help", "Runemons: list the Runemons commands", (ConsoleEvent)obj, false, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj2 = <>c.<>9__2_1; if (obj2 == null) { ConsoleEvent val2 = delegate(ConsoleEventArgs args) { DmgLog.Show = !DmgLog.Show; args.Context.AddString("Runemons damage log: " + (DmgLog.Show ? "on" : "off")); }; <>c.<>9__2_1 = val2; obj2 = (object)val2; } new ConsoleCommand("ph_dmglog", "Runemons: toggle the damage log panel", (ConsoleEvent)obj2, false, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj3 = <>c.<>9__2_2; if (obj3 == null) { ConsoleEvent val3 = delegate(ConsoleEventArgs args) { string text = Stats.SelfTest() + ChartTest() + MegaTest(); string text2 = string.Join(", ", from d in GameData.Species.Values where d.InDex && !d.inGame select d.id into i orderby i select i); if (GameData.Species.Count > 0 && text2 != "arceus, mewtwo") { text = text + "coming-soon list: got [" + text2 + "], want [arceus, mewtwo]\n"; } Logger.LogInfo((object)("[Pokeheim] coming-soon list: " + text2)); args.Context.AddString((text == "") ? "Runemons selftest: all passed" : ("Runemons selftest FAILED:\n" + text)); Logger.LogInfo((object)("[Pokeheim] selftest: " + ((text == "") ? "all passed" : ("FAILED\n" + text)))); }; <>c.<>9__2_2 = val3; obj3 = (object)val3; } new ConsoleCommand("ph_selftest", "Runemons: check the stat/XP/catch/type-chart formulas", (ConsoleEvent)obj3, true, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj4 = <>c.<>9__2_3; if (obj4 == null) { ConsoleEvent val4 = delegate(ConsoleEventArgs args) { GameData.Reload(); Regions.Rebuild(); MoveEffects.Reload(); Special.Reload(); args.Context.AddString($"Reloaded: {GameData.Species.Count} species, {GameData.Moves.Count} moves. New species, colors and recipes need a restart."); }; <>c.<>9__2_3 = val4; obj4 = (object)val4; } new ConsoleCommand("ph_reload", "Runemons: re-read the JSON data files", (ConsoleEvent)obj4, true, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj5 = <>c.<>9__2_4; if (obj5 == null) { ConsoleEvent val5 = delegate(ConsoleEventArgs args) { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) if (args.Length < 2 || !GameData.Species.TryGetValue(args[1].ToLower(), out var value)) { args.Context.AddString("Usage: ph_spawn <species> [level]. Species: " + string.Join(", ", GameData.Species.Keys)); } else { Player localPlayer = Player.m_localPlayer; args.Context.AddString("Spawned " + SpawnWild(value, args.TryParameterInt(2, Random.Range(2, 11)), ((Component)localPlayer).transform.position + ((Component)localPlayer).transform.forward * 3f)); } }; <>c.<>9__2_4 = val5; obj5 = (object)val5; } object obj6 = <>c.<>9__2_5; if (obj6 == null) { ConsoleOptionsFetcher val6 = () => new List<string>(GameData.Species.Keys); <>c.<>9__2_5 = val6; obj6 = (object)val6; } new ConsoleCommand("ph_spawn", "<species> [level] Runemons: spawn a wild creature in front of you", (ConsoleEvent)obj5, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj6, false, false, false); object obj7 = <>c.<>9__2_6; if (obj7 == null) { ConsoleEvent val7 = delegate(ConsoleEventArgs args) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) args.Context.AddString(Legendary.Command((args.Length > 1) ? args[1].ToLower() : "", ((Component)Player.m_localPlayer).transform.position, Player.m_localPlayer.GetPlayerName())); }; <>c.<>9__2_6 = val7; obj7 = (object)val7; } object obj8 = <>c.<>9__2_7; if (obj8 == null) { ConsoleOptionsFetcher val8 = () => Altars.All.Select((AltarDef a) => a.id).Concat(Altars.All.SelectMany(Legendary.Members)).ToList(); <>c.<>9__2_7 = val8; obj8 = (object)val8; } new ConsoleCommand("ph_shrinefight", "[group|member] Runemons: spawn an altar's boss group around you", (ConsoleEvent)obj7, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj8, false, false, false); object obj9 = <>c.<>9__2_8; if (obj9 == null) { ConsoleEvent val9 = delegate(ConsoleEventArgs args) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (args.Length < 2 && Object.op_Implicit((Object)(object)Player.m_localPlayer)) { Terminal context = args.Context; string text = BossFight.Report(((Component)Player.m_localPlayer).transform.position); context.AddString((text != null && text.Length > 0) ? text : "No altar boss near you. Give a species id: ph_bosscheck articuno"); } else { args.Context.AddString(Legendary.Check((args.Length > 1) ? args[1].ToLower() : "")); } }; <>c.<>9__2_8 = val9; obj9 = (object)val9; } object obj10 = <>c.<>9__2_9; if (obj10 == null) { ConsoleOptionsFetcher val10 = () => Altars.All.SelectMany(Legendary.Members).ToList(); <>c.<>9__2_9 = val10; obj10 = (object)val10; } new ConsoleCommand("ph_bosscheck", "[species id] Runemons: what an altar member's special does to you (level, health, capped hit); no id = state of altar fights near you", (ConsoleEvent)obj9, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj10, false, false, false); object obj11 = <>c.<>9__2_10; if (obj11 == null) { ConsoleEvent val11 = delegate(ConsoleEventArgs args) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) args.Context.AddString(BirdFlight.Command(args.Length > 1 && args[1].ToLower() == "on", ((Component)Player.m_localPlayer).transform.position)); }; <>c.<>9__2_10 = val11; obj11 = (object)val11; } object obj12 = <>c.<>9__2_11; if (obj12 == null) { ConsoleOptionsFetcher val12 = () => new List<string> { "on", "off" }; <>c.<>9__2_11 = val12; obj12 = (object)val12; } new ConsoleCommand("ph_fly", "on|off Runemons: altar bosses near you take off or land", (ConsoleEvent)obj11, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj12, false, false, false); object obj13 = <>c.<>9__2_12; if (obj13 == null) { ConsoleEvent val13 = delegate(ConsoleEventArgs args) { Perf.Logging = ((args.Length > 1) ? (args[1].ToLower() == "on") : (!Perf.Logging)); Logger.LogInfo((object)("[Pokeheim] ph_perf logging " + (Perf.Logging ? "on" : "off"))); args.Context.AddString("ph_perf logging " + (Perf.Logging ? "on: a line every 5 s in LogOutput.log" : "off")); }; <>c.<>9__2_12 = val13; obj13 = (object)val13; } object obj14 = <>c.<>9__2_13; if (obj14 == null) { ConsoleOptionsFetcher val14 = () => new List<string> { "on", "off" }; <>c.<>9__2_13 = val14; obj14 = (object)val14; } new ConsoleCommand("ph_perf", "on|off Runemons: log fps, players, Runemon counts and our code's ms every 5 s", (ConsoleEvent)obj13, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj14, false, false, false); object obj15 = <>c.<>9__2_14; if (obj15 == null) { ConsoleEvent val15 = delegate(ConsoleEventArgs args) { args.Context.AddString(Perf.Toggle((args.Length > 1) ? args[1].ToLower() : "")); }; <>c.<>9__2_14 = val15; obj15 = (object)val15; } object obj16 = <>c.<>9__2_15; if (obj16 == null) { ConsoleOptionsFetcher val16 = () => Perf.Switches.ToList(); <>c.<>9__2_15 = val16; obj16 = (object)val16; } new ConsoleCommand("ph_perf_toggle", "<animators|renderers|shadows|flight|specials|event> Runemons: switch one altar-bird subsystem off/on to find what costs frame rate; no name lists them", (ConsoleEvent)obj15, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj16, false, false, false); object obj17 = <>c.<>9__2_16; if (obj17 == null) { ConsoleEvent val17 = delegate(ConsoleEventArgs args) { if (args.Length < 2 || !GameData.Species.TryGetValue(args[1].ToLower(), out var value) || value.sighting == null) { args.Context.AddString("Usage: ph_mythical <species>. Mythicals: " + string.Join(", ", Sightings.Mythicals.Select((SpeciesDef d) => d.id))); } else { Player localPlayer = Player.m_localPlayer; Logger.LogInfo((object)("[Pokeheim] ph_mythical " + value.id + ": conditions " + (Sightings.Holds(value, localPlayer) ? "hold" : "do not hold") + " here")); args.Context.AddString(Sightings.Spawn(value, localPlayer) ?? "No dry ground in its biome 30-50 m away."); } }; <>c.<>9__2_16 = val17; obj17 = (object)val17; } object obj18 = <>c.<>9__2_17; if (obj18 == null) { ConsoleOptionsFetcher val18 = () => Sightings.Mythicals.Select((SpeciesDef d) => d.id).ToList(); <>c.<>9__2_17 = val18; obj18 = (object)val18; } new ConsoleCommand("ph_mythical", "<species> Runemons: force a mythical sighting near you", (ConsoleEvent)obj17, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj18, false, false, false); object obj19 = <>c.<>9__2_18; if (obj19 == null) { ConsoleEvent val19 = delegate(ConsoleEventArgs args) { //IL_0084: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) Player localPlayer = Player.m_localPlayer; List<SpeciesDef> list = GameData.Species.Values.Where((SpeciesDef d) => d.InDex).ToList(); int num = args.TryParameterInt(1, 5); int num2 = 0; int count = list.Count; foreach (SpeciesDef item in list) { float num3 = (float)num2++ * (float)Math.PI * 2f / (float)count; SpawnWild(item, num, ((Component)localPlayer).transform.position + new Vector3(Mathf.Cos(num3), 0f, Mathf.Sin(num3)) * 8f); } args.Context.AddString($"Spawned {count} creatures at level {num}."); }; <>c.<>9__2_18 = val19; obj19 = (object)val19; } new ConsoleCommand("ph_spawnall", "[level] Runemons: spawn one of every species around you", (ConsoleEvent)obj19, true, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj20 = <>c.<>9__2_19; if (obj20 == null) { ConsoleEvent val20 = delegate(ConsoleEventArgs args) { Player localPlayer = Player.m_localPlayer; string text = ((args.Length > 1) ? args[1].ToLower() : ""); if (text == "pause") { if (_modelParade == null) { args.Context.AddString("ph_parade is not running."); } else { _paradePaused = !_paradePaused; args.Context.AddString(_paradePaused ? "ph_parade paused ('ph_parade pause' again to go on)." : "ph_parade going on."); Logger.LogInfo((object)("[Pokeheim] parade " + (_paradePaused ? "paused" : "resumed"))); } } else { bool flag = _modelParade != null; StopModelParade(localPlayer); if (text == "stop") { args.Context.AddString(flag ? "ph_parade stopped." : "ph_parade is not running."); } else { List<SpeciesDef> list = ParadeList(); if (text == "random") { int num = Mathf.Clamp(args.TryParameterInt(2, 50), 1, list.Count); float num2 = Mathf.Max(0.1f, args.TryParameterFloat(3, 4f)); List<SpeciesDef> all = list.OrderBy((SpeciesDef _) => Random.value).Take(num).ToList(); _paradePaused = false; _modelParade = ((MonoBehaviour)localPlayer).StartCoroutine(ModelParade(all, 0, num2)); args.Context.AddString($"ph_parade random: {num} models, 3 every {num2:0.##} s. 'ph_parade pause' / 'ph_parade stop'."); Logger.LogInfo((object)$"[Pokeheim] parade random started: {num} models, every {num2:0.##} s"); } else { int num3 = args.TryParameterInt(1, 1); if (num3 < 1 || num3 > list.Count) { args.Context.AddString($"Usage: ph_parade [<1-{list.Count}> [seconds]] | pause | stop"); } else { float num4 = Mathf.Max(0.1f, args.TryParameterFloat(2, 0.75f)); _paradePaused = false; _modelParade = ((MonoBehaviour)localPlayer).StartCoroutine(ModelParade(list, num3 - 1, num4)); args.Context.AddString($"ph_parade: #{num3} to #{list.Count}, 3 every {num4:0.##} s (~{(float)(list.Count - num3 + 1) / 3f * num4 / 60f:0} min). 'ph_parade pause' / 'ph_parade stop'."); Logger.LogInfo((object)$"[Pokeheim] parade started at #{num3} {list[num3 - 1].id} of {list.Count}, every {num4:0.##} s"); } } } } }; <>c.<>9__2_19 = val20; obj20 = (object)val20; } object obj21 = <>c.<>9__2_20; if (obj21 == null) { ConsoleOptionsFetcher val21 = () => new List<string> { "stop", "pause", "random" }; <>c.<>9__2_20 = val21; obj21 = (object)val21; } new ConsoleCommand("ph_parade", "[<n> [seconds]] | pause | stop Runemons: show every model 3 at a time (model check)", (ConsoleEvent)obj20, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj21, false, false, false); object obj22 = <>c.<>9__2_21; if (obj22 == null) { ConsoleEvent val22 = delegate(ConsoleEventArgs args) { Player localPlayer = Player.m_localPlayer; if (Object.op_Implicit((Object)(object)localPlayer)) { string text = ((args.Length > 1) ? args[1].ToLower() : ""); if (text == "pause") { if (_modelParade == null) { args.Context.AddString("ph_attackparade is not running."); } else { _paradePaused = !_paradePaused; args.Context.AddString(_paradePaused ? "ph_attackparade paused ('ph_attackparade pause' again to go on)." : "ph_attackparade going on."); Logger.LogInfo((object)("[Pokeheim] attackparade " + (_paradePaused ? "paused" : "resumed"))); } } else { bool flag = _modelParade != null; StopModelParade(localPlayer); if (text == "stop") { args.Context.AddString(flag ? "ph_attackparade stopped." : "ph_attackparade is not running."); } else { List<SpeciesDef> list = ParadeList(); if (text == "random") { int num = Mathf.Clamp(args.TryParameterInt(2, 50), 1, list.Count); float num2 = Mathf.Max(3f, args.TryParameterFloat(3, 6f)); List<SpeciesDef> all = list.OrderBy((SpeciesDef _) => Random.value).Take(num).ToList(); _paradePaused = false; _modelParade = ((MonoBehaviour)localPlayer).StartCoroutine(AttackParade(all, 0, num2)); args.Context.AddString($"ph_attackparade random: {num} models, {num2:0.#} s each. 'ph_attackparade pause' / 'ph_attackparade stop'."); Logger.LogInfo((object)$"[Pokeheim] attackparade random started: {num} models, {num2:0.#} s each"); } else { int num3 = args.TryParameterInt(1, 1); if (num3 < 1 || num3 > list.Count) { args.Context.AddString($"Usage: ph_attackparade [<1-{list.Count}> [seconds]] | random [n] [seconds] | pause | stop"); } else { float num4 = Mathf.Max(3f, args.TryParameterFloat(2, 6f)); _paradePaused = false; _modelParade = ((MonoBehaviour)localPlayer).StartCoroutine(AttackParade(list, num3 - 1, num4)); args.Context.AddString($"ph_attackparade: #{num3} to #{list.Count}, {num4:0.#} s each (~{(float)(list.Count - num3 + 1) * num4 / 60f:0} min). Type 'heal' to heal yourself; 'ph_attackparade pause' / 'ph_attackparade stop'."); Logger.LogInfo((object)$"[Pokeheim] attackparade started at #{num3} {list[num3 - 1].id} of {list.Count}, {num4:0.#} s each"); } } } } } }; <>c.<>9__2_21 = val22; obj22 = (object)val22; } object obj23 = <>c.<>9__2_22; if (obj23 == null) { ConsoleOptionsFetcher val23 = () => new List<string> { "stop", "pause", "random" }; <>c.<>9__2_22 = val23; obj23 = (object)val23; } new ConsoleCommand("ph_attackparade", "[<n> [seconds]] | random [n] [seconds] | pause | stop Runemons: each model attacks you in turn (move look check)", (ConsoleEvent)obj22, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj23, false, false, false); object obj24 = <>c.<>9__2_23; if (obj24 == null) { ConsoleEvent val24 = delegate(ConsoleEventArgs args) { int num = 0; PokeCreature[] array = Object.FindObjectsByType<PokeCreature>((FindObjectsSortMode)0); foreach (PokeCreature pokeCreature in array) { if (pokeCreature.IsWild) { ZNetView component = ((Component)pokeCreature).GetComponent<ZNetView>(); if (Object.op_Implicit((Object)(object)component) && component.IsValid()) { component.ClaimOwnership(); ZNetScene.instance.Destroy(((Component)pokeCreature).gameObject); num++; } } } Logger.LogInfo((object)$"[Pokeheim] ph_clear: removed {num} wild creatures"); args.Context.AddString($"Removed {num} wild Runemon (only ones loaded near you; companions untouched)."); }; <>c.<>9__2_23 = val24; obj24 = (object)val24; } new ConsoleCommand("ph_clear", "Runemons: despawn every loaded wild Runemon (companions stay)", (ConsoleEvent)obj24, true, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj25 = <>c.<>9__2_24; if (obj25 == null) { ConsoleEvent val25 = delegate(ConsoleEventArgs args) { //IL_000b: 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) Region region = Regions.At(((Component)Player.m_localPlayer).transform.position); args.Context.AddString((!Regions.Ready) ? "Regions are still being built, try again in a few seconds." : ((region == null) ? "No region here (ocean?)." : ($"{region.name} ({region.biome}, {Regions.All.Count} regions in this world): " + string.Join(", ", region.cohort.Select(((SpeciesDef def, float chance) x) => x.def.name + " " + Regions.Pct(x.chance) + (Regions.IsWaterSpecies(x.def) ? " (water)" : "")))))); }; <>c.<>9__2_24 = val25; obj25 = (object)val25; } new ConsoleCommand("ph_region", "Runemons: the region you stand in and its spawn chances", (ConsoleEvent)obj25, false, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj26 = <>c.<>9__2_25; if (obj26 == null) { ConsoleEvent val26 = delegate(ConsoleEventArgs args) { Inventory inventory = ((Humanoid)Player.m_localPlayer).GetInventory(); Give(inventory, "PH_Belt", 1); foreach (TrainerRuneDef rune in GameData.Items.trainerRunes.runes) { Give(inventory, GameData.TrainerRuneId(rune.tier), 1); } foreach (RuneDef rune2 in GameData.Items.runes) { Give(inventory, GameData.RuneId(rune2.biome), 20); } foreach (SpiritDef spirit in GameData.Items.spirits) { Give(inventory, GameData.SpiritId(spirit.biome), 20); } foreach (FoodDef food in GameData.Items.foods) { Give(inventory, food.id, 5); } args.Context.AddString("Kit added (whatever fits in your inventory)."); }; <>c.<>9__2_25 = val26; obj26 = (object)val26; } new ConsoleCommand("ph_kit", "Runemons: get the belt, runes, Spirits and Warden Runes for testing", (ConsoleEvent)obj26, true, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj27 = <>c.<>9__2_26; if (obj27 == null) { ConsoleEvent val27 = delegate(ConsoleEventArgs args) { BoxData data = Box.Data; if (data == null) { args.Context.AddString("No player."); } else { args.Context.AddString(string.Format("Belt {0}, Warden Rune {1} (level cap {2}), seen {3}, caught {4}", Belt.Worn() ? "worn" : "NOT worn (sockets locked)", data.trainer, Belt.LevelCap, data.seen.Count, data.caught.Count)); for (int i = 0; i < 3; i++) { Mon mon = Box.InSocket(i); args.Context.AddString(string.Format(" {0}. {1}", i + 1, (mon == null) ? "empty" : (mon.Summary() + (mon.fainted ? " [fainted]" : "") + (Party.IsOut(mon) ? " [out]" : "")))); } } }; <>c.<>9__2_26 = val27; obj27 = (object)val27; } new ConsoleCommand("ph_box", "Runemons: list your belt sockets", (ConsoleEvent)obj27, false, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj28 = <>c.<>9__2_27; if (obj28 == null) { ConsoleEvent val28 = delegate(ConsoleEventArgs args) { if (args.Length < 2 || !GameData.Species.TryGetValue(args[1].ToLower(), out var value)) { args.Context.AddString("Usage: ph_give <species> [level]. Species: " + string.Join(", ", GameData.Species.Keys)); } else { args.Context.AddString(GiveMon(value, args.TryParameterInt(2, GameData.BandFor(value).minLevel))); } }; <>c.<>9__2_27 = val28; obj28 = (object)val28; } object obj29 = <>c.<>9__2_28; if (obj29 == null) { ConsoleOptionsFetcher val29 = () => GameData.Species.Keys.ToList(); <>c.<>9__2_28 = val29; obj29 = (object)val29; } new ConsoleCommand("ph_give", "<species> [level] Runemons: a bound rune holding a new Runemon", (ConsoleEvent)obj28, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj29, false, false, false); object obj30 = <>c.<>9__2_29; if (obj30 == null) { ConsoleEvent val30 = delegate(ConsoleEventArgs args) { SpeciesDef speciesDef = ((args.Length < 2) ? null : GameData.Megas.Values.SelectMany((List<SpeciesDef> l) => l).FirstOrDefault((SpeciesDef f) => f.stone == args[1].ToLower())); if (speciesDef == null) { args.Context.AddString("Usage: ph_givemega <stone> [level]. Stones: " + string.Join(", ", GameData.Items.megaStones.Select((MegaStoneDef s) => s.id))); } else { Give(((Humanoid)Player.m_localPlayer).GetInventory(), GameData.MegaStoneId(speciesDef.stone), 1); args.Context.AddString(Mega.StoneName(speciesDef.stone) + " + " + GiveMon(GameData.Species[speciesDef.megaOf], args.TryParameterInt(2, 50))); } }; <>c.<>9__2_29 = val30; obj30 = (object)val30; } object obj31 = <>c.<>9__2_30; if (obj31 == null) { ConsoleOptionsFetcher val31 = () => GameData.Items.megaStones.Select((MegaStoneDef s) => s.id).ToList(); <>c.<>9__2_30 = val31; obj31 = (object)val31; } new ConsoleCommand("ph_givemega", "<stone> [level] Runemons: a Mega Stone and a bound rune of a Runemon that uses it", (ConsoleEvent)obj30, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj31, false, false, false); object obj32 = <>c.<>9__2_31; if (obj32 == null) { ConsoleEvent val32 = delegate(ConsoleEventArgs args) { if (Box.Data != null) { Box.Data.specialLeft = 0f; Box.Save(); Logger.LogInfo((object)"[Pokeheim] ph_special: special cooldown reset"); args.Context.AddString("Special move ready."); } }; <>c.<>9__2_31 = val32; obj32 = (object)val32; } new ConsoleCommand("ph_special", "Runemons: the special move is ready again (resets its cooldown)", (ConsoleEvent)obj32, true, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj33 = <>c.<>9__2_32; if (obj33 == null) { ConsoleEvent val33 = delegate(ConsoleEventArgs args) { Mon mon = BoxEntry(args); if (mon != null) { string text = (Party.IsOut(mon) ? null : Party.Toggle(mon)); args.Context.AddString(text ?? ("Go, " + mon.Def.name + "!")); } }; <>c.<>9__2_32 = val33; obj33 = (object)val33; } new ConsoleCommand("ph_summon", "<socket #> Runemons: send a socketed Runemon out", (ConsoleEvent)obj33, false, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj34 = <>c.<>9__2_33; if (obj34 == null) { ConsoleEvent val34 = delegate(ConsoleEventArgs args) { Mon mon = BoxEntry(args); if (mon != null && Party.IsOut(mon)) { Party.Toggle(mon); args.Context.AddString(mon.Def.name + ", come back!"); } }; <>c.<>9__2_33 = val34; obj34 = (object)val34; } new ConsoleCommand("ph_recall", "<socket #> Runemons: call a socketed Runemon back", (ConsoleEvent)obj34, false, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj35 = <>c.<>9__2_34; if (obj35 == null) { ConsoleEvent val35 = delegate(ConsoleEventArgs args) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) Player localPlayer = Player.m_localPlayer; if (!Object.op_Implicit((Object)(object)localPlayer) || args.Length < 2 || !GameData.Moves.TryGetValue(args[1], out var value)) { args.Context.AddString("Moves: " + string.Join(", ", GameData.Moves.Keys)); } else { PokeCreature pokeCreature = Party.OutNow().FirstOrDefault(); Vector3 val63 = (Vector3)((!Object.op_Implicit((Object)(object)pokeCreature)) ? ((Character)localPlayer).GetHeadPoint() : (((??)((Component)pokeCreature).GetComponentInChildren<PokeRig>()?.Mouth) ?? pokeCreature.Character.GetCenterPoint())); Vector3 val64 = ((Component)localPlayer).transform.position + ((Component)localPlayer).transform.forward * 8f + Vector3.up; Fx.Play(value.castFx, val63, pokeCreature?.Mon?.Def, MoveLooks.TintOf(value)); if (pokeCreature != null) { ((Component)pokeCreature).GetComponentInChildren<PokeRig>()?.Lunge(); } bool flag = value.kind == "support" && value.trigger != "near"; float num = MoveLooks.Play(value, val63, flag ? ((Component)localPlayer).transform.position : val64, flag ? ((Component)localPlayer).transform : null, 0f, (Character)(Object.op_Implicit((Object)(object)pokeCreature) ? ((object)pokeCreature.Character) : ((object)localPlayer))); Fx.Play(value.hitFx, flag ? ((Character)localPlayer).GetCenterPoint() : val64, pokeCreature?.Mon?.Def, MoveLooks.TintOf(value)); args.Context.AddString((value.Look != null) ? $"{value.name}: look {value.Look.id} ({value.Look.kind}), lands after {num:0.00}s" : ((value.vfx == null) ? (value.name + " has no vfx (vanilla effects only)") : $"{value.name}: {value.vfx.style}, lands after {num:0.00}s")); } }; <>c.<>9__2_34 = val35; obj35 = (object)val35; } object obj36 = <>c.<>9__2_35; if (obj36 == null) { ConsoleOptionsFetcher val36 = () => GameData.Moves.Keys.ToList(); <>c.<>9__2_35 = val36; obj36 = (object)val36; } new ConsoleCommand("ph_movefx", "<move> Runemons: show a move's visuals 8 m ahead (no effect)", (ConsoleEvent)obj35, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj36, false, false, false); object obj37 = <>c.<>9__2_36; if (obj37 == null) { ConsoleEvent val37 = delegate(ConsoleEventArgs args) { if (args.Length < 2 || !GameData.Looks.TryGetValue(args[1], out var value)) { args.Context.AddString("Looks: " + string.Join(", ", GameData.Looks.Keys)); } else { args.Context.AddString(MoveLooks.Show(value)); } }; <>c.<>9__2_36 = val37; obj37 = (object)val37; } object obj38 = <>c.<>9__2_37; if (obj38 == null) { ConsoleOptionsFetcher val38 = () => GameData.Looks.Keys.ToList(); <>c.<>9__2_37 = val38; obj38 = (object)val38; } new ConsoleCommand("ph_look", "<look> Runemons: show a vanilla-style move look 8 m ahead (no effect)", (ConsoleEvent)obj37, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj38, false, false, false); object obj39 = <>c.<>9__2_38; if (obj39 == null) { ConsoleEvent val39 = delegate(ConsoleEventArgs args) { args.Context.AddString(MoveLooks.Gallery()); }; <>c.<>9__2_38 = val39; obj39 = (object)val39; } new ConsoleCommand("ph_lookgallery", "Runemons: show every move look in turn (again = stop)", (ConsoleEvent)obj39, true, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj40 = <>c.<>9__2_39; if (obj40 == null) { ConsoleEvent val40 = delegate(ConsoleEventArgs args) { if (args.Length < 2 || !GameData.Moves.TryGetValue(args[1], out var value) || value.kind != "support") { args.Context.AddString("Support moves: " + string.Join(", ", from m in GameData.Moves.Values where m.kind == "support" select m.id)); } else { args.Context.AddString(Support.Force(value)); } }; <>c.<>9__2_39 = val40; obj40 = (object)val40; } object obj41 = <>c.<>9__2_40; if (obj41 == null) { ConsoleOptionsFetcher val41 = () => (from m in GameData.Moves.Values where m.kind == "support" select m.id).ToList(); <>c.<>9__2_40 = val41; obj41 = (object)val41; } new ConsoleCommand("ph_support", "<move> Runemons: cast a support move now from your first Runemon out", (ConsoleEvent)obj40, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj41, false, false, false); object obj42 = <>c.<>9__2_41; if (obj42 == null) { ConsoleEvent val42 = delegate(ConsoleEventArgs args) { if (args.Length < 2 || !GameData.Moves.TryGetValue(args[1], out var value) || value.kind != "stance") { args.Context.AddString("Stance moves: " + string.Join(", ", from m in GameData.Moves.Values where m.kind == "stance" select m.id)); } else { args.Context.AddString(Stance.Force(value)); } }; <>c.<>9__2_41 = val42; obj42 = (object)val42; } object obj43 = <>c.<>9__2_42; if (obj43 == null) { ConsoleOptionsFetcher val43 = () => (from m in GameData.Moves.Values where m.kind == "stance" select m.id).ToList(); <>c.<>9__2_42 = val43; obj43 = (object)val43; } new ConsoleCommand("ph_stance", "<move> Runemons: start a mythical stance now", (ConsoleEvent)obj42, true, false, false, false, false, false, (ConsoleOptionsFetcher)obj43, false, false, false); object obj44 = <>c.<>9__2_43; if (obj44 == null) { ConsoleEvent val44 = delegate(ConsoleEventArgs args) { Mon mon = BoxEntry(args); if (mon != null) { Progress.SetLevel(mon, args.TryParameterInt(2, mon.level + 1)); Box.Save(); args.Context.AddString(mon.Summary()); } }; <>c.<>9__2_43 = val44; obj44 = (object)val44; } new ConsoleCommand("ph_level", "<box #> <level> Runemons: set a creature's level", (ConsoleEvent)obj44, true, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj45 = <>c.<>9__2_44; if (obj45 == null) { ConsoleEvent val45 = delegate(ConsoleEventArgs args) { Player localPlayer = Player.m_localPlayer; if (Object.op_Implicit((Object)(object)localPlayer)) { int num = args.TryParameterInt(1, 1); foreach (EvoItemDef evoItem in GameData.Items.evoItems) { ((Humanoid)localPlayer).GetInventory().AddItem(ObjectDB.instanc