using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using ExitGames.Client.Photon; using HarmonyLib; using Microsoft.CodeAnalysis; using Photon.Pun; using Photon.Realtime; using REPOLib.Modules; using REPOLib.Objects.Sdk; using TMPro; using Unity.AI.Navigation; using UnityEngine; using UnityEngine.AI; using UnityEngine.Networking; 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("Empress")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("EmpressFinalHand")] [assembly: AssemblyTitle("EmpressFinalHand")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 Empress.REPO.FinalHand { internal static class ArenaAccess { private delegate void ModuleSetAllChecklistDelegate(Module module); private delegate void LevelGeneratorGenerateDoneDelegate(LevelGenerator instance, PhotonMessageInfo info); private static readonly FieldInfo EnvironmentSetupDoneField = AccessTools.Field(typeof(EnvironmentDirector), "SetupDone"); private static readonly FieldInfo EnvironmentMainCameraField = AccessTools.Field(typeof(EnvironmentDirector), "MainCamera"); private static readonly FieldInfo EnvironmentAmbientColorField = AccessTools.Field(typeof(EnvironmentDirector), "AmbientColor"); private static readonly FieldInfo EnvironmentAmbientColorNewField = AccessTools.Field(typeof(EnvironmentDirector), "AmbientColorNew"); private static readonly FieldInfo EnvironmentAmbientColorPreviousField = AccessTools.Field(typeof(EnvironmentDirector), "AmbientColorPrevious"); private static readonly FieldInfo EnvironmentAmbientColorAdaptationField = AccessTools.Field(typeof(EnvironmentDirector), "AmbientColorAdaptation"); private static readonly FieldInfo EnvironmentAmbientColorAdaptationNewField = AccessTools.Field(typeof(EnvironmentDirector), "AmbientColorAdaptationNew"); private static readonly FieldInfo EnvironmentAmbientColorAdaptationPreviousField = AccessTools.Field(typeof(EnvironmentDirector), "AmbientColorAdaptationPrevious"); private static readonly FieldInfo EnvironmentDarkAdaptationLerpField = AccessTools.Field(typeof(EnvironmentDirector), "DarkAdaptationLerp"); private static readonly FieldInfo EnvironmentFogColorField = AccessTools.Field(typeof(EnvironmentDirector), "FogColor"); private static readonly FieldInfo EnvironmentFogColorNewField = AccessTools.Field(typeof(EnvironmentDirector), "FogColorNew"); private static readonly FieldInfo EnvironmentFogColorPreviousField = AccessTools.Field(typeof(EnvironmentDirector), "FogColorPrevious"); private static readonly FieldInfo EnvironmentFogStartDistanceField = AccessTools.Field(typeof(EnvironmentDirector), "FogStartDistance"); private static readonly FieldInfo EnvironmentFogStartDistanceNewField = AccessTools.Field(typeof(EnvironmentDirector), "FogStartDistanceNew"); private static readonly FieldInfo EnvironmentFogStartDistancePreviousField = AccessTools.Field(typeof(EnvironmentDirector), "FogStartDistancePrevious"); private static readonly FieldInfo EnvironmentFogEndDistanceField = AccessTools.Field(typeof(EnvironmentDirector), "FogEndDistance"); private static readonly FieldInfo EnvironmentFogEndDistanceNewField = AccessTools.Field(typeof(EnvironmentDirector), "FogEndDistanceNew"); private static readonly FieldInfo EnvironmentFogEndDistancePreviousField = AccessTools.Field(typeof(EnvironmentDirector), "FogEndDistancePrevious"); private static readonly FieldInfo LevelGeneratorAllPlayersReadyField = AccessTools.Field(typeof(LevelGenerator), "AllPlayersReady"); private static readonly FieldInfo LevelGeneratorEnemyReadyField = AccessTools.Field(typeof(LevelGenerator), "EnemyReady"); private static readonly FieldInfo LevelGeneratorModulesSpawnedField = AccessTools.Field(typeof(LevelGenerator), "ModulesSpawned"); private static readonly FieldInfo LevelGeneratorPlayerSpawnedField = AccessTools.Field(typeof(LevelGenerator), "playerSpawned"); private static readonly FieldInfo RunManagerLevelPreviousField = AccessTools.Field(typeof(RunManager), "levelPrevious"); private static readonly FieldInfo PlayerControllerInputDisableTimerField = AccessTools.Field(typeof(PlayerController), "InputDisableTimer"); private static readonly FieldInfo PlayerAvatarIsDisabledField = AccessTools.Field(typeof(PlayerAvatar), "isDisabled"); private static readonly FieldInfo PlayerAvatarDeadSetField = AccessTools.Field(typeof(PlayerAvatar), "deadSet"); private static readonly FieldInfo ValuableDirectorSetupCompleteField = AccessTools.Field(typeof(ValuableDirector), "setupComplete"); private static readonly FieldInfo ValuableDirectorValuablesSpawnedField = AccessTools.Field(typeof(ValuableDirector), "valuablesSpawned"); private static readonly FieldInfo RoundDirectorExtractionPointsField = AccessTools.Field(typeof(RoundDirector), "extractionPoints"); private static readonly FieldInfo RoundDirectorExtractionPointsCompletedField = AccessTools.Field(typeof(RoundDirector), "extractionPointsCompleted"); private static readonly FieldInfo RoundDirectorExtractionPointListField = AccessTools.Field(typeof(RoundDirector), "extractionPointList"); private static readonly FieldInfo LoadingUiLevelAnimationCompletedField = AccessTools.Field(typeof(LoadingUI), "levelAnimationCompleted"); private static readonly FieldInfo LevelPointInStartRoomField = AccessTools.Field(typeof(LevelPoint), "inStartRoom"); private static readonly FieldInfo PlayerAvatarSteamIdField = AccessTools.Field(typeof(PlayerAvatar), "steamID"); private static readonly FieldInfo PlayerAvatarIsLocalField = AccessTools.Field(typeof(PlayerAvatar), "isLocal"); private static readonly FieldInfo ItemAttributesInstanceNameField = AccessTools.Field(typeof(ItemAttributes), "instanceName"); private static readonly FieldInfo ItemAttributesHasIconField = AccessTools.Field(typeof(ItemAttributes), "hasIcon"); private static readonly FieldInfo ItemBatteryLifeIntField = AccessTools.Field(typeof(ItemBattery), "batteryLifeInt"); private static readonly FieldInfo ItemGunBatteryField = AccessTools.Field(typeof(ItemGun), "itemBattery"); private static readonly FieldInfo ModuleSetupDoneField = AccessTools.Field(typeof(Module), "SetupDone"); private static readonly FieldInfo ModuleStartRoomField = AccessTools.Field(typeof(Module), "StartRoom"); private static readonly FieldInfo ModuleGridXField = AccessTools.Field(typeof(Module), "GridX"); private static readonly FieldInfo ModuleGridYField = AccessTools.Field(typeof(Module), "GridY"); private static readonly MethodInfo ModuleSetAllChecklistMethod = AccessTools.Method(typeof(Module), "SetAllChecklist", (Type[])null, (Type[])null); private static readonly MethodInfo LevelGeneratorGenerateDoneMethod = AccessTools.Method(typeof(LevelGenerator), "GenerateDone", new Type[1] { typeof(PhotonMessageInfo) }, (Type[])null); private static readonly ModuleSetAllChecklistDelegate ModuleSetAllChecklistCall = CreateDelegate(ModuleSetAllChecklistMethod); private static readonly LevelGeneratorGenerateDoneDelegate LevelGeneratorGenerateDoneCall = CreateDelegate(LevelGeneratorGenerateDoneMethod); public static void SetEnvironmentFog(EnvironmentDirector director, Color color, float startDistance, float endDistance) { //IL_0006: 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_0028: Unknown result type (might be due to invalid IL or missing references) SetField(EnvironmentFogColorField, director, color); SetField(EnvironmentFogColorNewField, director, color); SetField(EnvironmentFogColorPreviousField, director, color); SetField(EnvironmentFogStartDistanceField, director, startDistance); SetField(EnvironmentFogStartDistanceNewField, director, startDistance); SetField(EnvironmentFogStartDistancePreviousField, director, startDistance); SetField(EnvironmentFogEndDistanceField, director, endDistance); SetField(EnvironmentFogEndDistanceNewField, director, endDistance); SetField(EnvironmentFogEndDistancePreviousField, director, endDistance); } public static void SetEnvironmentAmbient(EnvironmentDirector director, Color ambient, Color adaptation) { //IL_0006: 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_0028: 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_004a: 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) SetField(EnvironmentAmbientColorField, director, ambient); SetField(EnvironmentAmbientColorNewField, director, ambient); SetField(EnvironmentAmbientColorPreviousField, director, ambient); SetField(EnvironmentAmbientColorAdaptationField, director, adaptation); SetField(EnvironmentAmbientColorAdaptationNewField, director, adaptation); SetField(EnvironmentAmbientColorAdaptationPreviousField, director, adaptation); } public static void SetEnvironmentDarkAdaptation(EnvironmentDirector director, float value) { SetField(EnvironmentDarkAdaptationLerpField, director, value); } public static Camera GetEnvironmentMainCamera(EnvironmentDirector director) { return Get(EnvironmentMainCameraField, director); } public static void SetEnvironmentMainCamera(EnvironmentDirector director, Camera camera) { SetField(EnvironmentMainCameraField, director, camera); } public static void SetEnvironmentSetupDone(EnvironmentDirector director, bool value) { SetField(EnvironmentSetupDoneField, director, value); } public static void SetAllPlayersReady(LevelGenerator generator, bool value) { SetField(LevelGeneratorAllPlayersReadyField, generator, value); } public static bool GetAllPlayersReady(LevelGenerator generator) { return GetBool(LevelGeneratorAllPlayersReadyField, generator); } public static void SetEnemyReady(LevelGenerator generator, bool value) { SetField(LevelGeneratorEnemyReadyField, generator, value); } public static void SetModulesSpawned(LevelGenerator generator, int value) { SetField(LevelGeneratorModulesSpawnedField, generator, value); } public static void SetPlayerSpawnedCount(LevelGenerator generator, int value) { SetField(LevelGeneratorPlayerSpawnedField, generator, value); } public static int GetPlayerSpawnedCount(LevelGenerator generator) { return GetInt(LevelGeneratorPlayerSpawnedField, generator); } public static void SetLevelPrevious(RunManager manager, Level level) { SetField(RunManagerLevelPreviousField, manager, level); } public static float GetInputDisableTimer(PlayerController controller) { return GetFloat(PlayerControllerInputDisableTimerField, controller); } public static bool GetIsDisabled(PlayerAvatar avatar) { return GetBool(PlayerAvatarIsDisabledField, avatar); } public static bool GetDeadSet(PlayerAvatar avatar) { return GetBool(PlayerAvatarDeadSetField, avatar); } public static void SetValuableSetupComplete(ValuableDirector director, bool value) { SetField(ValuableDirectorSetupCompleteField, director, value); } public static void SetValuableValuablesSpawned(ValuableDirector director, bool value) { SetField(ValuableDirectorValuablesSpawnedField, director, value); } public static void ResetRoundExtraction(RoundDirector director) { SetField(RoundDirectorExtractionPointsField, director, 0); SetField(RoundDirectorExtractionPointsCompletedField, director, 0); Get>(RoundDirectorExtractionPointListField, director)?.Clear(); } public static bool GetLevelAnimationCompleted(LoadingUI ui) { return GetBool(LoadingUiLevelAnimationCompletedField, ui); } public static void ConfigureStartRoomModule(Module module, int gridX, int gridY) { ModuleSetAllChecklistCall?.Invoke(module); SetField(ModuleSetupDoneField, module, true); SetField(ModuleStartRoomField, module, true); SetField(ModuleGridXField, module, gridX); SetField(ModuleGridYField, module, gridY); } public static void MarkLevelPointInStartRoom(LevelPoint point, bool value) { SetField(LevelPointInStartRoomField, point, value); } public static bool GetIsLocal(PlayerAvatar avatar) { return GetBool(PlayerAvatarIsLocalField, avatar); } public static string GetSteamId(PlayerAvatar avatar) { if (PlayerAvatarSteamIdField == null || (Object)(object)avatar == (Object)null) { return string.Empty; } return (PlayerAvatarSteamIdField.GetValue(avatar) as string) ?? string.Empty; } public static string GetItemInstanceName(ItemAttributes attributes) { if (ItemAttributesInstanceNameField == null || (Object)(object)attributes == (Object)null) { return string.Empty; } return (ItemAttributesInstanceNameField.GetValue(attributes) as string) ?? string.Empty; } public static bool GetItemHasIcon(ItemAttributes attributes) { return GetBool(ItemAttributesHasIconField, attributes); } public static void SetItemBatteryLifeInt(ItemBattery battery, int value) { SetField(ItemBatteryLifeIntField, battery, value); } public static ItemBattery GetGunBattery(ItemGun gun) { return Get(ItemGunBatteryField, gun); } public static void GenerateDone(LevelGenerator generator) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (LevelGeneratorGenerateDoneCall != null) { LevelGeneratorGenerateDoneCall(generator, default(PhotonMessageInfo)); } } private static T Get(FieldInfo field, object instance) where T : class { if (field == null || instance == null) { return null; } return field.GetValue(instance) as T; } private static bool GetBool(FieldInfo field, object instance) { if (field == null || instance == null) { return false; } object value = field.GetValue(instance); bool flag = default(bool); int num; if (value is bool) { flag = (bool)value; num = 1; } else { num = 0; } return (byte)((uint)num & (flag ? 1u : 0u)) != 0; } private static int GetInt(FieldInfo field, object instance) { if (field == null || instance == null) { return 0; } object value = field.GetValue(instance); if (value is int) { return (int)value; } return 0; } private static float GetFloat(FieldInfo field, object instance) { if (field == null || instance == null) { return 0f; } object value = field.GetValue(instance); if (value is float) { return (float)value; } return 0f; } private static void SetField(FieldInfo field, object instance, object value) { if (!(field == null) && instance != null) { field.SetValue(instance, value); } } private static TDelegate CreateDelegate(MethodInfo method) where TDelegate : Delegate { if (method == null) { return null; } return AccessTools.MethodDelegate(method, (object)null, true); } } internal sealed class ArenaBullet : MonoBehaviour { private static Material _playerTracerMaterial; private static Material _enemyTracerMaterial; private Vector3 _direction; private Vector3 _targetPosition; private float _life; private float _speed; private int _damage; private bool _visualOnly; public static void FireTracer(Vector3 origin, Vector3 direction, Vector3 endPoint) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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_0015: Unknown result type (might be due to invalid IL or missing references) ArenaBullet arenaBullet = CreateBullet(origin, direction, 0.1f, 0.28f, _playerTracerMaterial ?? (_playerTracerMaterial = CreateMaterial(Color.white))); arenaBullet._direction = ((Vector3)(ref direction)).normalized; arenaBullet._targetPosition = endPoint; arenaBullet._life = 1.4f; arenaBullet._speed = 48f; arenaBullet._visualOnly = true; } public static void FireDamaging(Vector3 origin, Vector3 direction, int damage) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: 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_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) ArenaBullet arenaBullet = CreateBullet(origin, direction, 0.14f, 0.22f, _enemyTracerMaterial ?? (_enemyTracerMaterial = CreateMaterial(new Color(1f, 0.3f, 0.5f)))); arenaBullet._direction = ((Vector3)(ref direction)).normalized; arenaBullet._life = 4f; arenaBullet._speed = 24f; arenaBullet._damage = damage; arenaBullet._visualOnly = false; } private void Update() { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) if (_life <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } if (_visualOnly) { float num = Mathf.Max(0.015f, _speed * Time.deltaTime); ((Component)this).transform.position = Vector3.MoveTowards(((Component)this).transform.position, _targetPosition, num); if (Vector3.Distance(((Component)this).transform.position, _targetPosition) <= 0.05f) { Object.Destroy((Object)(object)((Component)this).gameObject); } else { _life -= Time.deltaTime; } return; } float num2 = _speed * Time.deltaTime; int num3 = LayerMask.op_Implicit(SemiFunc.LayerMaskGetVisionObstruct()) | LayerMask.GetMask(new string[1] { "Player" }); RaycastHit val = default(RaycastHit); if (Physics.SphereCast(((Component)this).transform.position, 0.08f, _direction, ref val, num2, num3, (QueryTriggerInteraction)1)) { PlayerAvatar componentInParent = ((Component)((RaycastHit)(ref val)).collider).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent.playerHealth != (Object)null && !ArenaAccess.GetIsDisabled(componentInParent) && !ArenaAccess.GetDeadSet(componentInParent)) { componentInParent.playerHealth.HurtOther(_damage, ((RaycastHit)(ref val)).point, false, -1, false); } ((Component)this).transform.position = ((RaycastHit)(ref val)).point; Object.Destroy((Object)(object)((Component)this).gameObject); } else { Transform transform = ((Component)this).transform; transform.position += _direction * num2; _life -= Time.deltaTime; } } private static ArenaBullet CreateBullet(Vector3 origin, Vector3 direction, float radius, float trailTime, Material material) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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) //IL_004f: 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) GameObject obj = GameObject.CreatePrimitive((PrimitiveType)1); ((Object)obj).name = "Empress Arena Bullet"; obj.layer = 2; obj.transform.position = origin; obj.transform.rotation = Quaternion.LookRotation(((Vector3)(ref direction)).normalized, Vector3.up) * Quaternion.Euler(90f, 0f, 0f); obj.transform.localScale = new Vector3(radius, radius * 3.5f, radius); Collider component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { component.enabled = false; } Renderer component2 = obj.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.sharedMaterial = material; } TrailRenderer obj2 = obj.AddComponent(); obj2.time = trailTime; obj2.startWidth = radius * 1.1f; obj2.endWidth = 0f; ((Renderer)obj2).sharedMaterial = material; return obj.AddComponent(); } private static Material CreateMaterial(Color color) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0011: 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_003b: Unknown result type (might be due to invalid IL or missing references) Material val = new Material(Shader.Find("Standard")); val.color = color; if (val.HasProperty("_EmissionColor")) { val.EnableKeyword("_EMISSION"); val.SetColor("_EmissionColor", color * 3.5f); } return val; } } internal static class ArenaLevelRegistry { private static readonly FieldRef LevelContentLevelRef = AccessTools.FieldRefAccess("_level"); private static readonly FieldRef> LevelContentStartRoomsRef = AccessTools.FieldRefAccess>("_startRooms"); private static readonly FieldRef> LevelContentModulesNormal1Ref = AccessTools.FieldRefAccess>("_modulesNormal1"); private static readonly FieldRef> LevelContentModulesNormal2Ref = AccessTools.FieldRefAccess>("_modulesNormal2"); private static readonly FieldRef> LevelContentModulesNormal3Ref = AccessTools.FieldRefAccess>("_modulesNormal3"); private static readonly FieldRef> LevelContentModulesPassage1Ref = AccessTools.FieldRefAccess>("_modulesPassage1"); private static readonly FieldRef> LevelContentModulesPassage2Ref = AccessTools.FieldRefAccess>("_modulesPassage2"); private static readonly FieldRef> LevelContentModulesPassage3Ref = AccessTools.FieldRefAccess>("_modulesPassage3"); private static readonly FieldRef> LevelContentModulesDeadEnd1Ref = AccessTools.FieldRefAccess>("_modulesDeadEnd1"); private static readonly FieldRef> LevelContentModulesDeadEnd2Ref = AccessTools.FieldRefAccess>("_modulesDeadEnd2"); private static readonly FieldRef> LevelContentModulesDeadEnd3Ref = AccessTools.FieldRefAccess>("_modulesDeadEnd3"); private static readonly FieldRef> LevelContentModulesExtraction1Ref = AccessTools.FieldRefAccess>("_modulesExtraction1"); private static readonly FieldRef> LevelContentModulesExtraction2Ref = AccessTools.FieldRefAccess>("_modulesExtraction2"); private static readonly FieldRef> LevelContentModulesExtraction3Ref = AccessTools.FieldRefAccess>("_modulesExtraction3"); private static readonly FieldRef LevelContentConnectObjectRef = AccessTools.FieldRefAccess("_connectObject"); private static readonly FieldRef LevelContentBlockObjectRef = AccessTools.FieldRefAccess("_blockObject"); public static Level RegisterArenaLevel() { //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0199: 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) Level val = ScriptableObject.CreateInstance(); ((Object)val).name = "Level - Empress Final Hand"; val.NarrativeName = "Empress Final Hand"; LevelValuables val2 = ScriptableObject.CreateInstance(); ((Object)val2).name = "Valuables - Empress Final Hand"; val2.tiny = new List(); val2.small = new List(); val2.medium = new List(); val2.big = new List(); val2.wide = new List(); val2.tall = new List(); val2.veryTall = new List(); SetLevelField(val, "ModuleAmount", 0); SetLevelField(val, "PassageMaxAmount", 0); SetLevelField(val, "HasEnemies", false); SetLevelField(val, "ValuablePresets", new List { val2 }); SetLevelField(val, "AmbiencePresets", new List()); SetLevelField(val, "FogColor", (object)new Color(0.015f, 0.03f, 0.06f)); SetLevelField(val, "FogStartDistance", 5f); SetLevelField(val, "FogEndDistance", 70f); SetLevelField(val, "AmbientColor", (object)new Color(0.05f, 0.18f, 0.27f)); SetLevelField(val, "AmbientColorAdaptation", (object)new Color(0.02f, 0.06f, 0.11f)); SetLevelField(val, "ColorTemperature", -8f); SetLevelField(val, "ColorFilter", (object)new Color(0.78f, 0.95f, 1f, 1f)); SetLevelField(val, "BloomIntensity", 6.5f); SetLevelField(val, "BloomThreshold", 0.78f); SetLevelField(val, "VignetteColor", (object)new Color(0.01f, 0.03f, 0.06f, 1f)); SetLevelField(val, "VignetteIntensity", 0.32f); SetLevelField(val, "VignetteSmoothness", 0.78f); SetLevelField(val, "DiscordIcon", "level"); EnsureLevelFieldInstance(val, "LoadingGraphic01"); EnsureLevelFieldInstance(val, "LoadingGraphic02"); EnsureLevelFieldInstance(val, "LoadingGraphic03"); EnsureLevelFieldInstance(val, "ConnectObject"); EnsureLevelFieldInstance(val, "BlockObject"); LevelContent val3 = ScriptableObject.CreateInstance(); ((Object)val3).name = "Empress Final Hand Content"; LevelContentLevelRef.Invoke(val3) = val; LevelContentStartRoomsRef.Invoke(val3) = new List(); LevelContentModulesNormal1Ref.Invoke(val3) = new List(); LevelContentModulesNormal2Ref.Invoke(val3) = new List(); LevelContentModulesNormal3Ref.Invoke(val3) = new List(); LevelContentModulesPassage1Ref.Invoke(val3) = new List(); LevelContentModulesPassage2Ref.Invoke(val3) = new List(); LevelContentModulesPassage3Ref.Invoke(val3) = new List(); LevelContentModulesDeadEnd1Ref.Invoke(val3) = new List(); LevelContentModulesDeadEnd2Ref.Invoke(val3) = new List(); LevelContentModulesDeadEnd3Ref.Invoke(val3) = new List(); LevelContentModulesExtraction1Ref.Invoke(val3) = new List(); LevelContentModulesExtraction2Ref.Invoke(val3) = new List(); LevelContentModulesExtraction3Ref.Invoke(val3) = new List(); LevelContentConnectObjectRef.Invoke(val3) = null; LevelContentBlockObjectRef.Invoke(val3) = null; Levels.RegisterLevel(val3); return val; } private static void SetLevelField(Level level, string fieldName, object value) { FieldInfo fieldInfo = AccessTools.Field(typeof(Level), fieldName); if (!(fieldInfo == null) && value != null && fieldInfo.FieldType.IsInstanceOfType(value)) { fieldInfo.SetValue(level, value); } } private static void EnsureLevelFieldInstance(Level level, string fieldName) { FieldInfo fieldInfo = AccessTools.Field(typeof(Level), fieldName); if (!(fieldInfo == null) && fieldInfo.FieldType.IsClass && !(fieldInfo.FieldType == typeof(string)) && fieldInfo.GetValue(level) == null) { object uninitializedObject = FormatterServices.GetUninitializedObject(fieldInfo.FieldType); fieldInfo.SetValue(level, uninitializedObject); } } } [HarmonyPatch(typeof(RunManager), "SetRunLevel")] internal static class ArenaPatchRunManagerSetRunLevel { private static void Postfix(RunManager __instance) { if (EmpressFinalHandPlugin.Settings != null && EmpressFinalHandPlugin.Settings.ForceArenaLevel.Value && !((Object)(object)EmpressFinalHandPlugin.ArenaLevel == (Object)null)) { __instance.levelCurrent = EmpressFinalHandPlugin.ArenaLevel; } } } [HarmonyPatch(typeof(LevelGenerator), "Generate")] internal static class ArenaPatchLevelGeneratorGenerate { private static bool Prefix(LevelGenerator __instance, ref IEnumerator __result) { if (!EmpressFinalHandPlugin.IsArenaLevel(Object.op_Implicit((Object)(object)RunManager.instance) ? RunManager.instance.levelCurrent : null)) { return true; } __result = ArenaRuntime.EnsureHost().GenerateArenaLevel(__instance); return false; } } [HarmonyPatch(typeof(LevelPoint), "NavMeshCheck")] internal static class ArenaPatchLevelPointNavMeshCheck { private static bool Prefix(ref IEnumerator __result) { if (!EmpressFinalHandPlugin.IsArenaLevel(Object.op_Implicit((Object)(object)RunManager.instance) ? RunManager.instance.levelCurrent : null)) { return true; } __result = ArenaRuntime.EmptyCoroutine(); return false; } } [HarmonyPatch(typeof(EnvironmentDirector), "Setup")] internal static class ArenaPatchEnvironmentDirectorSetup { private static bool Prefix(EnvironmentDirector __instance) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0077: 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) if (!Object.op_Implicit((Object)(object)LevelGenerator.Instance)) { return true; } Level level = LevelGenerator.Instance.Level; if (!Object.op_Implicit((Object)(object)level) || !EmpressFinalHandPlugin.IsArenaLevel(level)) { return true; } ArenaAccess.SetEnvironmentFog(__instance, level.FogColor, level.FogStartDistance, level.FogEndDistance); ArenaAccess.SetEnvironmentAmbient(__instance, level.AmbientColor, level.AmbientColorAdaptation); RenderSettings.fogColor = level.FogColor; RenderSettings.fogStartDistance = level.FogStartDistance; RenderSettings.fogEndDistance = level.FogEndDistance; RenderSettings.ambientLight = level.AmbientColor; Camera val = ArenaAccess.GetEnvironmentMainCamera(__instance); if (!Object.op_Implicit((Object)(object)val)) { val = Camera.main; ArenaAccess.SetEnvironmentMainCamera(__instance, val); } if (Object.op_Implicit((Object)(object)val)) { val.backgroundColor = RenderSettings.fogColor; val.farClipPlane = RenderSettings.fogEndDistance + 4f; } ArenaAccess.SetEnvironmentDarkAdaptation(__instance, 0.1f); ArenaAccess.SetEnvironmentSetupDone(__instance, value: true); return false; } } [HarmonyPatch(typeof(LoadingUI), "LevelAnimationStart")] internal static class ArenaPatchLoadingUiLevelAnimationStart { private static void Postfix(LoadingUI __instance) { //IL_00e7: 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) if (!EmpressFinalHandPlugin.IsArenaLevel(Object.op_Implicit((Object)(object)LevelGenerator.Instance) ? LevelGenerator.Instance.Level : null)) { FinalHandLoadingScreen.Hide(__instance); return; } FinalHandLoadingScreen.Show(__instance); if ((Object)(object)__instance.levelNumberText != (Object)null) { ((TMP_Text)__instance.levelNumberText).text = "LEVEL " + ((!((Object)(object)RunManager.instance != (Object)null)) ? 1 : (RunManager.instance.levelsCompleted + 1)); ((Graphic)__instance.levelNumberText).color = new Color(0.36f, 0.94f, 1f); ((Component)__instance.levelNumberText).gameObject.SetActive(true); ((TMP_Text)__instance.levelNumberText).transform.SetAsLastSibling(); } if ((Object)(object)__instance.levelNameText != (Object)null) { ((TMP_Text)__instance.levelNameText).text = "Empress Final Hand"; ((Graphic)__instance.levelNameText).color = new Color(1f, 0.4f, 0.55f); ((Component)__instance.levelNameText).gameObject.SetActive(true); ((TMP_Text)__instance.levelNameText).transform.SetAsLastSibling(); } } } [HarmonyPatch(typeof(LoadingUI), "StopLoading")] internal static class ArenaPatchLoadingUiStopLoading { private static void Prefix(LoadingUI __instance) { FinalHandLoadingScreen.Hide(__instance); } } [HarmonyPatch(typeof(LoadingUI), "PlayTurn")] internal static class ArenaPatchLoadingUiPlayTurn { [HarmonyPriority(800)] private static bool Prefix() { return !FinalHandLoadingScreen.OwnsCurrentLoading(); } } [HarmonyPatch(typeof(LoadingUI), "PlayRevUp")] internal static class ArenaPatchLoadingUiPlayRevUp { [HarmonyPriority(800)] private static bool Prefix() { return !FinalHandLoadingScreen.OwnsCurrentLoading(); } } [HarmonyPatch(typeof(LoadingUI), "PlayCrash")] internal static class ArenaPatchLoadingUiPlayCrash { [HarmonyPriority(800)] private static bool Prefix() { return !FinalHandLoadingScreen.OwnsCurrentLoading(); } } [HarmonyPatch(typeof(ItemGun), "Shoot")] internal static class ArenaPatchItemGunShoot { private static void Postfix(ItemGun __instance, bool __result) { if (__result) { ArenaRuntime instance = ArenaRuntime.Instance; if ((Object)(object)instance != (Object)null && instance.Active) { instance.HandlePlayerShot(__instance); } } } } [HarmonyPatch(typeof(ItemManager), "TurnOffIconLights")] internal static class ArenaPatchItemManagerTurnOffIconLights { private static bool Prefix(ItemManager __instance, ref IEnumerator __result) { if (!EmpressFinalHandPlugin.IsArenaLevel(Object.op_Implicit((Object)(object)RunManager.instance) ? RunManager.instance.levelCurrent : null)) { return true; } __result = SafeTurnOffIconLights(__instance); return false; } private static IEnumerator SafeTurnOffIconLights(ItemManager itemManager) { if ((Object)(object)itemManager.itemIconLights == (Object)null) { yield break; } if (SemiFunc.RunIsShop() || SemiFunc.MenuLevel()) { itemManager.itemIconLights.SetActive(false); yield break; } while ((Object)(object)LevelGenerator.Instance == (Object)null || !LevelGenerator.Instance.Generated) { yield return (object)new WaitForSeconds(0.2f); } while (itemManager.spawnedItems != null) { itemManager.spawnedItems.RemoveAll((ItemAttributes item) => (Object)(object)item == (Object)null); bool flag = false; for (int num = 0; num < itemManager.spawnedItems.Count; num++) { ItemAttributes val = itemManager.spawnedItems[num]; if ((Object)(object)val != (Object)null && !ArenaAccess.GetItemHasIcon(val)) { flag = true; break; } } if (!flag) { break; } yield return (object)new WaitForSeconds(0.2f); } itemManager.itemIconLights.SetActive(false); } } internal sealed class ArenaRuntime : MonoBehaviour { private const float PlatformWidth = 34f; private const float PlatformDepth = 26f; private const float PlatformThickness = 1.2f; private const float DeathPlaneY = -8f; private readonly List _spawnLocations = new List(); private readonly ArenaWeaponService _weaponService = new ArenaWeaponService(); private readonly Dictionary _gunAssignments = new Dictionary(); private AudioSource _musicSource; private Transform _arenaRoot; private Transform _bossHolder; private HandBoss _boss; private Vector3 _platformCenter; private bool _active; private bool _won; private float _exitTimer; private float _bossBroadcastTimer; private int _sceneHandle = -1; private LevelGenerator _generator; private PhysGrabObject _localGun; private float _grabRetryTimer; public static ArenaRuntime Instance { get; private set; } public bool Active => _active; public static ArenaRuntime EnsureHost() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown if ((Object)(object)Instance != (Object)null) { return Instance; } GameObject val = new GameObject("Empress Final Hand Runtime"); val.transform.parent = null; ((Object)val).hideFlags = (HideFlags)61; Object.DontDestroyOnLoad((Object)val); Instance = val.AddComponent(); return Instance; } public static IEnumerator EmptyCoroutine() { yield break; } private void Awake() { Instance = this; EnsureMusicSource(); } private void EnsureMusicSource() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown if (!((Object)(object)_musicSource != (Object)null)) { GameObject val = new GameObject("Empress Final Hand Music"); val.transform.SetParent(((Component)this).transform, false); _musicSource = val.AddComponent(); _musicSource.playOnAwake = false; _musicSource.loop = true; _musicSource.spatialBlend = 0f; _musicSource.volume = 0.3f; _musicSource.priority = 0; } } private void StartMusic() { EnsureMusicSource(); if ((Object)(object)_musicSource == (Object)null) { return; } AudioClip musicClip = HandAudio.MusicClip; if (!((Object)(object)musicClip == (Object)null)) { if ((Object)(object)_musicSource.clip != (Object)(object)musicClip) { _musicSource.clip = musicClip; } HandAudio.ConfigureMusicSource(_musicSource); if (!_musicSource.isPlaying) { _musicSource.Play(); } } } private void StopMusic() { if ((Object)(object)_musicSource != (Object)null && _musicSource.isPlaying) { _musicSource.Stop(); } } private void Update() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Invalid comparison between Unknown and I4 HandleSceneTransition(); if (!_active) { return; } if (!EmpressFinalHandPlugin.IsArenaLevel(Object.op_Implicit((Object)(object)RunManager.instance) ? RunManager.instance.levelCurrent : null)) { Deactivate(); } else { if (!((Object)(object)LevelGenerator.Instance != (Object)null) || !LevelGenerator.Instance.Generated || !((Object)(object)GameDirector.instance != (Object)null) || (int)GameDirector.instance.currentState != 2 || !IsLoadingFinished() || !ArenaAccess.GetAllPlayersReady(LevelGenerator.Instance)) { return; } float deltaTime = Time.deltaTime; bool flag = SemiFunc.IsMasterClientOrSingleplayer(); if (_boss != null) { if (flag) { _boss.HostTick(deltaTime, PlayablePlayers()); BroadcastBossState(deltaTime); } else { _boss.ClientTick(deltaTime); } } _weaponService.Update(); TryGrabLocalGun(); KeepOnPlatform(); RefillLocalEnergy(); StartMusic(); if (flag) { CheckWin(); AdvanceAfterWin(deltaTime); } } } private void LateUpdate() { if (_active && Time.timeScale != 1f) { Time.timeScale = 1f; } } private bool IsLoadingFinished() { LoadingUI instance = LoadingUI.instance; if ((Object)(object)instance == (Object)null) { return true; } if (((Component)instance).gameObject.activeInHierarchy) { return false; } return ArenaAccess.GetLevelAnimationCompleted(instance); } public void HandlePlayerShot(ItemGun gun) { //IL_002f: 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_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_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_0068: 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_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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0143: 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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) if (!_active || (Object)(object)gun == (Object)null) { return; } Transform obj = (((Object)(object)gun.gunMuzzle != (Object)null) ? gun.gunMuzzle : ((Component)gun).transform); Vector3 position = obj.position; Vector3 val = obj.forward; if (((Vector3)(ref val)).sqrMagnitude <= 0.001f) { val = Vector3.forward; } val = ((Vector3)(ref val)).normalized; float num = Mathf.Max(40f, gun.gunRange); int num2 = LayerMask.op_Implicit(SemiFunc.LayerMaskGetVisionObstruct()); float num3 = num; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(position, val, ref val2, num, num2, (QueryTriggerInteraction)1)) { num3 = ((RaycastHit)(ref val2)).distance; } int num4 = LayerMask.NameToLayer("Enemy"); int num5 = ((num4 >= 0) ? (1 << num4) : 0); HandWeakSpot handWeakSpot = null; float num6 = num3; RaycastHit val3 = default(RaycastHit); if (num5 != 0 && Physics.Raycast(position, val, ref val3, num3 + 200f, num5, (QueryTriggerInteraction)1)) { HandWeakSpot componentInParent = ((Component)((RaycastHit)(ref val3)).collider).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && !componentInParent.Destroyed) { handWeakSpot = componentInParent; num6 = ((RaycastHit)(ref val3)).distance; } } Vector3 val4 = position + val * num6; if ((Object)(object)handWeakSpot != (Object)null) { if (SemiFunc.IsMasterClientOrSingleplayer()) { if (_boss != null) { _boss.RegisterHit(handWeakSpot.Index); } } else { EmpressFinalHandPlugin.RaiseBossHit(handWeakSpot.Index); } } Vector3 val5 = val4 - position; ArenaBullet.FireTracer(position, ((Vector3)(ref val5)).normalized, val4); } public IEnumerator GenerateArenaLevel(LevelGenerator generator) { _generator = generator; EmpressFinalHandPlugin.EnsurePhotonEventHooked(); yield return (object)new WaitForSeconds(0.2f); if (!SemiFunc.IsMultiplayer()) { ArenaAccess.SetAllPlayersReady(generator, value: true); } while (!ArenaAccess.GetAllPlayersReady(generator)) { generator.State = (LevelState)1; yield return (object)new WaitForSeconds(0.1f); } yield return (object)new WaitForSeconds(0.2f); generator.Level = RunManager.instance.levelCurrent; ArenaAccess.SetLevelPrevious(RunManager.instance, generator.Level); generator.Generated = false; ArenaAccess.SetEnemyReady(generator, value: true); ArenaAccess.SetModulesSpawned(generator, 0); ArenaAccess.SetPlayerSpawnedCount(generator, 0); generator.LevelPathPoints = new List(); generator.LevelPathTruck = null; if (Object.op_Implicit((Object)(object)ValuableDirector.instance)) { ArenaAccess.SetValuableSetupComplete(ValuableDirector.instance, value: true); ArenaAccess.SetValuableValuablesSpawned(ValuableDirector.instance, value: true); } if (Object.op_Implicit((Object)(object)RoundDirector.instance)) { ArenaAccess.ResetRoundExtraction(RoundDirector.instance); } generator.State = (LevelState)3; BuildArena(generator); ArenaRuntime arenaRuntime = this; Scene activeScene = SceneManager.GetActiveScene(); arenaRuntime._sceneHandle = ((Scene)(ref activeScene)).handle; yield return (object)new WaitForSeconds(0.2f); if (Object.op_Implicit((Object)(object)EnvironmentDirector.Instance)) { EnvironmentDirector.Instance.Setup(); } if (Object.op_Implicit((Object)(object)PostProcessing.Instance)) { PostProcessing.Instance.Setup(); } if (Object.op_Implicit((Object)(object)LevelMusic.instance)) { LevelMusic.instance.Setup(); } if (Object.op_Implicit((Object)(object)ConstantMusic.instance)) { ConstantMusic.instance.Setup(); } if (SemiFunc.IsMasterClientOrSingleplayer()) { NavMeshSurface component = ((Component)generator).GetComponent(); if ((Object)(object)component != (Object)null) { component.collectObjects = (CollectObjects)0; component.useGeometry = (NavMeshCollectGeometry)1; component.layerMask = LayerMask.op_Implicit(-1); component.defaultArea = 0; } generator.NavMeshSetup(); yield return null; while ((Object)(object)GameDirector.instance == (Object)null || GameDirector.instance.PlayerList.Count == 0) { generator.State = (LevelState)12; yield return (object)new WaitForSeconds(0.1f); } generator.PlayerSpawn(); yield return null; while (ArenaAccess.GetPlayerSpawnedCount(generator) < GameDirector.instance.PlayerList.Count) { generator.State = (LevelState)13; yield return (object)new WaitForSeconds(0.1f); } if (SemiFunc.IsMultiplayer()) { generator.PhotonView.RPC("GenerateDone", (RpcTarget)3, Array.Empty()); } else { ArenaAccess.GenerateDone(generator); } } else { while (!generator.Generated) { yield return (object)new WaitForSeconds(0.1f); } } yield return (object)new WaitForSeconds(0.4f); Activate(); } private void Activate() { _active = true; _won = false; _exitTimer = 0f; _weaponService.Activate(); StartMusic(); SpawnBoss(); } private void Deactivate() { if (_active) { _active = false; _won = false; _exitTimer = 0f; _weaponService.Reset(); _gunAssignments.Clear(); _localGun = null; if (_boss != null) { _boss.Dispose(); } _boss = null; StopMusic(); } } private void HandleSceneTransition() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); int handle = ((Scene)(ref activeScene)).handle; if (handle != _sceneHandle) { _sceneHandle = handle; _arenaRoot = null; _bossHolder = null; _generator = null; _active = false; _won = false; _exitTimer = 0f; _spawnLocations.Clear(); _weaponService.Reset(); _gunAssignments.Clear(); _localGun = null; if (_boss != null) { _boss.Dispose(); } _boss = null; StopMusic(); } } private void SpawnBoss() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (_boss == null && !((Object)(object)_bossHolder == (Object)null)) { _boss = HandBoss.Create(_bossHolder, _platformCenter, EmpressFinalHandPlugin.Settings.WeakSpotHealth.Value); } } private void BroadcastBossState(float dt) { if (SemiFunc.IsMultiplayer() && _boss != null) { _bossBroadcastTimer -= dt; if (!(_bossBroadcastTimer > 0f)) { _bossBroadcastTimer = 0.08f; EmpressFinalHandPlugin.RaiseBossState(_boss.GetState()); } } } internal void ReceiveBossState(object[] data) { if (!SemiFunc.IsMasterClientOrSingleplayer() && _boss != null) { _boss.ApplyState(data); } } internal void ReceiveBossHit(int index) { if (SemiFunc.IsMasterClientOrSingleplayer() && _boss != null) { _boss.RegisterHit(index); } } private void CheckWin() { if (!_won && _boss != null && _boss.DeathComplete) { _won = true; _exitTimer = Mathf.Max(1f, EmpressFinalHandPlugin.Settings.ExitDelaySeconds.Value); AwardVictory(); EmpressFinalHandPlugin.Log.LogInfo((object)"Empress Final Hand boss destroyed. Transitioning shortly."); } } private void AwardVictory() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) int num = Random.Range(40, 51); SemiFunc.StatSetRunCurrency(SemiFunc.StatGetRunCurrency() + num); SemiFunc.StatSetRunTotalHaul(SemiFunc.StatGetRunTotalHaul() + num); if ((Object)(object)CurrencyUI.instance != (Object)null) { CurrencyUI.instance.FetchCurrency(); } SemiFunc.UIFocusText("THE HAND IS DESTROYED\nTeam earns $" + num + "K", new Color(1f, 0.4f, 0.5f), Color.white, 5f); } private void AdvanceAfterWin(float dt) { if (!_won || _exitTimer > 900f) { return; } _exitTimer -= dt; if (!(_exitTimer > 0f)) { _exitTimer = 999f; Time.timeScale = 1f; if ((Object)(object)RunManager.instance != (Object)null && EmpressFinalHandPlugin.IsArenaLevel(RunManager.instance.levelCurrent)) { RunManager.instance.ChangeLevel(true, false, (ChangeLevelType)0); } } } private void KeepOnPlatform() { //IL_0016: 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_0043: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) PlayerController instance = PlayerController.instance; if (!((Object)(object)instance == (Object)null) && !(((Component)instance).transform.position.y >= _platformCenter.y + -8f)) { Vector3 val = ((_spawnLocations.Count > 0) ? _spawnLocations[Random.Range(0, _spawnLocations.Count)] : (_platformCenter + Vector3.up * 0.5f)); val += Vector3.up * 0.5f; ((Component)instance).transform.position = val; if ((Object)(object)instance.rb != (Object)null) { instance.rb.position = val; instance.rb.velocity = Vector3.zero; } } } private void RefillLocalEnergy() { PlayerController instance = PlayerController.instance; if ((Object)(object)instance != (Object)null) { instance.EnergyCurrent = instance.EnergyStart; } } private List PlayablePlayers() { List list = new List(); if ((Object)(object)GameDirector.instance != (Object)null && GameDirector.instance.PlayerList != null) { for (int i = 0; i < GameDirector.instance.PlayerList.Count; i++) { PlayerAvatar val = GameDirector.instance.PlayerList[i]; if ((Object)(object)val != (Object)null && !ArenaAccess.GetIsDisabled(val) && !ArenaAccess.GetDeadSet(val)) { list.Add(val); } } } return list; } public void AssignLocalGun(PhysGrabObject grab) { _localGun = grab; _grabRetryTimer = 0f; } internal void ReceiveGunAssigned(int avatarViewId, int gunViewId) { _gunAssignments[avatarViewId] = gunViewId; } private void TryGrabLocalGun() { _grabRetryTimer -= Time.unscaledDeltaTime; if (_grabRetryTimer > 0f) { return; } _grabRetryTimer = 0.3f; PhysGrabObject val = ResolveLocalGun(); if (!((Object)(object)val == (Object)null)) { PhysGrabber instance = PhysGrabber.instance; if (!((Object)(object)instance == (Object)null)) { instance.OverrideGrab(val, 0.45f, false); } } } private PhysGrabObject ResolveLocalGun() { if ((Object)(object)_localGun != (Object)null) { return _localGun; } if (!SemiFunc.IsMultiplayer()) { return null; } PlayerController instance = PlayerController.instance; PlayerAvatar val = (((Object)(object)instance != (Object)null) ? instance.playerAvatarScript : null); if ((Object)(object)val == (Object)null || (Object)(object)val.photonView == (Object)null) { return null; } int viewID = val.photonView.ViewID; if (!_gunAssignments.TryGetValue(viewID, out var value)) { return null; } PhotonView val2 = PhotonView.Find(value); if ((Object)(object)val2 == (Object)null) { return null; } PhysGrabObject val3 = ((Component)val2).GetComponent() ?? ((Component)val2).GetComponentInChildren(true); if ((Object)(object)val3 != (Object)null) { _localGun = val3; } return val3; } private void BuildArena(LevelGenerator generator) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_008b: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00db: 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_00f2: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Expected O, but got Unknown if ((Object)(object)generator.LevelParent != (Object)null) { for (int num = generator.LevelParent.transform.childCount - 1; num >= 0; num--) { Object.Destroy((Object)(object)((Component)generator.LevelParent.transform.GetChild(num)).gameObject); } } _spawnLocations.Clear(); GameObject val = new GameObject("Empress Final Hand Root"); val.transform.SetParent(generator.LevelParent.transform, false); _arenaRoot = val.transform; _platformCenter = val.transform.position; GameObject val2 = new GameObject("Empress Final Hand Module"); val2.transform.SetParent(val.transform, false); val2.AddComponent().ObservedComponents = new List(); ArenaAccess.ConfigureStartRoomModule(val2.AddComponent(), 0, 0); val2.AddComponent(); GameObject val3 = new GameObject("Empress Final Hand Room Volume"); val3.transform.SetParent(val2.transform, false); RoomVolume roomVolume = val3.AddComponent(); BoxCollider obj = val3.AddComponent(); ((Collider)obj).isTrigger = true; obj.size = new Vector3(74f, 60f, 66f); obj.center = new Vector3(0f, 20f, 0f); ArenaMaterials.EnsureCreated(); BuildPlatform(val2.transform); BuildLights(val2.transform); BuildSpawnPoints(val2.transform, roomVolume, generator); GameObject val4 = new GameObject("Empress Final Hand Boss"); val4.transform.SetParent(val.transform, false); _bossHolder = val4.transform; } private void BuildPlatform(Transform parent) { //IL_0015: 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_004e: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: 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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: 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) CreateBox(parent, "Platform", new Vector3(0f, -0.6f, 0f), new Vector3(34f, 1.2f, 26f), ArenaMaterials.FloorMaterial); CreateBox(parent, "Platform Underside", new Vector3(0f, -2.7f, 0f), new Vector3(30f, 2.4f, 22f), ArenaMaterials.PillarMaterial); float num = 0.5f; CreateDecoration(parent, "Edge North", new Vector3(0f, 0.06f, 13f - num * 0.5f), new Vector3(34f, 0.12f, num), ArenaMaterials.TrimMaterial); CreateDecoration(parent, "Edge South", new Vector3(0f, 0.06f, -13f + num * 0.5f), new Vector3(34f, 0.12f, num), ArenaMaterials.TrimMaterial); CreateDecoration(parent, "Edge East", new Vector3(17f - num * 0.5f, 0.06f, 0f), new Vector3(num, 0.12f, 26f), ArenaMaterials.TrimMaterial); CreateDecoration(parent, "Edge West", new Vector3(-17f + num * 0.5f, 0.06f, 0f), new Vector3(num, 0.12f, 26f), ArenaMaterials.TrimMaterial); float num2 = Mathf.Floor(3.4f) * 5f; for (float num3 = 0f - num2; num3 <= num2 + 0.01f; num3 += 5f) { CreateDecoration(parent, "Grid X", new Vector3(num3, 0.04f, 0f), new Vector3(0.06f, 0.02f, 25f), ArenaMaterials.GridMaterial); } float num4 = Mathf.Floor(2.6f) * 5f; for (float num5 = 0f - num4; num5 <= num4 + 0.01f; num5 += 5f) { CreateDecoration(parent, "Grid Z", new Vector3(0f, 0.04f, num5), new Vector3(33f, 0.02f, 0.06f), ArenaMaterials.GridMaterial); } } private void BuildLights(Transform parent) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_007d: 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_00b8: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Empress Final Hand Key Light"); val.transform.SetParent(parent, false); val.transform.localRotation = Quaternion.Euler(58f, 20f, 0f); Light obj = val.AddComponent(); obj.type = (LightType)1; obj.color = new Color(0.6f, 0.7f, 1f); obj.intensity = 0.85f; GameObject val2 = new GameObject("Empress Final Hand Rim Light"); val2.transform.SetParent(parent, false); val2.transform.localPosition = new Vector3(0f, 16f, 0f); Light obj2 = val2.AddComponent(); obj2.type = (LightType)2; obj2.color = new Color(1f, 0.35f, 0.5f); obj2.intensity = 2.4f; obj2.range = 44f; } private void BuildSpawnPoints(Transform parent, RoomVolume roomVolume, LevelGenerator generator) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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_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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00da: 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_0106: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) Vector3[] array = (Vector3[])(object)new Vector3[6] { new Vector3(-4f, 0.3f, -9f), new Vector3(0f, 0.3f, -9f), new Vector3(4f, 0.3f, -9f), new Vector3(-4f, 0.3f, -6f), new Vector3(0f, 0.3f, -6f), new Vector3(4f, 0.3f, -6f) }; foreach (Vector3 val in array) { GameObject val2 = new GameObject("Empress Final Hand Spawn"); val2.transform.SetParent(parent, false); val2.transform.localPosition = val; val2.transform.localRotation = Quaternion.LookRotation(Vector3.forward, Vector3.up); val2.AddComponent(); _spawnLocations.Add(_arenaRoot.TransformPoint(val)); } LevelPoint val3 = CreateLevelPoint(parent, roomVolume, generator, new Vector3(0f, 0.3f, -7.5f), truck: true); LevelPoint val4 = CreateLevelPoint(parent, roomVolume, generator, new Vector3(0f, 0.3f, 0f), truck: false); val3.ConnectedPoints = new List { val4 }; val4.ConnectedPoints = new List { val3 }; } private static LevelPoint CreateLevelPoint(Transform parent, RoomVolume roomVolume, LevelGenerator generator, Vector3 localPosition, bool truck) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_0033: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Empress Final Hand Level Point") { layer = LayerMask.NameToLayer("Other") }; val.transform.SetParent(parent, false); val.transform.localPosition = localPosition; SphereCollider obj = val.AddComponent(); ((Collider)obj).isTrigger = true; obj.radius = 0.35f; LevelPoint obj2 = val.AddComponent(); obj2.ConnectedPoints = new List(); obj2.Room = roomVolume; obj2.Truck = truck; obj2.ModuleConnect = false; ArenaAccess.MarkLevelPointInStartRoom(obj2, value: true); if (generator.LevelPathPoints == null) { generator.LevelPathPoints = new List(); } return obj2; } private static GameObject CreateBox(Transform parent, string name, Vector3 position, Vector3 size, Material material) { //IL_0020: 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_003c: Unknown result type (might be due to invalid IL or missing references) GameObject obj = GameObject.CreatePrimitive((PrimitiveType)3); ((Object)obj).name = name; obj.transform.SetParent(parent, false); obj.transform.localPosition = position; obj.transform.localRotation = Quaternion.identity; obj.transform.localScale = size; MeshRenderer component = obj.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)material != (Object)null) { ((Renderer)component).sharedMaterial = material; } return obj; } private static GameObject CreateDecoration(Transform parent, string name, Vector3 position, Vector3 size, Material material) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) GameObject obj = CreateBox(parent, name, position, size, material); Collider component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } return obj; } } internal static class ArenaMaterials { public static Material FloorMaterial { get; private set; } public static Material TrimMaterial { get; private set; } public static Material GridMaterial { get; private set; } public static Material PillarMaterial { get; private set; } public static void EnsureCreated() { //IL_0028: 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_006a: 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_00ac: 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_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) if (!((Object)(object)FloorMaterial != (Object)null)) { Shader shader = Shader.Find("Standard"); FloorMaterial = CreateMaterial(shader, new Color(0.03f, 0.04f, 0.07f), new Color(0.04f, 0.1f, 0.2f), 0.5f, 0.7f, 0.3f); TrimMaterial = CreateMaterial(shader, new Color(0.92f, 0.18f, 0.42f), new Color(1f, 0.3f, 0.55f), 3.4f, 1f, 0.2f); GridMaterial = CreateMaterial(shader, new Color(0.1f, 0.4f, 0.75f), new Color(0.14f, 0.55f, 0.95f), 2f, 1f, 0.18f); PillarMaterial = CreateMaterial(shader, new Color(0.02f, 0.02f, 0.04f), Color.black, 0f, 0.4f, 0.2f); } } private static Material CreateMaterial(Shader shader, Color baseColor, Color emissionColor, float emissionStrength, float smoothness, float metallic) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: 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_0074: Unknown result type (might be due to invalid IL or missing references) Material val = new Material(shader); val.color = baseColor; if (val.HasProperty("_Glossiness")) { val.SetFloat("_Glossiness", Mathf.Clamp01(smoothness)); } if (val.HasProperty("_Metallic")) { val.SetFloat("_Metallic", Mathf.Clamp01(metallic)); } if (emissionStrength > 0f && val.HasProperty("_EmissionColor")) { val.EnableKeyword("_EMISSION"); val.SetColor("_EmissionColor", emissionColor * emissionStrength); val.globalIlluminationFlags = (MaterialGlobalIlluminationFlags)1; } return val; } } internal sealed class ArenaWeaponService { private sealed class Loadout { public PlayerAvatar Avatar; public string SteamId; public string InstanceName; public int Spot; public ItemGun Gun; public ItemAttributes Attributes; public PhysGrabObject GrabObject; } private readonly Dictionary _loadouts = new Dictionary(StringComparer.Ordinal); private float _retryTimer; private bool _active; public void Activate() { _active = true; _retryTimer = 0f; } public void Reset() { _active = false; _retryTimer = 0f; _loadouts.Clear(); } public void Update() { if (!_active || !SemiFunc.IsMasterClientOrSingleplayer()) { return; } _retryTimer -= Time.unscaledDeltaTime; if (_retryTimer > 0f) { MaintainExisting(); return; } _retryTimer = 1.5f; StatsManager instance = StatsManager.instance; if ((Object)(object)instance == (Object)null) { return; } Item val = FindHandgunItem(instance); if ((Object)(object)val == (Object)null) { return; } PrefabRef prefab = val.prefab; if (prefab == null) { return; } string resourcePath = prefab.ResourcePath; GameObject prefab2 = prefab.Prefab; if (string.IsNullOrEmpty(resourcePath) && (Object)(object)prefab2 == (Object)null) { return; } GameDirector instance2 = GameDirector.instance; if ((Object)(object)instance2 == (Object)null || instance2.PlayerList == null) { return; } foreach (PlayerAvatar player in instance2.PlayerList) { if ((Object)(object)player == (Object)null) { continue; } string steamId = ArenaAccess.GetSteamId(player); if (string.IsNullOrEmpty(steamId)) { continue; } if (_loadouts.TryGetValue(steamId, out var value) && (Object)(object)value.Gun != (Object)null) { MaintainLoadout(value); continue; } if (value == null) { value = new Loadout { Avatar = player, SteamId = steamId }; _loadouts[steamId] = value; } TrySpawnAndEquip(value, val, prefab, resourcePath, prefab2, instance); } } private void MaintainExisting() { foreach (Loadout value in _loadouts.Values) { if (!((Object)(object)value.Gun == (Object)null)) { MaintainLoadout(value); } } } private void TrySpawnAndEquip(Loadout loadout, Item handgun, PrefabRef prefab, string resourcePath, GameObject prefabObject, StatsManager stats) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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_0070: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) PlayerAvatar avatar = loadout.Avatar; if ((Object)(object)avatar == (Object)null) { return; } Transform transform = ((Component)avatar).transform; Vector3 forward = transform.forward; forward.y = 0f; if (((Vector3)(ref forward)).sqrMagnitude < 0.001f) { forward = Vector3.forward; } Vector3 val = transform.position + ((Vector3)(ref forward)).normalized * 0.8f + Vector3.up * 0.8f; Quaternion val2 = Quaternion.LookRotation(((Vector3)(ref forward)).normalized, Vector3.up); int num = FindFreeSpotForPlayer(stats, loadout.SteamId); if (num < 0) { return; } string text = PredictNextInstanceName(stats, ((Object)handgun).name); stats.SetBatteryLevel(text, 100); ReserveInventorySpot(stats, PunManager.instance, loadout.SteamId, text, num); GameObject val3 = null; if (SemiFunc.IsMultiplayer() && !string.IsNullOrEmpty(resourcePath)) { val3 = PhotonNetwork.InstantiateRoomObject(resourcePath, val, val2, (byte)0, (object[])null); } else if ((Object)(object)prefabObject != (Object)null) { val3 = Object.Instantiate(prefabObject, val, val2); } if ((Object)(object)val3 == (Object)null) { return; } loadout.Gun = val3.GetComponent() ?? val3.GetComponentInChildren(true); if (!((Object)(object)loadout.Gun == (Object)null)) { loadout.Attributes = val3.GetComponent() ?? val3.GetComponentInChildren(true); loadout.GrabObject = val3.GetComponent() ?? val3.GetComponentInChildren(true); loadout.InstanceName = text; loadout.Spot = num; PunManager instance = PunManager.instance; if ((Object)(object)instance != (Object)null && (Object)(object)loadout.Attributes != (Object)null) { instance.SetItemName(text, loadout.Attributes, PhotonViewId((Component)(object)loadout.Attributes)); } ItemEquippable val4 = val3.GetComponent() ?? val3.GetComponentInChildren(true); if ((Object)(object)val4 != (Object)null) { val4.RequestEquip(num, PhotonViewId((Component)(object)avatar)); } ConfigureGun(loadout.Gun); ChargeGun(loadout, stats); AnnounceGunAssignment(loadout, avatar); } } private void MaintainLoadout(Loadout loadout) { if ((Object)(object)loadout.Avatar == (Object)null || (Object)(object)loadout.Gun == (Object)null) { return; } ItemAttributes attributes = loadout.Attributes; if ((Object)(object)attributes != (Object)null) { string itemInstanceName = ArenaAccess.GetItemInstanceName(attributes); if (!string.IsNullOrEmpty(itemInstanceName)) { loadout.InstanceName = itemInstanceName; } } ConfigureGun(loadout.Gun); ChargeGun(loadout, StatsManager.instance); AnnounceGunAssignment(loadout, loadout.Avatar); } private static void ConfigureGun(ItemGun gun) { if (!((Object)(object)gun == (Object)null)) { gun.shootCooldown = 0.12f; gun.shootTime = 0.04f; gun.batteryDrain = 0f; gun.batteryDrainFullBar = false; } } private static void ChargeGun(Loadout loadout, StatsManager stats) { if (!((Object)(object)loadout.Gun == (Object)null)) { if ((Object)(object)stats != (Object)null && !string.IsNullOrEmpty(loadout.InstanceName)) { stats.SetBatteryLevel(loadout.InstanceName, 100); } ItemBattery val = ArenaAccess.GetGunBattery(loadout.Gun) ?? ((Component)loadout.Gun).GetComponent(); if (!((Object)(object)val == (Object)null)) { val.batteryLife = 100f; ArenaAccess.SetItemBatteryLifeInt(val, val.batteryBars); } } } private void AnnounceGunAssignment(Loadout loadout, PlayerAvatar avatar) { if ((Object)(object)loadout.GrabObject == (Object)null || (Object)(object)avatar == (Object)null) { return; } ArenaRuntime instance = ArenaRuntime.Instance; if ((Object)(object)instance == (Object)null) { return; } if (ArenaAccess.GetIsLocal(avatar)) { instance.AssignLocalGun(loadout.GrabObject); } if (SemiFunc.IsMultiplayer() && !((Object)(object)avatar.photonView == (Object)null) && !((Object)(object)loadout.GrabObject == (Object)null)) { PhotonView component = ((Component)loadout.GrabObject).GetComponent(); if (!((Object)(object)component == (Object)null)) { EmpressFinalHandPlugin.RaiseGunAssigned(avatar.photonView.ViewID, component.ViewID); } } } private static int FindFreeSpotForPlayer(StatsManager stats, string steamId) { for (int i = 0; i < 3; i++) { Dictionary dictionary = i switch { 1 => stats.playerInventorySpot2Taken, 0 => stats.playerInventorySpot1Taken, _ => stats.playerInventorySpot3Taken, }; if (dictionary == null) { return i; } if (!dictionary.TryGetValue(steamId, out var value) || value == 0) { return i; } } return -1; } private static string PredictNextInstanceName(StatsManager stats, string itemName) { int num = 1; Dictionary item = stats.item; if (item == null) { return itemName + "/" + num; } foreach (string key in item.Keys) { if (!string.IsNullOrEmpty(key) && key.Contains("/")) { string[] array = key.Split('/'); if (array.Length == 2 && !(array[0] != itemName) && int.TryParse(array[1], out var result) && result >= num) { num = result + 1; } } } return itemName + "/" + num; } private static void ReserveInventorySpot(StatsManager stats, PunManager pun, string steamId, string instanceName, int spot) { string text = spot switch { 1 => "playerInventorySpot2", 0 => "playerInventorySpot1", _ => "playerInventorySpot3", }; int hashCode = instanceName.GetHashCode(); stats.DictionaryUpdateValue(text, steamId, hashCode); if ((Object)(object)pun != (Object)null) { pun.UpdateStat(text, steamId, hashCode); } ((Dictionary)(spot switch { 1 => stats.playerInventorySpot2Taken, 0 => stats.playerInventorySpot1Taken, _ => stats.playerInventorySpot3Taken, }))?.Remove(steamId); } private static Item FindHandgunItem(StatsManager stats) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Invalid comparison between Unknown and I4 //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Invalid comparison between Unknown and I4 Dictionary itemDictionary = stats.itemDictionary; if (itemDictionary == null) { return null; } foreach (KeyValuePair item in itemDictionary) { Item value = item.Value; if (!((Object)(object)value == (Object)null) && !value.disabled && (int)value.itemType == 9) { string obj = item.Key ?? string.Empty; string text = value.itemName ?? string.Empty; string text2 = ((Object)value).name ?? string.Empty; if (obj.IndexOf("handgun", StringComparison.OrdinalIgnoreCase) >= 0 || text.IndexOf("handgun", StringComparison.OrdinalIgnoreCase) >= 0 || text2.IndexOf("handgun", StringComparison.OrdinalIgnoreCase) >= 0) { return value; } } } foreach (KeyValuePair item2 in itemDictionary) { Item value2 = item2.Value; if ((Object)(object)value2 != (Object)null && !value2.disabled && (int)value2.itemType == 9) { return value2; } } return null; } private static int PhotonViewId(Component component) { if ((Object)(object)component == (Object)null) { return -1; } PhotonView component2 = component.GetComponent(); if (!((Object)(object)component2 != (Object)null)) { return -1; } return component2.ViewID; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.empress.repo.finalhand", "Empress Final Hand", "1.0.0")] public sealed class EmpressFinalHandPlugin : BaseUnityPlugin { public const string PluginGuid = "com.empress.repo.finalhand"; public const string PluginName = "Empress Final Hand"; public const string PluginVersion = "1.0.0"; public const string ArenaLevelName = "Level - Empress Final Hand"; public const string ArenaDisplayName = "Empress Final Hand"; internal const byte BossStateEventCode = 190; internal const byte BossHitEventCode = 191; internal const byte GunAssignedEventCode = 192; private static bool _photonEventsHooked; private Harmony _harmony; internal static EmpressFinalHandPlugin Instance { get; private set; } internal static ManualLogSource Log { get; private set; } internal static ArenaSettings Settings { get; private set; } internal static Level ArenaLevel { get; private set; } private void Awake() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown Instance = this; Log = ((BaseUnityPlugin)this).Logger; Settings = new ArenaSettings(((BaseUnityPlugin)this).Config); ((Component)this).gameObject.transform.parent = null; ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); ArenaLevel = ArenaLevelRegistry.RegisterArenaLevel(); string? directoryName = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location); _harmony = new Harmony("com.empress.repo.finalhand"); _harmony.PatchAll(typeof(EmpressFinalHandPlugin).Assembly); ArenaRuntime.EnsureHost(); HandAudio.Initialize(directoryName, (MonoBehaviour)(object)ArenaRuntime.Instance, ((BaseUnityPlugin)this).Logger); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Empress Final Hand v1.0.0 loaded. Level registered: Level - Empress Final Hand"); } internal static bool IsArenaLevel(Level level) { if ((Object)(object)level != (Object)null) { return ((Object)level).name == "Level - Empress Final Hand"; } return false; } private void OnDestroy() { RemovePhotonEventHook(); } internal static void EnsurePhotonEventHooked() { if (!_photonEventsHooked) { LoadBalancingClient networkingClient = PhotonNetwork.NetworkingClient; if (networkingClient != null) { networkingClient.EventReceived -= OnPhotonEvent; networkingClient.EventReceived += OnPhotonEvent; _photonEventsHooked = true; } } } internal static void RemovePhotonEventHook() { if (_photonEventsHooked) { LoadBalancingClient networkingClient = PhotonNetwork.NetworkingClient; if (networkingClient != null) { networkingClient.EventReceived -= OnPhotonEvent; } _photonEventsHooked = false; } } private static void OnPhotonEvent(EventData ev) { ArenaRuntime instance = ArenaRuntime.Instance; if ((Object)(object)instance == (Object)null) { return; } switch (ev.Code) { case 190: if (ev.CustomData is object[] data) { instance.ReceiveBossState(data); } break; case 191: if (ev.CustomData is object[] array2 && array2.Length >= 1 && array2[0] is int index) { instance.ReceiveBossHit(index); } break; case 192: if (ev.CustomData is object[] array && array.Length >= 2 && array[0] is int avatarViewId && array[1] is int gunViewId) { instance.ReceiveGunAssigned(avatarViewId, gunViewId); } break; } } internal static void RaiseBossState(object[] data) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) RaisePhotonEvent(190, data, (ReceiverGroup)0, (EventCaching)0, SendOptions.SendUnreliable); } internal static void RaiseBossHit(int index) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) RaisePhotonEvent(191, new object[1] { index }, (ReceiverGroup)2, (EventCaching)0, SendOptions.SendReliable); } internal static void RaiseGunAssigned(int avatarViewId, int gunViewId) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) RaisePhotonEvent(192, new object[2] { avatarViewId, gunViewId }, (ReceiverGroup)1, (EventCaching)4, SendOptions.SendReliable); } internal static void ClearArenaPhotonCache() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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_0015: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (PhotonNetwork.InRoom) { RaiseEventOptions val = new RaiseEventOptions { CachingOption = (EventCaching)6 }; PhotonNetwork.RaiseEvent((byte)192, (object)null, val, SendOptions.SendReliable); } } private static void RaisePhotonEvent(byte code, object[] payload, ReceiverGroup receivers, EventCaching caching, SendOptions sendOptions) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0024: Unknown result type (might be due to invalid IL or missing references) EnsurePhotonEventHooked(); if (PhotonNetwork.InRoom) { RaiseEventOptions val = new RaiseEventOptions { Receivers = receivers, CachingOption = caching }; PhotonNetwork.RaiseEvent(code, (object)payload, val, sendOptions); } } } internal sealed class ArenaSettings { public readonly ConfigEntry ForceArenaLevel; public readonly ConfigEntry WeakSpotHealth; public readonly ConfigEntry ExitDelaySeconds; public ArenaSettings(ConfigFile config) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown ForceArenaLevel = config.Bind("Debug", "ForceArenaLevel", false, "Forces every real run level to load the Empress Final Hand arena. Useful for testing."); WeakSpotHealth = config.Bind("Boss", "WeakSpotHealth", 8, new ConfigDescription("Handgun shots needed to destroy each of the 5 red weak spots.", (AcceptableValueBase)(object)new AcceptableValueRange(1, 40), Array.Empty())); ExitDelaySeconds = config.Bind("Boss", "ExitDelaySeconds", 6f, new ConfigDescription("Seconds after the hand is destroyed before the level transitions away.", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 30f), Array.Empty())); } } internal sealed class FinalHandLoadingScreen : MonoBehaviour { private static readonly Color BackgroundA = new Color(0.01f, 0.012f, 0.03f, 1f); private static readonly Color BackgroundB = new Color(0.05f, 0.015f, 0.07f, 1f); private static readonly Color Accent = new Color(1f, 0.28f, 0.42f, 0.5f); private static bool _active; private static float _muteUntilRealtime; private static Sprite _handSprite; private GameObject _root; private Image _background; private Image _hand; private RectTransform _handRect; private readonly Image[] _streaks = (Image[])(object)new Image[6]; private readonly RectTransform[] _streakRects = (RectTransform[])(object)new RectTransform[6]; private float _time; private const int Tile = 8; public static void Show(LoadingUI ui) { if (!((Object)(object)ui == (Object)null)) { FinalHandLoadingScreen finalHandLoadingScreen = ((Component)ui).GetComponent(); if ((Object)(object)finalHandLoadingScreen == (Object)null) { finalHandLoadingScreen = ((Component)ui).gameObject.AddComponent(); } finalHandLoadingScreen.ShowInternal(ui); } } public static void Hide(LoadingUI ui) { if (!((Object)(object)ui == (Object)null)) { FinalHandLoadingScreen component = ((Component)ui).GetComponent(); if ((Object)(object)component != (Object)null) { component.HideInternal(); } } } public static bool OwnsCurrentLoading() { if (_active || Time.realtimeSinceStartup < _muteUntilRealtime) { return true; } Level val = null; if (Object.op_Implicit((Object)(object)LevelGenerator.Instance)) { val = LevelGenerator.Instance.Level; } if (!Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)RunManager.instance)) { val = RunManager.instance.levelCurrent; } return EmpressFinalHandPlugin.IsArenaLevel(val); } private void ShowInternal(LoadingUI ui) { EnsureBuilt(((Component)ui).transform); ClearGraphic(ui.loadingGraphic01); ClearGraphic(ui.loadingGraphic02); ClearGraphic(ui.loadingGraphic03); _time = 0f; _active = true; _muteUntilRealtime = Time.realtimeSinceStartup + 18f; _root.SetActive(true); _root.transform.SetAsLastSibling(); if ((Object)(object)ui.levelNumberText != (Object)null) { BringToFront(((TMP_Text)ui.levelNumberText).transform); } if ((Object)(object)ui.levelNameText != (Object)null) { BringToFront(((TMP_Text)ui.levelNameText).transform); } } private void BringToFront(Transform target) { if (!((Object)(object)target == (Object)null) && !((Object)(object)_root == (Object)null)) { Transform parent = _root.transform.parent; Transform val = target; while ((Object)(object)val.parent != (Object)null && (Object)(object)val.parent != (Object)(object)parent) { val = val.parent; } if ((Object)(object)val.parent == (Object)(object)parent) { val.SetAsLastSibling(); } target.SetAsLastSibling(); } } private void HideInternal() { _active = false; _muteUntilRealtime = Time.realtimeSinceStartup + 1.5f; if ((Object)(object)_root != (Object)null) { _root.SetActive(false); } } private void Update() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_00ea: 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_00ee: 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_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: 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_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: 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) if ((Object)(object)_root == (Object)null || !_root.activeSelf) { return; } if (!OwnsCurrentLoading()) { _active = false; _root.SetActive(false); return; } _time += Time.unscaledDeltaTime; float num = 0.5f + Mathf.Sin(_time * 2.2f) * 0.5f; ((Graphic)_background).color = Color.Lerp(BackgroundA, BackgroundB, num); float num2 = Mathf.Clamp01(_time / 0.7f); float num3 = 1f - (1f - num2) * (1f - num2); Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(780f, -180f); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(0f, 120f); float num4 = Mathf.Sin(_time * 1.8f) * 12f; _handRect.anchoredPosition = Vector2.Lerp(val, val2, num3) + new Vector2(0f, num4 * num3); ((Transform)_handRect).localRotation = Quaternion.Euler(0f, 0f, Mathf.Lerp(-40f, Mathf.Sin(_time * 1.4f) * 4f, num3)); float num5 = Mathf.Lerp(0.4f, 1f, num3) + Mathf.Sin(_time * 5f) * 0.02f * num3; ((Transform)_handRect).localScale = new Vector3(num5, num5, 1f); for (int i = 0; i < _streakRects.Length; i++) { RectTransform obj = _streakRects[i]; Vector2 anchoredPosition = obj.anchoredPosition; anchoredPosition.x -= Time.unscaledDeltaTime * (220f + (float)i * 70f); if (anchoredPosition.x < -700f) { anchoredPosition.x = 700f; } obj.anchoredPosition = anchoredPosition; } } private void EnsureBuilt(Transform parent) { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: 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_010e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_root != (Object)null)) { _root = CreateObject("Empress Final Hand Loading", parent); Stretch(_root.GetComponent()); _background = _root.AddComponent(); ((Graphic)_background).raycastTarget = false; ((Graphic)_background).color = BackgroundA; for (int i = 0; i < _streaks.Length; i++) { Image val = CreateImage("Empress Streak", _root.transform, Accent); RectTransform rectTransform = ((Graphic)val).rectTransform; rectTransform.anchorMin = new Vector2(0.5f, 0.5f); rectTransform.anchorMax = new Vector2(0.5f, 0.5f); rectTransform.pivot = new Vector2(0.5f, 0.5f); rectTransform.sizeDelta = new Vector2(240f + (float)i * 60f, (i % 2 == 0) ? 4f : 2f); rectTransform.anchoredPosition = new Vector2(DeterministicRange(i, -600f, 600f), -260f + (float)i * 95f); _streaks[i] = val; _streakRects[i] = rectTransform; } _hand = CreateImage("Empress Hand Glyph", _root.transform, Color.white); _hand.sprite = GetHandSprite(); _hand.preserveAspect = true; _handRect = ((Graphic)_hand).rectTransform; _handRect.anchorMin = new Vector2(0.5f, 0.5f); _handRect.anchorMax = new Vector2(0.5f, 0.5f); _handRect.pivot = new Vector2(0.5f, 0.5f); _handRect.sizeDelta = new Vector2(320f, 300f); _handRect.anchoredPosition = Vector2.zero; _root.SetActive(false); } } private static Sprite GetHandSprite() { //IL_0069: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_handSprite != (Object)null) { return _handSprite; } byte[] array = Convert.FromBase64String("AAgKAP8ACAsA/wAJCgD/AAkLAP8ACQwA/wAJ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{ for (int j = 0; j < 8; j++) { Vector2 val = Corner(0, 0, array[i], j & 1, array[i + 2], (j >> 1) & 1, array[i + 1], (j >> 2) & 1); if (val.x < (float)num) { num = (int)val.x; } if (val.x > (float)num2) { num2 = (int)val.x; } if (val.y < (float)num3) { num3 = (int)val.y; } if (val.y > (float)num4) { num4 = (int)val.y; } } } int num5 = 6; int num6 = num2 - num + 1 + num5 * 2; int num7 = num4 - num3 + 1 + num5 * 2; int ox = -num + num5; int oy = -num3 + num5; Color32[] array2 = (Color32[])(object)new Color32[num6 * num7]; float[] array3 = new float[num6 * num7]; for (int k = 0; k < array2.Length; k++) { array2[k] = new Color32((byte)0, (byte)0, (byte)0, (byte)0); array3[k] = -100000f; } Color val2 = default(Color); ((Color)(ref val2))..ctor(0.92f, 0.93f, 0.98f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(1f, 0.2f, 0.26f, 1f); for (int l = 0; l + 4 < array.Length; l += 5) { int num8 = array[l]; int num9 = array[l + 1]; int num10 = array[l + 2]; Color c = ((array[l + 4] != byte.MaxValue) ? val3 : val2); float num11 = num8 + num10 + num9; FillQuad(array2, array3, num6, num7, Corner(ox, oy, num8, 0, num10, 0, num9, 1), Corner(ox, oy, num8, 1, num10, 0, num9, 1), Corner(ox, oy, num8, 1, num10, 1, num9, 1), Corner(ox, oy, num8, 0, num10, 1, num9, 1), Mul(c, 1f), num11 + 0.3f); FillQuad(array2, array3, num6, num7, Corner(ox, oy, num8, 1, num10, 0, num9, 0), Corner(ox, oy, num8, 1, num10, 1, num9, 0), Corner(ox, oy, num8, 1, num10, 1, num9, 1), Corner(ox, oy, num8, 1, num10, 0, num9, 1), Mul(c, 0.74f), num11 + 0.1f); FillQuad(array2, array3, num6, num7, Corner(ox, oy, num8, 0, num10, 1, num9, 0), Corner(ox, oy, num8, 1, num10, 1, num9, 0), Corner(ox, oy, num8, 1, num10, 1, num9, 1), Corner(ox, oy, num8, 0, num10, 1, num9, 1), Mul(c, 0.52f), num11); } Texture2D val4 = new Texture2D(num6, num7, (TextureFormat)4, false) { wrapMode = (TextureWrapMode)1, filterMode = (FilterMode)0 }; val4.SetPixels32(array2); val4.Apply(false, true); _handSprite = Sprite.Create(val4, new Rect(0f, 0f, (float)num6, (float)num7), new Vector2(0.5f, 0.5f), 100f); return _handSprite; } private static Vector2 Corner(int ox, int oy, int x, int dx, int z, int dz, int y, int dy) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) return new Vector2((float)(ox + (x + dx) * 8 - (z + dz) * 8), (float)(oy + (x + dx) * 4 + (z + dz) * 4 + (y + dy) * 8)); } private static Color Mul(Color c, float f) { //IL_0000: 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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) return new Color(c.r * f, c.g * f, c.b * f, c.a); } private static void FillQuad(Color32[] pixels, float[] depth, int w, int h, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Color color, float z) { //IL_0001: 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_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00df: 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_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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) int num = Mathf.Max(0, Mathf.FloorToInt(Mathf.Min(Mathf.Min(a.x, b.x), Mathf.Min(c.x, d.x)))); int num2 = Mathf.Min(w - 1, Mathf.CeilToInt(Mathf.Max(Mathf.Max(a.x, b.x), Mathf.Max(c.x, d.x)))); int num3 = Mathf.Max(0, Mathf.FloorToInt(Mathf.Min(Mathf.Min(a.y, b.y), Mathf.Min(c.y, d.y)))); int num4 = Mathf.Min(h - 1, Mathf.CeilToInt(Mathf.Max(Mathf.Max(a.y, b.y), Mathf.Max(c.y, d.y)))); Color32 val = Color32.op_Implicit(color); Vector2 p = default(Vector2); for (int i = num3; i <= num4; i++) { for (int j = num; j <= num2; j++) { ((Vector2)(ref p))..ctor((float)j + 0.5f, (float)i + 0.5f); if (InTriangle(p, a, b, c) || InTriangle(p, a, c, d)) { int num5 = i * w + j; if (z > depth[num5]) { depth[num5] = z; pixels[num5] = val; } } } } } private static bool InTriangle(Vector2 p, Vector2 a, Vector2 b, Vector2 c) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_003d: 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_004a: 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_0058: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_0090: 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_009d: Unknown result type (might be due to invalid IL or missing references) float num = (p.x - b.x) * (a.y - b.y) - (a.x - b.x) * (p.y - b.y); float num2 = (p.x - c.x) * (b.y - c.y) - (b.x - c.x) * (p.y - c.y); float num3 = (p.x - a.x) * (c.y - a.y) - (c.x - a.x) * (p.y - a.y); bool flag = num < 0f || num2 < 0f || num3 < 0f; bool flag2 = num > 0f || num2 > 0f || num3 > 0f; return !(flag && flag2); } private static GameObject CreateObject(string name, Transform parent) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown GameObject val = new GameObject(name, new Type[2] { typeof(RectTransform), typeof(CanvasRenderer) }); val.transform.SetParent(parent, false); return val; } private static Image CreateImage(string name, Transform parent, Color color) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) Image obj = CreateObject(name, parent).AddComponent(); ((Graphic)obj).raycastTarget = false; ((Graphic)obj).color = color; return obj; } private static void Stretch(RectTransform rect) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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_0022: 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) rect.anchorMin = Vector2.zero; rect.anchorMax = Vector2.one; rect.offsetMin = Vector2.zero; rect.offsetMax = Vector2.zero; rect.pivot = new Vector2(0.5f, 0.5f); } private static void ClearGraphic(Image image) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)image == (Object)null)) { image.sprite = null; ((Graphic)image).color = Color.clear; } } private static float DeterministicRange(int seed, float min, float max) { uint num = (uint)(seed * 747796405 + 2891336453u); num = ((num >> (int)((num >> 28) + 4)) ^ num) * 277803737; num = (num >> 22) ^ num; return Mathf.Lerp(min, max, (float)(num & 0xFFFF) / 65535f); } } internal static class HandAudio { public const float Volume = 1f; public const float MusicVolume = 0.12f; private static readonly List AttackClips = new List(); private static AudioClip _slamClip; private static AudioClip _slideClip; private static AudioClip _breakClip; private static AudioClip _deathClip; private static AudioClip _musicClip; private static AudioSource _sfx; private static bool _started; private static bool _sfxRouted; private static bool _musicRouted; public static AudioClip MusicClip => _musicClip; public static bool HasMusic => (Object)(object)_musicClip != (Object)null; public static void Initialize(string directory, MonoBehaviour runner, ManualLogSource log) { //IL_0039: 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) if (!_started && !((Object)(object)runner == (Object)null) && !string.IsNullOrEmpty(directory) && Directory.Exists(directory)) { _started = true; if ((Object)(object)_sfx == (Object)null) { GameObject val = new GameObject("Empress Final Hand SFX"); val.transform.SetParent(((Component)runner).transform, false); _sfx = val.AddComponent(); _sfx.playOnAwake = false; _sfx.spatialBlend = 0f; _sfx.volume = 1f; _sfx.priority = 0; } runner.StartCoroutine(LoadAll(directory, log)); } } private static IEnumerator LoadAll(string directory, ManualLogSource log) { string[] files = Directory.GetFiles(directory, "*.ogg", SearchOption.TopDirectoryOnly); for (int i = 0; i < files.Length; i++) { yield return LoadOne(files[i], log); } if (log != null) { log.LogInfo((object)("Empress Final Hand loaded " + AttackClips.Count + " attack clip(s), break=" + ((Object)(object)_breakClip != (Object)null) + ", music=" + ((Object)(object)_musicClip != (Object)null) + ".")); } } private static IEnumerator LoadOne(string path, ManualLogSource log) { string text = "file:///" + path.Replace("\\", "/"); UnityWebRequest request = UnityWebRequestMultimedia.GetAudioClip(text, (AudioType)14); try { yield return request.SendWebRequest(); if (!string.IsNullOrEmpty(request.error)) { if (log != null) { log.LogWarning((object)("Empress Final Hand could not load " + Path.GetFileName(path) + ": " + request.error)); } yield break; } AudioClip content = DownloadHandlerAudioClip.GetContent(request); if ((Object)(object)content == (Object)null) { yield break; } ((Object)content).name = Path.GetFileNameWithoutExtension(path); Register(((Object)content).name.ToLowerInvariant(), content); } finally { ((IDisposable)request)?.Dispose(); } } private static void Register(string name, AudioClip clip) { switch (name) { case "empressmusic": case "empressbackground": _musicClip = clip; return; case "empressbreak": case "empresshit": _breakClip = clip; return; case "empressslam": _slamClip = clip; return; case "empressslide": _slideClip = clip; return; case "empressdead": _deathClip = clip; return; } if (name.StartsWith("empress")) { AttackClips.Add(clip); } } private static AudioClip RandomAttack() { if (AttackClips.Count != 0) { return AttackClips[Random.Range(0, AttackClips.Count)]; } return null; } public static void PlaySlam(Vector3 position) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) PlayOneShot(_slamClip ?? RandomAttack(), position); } public static void PlaySlide(Vector3 position) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) PlayOneShot(_slideClip ?? RandomAttack(), position); } public static void PlayDeath(Vector3 position) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) PlayOneShot(_deathClip, position); } public static void PlayBreak(Vector3 position) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) PlayOneShot(_breakClip, position); } private static void PlayOneShot(AudioClip clip, Vector3 position) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)clip == (Object)null)) { if ((Object)(object)_sfx != (Object)null) { RouteSfx(); _sfx.PlayOneShot(clip, 1f); } else { AudioSource.PlayClipAtPoint(clip, position, 1f); } } } private static void RouteSfx() { if (!_sfxRouted && !((Object)(object)_sfx == (Object)null) && !((Object)(object)AudioManager.instance == (Object)null) && !((Object)(object)AudioManager.instance.SoundMasterGroup == (Object)null)) { _sfx.outputAudioMixerGroup = AudioManager.instance.SoundMasterGroup; _sfxRouted = true; } } public static void ConfigureMusicSource(AudioSource source) { if (!((Object)(object)source == (Object)null)) { source.volume = 0.12f; if (!_musicRouted && !((Object)(object)AudioManager.instance == (Object)null) && !((Object)(object)AudioManager.instance.MusicMasterGroup == (Object)null)) { source.outputAudioMixerGroup = AudioManager.instance.MusicMasterGroup; _musicRouted = true; } } } } internal sealed class HandBoss { public const int WeakSpotCount = 5; private const int DigitCount = 5; private const float VoxelSize = 0.36f; private const int PhaseIdle = 0; private const int PhaseWindup = 1; private const int PhaseStrike = 2; private const int PhaseRecover = 3; private const int PhaseDowned = 4; private const int PhaseSpin = 5; private const int PhaseDying = 6; private const int AttackSlam = 0; private const int AttackSweep = 1; private static readonly Quaternion BaseRotation = Quaternion.Euler(0f, 180f, 0f); private Transform _root; private readonly Transform[] _digitBases = (Transform[])(object)new Transform[5]; private readonly Quaternion[] _digitRest = (Quaternion[])(object)new Quaternion[5]; private readonly HandWeakSpot[] _weakSpots = new HandWeakSpot[5]; private Vector3 _basePosition; private float _platformY; private int _weakSpotHealth = 4; private int _phase; private int _attackKind; private int _pose; private float _progress; private float _waitTimer; private float _specialTimer; private float _spinAngle; private float _bobTime; private bool _struck; private bool _strikeSoundDone; private bool _deathSoundDone; private float _hitCooldown; private float _flinch; private Vector3 _deathPos; private Material _bodyMat; private List _deathRenderers; private List _dissolveThresholds; private Vector3 _targetPoint; private Vector3 _phaseFrom; private Vector3 _attackStartPos; private Vector3 _attackEndPos; private Vector3 _downedPoint; private Vector3 _rootPosition; private Vector3 _renderPosition; private Quaternion _rootRotation = BaseRotation; private Quaternion _renderRotation = BaseRotation; private int _destroyedMask; private int _soundMask; private static Material _handMat; private static Material _redMat; private static Material _redHurtMat; private static readonly float[] FanBase = new float[5] { -1f, -0.38f, 0.38f, 1f, 0f }; public bool Dead { get; private set; } public bool DeathComplete { get; private set; } public Transform Root => _root; public static HandBoss Create(Transform parent, Vector3 center, int weakSpotHealth) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) HandBoss obj = new HandBoss { _basePosition = center + Vector3.up * 8f, _platformY = center.y }; obj._rootPosition = obj._basePosition; obj._renderPosition = obj._basePosition; obj._targetPoint = center; obj._waitTimer = 3f; obj._weakSpotHealth = Mathf.Max(1, weakSpotHealth); obj.Build(parent); return obj; } private void Build(Transform parent) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_003b: 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_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: 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_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_018e: 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_0191: 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_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Expected O, but got Unknown //IL_01db: 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_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) EnsureMaterials(); _bodyMat = new Material(_handMat) { enableInstancing = true }; GameObject val = new GameObject("Empress Master Hand"); val.transform.SetParent(parent, false); val.transform.position = _basePosition; val.transform.localRotation = BaseRotation; _root = val.transform; byte[] array = Convert.FromBase64String("AAgKAP8ACAsA/wAJCgD/AAkLAP8ACQwA/wAJEgH/A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)new Vector3[5]; int[] array3 = new int[5]; int[] array4 = new int[5]; for (int i = 0; i < 5; i++) { array4[i] = int.MaxValue; } for (int j = 0; j < num; j++) { int num2 = j * 5; int num3 = array[num2 + 3]; if (num3 >= 1 && num3 <= 5) { int num4 = num3 - 1; ref Vector3 reference = ref array2[num4]; reference += new Vector3((float)(int)array[num2], (float)(int)array[num2 + 1], (float)(int)array[num2 + 2]); array3[num4]++; if (array[num2 + 2] < array4[num4]) { array4[num4] = array[num2 + 2]; } } } Vector3[] array5 = (Vector3[])(object)new Vector3[5]; Vector3 val4 = default(Vector3); for (int k = 0; k < 5; k++) { if (array3[k] != 0) { Vector3 val3 = array2[k] / (float)array3[k]; ((Vector3)(ref val4))..ctor(val3.x, val3.y, (float)array4[k]); array5[k] = (val4 - val2) * 0.36f; GameObject val5 = new GameObject("Digit " + k); val5.transform.SetParent(_root, false); val5.transform.localPosition = array5[k]; val5.transform.localRotation = Quaternion.identity; _digitBases[k] = val5.transform; _digitRest[k] = Quaternion.identity; } } float num5 = 0.342f; for (int l = 0; l < num; l++) { int num6 = l * 5; int num7 = array[num6 + 3]; int num8 = array[num6 + 4]; Vector3 val6 = (new Vector3((float)(int)array[num6], (float)(int)array[num6 + 1], (float)(int)array[num6 + 2]) - val2) * 0.36f; Transform val7 = _root; Vector3 localPosition = val6; if (num7 >= 1 && num7 <= 5 && (Object)(object)_digitBases[num7 - 1] != (Object)null) { val7 = _digitBases[num7 - 1]; localPosition = val6 - array5[num7 - 1]; } int num9 = ((num8 != 255) ? RemapWeakSpot(num8) : (-1)); if (num9 >= 0) { GameObject val8 = GameObject.CreatePrimitive((PrimitiveType)3); ((Object)val8).name = "Empress Hand Weak Spot " + num9; val8.transform.SetParent(val7, false); val8.transform.localPosition = localPosition; val8.transform.localScale = Vector3.one * 0.72f; int num10 = LayerMask.NameToLayer("Enemy"); if (num10 >= 0) { val8.layer = num10; } ((Renderer)val8.GetComponent()).sharedMaterial = _redMat; HandWeakSpot handWeakSpot = val8.AddComponent(); handWeakSpot.Init(num9, _weakSpotHealth, _redMat, _redHurtMat); _weakSpots[num9] = handWeakSpot; } else { AddCube(val7, "Cube", localPosition, Vector3.one * num5, _bodyMat); } } } private static int RemapWeakSpot(int wk) { if (wk < 0 || wk % 3 != 1) { return -1; } int num = wk / 3; if (num >= 5) { return -1; } return num; } private static GameObject AddCube(Transform parent, string name, Vector3 localPosition, Vector3 localScale, Material material) { //IL_0020: 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) GameObject obj = GameObject.CreatePrimitive((PrimitiveType)3); ((Object)obj).name = name; obj.transform.SetParent(parent, false); obj.transform.localPosition = localPosition; obj.transform.localScale = localScale; Collider component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } ((Renderer)obj.GetComponent()).sharedMaterial = material; return obj; } public void HostTick(float dt, List players) { //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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_013f: 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_0150: 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) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_025e: 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_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) if (DeathComplete) { return; } if (_phase == 6) { _progress += dt / 8f; _rootPosition = _deathPos; if (_progress >= 1f) { _progress = 1f; DeathComplete = true; } ApplyVisual(dt); return; } _bobTime += dt; _hitCooldown -= dt; _flinch = Mathf.MoveTowards(_flinch, 0f, dt * 2.2f); Quaternion rotation = BaseRotation; Vector3 val; switch (_phase) { case 1: _progress += dt / 1.3f; val = SmoothLerp(_phaseFrom, _attackStartPos, _progress); if (_progress >= 1f) { _progress = 0f; _struck = false; _phase = 2; } break; case 2: val = TickStrike(dt, players, out rotation); break; case 3: _progress += dt / 1.2f; val = SmoothLerp(_phaseFrom, _basePosition, _progress); if (_progress >= 1f) { _phase = 0; _waitTimer = Random.Range(2.5f, 4.5f); } break; case 4: _specialTimer -= dt; val = SmoothLerp(_phaseFrom, _downedPoint, Mathf.Clamp01((3f - _specialTimer) / 0.6f)); if (_specialTimer <= 0f) { _phase = 5; _specialTimer = 5f; _spinAngle = 0f; _phaseFrom = val; } break; case 5: val = TickSpin(dt, players, out rotation); break; default: _waitTimer -= dt; val = _basePosition + Vector3.up * Mathf.Sin(_bobTime * 1.4f) * 0.6f; if (_waitTimer <= 0f) { BeginAttack(players, val); } break; } _rootPosition = val; _rootRotation = rotation; ApplyVisual(dt); } private void BeginAttack(List players, Vector3 fromPosition) { //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_0041: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) _attackKind = ((!(Random.value < 0.5f)) ? 1 : 0); _pose = ((_attackKind == 0 && Random.value < 0.5f) ? 1 : 0); _targetPoint = PickTarget(players); _phaseFrom = fromPosition; if (_attackKind == 0) { _attackStartPos = new Vector3(_targetPoint.x, _basePosition.y + 4f, _targetPoint.z); _attackEndPos = new Vector3(_targetPoint.x, _targetPoint.y + 1.6f, _targetPoint.z); } else { float num = ((_targetPoint.x >= 0f) ? 1f : (-1f)); _attackStartPos = new Vector3((0f - num) * 13f, _basePosition.y - 6f, _targetPoint.z); _attackEndPos = new Vector3(num * 13f, _basePosition.y - 6f, _targetPoint.z); } _progress = 0f; _struck = false; _phase = 1; } private Vector3 TickStrike(float dt, List players, out Quaternion rotation) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_018e: 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) rotation = BaseRotation; Vector3 val; if (_attackKind == 0) { _progress += dt / 0.5f; float num = Mathf.Clamp01(_progress); val = Vector3.Lerp(_attackStartPos, _attackEndPos, num * num); float num2 = ((_pose == 1) ? 135f : 40f); rotation = Quaternion.Euler(0f, 180f + num2 * (num * num), 0f); if (!_struck && num >= 0.6f) { _struck = true; DamageNear(players, _attackEndPos, 4.8f, 35); } } else { _progress += dt / 1.8f; float num3 = Mathf.Clamp01(_progress); val = Vector3.Lerp(_attackStartPos, _attackEndPos, num3); float num4 = Mathf.Sin(num3 * MathF.PI) * 18f * ((_attackEndPos.x >= _attackStartPos.x) ? 1f : (-1f)); rotation = Quaternion.Euler(0f, 180f, num4); if (_hitCooldown <= 0f && DamageNear(players, new Vector3(val.x, _targetPoint.y, val.z), 3f, 22)) { _hitCooldown = 0.6f; } } if (_progress >= 1f) { _phaseFrom = val; _progress = 0f; _phase = 3; } return val; } private Vector3 TickSpin(float dt, List players, out Quaternion rotation) { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) _specialTimer -= dt; _spinAngle += dt * 260f; float num = _spinAngle * 0.55f * (MathF.PI / 180f); float num2 = 8.5f; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(_basePosition.x + Mathf.Cos(num) * num2, _platformY + 5.2f, _basePosition.z + Mathf.Sin(num) * num2); float num3 = Mathf.Clamp01((5f - _specialTimer) / 0.5f); Vector3 val2 = Vector3.Lerp(_phaseFrom, val, num3); rotation = Quaternion.Euler(0f, 180f + _spinAngle, 0f) * Quaternion.Euler(-78f, 0f, 0f); if (_hitCooldown <= 0f && DamageNear(players, new Vector3(val2.x, _platformY, val2.z), 3.2f, 20)) { _hitCooldown = 0.7f; } if (_specialTimer <= 0f) { _phase = 0; _waitTimer = 2f; } return val2; } private Vector3 PickTarget(List players) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (players != null && players.Count > 0) { PlayerAvatar val = players[Random.Range(0, players.Count)]; if ((Object)(object)val != (Object)null) { return ((Component)val).transform.position; } } return new Vector3(_basePosition.x, _platformY, _basePosition.z); } private bool DamageNear(List players, Vector3 point, float radius, int damage) { //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_0053: Unknown result type (might be due to invalid IL or missing references) if (players == null) { return false; } bool result = false; for (int i = 0; i < players.Count; i++) { PlayerAvatar val = players[i]; if (!((Object)(object)val == (Object)null) && !((Object)(object)val.playerHealth == (Object)null) && !(Vector3.Distance(((Component)val).transform.position, point) > radius)) { if (SemiFunc.IsMultiplayer()) { val.playerHealth.HurtOther(damage, ((Component)val).transform.position, false, -1, false); } else { val.playerHealth.Hurt(damage, false, -1, false); } result = true; } } return result; } private void ApplyVisual(float dt) { //IL_0024: 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_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_0042: 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_0069: 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_0079: 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_0088: 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_0100: 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_011a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_root == (Object)null) { return; } float num = 1f - Mathf.Exp(-16f * dt); _renderPosition = Vector3.Lerp(_renderPosition, _rootPosition, num); _renderRotation = Quaternion.Slerp(_renderRotation, _rootRotation, num); if (_phase == 6) { ApplyDeathVisual(); return; } _root.position = _renderPosition - Vector3.up * _flinch * 3.5f; _root.rotation = _renderRotation; UpdateAttackSound(); for (int i = 0; i < 5; i++) { if (!((Object)(object)_digitBases[i] == (Object)null)) { float num2 = DigitCurl(i); float num3 = DigitFan(i); float num4 = Mathf.Sin(_bobTime * 2.2f + (float)i) * 2.5f * (1f - num2); _digitBases[i].localRotation = _digitRest[i] * Quaternion.Euler(num2 * 92f + num4, num3, 0f); } } } private void ApplyDeathVisual() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_00e6: 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_0137: Unknown result type (might be due to invalid IL or missing references) if (!_deathSoundDone) { HandAudio.PlayDeath(_renderPosition); _deathSoundDone = true; } CollectDeathRenderers(); float num = Mathf.Clamp01(_progress); Vector3 val = Random.insideUnitSphere * Mathf.Lerp(0.7f, 0.15f, num); _root.position = _renderPosition + val; _root.rotation = _renderRotation * Quaternion.Euler(Random.Range(-6f, 6f), Random.Range(-6f, 6f), Random.Range(-6f, 6f)); if ((Object)(object)_bodyMat != (Object)null) { _bodyMat.color = Color.Lerp(new Color(0.88f, 0.89f, 0.94f), new Color(1f, 0.05f, 0.08f), num); float num2 = ((Random.value > 0.25f) ? 1f : 0.2f); _bodyMat.SetColor("_EmissionColor", new Color(1f, 0.06f, 0.1f) * (1.5f + 7f * num * num2)); } if (_deathRenderers != null) { for (int i = 0; i < _deathRenderers.Count; i++) { Renderer val2 = _deathRenderers[i]; if (!((Object)(object)val2 == (Object)null)) { bool flag = _dissolveThresholds[i] < num; if (val2.enabled == flag) { val2.enabled = !flag; } } } } if (_progress >= 1f) { DeathComplete = true; } } private void CollectDeathRenderers() { if (_deathRenderers == null && !((Object)(object)_root == (Object)null)) { Renderer[] componentsInChildren = ((Component)_root).GetComponentsInChildren(true); _deathRenderers = new List(componentsInChildren.Length); _dissolveThresholds = new List(componentsInChildren.Length); for (int i = 0; i < componentsInChildren.Length; i++) { _deathRenderers.Add(componentsInChildren[i]); _dissolveThresholds.Add(Random.value); } } } private void UpdateAttackSound() { //IL_0043: 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) if (_phase != 2) { _strikeSoundDone = false; } else { if (_strikeSoundDone) { return; } if (_attackKind == 0) { if (_progress >= 0.58f) { HandAudio.PlaySlam(_renderPosition); _strikeSoundDone = true; } } else { HandAudio.PlaySlide(_renderPosition); _strikeSoundDone = true; } } } private float DigitFan(int digit) { if (digit < 0 || digit >= FanBase.Length) { return 0f; } return FanBase[digit] * 20f * Flatness(); } private float Flatness() { if (_phase == 5) { return 0f; } if (_phase == 4) { return 1f; } if (_attackKind == 0) { if (_phase == 2) { if (_pose != 1) { return 1f; } return 0f; } if (_phase == 1) { if (_pose != 1) { return Mathf.Lerp(0.5f, 1f, _progress); } return Mathf.Lerp(0.6f, 0f, _progress); } } return 0.4f; } private float DigitCurl(int digit) { if (_phase == 5) { if (digit != 1 && digit != 2) { return 1f; } return 0f; } if (_phase == 2 && _attackKind == 0) { if (_pose != 1) { return 0f; } return 1f; } if (_phase == 4) { return 0f; } return _phase switch { 1 => Mathf.Lerp(0.1f, (_attackKind == 0 && _pose == 0) ? 0f : 0.95f, Mathf.Clamp01(_progress)), 2 => 0.35f, 3 => Mathf.Lerp(0.6f, 0.1f, Mathf.Clamp01(_progress)), _ => 0.1f, }; } public void RegisterHit(int index) { //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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) if (Dead || index < 0 || index >= 5) { return; } HandWeakSpot handWeakSpot = _weakSpots[index]; if ((Object)(object)handWeakSpot == (Object)null || handWeakSpot.Destroyed) { return; } Vector3 position = ((Component)handWeakSpot).transform.position; if (handWeakSpot.TakeHit(1)) { _destroyedMask |= 1 << index; _soundMask = _destroyedMask; _flinch = 1f; HandAudio.PlayBreak(position); if (DestroyedCount() >= 5) { Dead = true; _phase = 6; _progress = 0f; _deathPos = _rootPosition; } else if (_phase <= 3 && Random.value < 0.25f) { _phase = 4; _specialTimer = 3f; _phaseFrom = _rootPosition; float num = Mathf.Clamp(_rootPosition.x, _basePosition.x - 11f, _basePosition.x + 11f); float num2 = Mathf.Clamp(_rootPosition.z, _basePosition.z - 8f, _basePosition.z + 8f); _downedPoint = new Vector3(num, _platformY + 2f, num2); } } } public int DestroyedCount() { int num = 0; for (int i = 0; i < 5; i++) { if ((Object)(object)_weakSpots[i] == (Object)null || _weakSpots[i].Destroyed) { num++; } } return num; } public object[] GetState() { return new object[13] { _rootPosition.x, _rootPosition.y, _rootPosition.z, _rootRotation.x, _rootRotation.y, _rootRotation.z, _rootRotation.w, _phase, _attackKind, _pose, _progress, _destroyedMask, _flinch }; } public void ApplyState(object[] data) { //IL_0024: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length < 13) { return; } _rootPosition = new Vector3(ToFloat(data[0]), ToFloat(data[1]), ToFloat(data[2])); _rootRotation = new Quaternion(ToFloat(data[3]), ToFloat(data[4]), ToFloat(data[5]), ToFloat(data[6])); _phase = ToInt(data[7]); _attackKind = ToInt(data[8]); _pose = ToInt(data[9]); _progress = ToFloat(data[10]); int num = ToInt(data[11]); _flinch = ToFloat(data[12]); for (int i = 0; i < 5; i++) { if ((num & (1 << i)) != 0 && (Object)(object)_weakSpots[i] != (Object)null && !_weakSpots[i].Destroyed) { if ((_soundMask & (1 << i)) == 0) { HandAudio.PlayBreak(((Component)_weakSpots[i]).transform.position); } _weakSpots[i].Pop(); } } _destroyedMask = num; _soundMask = num; if (DestroyedCount() >= 5) { Dead = true; } } public void ClientTick(float dt) { _bobTime += dt; _flinch = Mathf.MoveTowards(_flinch, 0f, dt * 2.2f); ApplyVisual(dt); } public void Dispose() { if ((Object)(object)_root != (Object)null) { Object.Destroy((Object)(object)((Component)_root).gameObject); } _root = null; } private static Vector3 SmoothLerp(Vector3 a, Vector3 b, float t) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) t = Mathf.Clamp01(t); return Vector3.Lerp(a, b, t * t * (3f - 2f * t)); } private static float ToFloat(object value) { if (value is float) { return (float)value; } return 0f; } private static int ToInt(object value) { if (value is int) { return (int)value; } return 0; } private static void EnsureMaterials() { //IL_0019: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0071: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_00bd: 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_00dc: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_handMat != (Object)null)) { Shader obj = Shader.Find("Standard"); _handMat = new Material(obj) { color = new Color(0.88f, 0.89f, 0.94f) }; _handMat.SetFloat("_Glossiness", 0.28f); _handMat.SetFloat("_Metallic", 0.08f); _handMat.enableInstancing = true; _redMat = new Material(obj) { color = new Color(1f, 0.12f, 0.18f) }; _redMat.EnableKeyword("_EMISSION"); _redMat.SetColor("_EmissionColor", new Color(1f, 0.1f, 0.16f) * 2.8f); _redMat.enableInstancing = true; _redHurtMat = new Material(obj) { color = new Color(1f, 0.55f, 0.2f) }; _redHurtMat.EnableKeyword("_EMISSION"); _redHurtMat.SetColor("_EmissionColor", new Color(1f, 0.6f, 0.2f) * 3.4f); _redHurtMat.enableInstancing = true; } } } internal static class HandVoxelData { public const int GridX = 16; public const int GridY = 16; public const int GridZ = 25; public const int VoxelCount = 1235; public const string Data = "AAgKAP8ACAsA/wAJCgD/AAkLAP8ACQwA/wAJEgH/AAkTAf8ACRQB/wAKCwD/AAoMAP8ACg0B/wAKEQH/AAoSAf8AChMB/wAKFAH/AAsLAP8ACwwA/wALDQH/AAsOAf8ACw8B/wALEQH/AAsSAf8ACxMB/wALFAH/AAwMAP8ADA0B/wAMDgH/AAwPAf8ADBAB/wAMEQH/AAwSAf8ADBMB/wANDQH/AA0OAf8ADQ8B/wANEAH/AA0RAf8ADRIB/wANEwH/AA4OAf8ADg8B/wAOEAH/AA4RAf8ADhIB/wEBAgD/AQEDAP8BAgEA/wECAgD/AQIDAP8BAgQA/wEDAgD/AQMDAP8BAwQA/wEEBgD/AQQHAP8BBAgA/wEFBgD/AQUHAP8BBQgA/wEFCQD/AQUKAP8BBgYA/wEGBwD/AQYIAP8BBgkA/wEGCgD/AQcHAP8BBwgA/wEHCQD/AQcKAP8BBwsA/wEIBwD/AQgIAP8BCAkA/wEICgD/AQgLAP8BCAwA/wEJCAD/AQkJAP8BCQoA/wEJCwD/AQkMAP8BCQ0B/wEJEgH/AQkTAf8BCRQBAgEKCQD/AQoKAP8BCgsA/wEKDAD/AQoNAf8BCg4B/wEKEQEBAQoSAf8BChMB/wEKFAH/AQsKAP8BCwsA/wELDAD/AQsOAf8BCw8BAAELEAH/AQsRAf8BCxIB/wELFAH/AQwLAP8BDAwA/wEMDwH/AQwQAf8BDBEB/wEMEwH/AQwUAf8BDQwA/wENDQH/AQ0OAf8BDRIB/wENEwH/AQ4OAf8BDg8B/wEOEAH/AQ4RAf8BDhIB/wIAAQD/AgACAP8CAAMA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8NCRME/w4GEAX/DgYRBf8OBhIF/w4GEwX/DgYUBf8OBw8F/w4HEAX/DgcRBf8OBxIF/w4HEwX/DgcUBf8OCA8F/w4IEAX/DggRBf8OCBIF/w4IEwX/DggUBf8OCREE/w4JEgT/DgkTBP8PBxIF/w8HEwX/DwgSBf8PCBMF/w=="; } internal sealed class HandWeakSpot : MonoBehaviour { private int _health; private Renderer _renderer; private Collider _collider; private Material _liveMaterial; private Material _hurtMaterial; public int Index { get; private set; } public bool Destroyed { get; private set; } public void Init(int index, int health, Material liveMaterial, Material hurtMaterial) { Index = index; _health = Mathf.Max(1, health); _liveMaterial = liveMaterial; _hurtMaterial = hurtMaterial; _renderer = ((Component)this).GetComponent(); _collider = ((Component)this).GetComponent(); } public bool TakeHit(int damage) { if (Destroyed) { return false; } _health -= Mathf.Max(1, damage); if (_health > 0) { if ((Object)(object)_renderer != (Object)null && (Object)(object)_hurtMaterial != (Object)null) { _renderer.sharedMaterial = _hurtMaterial; } return false; } Pop(); return true; } public void Pop() { if (!Destroyed) { Destroyed = true; if ((Object)(object)_collider != (Object)null) { _collider.enabled = false; } ((Component)this).gameObject.SetActive(false); } } } }