Decompiled source of Masquerade Divinity v0.1.4
plugins/Masquerade Divinity/ProjectProphet.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using CustomRay; using GameConsole; using HarmonyLib; using ProjectProphet.Behaviours; using ProjectProphet.Behaviours.Props; using ProjectProphet.Behaviours.Wares; using ProjectProphet.Behaviours.Weapons; using ProjectProphet.Patching; using ProjectProphet.Patching.GabrielPatches; using ProjectProphet.StageAddons; using Sandbox; using ScriptableObjects; using TMPro; using ULTRAKILL.Cheats; using UnityEngine; using UnityEngine.AI; using UnityEngine.AddressableAssets; using UnityEngine.AddressableAssets.ResourceLocators; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("ProjectProphet")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ProjectProphet")] [assembly: AssemblyCopyright("Copyright © 2022")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("dfa813c9-c407-48f5-b20f-615a3c8fdbe3")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace ProjectProphet { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public class LinkedMethod : Attribute { public string methodName; public bool postfix; public LinkedMethod(string methodName, bool postfix = false) { this.methodName = methodName; this.postfix = postfix; } } public class ModdedBehaviour : Attribute { private Type srcClass; private static Harmony harmonyInstance; private static Dictionary<MethodBase, MethodInfo[]> SrcToLink; private const string LINKED_NAMESPACE = "ProjectProphet.Behaviours"; public ModdedBehaviour(Type srcClass) { this.srcClass = srcClass; } public static void Patch() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown harmonyInstance = new Harmony("maranara.projectprophet.linkedmonos"); Dictionary<MethodBase, List<MethodInfo>> dictionary = new Dictionary<MethodBase, List<MethodInfo>>(); HarmonyMethod val = new HarmonyMethod(typeof(ModdedBehaviour).GetMethod("PatchTransport", BindingFlags.Static | BindingFlags.NonPublic)); Type[] types = Assembly.GetExecutingAssembly().GetTypes(); foreach (Type type in types) { if (type.Namespace == null || !type.Namespace.StartsWith("ProjectProphet.Behaviours")) { continue; } ModdedBehaviour customAttribute = type.GetCustomAttribute<ModdedBehaviour>(); if (customAttribute == null) { continue; } Utils.Log("Found Modded Behaviour: " + type.Name); MethodInfo[] methods = type.GetMethods(); foreach (MethodInfo methodInfo in methods) { LinkedMethod customAttribute2 = methodInfo.GetCustomAttribute<LinkedMethod>(); if (customAttribute2 != null) { MethodBase method = customAttribute.srcClass.GetMethod(customAttribute2.methodName, (BindingFlags)(-1)); if (!dictionary.TryGetValue(method, out var value)) { value = new List<MethodInfo>(); Utils.Log("- Linked Method " + type.Name + ": From " + customAttribute2.methodName + " to " + methodInfo.Name); dictionary.Add(method, value); } value.Add(methodInfo); dictionary[method] = value; harmonyInstance.Patch(method, val, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } } } SrcToLink = new Dictionary<MethodBase, MethodInfo[]>(); foreach (KeyValuePair<MethodBase, List<MethodInfo>> item in dictionary) { SrcToLink.Add(item.Key, item.Value.ToArray()); } } public static void Unpatch() { harmonyInstance.UnpatchSelf(); harmonyInstance = null; } private static bool PatchTransport(MonoBehaviour __instance, MethodBase __originalMethod, object[] __args) { MethodInfo[] array = SrcToLink[__originalMethod]; foreach (MethodInfo methodInfo in array) { if (((object)__instance).GetType() == methodInfo.DeclaringType) { try { methodInfo.Invoke(__instance, __args); } catch (Exception ex) { Utils.LogError("[ModdedBehavior Exception]" + ex.InnerException.Message + "\n" + ex.InnerException.StackTrace); } return false; } } return true; } } [Serializable] public class GabrielProgress { public int[] newEnemiesFound; public bool ware1Unlocked; public bool ware2Unlocked; public bool ware3Unlocked; public bool ware4Unlocked; public bool ware1Equipped; public bool ware2Equipped; public bool ware3Equipped; public bool ware4Equipped; private const string GABRIEL_PROGRESS = "gabriel.bepis"; private static GabrielProgress inst; public GabrielProgress() { newEnemiesFound = new int[Enum.GetValues(typeof(CustomEnemyType)).Length]; } public static bool WareStatus(int ware) { GabrielProgress gabrielProgress = Read(); return ware switch { 1 => gabrielProgress.ware1Equipped, 2 => gabrielProgress.ware2Equipped, 3 => gabrielProgress.ware3Equipped, 4 => gabrielProgress.ware4Equipped, _ => false, }; } public static void ToggleWare(int ware, bool toggle) { GabrielProgress gabrielProgress = Read(); switch (ware) { case 1: gabrielProgress.ware1Equipped = toggle; break; case 2: gabrielProgress.ware2Equipped = toggle; break; case 3: gabrielProgress.ware3Equipped = toggle; break; case 4: gabrielProgress.ware4Equipped = toggle; break; } Write(gabrielProgress); MonoSingleton<WaresControl>.Instance.RefreshWares(); } public static void UnlockWare(int ware) { GabrielProgress gabrielProgress = Read(); switch (ware) { case 1: gabrielProgress.ware1Unlocked = true; gabrielProgress.ware1Equipped = true; break; case 2: gabrielProgress.ware2Unlocked = true; gabrielProgress.ware2Equipped = true; break; case 3: gabrielProgress.ware3Unlocked = true; gabrielProgress.ware3Equipped = true; break; case 4: gabrielProgress.ware4Unlocked = true; gabrielProgress.ware4Equipped = true; break; } Write(gabrielProgress); MonoSingleton<WaresControl>.Instance.RefreshWares(); } public static GabrielProgress Read() { inst = (GabrielProgress)GameProgressSaver.ReadFile(Path.Combine(GameProgressSaver.SavePath, "gabriel.bepis")); if (inst == null) { inst = new GabrielProgress(); } return inst; } public static void Write(GabrielProgress progress) { GameProgressSaver.WriteFile(Path.Combine(GameProgressSaver.SavePath, "gabriel.bepis"), (object)progress); } } [Serializable] public class ProphetResources : MonoBehaviour { public Sprite lightningBoltSmall; public Sprite lightningBolt; public Sprite lightningBoltBig; public Sprite fistIcon1; public Sprite fistIcon2; public Sprite jumpIcon; public Sprite logo; public Sprite[] ranks; public AudioClip shopMusic; public AudioClip sfxJump; public AudioClip sfxRetroJump; public AudioClip sfxLand; public AudioClip sfxDodge; public AudioClip sfxSharpLand; public GameObject sfxStomp; public AudioClip sfxSlideLoop; public GameObject sfxSlideEnd; public AudioClip sfxWalljumpFatigue; public AudioClip mainMenuMusic; public AudioClip testamentMusic; public AudioClip[] sfxFootsteps; public GameObject dodgeParticle; public GameObject fallParticle; public SlideParticles[] slideParticles; public GameObject newWeaponCharges; public AssetReference[] justice; public AssetReference[] splendor; public AssetReference[] swordRed; public AssetReference[] crossbow; public AssetReference[] crossbowGreen; public AssetReference[] crossbowRed; public AssetReference[] daggerBlue; public AssetReference[] daggerGreen; public AssetReference[] daggerRed; public AssetReference blueFist; public AssetReference redFist; public AssetReference[] wares; public ScriptableObject[] enemyEntries; public GameObject kofiButton; } [Serializable] public class Railsword : MonoBehaviour { public static Railsword inst; public LayerMask ignoreEnemyTrigger; public int variation; public float chargeAnti; public float chargeAntiRate; public float chargeAntiLimit; public Transform shootPoint; public GameObject sliceFX; public GameObject swingSound; public GameObject swingHitSound; public GameObject riposteExplosion; public GameObject riposteSound; public Image[] splendorChargeBar; public GameObject splendorBubble; public AudioClip splendorChargeSound; public GameObject bubblePopWarningSound; public MeshRenderer swordRenderer; public GameObject silenceThrownSword; public GameObject silenceThrowEffect; public GameObject silenceCatchEffect; private InputManager inman; public WeaponIdentifier wid; private float gotWidDelay; private AudioSource aud; private CameraController cc; private StyleHUD shud; private Camera cam; private GunControl gc; private Animator anim; private SkinnedMeshRenderer smr; private WeaponCharges wc; private WeaponPos wpos; private WeaponIcon wicon; private bool zooming; private bool gotStuff; private CameraFrustumTargeter targeter; private LayerMask enemyMask; private LayerMask environmentMask; private TrailRenderer trail; private float chargeMag; public float maxSwingCooldown = 0.3f; public float swingDamage; public GameObject swingProjectile; public bool alt; private const string FILL = "_Fill"; private bool charging; private float chargeTime; private bool nowcblock; private bool alreadyRiposted; private Vector3 chargeFwd; private float chargeDashCost = 1.5f; private const string parryStyle = "justice.parry"; private const string pierceStyle = "justice.pierce"; private EnemyIdentifier lastChargeEid; [NonSerialized] public List<SplendorBubble> bubbles; [NonSerialized] public SplendorBubble curBubble; private float splendorChargeTime; private bool silenceThrown; private bool silenceCaughtBuffer; private float silenceRecall; private const string RECALL_KEY = "SilenceRecall"; private ThrownSilence silenceSword; private RaycastHit hit; private int swingCt; private float spread = 20f; public float swingLength = 5f; public const string hitter = "slice"; private string quickdraw = "ultrakill.quickdraw"; private List<EnemyIdentifier> targetsThisSwing = new List<EnemyIdentifier>(); private void Awake() { if (!gotStuff) { wid = ((Component)this).GetComponent<WeaponIdentifier>(); wicon = ((Component)this).GetComponent<WeaponIcon>(); trail = ((Component)this).GetComponentInChildren<TrailRenderer>(); } } private void Start() { if (!gotStuff) { gotStuff = true; GetStuff(); } } private void OnEnable() { NewWeaponCharges.swordMax = maxSwingCooldown; inst = this; if (variation != 1) { charging = false; } chargeTime = 0f; if (!gotStuff) { gotStuff = true; GetStuff(); } nowcblock = false; if (silenceThrown && (Object)(object)silenceThrownSword != (Object)null) { anim.Play("Silence No Sword", -1, 0f); } else if (silenceCaughtBuffer) { SilenceCatch(); anim.Play("Equip", -1, 0f); } if ((Object)(object)curBubble != (Object)null) { aud.clip = splendorChargeSound; aud.pitch = splendorChargeTime; aud.loop = true; aud.volume = splendorChargeTime; aud.Play(); anim.Play("JusticeCharge", -1, 0f); } } private void OnDisable() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (charging && variation == 0) { EndCharge(); } if ((Object)(object)wc == (Object)null) { wc = ((Component)this).GetComponentInParent<WeaponCharges>(); } if ((Object)(object)wpos != (Object)null) { ((Component)this).transform.localPosition = wpos.currentDefault; } if (variation != 1) { charging = false; } chargeTime = 0f; if (zooming) { zooming = false; cc.StopZoom(); if (silenceThrown && (Object)(object)silenceSword != (Object)null) { silenceSword.EndRecalling(); } } } private void Update() { //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) PlayerInput inputSource = MonoSingleton<InputManager>.Instance.InputSource; bool flag = !(NewWeaponCharges.sword0Charge < NewWeaponCharges.swordMax); if (NoWeaponCooldown.NoCooldown) { flag = !nowcblock; } if (inputSource.Fire1.IsPressed && gc.activated && flag && (variation != 2 || !silenceThrown)) { if (variation == 1 && charging) { EndJudgementCut(); return; } if (charging) { EndCharge(); } if (!Object.op_Implicit((Object)(object)wid) || wid.delay == 0f) { Swing(); } else { ((MonoBehaviour)this).Invoke("Swing", wid.delay); } if (NoWeaponCooldown.NoCooldown) { nowcblock = true; ((MonoBehaviour)this).Invoke("RefreshNoWc", maxSwingCooldown); } } AnimatorStateInfo currentAnimatorStateInfo; switch (variation) { case 0: if (charging) { if (inputSource.Jump.IsPressed || inputSource.Slide.IsPressed || inputSource.Dodge.IsPressed) { EndCharge(); chargeTime = 0f; } else { ChargeChecks(); } } if (inputSource.Fire2.WasPerformedThisFrame && gc.activated && !charging && !inputSource.Jump.IsPressed && !inputSource.Slide.IsPressed && !inputSource.Dodge.IsPressed) { targetsThisSwing = new List<EnemyIdentifier>(); if (chargeTime <= 0f) { StartCharge(); } } break; case 1: UpdateJudgementCut(); break; case 2: { if (silenceThrown && (Object)(object)silenceSword == (Object)null) { if (silenceCaughtBuffer) { currentAnimatorStateInfo = anim.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("SilenceCatch")) { SilenceCatch(); goto IL_0223; } } silenceCaughtBuffer = false; anim.Play("SilenceCatch", -1); } goto IL_0223; } IL_0223: if (inputSource.Fire2.WasPerformedThisFrame && gc.activated && !silenceThrown) { currentAnimatorStateInfo = anim.GetCurrentAnimatorStateInfo(0); if (!((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("SilenceThrow")) { anim.Play("SilenceThrow", -1, 0f); } } if (silenceThrown && (Object)(object)silenceSword != (Object)null) { if (inputSource.Fire2.IsPressed) { silenceRecall = Mathf.MoveTowards(silenceRecall, 1f, Time.deltaTime * 5f); } else { silenceRecall = Mathf.MoveTowards(silenceRecall, 0f, Time.deltaTime * 5f); } if (inputSource.Fire2.WasPerformedThisFrame) { silenceSword.StartRecalling(); } if (inputSource.Fire2.WasCanceledThisFrame) { silenceSword.EndRecalling(); } } anim.SetFloat("SilenceRecall", silenceRecall); break; } } private void RefreshNoWc() { nowcblock = false; } private void AddFardDamage(float damage) { if (MonoSingleton<NewMovement>.Instance.antiHp + damage <= chargeAntiLimit) { MonoSingleton<NewMovement>.Instance.ForceAddAntiHP(damage, true, true, true, false); } else if (MonoSingleton<NewMovement>.Instance.antiHp <= chargeAntiLimit) { MonoSingleton<NewMovement>.Instance.ForceAntiHP(chargeAntiLimit, true, true, true, false); } } private bool SwingCheck(bool chargeCheck = false) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) targetsThisSwing.Clear(); bool result = false; if (Physics.CapsuleCast(cc.GetDefaultPos() - ((Component)cc).transform.right, cc.GetDefaultPos() + ((Component)cc).transform.right, 2f, Utils.Aim, ref hit, 3f, LayerMask.op_Implicit(ignoreEnemyTrigger), (QueryTriggerInteraction)2)) { bool flag = false; RaycastHit val = default(RaycastHit); if (Physics.SphereCast(cc.GetDefaultPos(), 1f, Utils.Aim, ref val, 4f, LayerMask.op_Implicit(environmentMask)) && (double)Vector3.Distance(((Component)this).transform.position, ((RaycastHit)(ref hit)).point) > (double)Vector3.Distance(((Component)this).transform.position, ((RaycastHit)(ref val)).point)) { flag = true; } if (!flag) { if (SwingSuccess(((RaycastHit)(ref hit)).point, ((RaycastHit)(ref hit)).transform, 1, 1f, chargeCheck)) { result = true; } targetsThisSwing.Clear(); } } return result; } private bool AltSwingCheck() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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_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_0045: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0277: 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) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: 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) RaycastHit[] array = Physics.CapsuleCastAll(cc.GetDefaultPos() - ((Component)cc).transform.right, cc.GetDefaultPos() + ((Component)cc).transform.right, 2f, Utils.Aim, 3f, LayerMask.op_Implicit(ignoreEnemyTrigger), (QueryTriggerInteraction)2); bool result = false; EnemyIdentifier eid = default(EnemyIdentifier); EnemyIdentifierIdentifier val = default(EnemyIdentifierIdentifier); MassSpear val2 = default(MassSpear); ParryReceiver val3 = default(ParryReceiver); for (int i = 0; i < array.Length; i++) { hit = array[i]; if (false) { continue; } if (!((Component)((RaycastHit)(ref hit)).collider).TryGetComponent<EnemyIdentifier>(ref eid) && ((Component)((RaycastHit)(ref hit)).collider).TryGetComponent<EnemyIdentifierIdentifier>(ref val)) { eid = val.eid; } if ((Object)(object)eid != (Object)null && !alreadyRiposted) { alreadyRiposted = true; eid.hitter = "riposte"; if (Object.op_Implicit((Object)(object)eid.zombie)) { Zombie zombie = eid.zombie; if (zombie != null) { zombie.GetHurt(((Component)eid).gameObject, Vector3.zero, 0f, 0f, ((Component)this).gameObject, false); } } else if (Object.op_Implicit((Object)(object)eid.machine)) { Machine machine = eid.machine; if (machine != null) { machine.GetHurt(((Component)eid).gameObject, Vector3.zero, 0f, 0f, ((Component)this).gameObject, false); } } else if (Object.op_Implicit((Object)(object)eid.spider)) { SpiderBody spider = eid.spider; if (spider != null) { spider.GetHurt(((Component)eid).gameObject, Vector3.zero, Vector3.zero, 0f, ((Component)this).gameObject); } } else if (Object.op_Implicit((Object)(object)eid.drone) && eid.drone.crashing) { Drone drone = eid.drone; if (drone != null) { drone.GetHurt(Vector3.zero, 0f, ((Component)this).gameObject, false); } } } if (!alreadyRiposted && ((Component)((RaycastHit)(ref hit)).collider).TryGetComponent<MassSpear>(ref val2)) { val2.GetHurt(15f); anim.Play("Hook", -1, 0.065f); Object.Instantiate<GameObject>(riposteSound); Riposte(); alreadyRiposted = true; } if (!alreadyRiposted && ((Component)((RaycastHit)(ref hit)).collider).TryGetComponent<ParryReceiver>(ref val3)) { anim.Play("Hook", -1, 0.065f); Object.Instantiate<GameObject>(riposteSound); Riposte(); alreadyRiposted = true; } if (SwingSuccess(((RaycastHit)(ref hit)).point, ((RaycastHit)(ref hit)).transform, 1)) { result = true; } } alreadyRiposted = false; return result; } private void LightSwingAnim() { if (MonoSingleton<PrefsManager>.Instance.GetInt("weaponHoldPosition", 0) == 1) { anim.Play("MiddleSwing", -1, 0f); } else { anim.Play("SwingLight1", -1, 0f); } } public void Riposte() { MonoSingleton<TimeController>.Instance.ParryFlash(); MonoSingleton<StyleHUD>.Instance.AddPoints(100, "justice.parry", (GameObject)null, (EnemyIdentifier)null, -1, "", ""); anim.Play("Hook", -1, 0.065f); Object.Instantiate<GameObject>(riposteSound); } private void StartCharge() { //IL_0093: 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_00aa: 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_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_0102: Unknown result type (might be due to invalid IL or missing references) charging = true; anim.Play("HeavySwing", -1, 0f); Object.Instantiate<GameObject>(swingSound); if (!NoWeaponCooldown.NoCooldown) { if (NewWeaponCharges.sword0Exhaust <= 0f) { NewWeaponCharges.sword0Exhaust += 1f; } else if (NewWeaponCharges.sword0Exhaust < 9.87f) { NewWeaponCharges.sword0Exhaust += 2f; } } AddFardDamage(chargeAnti); lastChargeEid = null; chargeTime = 0.8f; chargeFwd = ((Component)MonoSingleton<CameraController>.Instance).transform.forward; NewMovement instance = MonoSingleton<NewMovement>.Instance; Vector3 velocity = instance.rb.velocity; chargeMag = ((Vector3)(ref velocity)).magnitude * Time.fixedDeltaTime; if (chargeMag < 200f) { chargeMag = 200f; } Vector3 velocity2 = chargeFwd * chargeMag; velocity2.y -= 12f; instance.rb.velocity = velocity2; } private void ChargeChecks() { //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_015a: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_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_00eb: 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) if (!Object.op_Implicit((Object)(object)wid) || wid.delay == 0f) { float num = Time.deltaTime; if (alt) { num *= 0.7f; } chargeTime -= num; if (chargeTime <= 0f) { EndCharge(); } NewMovement instance = MonoSingleton<NewMovement>.Instance; if (alt) { chargeFwd = ((Component)MonoSingleton<CameraController>.Instance).transform.forward; } Vector3 val = chargeFwd * (chargeMag / 2f) * Mathf.Clamp(chargeTime, 0.2f, 2f); val.y -= 12f * Mathf.Clamp(NewWeaponCharges.sword0Exhaust, 0f, 999f); if (alt) { val *= 0.7f; } instance.rb.velocity = val; AddFardDamage(chargeAntiRate * Time.deltaTime); } SwingCheck(chargeCheck: true); if (Physics.Raycast(cc.GetDefaultPos(), Utils.Aim, ref hit, 4f, LayerMask.op_Implicit(environmentMask), (QueryTriggerInteraction)2) || Physics.SphereCast(cc.GetDefaultPos(), 1f, Utils.Aim, ref hit, 4f, LayerMask.op_Implicit(environmentMask), (QueryTriggerInteraction)2)) { Glass component = ((Component)((RaycastHit)(ref hit)).transform).gameObject.GetComponent<Glass>(); Breakable val2 = default(Breakable); if ((Object)(object)component != (Object)null) { component.Shatter(); } else if (((Component)((RaycastHit)(ref hit)).transform).gameObject.TryGetComponent<Breakable>(ref val2) && !val2.precisionOnly) { val2.Break(); } } } public void EndCharge() { //IL_0046: 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) aud.Stop(); chargeTime = 0f; charging = false; anim.CrossFade("Idle", 0.5f); MonoSingleton<NewMovement>.Instance.rb.velocity = Vector3.ClampMagnitude(MonoSingleton<NewMovement>.Instance.rb.velocity, 50f); if (NoWeaponCooldown.NoCooldown) { NewWeaponCharges.sword0Exhaust = -1f; NewWeaponCharges.sword0Charge = 0f; } } private void StartJudgementCut() { splendorChargeTime = 0f; aud.clip = splendorChargeSound; aud.pitch = splendorChargeTime; aud.loop = true; aud.volume = splendorChargeTime; aud.Play(); anim.Play("JusticeCharge", -1, 0f); charging = true; bubbles = new List<SplendorBubble>(); CreateBubble(); } private void UpdateJudgementCut() { //IL_007f: 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_00a0: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: 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) PlayerInput inputSource = MonoSingleton<InputManager>.Instance.InputSource; if (inputSource.Fire2.IsPressed && !charging && NewWeaponCharges.sword1SCharge >= NewWeaponCharges.sword1SMax / 2f) { StartJudgementCut(); } if (inputSource.Fire2.WasCanceledThisFrame && charging) { EndJudgementCut(); } for (int i = 0; i < splendorChargeBar.Length; i++) { Image val = splendorChargeBar[i]; val.fillAmount = NewWeaponCharges.sword1SCharge / NewWeaponCharges.sword1SMax; Color val2 = MonoSingleton<ColorBlindSettings>.Instance.variationColors[variation]; if (NewWeaponCharges.sword1SCharge >= NewWeaponCharges.sword1SMax / 2f || charging) { ((Graphic)val).color = val2; } else { ((Graphic)val).color = Color.Lerp(val2, Color.black, 0.8f); } } if (charging) { splendorChargeTime = Mathf.MoveTowards(splendorChargeTime, 1f, Time.deltaTime * 3f); aud.pitch = splendorChargeTime; aud.volume = splendorChargeTime; ((Component)this).transform.localPosition = wpos.currentDefault + Random.insideUnitSphere * splendorChargeTime * 0.1f; } } public void CreateBubble() { //IL_0010: 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) SplendorBubble item = (curBubble = Object.Instantiate<GameObject>(splendorBubble, ((Component)MonoSingleton<NewMovement>.Instance).transform.position, Quaternion.identity).GetComponent<SplendorBubble>()); curBubble.sword = this; curBubble.alt = alt; curBubble.sourceWeapon = ((Component)this).gameObject; bubbles.Add(item); } public void EndJudgementCut() { if (!NoWeaponCooldown.NoCooldown && NewWeaponCharges.sword1SCharge > 0f) { NewWeaponCharges.sword1SCharge -= NewWeaponCharges.sword1SMax / 2f; if (NewWeaponCharges.sword1SCharge < 0f) { NewWeaponCharges.sword1SCharge = 0f; } } aud.Stop(); LightSwingAnim(); charging = false; foreach (SplendorBubble bubble in bubbles) { if (!((Object)(object)bubble == (Object)null)) { bubble.Kill(); } } curBubble = null; bubbles = null; SplendorBubble.ClearEids(); } public void SilenceThrow() { //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) GameObject val = Object.Instantiate<GameObject>(silenceThrownSword, ((Component)cc).transform.position, Quaternion.LookRotation(Utils.Aim)); silenceSword = val.GetComponent<ThrownSilence>(); if (alt) { silenceSword.SwitchToAlt(); } silenceSword.origin = this; silenceSword.camera = ((Component)cc).transform; ((Renderer)swordRenderer).enabled = false; silenceThrown = true; Object.Instantiate<GameObject>(silenceThrowEffect); } public void SilenceReturned() { silenceSword = null; } public void SilenceCatch() { silenceCaughtBuffer = false; silenceThrown = false; ((Renderer)swordRenderer).enabled = true; Object.Instantiate<GameObject>(silenceCatchEffect); } private void Swing() { //IL_004c: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) targetsThisSwing.Clear(); NewWeaponCharges.sword0Charge = 0f; LightSwingAnim(); bool flag = false; flag = (alt ? AltSwingCheck() : SwingCheck()); cc.CameraShake(0.3f); Vector3 defaultPos = cc.GetDefaultPos(); defaultPos.y -= 0.4f; SpawnProjectile(defaultPos, Utils.Aim); Vector3 up = ((Component)cc).transform.up; if (!alt) { Vector3 aim = Utils.Aim; aim = Quaternion.AngleAxis(0f - spread, up) * aim; Vector3 aim2 = Utils.Aim; aim2 = Quaternion.AngleAxis(spread, up) * aim2; SpawnProjectile(defaultPos, aim, 1f, 1f, parriable: false); SpawnProjectile(defaultPos, aim2, 1f, 1f, parriable: false); } if (!flag) { Object.Instantiate<GameObject>(swingSound); } } private GameObject SpawnProjectile(Vector3 pos, Vector3 dir, float mod = 1f, float speedMod = 1f, bool parriable = true) { //IL_0015: 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_001c: 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_0026: 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_002f: 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) float num = (alt ? 3f : 0.8f); pos += Utils.Aim * num; GameObject obj = Object.Instantiate<GameObject>(swingProjectile, pos, Quaternion.identity); obj.transform.forward = dir; Projectile component = obj.GetComponent<Projectile>(); if ((Object)(object)component != (Object)null) { component.sourceWeapon = ((Component)this).gameObject; component.weaponType = "swordprojectile" + variation; component.damage = swingDamage * mod; component.speed += speedMod; component.turnSpeed += speedMod * 10f; component.unparryable = !parriable; } return obj; } public bool SwingSuccess(Vector3 point, Transform target, int total, float dmgMult = 1f, bool checkLastEid = false) { //IL_00ff: 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_01b3: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) StakeSpinning stakeSpinning = default(StakeSpinning); if (((Component)target).gameObject.tag == "Enemy" || ((Component)target).gameObject.tag == "Head" || ((Component)target).gameObject.tag == "Body" || ((Component)target).gameObject.tag == "Limb" || ((Component)target).gameObject.tag == "EndLimb") { EnemyIdentifier val = null; EnemyIdentifierIdentifier val2 = default(EnemyIdentifierIdentifier); if (((Component)target).TryGetComponent<EnemyIdentifierIdentifier>(ref val2)) { val = val2.eid; } else { ((Component)target).TryGetComponent<EnemyIdentifier>(ref val); } if (Object.op_Implicit((Object)(object)val)) { if (val.dead) { return false; } if (targetsThisSwing.Contains(val)) { return false; } targetsThisSwing.Add(val); if (checkLastEid) { if ((Object)(object)lastChargeEid == (Object)(object)val) { return false; } lastChargeEid = val; } Object.Instantiate<GameObject>(swingHitSound); if (Object.op_Implicit((Object)(object)sliceFX)) { Object.Instantiate<GameObject>(sliceFX, point, Quaternion.identity); } if (!val.hitterWeapons.Contains("swordmelee" + variation)) { val.hitterWeapons.Add("swordmelee" + variation); } MonoSingleton<TimeController>.Instance.HitStop(0.05f); cc.CameraShake(0.5f); shud.AddPoints(1, "justice.pierce", ((Component)this).gameObject, (EnemyIdentifier)null, -1, "", ""); val.hitter = "slice" + (alt ? "alt" : ""); Vector3 val3 = Utils.Aim * -3000f; if (alt) { val3 *= -25f; } val.DeliverDamage(((Component)target).gameObject, val3, point, swingDamage / (float)total, alt, 1f, (GameObject)null, false, false); return true; } } else if (((Component)target).gameObject.tag == "Coin") { Coin component = ((Component)target).GetComponent<Coin>(); if (!Object.op_Implicit((Object)(object)component) || !component.doubled) { return false; } Coin component2 = ((Component)target).GetComponent<Coin>(); if (component2 != null) { component2.DelayedPunchflection(); } } else if (((Component)target).gameObject.layer == 14 && ((Component)target.root).TryGetComponent<StakeSpinning>(ref stakeSpinning)) { stakeSpinning.NewBreak(); return true; } return false; } private void GetStuff() { //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_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_005e: 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_0073: Unknown result type (might be due to invalid IL or missing references) environmentMask = LayerMask.op_Implicit(LayerMask.GetMask(new string[3] { "Environment", "Outdoors", "Item" })); ignoreEnemyTrigger = LayerMask.op_Implicit(LayerMask.GetMask(new string[3] { "Limb", "BigCorpse", "Projectile" })); enemyMask = LayerMask.op_Implicit(LayerMask.op_Implicit(enemyMask) | 0x400); shud = MonoSingleton<StyleHUD>.Instance; targeter = ((Component)Camera.main).GetComponent<CameraFrustumTargeter>(); inman = MonoSingleton<InputManager>.Instance; wid = ((Component)this).GetComponent<WeaponIdentifier>(); aud = ((Component)this).GetComponent<AudioSource>(); cc = MonoSingleton<CameraController>.Instance; cam = ((Component)cc).GetComponent<Camera>(); smr = ((Component)this).GetComponentInChildren<SkinnedMeshRenderer>(); gc = ((Component)this).GetComponentInParent<GunControl>(); anim = ((Component)this).GetComponentInChildren<Animator>(); wpos = ((Component)this).GetComponent<WeaponPos>(); wc = MonoSingleton<WeaponCharges>.Instance; } } public class SwordAnimationReceiver : MonoBehaviour { private Railsword sword; private void Start() { sword = ((Component)this).GetComponentInParent<Railsword>(); } public void SilenceThrow() { sword.SilenceThrow(); } public void SilenceCatch() { sword.SilenceCatch(); } } public static class MetaDatabase { public static GameObject newShopPrefab; public static AssetReference blueArm; public static AssetReference redArm; public static ProphetResources resources; public static CustomTerminal terminal; private const string StageAddonsNamespace = "ProjectProphet.StageAddons"; public static Dictionary<int, StageAddon> sceneToAddon; public static Dictionary<int, TipOfTheDay> levelNumberToTip; public static Dictionary<string, TipOfTheDay> levelNameToTip; public static List<KeyValuePair<string, string>> styleKVPs; public static List<KeyValuePair<string, float>> freshnessKVPs; public static SpawnableObject[] CustomEnemies; private static Dictionary<EnemyType, KeyValuePair<string, float>[]> enemyWeaknesses; public static void InitWeps() { //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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_006f: 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) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"ProjectProphet.Resources").WaitForCompletion(); resources = val.GetComponent<ProphetResources>(); ScriptableObject[] enemyEntries = resources.enemyEntries; List<SpawnableObject> list = new List<SpawnableObject>(); ScriptableObject[] array = enemyEntries; foreach (ScriptableObject val2 in array) { list.Add((SpawnableObject)val2); } CustomEnemies = list.ToArray(); terminal = val.GetComponent<CustomTerminal>(); newShopPrefab = Addressables.LoadAssetAsync<GameObject>((object)"ProjectProphet.Resources.ShopDefault").WaitForCompletion(); } public static void InitStageAddons() { sceneToAddon = new Dictionary<int, StageAddon>(); levelNumberToTip = new Dictionary<int, TipOfTheDay>(); levelNameToTip = new Dictionary<string, TipOfTheDay>(); Type[] types = Assembly.GetExecutingAssembly().GetTypes(); foreach (Type type in types) { if (type.Namespace != "ProjectProphet.StageAddons") { continue; } MethodInfo[] methods = type.GetMethods(); foreach (MethodInfo methodInfo in methods) { StageAddon customAttribute = methodInfo.GetCustomAttribute<StageAddon>(); if (customAttribute != null) { Utils.Log($"Found method {methodInfo.Name} in class {methodInfo.DeclaringType.Name} with level name of {customAttribute.stage}"); customAttribute.SetMethodInfo(methodInfo); sceneToAddon.Add(customAttribute.stage, customAttribute); } } FieldInfo[] fields = type.GetFields(); foreach (FieldInfo fieldInfo in fields) { TipOfTheDay customAttribute2 = fieldInfo.GetCustomAttribute<TipOfTheDay>(); if (customAttribute2 != null) { customAttribute2.SetMethodInfo(fieldInfo); Utils.Log($"Found field {fieldInfo.Name} in class {fieldInfo.DeclaringType.Name} with level name of {customAttribute2.stage}"); if (string.IsNullOrEmpty(customAttribute2.sceneOverride)) { levelNumberToTip.Add(customAttribute2.stage, customAttribute2); } else { levelNameToTip.Add(customAttribute2.sceneOverride, customAttribute2); } } } } } public static void InitStyleKVPs() { styleKVPs = new List<KeyValuePair<string, string>>(); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.icespike", "GLITTERFREEZE")); styleKVPs.Add(new KeyValuePair<string, string>("ultrakill.glitterballed", "GLITTERFREEZE")); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.silenceparry", "<color=#00ff00ff>DO IT AGAIN</color>")); styleKVPs.Add(new KeyValuePair<string, string>("ultrakill.glitterboost", "<color=#00ff00ff>GLITTERBOOST</color>")); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.splendorkill", "<color=#00ffffff>SUSHI</color>")); styleKVPs.Add(new KeyValuePair<string, string>("justice.parry", "<color=green>RIPOSTE</color>")); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.blur", "<color=#00ff00ff>BLUR</color>")); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.blur.burn", "<color=#00ffffff>TENDER</color><color=#00ff00ff>BLUR</color>")); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.afterburn", "<color=#00ffffff>AFTERBURNER</color>")); styleKVPs.Add(new KeyValuePair<string, string>("justice.hit", string.Empty)); styleKVPs.Add(new KeyValuePair<string, string>("crossbow.stake", string.Empty)); styleKVPs.Add(new KeyValuePair<string, string>("justice.pierce", string.Empty)); styleKVPs.Add(new KeyValuePair<string, string>("magicred.smoke", string.Empty)); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.iceleech", string.Empty)); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.splendor", string.Empty)); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.ice", string.Empty)); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.silence", string.Empty)); styleKVPs.Add(new KeyValuePair<string, string>("ultrakill.glitterballedfrombounce", string.Empty)); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.silencekill", "<color=#00ffffff>CHOP</color>")); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.daggertimed", "<color=#00ff00ff>MIRAGE</color>")); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.dagger.burn", "<color=#00ffffff>RED BIND</color>")); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.beamboost", "<color=#00ffffff>IMPLODED</color>")); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.daggerpierce", string.Empty)); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.daggerside", "BLENDER")); styleKVPs.Add(new KeyValuePair<string, string>("gabriel.daggersidehit", string.Empty)); freshnessKVPs = new List<KeyValuePair<string, float>>(); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.beamboost", 0.5f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.silenceparry", 0.25f)); freshnessKVPs.Add(new KeyValuePair<string, float>("crossbow.stake", 0.35f)); freshnessKVPs.Add(new KeyValuePair<string, float>("justice.hit", 0.2f)); freshnessKVPs.Add(new KeyValuePair<string, float>("justice.pierce", 0.2f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.inlight", 1.4f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.splendor", 1.1f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.splendorkill", 1.3f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.silence", 0.5f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.silencekill", 1.2f)); freshnessKVPs.Add(new KeyValuePair<string, float>("justice.parry", 2f)); freshnessKVPs.Add(new KeyValuePair<string, float>("magicred.smoke", 0.5f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.blur.burn", 0.2f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.dagger.burn", 0.4f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.ice", 0.4f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.icespike", 0.7f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.iceleech", 0.25f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.daggertimed", 0.5f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.daggerpierce", 0.1f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.daggerside", 0.8f)); freshnessKVPs.Add(new KeyValuePair<string, float>("gabriel.daggersidehit", 0.15f)); enemyWeaknesses = new Dictionary<EnemyType, KeyValuePair<string, float>[]>(); enemyWeaknesses.Add((EnemyType)11, new KeyValuePair<string, float>[1] { new KeyValuePair<string, float>("magicred.smoke", 5f) }); } } public enum CustomEnemyType { CancerousRodentPrime = 4200, SingularRodentPrime } [Serializable] public class ProphetProgress { public bool wrathSwitch1; public bool wrathSwitch2; public bool wrathSwitch3; } public static class Utils { public static bool notifLaunched; private static string _bundleProjectPath; private static string _packedPath; private static ManualLogSource logSource; private const string WRATH_PROGRESS = "prophet.bepis"; private static Dictionary<AssetReference, AsyncOperationHandle<GameObject>> LoadedWeapons = new Dictionary<AssetReference, AsyncOperationHandle<GameObject>>(); public static bool sanitizePreventer; public static bool versionMismatch; public const string ultrakillVersionName = "ULTRA_REVAMP Patch 16d"; private const string ultrakillVersionGUID = "65f407becf604a2f80164ef0ea4bb8f2"; private static CameraFrustumTargeter targeter; public static StyleHUD shud => MonoSingleton<StyleHUD>.Instance; public static GunControl gc => MonoSingleton<GunControl>.Instance; public static WeaponCharges wc => MonoSingleton<WeaponCharges>.Instance; public static TimeController timeController => MonoSingleton<TimeController>.Instance; public static string BundleProjectPath { get { if (string.IsNullOrEmpty(_bundleProjectPath)) { _bundleProjectPath = Path.Combine("Assets", "Custom", "Maranara", "Code Mods", "Prophet"); } return _bundleProjectPath; } } public static string PackedPath { get { if (string.IsNullOrEmpty(_packedPath)) { _packedPath = Path.Combine(ModPath() ?? "", "bundles"); } return _packedPath; } } public static AssetBundle curStageBundle { get; private set; } public static Vector3 Aim { get { //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_0073: 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_0056: 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_0065: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)targeter == (Object)null) { targeter = MonoSingleton<CameraFrustumTargeter>.Instance; } Vector3 result = ((Component)MonoSingleton<CameraController>.Instance).transform.forward; if (Object.op_Implicit((Object)(object)targeter.CurrentTarget) && targeter.IsAutoAimed) { Bounds bounds = targeter.CurrentTarget.bounds; Vector3 val = ((Bounds)(ref bounds)).center - MonoSingleton<CameraController>.Instance.GetDefaultPos(); result = ((Vector3)(ref val)).normalized; } return result; } } private static string ModPath() { return Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf("\\")); } public static void Log(string log) { } public static void LogError(string log) { if (logSource == null) { logSource = Logger.CreateLogSource("md"); } logSource.LogError((object)log); } public static void Log(object log) { Log(log.ToString()); } public static Vector3 ClampMagnitude(this Vector3 v, float max, float min) { //IL_0013: 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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) double num = ((Vector3)(ref v)).sqrMagnitude; if (num > (double)max * (double)max) { return ((Vector3)(ref v)).normalized * max; } if (num < (double)min * (double)min) { return ((Vector3)(ref v)).normalized * min; } return v; } public static ProphetProgress ReadWrathProgress() { ProphetProgress prophetProgress = (ProphetProgress)GameProgressSaver.ReadFile(Path.Combine(GameProgressSaver.SavePath, "prophet.bepis")); if (prophetProgress == null) { return new ProphetProgress(); } return prophetProgress; } public static void WriteWrathProgress(ProphetProgress progress) { GameProgressSaver.WriteFile(Path.Combine(GameProgressSaver.SavePath, "prophet.bepis"), (object)progress); } public static void HurtButDontKill(int damage) { NewMovement instance = MonoSingleton<NewMovement>.Instance; int num = 0; if (instance.hp != 1) { num = ((instance.hp > damage) ? damage : (instance.hp - 1)); instance.GetHurt(num, false, 1f, false, false, 0.35f, false); } } public static void PrintResources() { } public static bool CastLevelNameToInt(string name, out int result) { name = name.Substring(name.Length - 3); name = name.Remove(1, 1); return int.TryParse(name, out result); } public static GameObject GetWeaponFromRef(AssetReference asset) { //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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0036: Unknown result type (might be due to invalid IL or missing references) if (LoadedWeapons.TryGetValue(asset, out var value)) { return value.Result; } AsyncOperationHandle<GameObject> value2 = Addressables.LoadAssetAsync<GameObject>((object)asset); value2.WaitForCompletion(); if ((int)value2.Status == 1) { LoadedWeapons.Add(asset, value2); return value2.Result; } return null; } public static void SetAssRefField(AssetReference asset, Traverse field, int i = -1) { GameObject weaponFromRef = GetWeaponFromRef(asset); if ((Object)(object)weaponFromRef != (Object)null && field != null) { if (i == -1) { field.SetValue((object)weaponFromRef); return; } GameObject[] array = (GameObject[])field.GetValue(); array[i] = weaponFromRef; field.SetValue((object)array); } } public static GameObject LoadAndInstantiateStage(string levelName) { //IL_0015: 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) Log("Starting to load additive stage..."); return Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)("ProjectProphet.LevelAdd." + levelName)).WaitForCompletion()); } private static IEnumerator Loading(string lvl) { AsyncOperationHandle<GameObject> op = Addressables.LoadAssetAsync<GameObject>((object)("ProjectProphet.LevelAdd." + lvl)); while ((int)op.Status != 1) { yield return (object)new WaitForEndOfFrame(); } Object.Instantiate<GameObject>(op.Result); } public static void LoadCustomScene(string levelName) { sanitizePreventer = true; SceneHelper.LoadScene(levelName, false); sanitizePreventer = false; } public static void CheckUltrakillVersion() { if (Application.buildGUID != "65f407becf604a2f80164ef0ea4bb8f2") { Log("VERSION MISMATCH: <" + Application.buildGUID + "> != <65f407becf604a2f80164ef0ea4bb8f2>"); versionMismatch = true; } } public static void UnlockWare(int ware, string pPref) { if (pPref != "" && (GameProgressSaver.CheckGear(pPref) == 0 || MonoSingleton<PrefsManager>.Instance.GetInt("ware." + pPref, 0) == 0)) { MonoSingleton<PrefsManager>.Instance.SetInt("weapon." + pPref, 1); if (!SceneHelper.IsPlayingCustom) { GameProgressSaver.AddGear(pPref); } } } public static void SetLayerRecursive(this GameObject _go, int _layer) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown _go.layer = _layer; foreach (Transform item in _go.transform) { Transform val = item; ((Component)val).gameObject.layer = _layer; if ((Object)(object)((Component)val).GetComponentInChildren<Transform>() != (Object)null) { ((Component)val).gameObject.SetLayerRecursive(_layer); } } } } [BepInPlugin("maranara_project_prophet", "Masquerade Divinity", "0.1.4")] public class ProjectProphet : BaseUnityPlugin { public const string VERSION_NUMBER = "0.1.4"; public static bool gabeOn; public static Harmony harmony; private const string PATCHING_NAMESPACE = "ProjectProphet.Patching.GabrielPatches"; private static ProjectProphet inst; public static ConfigEntry<bool> DidPopup; private void OnEnable() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; ((Object)((Component)ThreadingHelper.Instance).gameObject).hideFlags = (HideFlags)61; inst = this; DidPopup = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "SawPopup", false, (ConfigDescription)null); Utils.CheckUltrakillVersion(); harmony = new Harmony("maranara_project_prophet"); ((MonoBehaviour)this).StartCoroutine(LoadContent()); MetaDatabase.InitStageAddons(); MetaDatabase.InitStyleKVPs(); new Harmony("maranara_project_prophet-save").PatchAll(typeof(UniversalPatches)); } public static void SwitchGabe(bool enableGabriel) { //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) if (enableGabriel == gabeOn) { return; } gabeOn = enableGabriel; if (enableGabriel) { Utils.notifLaunched = false; foreach (Type item in from t in Assembly.GetExecutingAssembly().GetTypes() where t.IsClass && t.Namespace == "ProjectProphet.Patching.GabrielPatches" select t) { harmony.PatchAll(item); } Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).buildIndex != 1 && (Object)(object)MonoSingleton<OptionsManager>.Instance != (Object)null) { MonoSingleton<OptionsManager>.Instance.QuitMission(); } if (MetaDatabase.CustomEnemies != null) { MonoSingleton<BestiaryData>.Instance.CheckSave(); } ModdedBehaviour.Patch(); } else { harmony.UnpatchSelf(); MonoSingleton<OptionsManager>.Instance.QuitMission(); Damned.Disable(); PlayerPatches.ResetScrape(); ModdedBehaviour.Unpatch(); } } private IEnumerator LoadContent() { AsyncOperationHandle<IResourceLocator> res = Addressables.LoadContentCatalogAsync(Path.Combine(Utils.PackedPath ?? "", "projectprophet.json"), true, (string)null); while (!res.IsDone) { yield return null; } MetaDatabase.InitWeps(); } public static void ToggleOffPopup() { inst.PopupOff(); } private void PopupOff() { DidPopup.Value = true; ((BaseUnityPlugin)this).Config.Save(); } } } namespace ProjectProphet.StageAddons { public static class G11 { [StageAddon(11, true)] public static void HeartOfTheSunrise() { //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: 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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Expected O, but got Unknown //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Expected O, but got Unknown //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) GameObject val = Utils.LoadAndInstantiateStage("11"); val.transform.Find("EasterEggSlab").SetParent((Transform)null, true); ArenaStatus[] array = Resources.FindObjectsOfTypeAll<ArenaStatus>(); foreach (ArenaStatus val2 in array) { if (((Object)((Component)val2).gameObject).name == "1 - First Field") { CoinActivated[] componentsInChildren = ((Component)val2).gameObject.GetComponentsInChildren<CoinActivated>(); for (int j = 0; j < componentsInChildren.Length; j++) { Object.Destroy((Object)(object)componentsInChildren[j]); } } } GoreZone[] array2 = Resources.FindObjectsOfTypeAll<GoreZone>(); foreach (GoreZone val3 in array2) { if (((Object)((Component)val3).gameObject).name == "1 Stuff") { Transform obj = val.transform.Find("Cerberus"); Transform val5 = (obj.parent = ((Component)val3).transform.Find("Fountain")); obj.localPosition = new Vector3(-0.45f, 0f, 0.54f); obj.localRotation = Quaternion.Euler(0f, 180f, 0f); obj.localScale = Vector3.one; obj.SetParent(val5.parent, true); ObjectActivator componentInChildren = ((Component)obj).gameObject.GetComponentInChildren<ObjectActivator>(true); List<GameObject> list = new List<GameObject>(); list.AddRange(componentInChildren.events.toDisActivateObjects); list.Add(((Component)val5).gameObject); componentInChildren.events.toDisActivateObjects = list.ToArray(); } else if (((Object)((Component)val3).gameObject).name == "6 Stuff") { Transform val6 = ((Component)val3).transform.parent.Find("6 Nonstuff"); val.transform.SetParent(val6, false); val.transform.localPosition = Vector3.zero; val.transform.localRotation = Quaternion.identity; val.transform.localScale = Vector3.one; ((Component)val6.Find("Ground").GetChild(0)).gameObject.SetActive(false); ((Component)val6.Find("Decorations/Marble_Head_AnimTest")).gameObject.SetActive(false); } else if (((Object)((Component)val3).gameObject).name == "9 Stuff") { GameObject val7 = new GameObject("Malicious Face Delayer"); val7.SetActive(false); val7.transform.SetParent(((Component)val3).transform); GameObject gameObject = ((Component)((Component)val3).transform.Find("Enemies/Spider")).gameObject; ObjectActivator val8 = val7.AddComponent<ObjectActivator>(); val8.oneTime = true; val8.events = new UltrakillEvent(); val8.events.toActivateObjects = (GameObject[])(object)new GameObject[1] { gameObject }; val8.delay = 5.25f; ((Component)((Component)val3).transform.Find("Enemies/EnemyTrigger")).gameObject.GetComponent<ActivateArena>().enemies = (GameObject[])(object)new GameObject[1] { val7 }; WeaponPickUp component = ((Component)((Component)((Component)val3).transform.parent.Find("9 Nonstuff")).transform.Find("Weapon Pickup")).gameObject.GetComponent<WeaponPickUp>(); component.weapon = null; component.inventorySlot = 1; component.gs = null; component.pPref = "arm1"; component.arm = true; ((Component)((Component)component).transform.Find("Nailgun New New")).gameObject.SetActive(false); Transform obj2 = val.transform.Find("Axe"); obj2.SetParent(((Component)component).transform); obj2.localPosition = Vector3.zero; obj2.localRotation = Quaternion.identity; obj2.localScale = Vector3.one; } else if (((Object)((Component)val3).gameObject).name == "10 Stuff") { ((Component)val3).transform.parent.Find("10 Nonstuff"); HudMessage component2 = ((Component)((Component)val3).transform.Find("Magnet Tutorial")).gameObject.GetComponent<HudMessage>(); component2.message = "<color=#00FFFF>SOMNIA</color>: Hold <color=orange>"; component2.actionReference = InputActionReference.Create(MonoSingleton<InputManager>.Instance.defaultActions.FindAction("Fist/Punch", false)); component2.message2 = "</color> to throw your <color=orange>AXE</color>. Can be hit to increase speed and damage."; } } Transform val9 = val.transform.Find("Switch Location"); LimboSwitch obj3 = Resources.FindObjectsOfTypeAll<LimboSwitch>()[0]; Transform parent = ((Component)obj3).transform.parent; parent.SetParent(val9, true); parent.localPosition = Vector3.zero; parent.localRotation = Quaternion.identity; ((Component)parent).gameObject.layer = 8; ((Component)obj3).gameObject.layer = 8; } } public static class G12 { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__4_0; internal void <CancerousRodent>b__4_0() { Camera.main.useOcclusionCulling = false; } } [StageAddon(12, true)] public static void SigmaRat() { LimboSwitch lSwitch = Resources.FindObjectsOfTypeAll<LimboSwitch>()[0]; GameObject obj = Utils.LoadAndInstantiateStage("12"); DaggerPlacement(obj.transform.Find("DaggerGrp"), lSwitch); CancerousRodent(obj.transform.Find("RodentGrp"), lSwitch); NailgunRemover(); } private static void NailgunRemover() { WeaponPickUp[] array = Resources.FindObjectsOfTypeAll<WeaponPickUp>(); foreach (WeaponPickUp val in array) { if (Object.op_Implicit((Object)(object)((Component)val).transform.parent) && ((Object)((Component)((Component)val).transform.parent).gameObject).name == "1 - First Room") { Object.Destroy((Object)(object)((Component)val).gameObject); } } } private static void DaggerPlacement(Transform lvl, LimboSwitch lSwitch) { //IL_00bc: 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_00dc: 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_0040: 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_005a: Unknown result type (might be due to invalid IL or missing references) CheckPoint[] array = Resources.FindObjectsOfTypeAll<CheckPoint>(); foreach (CheckPoint val in array) { if (Object.op_Implicit((Object)(object)val.toActivate) && ((Object)val.toActivate).name.StartsWith("7")) { Vector3 position = ((Component)val).transform.position; position.z = 406f; ((Component)val).transform.position = position; ((Renderer)((Component)((Component)val).transform.Find("Quad")).gameObject.GetComponent<MeshRenderer>()).enabled = false; } } Transform val2 = ((Component)lSwitch).transform.root.Find("7 Stuff"); ((Component)lvl).transform.SetParent(val2, false); ((Component)lvl).transform.localPosition = Vector3.zero; ((Component)lvl).transform.localRotation = Quaternion.identity; ((Component)lvl).transform.localScale = Vector3.one; ((Component)((Component)val2).transform.Find("CerberusStatue")).gameObject.SetActive(false); Transform val3 = ((Component)val2).transform.Find("StatueFake (1)"); ((Component)val3).transform.localRotation = Quaternion.Euler(0f, 180f, 0f); ((Component)val3).gameObject.SetActive(true); Object.Destroy((Object)(object)((Component)val3.Find("BreakablePedestal")).gameObject); ActivateNextWave componentInChildren = ((Component)lvl).gameObject.GetComponentInChildren<ActivateNextWave>(true); val3.SetParent(((Component)componentInChildren).transform); componentInChildren.CountEnemies(); componentInChildren.doors = ((Component)val2.Find("Enemies")).gameObject.GetComponent<ActivateNextWave>().doors; ObjectActivator component = ((Component)lvl.Find("Activate Enemy")).gameObject.GetComponent<ObjectActivator>(); List<GameObject> list = new List<GameObject>(); list.AddRange(component.events.toActivateObjects); list.Add(((Component)val3.Find("StatueActivator")).gameObject); component.events.toActivateObjects = list.ToArray(); ((Component)lvl).gameObject.GetComponentInChildren<ActivateArena>().doors = componentInChildren.doors; ((Component)lvl.Find("Hud Message")).gameObject.GetComponent<HudMessage>().actionReference = InputActionReference.Create(MonoSingleton<InputManager>.Instance.defaultActions.FindAction("Weapon/Secondary Fire", false)); } private static void PlaceTerminal(Transform shopLoc, string tip) { //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_0025: 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) Transform transform = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"Assets/Prefabs/Levels/Shop.prefab").WaitForCompletion()).transform; transform.SetParent(shopLoc, true); transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; ShopZone component = ((Component)transform).gameObject.GetComponent<ShopZone>(); TMP_Text tipOfTheDay = component.tipOfTheDay; component.tipOfTheDay = null; tipOfTheDay.text = tip; } private static void CancerousRodent(Transform lvl, LimboSwitch lSwitch) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Expected O, but got Unknown //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Expected O, but got Unknown Transform shopLoc = lvl.Find("Shop Placement"); Transform shopLoc2 = lvl.Find("Ratroom/Dynamic/Deathloop Group/Shop Placement"); Transform val = lvl.Find("Switch Location"); Transform parent = ((Component)lSwitch).transform.parent.parent; ((Component)parent.GetChild(7)).gameObject.SetActive(false); ((Component)parent.Find("Arch (17)")).gameObject.SetActive(false); Transform val2 = parent.Find("GreenWater"); val2.GetChild(0).SetParent(val2.parent, true); ((Component)val2).gameObject.SetActive(false); ((Component)lvl).transform.SetParent(parent, false); ((Component)lvl).transform.localPosition = Vector3.zero; ((Component)lvl).transform.localRotation = Quaternion.identity; ((Component)lvl).transform.localScale = Vector3.one; PlaceTerminal(shopLoc, "What."); PlaceTerminal(shopLoc2, "<color=orange>Area denial attacks</color> are the greatest offense against fast, small moving targets."); Transform parent2 = ((Component)lSwitch).transform.parent; parent2.SetParent(val, true); parent2.localPosition = Vector3.zero; parent2.localRotation = Quaternion.identity; ((Component)parent2).gameObject.layer = 8; ((Component)lSwitch).gameObject.layer = 8; GameObject.Find("OutOfBounds").transform.Translate(Vector3.down * 200f); CancerousRodent[] array = Resources.FindObjectsOfTypeAll<CancerousRodent>(); foreach (CancerousRodent val3 in array) { if ((Object)(object)((Component)val3).transform.parent == (Object)null || !(((Object)((Component)((Component)val3).transform.parent).gameObject).name == "VERY")) { continue; } GameObject gameObject = ((Component)((Component)lvl).transform.Find("BossDoorOpen")).gameObject; val3.activateOnDeath = CollectionExtensions.AddItem<GameObject>((IEnumerable<GameObject>)val3.activateOnDeath, gameObject).ToArray(); ObjectActivator obj = gameObject.AddComponent<ObjectActivator>(); obj.events = new UltrakillEvent(); obj.events.onActivate = new UnityEvent(); UnityEvent onActivate = obj.events.onActivate; object obj2 = <>c.<>9__4_0; if (obj2 == null) { UnityAction val4 = delegate { Camera.main.useOcclusionCulling = false; }; <>c.<>9__4_0 = val4; obj2 = (object)val4; } onActivate.AddListener((UnityAction)obj2); break; } } } public static class G14 { [StageAddon(14, true)] public static void PeopleBeLikeIHopeYouFightMichealInClaireDeLuneLIKEWHATAREYOUSERIOUS() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_015a: 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_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) Utils.Log("Wings 1"); GameObject val = Utils.LoadAndInstantiateStage("14"); Utils.Log("Wings 2"); Transform val2 = val.transform.Find("WingsIntro"); Utils.Log("Wings 3"); val2.SetParent(((Component)MonoSingleton<CameraController>.Instance).transform, true); val2.localPosition = Vector3.zero; val2.localRotation = Quaternion.identity; val2.localScale = Vector3.one; Utils.Log("Wings 4"); WeaponPickUp[] array = Resources.FindObjectsOfTypeAll<WeaponPickUp>(); for (int i = 0; i < array.Length; i++) { Utils.Log($"Wings 5: {i}//1"); WeaponPickUp val3 = array[i]; foreach (Transform item in ((Component)val3).transform) { ((Component)item).gameObject.SetActive(false); } Utils.Log($"Wings 5: {i}//2"); Transform transform = Object.Instantiate<GameObject>(((Component)val.transform.Find("Wing Pickup")).gameObject).transform; Utils.Log($"Wings 5: {i}//3"); transform.SetParent(((Component)val3).transform); transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.Euler(270f, 0f, 0f); transform.localScale = Vector3.one; Utils.Log($"Wings 5: {i}//4"); WaresPickUp waresPickUp = ((Component)val3).gameObject.AddComponent<WaresPickUp>(); Utils.Log($"Wings 5: {i}//5"); waresPickUp.activateObj = ((Component)val2).gameObject; waresPickUp.activateObj2 = val3.activateOnPickup; waresPickUp.slot = 1; Utils.Log($"Wings 5: {i}//6"); HudMessage componentInChildren = ((Component)((Component)val3).transform.parent).GetComponentInChildren<HudMessage>(true); Utils.Log($"Wings 5: {i}//7"); componentInChildren.message = "Hold <color=orange>"; Utils.Log($"Wings 5: {i}//8"); componentInChildren.message2 = "</color> while falling to <color=orange>FLY</color>."; Utils.Log($"Wings 5: {i}//9"); componentInChildren.actionReference = InputActionReference.Create(MonoSingleton<InputManager>.Instance.defaultActions.FindAction("Movement/Jump", false)); Utils.Log($"Wings 5: {i}//10"); Object.DestroyImmediate((Object)(object)val3); Utils.Log($"Wings 5: {i}//11"); } Utils.Log("Wings 6"); AltPickUp val4 = Resources.FindObjectsOfTypeAll<AltPickUp>()[0]; foreach (Transform item2 in ((Component)val4).transform) { Object.Destroy((Object)(object)((Component)item2).gameObject); } Transform obj = val.transform.Find("AltSword Pickup"); obj.SetParent(((Component)val4).transform); obj.localPosition = new Vector3(-2.0473f, 3.8109f, -2.5236f); obj.localRotation = Quaternion.Euler(2.355f, 0.7873f, 206.0624f); obj.localScale = Vector3.one * 3f; obj.Find("Rock Pile").SetParent((Transform)null, true); HudMessage[] array2 = Resources.FindObjectsOfTypeAll<HudMessage>(); foreach (HudMessage val5 in array2) { if (((Object)((Component)val5).gameObject).name == "Cube") { val5.message = "<color=orange>GREATSWORD</color>: Higher damage.$No projectiles. Can parry melee attacks."; break; } } } } public static class G1S { public static void NotYet() { Utils.LoadAndInstantiateStage("1s"); } } public class GConstruct { public static void ILaunchedGarrysModAndInstalledAGabrielAvatarAndThisIsTheMostEuphoricExperienceIveHadInMyLife() { Utils.LoadAndInstantiateStage("construct"); } } public static class GEA { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__1_0; public static UnityAction <>9__4_0; internal void <DoorLoader>b__1_0() { LoadEarlyAccess(); } internal void <FinalizeEarlyAccess>b__4_0() { SceneHelper.LoadScene("Main Menu", false); } } public static void EAAssurance() { DoorLoader(); LoadEarlyAccess(); } public static void DoorLoader() { //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_0053: Expected O, but got Unknown try { UnityEvent onFullyOpened = ((Component)GameObject.Find("FirstRoom").transform.Find("Room").Find("FinalDoor")).GetComponent<FinalDoor>().doors[0].onFullyOpened; object obj = <>c.<>9__1_0; if (obj == null) { UnityAction val = delegate { LoadEarlyAccess(); }; <>c.<>9__1_0 = val; obj = (object)val; } onFullyOpened.AddListener((UnityAction)obj); } catch { } } public static void LoadEarlyAccess() { ((MonoBehaviour)ThreadingHelper.Instance).StartCoroutine(WaitAndLoad()); } private static IEnumerator WaitAndLoad() { while (!string.IsNullOrEmpty(SceneHelper.PendingScene)) { yield return (object)new WaitForEndOfFrame(); } try { SceneHelper.LoadScene("ProjectProphet.Scenes.End", false); } catch { SceneManager.LoadScene("Main Menu"); } } public static void FinalizeEarlyAccess() { //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_0033: Expected O, but got Unknown ButtonClickedEvent onClick = GameObject.Find("Quit Mission").GetComponent<Button>().onClick; object obj = <>c.<>9__4_0; if (obj == null) { UnityAction val = delegate { SceneHelper.LoadScene("Main Menu", false); }; <>c.<>9__4_0 = val; obj = (object)val; } ((UnityEvent)onClick).AddListener((UnityAction)obj); } } public static class G02 { [StageAddon(2, true)] public static void WhoUpSwordsingTheyMachineRn() { Utils.Log("Swordsing they machine..."); ConvertToCrossbow(Utils.LoadAndInstantiateStage("02").transform); } public static void ConvertToCrossbow(Transform inst) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) WeaponPickUp[] array = Resources.FindObjectsOfTypeAll<WeaponPickUp>(); foreach (WeaponPickUp val in array) { foreach (Transform item in ((Component)val).transform) { Object.Destroy((Object)(object)((Component)item).gameObject); } ((Component)val).gameObject.GetComponent<Rigidbody>().drag = 10f; Object.Destroy((Object)(object)((Component)val).gameObject.GetComponent<Animator>()); Transform transform = Object.Instantiate<GameObject>(((Component)inst.Find("CrossbowPickup")).gameObject).transform; transform.SetParent(((Component)val).transform); transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; transform.localScale = new Vector3(6.6666665f, 6.6666665f, 5f); Traverse field = Traverse.Create((object)val).Field("weapon"); Utils.SetAssRefField(MetaDatabase.resources.crossbow[0], field); } ((Component)inst.Find("CrossbowPickup")).gameObject.SetActive(false); } } public static class G0S { private const string BalladI = "BALLAD I\r\n\r\nAs I sink deeper below\r\n\r\nKnowing there is no water to swallow,\r\n\r\nI feel each and all parts of me\r\n\r\nCalling your name"; public static void SomethingWicked() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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) ShopZone[] array = Resources.FindObjectsOfTypeAll<ShopZone>(); foreach (ShopZone val in array) { if (((Object)((Component)val).gameObject).name == "Testament Shop (1)") { AudioSource component = ((Component)((Component)val).transform.GetChild(0)).GetComponent<AudioSource>(); component.clip = MetaDatabase.resources.testamentMusic; component.dopplerLevel = 0f; component.Play(); TextMeshProUGUI component2 = ((Component)((Component)val).gameObject.GetComponentInChildren<ScrollingText>(true)).gameObject.GetComponent<TextMeshProUGUI>(); ((TMP_Text)component2).text = "BALLAD I\r\n\r\nAs I sink deeper below\r\n\r\nKnowing there is no water to swallow,\r\n\r\nI feel each and all parts of me\r\n\r\nCalling your name"; ((Graphic)component2).color = Color.blue; ((Component)((Component)val).transform.Find("Canvas/Border")).gameObject.SetActive(true); Transform obj = ((Component)val).transform.Find("Canvas/Border/TipBox"); obj.localScale = new Vector3(1.1f, 1f, 1f); ((Graphic)((Component)obj).GetComponent<Image>()).color = new Color(0f, 0f, 0f, 0.8f); ((Component)obj.GetChild(0)).gameObject.SetActive(false); } } Object.Destroy((Object)(object)MonoSingleton<GunControl>.Instance.slot1[0]); MonoSingleton<GunControl>.Instance.slot1.Clear(); } } public static class GTutorial { private const string IntroText = " STATUS UPDATE: \r\n\r\n MACHINE ID: NOT FOUND ½\r\n LOCATION: UNKNOWN ½\r\n CURRENT OBJECTIVE: RECOVER ½½½\r\n\r\n*THE BLOOD DRIPS_½½\r\n*FROM THIS METAL FRAME_½½\r\n*and½the½sound½is½½divine_½½&"; private const string IntroFadeText = " <color=blue>THE BLOOD DRIPS\r\n FROM THIS METAL FRAME\r\n and the sound is divine</color>"; public static void CalibrateTutorial() { //IL_0053: 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) if ((Object)(object)V62.heresyEndCanvas != (Object)null) { V62.heresyEndCanvas.SetActive(false); Object.DestroyImmediate((Object)(object)V62.heresyEndCanvas); } IntroText[] array = Resources.FindObjectsOfTypeAll<IntroText>(); foreach (IntroText val in array) { if (!(((Object)((Component)val).gameObject).name == "Page 2")) { continue; } Scene scene = ((Component)val).gameObject.scene; if (!(((Scene)(ref scene)).name != "DontDestroyOnLoad") || !((Object)(object)((Component)val).transform.root != (Object)null)) { continue; } val.fullString = " STATUS UPDATE: \r\n\r\n MACHINE ID: NOT FOUND ½\r\n LOCATION: UNKNOWN ½\r\n CURRENT OBJECTIVE: RECOVER ½½½\r\n\r\n*THE BLOOD DRIPS_½½\r\n*FROM THIS METAL FRAME_½½\r\n*and½the½sound½is½½divine_½½&"; ((TMP_Text)((Component)val).gameObject.GetComponent<TextMeshProUGUI>()).text = " STATUS UPDATE: \r\n\r\n MACHINE ID: NOT FOUND ½\r\n LOCATION: UNKNOWN ½\r\n CURRENT OBJECTIVE: RECOVER ½½½\r\n\r\n*THE BLOOD DRIPS_½½\r\n*FROM THIS METAL FRAME_½½\r\n*and½the½sound½is½½divine_½½&"; Transform val2 = ((Component)val).transform.root.Find("Intro"); if (Object.op_Implicit((Object)(object)((Component)val).transform.parent)) { Transform val3 = ((Component)val).transform.parent.Find("Page 2 NoFade"); if (Object.op_Implicit((Object)(object)val3)) { ((TMP_Text)((Component)val3).gameObject.GetComponent<TextMeshProUGUI>()).text = " <color=blue>THE BLOOD DRIPS\r\n FROM THIS METAL FRAME\r\n and the sound is divine</color>"; } } if ((Object)(object)val2 != (Object)null) { Transform val4 = val2.Find("Audio Source"); if ((Object)(object)val4 != (Object)null) { ((Component)val4).gameObject.GetComponent<AudioSource>().clip = MetaDatabase.resources.mainMenuMusic; } } } } } public static class G03 { [StageAddon(3, true)] public static void WokeUltrakillBeLikeSwordstheychine() { //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Expected O, but got Unknown //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) GameObject val = Utils.LoadAndInstantiateStage("03"); GoreZone[] array = Resources.FindObjectsOfTypeAll<GoreZone>(); Transform val2 = null; Transform val3 = null; GoreZone[] array2 = array; foreach (GoreZone val4 in array2) { if (((Object)((Component)val4).gameObject).name == "Most of the Stuff") { val2 = ((Component)val4).transform; } else if (((Object)((Component)val4).gameObject).name == "Boss Arena Contents") { val3 = ((Component)val4).transform; } } Object.Destroy((Object)(object)((Component)val2.Find("NeoBreakable")).gameObject); Object.Destroy((Object)(object)((Component)val2.parent.Find("7 Nonstuff").Find("Leading Hallway").Find("Afterbreak")).gameObject); G02.ConvertToCrossbow(val.transform); HudMessage[] array3 = Resources.FindObjectsOfTypeAll<HudMessage>(); foreach (HudMessage val5 in array3) { if (((Object)((Component)val5).gameObject).name == "Cube (3)") { val5.message = "<color=#00ffff>CROSSBOW</color>: Secondary fire's smokestream also makes projectiles home in on enemies"; } else if (((Object)((Component)((Component)val5).transform.parent).gameObject).name == "Spot Light") { val5.message = "<color=#00ffff>CROSSBOW</color>: Press '<color=orange>"; val5.message2 = "</color>' to launch an ignited stake that fires a flaming stream of smoke."; } } Transform val6 = val3.Find("NeoBreakable"); Object.Destroy((Object)(object)((Component)val6.Find("NeoBreakable (1)")).gameObject); Object.Destroy((Object)(object)((Component)val6.Find("Plane")).gameObject); Object.Destroy((Object)(object)((Component)val6.Find("Quad (1)")).gameObject); Object.Destroy((Object)(object)((Component)val6).GetComponent<Breakable>()); Object.Destroy((Object)(object)((Component)val6).GetComponent<BoxCollider>()); foreach (Transform item in val6.Find("GameObject")) { Transform val7 = item; if (!(((Object)((Component)val7).gameObject).name == "Cube")) { Object.Destroy((Object)(object)((Component)val7).gameObject); } } Transform obj = val.transform.Find("LegaBreaker"); obj.parent = val6; ((Component)obj).transform.localPosition = Vector3.zero; ((Component)obj).transform.localRotation = Quaternion.Euler(0f, 90f, 0f); } } public static class GMuseum { public static void RollCredits() { Utils.LoadAndInstantiateStage("m"); } } public static class G05 { [StageAddon(5, true)] public static void Cerberus() { } } public static class G01 { [StageAddon(1, true)] public static void IntoTheFire() { //IL_015e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)V62.heresyEndCanvas != (Object)null) { Object.Destroy((Object)(object)V62.heresyEndCanvas); } ObjectActivator[] components = GameObject.Find("Credits 1").GetComponents<ObjectActivator>(); ObjectActivator[] components2 = GameObject.Find("Credits 2").GetComponents<ObjectActivator>(); components[0].events.toActivateObjects = components2[0].events.toActivateObjects; components[1].events.toDisActivateObjects = components2[1].events.toDisActivateObjects; GameObject gameObject = components2[0].events.toActivateObjects[0].gameObject; GameObject val = Object.Instantiate<GameObject>(gameObject, gameObject.transform.parent); ((TMP_Text)val.GetComponentInChildren<TextMeshProUGUI>()).text = "A <color=orange>SPECIAL EDITION</color> BY ETHAN \"<color=orange>MARANARA</color>\" MARA"; components2[0].events.toActivateObjects = (GameObject[])(object)new GameObject[1] { val }; components2[1].events.toDisActivateObjects = components2[0].events.toActivateObjects; HudMessage[] array = Object.FindObjectsOfType<HudMessage>(); foreach (HudMessage val2 in array) { if (((Object)((Component)val2).gameObject).name == "Cube (2)") { val2.message = "<color=#40E7FF>SWORD</color>: Press <color=orange>"; val2.message2 = "</color> to <color=orange>LUNGE</color> forward."; break; } } GameObject gameObject2 = ((Component)Utils.LoadAndInstantiateStage("01").transform.GetChild(0)).gameObject; Transform transform = GameObject.Find("RevolverPickUp").transform; ((Component)transform).GetComponent<BoxCollider>().size = new Vector3(2f, 2f, 5.5f); ((Component)transform.GetChild(0)).gameObject.SetActive(false); gameObject2.transform.SetParent(transform, true); ((Component)((Component)Object.FindObjectOfType<OptionsMenuToManager>()).gameObject.transform.GetChild(3).GetChild(2).GetChild(0)).GetComponent<Image>().sprite = MetaDatabase.resources.logo; } } public static class LimboTips { [TipOfTheDay(11)] public static string LimboFirst = "SPLENDOR's secondary fire <color=orange>remains active</color> when holstered, allowing you to <color=orange>combo the slices with other weapons</color> such as MAGIC RED's smoke streams."; [TipOfTheDay(12)] public static string LimboSecond = "The thrown SOMNIA can be hit like <color=orange>any other enemy</color>, meaning weapons like the CROSSBOW can <color=orange>affect the behavior of the axe</color>."; [TipOfTheDay(13)] public static string LimboThird = "While DAGGER rings can typically be collapsed with the DAGGER's secondary fire, they can also be <color=orange>parried with GODFIST</color>. Parrying while the ring <color=orange>flashes</color> activates its special collapse."; [TipOfTheDay(14)] public static string LimboFourth = "ORBIT's special collapse makes the dagger ring fly away in the <color=orange>direction that you're looking</color>. These flying daggers can rebound off of walls and <color=orange>detonate projectiles</color>."; } public static class PreludeTips { [TipOfTheDay("uk_construct")] public static string Construct = "With cheats on, press F8 and type <color=#00FFFF>scene Level 4-2</color>,\n for example, to load Greed's second level."; [TipOfTheDay("Endless")] public static string Cybergrind = "If blown too far off the arena, <color=#00FFFF>JUSTICE's</color> secondary fire is a good way to get back."; [TipOfTheDay("CreditsMuseum2")] public static string Museum = "The <color=orange>Masquerade Divinity</color> developers are located on the <color=orange>second floor</color>."; [TipOfTheDay(2)] public static string PreludeFirst = "While the SWORD's primary swing fires projectiles, it also serves as a <color=orange>melee attack</color> that <color=orange>deals extra damage</color> to close enemies."; [TipOfTheDay(3)] public static string PreludeSecond = "You can cancel JUSTICE's secondary fire <color=orange>with Jump</color>, <color=orange>Slide</color> or your <color=orange>primary fire</color>.\n\nWhen cancelled, you <color=orange>maintain the momentum granted</color> by the secondary fire."; [TipOfTheDay(4)] public static string PreludeThird = "MAGIC RED'S secondary fire, after piercing the environment, can be <color=orange>punched</color> to cause a <color=orange>large explosion</color>."; [TipOfTheDay(5)] public static string PreludeCerberus = "GLITTERFREEZE's secondary stake can be <color=orange>parried</color> while or after leeching off of an enemy.\n\nUse this to <color=orange>chain together multiple attacks</color> with one stake."; } public static class V53 { [StageAddon(53, false)] public static void ShipSecret() { //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Expected O, but got Unknown GameObject val = Utils.LoadAndInstantiateStage("53"); GameObject gabeHologram = null; GameObject upsideDownHologram = null; GameObject upsideDownGlass = null; GameObject[] array = Resources.FindObjectsOfTypeAll<GameObject>(); ObjectActivator component = ((Component)val.transform.Find("UnrotatedSecret").Find("SecretRoom").Find("ElectricityBox") .Find("Breakable")).gameObject.GetComponent<Breakable>().activateOnBreak[1].GetComponent<ObjectActivator>(); ((Component)component).gameObject.transform.parent = null; MonoSingleton<CameraController>.Instance.cam.useOcclusionCulling = false; GameObject[] array2 = array; foreach (GameObject val2 in array2) { if (((Object)val2).name == "Unrotated") { Transform val3 = val2.transform.Find("5 - Hologram Room"); gabeHologram = ((Component)val3.Find("5 Nonstuff").Find("Decorations").Find("Hologram")).gameObject; val.transform.parent = val3.Find("5 Stuff"); val.SetActive(true); Transform obj = val3.Find("5 Nonstuff").Find("Walls"); ((Component)obj.GetChild(2)).gameObject.SetActive(false); ((Component)obj.GetChild(8)).gameObject.SetActive(false); } else if (((Object)val2).name == "Rotated") { Transform val4 = val2.transform.Find("5 - Hologram Room"); upsideDownGlass = ((Component)val4.Find("5 Stuff").Find("Glasscase")).gameObject; upsideDownHologram = ((Component)val4.Find("5 Nonstuff").Find("Decorations").Find("Hologram Master")).gameObject; } } component.events.onActivate.AddListener((UnityAction)delegate { FinalizeShip(gabeHologram, upsideDownHologram, upsideDownGlass); }); } public static void FinalizeShip(GameObject hologram1, GameObject hologram2, GameObject glass) { hologram1.SetActive(false); hologram2.SetActive(false); ((Component)hologram2.transform.GetChild(0)).gameObject.SetActive(false); ((Component)hologram2.transform.GetChild(1)).gameObject.SetActive(false); glass.SetActive(false); ProphetProgress prophetProgress = Utils.ReadWrathProgress(); prophetProgress.wrathSwitch3 = true; Utils.WriteWrathProgress(prophetProgress); } } public static class V52 { [StageAddon(52, false)] public static void OceanSecret() { //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown GameObject val = Utils.LoadAndInstantiateStage("52"); ((Component)val.transform.Find("LighthouseIndoors")).transform.parent = GameObject.Find("GlobalLights (3)").transform.Find("Cabin Interiors"); Transform transform = ((Component)GameObject.Find("OutdoorsObjects").transform.Find("Lighthouse")).transform; ProphetProgress prog = Utils.ReadWrathProgress(); GameObject lighthouseRay = ((Component)transform.Find("Tower").Find("Cylinder (1)")).gameObject; GameObject lighthouseDim = ((Component)val.transform.Find("Cylinder (1)")).gameObject; lighthouseRay.SetActive(prog.wrathSwitch2); lighthouseDim.SetActive(!prog.wrathSwitch2); ((Component)transform.Find("Island")).gameObject.SetActive(false); GameObject gameObject = ((Component)transform.Find("House")).gameObject; ((Renderer)gameObject.GetComponent<MeshRenderer>()).enabled = false; ((Collider)gameObject.GetComponent<BoxCollider>()).enabled = false; ((Component)gameObject.transform.Find("LargeDoorSmallest Variant (1)")).gameObject.SetActive(false); ((Component)gameObject.transform.GetChild(0)).gameObject.SetActive(false); MonoSingleton<CameraController>.Instance.cam.useOcclusionCulling = false; ((Component)val.transform.Find("InsideHouse").Find("Shop").Find("Canvas") .Find("Main Menu") .Find("obac")).gameObject.GetComponent<ObjectActivator>().events.onActivate.AddListener((UnityAction)delegate { lighthouseRay.SetActive(true); lighthouseDim.SetActive(false); prog.wrathSwitch2 = true; Utils.WriteWrathProgress(prog); }); } } public static class V51 { private static DisableEnemySpawns floodSpawnDisabler; [StageAddon(51, false)] public static void FloodSecret() { //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Expected O, but got Unknown GameObject val = Utils.LoadAndInstantiateStage("51"); List<Light> lights = new List<Light>(); List<MeshRenderer> emissiveObjects = new List<MeshRenderer>(); List<G