Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of TheHouse v2.3.2
HouseMod.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EmotesAPI; using EntityStates; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using Facepunch.Steamworks; using HG; using HG.BlendableTypes; using HouseMod.Modules; using HouseMod.Modules.Components; using HouseMod.Modules.Survivors; using HouseMod.SkillStates; using HouseMod.SkillStates.House; using HouseMod.SkillStates.House.Cards; using HouseMod.SkillStates.House.Shots; using HouseMod.SkillStates.House.TheGame; using IL.RoR2; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using NS_KingKombatArena; using On.RoR2; using On.RoR2.UI; using OrographicGambitBaseMod.Modules; using OrographicGambitBaseMod.Modules.Components; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using Rewired; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Audio; using RoR2.ContentManagement; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.EventSystems; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("0Harmony")] [assembly: IgnoresAccessChecksTo("HGUnityUtils")] [assembly: AssemblyCompany("HouseMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("HouseMod")] [assembly: AssemblyTitle("HouseMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] internal class BodyInfo { internal string bodyName = ""; internal string bodyNameToken = ""; internal string subtitleNameToken = ""; internal Texture characterPortrait = null; internal GameObject crosshair = null; internal GameObject podPrefab = null; internal float maxHealth = 100f; internal float healthGrowth = 2f; internal float healthRegen = 0f; internal float shield = 0f; internal float shieldGrowth = 0f; internal float moveSpeed = 7f; internal float moveSpeedGrowth = 0f; internal float acceleration = 80f; internal float jumpPower = 15f; internal float jumpPowerGrowth = 0f; internal float damage = 12f; internal float attackSpeed = 1f; internal float attackSpeedGrowth = 0f; internal float armor = 0f; internal float armorGrowth = 0f; internal float crit = 1f; internal float critGrowth = 0f; internal int jumpCount = 1; internal Color bodyColor = Color.grey; } internal class CustomRendererInfo { internal string childName; internal Material material; internal bool ignoreOverlays; } internal class SkillDefInfo { public string skillName; public string skillNameToken; public string skillDescriptionToken; public Sprite skillIcon; public SerializableEntityStateType activationState; public string activationStateMachineName; public int baseMaxStock; public float baseRechargeInterval; public bool beginSkillCooldownOnSkillEnd; public bool canceledFromSprinting; public bool forceSprintDuringState; public bool fullRestockOnAssign; public InterruptPriority interruptPriority; public bool resetCooldownTimerOnUse; public bool isCombatSkill; public bool mustKeyPress; public bool cancelSprintingOnActivation; public int rechargeStock; public int requiredStock; public int stockToConsume; public string[] keywordTokens; } namespace HouseMod { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.JavAngle.HouseMod", "HouseMod", "2.3.2")] [R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI", "NetworkingAPI" })] public class HousePlugin : BaseUnityPlugin { public const string MODUID = "com.JavAngle.HouseMod"; public const string MODNAME = "HouseMod"; public const string MODVERSION = "2.3.2"; public const int test = 5; public const string developerPrefix = "JAVANGLE"; public static bool scepterInstalled; public static bool scrollableLobbyInstalled; public static bool RiskOfOptionsInstalled; public static bool EmotesAPIInstalled; public static bool KKArenaInstalled; public static bool GOTCEInstalled; public static HousePlugin instance; private bool emoteAPIsetup = false; private void Awake() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown instance = this; if (Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter")) { scepterInstalled = true; } if (Chainloader.PluginInfos.ContainsKey("com.KingEnderBrine.ScrollableLobbyUI")) { scrollableLobbyInstalled = true; } if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions")) { RiskOfOptionsInstalled = true; } if (Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI")) { EmotesAPIInstalled = true; } if (Chainloader.PluginInfos.ContainsKey("com.Kingpinush.KingKombatArena")) { KKArenaInstalled = true; } if (Chainloader.PluginInfos.ContainsKey("com.TheBestAssociatedLargelyLudicrousSillyheadGroup.GOTCE")) { GOTCEInstalled = true; } Assets.PopulateAssets(); Config.ReadConfig(); States.RegisterStates(); Buffs.RegisterBuffs(); Projectiles.RegisterProjectiles(); Tokens.AddTokens(); ItemDisplays.PopulateDisplays(); ArtifactOfWildroom.Initialise(); NetworkingAPI.RegisterMessageType<WildRoomNetworkComponent>(); NetworkingAPI.RegisterMessageType<StageDetonateNetworkComponent>(); House.CreateCharacter(); ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); Hook(); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)new ContentPacks()); } private void Start() { ContentManager.onContentPacksAssigned += ContentManager_onContentPacksAssigned; } private void ContentManager_onContentPacksAssigned(ReadOnlyArray<ReadOnlyContentPack> obj) { House.InitializeItemDisplays(); House.SetItemDisplays(); } private void Hook() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); HUD.Awake += new hook_Awake(CardTableHUD); HUD.Awake += new hook_Awake(CylinderHUD); HUD.Awake += new hook_Awake(GlobalHUD); CharacterSelectController.UpdateSurvivorInfoPanel += new hook_UpdateSurvivorInfoPanel(CharacterSelectController_UpdateSurvivorInfoPanel); CharacterSelectController.RebuildLocal += new hook_RebuildLocal(CharacterSelectController_RebuildLocal); CharacterSelectController.OnEnable += new hook_OnEnable(CharacterSelectController_OnEnable); HealthComponent.TakeDamage += new Manipulator(HealthComponent_TakeDamage); if (scepterInstalled) { SetUpScepterSupport(); } if (EmotesAPIInstalled) { SetUpEmotes(); } if (KKArenaInstalled) { HousePassiveManager.isKKAInstalled = true; } } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self)) { if (self.HasBuff(Buffs.Spadesbuff)) { self.moveSpeed *= 1.4f; } if (self.HasBuff(Buffs.Ante)) { int buffCount = self.GetBuffCount(Buffs.Ante); self.moveSpeed *= 1f + 0.05f * (float)buffCount; self.attackSpeed += 0.05f * (float)buffCount; self.armor -= Mathf.Floor(1.25f * (float)buffCount); } if (self.HasBuff(Buffs.TabulaRasa)) { self.damage = self.baseDamage; self.armor = self.baseArmor; self.attackSpeed = self.baseAttackSpeed; self.crit = self.baseCrit; self.maxJumpCount = self.baseJumpCount; self.maxHealth = self.baseMaxHealth; self.maxShield = self.baseMaxShield; self.moveSpeed = self.baseMoveSpeed; self.regen = self.baseRegen; } } } private static void HealthComponent_TakeDamage(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel conditionalTarget = null; int num = default(int); if (!val.TryGotoNext(new Func<Instruction, bool>[6] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCall<HealthComponent>(x, "get_fullCombinedHealth"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.9f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchBltUn(x, ref conditionalTarget) })) { return; } val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<HealthComponent, DamageInfo, bool>>((Func<HealthComponent, DamageInfo, bool>)delegate(HealthComponent healthComponent, DamageInfo damageInfo) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody body = healthComponent.body; CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); return (Object)(object)component == (Object)(object)body && body.bodyIndex == BodyCatalog.FindBodyIndex("JavangleHouse"); } return false; }); val.Emit(OpCodes.Brtrue, (object)conditionalTarget); } private void CardTableHUD(orig_Awake orig, HUD self) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); Transform val = self.mainContainer.transform.Find("MainUIArea"); val = val.Find("SpringCanvas"); val = val.Find("BottomRightCluster"); HouseHUDManager.defualtUI = val; GameObject val2 = Object.Instantiate<GameObject>(Assets.HouseHotbar); val2.transform.SetParent(self.mainContainer.transform); RectTransform component = val2.GetComponent<RectTransform>(); component.anchorMin = new Vector2(1f, 0f); component.anchorMax = new Vector2(1f, 0f); component.sizeDelta = Vector2.zero; ((Transform)component).localScale = Vector2.op_Implicit(Vector2.zero); component.anchoredPosition = new Vector2(Config.hudPositionX.Value, Config.hudPositionY.Value); ChildLocator component2 = val2.GetComponent<ChildLocator>(); HouseHUDManager.HouseHotbar = component; HouseHUDManager.HotbarAnimator = val2.GetComponent<Animator>(); HouseHUDManager.CardArts = (Image[])(object)new Image[3] { ((Component)component2.FindChild("CardArt1")).GetComponent<Image>(), ((Component)component2.FindChild("CardArt2")).GetComponent<Image>(), ((Component)component2.FindChild("CardArt3")).GetComponent<Image>() }; HouseHUDManager.CardTooltips = new TooltipComponent[HouseHUDManager.CardArts.Length]; for (int num = HouseHUDManager.CardArts.Length - 1; num >= 0; num--) { HouseHUDManager.CardTooltips[num] = ((Component)HouseHUDManager.CardArts[num]).gameObject.AddComponent<TooltipComponent>(); } HouseHUDManager.CardColour = (Image[])(object)new Image[3] { ((Component)component2.FindChild("CardColour1")).GetComponent<Image>(), ((Component)component2.FindChild("CardColour2")).GetComponent<Image>(), ((Component)component2.FindChild("CardColour3")).GetComponent<Image>() }; HouseHUDManager.HotbarIcons = (Image[])(object)new Image[5] { ((Component)component2.FindChild("PrimaryIcon")).GetComponent<Image>(), ((Component)component2.FindChild("CardIcon1")).GetComponent<Image>(), ((Component)component2.FindChild("CardIcon2")).GetComponent<Image>(), ((Component)component2.FindChild("CardIcon3")).GetComponent<Image>(), ((Component)component2.FindChild("EquipmentIcon")).GetComponent<Image>() }; HouseHUDManager.HotbarTooltips = new TooltipComponent[HouseHUDManager.HotbarIcons.Length]; for (int num2 = HouseHUDManager.HotbarIcons.Length - 1; num2 >= 0; num2--) { HouseHUDManager.HotbarTooltips[num2] = ((Component)HouseHUDManager.HotbarIcons[num2]).gameObject.AddComponent<TooltipComponent>(); } HouseHUDManager.HotbarCooldown = (Text[])(object)new Text[5] { ((Component)component2.FindChild("PrimaryCooldown")).GetComponent<Text>(), ((Component)component2.FindChild("CardCooldown1")).GetComponent<Text>(), ((Component)component2.FindChild("CardCooldown2")).GetComponent<Text>(), ((Component)component2.FindChild("CardCooldown3")).GetComponent<Text>(), ((Component)component2.FindChild("EquipmentCooldown")).GetComponent<Text>() }; HouseHUDManager.HotbarStocks = (Text[])(object)new Text[5] { ((Component)component2.FindChild("PrimaryStocks")).GetComponent<Text>(), ((Component)component2.FindChild("CardStocks1")).GetComponent<Text>(), ((Component)component2.FindChild("CardStocks2")).GetComponent<Text>(), ((Component)component2.FindChild("CardStocks3")).GetComponent<Text>(), ((Component)component2.FindChild("EquipmentStock")).GetComponent<Text>() }; HouseHUDManager.HotbarKeys = (Text[])(object)new Text[5] { ((Component)component2.FindChild("PrimaryHotkey")).GetComponent<Text>(), ((Component)component2.FindChild("CardHotkey1")).GetComponent<Text>(), ((Component)component2.FindChild("CardHotkey2")).GetComponent<Text>(), ((Component)component2.FindChild("CardHotkey3")).GetComponent<Text>(), ((Component)component2.FindChild("EquipmentHotkey")).GetComponent<Text>() }; HouseHUDManager.DrawPile = ((Component)component2.FindChild("DeckCount")).GetComponent<Text>(); val2.AddComponent<HouseHUDManager>(); } private void CylinderHUD(orig_Awake orig, HUD self) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); GameObject val = Object.Instantiate<GameObject>(Assets.HouseCrosshair); val.transform.SetParent(self.mainContainer.transform); RectTransform component = val.GetComponent<RectTransform>(); component.anchorMin = new Vector2(0.5f, 0.5f); component.anchorMax = new Vector2(0.5f, 0.5f); component.sizeDelta = Vector2.zero; ((Transform)component).localScale = Vector2.op_Implicit(Vector2.zero); component.anchoredPosition = new Vector2(Config.crosshairPositionX.Value, Config.crosshairPositionY.Value); ChildLocator component2 = val.GetComponent<ChildLocator>(); HouseHUDManager.HouseCrosshair = component; HouseHUDManager.CrosshairAnimator = val.GetComponent<Animator>(); HouseHUDManager.PrioityShot = ((Component)component2.FindChild("PriorityShot")).GetComponent<Image>(); HouseHUDManager.ShotAmmo = (Image[])(object)new Image[6] { ((Component)component2.FindChild("Shot1")).GetComponent<Image>(), ((Component)component2.FindChild("Shot2")).GetComponent<Image>(), ((Component)component2.FindChild("Shot3")).GetComponent<Image>(), ((Component)component2.FindChild("Shot4")).GetComponent<Image>(), ((Component)component2.FindChild("Shot5")).GetComponent<Image>(), ((Component)component2.FindChild("Shot6")).GetComponent<Image>() }; HouseHUDManager.Cylinders = (Image[])(object)new Image[3] { ((Component)component2.FindChild("Cylinder1")).GetComponent<Image>(), ((Component)component2.FindChild("Cylinder2")).GetComponent<Image>(), ((Component)component2.FindChild("Cylinder3")).GetComponent<Image>() }; } private void GlobalHUD(orig_Awake orig, HUD self) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); GameObject val = Object.Instantiate<GameObject>(Assets.HouseGlobalHUD); val.transform.SetParent(self.mainContainer.transform); RectTransform component = val.GetComponent<RectTransform>(); component.anchorMin = new Vector2(0.5f, 1f); component.anchorMax = new Vector2(0.5f, 1f); component.sizeDelta = Vector2.zero; ((Transform)component).localScale = Vector2.op_Implicit(Vector2.one); component.anchoredPosition = Vector2.op_Implicit(new Vector3(0f, -200f, 0f)); ChildLocator component2 = val.GetComponent<ChildLocator>(); HouseGlobalHUDManager.animator = val.GetComponent<Animator>(); HouseGlobalHUDManager.StageDetonationTimer = ((Component)component2.FindChild("StageDetonationTimer")).GetComponent<Text>(); HouseGlobalHUDManager.WildWheel = (Text[])(object)new Text[6] { ((Component)component2.FindChild("WildWheel1")).GetComponent<Text>(), ((Component)component2.FindChild("WildWheel2")).GetComponent<Text>(), ((Component)component2.FindChild("WildWheel3")).GetComponent<Text>(), ((Component)component2.FindChild("WildWheel4")).GetComponent<Text>(), ((Component)component2.FindChild("WildWheel5")).GetComponent<Text>(), ((Component)component2.FindChild("WildWheel6")).GetComponent<Text>() }; HouseGlobalHUDManager.WildMadnessLevel = ((Component)component2.FindChild("WildRoomMadnessLevel")).GetComponent<Text>(); Auspicious.Init(); val.AddComponent<HouseGlobalHUDManager>(); if (ArtifactOfWildroom.isEnabled) { ArtifactOfWildroom.SummonArtifactWildroom(); } } private void CharacterSelectController_UpdateSurvivorInfoPanel(orig_UpdateSurvivorInfoPanel orig, CharacterSelectController self) { orig.Invoke(self); SurvivorDef currentSurvivorDef = self.currentSurvivorDef; if (Object.op_Implicit((Object)(object)currentSurvivorDef) && currentSurvivorDef.displayNameToken == "JAVANGLE_HOUSE_BODY_NAME") { if (((UIBehaviour)self.survivorDescription).IsActive()) { HouseLoadoutOverview.OverviewPanel.SetActive(true); } else { HouseLoadoutOverview.OverviewPanel.SetActive(false); } } else { HouseLoadoutOverview.OverviewPanel.SetActive(false); } } private void CharacterSelectController_RebuildLocal(orig_RebuildLocal orig, CharacterSelectController self, bool deselectButtons) { orig.Invoke(self, deselectButtons); SurvivorDef currentSurvivorDef = self.currentSurvivorDef; if (Object.op_Implicit((Object)(object)currentSurvivorDef) && currentSurvivorDef.displayNameToken == "JAVANGLE_HOUSE_BODY_NAME") { HouseLoadoutOverview.SetCardOverview(); } else { HouseLoadoutOverview.UnsetCardOverview(); } } private void CharacterSelectController_OnEnable(orig_OnEnable orig, CharacterSelectController self) { //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); ((Component)self).gameObject.AddComponent<HouseLoadoutOverview>(); Transform parent = ((TMP_Text)self.survivorDescription).transform.parent.parent; GameObject val = Object.Instantiate<GameObject>(Assets.HouseCSSOverview, parent); Transform val2 = self.activeSurvivorInfoPanel.transform.Find("SubheaderPanel (Overview, Skills, Loadout)"); val2 = val2.Find("GenericMenuButton (Overview)"); val2 = val2.Find("ButtonText"); ChildLocator component = val.GetComponent<ChildLocator>(); Transform val3 = component.FindChild("Shots"); int num = HouseShotDefs.shots.Length - 1; for (int i = 1; i <= num; i++) { GameObject val4 = Object.Instantiate<GameObject>(Assets.HouseCSSIcon, val3); TooltipComponent tooltipComponent = val4.AddComponent<TooltipComponent>(); val4.AddComponent<LoadoutButton>(); Image component2 = val4.GetComponent<Image>(); component2.sprite = HouseShotDefs.shots[i].icon; ((Graphic)component2).color = HouseShotDefs.shots[i].color; tooltipComponent.tooltipName = HouseShotDefs.shots[i].name; tooltipComponent.tooltipDescription = HouseShotDefs.shots[i].description; tooltipComponent.tooltipColor = HouseShotDefs.shots[i].color; tooltipComponent.Awake(); tooltipComponent.UpdateCardTooltips(); } val3 = component.FindChild("StandardSpread"); num = HouseCardDefs.AbreviateStandard.Length - 1; for (int j = 0; j <= num; j++) { GameObject val5 = Object.Instantiate<GameObject>(Assets.HouseCSSIcon, val3); TooltipComponent tooltipComponent2 = val5.AddComponent<TooltipComponent>(); val5.AddComponent<LoadoutButton>(); Image component3 = val5.GetComponent<Image>(); component3.sprite = HouseCardDefs.cards[HouseCardDefs.AbreviateStandard[j]].cardIcon; tooltipComponent2.tooltipName = HouseCardDefs.cards[HouseCardDefs.AbreviateStandard[j]].name; tooltipComponent2.tooltipDescription = HouseCardDefs.cards[HouseCardDefs.AbreviateStandard[j]].description; tooltipComponent2.tooltipColor = HouseCardDefs.cards[HouseCardDefs.AbreviateStandard[j]].color; tooltipComponent2.Awake(); tooltipComponent2.UpdateCardTooltips(); } val3 = component.FindChild("FullHouse"); num = HouseCardDefs.AbreviateFull.Length - 1; for (int k = 0; k <= num; k++) { GameObject val6 = Object.Instantiate<GameObject>(Assets.HouseCSSIcon, val3); TooltipComponent tooltipComponent3 = val6.AddComponent<TooltipComponent>(); val6.AddComponent<LoadoutButton>(); Image component4 = val6.GetComponent<Image>(); component4.sprite = HouseCardDefs.cards[HouseCardDefs.AbreviateFull[k]].cardIcon; tooltipComponent3.tooltipName = HouseCardDefs.cards[HouseCardDefs.AbreviateFull[k]].name; tooltipComponent3.tooltipDescription = HouseCardDefs.cards[HouseCardDefs.AbreviateFull[k]].description; tooltipComponent3.tooltipColor = HouseCardDefs.cards[HouseCardDefs.AbreviateFull[k]].color; tooltipComponent3.Awake(); tooltipComponent3.UpdateCardTooltips(); } val3 = component.FindChild("Tarot"); num = HouseCardDefs.AbreviateDivine.Length - 1; for (int l = 0; l <= num; l++) { GameObject val7 = Object.Instantiate<GameObject>(Assets.HouseCSSIcon, val3); TooltipComponent tooltipComponent4 = val7.AddComponent<TooltipComponent>(); val7.AddComponent<LoadoutButton>(); Image component5 = val7.GetComponent<Image>(); component5.sprite = HouseCardDefs.cards[HouseCardDefs.AbreviateDivine[l]].cardIcon; tooltipComponent4.tooltipName = HouseCardDefs.cards[HouseCardDefs.AbreviateDivine[l]].name; tooltipComponent4.tooltipDescription = HouseCardDefs.cards[HouseCardDefs.AbreviateDivine[l]].description; tooltipComponent4.tooltipColor = HouseCardDefs.cards[HouseCardDefs.AbreviateDivine[l]].color; tooltipComponent4.Awake(); tooltipComponent4.UpdateCardTooltips(); } HouseLoadoutOverview.OverviewPanel = val; HouseLoadoutOverview.OverviewButton = ((Component)val2).GetComponent<HGTextMeshProUGUI>(); } private void SetUpEmotes() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown SurvivorCatalog.Init += (hook_Init)delegate(orig_Init orig) { orig.Invoke(); if (!emoteAPIsetup) { emoteAPIsetup = true; foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs) { if (((Object)allSurvivorDef.bodyPrefab).name == "JavangleHouse") { GameObject val = Assets.mainAssetBundle.LoadAsset<GameObject>("House_emote"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val, 0, true); val.GetComponentInChildren<BoneMapper>().scale = 1.1f; CustomEmotesAPI.CreateNameTokenSpritePair("JAVANGLE_HOUSE_BODY_NAME", Assets.mainAssetBundle.LoadAsset<Sprite>("HouseEmoteIconWheel")); } } } }; CustomEmotesAPI.animChanged += new AnimationChanged(HouseHideMeshes); } private void HouseHideMeshes(string newAnimation, BoneMapper mapper) { if (!(((Object)mapper).name == "House_emote")) { return; } if (newAnimation != "none") { Animator componentInParent = ((Component)((Component)mapper).transform.parent).gameObject.GetComponentInParent<Animator>(); ChildLocator componentInParent2 = ((Component)mapper).gameObject.GetComponentInParent<ChildLocator>(); if (!Object.op_Implicit((Object)(object)componentInParent)) { Debug.LogError((object)"Could not find Animator"); } else { componentInParent.Play("EmoteWeapon", 8); } } else { Animator componentInParent3 = ((Component)((Component)mapper).transform.parent).gameObject.GetComponentInParent<Animator>(); ChildLocator componentInParent4 = ((Component)mapper).gameObject.GetComponentInParent<ChildLocator>(); if (!Object.op_Implicit((Object)(object)componentInParent3)) { Debug.LogError((object)"Could not find Animator"); } else { componentInParent3.Play("BufferEmpty", 8); } } } private void SetUpScepterSupport() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) CharacterBody.onBodyInventoryChangedGlobal += CharacterBody_onBodyInventoryChangedGlobal; string text = "JAVANGLE_HOUSE_BODY_"; SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = text + "SHUFFLEART_NAME"; skillDefInfo.skillNameToken = text + "SHUFFLEART_NAME"; skillDefInfo.skillDescriptionToken = text + "SHUFFLEART_DESCRIPTION"; skillDefInfo.skillIcon = Assets.mainAssetBundle.LoadAsset<Sprite>("ShuffleArtsStandard"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(UseCard)); skillDefInfo.activationStateMachineName = "Weapon"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = BaseCardSkill.cooldown; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val = Skills.CreateSkillDef(skillDefInfo); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val, "JavangleHouse", (SkillSlot)3, 0); } private void CharacterBody_onBodyInventoryChangedGlobal(CharacterBody body) { if (Object.op_Implicit((Object)(object)body) && body.baseNameToken == "JAVANGLE_HOUSE_BODY_NAME") { HousePassiveManager component = ((Component)body).GetComponent<HousePassiveManager>(); if (Object.op_Implicit((Object)(object)component)) { component.HandleScepterCard(); } } } } } namespace HouseMod.SkillStates { public class HouseMain : GenericCharacterMain { private Animator animator; private HouseController houseController; protected EntityStateMachine weaponStateMachine; public LocalUser localUser; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); houseController = ((EntityState)this).GetComponent<HouseController>(); localUser = LocalUserManager.readOnlyLocalUsersList[0]; EntityStateMachine[] components = ((EntityState)this).gameObject.GetComponents<EntityStateMachine>(); foreach (EntityStateMachine val in components) { if (Object.op_Implicit((Object)(object)val) && val.customName == "Weapon") { weaponStateMachine = val; } } } public override void Update() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority && !localUser.isUIFocused) { KeyboardShortcut value = Config.CardSlot1.Value; if (Input.GetKeyDown(((KeyboardShortcut)(ref value)).MainKey)) { ((EntityState)this).skillLocator.secondary.ExecuteIfReady(); return; } value = Config.CardSlot2.Value; if (Input.GetKeyDown(((KeyboardShortcut)(ref value)).MainKey)) { ((EntityState)this).skillLocator.utility.ExecuteIfReady(); return; } value = Config.CardSlot3.Value; if (Input.GetKeyDown(((KeyboardShortcut)(ref value)).MainKey)) { ((EntityState)this).skillLocator.special.ExecuteIfReady(); return; } } ((GenericCharacterMain)this).Update(); } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)animator)) { float num = 1f; if (animator.GetBool("isGrounded")) { num = 0f; } animator.SetFloat("inAir", num); animator.SetBool("inCombat", !((EntityState)this).characterBody.outOfCombat || !((EntityState)this).characterBody.outOfDanger); } } } } namespace HouseMod.SkillStates.House { public class BulletArtsEmpty : BaseSkillState { public override void OnEnter() { ((BaseState)this).OnEnter(); if (!((EntityState)this).isAuthority) { return; } HousePassiveManager component = ((EntityState)this).GetComponent<HousePassiveManager>(); if (!Object.op_Implicit((Object)(object)component)) { Debug.LogError((object)"[HouseError] UseCard could not find passiveManager"); ((EntityState)this).outer.SetNextStateToMain(); return; } BaseShotSkill shotFromCylinder = component.GetShotFromCylinder(); if (shotFromCylinder != null) { ((EntityState)this).outer.SetNextState((EntityState)(object)shotFromCylinder); } else { ((EntityState)this).outer.SetNextStateToMain(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class BulletArtsQuickdraw : BaseSkillState { public static float potency = 0.45f; public static int chanceToFire = 4; public static float speedModifier = 0.4f; public override void OnEnter() { ((BaseState)this).OnEnter(); if (!((EntityState)this).isAuthority) { return; } HousePassiveManager component = ((EntityState)this).GetComponent<HousePassiveManager>(); if (!Object.op_Implicit((Object)(object)component)) { Debug.LogError((object)"[HouseError] UseCard could not find passiveManager"); ((EntityState)this).outer.SetNextStateToMain(); return; } BaseShotSkill baseShotSkill = null; baseShotSkill = ((component.roulletePriorityShot != 0) ? component.GetShotFromCylinder() : ((component.roulleteOrderPosition <= 5 && component.random.Next(0, chanceToFire) != 0) ? ((BaseShotSkill)Activator.CreateInstance(((object)HouseShotDefs.shots[1].skillstate).GetType())) : component.GetShotFromCylinder())); baseShotSkill.potency = potency; baseShotSkill.baseDuration *= speedModifier; baseShotSkill.baseFireTime *= speedModifier; if (baseShotSkill != null) { ((EntityState)this).outer.SetNextState((EntityState)(object)baseShotSkill); } else { ((EntityState)this).outer.SetNextStateToMain(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class HouseDeathState : GenericCharacterDeath { private Vector3 previousPosition; private float upSpeedVelocity; private float upSpeed; private Animator modelAnimator; public override bool shouldAutoDestroy => false; public override void OnEnter() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).OnEnter(); Vector3 val = Vector3.up * 3f; HousePassiveManager component = ((EntityState)this).GetComponent<HousePassiveManager>(); if (Object.op_Implicit((Object)(object)component)) { if (component.RussianRouletteDeath) { ((EntityState)this).PlayAnimation("FullBody, Override", "House2RRDeath"); return; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { val += ((EntityState)this).characterMotor.velocity; ((Behaviour)((EntityState)this).characterMotor).enabled = false; } if (Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { RagdollController component2 = ((Component)((GenericCharacterDeath)this).cachedModelTransform).GetComponent<RagdollController>(); if (Object.op_Implicit((Object)(object)component2)) { component2.BeginRagdoll(val); } } return; } Debug.LogError((object)"[HouseError] I have a game injury, my game is injured, ow"); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { val += ((EntityState)this).characterMotor.velocity; ((Behaviour)((EntityState)this).characterMotor).enabled = false; } if (Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { RagdollController component3 = ((Component)((GenericCharacterDeath)this).cachedModelTransform).GetComponent<RagdollController>(); if (Object.op_Implicit((Object)(object)component3)) { component3.BeginRagdoll(val); } } } public override void PlayDeathAnimation(float crossfadeDuration = 0.1f) { } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge > 4f) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)9; } } internal class StageDetonate : MonoBehaviour { public static StageDetonate instance; public bool isDetonated = false; private bool fired = false; private static float BaseTimeUntilDetonation = 210f; private static float BaseEscalationInterval = 30f; private float timeUntilDetonation; private float escalationInterval; private Text timer; private void Awake() { if (Object.op_Implicit((Object)(object)instance)) { Debug.LogError((object)"[HouseError] There can only be one StageDetonate!!!!!!!"); Object.Destroy((Object)(object)((Component)this).gameObject); } instance = this; timeUntilDetonation = BaseTimeUntilDetonation; escalationInterval = BaseEscalationInterval; Escalate(); timer = HouseGlobalHUDManager.StageDetonationTimer; HouseGlobalHUDManager.animator.SetBool("StageDetonate", true); } private void OnDestroy() { HouseGlobalHUDManager.animator.SetBool("StageDetonate", false); } private void FixedUpdate() { timeUntilDetonation -= Time.fixedDeltaTime; string text = TimeSpan.FromSeconds(Mathf.Max(timeUntilDetonation, 0f)).ToString("mm\\:ss\\:ff"); timer.text = text; if (timeUntilDetonation <= 0f && !fired) { fired = true; HouseGlobalHUDManager.animator.Play("SDDetonate", 1); } if (NetworkServer.active) { escalationInterval -= Time.fixedDeltaTime; if (isDetonated) { RIPStage(); } if (escalationInterval <= 0f) { escalationInterval = BaseEscalationInterval; Escalate(); } } } private void RIPStage() { if (!NetworkServer.active) { return; } for (int i = -10; i < 20; i++) { ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers((TeamIndex)(sbyte)i); for (int num = teamMembers.Count - 1; num >= 0; num--) { TeamComponent val = teamMembers[num]; CharacterBody component = ((Component)val).gameObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.master)) { component.master.TrueKill(); } } } } private void Escalate() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { GameObject val = MasterCatalog.FindMasterPrefab("BrotherHauntMaster"); GameObject val2 = Object.Instantiate<GameObject>(val, ((Component)this).transform.position, Quaternion.identity); CharacterMaster component = val2.GetComponent<CharacterMaster>(); NetworkServer.Spawn(val2); component.SpawnBody(((Component)this).transform.position, Quaternion.identity); component.inventory.GiveItemPermanent(Items.InvadingDoppelganger.itemIndex, 1); component.inventory.GiveItemPermanent(Items.Ghost.itemIndex, 1); } } } public class StageDetonateNetworkComponent : INetMessage, ISerializableObject { public Vector3 pos; public Quaternion rot; public void OnReceived() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)StageDetonate.instance)) { GameObject val = Object.Instantiate<GameObject>(Assets.StageDetonationVFX, pos, rot); NetworkServer.Spawn(val); } } public void Serialize(NetworkWriter writer) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) writer.Write(pos); writer.Write(rot); } public void Deserialize(NetworkReader reader) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) pos = reader.ReadVector3(); rot = reader.ReadQuaternion(); } } internal class WildRoom : MonoBehaviour { private enum WReffects { MadnessUp, MadnessDown, RandomBuffs, RandomHeal, RandomDamage, RollAgain, Slap, Teleport, Artifact, VehicleMadness, HealingCores, Mitchels, HouseParty, TabulaRasa, Speed, ItemFrenzy, ItemFrenzyLunar, BossSurprise, Length, Ambry, SpaceProgram, HundredFreeItems, Polyp, PermanentArtifact, AprilLength } public static WildRoom instance; public static float effectCooldown = 10f; public static int effectVariance = 10; public static float MadnessCDR = 0.5f; private bool isInAmbry = false; private int madnessLevel = 1; private float timeToNextEffect = 5f; private Random random; public bool immutable = false; private bool hasInitialised = false; public float initDelay = 0f; private float effectTimer = 0f; private bool effictFired = true; private int rolledEffect = 999; private int numberOfEffectsRolled = 0; private ItemIndex rolledItem; private ArtifactDef artifactDef; private bool wasEnabled = false; private string[] bannedArtifacts = new string[1] { "" }; private DamageInfo spaceProgramDamageInfo; private void Singleton() { if ((Object)(object)instance != (Object)null) { Debug.LogWarning((object)"[HouseError] Attempted to create a duplicate of WildRoom, there can only be one."); Object.Destroy((Object)(object)this); } else { instance = this; } } private void Awake() { Singleton(); } private void Init() { for (int num = HouseGlobalHUDManager.WildWheel.Length - 1; num >= 0; num--) { HouseGlobalHUDManager.instance.WheelTextRandom(num + 1); } Util.PlaySound("House_WildRoomStart", ((Component)this).gameObject); HouseGlobalHUDManager.WildWheel[2].text = "Wildroom"; random = new Random(); HouseGlobalHUDManager.animator.SetBool("Wildroom", true); HouseGlobalHUDManager.WildMadnessLevel.text = madnessLevel.ToString(); MadnessUp(); SceneDef sceneDefFromSceneName = SceneCatalog.GetSceneDefFromSceneName("artifactworld"); if ((Object)(object)Stage.instance.sceneDef == (Object)(object)sceneDefFromSceneName) { isInAmbry = true; } } private void OnDestroy() { Debug.Log((object)"[HouseMessage] Wildroom OnDestroy"); if (Object.op_Implicit((Object)(object)HouseGlobalHUDManager.animator)) { HouseGlobalHUDManager.animator.SetBool("Wildroom", false); } if (Object.op_Implicit((Object)(object)artifactDef)) { RunArtifactManager.instance.SetArtifactEnabledServer(artifactDef, wasEnabled); } Util.PlaySound("House_WildRoomEnd", ((Component)this).gameObject); } private void FixedUpdate() { if (!hasInitialised) { initDelay -= Time.fixedDeltaTime; if (initDelay <= 0f) { hasInitialised = true; Init(); } return; } if (NetworkServer.active) { timeToNextEffect -= Time.fixedDeltaTime; if (timeToNextEffect < 0f) { float num = effectCooldown + (float)random.Next(effectVariance); timeToNextEffect = num - num * (1f - 1f / (MadnessCDR * (float)(madnessLevel - 1) + 1f)) + 2.1f; int num2 = random.Next(Auspicious.isAprilFools ? 24 : 18); if (immutable && num2 == 1 && madnessLevel < 2) { num2 = 0; } NetMessageExtensions.Send((INetMessage)(object)new WildRoomNetworkComponent { WildRoomRoll = num2 }, (NetworkDestination)1); } } if (!effictFired) { effectTimer -= Time.fixedDeltaTime; if (effectTimer < 0f) { effictFired = true; PlayEffect(rolledEffect); } } } public void SetEffect(int roll) { if (numberOfEffectsRolled < 5 && roll == 1) { roll = 0; } switch (roll) { default: Debug.LogError((object)"[HouseError] Wildroom networked roll was outside the list"); break; case 0: HouseGlobalHUDManager.SpinTheWheel("Increase Madness"); break; case 1: HouseGlobalHUDManager.SpinTheWheel("Decrease Madness"); break; case 2: HouseGlobalHUDManager.SpinTheWheel("Random Status"); break; case 3: HouseGlobalHUDManager.SpinTheWheel("Heal All Random"); break; case 4: HouseGlobalHUDManager.SpinTheWheel("Damage All Random"); break; case 5: HouseGlobalHUDManager.SpinTheWheel("ReRoll"); break; case 6: HouseGlobalHUDManager.SpinTheWheel("Slap"); break; case 7: HouseGlobalHUDManager.SpinTheWheel("Warp"); break; case 8: HouseGlobalHUDManager.SpinTheWheel("Temporary Artifact"); break; case 9: HouseGlobalHUDManager.SpinTheWheel("Beep Beep"); break; case 10: HouseGlobalHUDManager.SpinTheWheel("Core Blimey!"); break; case 11: HouseGlobalHUDManager.SpinTheWheel("King's Haunt"); break; case 12: HouseGlobalHUDManager.SpinTheWheel("House Party!"); break; case 13: HouseGlobalHUDManager.SpinTheWheel("Tabula Rasa"); break; case 14: HouseGlobalHUDManager.SpinTheWheel("Gotta Go Fast"); break; case 15: HouseGlobalHUDManager.SpinTheWheel("Free Stuff"); break; case 16: HouseGlobalHUDManager.SpinTheWheel("Lunar Stuff"); break; case 17: HouseGlobalHUDManager.SpinTheWheel("Boss Surprise!"); break; case 18: HouseGlobalHUDManager.SpinTheWheel("Automatic Loss"); break; case 19: HouseGlobalHUDManager.SpinTheWheel(isInAmbry ? "Escape Ambry" : "Go To Ambry"); break; case 20: HouseGlobalHUDManager.SpinTheWheel("Space Program"); break; case 21: HouseGlobalHUDManager.SpinTheWheel("100 Free Items"); break; case 22: HouseGlobalHUDManager.SpinTheWheel("Voidtouched Polyp"); break; case 23: HouseGlobalHUDManager.SpinTheWheel("Permanent Artifact"); break; } rolledEffect = roll; numberOfEffectsRolled++; effectTimer = 2f; effictFired = false; } private void PlayEffect(int Effect) { switch (Effect) { default: Debug.LogError((object)"[HouseError] Wildroom networked roll was outside the list"); break; case 0: MadnessUp(); break; case 1: MadnessDown(); break; case 2: RandomBuffs(); break; case 3: RandomHeals(); break; case 4: RandomDamage(); break; case 5: ReRoll(); break; case 6: RandomSlap(); break; case 7: Teleportation(); break; case 8: RandomArtifact(); break; case 9: VehicleMadness(); break; case 10: HealingCores(); break; case 11: Mitchels(); break; case 12: HouseParty(); break; case 13: TabulaRasa(); break; case 14: SPEEED(); break; case 15: ItemFrenzy(); break; case 16: ItemFrenzyLunar(); break; case 17: BossSurprise(); break; case 18: AutomaticLoss(); break; case 19: GoToAmbry(); break; case 20: SpaceProgram(); break; case 21: HundredFreeItems(); break; case 22: VoidtouchedPolyp(); break; case 23: PermanentArtifact(); break; } } public void MadnessUp() { madnessLevel++; HouseGlobalHUDManager.WildMadnessLevel.text = madnessLevel.ToString(); } private void MadnessDown() { madnessLevel -= ((!Auspicious.isAprilFools) ? 1 : (-1)); HouseGlobalHUDManager.WildMadnessLevel.text = madnessLevel.ToString(); if (madnessLevel <= 0) { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void ReRoll() { if (NetworkServer.active) { timeToNextEffect = 0.75f; } } private void RandomBuffs() { if (NetworkServer.active) { DoEffectToAll(DoRandomBuff); } } private bool DoRandomBuff(CharacterBody body) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)body) && (!body.isPlayerControlled || CheckIfHouse(body.baseNameToken))) { try { BuffDef val = BuffCatalog.buffDefs[random.Next(BuffCatalog.buffDefs.Length)]; if (SevenOfSpades.filteredBuffs.Contains(val)) { val = Buffs.TeamWarCry; } body.AddTimedBuff(val, 10f); } catch { Debug.LogWarning((object)"[HouseError] RandomBuffs Failed to apply buff to target"); } try { Util.PlaySound("HouseCard_Wildcard", ((Component)body).gameObject); EffectManager.SpawnEffect(Assets.VFXcardWildCard, new EffectData { origin = body.footPosition, rootObject = ((Component)body).gameObject, scale = 1f }, true); } catch { Debug.LogWarning((object)"[HouseError] RandomBuffs Failed to spawn VFX"); } } return true; } private void TabulaRasa() { if (NetworkServer.active) { DoEffectToAll(DoTabula); } } private bool DoTabula(CharacterBody body) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)body) && (!body.isPlayerControlled || CheckIfHouse(body.baseNameToken))) { try { body.AddTimedBuff(Buffs.TabulaRasa, 10f); body.AddTimedBuff(Buffs.InventoryDisable, 10f); } catch { Debug.LogWarning((object)"[HouseError] TabulaRasa Failed to apply buff to target"); } try { Util.PlaySound("HouseCard_Wildcard", ((Component)body).gameObject); EffectManager.SpawnEffect(Assets.VFXcardWildCard, new EffectData { origin = body.footPosition, rootObject = ((Component)body).gameObject, scale = 1f }, true); } catch { Debug.LogWarning((object)"[HouseError] TabulaRasa Failed to spawn VFX"); } } return true; } private void SPEEED() { if (NetworkServer.active) { DoEffectToAll(doSPEEED); } } private bool doSPEEED(CharacterBody body) { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)body) && (!body.isPlayerControlled || CheckIfHouse(body.baseNameToken))) { try { for (int num = 300; num > 0; num--) { body.AddTimedBuff(Buffs.MSUp, 10f); } } catch { Debug.LogWarning((object)"[HouseError] SPEEED Failed to apply buff to target"); } try { Util.PlaySound("HouseCard_Wildcard", ((Component)body).gameObject); EffectManager.SpawnEffect(Assets.VFXcardWildCard, new EffectData { origin = body.footPosition, rootObject = ((Component)body).gameObject, scale = 1f }, true); } catch { Debug.LogWarning((object)"[HouseError] SPEEED Failed to spawn VFX"); } } return true; } private void RandomHeals() { //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } for (int i = -10; i < 20; i++) { ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers((TeamIndex)(sbyte)i); for (int num = teamMembers.Count - 1; num >= 0; num--) { try { TeamComponent val = teamMembers[num]; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Component)val).gameObject)) { try { CharacterBody component = ((Component)val).gameObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent)) { try { float num2 = ((float)random.Next(70) + 30f) / 100f; component.healthComponent.HealFraction(num2, default(ProcChainMask)); } catch { Debug.LogWarning((object)"[HouseError] RandomHeals Failed to Heal target"); } try { Util.PlaySound("HouseCard_Heart", ((Component)component).gameObject); EffectManager.SpawnEffect(Assets.VFXcardHearts, new EffectData { origin = component.footPosition, rootObject = ((Component)component).gameObject, scale = 1f }, true); } catch { Debug.LogWarning((object)"[HouseError] RandomHeals Failed to spawn VFX"); } } } catch { Debug.LogWarning((object)"[HouseError] RandomHeals Failed to find body"); } } } catch { Debug.LogWarning((object)"[HouseError] RandomHeals Failed to find target"); } } } } private void RandomDamage() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } DamageInfo val = new DamageInfo { attacker = ((Component)this).gameObject, damage = 0f, force = Vector3.zero, crit = false, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)67), inflictor = null, position = Vector3.zero, procChainMask = default(ProcChainMask), procCoefficient = 0f }; for (int i = -10; i < 20; i++) { ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers((TeamIndex)(sbyte)i); for (int num = teamMembers.Count - 1; num >= 0; num--) { try { TeamComponent val2 = teamMembers[num]; if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)((Component)val2).gameObject)) { try { CharacterBody component = ((Component)val2).gameObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent) && (!component.isPlayerControlled || CheckIfHouse(component.baseNameToken))) { try { float num2 = ((float)random.Next(35) + 5f) / 100f; val.damage = component.healthComponent.fullCombinedHealth * num2; val.position = component.corePosition; component.healthComponent.TakeDamage(val); } catch { Debug.LogWarning((object)"[HouseError] RandomDamage Failed to Damage target"); } try { Util.PlaySound("HouseCard_Bust", ((Component)component).gameObject); EffectManager.SpawnEffect(Assets.VFXcardBust, new EffectData { origin = component.footPosition, rootObject = ((Component)component).gameObject, scale = 1f }, true); } catch { Debug.LogWarning((object)"[HouseError] RandomDamage Failed to spawn VFX"); } } } catch { Debug.LogWarning((object)"[HouseError] RandomDamage Failed to find body"); } } } catch { Debug.LogWarning((object)"[HouseError] RandomDamage Failed to find target"); } } } } private void RandomSlap() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: 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_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } DamageInfo val = new DamageInfo { attacker = ((Component)this).gameObject, damage = 0f, force = Vector3.zero, crit = false, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)66), inflictor = null, position = Vector3.zero, procChainMask = default(ProcChainMask), procCoefficient = 0f }; for (int i = -10; i < 20; i++) { ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers((TeamIndex)(sbyte)i); for (int num = teamMembers.Count - 1; num >= 0; num--) { try { TeamComponent val2 = teamMembers[num]; if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)((Component)val2).gameObject)) { try { CharacterBody component = ((Component)val2).gameObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent) && (!component.isPlayerControlled || CheckIfHouse(component.baseNameToken))) { try { float num2 = random.Next(5000); if (Object.op_Implicit((Object)(object)component.characterMotor) && component.characterMotor.isGrounded) { num2 *= 2f; } Vector3 val3 = new Vector3((float)random.Next(200) - 100f, (float)random.Next(133) - 33f, (float)random.Next(200) - 100f); val.force = ((Vector3)(ref val3)).normalized * num2; val.position = component.corePosition; component.healthComponent.TakeDamage(val); } catch { Debug.LogWarning((object)"[HouseError] RandomSlap Failed to Slap target"); } try { Util.PlaySound("HouseCard_Wildcard", ((Component)component).gameObject); EffectManager.SpawnEffect(Assets.VFXcardWildCard, new EffectData { origin = component.footPosition, rootObject = ((Component)component).gameObject, scale = 1f }, true); } catch { Debug.LogWarning((object)"[HouseError] RandomSlap Failed to spawn VFX"); } } } catch { Debug.LogWarning((object)"[HouseError] RandomSlap Failed to find body"); } } } catch { Debug.LogWarning((object)"[HouseError] RandomSlap Failed to find target"); } } } } private void Teleportation() { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) Node[] nodes = SceneInfo.instance.groundNodes.nodes; for (int i = -10; i < 20; i++) { ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers((TeamIndex)(sbyte)i); for (int num = teamMembers.Count - 1; num >= 0; num--) { try { TeamComponent val = teamMembers[num]; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Component)val).gameObject)) { try { CharacterBody component = ((Component)val).gameObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && (!component.isPlayerControlled || CheckIfHouse(component.baseNameToken))) { try { Vector3 position = nodes[random.Next(nodes.Length)].position; TeleportHelper.TeleportBody(component, position, true); GameObject teleportEffectPrefab = Run.instance.GetTeleportEffectPrefab(((Component)component).gameObject); if (Object.op_Implicit((Object)(object)teleportEffectPrefab)) { EffectManager.SimpleEffect(teleportEffectPrefab, position, Quaternion.identity, true); } } catch { Debug.LogWarning((object)"[HouseError] Teleportation Failed to Warp target"); } } } catch { Debug.LogWarning((object)"[HouseError] Teleportation Failed to find body"); } } } catch { Debug.LogWarning((object)"[HouseError] Teleportation Failed to find target"); } } } } private void VehicleMadness() { //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown for (int i = -10; i < 20; i++) { ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers((TeamIndex)(sbyte)i); for (int num = teamMembers.Count - 1; num >= 0; num--) { try { TeamComponent val = teamMembers[num]; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Component)val).gameObject)) { try { CharacterBody component = ((Component)val).gameObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent) && (!component.isPlayerControlled || CheckIfHouse(component.baseNameToken)) && ((double)Math.Abs(component.healthComponent.combinedHealth - component.healthComponent.fullCombinedHealth) < 1E-09 || component.isPlayerControlled)) { try { string transformBodyName = ((random.Next(2) == 0) ? "PotMobileBody" : "HaulerBody"); DoTransform(component, transformBodyName, random.Next(5, 15)); } catch { Debug.LogWarning((object)"[HouseError] VehicleMadness Failed to transform target"); } try { Util.PlaySound("HouseCard_Wildcard", ((Component)component).gameObject); EffectManager.SpawnEffect(Assets.VFXcardWildCard, new EffectData { origin = component.footPosition, scale = 1f }, true); } catch { Debug.LogWarning((object)"[HouseError] VehicleMadness Failed to spawn VFX"); } } } catch { Debug.LogWarning((object)"[HouseError] VehicleMadness Failed to find body"); } } } catch { Debug.LogWarning((object)"[HouseError] VehicleMadness Failed to find target"); } } } } private void HouseParty() { //IL_0121: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown for (int i = -10; i < 20; i++) { ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers((TeamIndex)(sbyte)i); for (int num = teamMembers.Count - 1; num >= 0; num--) { try { TeamComponent val = teamMembers[num]; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Component)val).gameObject)) { try { CharacterBody component = ((Component)val).gameObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent) && !component.isPlayerControlled && !component.IsDrone && ((!component.isBoss && (double)Math.Abs(component.healthComponent.combinedHealth - component.healthComponent.fullCombinedHealth) < 1E-09) || component.isPlayerControlled)) { try { DoTransform(component, "JavangleHouse", random.Next(15, 30)); } catch { Debug.LogWarning((object)"[HouseError] HouseParty Failed to transform target"); } try { Util.PlaySound("HouseCard_Wildcard", ((Component)component).gameObject); EffectManager.SpawnEffect(Assets.VFXcardWildCard, new EffectData { origin = component.footPosition, scale = 1f }, true); } catch { Debug.LogWarning((object)"[HouseError] HouseParty Failed to spawn VFX"); } } } catch { Debug.LogWarning((object)"[HouseError] HouseParty Failed to find body"); } } } catch { Debug.LogWarning((object)"[HouseError] HouseParty Failed to find target"); } } } } private void ItemFrenzyLunar() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { rolledItem = ItemCatalog.lunarItemList[random.Next(ItemCatalog.lunarItemList.Count)]; DoEffectToAll(DoItemFrenzy); } } private void ItemFrenzy() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { switch (random.Next(3)) { default: rolledItem = ItemCatalog.tier1ItemList[random.Next(ItemCatalog.tier1ItemList.Count)]; break; case 1: rolledItem = ItemCatalog.tier2ItemList[random.Next(ItemCatalog.tier2ItemList.Count)]; break; case 2: rolledItem = ItemCatalog.tier3ItemList[random.Next(ItemCatalog.tier3ItemList.Count)]; break; } DoEffectToAll(DoItemFrenzy); } } private bool DoItemFrenzy(CharacterBody body) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory) && (!body.isPlayerControlled || CheckIfHouse(body.baseNameToken))) { try { body.inventory.GiveItemTemp(rolledItem, 1f); } catch { Debug.LogWarning((object)"[HouseError] RandomBuffs Failed to apply buff to target"); } try { Util.PlaySound("HouseCard_Wildcard", ((Component)body).gameObject); EffectManager.SpawnEffect(Assets.VFXcardWildCard, new EffectData { origin = body.footPosition, rootObject = ((Component)body).gameObject, scale = 1f }, true); } catch { Debug.LogWarning((object)"[HouseError] RandomBuffs Failed to spawn VFX"); } } return true; } private void HealingCores() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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_0127: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } Node[] nodes = SceneInfo.instance.groundNodes.nodes; for (int num = random.Next(7, 23); num > 0; num--) { Vector3 position = nodes[random.Next(nodes.Length)].position; position += new Vector3(0f, 4f, 0f); GameObject val = MasterCatalog.FindMasterPrefab("AffixEarthHealerMaster"); GameObject val2 = Object.Instantiate<GameObject>(val, position, Quaternion.identity); CharacterMaster component = val2.GetComponent<CharacterMaster>(); component.teamIndex = (TeamIndex)0; switch (random.Next(3)) { default: Debug.LogWarning((object)"Wildroom healingcores OnDeath index out of range"); break; case 0: component.inventory.SetEquipmentIndex(Equipment.AffixWhite.equipmentIndex, false); break; case 1: component.inventory.SetEquipmentIndex(Equipment.AffixPoison.equipmentIndex, false); break; case 2: component.inventory.SetEquipmentIndex(Elites.Earth.eliteEquipmentDef.equipmentIndex, false); break; } NetworkServer.Spawn(val2); component.SpawnBody(position, Quaternion.identity); } } private void Mitchels() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { Node[] nodes = SceneInfo.instance.groundNodes.nodes; for (int num = random.Next(3, 8); num > 0; num--) { Vector3 position = nodes[random.Next(nodes.Length)].position; position += new Vector3(0f, 7f, 0f); GameObject val = MasterCatalog.FindMasterPrefab("BrotherGlassMaster"); GameObject val2 = Object.Instantiate<GameObject>(val, position, Quaternion.identity); CharacterMaster component = val2.GetComponent<CharacterMaster>(); component.teamIndex = (TeamIndex)((random.Next(2) != 0) ? 3 : 0); component.inventory.GiveItemPermanent(Items.HealthDecay, random.Next(10, 21)); NetworkServer.Spawn(val2); component.SpawnBody(position, Quaternion.identity); } } } private void BossSurprise() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { Node[] nodes = SceneInfo.instance.groundNodes.nodes; Vector3 position = nodes[random.Next(nodes.Length)].position; position += new Vector3(0f, 7f, 0f); GameObject val = MasterCatalog.FindMasterPrefab(random.Next(5) switch { 1 => "MiniVoidRaidCrabMasterPhase1", 2 => "FalseSonBossMaster", 3 => "SolusWingMaster", 4 => "VultureHunterMaster", _ => "BrotherMaster", }); GameObject val2 = Object.Instantiate<GameObject>(val, position, Quaternion.identity); CharacterMaster component = val2.GetComponent<CharacterMaster>(); component.teamIndex = (TeamIndex)((random.Next(2) == 0) ? 3 : 3); component.inventory.GiveItemPermanent(Items.HealthDecay, random.Next(10, 30)); NetworkServer.Spawn(val2); component.SpawnBody(position, Quaternion.identity); } } private void RandomArtifact() { if (NetworkServer.active) { if (Object.op_Implicit((Object)(object)artifactDef)) { RunArtifactManager.instance.SetArtifactEnabledServer(artifactDef, wasEnabled); } artifactDef = ArtifactCatalog.artifactDefs[random.Next(ArtifactCatalog.artifactDefs.Length)]; if ((Object)(object)artifactDef == (Object)(object)Artifacts.TeamDeath || (Object)(object)artifactDef == (Object)(object)Artifacts.ShadowClone || (Object)(object)artifactDef == (Object)(object)Artifacts.Glass) { RandomArtifact(); return; } wasEnabled = RunArtifactManager.instance.IsArtifactEnabled(artifactDef); RunArtifactManager.instance.SetArtifactEnabledServer(artifactDef, true); } } private void AutomaticLoss() { if (NetworkServer.active) { Run.instance.BeginGameOver(GameEndings.StandardLoss); } } private void GoToAmbry() { if (!NetworkServer.active) { return; } if (isInAmbry) { EscapeAmbry(); return; } SceneDef sceneDefFromSceneName = SceneCatalog.GetSceneDefFromSceneName("artifactworld"); RunArtifactManager.instance.SetArtifactEnabledServer(ArtifactOfWildroom.artifactOfWildroom, true); for (int num = random.Next(1, 25); num > 0; num--) { Chat.AddMessage(":)"); } Stage.instance.BeginAdvanceStage(sceneDefFromSceneName); } private void EscapeAmbry() { SceneDef[] array = Wildcard.ValidScenes(); SceneDef val = array[random.Next(array.Length)]; if (Object.op_Implicit((Object)(object)val.requiredExpansion) && !Run.instance.IsExpansionEnabled(val.requiredExpansion)) { EscapeAmbry(); return; } if ((Object)(object)val == (Object)(object)SceneCatalog.GetSceneDefFromSceneName("artifactworld")) { if (random.Next(25) == 0) { Chat.AddMessage(":)"); } else { ArtifactTrialMissionController.trialArtifact = ArtifactCatalog.artifactDefs[random.Next(ArtifactCatalog.artifactDefs.Length - 1)]; } } Stage.instance.BeginAdvanceStage(val); } private void SpaceProgram() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown if (NetworkServer.active) { spaceProgramDamageInfo = new DamageInfo { attacker = ((Component)this).gameObject, damage = 0f, force = Vector3.up * 99999f, crit = false, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)66), inflictor = null, position = Vector3.zero, procChainMask = default(ProcChainMask), procCoefficient = 0f }; DoEffectToAll(DoSpaceProgram); } } private bool DoSpaceProgram(CharacterBody body) { //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.healthComponent) && (!body.isPlayerControlled || CheckIfHouse(body.baseNameToken))) { try { float num = random.Next(5000); if (Object.op_Implicit((Object)(object)body.characterMotor) && body.characterMotor.isGrounded) { num *= 2f; } spaceProgramDamageInfo.position = body.corePosition; body.healthComponent.TakeDamage(spaceProgramDamageInfo); } catch { Debug.LogWarning((object)"[HouseError] RandomSlap Failed to Slap target"); } try { Util.PlaySound("HouseCard_Wildcard", ((Component)body).gameObject); EffectManager.SpawnEffect(Assets.VFXcardWildCard, new EffectData { origin = body.footPosition, rootObject = ((Component)body).gameObject, scale = 1f }, true); } catch { Debug.LogWarning((object)"[HouseError] RandomSlap Failed to spawn VFX"); } } return true; } private void HundredFreeItems() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { rolledItem = ItemCatalog.lunarItemList[random.Next(ItemCatalog.lunarItemList.Count)]; DoEffectToAll(DoHundredFreeItems); } } private bool DoHundredFreeItems(CharacterBody body) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory) && (!body.isPlayerControlled || CheckIfHouse(body.baseNameToken))) { try { body.inventory.GiveItemTemp(rolledItem, 100f); } catch { Debug.LogWarning((object)"[HouseError] DoHundredFreeItems Failed to apply buff to target"); } try { Util.PlaySound("HouseCard_Wildcard", ((Component)body).gameObject); EffectManager.SpawnEffect(Assets.VFXcardWildCard, new EffectData { origin = body.footPosition, rootObject = ((Component)body).gameObject, scale = 1f }, true); } catch { Debug.LogWarning((object)"[HouseError] DoHundredFreeItems Failed to spawn VFX"); } } return true; } private void VoidtouchedPolyp() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { Node[] nodes = SceneInfo.instance.groundNodes.nodes; Vector3 position = nodes[random.Next(nodes.Length)].position; position += new Vector3(0f, 7f, 0f); string text = "SquidTurretMaster"; GameObject val = MasterCatalog.FindMasterPrefab(text); GameObject val2 = Object.Instantiate<GameObject>(val, position, Quaternion.identity); CharacterMaster component = val2.GetComponent<CharacterMaster>(); component.teamIndex = (TeamIndex)4; component.inventory.GiveItemPermanent(Items.BoostHp, 10000); component.inventory.GiveItemPermanent(Items.Syringe, 75); component.inventory.SetEquipmentIndex(Equipment.EliteVoidEquipment.equipmentIndex, false); NetworkServer.Spawn(val2); component.SpawnBody(position, Quaternion.identity); } } private void PermanentArtifact() { if (NetworkServer.active) { ArtifactDef[] artifactDefs = ArtifactCatalog.artifactDefs; foreach (ArtifactDef val in artifactDefs) { RunArtifactManager.instance.SetArtifactEnabledServer(val, true); } } } private bool CheckIfHouse(string token) { if (token == "JAVANGLE_HOUSE_BODY_NAME") { return true; } if (!Config.TowerInMultiplayer.Value) { return true; } if (ArtifactOfWildroom.isEnabled) { return true; } return false; } private void DoTransform(CharacterBody body, string transformBodyName, float duration) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) if (!body.IsDrone) { Debug.Log((object)("[HouseMessage] transforming to: " + transformBodyName)); GameObject bodyPrefab = body.master.bodyPrefab; Transform transform = body.transform; transform.position += Vector3.up * 5f; body.master.TransformBody(transformBodyName); body.master.bodyPrefab = bodyPrefab; PolymorphBuffComponent val = ((Component)body.master).gameObject.AddComponent<PolymorphBuffComponent>(); val.buffDuration = duration; val.master = body.master; } } private void DoEffectToAll(Func<CharacterBody, bool> function) { for (int i = -10; i < 20; i++) { ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers((TeamIndex)(sbyte)i); for (int num = teamMembers.Count - 1; num >= 0; num--) { try { TeamComponent val = teamMembers[num]; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Component)val).gameObject)) { try { CharacterBody component = ((Component)val).gameObject.GetComponent<CharacterBody>(); function(component); } catch { Debug.LogWarning((object)"[HouseError] DoEffectToAll Failed to find body"); } } } catch { Debug.LogWarning((object)"[HouseError] DoEffectToAll Failed to find target"); } } } } } public class WildRoomNetworkComponent : INetMessage, ISerializableObject { public int WildRoomRoll = 999; public void OnReceived() { if (WildRoomRoll == 999) { Debug.LogWarning((object)"[HouseError] Wildroom network failure"); } else { WildRoom.instance.SetEffect(WildRoomRoll); } } public void Serialize(NetworkWriter writer) { writer.Write(WildRoomRoll); } public void Deserialize(NetworkReader reader) { WildRoomRoll = reader.ReadInt32(); } } internal class HouseGlobalHUDManager : MonoBehaviour { public static HouseGlobalHUDManager instance; private static Random random; public static Animator animator; public static Text StageDetonationTimer; public static Text[] WildWheel; public static Text WildMadnessLevel; private static string result = "Ooops"; private static string[] DummyResponses = new string[60] { "Die IRL", "C.U.M 3", "Automatic Loss", "Manual Win", "Go to Jail", "Shadow Realm", HousePlugin.GOTCEInstalled ? "Uninstall GOTCE" : "Install GOTCE", "Get Green", "Get !Yellow", "Gravity Displeases Me!", "Go To Ambry", "Go To AI Test", "Big Wins", "The Game", "Gamble, Idiots", "End the Run", "Instant Death", "These aren't real", "Spin Again", "The Wheel Spins!", "Spin, wheel! Spin!", "Big Heads", "Teeny, tiny Heads", "Plague of Dancing", "Jarate", "Ubercharge", "Two Crows", "Garbage Goober", "Jerry (Spin Again)", "Kyle 2.0", "Bag of Meat", "Trivia", "Nothing", "Learn Canon Heights", "Spontanious Combustion", "Pineapple Pizza", "Horde of Many: Gip", "All become House", "Slab War", "Blind Pest Boss", "Voidtouched Polyp", "House Crisis", "Gain 100 free items", "Balls will stay", "Truth or Dare", "ALL IN!", "Oops, all Random!", "Crowdfunder Buff", "Artificer Nerf", "Read me!", "Desync Cards", "Gold Rush", "Tiny Xi Construct", "Tonic Affliction", "Start Teleporter", "Loooooong House", "Shambles", "Countershock", "K-ROOM", "Green Missile" }; private void Singleton() { if ((Object)(object)instance != (Object)null) { Debug.LogWarning((object)"[HouseError] Attempted to create a duplicate of HouseGlobalHUDManager, there can only be one."); Object.Destroy((Object)(object)this); } else { instance = this; } } private void Awake() { Singleton(); random = new Random(); for (int num = WildWheel.Length - 1; num >= 0; num--) { WheelTextRandom(num + 1); } } public void DetonateStage() { StageDetonate.instance.isDetonated = true; } public static void SpinTheWheel(string ResultText) { result = ResultText; animator.Play("WildWheel", 3); Util.PlaySound("House_WildRoomRoll", ((Component)animator).gameObject); } public void WheelTextRandom(int wheelSlot) { if (wheelSlot == 0) { Debug.LogWarning((object)"[HouseError] WildWheel tried to index slot 0"); return; } wheelSlot--; if (Seasons.isAprilFools && random.Next(3) == 0) { WildWheel[wheelSlot].text = "APRIL FOOLS!"; } else { WildWheel[wheelSlot].text = DummyResponses[random.Next(DummyResponses.Length)]; } } public void WheelTextResult() { WildWheel[2].text = result; } } internal class HouseHUDManager : MonoBehaviour { public static HouseHUDManager instance; private static Sprite crossDot = Assets.mainAssetBundle.LoadAsset<Sprite>("DiamondAmmoIMG"); public static HousePassiveManager passiveManager; public static RectTransform HouseCrosshair; public static Animator CrosshairAnimator; public static Image[] ShotAmmo; public static Image PrioityShot; public static Image[] Cylinders; public static Transform defualtUI; public static RectTransform HouseHotbar; public static Animator HotbarAnimator; public static Image[] CardArts; public static Image[] CardColour; public static TooltipComponent[] CardTooltips; public static Image[] HotbarIcons; public static Text[] HotbarCooldown; public static Text[] HotbarStocks; public static Text[] HotbarKeys; public static TooltipComponent[] HotbarTooltips; public static Text DrawPile; private int[] newHand = new int[3]; private void Singleton() { if ((Object)(object)instance != (Object)null) { Debug.LogWarning((object)"[HouseError] Attempted to create a duplicate of HouseHUDManager, there can only be one."); Object.Destroy((Object)(object)this); } else { instance = this; } } private void Awake() { Singleton(); } private void FixedUpdate() { UpdateCooldowns(); } public void Reload(int priority, int[] bullets) { CrosshairAnimator.Play("Reload", 0); UpdateAmmo(priority, bullets); } public void UpdateAmmo(int priority, int[] bullets) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) if (priority == 0) { PrioityShot.sprite = crossDot; ((Graphic)PrioityShot).color = Color.white; ((Component)PrioityShot).transform.localScale = Vector3.one; }