Decompiled source of Obeliskial Options v2.1.0
BepInEx/plugins/Obeliskial Options.dll
Decompiled 7 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Obeliskial_Essentials; using Photon.Pun; using ProfanityFilter; using Steamworks; using UnityEngine; using UnityEngine.InputSystem; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("com.stiffmeds.obeliskialoptions")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Options to alter gameplay. Define your Obeliskial Options to turn Ottis into the Miss Piggy (or Piss Miggy) of your dreams, and join Malunah, Sharon and their pet rat for glorious adventures!")] [assembly: AssemblyFileVersion("2.1.0.0")] [assembly: AssemblyInformationalVersion("2.1.0")] [assembly: AssemblyProduct("Obeliskial Options")] [assembly: AssemblyTitle("com.stiffmeds.obeliskialoptions")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.1.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Obeliskial_Options { [BepInPlugin("com.stiffmeds.obeliskialoptions", "Obeliskial Options", "2.1.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInProcess("AcrossTheObelisk.exe")] public class Options : BaseUnityPlugin { public const int ModDate = 20240516; private readonly Harmony harmony = new Harmony("com.stiffmeds.obeliskialoptions"); internal static ManualLogSource Log; public static int iShopsWithNoPurchase = 0; private static bool bUpdatingSettings = false; public static string medsDLCCloneTwoSkin = "medsdlctwoa"; public static string medsDLCCloneThreeSkin = "medsdlcthreea"; public static string medsDLCCloneFourSkin = "medsdlcfoura"; public static string medsDLCCloneTwoCardback = "medsdlctwoa"; public static string medsDLCCloneThreeCardback = "medsdlcthreea"; public static string medsDLCCloneFourCardback = "medsdlcfoura"; public static float medsBLPTownTierPower = 5f; public static float medsBLPRollPower = 1f; public static float medsBLPMythicMult = 1f; public static float medsBLPEpicMult = 8f; public static float medsBLPRareMult = 128f; public static float medsBLPUncommonMult = 256f; public static List<string> medsDoNotDropList = new List<string> { "asmody", "asmodyrare", "betty", "bettyrare", "boneclaws", "boneclawsa", "boneclawsb", "boneclawsrare", "brokenitem", "bunny", "bunnyrare", "burneditem", "champy", "champyrare", "chompy", "chompyrare", "chumpy", "chumpyrare", "combatbandages", "combatbandagesa", "combatbandagesb", "armageddon", "armageddona", "armageddonb", "armageddonrare", "ashysky", "ashyskya", "ashyskyb", "ashyskyrare", "backlash", "backlasha", "backlashb", "backlashrare", "bloodpuddle", "bomblottery", "bomblotterya", "bomblotteryb", "bomblotteryrare", "burningweapons", "burningweaponsa", "burningweaponsb", "burningweaponsrare", "chaospuddle", "chaoticwind", "chaoticwinda", "chaoticwindb", "chaoticwindrare", "coldfront", "colorfulpuddle", "colorfulpuddlea", "colorfulpuddleb", "colorfulpuddlerare", "darkpuddle", "deathgrip", "electricpuddle", "empower", "empowera", "empowerb", "empowerrare", "forestallies", "fungaloutbreak", "fungaloutbreaka", "fungaloutbreakb", "fungaloutbreakrare", "heavenlyarmaments", "heavenlyarmamentsa", "heavenlyarmamentsb", "heavenlyarmamentsrare", "heavyweaponry", "heavyweaponrya", "heavyweaponryb", "heavyweaponryrare", "hexproof", "hexproofa", "hexproofb", "hexproofrare", "holypuddle", "hypotermia", "hypotermiaa", "hypotermiab", "hypotermiarare", "icypuddle", "ironclad", "ironclada", "ironcladb", "ironcladrare", "lavabursts", "lavapuddle", "livingforest", "livingforesta", "livingforestb", "livingforestrare", "lonelyblob", "lonelybloba", "lonelyblobb", "lonelyblobrare", "meatfeast", "meatfeasta", "meatfeastb", "melancholy", "melancholya", "melancholyb", "melancholyrare", "metalpuddle", "noxiousparasites", "noxiousparasitesa", "noxiousparasitesb", "noxiousparasitesrare", "pacifism", "pacifisma", "pacifismb", "pacifismrare", "poisonfields", "poisonfieldsa", "poisonfieldsb", "poisonfieldsrare", "putrefaction", "putrefactiona", "putrefactionb", "putrefactionrare", "resurrection", "resurrectiona", "resurrectionb", "revenge", "revengea", "revengeb", "revengerare", "rosegarden", "rosegardena", "rosegardenb", "rosegardenrare", "sacredground", "sacredgrounda", "sacredgroundb", "sacredgroundrare", "snowfall", "snowfalla", "snowfallb", "snowfallrare", "spookynight", "starrynight", "starrynighta", "starrynightb", "starrynightrare", "subzero", "subzeroa", "subzerob", "subzerorare", "sugarrush", "thornproliferation", "thornproliferationa", "thornproliferationb", "thornproliferationrare", "thunderstorm", "thunderstorma", "thunderstormb", "thunderstormrare", "toxicpuddle", "trickortreat", "upwind", "upwinda", "upwindb", "upwindrare", "vigorous", "vigorousa", "vigorousb", "vigorousrare", "waterpuddle", "windsofamnesia", "windsofamnesiaa", "windsofamnesiab", "windsofamnesiarare", "cursedjewelering", "daley", "daleyrare", "bloodblobpet", "bloodblobpetrare", "chaosblobpet", "chaosblobpetrare", "darkblobpet", "darkblobpetrare", "electricblobpet", "electricblobpetrare", "holyblobpet", "holyblobpetrare", "icyblobpet", "icyblobpetrare", "lavablobpet", "lavablobpetrare", "metalblobpet", "metalblobpetrare", "toxicblobpet", "toxicblobpetrare", "waterblobpet", "waterblobpetrare", "familyjewels", "familyjewelsa", "familyjewelsb", "flamy", "flamyrare", "forestbanner", "forestbannera", "forestbannerb", "harley", "harleya", "harleyb", "harleyrare", "heavypackage", "hightchancellorstaff", "hightchancellorstaffa", "hightchancellorstaffb", "hightchancellorstaffrare", "jinglebell", "jinglebella", "jinglebellb", "liante", "lianterare", "meatbag", "meatbaga", "meatbagb", "mozzy", "mozzyrare", "oculy", "oculyrare", "orby", "orbyrare", "powerglove", "powerglovea", "powergloveb", "prophetstaff", "prophetstaffa", "prophetstaffb", "prophetstaffrare", "raggeddoll", "raggeddolla", "raggeddollb", "rangerarmor", "rangerarmora", "rangerarmorb", "reforgedcore", "reforgedcorea", "reforgedcoreb", "sharpy", "sharpyrare", "slimy", "slimyrare", "soullantern", "soullanterna", "soullanternb", "stormy", "stormyrare", "thewolfslayer", "thewolfslayera", "thewolfslayerb", "thewolfslayerrare", "tombstone", "venomflask", "venomflaska", "venomflaskb", "wolfy", "wolfyrare", "woodencrosier", "woodencrosiera", "woodencrosierb", "woodencrosierrare", "corruptedplate", "corruptedplatea", "corruptedplateb", "corruptedplaterare", "cuby", "cubyd", "cubydrare", "cubyrare", "familyjewelsrare", "fenny", "fennyrare", "gildedplate", "gildedplatea", "gildedplateb", "gildedplaterare", "scaraby", "scarabyrare", "sepulchralspectre", "sepulchralspectrerare", "whisperingstone" }; public static List<string> medsDropOnlySoU = new List<string> { "architectsring", "architectsringrare", "blackpyramid", "blackpyramidrare", "burialmask", "burialmaskrare", "crimsonraiment", "crimsonraimentrare", "desertjam", "desertjamrare", "durandal", "durandalrare", "energyshield", "energyshield rare", "energyshieldrare", "fistofthedamned", "fistofthedamnedrare", "holyrune", "holyrunerare", "lunaring", "lunaringrare", "necromancerrobe", "necromancerroberare", "sacredaxe", "sacredaxerare", "scarabshield", "scarabshieldrare", "shadowrune", "shadowrunerare", "solring", "solringrare", "suppressionhelmet", "suppressionhelmetrare", "tessaract", "tessaractrare", "thejuggernaut", "thejuggernautrare", "topazring", "topazringrare", "turban", "turbanrare", "undeathichor", "undeathichorrare", "unholyhammer", "unholyhammerrare" }; public static List<string> medsKeepRequirements = new List<string> { "_demo", "_tier1", "_tier2", "_tier3", "_tier4", "caravan", "crocomenburn", "ulmininup", "ulminindown", "ulmininportal", "ulmininsanddown" }; public static List<string> medsObeliskNodes = new List<string> { "sen_34", "aqua_36", "faen_39", "ulmin_40", "velka_33" }; public static List<string> medsZoneStartNodes = new List<string> { "aqua_0", "faen_0", "ulmin_0", "velka_0", "voidlow_0" }; public static bool medsMPShopRarity = false; public static bool medsMPMapShopCorrupt = false; public static bool medsMPObeliskShopCorrupt = false; public static bool medsMPTownShopCorrupt = false; public static bool medsMPItemCorrupt = false; public static bool medsMPPerkPoints = false; public static bool medsMPCorruptGiovanna = false; public static bool medsMPKeyItems = false; public static bool medsMPCraftCorruptedCards = false; public static bool medsMPInfiniteCardCraft = false; public static bool medsMPStockedShop = false; public static bool medsMPSoloShop = false; public static bool medsMPDropShop = false; private static bool medsMPAllThePets = false; public static bool medsMPDeveloperMode = false; public static bool medsMPJuiceGold = false; public static bool medsMPJuiceDust = false; public static bool medsMPUseClaimation = false; public static bool medsMPDiscountDivination = false; public static bool medsMPDiscountDoomroll = false; public static bool medsMPRavingRerolls = false; public static bool medsMPSmallSanitySupplySelling = false; public static bool medsMPModifyPerks = false; public static bool medsMPPlentifulPetPurchases = false; public static bool medsMPNoPerkRequirements = false; public static bool medsMPTravelAnywhere = false; private static bool medsMPNoClassRequirements = false; private static bool medsMPNoEquipmentRequirements = false; private static bool medsMPNoKeyItemRequirements = false; public static bool medsMPOverlyTenergetic = false; public static bool medsMPOverlyCardergetic = false; public static int medsMPDiminutiveDecks = 1; public static string medsMPDenyDiminishingDecks = ""; public static int medsMPShopBadLuckProtection = 0; public static bool medsMPBugfixEquipmentHP = false; public static bool medsMPDLCClones = false; public static string medsMPDLCCloneTwo = ""; public static string medsMPDLCCloneThree = ""; public static string medsMPDLCCloneFour = ""; public static bool medsMPVisitAllZones = false; public static int medsMPConflictResolution = 0; public static ConfigEntry<bool> medsKeyItems { get; private set; } public static ConfigEntry<bool> medsJuiceGold { get; private set; } public static ConfigEntry<bool> medsJuiceDust { get; private set; } public static ConfigEntry<bool> medsJuiceSupplies { get; private set; } public static ConfigEntry<bool> medsDeveloperMode { get; private set; } public static ConfigEntry<string> medsExportSettings { get; private set; } public static ConfigEntry<string> medsImportSettings { get; private set; } public static ConfigEntry<int> medsDiminutiveDecks { get; private set; } public static ConfigEntry<string> medsDenyDiminishingDecks { get; private set; } public static ConfigEntry<bool> medsCraftCorruptedCards { get; private set; } public static ConfigEntry<bool> medsInfiniteCardCraft { get; private set; } public static ConfigEntry<bool> medsDLCClones { get; private set; } public static ConfigEntry<string> medsDLCCloneTwo { get; private set; } public static ConfigEntry<string> medsDLCCloneThree { get; private set; } public static ConfigEntry<string> medsDLCCloneFour { get; private set; } public static ConfigEntry<string> medsDLCCloneTwoName { get; private set; } public static ConfigEntry<string> medsDLCCloneThreeName { get; private set; } public static ConfigEntry<string> medsDLCCloneFourName { get; private set; } public static ConfigEntry<bool> medsOver50s { get; private set; } public static ConfigEntry<bool> medsSmallSanitySupplySelling { get; private set; } public static ConfigEntry<bool> medsRavingRerolls { get; private set; } public static ConfigEntry<bool> medsUseClaimation { get; private set; } public static ConfigEntry<bool> medsNoClassRequirements { get; private set; } public static ConfigEntry<bool> medsNoEquipmentRequirements { get; private set; } public static ConfigEntry<bool> medsNoKeyItemRequirements { get; private set; } public static ConfigEntry<bool> medsTravelAnywhere { get; private set; } public static ConfigEntry<bool> medsVisitAllZones { get; private set; } public static ConfigEntry<bool> medsCorruptGiovanna { get; private set; } public static ConfigEntry<bool> medsLootCorrupt { get; private set; } public static ConfigEntry<bool> medsPerkPoints { get; private set; } public static ConfigEntry<bool> medsModifyPerks { get; private set; } public static ConfigEntry<bool> medsNoPerkRequirements { get; private set; } public static ConfigEntry<bool> medsShopRarity { get; private set; } public static ConfigEntry<int> medsShopBadLuckProtection { get; private set; } public static ConfigEntry<bool> medsMapShopCorrupt { get; private set; } public static ConfigEntry<bool> medsObeliskShopCorrupt { get; private set; } public static ConfigEntry<bool> medsTownShopCorrupt { get; private set; } public static ConfigEntry<bool> medsDiscountDivination { get; private set; } public static ConfigEntry<bool> medsDiscountDoomroll { get; private set; } public static ConfigEntry<bool> medsPlentifulPetPurchases { get; private set; } public static ConfigEntry<bool> medsStockedShop { get; private set; } public static ConfigEntry<bool> medsSoloShop { get; private set; } public static ConfigEntry<bool> medsDropShop { get; private set; } public static ConfigEntry<bool> medsProfane { get; private set; } public static ConfigEntry<bool> medsEmotional { get; private set; } public static ConfigEntry<bool> medsStraya { get; private set; } public static ConfigEntry<string> medsStrayaServer { get; private set; } public static ConfigEntry<bool> medsMaxMultiplayerMembers { get; private set; } public static ConfigEntry<bool> medsOverlyTenergetic { get; private set; } public static ConfigEntry<bool> medsOverlyCardergetic { get; private set; } public static ConfigEntry<bool> medsBugfixEquipmentHP { get; private set; } public static ConfigEntry<bool> medsSkipCinematics { get; private set; } public static ConfigEntry<bool> medsAutoContinue { get; private set; } public static ConfigEntry<bool> medsMPLoadAutoCreateRoom { get; private set; } public static ConfigEntry<bool> medsMPLoadAutoReady { get; private set; } public static ConfigEntry<bool> medsSpacebarContinue { get; private set; } public static ConfigEntry<int> medsConflictResolution { get; private set; } public static ConfigEntry<bool> medsAllThePets { get; private set; } private void Awake() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0037: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0068: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_0099: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00ca: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown //IL_00fb: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_0130: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Expected O, but got Unknown //IL_0165: Expected O, but got Unknown //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Expected O, but got Unknown //IL_0196: Expected O, but got Unknown //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Expected O, but got Unknown //IL_01f5: Expected O, but got Unknown //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Expected O, but got Unknown //IL_0226: Expected O, but got Unknown //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Expected O, but got Unknown //IL_0257: Expected O, but got Unknown //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Expected O, but got Unknown //IL_0288: Expected O, but got Unknown //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Expected O, but got Unknown //IL_02bd: Expected O, but got Unknown //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Expected O, but got Unknown //IL_02f2: Expected O, but got Unknown //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Expected O, but got Unknown //IL_0327: Expected O, but got Unknown //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Expected O, but got Unknown //IL_035c: Expected O, but got Unknown //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Expected O, but got Unknown //IL_0391: Expected O, but got Unknown //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Expected O, but got Unknown //IL_03c6: Expected O, but got Unknown //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Expected O, but got Unknown //IL_03f7: Expected O, but got Unknown //IL_040d: 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_0428: Expected O, but got Unknown //IL_0428: Expected O, but got Unknown //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Expected O, but got Unknown //IL_0459: Expected O, but got Unknown //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Expected O, but got Unknown //IL_048a: Expected O, but got Unknown //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Expected O, but got Unknown //IL_04bb: Expected O, but got Unknown //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Expected O, but got Unknown //IL_04ec: Expected O, but got Unknown //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Expected O, but got Unknown //IL_051d: Expected O, but got Unknown //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Expected O, but got Unknown //IL_054e: Expected O, but got Unknown //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_0575: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Expected O, but got Unknown //IL_057f: Expected O, but got Unknown //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_05a6: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Expected O, but got Unknown //IL_05b0: Expected O, but got Unknown //IL_05c6: Unknown result type (might be due to invalid IL or missing references) //IL_05d7: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Expected O, but got Unknown //IL_05e1: Expected O, but got Unknown //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Expected O, but got Unknown //IL_0612: Expected O, but got Unknown //IL_0628: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_0643: Expected O, but got Unknown //IL_0643: Expected O, but got Unknown //IL_0659: Unknown result type (might be due to invalid IL or missing references) //IL_066a: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Expected O, but got Unknown //IL_0674: Expected O, but got Unknown //IL_068a: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a5: Expected O, but got Unknown //IL_06a5: Expected O, but got Unknown //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06d7: Unknown result type (might be due to invalid IL or missing references) //IL_06e1: Expected O, but got Unknown //IL_06e1: Expected O, but got Unknown //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_0712: Expected O, but got Unknown //IL_0712: Expected O, but got Unknown //IL_0728: Unknown result type (might be due to invalid IL or missing references) //IL_0739: Unknown result type (might be due to invalid IL or missing references) //IL_0743: Expected O, but got Unknown //IL_0743: Expected O, but got Unknown //IL_0759: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_0774: Expected O, but got Unknown //IL_0774: Expected O, but got Unknown //IL_078a: Unknown result type (might be due to invalid IL or missing references) //IL_079b: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Expected O, but got Unknown //IL_07a5: Expected O, but got Unknown //IL_07bb: Unknown result type (might be due to invalid IL or missing references) //IL_07cc: Unknown result type (might be due to invalid IL or missing references) //IL_07d6: Expected O, but got Unknown //IL_07d6: Expected O, but got Unknown //IL_07ec: Unknown result type (might be due to invalid IL or missing references) //IL_07fd: Unknown result type (might be due to invalid IL or missing references) //IL_0807: Expected O, but got Unknown //IL_0807: Expected O, but got Unknown //IL_081d: Unknown result type (might be due to invalid IL or missing references) //IL_082e: Unknown result type (might be due to invalid IL or missing references) //IL_0838: Expected O, but got Unknown //IL_0838: Expected O, but got Unknown //IL_084e: Unknown result type (might be due to invalid IL or missing references) //IL_085f: Unknown result type (might be due to invalid IL or missing references) //IL_0869: Expected O, but got Unknown //IL_0869: Expected O, but got Unknown //IL_087f: Unknown result type (might be due to invalid IL or missing references) //IL_0890: Unknown result type (might be due to invalid IL or missing references) //IL_089a: Expected O, but got Unknown //IL_089a: Expected O, but got Unknown //IL_08b0: Unknown result type (might be due to invalid IL or missing references) //IL_08c1: Unknown result type (might be due to invalid IL or missing references) //IL_08cb: Expected O, but got Unknown //IL_08cb: Expected O, but got Unknown //IL_08e1: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_08fc: Expected O, but got Unknown //IL_08fc: Expected O, but got Unknown //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_0923: Unknown result type (might be due to invalid IL or missing references) //IL_092d: Expected O, but got Unknown //IL_092d: Expected O, but got Unknown //IL_0943: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d9: Expected O, but got Unknown //IL_09d9: Expected O, but got Unknown //IL_09ef: Unknown result type (might be due to invalid IL or missing references) //IL_0a00: Unknown result type (might be due to invalid IL or missing references) //IL_0a0a: Expected O, but got Unknown //IL_0a0a: Expected O, but got Unknown //IL_0a20: Unknown result type (might be due to invalid IL or missing references) //IL_0a31: Unknown result type (might be due to invalid IL or missing references) //IL_0a3b: Expected O, but got Unknown //IL_0a3b: Expected O, but got Unknown //IL_0a51: Unknown result type (might be due to invalid IL or missing references) //IL_0a62: Unknown result type (might be due to invalid IL or missing references) //IL_0a6c: Expected O, but got Unknown //IL_0a6c: Expected O, but got Unknown //IL_0a82: Unknown result type (might be due to invalid IL or missing references) //IL_0a93: Unknown result type (might be due to invalid IL or missing references) //IL_0a9d: Expected O, but got Unknown //IL_0a9d: Expected O, but got Unknown //IL_0ab3: Unknown result type (might be due to invalid IL or missing references) //IL_0ac4: Unknown result type (might be due to invalid IL or missing references) //IL_0ace: Expected O, but got Unknown //IL_0ace: Expected O, but got Unknown //IL_0ae4: Unknown result type (might be due to invalid IL or missing references) //IL_0af5: Unknown result type (might be due to invalid IL or missing references) //IL_0aff: Expected O, but got Unknown //IL_0aff: Expected O, but got Unknown //IL_0b15: Unknown result type (might be due to invalid IL or missing references) //IL_0b26: Unknown result type (might be due to invalid IL or missing references) //IL_0b30: Expected O, but got Unknown //IL_0b30: Expected O, but got Unknown //IL_0b46: Unknown result type (might be due to invalid IL or missing references) //IL_0b57: Unknown result type (might be due to invalid IL or missing references) //IL_0b61: Expected O, but got Unknown //IL_0b61: Expected O, but got Unknown //IL_0b77: Unknown result type (might be due to invalid IL or missing references) //IL_0b88: Unknown result type (might be due to invalid IL or missing references) //IL_0b92: Expected O, but got Unknown //IL_0b92: Expected O, but got Unknown //IL_0ba8: 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_0bc3: Expected O, but got Unknown //IL_0bc3: Expected O, but got Unknown //IL_0bd9: Unknown result type (might be due to invalid IL or missing references) //IL_0bea: Unknown result type (might be due to invalid IL or missing references) //IL_0bf4: Expected O, but got Unknown //IL_0bf4: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; medsKeyItems = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Debug", "All Key Items"), false, new ConfigDescription("Give all key items in Adventure Mode. Items are added when you load into a town; if you've already passed the town and want the key items, use Travel Anywhere to go back to town? I'll add more methods in the future :).", (AcceptableValueBase)null, Array.Empty<object>())); medsJuiceGold = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Debug", "Gold ++"), false, new ConfigDescription("Many cash.", (AcceptableValueBase)null, Array.Empty<object>())); medsJuiceDust = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Debug", "Dust ++"), false, new ConfigDescription("Many cryttals.", (AcceptableValueBase)null, Array.Empty<object>())); medsJuiceSupplies = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Debug", "Supplies ++"), false, new ConfigDescription("Many supplies.", (AcceptableValueBase)null, Array.Empty<object>())); medsDeveloperMode = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Debug", "Developer Mode"), false, new ConfigDescription("Turns on AtO devs’ developer mode. Back up your saves before using!", (AcceptableValueBase)null, Array.Empty<object>())); medsExportSettings = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Debug", "Export Settings"), "", new ConfigDescription("Export settings (for use with 'Import Settings').", (AcceptableValueBase)null, Array.Empty<object>())); medsImportSettings = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Debug", "Import Settings"), "", new ConfigDescription("Paste settings here to import them.", (AcceptableValueBase)null, Array.Empty<object>())); medsDiminutiveDecks = ((BaseUnityPlugin)this).Config.Bind<int>(new ConfigDefinition("Cards & Decks", "Minimum Deck Size"), 1, new ConfigDescription("Set the minimum deck size.", (AcceptableValueBase)null, Array.Empty<object>())); medsDenyDiminishingDecks = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Cards & Decks", "Card Removal"), "Can Remove Anything", new ConfigDescription("What cards can be removed at the church?", (AcceptableValueBase)(object)new AcceptableValueList<string>(new string[4] { "Cannot Remove Cards", "Cannot Remove Curses", "Can Only Remove Curses", "Can Remove Anything" }), Array.Empty<object>())); medsCraftCorruptedCards = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Cards & Decks", "Craft Corrupted Cards"), false, new ConfigDescription("Allow crafting of corrupted cards.", (AcceptableValueBase)null, Array.Empty<object>())); medsInfiniteCardCraft = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Cards & Decks", "Craft Infinite Cards"), false, new ConfigDescription("Infinite card crafts (set available card count to 99).", (AcceptableValueBase)null, Array.Empty<object>())); medsDLCClones = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Characters", "Enable Clones"), true, new ConfigDescription("Adds three clone characters to the DLC section of Hero Selection.", (AcceptableValueBase)null, Array.Empty<object>())); medsDLCCloneTwo = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Characters", "Clone 1"), "loremaster", new ConfigDescription("Which subclass should be cloned into DLC slot 4?", (AcceptableValueBase)null, Array.Empty<object>())); medsDLCCloneThree = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Characters", "Clone 2"), "loremaster", new ConfigDescription("Which subclass should be cloned into DLC slot 5?", (AcceptableValueBase)null, Array.Empty<object>())); medsDLCCloneFour = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Characters", "Clone 3"), "loremaster", new ConfigDescription("Which subclass should be cloned into DLC slot 6?", (AcceptableValueBase)null, Array.Empty<object>())); medsDLCCloneTwoName = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Characters", "Clone 1 Name"), "Clone", new ConfigDescription("What should the character in DLC slot 4 be called?", (AcceptableValueBase)null, Array.Empty<object>())); medsDLCCloneThreeName = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Characters", "Clone 2 Name"), "Copy", new ConfigDescription("What should the character in DLC slot 5 be called?", (AcceptableValueBase)null, Array.Empty<object>())); medsDLCCloneFourName = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Characters", "Clone 3 Name"), "Counterfeit", new ConfigDescription("What should the character in DLC slot 6 be called?", (AcceptableValueBase)null, Array.Empty<object>())); medsOver50s = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Characters", "Level Past 50"), true, new ConfigDescription("Allows characters to be raised up to rank 500.", (AcceptableValueBase)null, Array.Empty<object>())); medsSmallSanitySupplySelling = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Corruption & Madness", "Sell Supplies"), true, new ConfigDescription("Sell supplies on high madness.", (AcceptableValueBase)null, Array.Empty<object>())); medsRavingRerolls = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Corruption & Madness", "Shop Rerolls"), true, new ConfigDescription("Allow multiple shop rerolls on high madness.", (AcceptableValueBase)null, Array.Empty<object>())); medsUseClaimation = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Corruption & Madness", "Use Claims"), true, new ConfigDescription("Use claims on any madness. Note that you cannot _get_ claims on high madness (yet...).", (AcceptableValueBase)null, Array.Empty<object>())); medsNoClassRequirements = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Events & Nodes", "No Class Requirements"), false, new ConfigDescription("(IN TESTING) Events and replies ignore class requirements.", (AcceptableValueBase)null, Array.Empty<object>())); medsNoEquipmentRequirements = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Events & Nodes", "No Equipment Requirements"), false, new ConfigDescription("(IN TESTING) Events and replies ignore equipment/pet requirements.", (AcceptableValueBase)null, Array.Empty<object>())); medsNoKeyItemRequirements = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Events & Nodes", "No Key Item Requirements"), false, new ConfigDescription("(IN TESTING) Events and replies ignore key item / quest requirements.", (AcceptableValueBase)null, Array.Empty<object>())); medsTravelAnywhere = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Events & Nodes", "Travel Anywhere"), false, new ConfigDescription("Travel to any node.", (AcceptableValueBase)null, Array.Empty<object>())); medsVisitAllZones = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Events & Nodes", "Visit All Zones"), false, new ConfigDescription("You can choose any location to visit from the obelisk (e.g. can go to the Void early, can visit all locations before going, etc.).", (AcceptableValueBase)null, Array.Empty<object>())); medsCorruptGiovanna = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Loot", "Corrupted Card Rewards"), false, new ConfigDescription("Card rewards are always corrupted (includes divinations).", (AcceptableValueBase)null, Array.Empty<object>())); medsLootCorrupt = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Loot", "Corrupted Loot Rewards"), false, new ConfigDescription("Make item loot rewards always corrupted.", (AcceptableValueBase)null, Array.Empty<object>())); medsPerkPoints = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Perks", "Many Perk Points"), false, new ConfigDescription("(IN TESTING - visually buggy but functional) Set maximum perk points to 1000.", (AcceptableValueBase)null, Array.Empty<object>())); medsModifyPerks = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Perks", "Modify Perks Whenever"), false, new ConfigDescription("(IN TESTING) Change perks whenever you want.", (AcceptableValueBase)null, Array.Empty<object>())); medsNoPerkRequirements = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Perks", "No Perk Requirements"), false, new ConfigDescription("Can select perk without selecting its precursor perks; ignore minimum selected perk count for each row.", (AcceptableValueBase)null, Array.Empty<object>())); medsShopRarity = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Adjusted Shop Rarity"), false, new ConfigDescription("Modify shop rarity based on current madness/corruption. This also makes the change in rarity from act 1 to 4 _slightly_ less abrupt.", (AcceptableValueBase)null, Array.Empty<object>())); medsShopBadLuckProtection = ((BaseUnityPlugin)this).Config.Bind<int>(new ConfigDefinition("Shop", "Bad Luck Protection"), 10, new ConfigDescription("Increases rarity of shops/loot based on number of shops/loot seen since an item was last acquired. If you play with discounted rerolls I recommend setting this to ~10; if you play without, I recommend ~300 :)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>())); medsMapShopCorrupt = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Corrupted Map Shops"), true, new ConfigDescription("Allow shops on the map (e.g. werewolf shop in Senenthia) to have corrupted goods for sale.", (AcceptableValueBase)null, Array.Empty<object>())); medsObeliskShopCorrupt = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Corrupted Obelisk Shops"), true, new ConfigDescription("Allow obelisk corruption shops to have corrupted goods for sale.", (AcceptableValueBase)null, Array.Empty<object>())); medsTownShopCorrupt = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Corrupted Town Shops"), true, new ConfigDescription("Allow town shops to have corrupted goods for sale.", (AcceptableValueBase)null, Array.Empty<object>())); medsDiscountDivination = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Discount Divination"), true, new ConfigDescription("Discounts are applied to divinations.", (AcceptableValueBase)null, Array.Empty<object>())); medsDiscountDoomroll = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Discount Doomroll"), true, new ConfigDescription("Discounts are applied to shop rerolls.", (AcceptableValueBase)null, Array.Empty<object>())); medsPlentifulPetPurchases = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Plentiful Pet Purchases"), true, new ConfigDescription("Buy more than one of each pet.", (AcceptableValueBase)null, Array.Empty<object>())); medsStockedShop = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Post-Scarcity Shops"), true, new ConfigDescription("Does not record who purchased what in the shop.", (AcceptableValueBase)null, Array.Empty<object>())); medsSoloShop = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Individual Player Shops"), true, new ConfigDescription("Does not send shop purchase records in multiplayer.", (AcceptableValueBase)null, Array.Empty<object>())); medsDropShop = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Drop-Only Items Appear In Shops"), true, new ConfigDescription("Items that would normally not appear in shops, such as the Yggdrasil Root or Yogger's Cleaver, will appear.", (AcceptableValueBase)null, Array.Empty<object>())); medsProfane = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Allow Profanities"), true, new ConfigDescription("Allow profanities in your good Christian Piss server.", (AcceptableValueBase)null, Array.Empty<object>())); medsEmotional = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Emotional"), true, new ConfigDescription("Use more emotes during combat.", (AcceptableValueBase)null, Array.Empty<object>())); medsStraya = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Force Select Server"), false, new ConfigDescription("Force server selection to location of your choice (default: Australia).", (AcceptableValueBase)null, Array.Empty<object>())); medsStrayaServer = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Should Be Vanilla", "Force Select Server Selection"), "au", new ConfigDescription("Which server should be forced if the above option is true?", (AcceptableValueBase)(object)new AcceptableValueList<string>(new string[13] { "asia", "au", "cae", "eu", "in", "jp", "ru", "rue", "za", "sa", "kr", "us", "usw" }), Array.Empty<object>())); medsMaxMultiplayerMembers = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Max Multiplayer Members"), true, new ConfigDescription("Change the default player count in multiplDefault to 4 players in multiplayer.", (AcceptableValueBase)null, Array.Empty<object>())); medsOverlyTenergetic = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Overly Tenergetic"), true, new ConfigDescription("Allow characters to have more than 10 energy.", (AcceptableValueBase)null, Array.Empty<object>())); medsOverlyCardergetic = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Overly Cardergetic"), true, new ConfigDescription("(IN TESTING) Allow characters to have more than 10 cards.", (AcceptableValueBase)null, Array.Empty<object>())); medsBugfixEquipmentHP = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Bugfix: Equipment HP"), true, new ConfigDescription("(IN TESTING - visually buggy but functional) Fixes a vanilla bug that allows infinite stacking of HP by buying the same item repeatedly.", (AcceptableValueBase)null, Array.Empty<object>())); medsSkipCinematics = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Skip Cinematics"), false, new ConfigDescription("Skip cinematics.", (AcceptableValueBase)null, Array.Empty<object>())); medsAutoContinue = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Auto Continue"), false, new ConfigDescription("(IN TESTING - visually buggy but functional) Automatically press 'Continue' in events.", (AcceptableValueBase)null, Array.Empty<object>())); medsMPLoadAutoCreateRoom = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Auto Create Room on MP Load"), true, new ConfigDescription("Use previous settings to automatically create lobby room when loading multiplayer game.", (AcceptableValueBase)null, Array.Empty<object>())); medsMPLoadAutoReady = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Auto Ready on MP Load"), true, new ConfigDescription("Automatically readies up non-host players when loading multiplayer game.", (AcceptableValueBase)null, Array.Empty<object>())); medsSpacebarContinue = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Spacebar to Continue"), true, new ConfigDescription("Spacebar clicks the 'Continue' button in events for you.", (AcceptableValueBase)null, Array.Empty<object>())); medsConflictResolution = ((BaseUnityPlugin)this).Config.Bind<int>(new ConfigDefinition("Should Be Vanilla", "Conflict Resolution"), 4, new ConfigDescription("(IN TESTING) Automatically select (1) lowest card; (2) closest to 2; (3) highest card; or (4) random to determine multiplayer conflicts.", (AcceptableValueBase)null, Array.Empty<object>())); medsAllThePets = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "All The Pets"), true, new ConfigDescription("(IN TESTING) Shows blob pets and Harley in the Tome of Knowledge and shop.", (AcceptableValueBase)null, Array.Empty<object>())); medsImportSettings.Value = ""; medsExportSettings.Value = SettingsToString(); medsKeyItems.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsJuiceGold.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsJuiceDust.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsJuiceSupplies.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDeveloperMode.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsExportSettings.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsImportSettings.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDiminutiveDecks.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDenyDiminishingDecks.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsCraftCorruptedCards.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsInfiniteCardCraft.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsSmallSanitySupplySelling.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsRavingRerolls.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsUseClaimation.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsNoClassRequirements.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsNoEquipmentRequirements.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsNoKeyItemRequirements.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsTravelAnywhere.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsCorruptGiovanna.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsLootCorrupt.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsPerkPoints.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsModifyPerks.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsNoPerkRequirements.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsShopRarity.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsShopBadLuckProtection.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsMapShopCorrupt.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsObeliskShopCorrupt.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsTownShopCorrupt.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDiscountDivination.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDiscountDoomroll.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsPlentifulPetPurchases.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsStockedShop.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsSoloShop.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsProfane.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsEmotional.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsStraya.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsStrayaServer.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsMaxMultiplayerMembers.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsOverlyTenergetic.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsOverlyCardergetic.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsBugfixEquipmentHP.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsSkipCinematics.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsAutoContinue.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsMPLoadAutoCreateRoom.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsMPLoadAutoReady.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsSpacebarContinue.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCClones.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCCloneTwo.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCCloneThree.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCCloneFour.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCCloneTwoName.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCCloneThreeName.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCCloneFourName.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsOver50s.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDropShop.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsVisitAllZones.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsConflictResolution.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsAllThePets.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsImportSettings.SettingChanged += delegate { StringToSettings(medsImportSettings.Value); }; harmony.PatchAll(); LogInfo("com.stiffmeds.obeliskialoptions 2.1.0 has loaded! Prayge "); Essentials.RegisterMod("Obeliskial Options", "stiffmeds", "Options to alter gameplay.", "2.1.0", 20240516, "https://across-the-obelisk.thunderstore.io/package/meds/Obeliskial_Options/", (string[])null, "", 90, new string[1] { "settings" }, "", true); } internal static void LogDebug(string msg) { Log.LogDebug((object)msg); } internal static void LogInfo(string msg) { Log.LogInfo((object)msg); } internal static void LogWarning(string msg) { Log.LogWarning((object)msg); } internal static void LogError(string msg) { Log.LogError((object)msg); } private void LogHandler(string message, LogType type) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected I4, but got Unknown string msg = message?.ToString() ?? ""; switch ((int)type) { case 1: case 3: LogInfo(msg); break; case 2: LogWarning(msg); break; case 0: case 4: LogError(msg); break; } } public static string SettingsToString(bool forMP = false) { string text = string.Join("|", medsShopRarity.Value ? "1" : "0", medsMapShopCorrupt.Value ? "1" : "0", medsObeliskShopCorrupt.Value ? "1" : "0", medsTownShopCorrupt.Value ? "1" : "0", medsLootCorrupt.Value ? "1" : "0", medsPerkPoints.Value ? "1" : "0", medsCorruptGiovanna.Value ? "1" : "0", medsKeyItems.Value ? "1" : "0", "0", medsOverlyCardergetic.Value ? "1" : "0", medsCraftCorruptedCards.Value ? "1" : "0", medsInfiniteCardCraft.Value ? "1" : "0", medsStockedShop.Value ? "1" : "0", medsSoloShop.Value ? "1" : "0", medsDeveloperMode.Value ? "1" : "0", (medsDLCClones.Value ? "1" : "0") + "&" + medsDLCCloneTwo.Value + "&" + medsDLCCloneThree.Value + "&" + medsDLCCloneFour.Value, medsUseClaimation.Value ? "1" : "0", medsDiscountDivination.Value ? "1" : "0", medsDiscountDoomroll.Value ? "1" : "0", medsRavingRerolls.Value ? "1" : "0", medsSmallSanitySupplySelling.Value ? "1" : "0", medsModifyPerks.Value ? "1" : "0", medsNoPerkRequirements.Value ? "1" : "0", medsPlentifulPetPurchases.Value ? "1" : "0", medsTravelAnywhere.Value ? "1" : "0", medsAllThePets.Value ? "1" : "0", medsNoClassRequirements.Value ? "1" : "0", medsNoEquipmentRequirements.Value ? "1" : "0", medsNoKeyItemRequirements.Value ? "1" : "0", medsOverlyTenergetic.Value ? "1" : "0", medsDiminutiveDecks.Value.ToString(), medsDenyDiminishingDecks.Value, medsShopBadLuckProtection.Value.ToString(), medsBugfixEquipmentHP.Value ? "1" : "0", medsJuiceGold.Value ? "1" : "0", medsJuiceDust.Value ? "1" : "0", medsDropShop.Value ? "1" : "0", medsVisitAllZones.Value ? "1" : "0", medsConflictResolution.Value.ToString()); if (!forMP) { string[] array = new string[15]; array[0] = (medsProfane.Value ? "1" : "0"); array[0] = "%|" + array[0]; array[1] = (medsEmotional.Value ? "1" : "0"); array[2] = (medsStraya.Value ? "1" : "0"); array[3] = medsStrayaServer.Value; array[4] = (medsMaxMultiplayerMembers.Value ? "1" : "0"); array[5] = (medsSkipCinematics.Value ? "1" : "0"); array[6] = (medsAutoContinue.Value ? "1" : "0"); array[7] = (medsJuiceSupplies.Value ? "1" : "0"); array[8] = (medsMPLoadAutoCreateRoom.Value ? "1" : "0"); array[9] = (medsMPLoadAutoReady.Value ? "1" : "0"); array[10] = (medsSpacebarContinue.Value ? "1" : "0"); array[11] = medsDLCCloneTwoName.Value; array[12] = medsDLCCloneThreeName.Value; array[13] = medsDLCCloneFourName.Value; array[14] = (medsOver50s.Value ? "1" : "0"); text += string.Join("|", array); } return text; } public static void StringToSettings(string incomingSettings) { string[] array = incomingSettings.Split("|%|"); if (array.Length == 2) { string[] array2 = array[1].Split("|"); if (array2.Length >= 1) { medsProfane.Value = array2[0] == "1"; } if (array2.Length >= 2) { medsEmotional.Value = array2[1] == "1"; } if (array2.Length >= 3) { medsStraya.Value = array2[2] == "1"; } if (array2.Length >= 4) { medsStrayaServer.Value = array2[3]; } if (array2.Length >= 5) { medsMaxMultiplayerMembers.Value = array2[4] == "1"; } if (array2.Length >= 6) { medsSkipCinematics.Value = array2[5] == "1"; } if (array2.Length >= 7) { medsAutoContinue.Value = array2[6] == "1"; } if (array2.Length >= 8) { medsJuiceSupplies.Value = array2[7] == "1"; } if (array2.Length >= 9) { medsMPLoadAutoCreateRoom.Value = array2[8] == "1"; } if (array2.Length >= 10) { medsMPLoadAutoReady.Value = array2[9] == "1"; } if (array2.Length >= 11) { medsSpacebarContinue.Value = array2[10] == "1"; } if (array2.Length >= 12) { medsDLCCloneTwoName.Value = array2[11]; } if (array2.Length >= 13) { medsDLCCloneThreeName.Value = array2[12]; } if (array2.Length >= 14) { medsDLCCloneFourName.Value = array2[13]; } if (array2.Length >= 15) { medsOver50s.Value = array2[14] == "1"; } } array = array[0].Split("|"); if (array.Length >= 1) { medsShopRarity.Value = array[0] == "1"; } if (array.Length >= 2) { medsMapShopCorrupt.Value = array[1] == "1"; } if (array.Length >= 3) { medsObeliskShopCorrupt.Value = array[2] == "1"; } if (array.Length >= 4) { medsTownShopCorrupt.Value = array[3] == "1"; } if (array.Length >= 5) { medsLootCorrupt.Value = array[4] == "1"; } if (array.Length >= 6) { medsPerkPoints.Value = array[5] == "1"; } if (array.Length >= 7) { medsCorruptGiovanna.Value = array[6] == "1"; } if (array.Length >= 8) { medsKeyItems.Value = array[7] == "1"; } if (array.Length >= 10) { medsOverlyCardergetic.Value = array[9] == "1"; } if (array.Length >= 11) { medsCraftCorruptedCards.Value = array[10] == "1"; } if (array.Length >= 12) { medsInfiniteCardCraft.Value = array[11] == "1"; } if (array.Length >= 13) { medsStockedShop.Value = array[12] == "1"; } if (array.Length >= 14) { medsSoloShop.Value = array[13] == "1"; } if (array.Length >= 15) { medsDeveloperMode.Value = array[14] == "1"; } if (array.Length >= 16) { medsDLCClones.Value = array[15].Split("&")[0] == "1"; medsDLCCloneTwo.Value = array[15].Split("&")[1]; medsDLCCloneThree.Value = array[15].Split("&")[2]; medsDLCCloneFour.Value = array[15].Split("&")[3]; } if (array.Length >= 17) { medsUseClaimation.Value = array[16] == "1"; } if (array.Length >= 18) { medsDiscountDivination.Value = array[17] == "1"; } if (array.Length >= 19) { medsDiscountDoomroll.Value = array[18] == "1"; } if (array.Length >= 20) { medsRavingRerolls.Value = array[19] == "1"; } if (array.Length >= 21) { medsSmallSanitySupplySelling.Value = array[20] == "1"; } if (array.Length >= 22) { medsModifyPerks.Value = array[21] == "1"; } if (array.Length >= 23) { medsNoPerkRequirements.Value = array[22] == "1"; } if (array.Length >= 24) { medsPlentifulPetPurchases.Value = array[23] == "1"; } if (array.Length >= 25) { medsTravelAnywhere.Value = array[24] == "1"; } if (array.Length >= 26) { medsAllThePets.Value = array[25] == "1"; } if (array.Length >= 27) { medsNoClassRequirements.Value = array[26] == "1"; } if (array.Length >= 28) { medsNoEquipmentRequirements.Value = array[27] == "1"; } if (array.Length >= 29) { medsNoClassRequirements.Value = array[28] == "1"; } if (array.Length >= 30) { medsOverlyTenergetic.Value = array[29] == "1"; } if (array.Length >= 31) { medsDiminutiveDecks.Value = int.Parse(array[30]); } if (array.Length >= 32) { medsDenyDiminishingDecks.Value = array[31]; } if (array.Length >= 33) { medsShopBadLuckProtection.Value = int.Parse(array[32]); } if (array.Length >= 34) { medsBugfixEquipmentHP.Value = array[33] == "1"; } if (array.Length >= 35) { medsJuiceGold.Value = array[34] == "1"; } if (array.Length >= 36) { medsJuiceDust.Value = array[35] == "1"; } if (array.Length >= 37) { medsDropShop.Value = array[36] == "1"; } if (array.Length >= 38) { medsVisitAllZones.Value = array[37] == "1"; } if (array.Length >= 39) { medsConflictResolution.Value = int.Parse(array[38]); } medsExportSettings.Value = SettingsToString(); medsImportSettings.Value = ""; } public static void SaveMPSettings(string _newSettings) { //IL_06ec: Unknown result type (might be due to invalid IL or missing references) //IL_06f6: Expected O, but got Unknown List<string> list = new List<string>(); Log.LogDebug((object)("RECEIVING SETTINGS: " + _newSettings)); string[] array = _newSettings.Split("|"); if (array.Length >= 1) { medsMPShopRarity = array[0] == "1"; } if (array.Length >= 2) { medsMPObeliskShopCorrupt = array[1] == "1"; } if (array.Length >= 3) { medsMPMapShopCorrupt = array[2] == "1"; } if (array.Length >= 4) { medsMPTownShopCorrupt = array[3] == "1"; } if (array.Length >= 5) { medsMPItemCorrupt = array[4] == "1"; } if (array.Length >= 6) { medsMPPerkPoints = array[5] == "1"; } if (array.Length >= 7) { medsMPCorruptGiovanna = array[6] == "1"; } if (array.Length >= 8) { medsMPKeyItems = array[7] == "1"; } if (array.Length >= 10) { medsMPOverlyCardergetic = array[9] == "1"; } if (array.Length >= 11) { medsMPCraftCorruptedCards = array[10] == "1"; } if (array.Length >= 12) { medsMPInfiniteCardCraft = array[11] == "1"; } if (array.Length >= 13) { medsMPStockedShop = array[12] == "1"; } if (array.Length >= 14) { medsMPSoloShop = array[13] == "1"; } if (array.Length >= 15) { medsMPDeveloperMode = array[14] == "1"; } if (array.Length >= 16) { bool flag = false; if (!(array[15].Split("&")[0] == "1") == medsMPDLCClones || (array[15].Split("&")[0] == "1" && (medsMPDLCCloneTwo != array[15].Split("&")[1] || medsMPDLCCloneThree != array[15].Split("&")[2] || medsMPDLCCloneFour != array[15].Split("&")[3]))) { flag = true; } medsMPDLCClones = array[15].Split("&")[0] == "1"; medsMPDLCCloneTwo = array[15].Split("&")[1]; medsMPDLCCloneThree = array[15].Split("&")[2]; medsMPDLCCloneFour = array[15].Split("&")[3]; if (flag) { SubClassReplace(); } } if (array.Length >= 17) { medsMPUseClaimation = array[16] == "1"; } if (array.Length >= 18) { medsMPDiscountDivination = array[17] == "1"; } if (array.Length >= 19) { medsMPDiscountDoomroll = array[18] == "1"; } if (array.Length >= 20) { medsMPRavingRerolls = array[19] == "1"; } if (array.Length >= 21) { medsMPSmallSanitySupplySelling = array[20] == "1"; } if (array.Length >= 22) { medsMPModifyPerks = array[21] == "1"; } if (array.Length >= 23) { medsMPNoPerkRequirements = array[22] == "1"; } if (array.Length >= 24) { medsMPPlentifulPetPurchases = array[23] == "1"; } if (array.Length >= 25) { medsMPTravelAnywhere = array[24] == "1"; } if (array.Length >= 26) { medsMPAllThePets = array[25] == "1"; } if (array.Length >= 27) { medsMPNoClassRequirements = array[26] == "1"; } if (array.Length >= 28) { medsMPNoEquipmentRequirements = array[27] == "1"; } if (array.Length >= 29) { medsMPNoKeyItemRequirements = array[28] == "1"; } if (array.Length >= 30) { medsMPOverlyTenergetic = array[29] == "1"; } if (array.Length >= 31) { medsMPDiminutiveDecks = int.Parse(array[30]); } if (array.Length >= 32) { medsMPDenyDiminishingDecks = array[31]; } if (array.Length >= 33) { medsMPShopBadLuckProtection = int.Parse(array[32]); } if (array.Length >= 34) { medsMPBugfixEquipmentHP = array[33] == "1"; } if (array.Length >= 35) { medsMPJuiceGold = array[34] == "1"; } if (array.Length >= 36) { medsMPJuiceDust = array[35] == "1"; } if (array.Length >= 37) { medsMPDropShop = array[36] == "1"; } if (array.Length >= 38) { medsMPVisitAllZones = array[37] == "1"; } if (array.Length >= 39) { medsMPConflictResolution = int.Parse(array[38]); } Log.LogDebug((object)("RECEIVED " + array.Length + " SETTINGS!")); if (medsNoClassRequirements.Value != medsMPNoClassRequirements) { list.Add("No Class Requirements"); } if (medsNoEquipmentRequirements.Value != medsMPNoEquipmentRequirements) { list.Add("No Equipment Requirements"); } if (medsNoKeyItemRequirements.Value != medsMPNoKeyItemRequirements) { list.Add("No Key Item Requirements"); } if (list.Count > 0) { AlertManager.buttonClickDelegate = new OnButtonClickDelegate(UpdateSettingsForYou); AlertManager.Instance.AlertConfirmDouble("ERROR!\nThe host of this game has settings that are incompatible with yours and require a restart: " + string.Join(", ", list.ToArray()) + "\nWould you like these settings to be changed?", "", "", true); } UpdateDropOnlyItems(); UpdateAllThePets(); UpdateVisitAllZones(); } public static void SendSettingsMP() { int num = 666666; bool flag = true; string text = SettingsToString(forMP: true); SaveMPSettings(text); PhotonView val = PhotonView.Get((Component)(object)NetworkManager.Instance); Log.LogInfo((object)("SHARING SETTINGS: " + text)); val.RPC("NET_LoadScene", (RpcTarget)1, new object[3] { text, flag, num }); bUpdatingSettings = false; } public static void SettingsUpdated() { bUpdatingSettings = true; string text = SettingsToString(); if ((medsExportSettings.Value.Length > 25 && medsExportSettings.Value[25] != text[25]) || (medsExportSettings.Value.Length > 26 && medsExportSettings.Value[26] != text[26]) || (medsExportSettings.Value.Length > 27 && medsExportSettings.Value[27] != text[27]) || (medsExportSettings.Value.Length > 28 && medsExportSettings.Value[28] != text[28])) { AlertManager.Instance.AlertConfirm("These settings will not properly take effect until you restart the game.", ""); } if (medsExportSettings.Value.Length > 37 && medsExportSettings.Value[37] != text[37]) { UpdateVisitAllZones(); } medsExportSettings.Value = text; if ((Object)(object)NetworkManager.Instance != (Object)null && (Object)(object)GameManager.Instance != (Object)null && GameManager.Instance.IsMultiplayer() && NetworkManager.Instance.IsMaster()) { SendSettingsMP(); return; } bUpdatingSettings = false; SubClassReplace(); } public static void UpdateSettingsForYou() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown AlertManager.buttonClickDelegate = (OnButtonClickDelegate)Delegate.Remove((Delegate?)(object)AlertManager.buttonClickDelegate, (Delegate?)new OnButtonClickDelegate(UpdateSettingsForYou)); medsAllThePets.Value = medsMPAllThePets; medsNoClassRequirements.Value = medsMPNoClassRequirements; medsNoEquipmentRequirements.Value = medsMPNoEquipmentRequirements; medsNoKeyItemRequirements.Value = medsMPNoKeyItemRequirements; } public static void SubClassReplace() { //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Invalid comparison between Unknown and I4 Log.LogDebug((object)"CREATECLONES START"); if (!(Essentials.IsHost() ? medsDLCClones.Value : medsMPDLCClones)) { return; } Dictionary<string, SubClassData> value = Traverse.Create((object)Globals.Instance).Field("_SubClassSource").GetValue<Dictionary<string, SubClassData>>(); string text = ""; string characterName = ""; string key = ""; int num = 0; foreach (SubClassData value4 in value.Values) { if (!(value4.Id == "medsdlctwo") && !(value4.Id == "medsdlcthree") && !(value4.Id == "medsdlcfour") && value4.MainCharacter && (int)value4.HeroClassSecondary != 6) { LogInfo("MC: " + value4.Id); num++; } } for (int i = 0; i <= 2; i++) { switch (i) { case 0: text = "medsdlctwo"; characterName = medsDLCCloneTwoName.Value; key = (Essentials.medsCloneTwo = (Essentials.IsHost() ? medsDLCCloneTwo.Value : medsMPDLCCloneTwo)); break; case 1: text = "medsdlcthree"; characterName = medsDLCCloneThreeName.Value; key = (Essentials.medsCloneThree = (Essentials.IsHost() ? medsDLCCloneThree.Value : medsMPDLCCloneThree)); break; case 2: text = "medsdlcfour"; characterName = medsDLCCloneFourName.Value; key = (Essentials.medsCloneFour = (Essentials.IsHost() ? medsDLCCloneFour.Value : medsMPDLCCloneFour)); break; } SubClassData val = Object.Instantiate<SubClassData>(Globals.Instance.SubClass[key]); val.Id = text; val.CharacterName = characterName; val.OrderInList = num + i; val.SubClassName = text; val.MainCharacter = true; value[text] = val; Globals.Instance.SubClass[text] = Object.Instantiate<SubClassData>(val); } Traverse.Create((object)Globals.Instance).Field("_SubClassSource").SetValue((object)value); Log.LogDebug((object)"CREATECLONES END"); Dictionary<string, CardbackData> value2 = Traverse.Create((object)Globals.Instance).Field("_CardbackDataSource").GetValue<Dictionary<string, CardbackData>>(); for (int j = 97; j <= 122; j++) { if (value2.ContainsKey("medsdlctwo" + (char)j)) { value2.Remove("medsdlctwo" + (char)j); } if (value2.ContainsKey("medsdlcthree" + (char)j)) { value2.Remove("medsdlcthree" + (char)j); } if (value2.ContainsKey("medsdlcfour" + (char)j)) { value2.Remove("medsdlcfour" + (char)j); } } Dictionary<string, CardbackData> dictionary = new Dictionary<string, CardbackData>(); int num2 = 97; int num3 = 97; int num4 = 97; Log.LogDebug((object)"duplicating cardbacks..."); foreach (KeyValuePair<string, CardbackData> item in value2) { if ((Object)(object)item.Value.CardbackSubclass != (Object)null && item.Value.CardbackSubclass.Id.ToLower() == (Essentials.IsHost() ? medsDLCCloneTwo.Value : medsMPDLCCloneTwo)) { CardbackData val2 = Object.Instantiate<CardbackData>(value2[item.Key]); val2.CardbackId = "medsdlctwo" + (char)num2; val2.CardbackSubclass = Globals.Instance.SubClass["medsdlctwo"]; dictionary[val2.CardbackId] = val2; num2++; } if ((Object)(object)item.Value.CardbackSubclass != (Object)null && item.Value.CardbackSubclass.Id.ToLower() == (Essentials.IsHost() ? medsDLCCloneThree.Value : medsMPDLCCloneThree)) { CardbackData val3 = Object.Instantiate<CardbackData>(value2[item.Key]); val3.CardbackId = "medsdlcthree" + (char)num3; val3.CardbackSubclass = Globals.Instance.SubClass["medsdlcthree"]; dictionary[val3.CardbackId] = val3; num3++; } if ((Object)(object)item.Value.CardbackSubclass != (Object)null && item.Value.CardbackSubclass.Id.ToLower() == (Essentials.IsHost() ? medsDLCCloneFour.Value : medsMPDLCCloneFour)) { CardbackData val4 = Object.Instantiate<CardbackData>(value2[item.Key]); val4.CardbackId = "medsdlcfour" + (char)num4; val4.CardbackSubclass = Globals.Instance.SubClass["medsdlcfour"]; dictionary[val4.CardbackId] = val4; num4++; } } medsDLCCloneTwoCardback = "medsdlctwo" + (char)(num2 - 1); medsDLCCloneThreeCardback = "medsdlcthree" + (char)(num3 - 1); medsDLCCloneFourCardback = "medsdlcfour" + (char)(num4 - 1); dictionary = (from p in value2.Concat(dictionary) group p by p.Key).ToDictionary((IGrouping<string, KeyValuePair<string, CardbackData>> g) => g.Key, (IGrouping<string, KeyValuePair<string, CardbackData>> g) => g.Last().Value); Traverse.Create((object)Globals.Instance).Field("_CardbackDataSource").SetValue((object)dictionary); Log.LogDebug((object)"CREATECLONECARDBACKS END"); Dictionary<string, SkinData> value3 = Traverse.Create((object)Globals.Instance).Field("_SkinDataSource").GetValue<Dictionary<string, SkinData>>(); for (int k = 97; k <= 122; k++) { if (value3.ContainsKey("medsdlctwo" + (char)k)) { value3.Remove("medsdlctwo" + (char)k); } if (value3.ContainsKey("medsdlcthree" + (char)k)) { value3.Remove("medsdlcthree" + (char)k); } if (value3.ContainsKey("medsdlcfour" + (char)k)) { value3.Remove("medsdlcfour" + (char)k); } } Dictionary<string, SkinData> dictionary2 = new Dictionary<string, SkinData>(); num2 = 97; num3 = 97; num4 = 97; foreach (KeyValuePair<string, SkinData> item2 in value3) { if ((Object)(object)item2.Value.SkinSubclass != (Object)null && item2.Value.SkinSubclass.Id.ToLower() == (Essentials.IsHost() ? medsDLCCloneTwo.Value : medsMPDLCCloneTwo)) { SkinData val5 = Object.Instantiate<SkinData>(value3[item2.Key]); val5.SkinId = "medsdlctwo" + (char)num2; val5.SkinSubclass = Globals.Instance.SubClass["medsdlctwo"]; dictionary2[val5.SkinId] = val5; num2++; } if ((Object)(object)item2.Value.SkinSubclass != (Object)null && item2.Value.SkinSubclass.Id.ToLower() == (Essentials.IsHost() ? medsDLCCloneThree.Value : medsMPDLCCloneThree)) { SkinData val6 = Object.Instantiate<SkinData>(value3[item2.Key]); val6.SkinId = "medsdlcthree" + (char)num3; val6.SkinSubclass = Globals.Instance.SubClass["medsdlcthree"]; dictionary2[val6.SkinId] = val6; num3++; } if ((Object)(object)item2.Value.SkinSubclass != (Object)null && item2.Value.SkinSubclass.Id.ToLower() == (Essentials.IsHost() ? medsDLCCloneFour.Value : medsMPDLCCloneFour)) { SkinData val7 = Object.Instantiate<SkinData>(value3[item2.Key]); val7.SkinId = "medsdlcfour" + (char)num4; val7.SkinSubclass = Globals.Instance.SubClass["medsdlcfour"]; dictionary2[val7.SkinId] = val7; num4++; } } medsDLCCloneTwoSkin = "medsdlctwo" + (char)(num2 - 1); medsDLCCloneThreeSkin = "medsdlcthree" + (char)(num3 - 1); medsDLCCloneFourSkin = "medsdlcfour" + (char)(num4 - 1); dictionary2 = (from p in value3.Concat(dictionary2) group p by p.Key).ToDictionary((IGrouping<string, KeyValuePair<string, SkinData>> g) => g.Key, (IGrouping<string, KeyValuePair<string, SkinData>> g) => g.Last().Value); Traverse.Create((object)Globals.Instance).Field("_SkinDataSource").SetValue((object)dictionary2); LogDebug("CREATECLONESKINS END"); } public static void SaveServerSelection() { switch (medsStrayaServer.Value) { case "asia": SaveManager.SaveIntoPrefsInt("networkRegion", 0); break; case "au": SaveManager.SaveIntoPrefsInt("networkRegion", 1); break; case "cae": SaveManager.SaveIntoPrefsInt("networkRegion", 2); break; case "eu": SaveManager.SaveIntoPrefsInt("networkRegion", 3); break; case "in": SaveManager.SaveIntoPrefsInt("networkRegion", 4); break; case "jp": SaveManager.SaveIntoPrefsInt("networkRegion", 5); break; case "ru": SaveManager.SaveIntoPrefsInt("networkRegion", 6); break; case "rue": SaveManager.SaveIntoPrefsInt("networkRegion", 7); break; case "za": SaveManager.SaveIntoPrefsInt("networkRegion", 8); break; case "sa": SaveManager.SaveIntoPrefsInt("networkRegion", 9); break; case "kr": SaveManager.SaveIntoPrefsInt("networkRegion", 10); break; case "us": SaveManager.SaveIntoPrefsInt("networkRegion", 11); break; case "usw": SaveManager.SaveIntoPrefsInt("networkRegion", 12); break; } } public static void UpdateAllThePets() { //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Invalid comparison between Unknown and I4 //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Invalid comparison between Unknown and I4 //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: 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_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) Dictionary<string, CardData> value = Traverse.Create((object)Globals.Instance).Field("_CardsSource").GetValue<Dictionary<string, CardData>>(); Dictionary<string, CardData> value2 = Traverse.Create((object)Globals.Instance).Field("_Cards").GetValue<Dictionary<string, CardData>>(); Dictionary<CardType, List<string>> medsBasicCardListByType = Essentials.medsBasicCardListByType; Dictionary<CardClass, List<string>> medsBasicCardListByClass = Essentials.medsBasicCardListByClass; List<string> medsBasicCardListNotUpgraded = Essentials.medsBasicCardListNotUpgraded; Dictionary<CardClass, List<string>> medsBasicCardListNotUpgradedByClass = Essentials.medsBasicCardListNotUpgradedByClass; Dictionary<string, List<string>> medsBasicCardListByClassType = Essentials.medsBasicCardListByClassType; Dictionary<CardType, List<string>> medsBasicCardItemByType = Essentials.medsBasicCardItemByType; foreach (string medsAllThePetsCard in Essentials.medsAllThePetsCards) { CardData val = value2[medsAllThePetsCard]; CardData val2 = value[medsAllThePetsCard]; if (Essentials.IsHost() ? medsAllThePets.Value : medsMPAllThePets) { val.ShowInTome = true; val2.ShowInTome = true; val.Item.QuestItem = false; val2.Item.QuestItem = false; Globals.Instance.IncludeInSearch(val.CardName, val.Id, true); if (!medsBasicCardListByClass[val.CardClass].Contains(val.Id)) { medsBasicCardListByClass[val.CardClass].Add(val.Id); } if ((int)val.CardUpgraded == 0) { if (!medsBasicCardListNotUpgradedByClass[val.CardClass].Contains(val.Id)) { medsBasicCardListNotUpgradedByClass[val.CardClass].Add(val.Id); } if (!medsBasicCardListNotUpgraded.Contains(val.Id)) { medsBasicCardListNotUpgraded.Add(val.Id); } if ((int)val.CardClass == 8) { if (!medsBasicCardItemByType.ContainsKey(val.CardType)) { medsBasicCardItemByType.Add(val.CardType, new List<string>()); } if (!medsBasicCardItemByType[val.CardType].Contains(val.Id)) { medsBasicCardItemByType[val.CardType].Add(val.Id); } } } List<CardType> cardTypes = val.GetCardTypes(); for (int i = 0; i < cardTypes.Count; i++) { if (!medsBasicCardListByType[cardTypes[i]].Contains(val.Id)) { medsBasicCardListByType[cardTypes[i]].Add(val.Id); } string key = Enum.GetName(typeof(CardClass), val.CardClass) + "_" + Enum.GetName(typeof(CardType), cardTypes[i]); if (!medsBasicCardListByClassType.ContainsKey(key)) { medsBasicCardListByClassType[key] = new List<string>(); } if (!medsBasicCardListByClassType[key].Contains(val.Id)) { medsBasicCardListByClassType[key].Add(val.Id); } Globals.Instance.IncludeInSearch(Texts.Instance.GetText(Enum.GetName(typeof(CardType), cardTypes[i]), ""), val.Id, true); } } else { val.ShowInTome = false; val2.ShowInTome = false; val.Item.QuestItem = true; val2.Item.QuestItem = true; } } medsBasicCardListByClassType["Item_Pet"].Sort(); medsBasicCardItemByType[(CardType)26].Sort(); Traverse.Create((object)Globals.Instance).Field("_CardListByType").SetValue((object)medsBasicCardListByType); Traverse.Create((object)Globals.Instance).Field("_CardListByClass").SetValue((object)medsBasicCardListByClass); Traverse.Create((object)Globals.Instance).Field("_CardListNotUpgraded").SetValue((object)medsBasicCardListNotUpgraded); Traverse.Create((object)Globals.Instance).Field("_CardListNotUpgradedByClass").SetValue((object)medsBasicCardListNotUpgradedByClass); Traverse.Create((object)Globals.Instance).Field("_CardListByClassType").SetValue((object)medsBasicCardListByClassType); Traverse.Create((object)Globals.Instance).Field("_CardItemByType").SetValue((object)medsBasicCardItemByType); Traverse.Create((object)Globals.Instance).Field("_Cards").SetValue((object)value2); Traverse.Create((object)Globals.Instance).Field("_CardsSource").SetValue((object)value); } public static void UpdateDropOnlyItems() { //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Invalid comparison between Unknown and I4 LogDebug("Updating drop-only items..."); Dictionary<string, ItemData> value = Traverse.Create((object)Globals.Instance).Field("_ItemDataSource").GetValue<Dictionary<string, ItemData>>(); foreach (string medsDropOnlyItem in Essentials.medsDropOnlyItems) { if (value.ContainsKey(medsDropOnlyItem) && !medsDoNotDropList.Contains(medsDropOnlyItem)) { value[medsDropOnlyItem].DropOnly = !(Essentials.IsHost() ? medsDropShop.Value : medsMPDropShop); } } Traverse.Create((object)Globals.Instance).Field("_ItemDataSource").SetValue((object)value); Dictionary<string, CardData> value2 = Traverse.Create((object)Globals.Instance).Field("_CardsSource").GetValue<Dictionary<string, CardData>>(); Dictionary<string, CardData> value3 = Traverse.Create((object)Globals.Instance).Field("_Cards").GetValue<Dictionary<string, CardData>>(); foreach (string key in value2.Keys) { if (value3.ContainsKey(key) && (int)value3[key].CardType != 26 && (Object)(object)value3[key].Item != (Object)null && Essentials.medsDropOnlyItems.Contains(value3[key].Item.Id) && !medsDoNotDropList.Contains(value3[key].Item.Id)) { value2[key].Item.DropOnly = !(Essentials.IsHost() ? medsDropShop.Value : medsMPDropShop); value3[key].Item.DropOnly = !(Essentials.IsHost() ? medsDropShop.Value : medsMPDropShop); } } Traverse.Create((object)Globals.Instance).Field("_Cards").SetValue((object)value3); Traverse.Create((object)Globals.Instance).Field("_CardsSource").SetValue((object)value2); } public static void UpdateVisitAllZones() { Dictionary<string, EventData> value = Traverse.Create((object)Globals.Instance).Field("_Events").GetValue<Dictionary<string, EventData>>(); Dictionary<string, NodeData> value2 = Traverse.Create((object)Globals.Instance).Field("_NodeDataSource").GetValue<Dictionary<string, NodeData>>(); EventReplyData val = value["e_velka33_tier2"].Replys[0].ShallowCopy(); val.IndexForAnswerTranslation = 666; string text = Texts.Instance.GetText("events_e_velka33_tier2_rp0", ""); string text2 = Texts.Instance.GetText("events_e_velka33_tier2_rp0_s", ""); bool flag = (Essentials.IsHost() ? medsVisitAllZones.Value : medsMPVisitAllZones); val.Requirement = (flag ? null : Globals.Instance.GetRequirementData("medsimpossiblerequirement")); foreach (string medsObeliskNode in medsObeliskNodes) { if (!value2.ContainsKey(medsObeliskNode)) { continue; } for (int i = 0; i < value2[medsObeliskNode].NodeEvent.Length; i++) { string eventId = value2[medsObeliskNode].NodeEvent[i].EventId; if ((Object)(object)value2[medsObeliskNode].NodeEvent[i].Requirement != (Object)null && (value2[medsObeliskNode].NodeEvent[i].Requirement.RequirementId == "medsimpossiblerequirement" || value2[medsObeliskNode].NodeEvent[i].Requirement.RequirementId == "_tier2")) { value[value2[medsObeliskNode].NodeEvent[i].EventId].Requirement = Globals.Instance.GetRequirementData(flag ? "medsimpossiblerequirement" : "_tier2"); value2[medsObeliskNode].NodeEvent[i].Requirement = Globals.Instance.GetRequirementData(flag ? "medsimpossiblerequirement" : "_tier2"); } else { if (value2[medsObeliskNode].NodeEvent[i].Replys.Length <= 2) { continue; } bool flag2 = false; for (int j = 0; j < value2[medsObeliskNode].NodeEvent[i].Replys.Length; j++) { if (value2[medsObeliskNode].NodeEvent[i].Replys[j].IndexForAnswerTranslation == 666) { flag2 = true; value2[medsObeliskNode].NodeEvent[i].Replys[j].Requirement = (flag ? null : Globals.Instance.GetRequirementData("medsimpossiblerequirement")); } else { value2[medsObeliskNode].NodeEvent[i].Replys[j].RequirementBlocked = (flag ? Globals.Instance.GetRequirementData("medsvisited" + value2[medsObeliskNode].NodeEvent[i].Replys[j].SsNodeTravel.NodeZone.ZoneId.ToLower()) : null); value2[medsObeliskNode].NodeEvent[i].Replys[j].SsRequirementUnlock = Globals.Instance.GetRequirementData(flag ? ("medsvisited" + value2[medsObeliskNode].NodeEvent[i].Replys[j].SsNodeTravel.NodeZone.ZoneId.ToLower()) : ((medsObeliskNode == "sen_34") ? "_tier1" : "_tier2")); } } EventReplyData[] array = (EventReplyData[])(object)new EventReplyData[0]; if (!flag2) { array = value2[medsObeliskNode].NodeEvent[i].Replys; Array.Resize(ref array, array.Length + 1); array[^1] = val.ShallowCopy(); value2[medsObeliskNode].NodeEvent[i].Replys = array; } flag2 = false; for (int k = 0; k < value[eventId].Replys.Length; k++) { if (value[eventId].Replys[k].IndexForAnswerTranslation == 666) { flag2 = true; value[eventId].Replys[k].Requirement = (flag ? null : Globals.Instance.GetRequirementData("_tier4")); } else { value[eventId].Replys[k].RequirementBlocked = Globals.Instance.GetRequirementData("medsvisited" + value[eventId].Replys[k].SsNodeTravel.NodeZone.ZoneId.ToLower()); value[eventId].Replys[k].SsRequirementUnlock = Globals.Instance.GetRequirementData(flag ? ("medsvisited" + value[eventId].Replys[k].SsNodeTravel.NodeZone.ZoneId.ToLower()) : ((medsObeliskNode == "sen_34") ? "_tier1" : "_tier2")); } } if (!flag2) { array = value[value2[medsObeliskNode].NodeEvent[i].EventId].Replys; Array.Resize(ref array, array.Length + 1); array[^1] = val.ShallowCopy(); value[value2[medsObeliskNode].NodeEvent[i].EventId].Replys = array; } Essentials.medsTexts["events_" + value2[medsObeliskNode].NodeEvent[i].EventId + "_rp" + val.IndexForAnswerTranslation] = text; Essentials.medsTexts["events_" + value2[medsObeliskNode].NodeEvent[i].EventId + "_rp" + val.IndexForAnswerTranslation + "_s"] = text2; } } } Traverse.Create((object)Globals.Instance).Field("_Events").SetValue((object)value); Traverse.Create((object)Globals.Instance).Field("_NodeDataSource").SetValue((object)value2); } public static void UpdateRequirements() { Dictionary<string, NodeData> value = Traverse.Create((object)Globals.Instance).Field("_NodeDataSource").GetValue<Dictionary<string, NodeData>>(); if (medsNoKeyItemRequirements.Value) { LogDebug("removing key item requirements"); foreach (string key in value.Keys) { if ((Object)(object)value[key].NodeRequirement != (Object)null && !medsKeepRequirements.Contains(value[key].NodeRequirement.RequirementId)) { value[key].NodeRequirement = null; } for (int i = 0; i < value[key].NodesConnectedRequirement.Length; i++) { value[key].NodesConnectedRequirement[i].ConectionRequeriment = null; } } } Dictionary<string, EventData> value2 = Traverse.Create((object)Globals.Instance).Field("_Events").GetValue<Dictionary<string, EventData>>(); if (!medsNoClassRequirements.Value && !medsNoEquipmentRequirements.Value && !medsNoKeyItemRequirements.Value) { return; } foreach (string key2 in value2.Keys) { if (medsNoClassRequirements.Value) { value2[key2].RequiredClass = null; } if (medsNoKeyItemRequirements.Value && (Object)(object)value2[key2].Requirement != (Object)null && !medsKeepRequirements.Contains(value2[key2].Requirement.RequirementId)) { value2[key2].Requirement = null; } EventReplyData[] replys = value2[key2].Replys; foreach (EventReplyData val in replys) { if (medsNoClassRequirements.Value && !val.RepeatForAllCharacters && !val.SsRoll) { val.RequiredClass = null; } if (medsNoEquipmentRequirements.Value && val.GoldCost != 80) { val.RequirementItem = null; } if (medsNoKeyItemRequirements.Value) { if ((Object)(object)val.Requirement != (Object)null && !medsKeepRequirements.Contains(val.Requirement.RequirementId)) { val.Requirement = null; } val.RequirementBlocked = null; } } } } } [HarmonyPatch] internal class Patches { public static Vector3 medsPosIni; public static Vector3 medsPosIniBlocked; public static bool bSelectingPerk; public static bool bFinalResolution; [HarmonyPostfix] [HarmonyPatch(typeof(MainMenuManager), "Start")] public static void MMStartPostfix(ref MainMenuManager __instance) { Options.UpdateDropOnlyItems(); Options.UpdateAllThePets(); Options.UpdateVisitAllZones(); } [HarmonyPostfix] [HarmonyPatch(typeof(Globals), "GetLootData")] public static void GetLootDataPostfix(ref LootData __result) { if ((Object)(object)__result == (Object)null) { return; } Options.Log.LogDebug((object)("GetLootData uncommon: " + __result.DefaultPercentUncommon + " rare: " + __result.DefaultPercentRare + " epic: " + __result.DefaultPercentEpic + " mythic: " + __result.DefaultPercentMythic)); __result = Object.Instantiate<LootData>(__result); if (Essentials.IsHost() ? Options.medsShopRarity.Value : Options.medsMPShopRarity) { float num = 0f; if (MadnessManager.Instance.IsMadnessTraitActive("impedingdoom")) { num += 0.25f; } if (MadnessManager.Instance.IsMadnessTraitActive("decadence")) { num += 0.5f; } if (MadnessManager.Instance.IsMadnessTraitActive("restrictedpower")) { num += 1f; } if (MadnessManager.Instance.IsMadnessTraitActive("resistantmonsters")) { num += 0.75f; } if (MadnessManager.Instance.IsMadnessTraitActive("poverty")) { num += 1f; } if (MadnessManager.Instance.IsMadnessTraitActive("overchargedmonsters")) { num += 1.5f; } if (MadnessManager.Instance.IsMadnessTraitActive("randomcombats")) { num += 0.75f; } if (MadnessManager.Instance.IsMadnessTraitActive("despair")) { num += 1.25f; } num += (float)AtOManager.Instance.GetNgPlus(false); float num2 = 1f; if (AtOManager.Instance.corruptionId == "shop") { num2 += 2f * ((float)AtOManager.Instance.GetTownTier() + 1f); } if (AtOManager.Instance.corruptionId == "exoticshop") { num2 += 5f * ((float)AtOManager.Instance.GetTownTier() + 1f); } LootData obj = __result; obj.DefaultPercentRare += (float)Math.Pow((float)AtOManager.Instance.GetTownTier() + 1f, Options.medsBLPTownTierPower) * num * num2 / 50f * Options.medsBLPRareMult; LootData obj2 = __result; obj2.DefaultPercentEpic += (float)Math.Pow((float)AtOManager.Instance.GetTownTier() + 1f, Options.medsBLPTownTierPower) * num * num2 / 50f * Options.medsBLPEpicMult; LootData obj3 = __result; obj3.DefaultPercentMythic += (float)Math.Pow((float)AtOManager.Instance.GetTownTier(), Options.medsBLPTownTierPower) * num * num2 / 50f * Options.medsBLPMythicMult; Options.Log.LogDebug((object)("ShopRarity uncommon: " + __result.DefaultPercentUncommon + " rare: " + __result.DefaultPercentRare + " epic: " + __result.DefaultPercentEpic + " mythic: " + __result.DefaultPercentMythic)); } float num3 = (Essentials.IsHost() ? ((float)Options.medsShopBadLuckProtection.Value) : ((float)Options.medsMPShopBadLuckProtection)); if (num3 > 0f) { num3 = num3 * (float)Math.Pow((float)AtOManager.Instance.GetTownTier() + 1f, Options.medsBLPTownTierPower) * (float)Math.Pow((float)Options.iShopsWithNoPurchase, Options.medsBLPRollPower) / 100000f; Options.Log.LogDebug((object)("fBadLuckPro: " + num3)); LootData obj4 = __result; obj4.DefaultPercentUncommon += num3 * Options.medsBLPUncommonMult; LootData obj5 = __result; obj5.DefaultPercentRare += num3 * Options.medsBLPRareMult; LootData obj6 = __result; obj6.DefaultPercentEpic += num3 * Options.medsBLPEpicMult; LootData obj7 = __result; obj7.DefaultPercentMythic += num3 * Options.medsBLPMythicMult * (float)AtOManager.Instance.GetTownTier(); if (__result.DefaultPercentMythic >= 100f) { __result.DefaultPercentMythic = 100f; __result.DefaultPercentEpic = 0f; __result.DefaultPercentRare = 0f; __result.DefaultPercentUncommon = 0f; } else if (__result.DefaultPercentMythic + __result.DefaultPercentEpic > 100f) { __result.DefaultPercentEpic = 100f - __result.DefaultPercentMythic; __result.DefaultPercentRare = 0f; __result.DefaultPercentUncommon = 0f; } else if (__result.DefaultPercentMythic + __result.DefaultPercentEpic + __result.DefaultPercentRare > 100f) { __result.DefaultPercentRare = 100f - __result.DefaultPercentMythic - __result.DefaultPercentEpic; __result.DefaultPercentUncommon = 0f; } else if (__result.DefaultPercentMythic + __result.DefaultPercentEpic + __result.DefaultPercentRare + __result.DefaultPercentUncommon > 100f) { __result.DefaultPercentUncommon = 100f - __result.DefaultPercentMythic - __result.DefaultPercentEpic - __result.DefaultPercentRare; } Options.Log.LogDebug((object)("BadLuckProt uncommon: " + __result.DefaultPercentUncommon + " rare: " + __result.DefaultPercentRare + " epic: " + __result.DefaultPercentEpic + " mythic: " + __result.DefaultPercentMythic)); Options.iShopsWithNoPurchase++; Options.Log.LogDebug((object)("shops with no purchase increased to: " + Options.iShopsWithNoPurchase)); } } [HarmonyPostfix] [HarmonyPatch(typeof(Loot), "GetLootItems", new Type[] { typeof(string), typeof(string) })] public static void GetLootItemsPostfix(ref List<string> __result, string _itemListId, string _idAux = "") { //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Invalid comparison between Unknown and I4 //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Invalid comparison between Unknown and I4 //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Invalid comparison between Unknown and I4 //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Invalid comparison between Unknown and I4 //IL_02ec: Unknown result type (might be due to invalid IL or missing references) Options.LogDebug("_idAux: " + _idAux); Options.LogDebug("_itemListId: " + _itemListId); Options.LogDebug("GetlootItems Result: " + string.Join(", ", __result)); if (__result == null) { return; } for (int i = 0; i < __result.Count; i++) { int num = Random.Range(0, 100); CardData cardData = Globals.Instance.GetCardData(__result[i], false); if (!((Object)(object)cardData == (Object)null)) { int num2 = 0; num2 += Functions.FuncRoundToInt((float)AtOManager.Instance.GetTownTier()); num2 *= 2; float num3 = 0f; if (MadnessManager.Instance.IsMadnessTraitActive("impedingdoom")) { num3 += 0.25f; } if (MadnessManager.Instance.IsMadnessTraitActive("decadence")) { num3 += 0.5f; } if (MadnessManager.Instance.IsMadnessTraitActive("restrictedpower")) { num3 += 1f; } if (MadnessManager.Instance.IsMadnessTraitActive("resistantmonsters")) { num3 += 0.75f; } if (MadnessManager.Instance.IsMadnessTraitActive("poverty")) { num3 += 0.5f; } if (MadnessManager.Instance.IsMadnessTraitActive("overchargedmonsters")) { num3 += 1.5f; } if (MadnessManager.Instance.IsMadnessTraitActive("randomcombats")) { num3 += 0.75f; } if (MadnessManager.Instance.IsMadnessTraitActive("despair")) { num3 += 1.25f; } num3 += (float)AtOManager.Instance.GetNgPlus(false); num2 += Functions.FuncRoundToInt(num3); if (!AtOManager.Instance.CharInTown()) { num2 += 40; } if (AtOManager.Instance.corruptionId == "shop") { num2 -= 10; } if (AtOManager.Instance.corruptionId == "exoticshop") { num2 += 10; } if (!(AtOManager.Instance.corruptionId == "exoticshop") && !(AtOManager.Instance.corruptionId == "rareshop") && !(AtOManager.Instance.corruptionId == "shop") && !AtOManager.Instance.CharInTown() && Options.medsLootCorrupt.Value) { num2 += 100; } bool flag = false; if (((int)cardData.CardRarity == 4 || (int)cardData.CardRarity == 3) && num < 3 + num2) { flag = true; } else if ((int)cardData.CardRarity == 2 && num < 7 + num2) { flag = true; } else if ((int)cardData.CardRarity == 1 && num < 11 + num2) { flag = true; } else if ((int)cardData.CardRarity == 0 && num < 15 + num2) { flag = true; } bool flag2 = true; flag2 = (AtOManager.Instance.CharInTown() ? (Essentials.IsHost() ? Options.medsTownShopCorrupt.Value : Options.medsMPTownShopCorrupt) : ((!(AtOManager.Instance.corruptionId == "exoticshop") && !(AtOManager.Instance.corruptionId == "rareshop") && !(AtOManager.Instance.corruptionId == "shop")) ? (Essentials.IsHost() ? Options.medsMapShopCorrupt.Value : Options.medsMPMapShopCorrupt) : (Essentials.IsHost() ? Options.medsObeliskShopCorrupt.Value : Options.medsMPObeliskShopCorrupt))); if (flag2 && flag && (Object)(object)cardData.UpgradesToRare != (Object)null) { __result[i] = cardData.UpgradesToRare.Id; } } } } [HarmonyPrefix] [HarmonyPatch(typeof(ProfanityFilter), "CensorString", new Type[] { typeof(string), typeof(char), typeof(bool) })] public static bool CensorStringPrefix(ref string __result, string sentence) { if (Options.medsProfane.Value) { __result = sentence; return false; } return true; } [Harmo