using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using EntityStates.Missions.BrotherEncounter;
using IL.RoR2;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates.Missions.BrotherEncounter;
using On.RoR2;
using On.RoR2.UI;
using R2API;
using RoR2;
using RoR2.ExpansionManagement;
using RoR2.Hologram;
using RoR2.UI;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Judgement")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+18078d8f6f8b1939b73e8f82e30bd234b919cde2")]
[assembly: AssemblyProduct("Judgement")]
[assembly: AssemblyTitle("Judgement")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace Judgement
{
public class GameMode
{
public class JudgementRunButton : MonoBehaviour
{
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static UnityAction <>9__1_0;
internal void <Start>b__1_0()
{
Util.PlaySound("Play_UI_menuClick", ((Component)RoR2Application.instance).gameObject);
Console.instance.SubmitCmd((NetworkUser)null, "transition_command \"gamemode xJudgementRun; host 0; \"", false);
}
}
public HGButton hgButton;
public void Start()
{
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
//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_0046: Expected O, but got Unknown
hgButton = ((Component)this).GetComponent<HGButton>();
((Button)hgButton).onClick = new ButtonClickedEvent();
ButtonClickedEvent onClick = ((Button)hgButton).onClick;
object obj = <>c.<>9__1_0;
if (obj == null)
{
UnityAction val = delegate
{
Util.PlaySound("Play_UI_menuClick", ((Component)RoR2Application.instance).gameObject);
Console.instance.SubmitCmd((NetworkUser)null, "transition_command \"gamemode xJudgementRun; host 0; \"", false);
};
<>c.<>9__1_0 = val;
obj = (object)val;
}
((UnityEvent)onClick).AddListener((UnityAction)obj);
}
}
public class JudgementRunButtonAdder : MonoBehaviour
{
public void Start()
{
GameObject obj = Object.Instantiate<GameObject>(((Component)((Component)this).transform.Find("GenericMenuButton (Eclipse)")).gameObject, ((Component)this).transform);
obj.AddComponent<JudgementRunButton>();
obj.GetComponent<LanguageTextMeshController>().token = "Judgement";
obj.GetComponent<HGButton>().hoverToken = "Defeat all that stand before you to reach the final throne.";
}
}
public class JudgementRun : InfiniteTowerRun
{
public int currentWave;
public int availableHeals = 3;
public int purchaseCounter;
public bool shouldGoBazaar = true;
public bool isFirstStage = true;
public Vector3 safeWardPos = Vector3.zero;
public Xoroshiro128Plus bazaarRng;
public Dictionary<NetworkInstanceId, float> persistentHP = new Dictionary<NetworkInstanceId, float>();
public Dictionary<NetworkInstanceId, int> persistentCurse = new Dictionary<NetworkInstanceId, int>();
}
public static GameObject judgementRunPrefab;
public static GameObject extraGameModeMenu;
private GameObject simClone = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerRun.prefab").WaitForCompletion(), "SimCloneNux");
public GameMode()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Expected O, but got Unknown
//IL_0354: Unknown result type (might be due to invalid IL or missing references)
//IL_035e: Expected O, but got Unknown
//IL_0365: Unknown result type (might be due to invalid IL or missing references)
//IL_036f: Expected O, but got Unknown
//IL_017e: Unknown result type (might be due to invalid IL or missing references)
//IL_0183: Unknown result type (might be due to invalid IL or missing references)
//IL_0185: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_010b: Unknown result type (might be due to invalid IL or missing references)
//IL_019e: Unknown result type (might be due to invalid IL or missing references)
//IL_0123: Unknown result type (might be due to invalid IL or missing references)
//IL_013b: Unknown result type (might be due to invalid IL or missing references)
//IL_0155: Unknown result type (might be due to invalid IL or missing references)
judgementRunPrefab = PrefabAPI.InstantiateClone(new GameObject("xJudgementRun"), "xJudgementRun");
judgementRunPrefab.AddComponent<NetworkIdentity>();
PrefabAPI.RegisterNetworkPrefab(judgementRunPrefab);
InfiniteTowerRun component = simClone.GetComponent<InfiniteTowerRun>();
JudgementRun judgementRun = judgementRunPrefab.AddComponent<JudgementRun>();
((Run)judgementRun).nameToken = "Judgement";
((Run)judgementRun).userPickable = true;
((Run)judgementRun).startingSceneGroup = ((Run)component).startingSceneGroup;
((Run)judgementRun).gameOverPrefab = ((Run)component).gameOverPrefab;
((Run)judgementRun).lobbyBackgroundPrefab = ((Run)component).lobbyBackgroundPrefab;
((Run)judgementRun).uiPrefab = ((Run)component).uiPrefab;
((InfiniteTowerRun)judgementRun).defaultWavePrefab = component.defaultWavePrefab;
List<WeightedWave> list = new List<WeightedWave>();
List<WeightedWave> list2 = new List<WeightedWave>();
InfiniteTowerWaveCategory[] waveCategories = component.waveCategories;
foreach (InfiniteTowerWaveCategory val in waveCategories)
{
WeightedWave[] wavePrefabs;
if (((Object)val).name == "BossWaveCategory")
{
wavePrefabs = val.wavePrefabs;
foreach (WeightedWave val2 in wavePrefabs)
{
if (!((Object)val2.wavePrefab).name.Contains("Brother") && !((Object)val2.wavePrefab).name.Contains("Lunar") && !((Object)val2.wavePrefab).name.Contains("Void"))
{
list2.Add(val2);
}
}
continue;
}
wavePrefabs = val.wavePrefabs;
foreach (WeightedWave val3 in wavePrefabs)
{
if (!((Object)val3.wavePrefab).name.Contains("Command"))
{
list.Add(val3);
}
}
}
InfiniteTowerWaveCategory val4 = ScriptableObject.CreateInstance<InfiniteTowerWaveCategory>();
((Object)val4).name = "CommonWaveCategoryNux";
val4.wavePrefabs = list.ToArray();
val4.availabilityPeriod = 1;
val4.minWaveIndex = 0;
InfiniteTowerWaveCategory val5 = ScriptableObject.CreateInstance<InfiniteTowerWaveCategory>();
((Object)val5).name = "BossWaveCategoryNux";
val5.wavePrefabs = list2.ToArray();
val5.availabilityPeriod = 2;
val5.minWaveIndex = 0;
InfiniteTowerWaveCategory[] waveCategories2 = (InfiniteTowerWaveCategory[])(object)new InfiniteTowerWaveCategory[2] { val5, val4 };
((InfiniteTowerRun)judgementRun).waveCategories = waveCategories2;
((InfiniteTowerRun)judgementRun).defaultWaveEnemyIndicatorPrefab = component.defaultWaveEnemyIndicatorPrefab;
((InfiniteTowerRun)judgementRun).enemyItemPattern = component.enemyItemPattern;
((InfiniteTowerRun)judgementRun).enemyItemPeriod = 100;
((InfiniteTowerRun)judgementRun).enemyInventory = judgementRunPrefab.AddComponent<Inventory>();
((InfiniteTowerRun)judgementRun).stageTransitionPeriod = 2;
((InfiniteTowerRun)judgementRun).stageTransitionPortalCard = component.stageTransitionPortalCard;
((InfiniteTowerRun)judgementRun).stageTransitionPortalMaxDistance = component.stageTransitionPortalMaxDistance;
((InfiniteTowerRun)judgementRun).stageTransitionChatToken = component.stageTransitionChatToken;
((InfiniteTowerRun)judgementRun).fogDamagePrefab = component.fogDamagePrefab;
((InfiniteTowerRun)judgementRun).spawnMaxRadius = component.spawnMaxRadius;
((InfiniteTowerRun)judgementRun).initialSafeWardCard = component.initialSafeWardCard;
((InfiniteTowerRun)judgementRun).safeWardCard = component.safeWardCard;
((InfiniteTowerRun)judgementRun).playerRespawnEffectPrefab = component.playerRespawnEffectPrefab;
((InfiniteTowerRun)judgementRun).interactableCredits = 0;
((InfiniteTowerRun)judgementRun).blacklistedTags = component.blacklistedTags;
((InfiniteTowerRun)judgementRun).blacklistedItems = component.blacklistedItems;
judgementRunPrefab.AddComponent<TeamManager>();
judgementRunPrefab.AddComponent<NetworkRuleBook>();
judgementRunPrefab.AddComponent<TeamFilter>();
judgementRunPrefab.AddComponent<EnemyInfoPanelInventoryProvider>();
judgementRunPrefab.AddComponent<DirectorCore>();
judgementRunPrefab.AddComponent<ExpansionRequirementComponent>();
judgementRunPrefab.AddComponent<RunCameraManager>();
ContentAddition.AddGameMode(judgementRunPrefab);
GameModeCatalog.SetGameModes += new hook_SetGameModes(GameModeCatalog_SetGameModes);
LanguageTextMeshController.Start += new hook_Start(LanguageTextMeshController_Start);
}
private void GameModeCatalog_SetGameModes(orig_SetGameModes orig, Run[] newGameModePrefabComponents)
{
Array.Sort(newGameModePrefabComponents, (Run a, Run b) => string.CompareOrdinal(((Object)a).name, ((Object)b).name));
orig.Invoke(newGameModePrefabComponents);
}
private void LanguageTextMeshController_Start(orig_Start orig, LanguageTextMeshController self)
{
orig.Invoke(self);
if (self.token == "TITLE_ECLIPSE" && Object.op_Implicit((Object)(object)((Component)self).GetComponent<HGButton>()))
{
((Component)((Component)self).transform.parent).gameObject.AddComponent<JudgementRunButtonAdder>();
}
}
}
public class BazaarHooks
{
private BasicPickupDropTable dtEquip = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/Common/dtEquipment.asset").WaitForCompletion();
private BasicPickupDropTable dtWhite = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/Common/dtTier1Item.asset").WaitForCompletion();
private BasicPickupDropTable dtGreen = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/Common/dtTier2Item.asset").WaitForCompletion();
private BasicPickupDropTable dtRed = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/Common/dtTier3Item.asset").WaitForCompletion();
private GameObject potentialPickup = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/OptionPickup/OptionPickup.prefab").WaitForCompletion();
private GameObject portalPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/PortalArena/PortalArena.prefab").WaitForCompletion();
private GameObject rerollEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarRecycler/LunarRerollEffect.prefab").WaitForCompletion();
private GameObject woodShrine = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineHealing/ShrineHealing.prefab").WaitForCompletion();
private GameObject shrineUseEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/ShrineUseEffect.prefab").WaitForCompletion();
private GameObject blueFire = PrefabAPI.InstantiateClone(((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarRecycler/LunarRecycler.prefab").WaitForCompletion().transform.GetChild(2)).gameObject, "BlueFireNux");
private SpawnCard lockBox = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Junk/TreasureCache/iscLockbox.asset").WaitForCompletion();
private SpawnCard lockBoxVoid = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/TreasureCacheVoid/iscLockboxVoid.asset").WaitForCompletion();
private SpawnCard freeChest = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/FreeChest/iscFreeChest.asset").WaitForCompletion();
private SpawnCard greenPrinter = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/DuplicatorLarge/iscDuplicatorLarge.asset").WaitForCompletion();
private SpawnCard voidChest = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/VoidChest/iscVoidChest.asset").WaitForCompletion();
public BazaarHooks()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_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_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: 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_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_0096: 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_00ae: 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_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
//IL_0110: Unknown result type (might be due to invalid IL or missing references)
//IL_0115: Unknown result type (might be due to invalid IL or missing references)
//IL_0128: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Unknown result type (might be due to invalid IL or missing references)
//IL_0145: Unknown result type (might be due to invalid IL or missing references)
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: Unknown result type (might be due to invalid IL or missing references)
//IL_0175: Unknown result type (might be due to invalid IL or missing references)
//IL_019b: Unknown result type (might be due to invalid IL or missing references)
//IL_01a5: Expected O, but got Unknown
//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
//IL_01b6: Expected O, but got Unknown
blueFire.AddComponent<NetworkIdentity>();
BazaarController.Start += new hook_Start(BazaarController_Start);
PurchaseInteraction.OnInteractionBegin += new hook_OnInteractionBegin(PurchaseInteraction_OnInteractionBegin);
}
private void BazaarController_Start(orig_Start orig, BazaarController self)
{
//IL_0083: 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_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00da: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
//IL_01f4: Expected O, but got Unknown
//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
//IL_020d: Unknown result type (might be due to invalid IL or missing references)
//IL_0212: Unknown result type (might be due to invalid IL or missing references)
//IL_0223: Unknown result type (might be due to invalid IL or missing references)
//IL_022a: Expected O, but got Unknown
//IL_0299: Unknown result type (might be due to invalid IL or missing references)
//IL_02a0: Expected O, but got Unknown
//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
//IL_02be: Unknown result type (might be due to invalid IL or missing references)
//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
//IL_02d6: Expected O, but got Unknown
//IL_033c: Unknown result type (might be due to invalid IL or missing references)
//IL_0341: Unknown result type (might be due to invalid IL or missing references)
//IL_0357: Unknown result type (might be due to invalid IL or missing references)
//IL_035c: Unknown result type (might be due to invalid IL or missing references)
//IL_0372: Unknown result type (might be due to invalid IL or missing references)
//IL_0377: Unknown result type (might be due to invalid IL or missing references)
//IL_038d: Unknown result type (might be due to invalid IL or missing references)
//IL_0392: Unknown result type (might be due to invalid IL or missing references)
//IL_03a9: Unknown result type (might be due to invalid IL or missing references)
//IL_03b0: Expected O, but got Unknown
//IL_03b3: Unknown result type (might be due to invalid IL or missing references)
//IL_03be: Unknown result type (might be due to invalid IL or missing references)
//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
//IL_03d4: Unknown result type (might be due to invalid IL or missing references)
//IL_03db: Expected O, but got Unknown
//IL_044d: Unknown result type (might be due to invalid IL or missing references)
//IL_0452: Unknown result type (might be due to invalid IL or missing references)
//IL_0468: Unknown result type (might be due to invalid IL or missing references)
//IL_046d: Unknown result type (might be due to invalid IL or missing references)
//IL_0483: Unknown result type (might be due to invalid IL or missing references)
//IL_0488: Unknown result type (might be due to invalid IL or missing references)
//IL_049e: Unknown result type (might be due to invalid IL or missing references)
//IL_04a3: Unknown result type (might be due to invalid IL or missing references)
//IL_04ba: Unknown result type (might be due to invalid IL or missing references)
//IL_04c1: Expected O, but got Unknown
//IL_04c4: Unknown result type (might be due to invalid IL or missing references)
//IL_04cf: Unknown result type (might be due to invalid IL or missing references)
//IL_04d4: Unknown result type (might be due to invalid IL or missing references)
//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
//IL_04ec: Expected O, but got Unknown
//IL_051a: Unknown result type (might be due to invalid IL or missing references)
//IL_051f: Unknown result type (might be due to invalid IL or missing references)
//IL_0535: Unknown result type (might be due to invalid IL or missing references)
//IL_053a: Unknown result type (might be due to invalid IL or missing references)
//IL_0550: Unknown result type (might be due to invalid IL or missing references)
//IL_0555: Unknown result type (might be due to invalid IL or missing references)
//IL_056b: Unknown result type (might be due to invalid IL or missing references)
//IL_0570: Unknown result type (might be due to invalid IL or missing references)
//IL_05cb: Unknown result type (might be due to invalid IL or missing references)
//IL_05d2: Expected O, but got Unknown
//IL_05d5: Unknown result type (might be due to invalid IL or missing references)
//IL_05e0: Unknown result type (might be due to invalid IL or missing references)
//IL_05e5: Unknown result type (might be due to invalid IL or missing references)
//IL_05f6: Unknown result type (might be due to invalid IL or missing references)
//IL_05fd: Expected O, but got Unknown
//IL_06bf: Unknown result type (might be due to invalid IL or missing references)
//IL_06db: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self);
if (!Object.op_Implicit((Object)(object)Run.instance) || !((Object)Run.instance).name.Contains("Judgement"))
{
return;
}
Run instance = Run.instance;
instance.stageClearCount++;
GameMode.JudgementRun component = ((Component)Run.instance).gameObject.GetComponent<GameMode.JudgementRun>();
GameObject val = GameObject.Find("HOLDER: Store");
if (!Object.op_Implicit((Object)(object)val))
{
return;
}
component.shouldGoBazaar = false;
NetworkServer.Spawn(Object.Instantiate<GameObject>(portalPrefab, new Vector3(-128.6f, -25.4f, -14.4f), Quaternion.Euler(0f, 90f, 0f)));
if (component.availableHeals != 0)
{
GameObject obj = Object.Instantiate<GameObject>(woodShrine, new Vector3(-112.0027f, -24f, -4.5843f), Quaternion.Euler(0f, 180f, 0f));
((Object)obj).name = "JudgementHealShrine";
obj.GetComponent<PurchaseInteraction>().costType = (CostTypeIndex)0;
obj.GetComponent<PurchaseInteraction>().Networkcost = 0;
obj.GetComponent<PurchaseInteraction>().Networkavailable = true;
obj.GetComponent<PurchaseInteraction>().contextToken = $"Full Heal Shrine {component.availableHeals} left.";
obj.GetComponent<PurchaseInteraction>().displayNameToken = $"Full Heal Shrine {component.availableHeals} left.";
NetworkServer.Spawn(obj);
}
((Component)val.transform.GetChild(1)).gameObject.SetActive(false);
((Component)val.transform.GetChild(2)).gameObject.SetActive(false);
GameObject gameObject = ((Component)((Component)SceneInfo.instance).transform.Find("KickOutOfShop")).gameObject;
if (Object.op_Implicit((Object)(object)gameObject))
{
gameObject.gameObject.SetActive(true);
((Component)gameObject.transform.GetChild(8)).gameObject.SetActive(false);
}
if (component.currentWave == 4 || component.currentWave == 8)
{
for (int i = 0; i < Run.instance.participatingPlayerCount; i++)
{
DirectorCore instance2 = DirectorCore.instance;
SpawnCard obj2 = voidChest;
DirectorPlacementRule val2 = new DirectorPlacementRule();
val2.placementMode = (PlacementMode)0;
val2.position = new Vector3(-90f, -25f, -11.5f);
Xoroshiro128Plus bazaarRng = component.bazaarRng;
DirectorSpawnRequest val3 = new DirectorSpawnRequest(obj2, val2, bazaarRng);
instance2.TrySpawnObject(val3);
}
}
int num = 0;
foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList)
{
if (readOnlyInstances.inventory.GetItemCount(Items.RegeneratingScrap) > 0)
{
num++;
}
}
if (num > 0)
{
DirectorCore instance3 = DirectorCore.instance;
SpawnCard obj3 = greenPrinter;
DirectorPlacementRule val4 = new DirectorPlacementRule();
val4.placementMode = (PlacementMode)0;
val4.position = new Vector3(-108.7849f, -27f, -46.7452f);
Xoroshiro128Plus bazaarRng2 = component.bazaarRng;
DirectorSpawnRequest val5 = new DirectorSpawnRequest(obj3, val4, bazaarRng2);
instance3.TrySpawnObject(val5);
}
int num2 = 0;
foreach (CharacterMaster readOnlyInstances2 in CharacterMaster.readOnlyInstancesList)
{
if (readOnlyInstances2.inventory.GetItemCount(Items.TreasureCache) > 0)
{
num2++;
}
}
Vector3[] array = (Vector3[])(object)new Vector3[4]
{
new Vector3(-103.7627f, -24.5f, -4.7243f),
new Vector3(-101.7627f, -24.5f, -4.7243f),
new Vector3(-105.7627f, -24.5f, -4.7243f),
new Vector3(-107.7627f, -24.5f, -4.7243f)
};
for (int j = 0; j < num2; j++)
{
DirectorCore instance4 = DirectorCore.instance;
SpawnCard obj4 = lockBox;
DirectorPlacementRule val6 = new DirectorPlacementRule();
val6.placementMode = (PlacementMode)0;
val6.position = array[j];
Xoroshiro128Plus bazaarRng3 = component.bazaarRng;
DirectorSpawnRequest val7 = new DirectorSpawnRequest(obj4, val6, bazaarRng3);
instance4.TrySpawnObject(val7);
}
int num3 = 0;
foreach (CharacterMaster readOnlyInstances3 in CharacterMaster.readOnlyInstancesList)
{
if (readOnlyInstances3.inventory.GetItemCount(Items.TreasureCacheVoid) > 0)
{
num3++;
}
}
Vector3[] array2 = (Vector3[])(object)new Vector3[4]
{
new Vector3(-89.5709f, -23.5f, -6.589f),
new Vector3(-87.5709f, -23.5f, -6f),
new Vector3(-85.5709f, -23.5f, -5.589f),
new Vector3(-83.5709f, -23.5f, -5f)
};
for (int k = 0; k < num3; k++)
{
DirectorCore instance5 = DirectorCore.instance;
SpawnCard obj5 = lockBoxVoid;
DirectorPlacementRule val8 = new DirectorPlacementRule();
val8.placementMode = (PlacementMode)0;
val8.position = array2[k];
Xoroshiro128Plus bazaarRng4 = component.bazaarRng;
DirectorSpawnRequest val9 = new DirectorSpawnRequest(obj5, val8, bazaarRng4);
instance5.TrySpawnObject(val9);
}
int num4 = 0;
Vector3[] array3 = (Vector3[])(object)new Vector3[4]
{
new Vector3(-122.9354f, -26f, -29.2073f),
new Vector3(-123.8197f, -25.1055f, -22.2822f),
new Vector3(-117.0709f, -24.2098f, -32.8076f),
new Vector3(-110.2542f, -24.979f, -37.4319f)
};
foreach (CharacterMaster readOnlyInstances4 in CharacterMaster.readOnlyInstancesList)
{
if (readOnlyInstances4.inventory.GetItemCount(Items.FreeChest) > 0)
{
num4++;
}
}
for (int l = 0; l < num4; l++)
{
DirectorCore instance6 = DirectorCore.instance;
SpawnCard obj6 = freeChest;
DirectorPlacementRule val10 = new DirectorPlacementRule();
val10.placementMode = (PlacementMode)0;
val10.position = array3[l];
Xoroshiro128Plus bazaarRng5 = component.bazaarRng;
DirectorSpawnRequest val11 = new DirectorSpawnRequest(obj6, val10, bazaarRng5);
instance6.TrySpawnObject(val11);
}
for (int m = 0; m < 5; m++)
{
Transform child = val.transform.GetChild(0).GetChild(m + 3);
if (component.currentWave != 0 && component.currentWave != 4 && m == 2)
{
Object.Destroy((Object)(object)((Component)child).gameObject);
continue;
}
Object.Destroy((Object)(object)((Component)child).gameObject.GetComponent<HologramProjector>());
((Component)((Component)child).transform.GetChild(0).GetChild(0).GetChild(3)).gameObject.SetActive(false);
GameObject obj7 = Object.Instantiate<GameObject>(blueFire, ((Component)child).transform.GetChild(0).GetChild(0));
obj7.transform.localPosition = new Vector3(0f, 1.5f, 0f);
NetworkServer.Spawn(obj7);
((Component)child).gameObject.GetComponent<PurchaseInteraction>().costType = (CostTypeIndex)0;
}
}
private void PurchaseInteraction_OnInteractionBegin(orig_OnInteractionBegin orig, PurchaseInteraction self, Interactor activator)
{
//IL_018b: Unknown result type (might be due to invalid IL or missing references)
//IL_0190: Unknown result type (might be due to invalid IL or missing references)
//IL_0195: Unknown result type (might be due to invalid IL or missing references)
//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
//IL_01ec: Expected O, but got Unknown
//IL_0088: 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_00ae: Expected O, but got Unknown
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: 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_00e1: Unknown result type (might be due to invalid IL or missing references)
//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0101: Unknown result type (might be due to invalid IL or missing references)
//IL_010c: Expected O, but got Unknown
//IL_026c: Unknown result type (might be due to invalid IL or missing references)
//IL_0271: Unknown result type (might be due to invalid IL or missing references)
//IL_0476: Unknown result type (might be due to invalid IL or missing references)
//IL_047f: Unknown result type (might be due to invalid IL or missing references)
//IL_04a4: Unknown result type (might be due to invalid IL or missing references)
//IL_04a9: Unknown result type (might be due to invalid IL or missing references)
//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
//IL_04bd: Unknown result type (might be due to invalid IL or missing references)
//IL_04bf: Unknown result type (might be due to invalid IL or missing references)
//IL_04c8: Unknown result type (might be due to invalid IL or missing references)
//IL_04d1: Unknown result type (might be due to invalid IL or missing references)
//IL_04f6: Unknown result type (might be due to invalid IL or missing references)
//IL_04fb: Unknown result type (might be due to invalid IL or missing references)
//IL_050d: Unknown result type (might be due to invalid IL or missing references)
//IL_050f: Unknown result type (might be due to invalid IL or missing references)
//IL_0511: Unknown result type (might be due to invalid IL or missing references)
//IL_051a: Unknown result type (might be due to invalid IL or missing references)
//IL_0523: Unknown result type (might be due to invalid IL or missing references)
//IL_0548: Unknown result type (might be due to invalid IL or missing references)
//IL_054d: Unknown result type (might be due to invalid IL or missing references)
//IL_055f: Unknown result type (might be due to invalid IL or missing references)
//IL_0561: Unknown result type (might be due to invalid IL or missing references)
//IL_0563: Unknown result type (might be due to invalid IL or missing references)
//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
//IL_02af: Unknown result type (might be due to invalid IL or missing references)
//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
//IL_0301: Unknown result type (might be due to invalid IL or missing references)
//IL_0326: Unknown result type (might be due to invalid IL or missing references)
//IL_032b: Unknown result type (might be due to invalid IL or missing references)
//IL_033d: Unknown result type (might be due to invalid IL or missing references)
//IL_033f: Unknown result type (might be due to invalid IL or missing references)
//IL_0341: Unknown result type (might be due to invalid IL or missing references)
//IL_034a: Unknown result type (might be due to invalid IL or missing references)
//IL_0353: Unknown result type (might be due to invalid IL or missing references)
//IL_0378: Unknown result type (might be due to invalid IL or missing references)
//IL_037d: Unknown result type (might be due to invalid IL or missing references)
//IL_038f: Unknown result type (might be due to invalid IL or missing references)
//IL_0391: Unknown result type (might be due to invalid IL or missing references)
//IL_0393: Unknown result type (might be due to invalid IL or missing references)
//IL_039c: Unknown result type (might be due to invalid IL or missing references)
//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
//IL_03ca: Unknown result type (might be due to invalid IL or missing references)
//IL_03cf: Unknown result type (might be due to invalid IL or missing references)
//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
//IL_03e3: Unknown result type (might be due to invalid IL or missing references)
//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
//IL_03fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0400: Unknown result type (might be due to invalid IL or missing references)
//IL_0425: Unknown result type (might be due to invalid IL or missing references)
//IL_042a: Unknown result type (might be due to invalid IL or missing references)
//IL_043c: Unknown result type (might be due to invalid IL or missing references)
//IL_043e: Unknown result type (might be due to invalid IL or missing references)
//IL_0440: Unknown result type (might be due to invalid IL or missing references)
//IL_057e: Unknown result type (might be due to invalid IL or missing references)
//IL_0587: Unknown result type (might be due to invalid IL or missing references)
//IL_05ac: Unknown result type (might be due to invalid IL or missing references)
//IL_05b1: Unknown result type (might be due to invalid IL or missing references)
//IL_05c3: Unknown result type (might be due to invalid IL or missing references)
//IL_05c5: Unknown result type (might be due to invalid IL or missing references)
//IL_05c7: Unknown result type (might be due to invalid IL or missing references)
//IL_063b: Unknown result type (might be due to invalid IL or missing references)
//IL_0648: Unknown result type (might be due to invalid IL or missing references)
//IL_064d: Unknown result type (might be due to invalid IL or missing references)
//IL_0672: Unknown result type (might be due to invalid IL or missing references)
//IL_0677: Unknown result type (might be due to invalid IL or missing references)
//IL_0689: Unknown result type (might be due to invalid IL or missing references)
//IL_068b: Unknown result type (might be due to invalid IL or missing references)
//IL_068d: Unknown result type (might be due to invalid IL or missing references)
//IL_05d0: Unknown result type (might be due to invalid IL or missing references)
//IL_05d9: Unknown result type (might be due to invalid IL or missing references)
//IL_05fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0603: Unknown result type (might be due to invalid IL or missing references)
//IL_0615: Unknown result type (might be due to invalid IL or missing references)
//IL_0617: Unknown result type (might be due to invalid IL or missing references)
//IL_0619: Unknown result type (might be due to invalid IL or missing references)
GameMode.JudgementRun component = ((Component)Run.instance).gameObject.GetComponent<GameMode.JudgementRun>();
if (((Object)self).name == "JudgementHealShrine")
{
if (component.availableHeals != 0)
{
component.availableHeals--;
string text = ((component.availableHeals > 1) ? " heals left." : " heal left.");
self.contextToken = $"Full Heal Shrine {component.availableHeals} left.";
self.displayNameToken = $"Full Heal Shrine {component.availableHeals} left.";
Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage
{
baseToken = "You have " + component.availableHeals + text
});
HealthComponent healthComponent = ((Component)activator).GetComponent<CharacterBody>().healthComponent;
healthComponent.health = healthComponent.fullHealth;
EffectManager.SpawnEffect(shrineUseEffect, new EffectData
{
origin = ((Component)self).transform.position,
rotation = Quaternion.identity,
scale = 1f,
color = Color32.op_Implicit(Color.green)
}, true);
}
}
else
{
if (Object.op_Implicit((Object)(object)component) && ((Object)self).name == "DuplicatorLarge(Clone)" && ((Component)activator).GetComponent<CharacterBody>().inventory.GetItemCount(Items.RegeneratingScrap) == 0)
{
return;
}
if (Object.op_Implicit((Object)(object)component) && (((Object)self).name == "LunarShopTerminal" || ((Object)self).name == "LunarShopTerminal (1)"))
{
ShopTerminalBehavior component2 = ((Component)self).GetComponent<ShopTerminalBehavior>();
((Component)self).GetComponent<PurchaseInteraction>().available = false;
Vector3 val = ((Component)component2).transform.TransformVector(component2.dropVelocity);
component.purchaseCounter++;
Util.PlaySound("Play_UI_tripleChestShutter", ((Component)self).gameObject);
EffectManager.SpawnEffect(rerollEffect, new EffectData
{
origin = ((Component)((Component)self).gameObject.transform.GetChild(2)).gameObject.transform.position
}, true);
((Component)((Component)self).gameObject.transform.GetChild(0).GetChild(0).GetChild(4)).gameObject.SetActive(false);
if (Object.op_Implicit((Object)(object)component2.animator))
{
int layerIndex = component2.animator.GetLayerIndex("Body");
component2.animator.PlayInFixedTime("Open", layerIndex);
}
Vector3 position = ((Component)((Component)self).gameObject.transform.GetChild(0).GetChild(0).GetChild(2)).gameObject.transform.position;
CreatePickupInfo val2;
if (component.currentWave == 0)
{
switch (component.purchaseCounter)
{
case 1:
val2 = default(CreatePickupInfo);
((CreatePickupInfo)(ref val2)).pickupIndex = PickupCatalog.FindPickupIndex((ItemTier)0);
val2.pickerOptions = PickupPickerController.GenerateOptionsFromDropTable(3, (PickupDropTable)(object)dtWhite, component.bazaarRng);
val2.rotation = Quaternion.identity;
val2.prefabOverride = potentialPickup;
PickupDropletController.CreatePickupDroplet(val2, position, val);
break;
case 2:
val2 = default(CreatePickupInfo);
((CreatePickupInfo)(ref val2)).pickupIndex = PickupCatalog.FindPickupIndex((ItemTier)0);
val2.pickerOptions = PickupPickerController.GenerateOptionsFromDropTable(3, (PickupDropTable)(object)dtWhite, component.bazaarRng);
val2.rotation = Quaternion.identity;
val2.prefabOverride = potentialPickup;
PickupDropletController.CreatePickupDroplet(val2, position, val);
break;
case 3:
val2 = default(CreatePickupInfo);
((CreatePickupInfo)(ref val2)).pickupIndex = PickupCatalog.FindPickupIndex((ItemTier)0);
val2.pickerOptions = PickupPickerController.GenerateOptionsFromDropTable(3, (PickupDropTable)(object)dtWhite, component.bazaarRng);
val2.rotation = Quaternion.identity;
val2.prefabOverride = potentialPickup;
PickupDropletController.CreatePickupDroplet(val2, position, val);
break;
case 4:
val2 = default(CreatePickupInfo);
((CreatePickupInfo)(ref val2)).pickupIndex = PickupCatalog.FindPickupIndex((ItemTier)1);
val2.pickerOptions = PickupPickerController.GenerateOptionsFromDropTable(3, (PickupDropTable)(object)dtGreen, component.bazaarRng);
val2.rotation = Quaternion.identity;
val2.prefabOverride = potentialPickup;
PickupDropletController.CreatePickupDroplet(val2, position, val);
break;
case 5:
val2 = default(CreatePickupInfo);
((CreatePickupInfo)(ref val2)).pickupIndex = PickupCatalog.FindPickupIndex(EquipmentCatalog.FindEquipmentIndex("DroneBackup"));
val2.pickerOptions = PickupPickerController.GenerateOptionsFromDropTable(3, (PickupDropTable)(object)dtEquip, component.bazaarRng);
val2.rotation = Quaternion.identity;
val2.prefabOverride = potentialPickup;
PickupDropletController.CreatePickupDroplet(val2, position, val);
component.purchaseCounter = 0;
break;
}
return;
}
switch (component.purchaseCounter)
{
case 1:
val2 = default(CreatePickupInfo);
((CreatePickupInfo)(ref val2)).pickupIndex = PickupCatalog.FindPickupIndex((ItemTier)0);
val2.pickerOptions = PickupPickerController.GenerateOptionsFromDropTable(3, (PickupDropTable)(object)dtWhite, component.bazaarRng);
val2.rotation = Quaternion.identity;
val2.prefabOverride = potentialPickup;
PickupDropletController.CreatePickupDroplet(val2, position, val);
break;
case 2:
val2 = default(CreatePickupInfo);
((CreatePickupInfo)(ref val2)).pickupIndex = PickupCatalog.FindPickupIndex((ItemTier)1);
val2.pickerOptions = PickupPickerController.GenerateOptionsFromDropTable(3, (PickupDropTable)(object)dtGreen, component.bazaarRng);
val2.rotation = Quaternion.identity;
val2.prefabOverride = potentialPickup;
PickupDropletController.CreatePickupDroplet(val2, position, val);
break;
case 3:
val2 = default(CreatePickupInfo);
((CreatePickupInfo)(ref val2)).pickupIndex = PickupCatalog.FindPickupIndex((ItemTier)0);
val2.pickerOptions = PickupPickerController.GenerateOptionsFromDropTable(3, (PickupDropTable)(object)dtWhite, component.bazaarRng);
val2.rotation = Quaternion.identity;
val2.prefabOverride = potentialPickup;
PickupDropletController.CreatePickupDroplet(val2, position, val);
break;
case 4:
if (component.currentWave == 4 || component.currentWave == 8)
{
val2 = default(CreatePickupInfo);
((CreatePickupInfo)(ref val2)).pickupIndex = PickupCatalog.FindPickupIndex((ItemTier)2);
val2.pickerOptions = PickupPickerController.GenerateOptionsFromDropTable(3, (PickupDropTable)(object)dtRed, component.bazaarRng);
val2.rotation = Quaternion.identity;
val2.prefabOverride = potentialPickup;
PickupDropletController.CreatePickupDroplet(val2, position, val);
break;
}
val2 = default(CreatePickupInfo);
((CreatePickupInfo)(ref val2)).pickupIndex = PickupCatalog.FindPickupIndex((ItemTier)1);
val2.pickerOptions = PickupPickerController.GenerateOptionsFromDropTable(3, (PickupDropTable)(object)dtGreen, component.bazaarRng);
val2.rotation = Quaternion.identity;
val2.prefabOverride = potentialPickup;
PickupDropletController.CreatePickupDroplet(val2, position, val);
if (component.currentWave != 4)
{
component.purchaseCounter = 0;
}
break;
case 5:
if (component.currentWave == 4)
{
val2 = default(CreatePickupInfo);
((CreatePickupInfo)(ref val2)).pickupIndex = PickupCatalog.FindPickupIndex(EquipmentCatalog.FindEquipmentIndex("DroneBackup"));
val2.pickerOptions = PickupPickerController.GenerateOptionsFromDropTable(3, (PickupDropTable)(object)dtEquip, component.bazaarRng);
val2.rotation = Quaternion.identity;
val2.prefabOverride = potentialPickup;
PickupDropletController.CreatePickupDroplet(val2, position, val);
component.purchaseCounter = 0;
}
break;
}
}
else
{
orig.Invoke(self, activator);
}
}
}
}
public class Hooks
{
[CompilerGenerated]
private static class <>O
{
public static hook_PickCurrentTrack <0>__MusicController_PickCurrentTrack;
public static Func<int, int> <1>__ItemFunction;
}
private PostProcessProfile ppProfile = Addressables.LoadAssetAsync<PostProcessProfile>((object)"RoR2/Base/title/PostProcessing/ppSceneEclipseStandard.asset").WaitForCompletion();
private Material spaceStarsMat = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/eclipseworld/matEclipseStarsSpheres.mat").WaitForCompletion();
private Material altSkyboxMat = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/artifactworld/matAWSkySphere.mat").WaitForCompletion();
private SceneDef voidPlains = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC1/itgolemplains/itgolemplains.asset").WaitForCompletion();
private SceneDef voidAqueduct = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC1/itgoolake/itgoolake.asset").WaitForCompletion();
private SceneDef voidAphelian = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC1/itancientloft/itancientloft.asset").WaitForCompletion();
private SceneDef voidRPD = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC1/itfrozenwall/itfrozenwall.asset").WaitForCompletion();
private SceneDef voidAbyssal = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC1/itdampcave/itdampcave.asset").WaitForCompletion();
private SceneDef voidMeadow = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC1/itskymeadow/itskymeadow.asset").WaitForCompletion();
private GameEndingDef judgementRunEnding = Addressables.LoadAssetAsync<GameEndingDef>((object)"RoR2/Base/WeeklyRun/PrismaticTrialEnding.asset").WaitForCompletion();
private GameObject tpOutController = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/TeleportOutController.prefab").WaitForCompletion();
public Hooks()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_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_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: 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_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_0096: 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_00ae: 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_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: 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_0120: Expected O, but got Unknown
//IL_0127: Unknown result type (might be due to invalid IL or missing references)
//IL_0131: Expected O, but got Unknown
//IL_0138: Unknown result type (might be due to invalid IL or missing references)
//IL_0142: Expected O, but got Unknown
//IL_0149: Unknown result type (might be due to invalid IL or missing references)
//IL_0153: Expected O, but got Unknown
//IL_015a: Unknown result type (might be due to invalid IL or missing references)
//IL_0164: Expected O, but got Unknown
//IL_016b: Unknown result type (might be due to invalid IL or missing references)
//IL_0175: Expected O, but got Unknown
//IL_019c: Unknown result type (might be due to invalid IL or missing references)
//IL_01a6: Expected O, but got Unknown
//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
//IL_01b7: Expected O, but got Unknown
//IL_01be: Unknown result type (might be due to invalid IL or missing references)
//IL_01c8: Expected O, but got Unknown
//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
//IL_01d9: Expected O, but got Unknown
//IL_0185: Unknown result type (might be due to invalid IL or missing references)
//IL_018a: Unknown result type (might be due to invalid IL or missing references)
//IL_0190: Expected O, but got Unknown
SceneDirector.PopulateScene += new Manipulator(RemoveExtraLoot);
PurchaseInteraction.GetInteractability += new hook_GetInteractability(PurchaseInteraction_GetInteractability);
Run.PickNextStageScene += new hook_PickNextStageScene(Run_PickNextStageScene);
Run.Start += new hook_Start(Run_Start);
Stage.Start += new hook_Start(Stage_Start);
CharacterMaster.SpawnBody += new hook_SpawnBody(CharacterMaster_SpawnBody);
object obj = <>O.<0>__MusicController_PickCurrentTrack;
if (obj == null)
{
hook_PickCurrentTrack val = MusicController_PickCurrentTrack;
<>O.<0>__MusicController_PickCurrentTrack = val;
obj = (object)val;
}
MusicController.PickCurrentTrack += (hook_PickCurrentTrack)obj;
BossDeath.OnEnter += new hook_OnEnter(BossDeathOnEnter);
CharacterBody.Start += new hook_Start(CharacterBody_Start);
CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart);
SceneExitController.Begin += new hook_Begin(SceneExitController_Begin);
}
public void SavePersistentHP()
{
//IL_0030: 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_004a: Unknown result type (might be due to invalid IL or missing references)
GameMode.JudgementRun component = ((Component)Run.instance).gameObject.GetComponent<GameMode.JudgementRun>();
foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances)
{
if (component.persistentHP.TryGetValue(((NetworkBehaviour)instance.master).netId, out var _))
{
component.persistentHP[((NetworkBehaviour)instance.master).netId] = instance.master.GetBody().healthComponent.health;
}
else
{
component.persistentHP.Add(((NetworkBehaviour)instance.master).netId, instance.master.GetBody().healthComponent.health);
}
}
}
public void LoadPersistentHP(CharacterBody body)
{
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
GameMode.JudgementRun component = ((Component)Run.instance).gameObject.GetComponent<GameMode.JudgementRun>();
if (Object.op_Implicit((Object)(object)body.master) && Object.op_Implicit((Object)(object)body.healthComponent) && component.persistentHP.TryGetValue(((NetworkBehaviour)body.master).netId, out var value))
{
body.healthComponent.health = value;
}
}
private void RemoveExtraLoot(ILContext il)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Expected O, but got Unknown
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "TreasureCache")
}))
{
val.Index += 2;
val.EmitDelegate<Func<int, int>>((Func<int, int>)ItemFunction);
}
else
{
Debug.LogWarning((object)"Judgement: TreasureCache IL hook failed");
}
val.Index = 0;
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "TreasureCacheVoid")
}))
{
val.Index += 2;
val.EmitDelegate<Func<int, int>>((Func<int, int>)ItemFunction);
}
else
{
Debug.LogWarning((object)"Judgement: TreasureCacheVoid IL hook failed");
}
val.Index = 0;
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "FreeChest")
}))
{
val.Index += 2;
val.EmitDelegate<Func<int, int>>((Func<int, int>)ItemFunction);
}
else
{
Debug.LogWarning((object)"Judgement: FreeChest IL hook failed");
}
static int ItemFunction(int itemCount)
{
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)Run.instance) && ((Object)Run.instance).name.Contains("Judgement"))
{
Scene activeScene = SceneManager.GetActiveScene();
if (((Scene)(ref activeScene)).name != "bazaar")
{
return 0;
}
}
return itemCount;
}
}
public Interactability PurchaseInteraction_GetInteractability(orig_GetInteractability orig, PurchaseInteraction self, Interactor activator)
{
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
if (!(SceneInfo.instance.sceneDef.nameToken == "MAP_BAZAAR_TITLE") || !(((Object)self).name == "LunarRecycler") || !Object.op_Implicit((Object)(object)Run.instance) || !((Object)Run.instance).name.Contains("Judgement"))
{
return orig.Invoke(self, activator);
}
return (Interactability)1;
}
private void Run_Start(orig_Start orig, Run self)
{
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Expected O, but got Unknown
orig.Invoke(self);
if (((Object)self).name.Contains("Judgement"))
{
((Component)self).gameObject.GetComponent<GameMode.JudgementRun>().bazaarRng = new Xoroshiro128Plus(self.seed ^ 0x663);
}
}
private CharacterBody CharacterMaster_SpawnBody(orig_SpawnBody orig, CharacterMaster self, Vector3 position, Quaternion rotation)
{
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_0114: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Invalid comparison between Unknown and I4
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: 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_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)Run.instance) && ((Object)Run.instance).name.Contains("Judgement") && (int)self.teamIndex == 1)
{
Scene activeScene = SceneManager.GetActiveScene();
string name = ((Scene)(ref activeScene)).name;
GameMode.JudgementRun component = ((Component)Run.instance).gameObject.GetComponent<GameMode.JudgementRun>();
if (name == "bazaar" && (component.isFirstStage || component.persistentHP.TryGetValue(((NetworkBehaviour)self).netId, out var value)))
{
return orig.Invoke(self, new Vector3(-81.5f, -24.8f, -16.6f), Quaternion.Euler(358f, 210f, 0f));
}
if (name == "moon2" && component.persistentHP.TryGetValue(((NetworkBehaviour)self).netId, out value) && !self.IsExtraLifePendingServer())
{
return orig.Invoke(self, new Vector3(127f, 500f, 101f), Quaternion.Euler(358f, 210f, 0f));
}
return orig.Invoke(self, position, rotation);
}
return orig.Invoke(self, position, rotation);
}
private static void MusicController_PickCurrentTrack(orig_PickCurrentTrack orig, MusicController self, ref MusicTrackDef newTrack)
{
//IL_002a: 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)
orig.Invoke(self, ref newTrack);
if (Object.op_Implicit((Object)(object)Run.instance) && ((Object)Run.instance).name.Contains("Judgement"))
{
Scene activeScene = SceneManager.GetActiveScene();
if (((Scene)(ref activeScene)).name != "moon2")
{
newTrack = MusicTrackCatalog.FindMusicTrackDef("muSong23");
}
}
}
private IEnumerator Stage_Start(orig_Start orig, Stage self)
{
yield return orig.Invoke(self);
if (!Object.op_Implicit((Object)(object)Run.instance) || !((Object)Run.instance).name.Contains("Judgement"))
{
yield break;
}
float ambientIntensity = 0.85f;
Scene activeScene = SceneManager.GetActiveScene();
if (((Scene)(ref activeScene)).name == "itfrozenwall")
{
ambientIntensity = 0.5f;
}
GameObject val = GameObject.Find("Weather, VoidArena");
if (Object.op_Implicit((Object)(object)val))
{
PostProcessVolume component = ((Component)val.transform.GetChild(0)).gameObject.GetComponent<PostProcessVolume>();
SetAmbientLight component2 = ((Component)val.transform.GetChild(0)).gameObject.GetComponent<SetAmbientLight>();
component.profile = ppProfile;
component2.ambientIntensity = ambientIntensity;
component2.ApplyLighting();
((Component)val.transform.GetChild(2)).GetComponent<Light>().intensity = 1f;
((Renderer)((Component)val.transform.GetChild(1).GetChild(0).GetChild(2)).gameObject.GetComponent<MeshRenderer>()).sharedMaterials = (Material[])(object)new Material[2] { altSkyboxMat, spaceStarsMat };
yield break;
}
val = GameObject.Find("Weather, InfiniteTower");
if (Object.op_Implicit((Object)(object)val))
{
PostProcessVolume component3 = ((Component)val.transform.GetChild(0)).gameObject.GetComponent<PostProcessVolume>();
SetAmbientLight component4 = ((Component)val.transform.GetChild(0)).gameObject.GetComponent<SetAmbientLight>();
component3.profile = ppProfile;
component4.ambientIntensity = ambientIntensity;
component4.ApplyLighting();
((Component)val.transform.GetChild(2)).GetComponent<Light>().intensity = 1f;
((Renderer)((Component)val.transform.GetChild(1).GetChild(0).GetChild(2)).gameObject.GetComponent<MeshRenderer>()).sharedMaterials = (Material[])(object)new Material[2] { altSkyboxMat, spaceStarsMat };
}
}
private void Run_PickNextStageScene(orig_PickNextStageScene orig, Run self, WeightedSelection<SceneDef> choices)
{
if (Run.instance.stageClearCount == 0 && ((Object)self).name.Contains("Judgement"))
{
if (((Component)Run.instance).gameObject.GetComponent<GameMode.JudgementRun>().isFirstStage)
{
SceneDef nextStageScene = SceneCatalog.FindSceneDef("bazaar");
self.nextStageScene = nextStageScene;
}
}
else
{
orig.Invoke(self, choices);
}
}
private void SceneExitController_Begin(orig_Begin orig, SceneExitController self)
{
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//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)
if (Object.op_Implicit((Object)(object)Run.instance) && ((Object)Run.instance).name.Contains("Judgement"))
{
GameMode.JudgementRun component = ((Component)Run.instance).gameObject.GetComponent<GameMode.JudgementRun>();
SavePersistentHP();
if (component.currentWave == 0)
{
Run.instance.nextStageScene = voidPlains;
}
if (component.currentWave == 2)
{
int[] array = Array.Empty<int>();
WeightedSelection<SceneDef> obj = new WeightedSelection<SceneDef>(8);
obj.AddChoice(voidAqueduct, 1f);
obj.AddChoice(voidAphelian, 1f);
int num = obj.EvaluateToChoiceIndex(Run.instance.runRNG.nextNormalizedFloat, array);
ChoiceInfo<SceneDef> choice = obj.GetChoice(num);
Run.instance.nextStageScene = choice.value;
}
if (component.currentWave == 4)
{
Run.instance.nextStageScene = voidRPD;
}
if (component.currentWave == 6)
{
Run.instance.nextStageScene = voidAbyssal;
}
if (component.currentWave == 8)
{
Run.instance.nextStageScene = voidMeadow;
}
if (component.currentWave == 10)
{
SceneDef nextStageScene = SceneCatalog.FindSceneDef("moon2");
Run.instance.nextStageScene = nextStageScene;
}
if (component.shouldGoBazaar)
{
SceneDef nextStageScene2 = SceneCatalog.FindSceneDef("bazaar");
Run.instance.nextStageScene = nextStageScene2;
}
ReadOnlyCollection<CharacterMaster> readOnlyInstancesList = CharacterMaster.readOnlyInstancesList;
for (int i = 0; i < readOnlyInstancesList.Count; i++)
{
CharacterMaster component2 = ((Component)readOnlyInstancesList[i]).GetComponent<CharacterMaster>();
if (Object.op_Implicit((Object)(object)((Component)component2).GetComponent<SetDontDestroyOnLoad>()))
{
GameObject bodyObject = component2.GetBodyObject();
if (Object.op_Implicit((Object)(object)bodyObject))
{
GameObject obj2 = Object.Instantiate<GameObject>(tpOutController, bodyObject.transform.position, Quaternion.identity);
obj2.GetComponent<TeleportOutController>().Networktarget = bodyObject;
NetworkServer.Spawn(obj2);
}
}
}
self.SetState((ExitState)3);
}
else
{
orig.Invoke(self);
}
}
private void CharacterBody_Start(orig_Start orig, CharacterBody self)
{
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Invalid comparison between Unknown and I4
orig.Invoke(self);
if (Object.op_Implicit((Object)(object)Run.instance) && ((Object)Run.instance).name.Contains("Judgement") && self.isPlayerControlled && !self.HasBuff(Buffs.Immune))
{
LoadPersistentHP(self);
GameMode.JudgementRun component = ((Component)Run.instance).gameObject.GetComponent<GameMode.JudgementRun>();
if ((int)Run.instance.selectedDifficulty >= 3 && component.currentWave == 0)
{
self.healthComponent.health = self.healthComponent.fullHealth;
}
self.baseDamage *= 1.25f;
}
}
private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body)
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self, body);
if (NetworkServer.active && Run.instance.gameModeIndex == GameModeCatalog.FindGameModeIndex("xJudgementRun"))
{
_ = body.isPlayerControlled;
}
}
private void BossDeathOnEnter(orig_OnEnter orig, BossDeath self)
{
orig.Invoke(self);
if (Object.op_Implicit((Object)(object)Run.instance) && ((Object)Run.instance).name.Contains("Judgement"))
{
Run.instance.BeginGameOver(judgementRunEnding);
}
}
}
public class SimHooks
{
public SimHooks()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Expected O, but got Unknown
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Expected O, but got Unknown
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Expected O, but got Unknown
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Expected O, but got Unknown
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: 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_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Expected O, but got Unknown
InfiniteTowerRun.OverrideRuleChoices += new hook_OverrideRuleChoices(InfiniteTowerRun_OverrideRuleChoices);
InfiniteTowerRun.SpawnSafeWard += new hook_SpawnSafeWard(InfiniteTowerRun_SpawnSafeWard);
InfiniteTowerRun.MoveSafeWard += new hook_MoveSafeWard(InfiniteTowerRun_MoveSafeWard);
InfiniteTowerRun.RecalculateDifficultyCoefficentInternal += new hook_RecalculateDifficultyCoefficentInternal(InfiniteTowerRun_RecalculateDifficultyCoefficentInternal);
InfiniteTowerWaveController.DropRewards += new hook_DropRewards(InfiniteTowerWaveController_DropRewards);
InfiniteTowerWaveController.OnEnable += new hook_OnEnable(InfiniteTowerWaveController_OnEnable);
InfiniteTowerBossWaveController.PreStartClient += new hook_PreStartClient(InfiniteTowerBossWaveController_PreStartClient);
}
private void InfiniteTowerWaveController_OnEnable(orig_OnEnable orig, InfiniteTowerWaveController self)
{
if (Object.op_Implicit((Object)(object)Run.instance) && ((Object)Run.instance).name.Contains("Judgement"))
{
if (self is InfiniteTowerBossWaveController)
{
self.baseCredits = 400f;
}
else
{
self.baseCredits = 125f;
}
}
orig.Invoke(self);
}
private void InfiniteTowerRun_MoveSafeWard(orig_MoveSafeWard orig, InfiniteTowerRun self)
{
if (!Object.op_Implicit((Object)(object)Run.instance) || !((Object)Run.instance).name.Contains("Judgement"))
{
orig.Invoke(self);
}
}
private void InfiniteTowerWaveController_DropRewards(orig_DropRewards orig, InfiniteTowerWaveController self)
{
if (!Object.op_Implicit((Object)(object)Run.instance) || !((Object)Run.instance).name.Contains("Judgement"))
{
orig.Invoke(self);
}
}
private void InfiniteTowerBossWaveController_PreStartClient(orig_PreStartClient orig, InfiniteTowerBossWaveController self)
{
if (Object.op_Implicit((Object)(object)Run.instance) && ((Object)Run.instance).name.Contains("Judgement"))
{
self.guaranteeInitialChampion = true;
}
orig.Invoke(self);
}
private void InfiniteTowerRun_OverrideRuleChoices(orig_OverrideRuleChoices orig, InfiniteTowerRun self, RuleChoiceMask mustInclude, RuleChoiceMask mustExclude, ulong runSeed)
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)PreGameController.instance) && PreGameController.instance.gameModeIndex == GameModeCatalog.FindGameModeIndex("xJudgementRun"))
{
string[] array = new string[15]
{
"HealWhileSafe", "HealingPotion", "Medkit", "Tooth", "Seed", "TPHealingNova", "BarrierOnOverHeal", "ExtraLife", "ExtraLifeVoid", "IncreaseHealing",
"NovaOnHeal", "Plant", "RepeatHeal", "Mushroom", "MushroomVoid"
};
string[] array2 = new string[4] { "Fruit", "LifestealOnHit", "PassiveHealing", "VendingMachine" };
string[] array3 = array;
foreach (string text in array3)
{
RuleDef obj = RuleCatalog.FindRuleDef("Items." + text);
RuleChoiceDef val = ((obj != null) ? obj.FindChoice("Off") : null);
if (val != null)
{
((Run)self).ForceChoice(mustInclude, mustExclude, val);
}
}
array3 = array2;
foreach (string text2 in array3)
{
RuleDef obj2 = RuleCatalog.FindRuleDef("Equipment." + text2);
RuleChoiceDef val2 = ((obj2 != null) ? obj2.FindChoice("Off") : null);
if (val2 != null)
{
((Run)self).ForceChoice(mustInclude, mustExclude, val2);
}
}
}
else
{
orig.Invoke(self, mustInclude, mustExclude, runSeed);
}
}
private void InfiniteTowerRun_RecalculateDifficultyCoefficentInternal(orig_RecalculateDifficultyCoefficentInternal orig, InfiniteTowerRun self)
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)Run.instance) && ((Object)Run.instance).name.Contains("Judgement"))
{
DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(((Run)self).selectedDifficulty);
float num = 1.5f * (float)self.waveIndex;
float num2 = 0.0506f * (difficultyDef.scalingValue * 1.75f);
float num3 = Mathf.Pow(1.02f, (float)self.waveIndex);
((Run)self).difficultyCoefficient = (float)(1.0 + (double)num2 * (double)num) * num3;
((Run)self).compensatedDifficultyCoefficient = ((Run)self).difficultyCoefficient;
((Run)self).ambientLevel = Mathf.Min((float)(((double)((Run)self).difficultyCoefficient - 1.0) / 0.33000001311302185 + 1.0), 9999f);
int ambientLevelFloor = ((Run)self).ambientLevelFloor;
((Run)self).ambientLevelFloor = Mathf.FloorToInt(((Run)self).ambientLevel);
if (ambientLevelFloor != ((Run)self).ambientLevelFloor && ambientLevelFloor != 0 && ((Run)self).ambientLevelFloor > ambientLevelFloor)
{
((Run)self).OnAmbientLevelUp();
}
}
else
{
orig.Invoke(self);
}
}
private void InfiniteTowerRun_SpawnSafeWard(orig_SpawnSafeWard orig, InfiniteTowerRun self, InteractableSpawnCard spawnCard, DirectorPlacementRule placementRule)
{
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)Run.instance) && ((Object)Run.instance).name.Contains("Judgement"))
{
Scene activeScene = SceneManager.GetActiveScene();
if (((Scene)(ref activeScene)).name == "bazaar")
{
if (Object.op_Implicit((Object)(object)self.fogDamageController))
{
Object.Destroy((Object)(object)((Component)self.fogDamageController).gameObject);
}
return;
}
GameMode.JudgementRun component = ((Component)Run.instance).gameObject.GetComponent<GameMode.JudgementRun>();
component.shouldGoBazaar = true;
component.isFirstStage = false;
component.purchaseCounter = 0;
if (component.currentWave == 10)
{
Object.Destroy((Object)(object)((Component)self.fogDamageController).gameObject);
GameObject val = GameObject.Find("Director");
if (Object.op_Implicit((Object)(object)val))
{
CombatDirector[] components = val.GetComponents<CombatDirector>();
for (int i = 0; i < components.Length; i++)
{
Object.Destroy((Object)(object)components[i]);
}
}
return;
}
component.currentWave += 2;
}
orig.Invoke(self, spawnCard, placementRule);
}
}
[BepInPlugin("com.Nuxlar.Judgement", "Judgement", "1.4.4")]
public class Judgement : BaseUnityPlugin
{
public void Awake()
{
new GameMode();
new Hooks();
new SimHooks();
new BazaarHooks();
}
}
}