Decompiled source of Escanor v1.0.0
Escanor.dll
Decompiled a year ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using EntityStates; using EntityStates.BrotherMonster; using EntityStates.Huntress; using EntityStates.Merc; using KinematicCharacterController; using On.RoR2; using On.RoR2.UI; using R2API; using R2API.Utils; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.Achievements; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Bindings; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.UI; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyCompany("Escanor")] [assembly: AssemblyProduct("Escanor")] [assembly: AssemblyTitle("Escanor")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Escanor; public static class Achievements { [RegisterAchievement("ESCANOR_MASTERY", "ACHIEVEMENT_ESCANOR_MASTERY_UNLOCKABLE_ID", null, null)] public class MasteryUnlockable : BasePerSurvivorClearGameMonsoonAchievement { private BodyIndex FindBodyIndex(string bodyName) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex(bodyName); } public override BodyIndex LookUpRequiredBodyIndex() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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) return (BodyIndex)(FindBodyIndex("TheOneBody") | FindBodyIndex("EscanorBody")); } public override void OnInstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) ((BaseAchievement)this).OnInstall(); ((BaseAchievement)this).requiredBodyIndex = (BodyIndex)(FindBodyIndex("TheOneBody") | FindBodyIndex("EscanorBody")); ((BaseAchievement)this).localUser.onBodyChanged += BodyChangedForBodyRequirement; } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); ((BaseAchievement)this).localUser.onBodyChanged -= BodyChangedForBodyRequirement; } private void BodyChangedForBodyRequirement() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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) if (Object.op_Implicit((Object)(object)((BaseAchievement)this).localUser.cachedMaster)) { CharacterBody body = ((BaseAchievement)this).localUser.cachedMaster.GetBody(); if (Object.op_Implicit((Object)(object)body)) { ((BaseAchievement)this).meetsBodyRequirement = body.bodyIndex == FindBodyIndex("TheOneBody") || body.bodyIndex == FindBodyIndex("EscanorBody"); ((BaseAchievement)this)._meetsBodyRequirement = ((BaseAchievement)this).meetsBodyRequirement; } } } } internal static UnlockableDef masteryUnlock; public static void RegisterUnlockables() { masteryUnlock = NewUnlockable<MasteryUnlockable>("MASTERY", Assets.MainAssetBundle.LoadAsset<Sprite>("portrait"), "ESCANOR: Mastery", "As Escanor, beat the game or obliterate on Monsoon."); } private static UnlockableDef NewUnlockable<T>(string AchievementIdentifier, Sprite Icon, string Title, string Description) where T : BaseAchievement { string text = "ACHIEVEMENT_ESCANOR_"; UnlockableDef val = ScriptableObject.CreateInstance<UnlockableDef>(); string langName = text + AchievementIdentifier + "_NAME"; string langDesc = text + AchievementIdentifier + "_DESCRIPTION"; LanguageAPI.Add(langName, Title); LanguageAPI.Add(langDesc, Description); Func<string> func = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString(langName), Language.GetString(langDesc) }); Type typeFromHandle = typeof(T); val.cachedName = text + AchievementIdentifier + "_UNLOCKABLE_ID"; val.getHowToUnlockString = func; val.getUnlockedString = func; val.achievementIcon = Icon; val.sortScore = 200; val.hidden = false; ContentAddition.AddUnlockableDef(val); return val; } } internal class Assets { public static AssetBundle MainAssetBundle; public static void PopulateAssets() { if ((Object)(object)MainAssetBundle == (Object)null) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Escanor.escanorassets"); MainAssetBundle = AssetBundle.LoadFromStream(stream); } using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Escanor.Escanor.bnk"); byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } } internal class AnimateMaterialAlpha : MonoBehaviour { private AnimationCurve curve; private Material mat; private float timeMax = 3f; private float time; private void Start() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown mat = ((Component)this).GetComponent<Projector>().material; curve = new AnimationCurve((Keyframe[])(object)new Keyframe[3] { new Keyframe(0f, 0f), new Keyframe(1f, 1f), new Keyframe(0f, 0f) }); curve.preWrapMode = (WrapMode)1; curve.postWrapMode = (WrapMode)1; } private void Update() { if (!PauseManager.isPaused) { time = Mathf.Min(timeMax, time + Time.deltaTime); } float num = curve.Evaluate(time / timeMax); mat.SetFloat("_ExternalAlpha", num); if (time >= timeMax) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } internal class AnimationEventBehaviour : MonoBehaviour { public bool fireSphere = false; public bool sphereScale = false; public bool charge = false; public bool fire = false; public bool walk = false; public bool axeThrow = false; public bool axeReturn = false; public Vector3 direction; public void Throw() { axeThrow = true; AkSoundEngine.PostEvent(Sounds.Play_Escanor_VO_DivineSword, ((Component)this).gameObject); } public void Return() { axeReturn = true; } public void Walk() { walk = true; } public void StopWalk() { walk = false; } public void Charge() { charge = true; } public void Fire() { fire = true; } public void SphereScale() { sphereScale = true; } public void FireSphere() { fireSphere = true; } } internal class AxeReturnBehaviour : MonoBehaviour { public AnimationEventBehaviour behaviour; public GameObject axe; public Transform targetTransform; private Rigidbody rigid; private RotateAroundAxis rotate; public float rotSpeed = -1f; public CharacterBody body; private void Start() { rigid = ((Component)this).GetComponent<Rigidbody>(); rotate = ((Component)this).GetComponent<RotateAroundAxis>(); } private void OnCollisionEnter(Collision collision) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) rigid.velocity = Vector3.zero; rigid.freezeRotation = true; rigid.detectCollisions = false; rigid.isKinematic = true; ((Behaviour)rotate).enabled = false; GameObject impactEffect = Prefabs.impactEffect; ContactPoint contact = collision.GetContact(0); Object.Instantiate<GameObject>(impactEffect, ((ContactPoint)(ref contact)).point, Quaternion.identity).transform.localScale = Vector3.one; Util.PlaySound("Play_gravekeeper_attack2_impact", ((Component)this).gameObject); if (Object.op_Implicit((Object)(object)collision.collider)) { HealthComponent val = null; contact = collision.GetContact(0); Vector3 position = ((ContactPoint)(ref contact)).point; HurtBox component = ((Component)collision.collider).GetComponent<HurtBox>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent) && Object.op_Implicit((Object)(object)component.healthComponent.body)) { val = component.healthComponent; position = component.healthComponent.body.corePosition; } CharacterBody component2 = ((Component)collision.collider).GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.healthComponent)) { val = component2.healthComponent; position = component2.corePosition; } if (Object.op_Implicit((Object)(object)val) && NetworkServer.active) { DamageInfo val2 = new DamageInfo(); val2.damage = body.damage * 4f; val2.attacker = ((Component)body).gameObject; val2.inflictor = ((Component)body).gameObject; val2.force = Vector3.zero; val2.crit = body.RollCrit(); val2.procChainMask = default(ProcChainMask); val2.procCoefficient = 1f; val2.position = position; val2.damageColorIndex = (DamageColorIndex)0; val2.damageType = (DamageType)32; val.TakeDamage(val2); GlobalEventManager.instance.OnHitEnemy(val2, ((Component)val).gameObject); GlobalEventManager.instance.OnHitAll(val2, ((Component)val).gameObject); } } } private void FixedUpdate() { if (Object.op_Implicit((Object)(object)behaviour) && behaviour.axeReturn && behaviour.axeReturn) { rigid.freezeRotation = false; ((Behaviour)rotate).enabled = true; RotateAroundAxis obj = rotate; obj.fastRotationSpeed *= rotSpeed; } } } internal class BezierCurveLineScaler : BezierCurveLine { private int size = 98; private void FixedUpdate() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) size = Mathf.RoundToInt(Util.Remap(Vector3.Distance(((Component)this).transform.position, base.endTransform.position), 0f, 280f, 24f, 98f)); if (((BezierCurveLine)this).lineRenderer.numPositions != size) { ((BezierCurveLine)this).lineRenderer.numPositions = size; Array.Resize(ref base.vertexList, size + 1); } } } internal class DelayedSound : MonoBehaviour { public float delay = 1f; public uint sound = Sounds.Play_Escanor_Superslash_Hit; private float stopwatch; private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (stopwatch >= delay) { AkSoundEngine.PostEvent(sound, ((Component)this).gameObject); Object.Destroy((Object)(object)this); } } } internal class EscanorBehaviour : NetworkBehaviour { public bool canExecute = true; public AimRequest aimRequest; public Vector3 direction; public Vector3[] positions = (Vector3[])(object)new Vector3[0]; private CharacterBody body; private CharacterMaster master; public MasterBehaviour behaviour; public GameObject effectInstance; private static int kCmdCmdTransformBody; private void OnEnable() { body = ((Component)this).GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.masterObject)) { master = body.master; behaviour = body.masterObject.GetComponent<MasterBehaviour>(); if (Object.op_Implicit((Object)(object)behaviour)) { behaviour.behaviour = this; } } } [Command] public void CmdTransformBody(string bodyName) { if (Object.op_Implicit((Object)(object)master)) { master.TransformBody(bodyName); } } private void FixedUpdate() { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.masterObject)) { return; } if (!Object.op_Implicit((Object)(object)master)) { master = body.masterObject.GetComponent<CharacterMaster>(); } if (!Object.op_Implicit((Object)(object)behaviour)) { behaviour = body.masterObject.GetComponent<MasterBehaviour>(); if (!Object.op_Implicit((Object)(object)behaviour)) { behaviour = body.masterObject.AddComponent<MasterBehaviour>(); if (Object.op_Implicit((Object)(object)behaviour)) { behaviour.behaviour = this; } } } else if (!Object.op_Implicit((Object)(object)behaviour.behaviour)) { behaviour.behaviour = this; } } private void UNetVersion() { } protected static void InvokeCmdCmdTransformBody(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkServer.active) { Debug.LogError((object)"Command CmdTransformBody called on client."); } else { ((EscanorBehaviour)(object)obj).CmdTransformBody(reader.ReadString()); } } public void CallCmdTransformBody(string bodyName) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogError((object)"Command function CmdTransformBody called on server."); return; } if (((NetworkBehaviour)this).isServer) { CmdTransformBody(bodyName); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)5); val.WritePackedUInt32((uint)kCmdCmdTransformBody); val.Write(((Component)this).GetComponent<NetworkIdentity>().netId); val.Write(bodyName); ((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdTransformBody"); } static EscanorBehaviour() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown kCmdCmdTransformBody = 2044128310; NetworkBehaviour.RegisterCommandDelegate(typeof(EscanorBehaviour), kCmdCmdTransformBody, new CmdDelegate(InvokeCmdCmdTransformBody)); NetworkCRC.RegisterBehaviour("EscanorBehaviour", 0); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } internal class EventProjectileBehaviour : MonoBehaviour { [SerializeField] public ProjectileSimple simple; [SerializeField] public Rigidbody rigidBody; [SerializeField] public SphereCollider collider; [SerializeField] public ObjectScaleCurve scale; [SerializeField] public GameObject ghost; [SerializeField] public ProjectileController controller; [SerializeField] public GameObject owner; [SerializeField] public CharacterBody body; [SerializeField] public ModelLocator modelLocator; [SerializeField] public Transform parent; [SerializeField] public float damage; public bool addCollider = false; public AnimationEventBehaviour eventBehaviour; public string parentName = "sunMuzzle"; private bool playScaleSound; private bool playLaunchSound; public float radius = 3f; public uint scaleSound = 0u; public uint launchSound = 0u; public string loopSound = ""; private uint loopID; private uint launchID; public float xDirection = 0f; public float yDirection = 0f; public float zDirection = 0f; private float stopwatch; private void OnEnable() { loopID = Util.PlaySound(loopSound, ((Component)this).gameObject); } private void OnDisable() { AkSoundEngine.StopPlayingID(loopID); AkSoundEngine.StopPlayingID(launchID); } private void Update() { //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)collider)) { collider = ((Component)this).GetComponent<SphereCollider>(); } if (!Object.op_Implicit((Object)(object)simple)) { simple = ((Component)this).GetComponent<ProjectileSimple>(); ((Behaviour)simple).enabled = false; } if (!Object.op_Implicit((Object)(object)rigidBody)) { rigidBody = ((Component)this).GetComponent<Rigidbody>(); } if (!Object.op_Implicit((Object)(object)owner)) { controller = ((Component)this).GetComponent<ProjectileController>(); if (Object.op_Implicit((Object)(object)controller) && Object.op_Implicit((Object)(object)controller.Networkowner)) { if (Object.op_Implicit((Object)(object)controller.ghost)) { ghost = ((Component)controller.ghost).gameObject; scale = ghost.GetComponent<ObjectScaleCurve>(); } owner = controller.owner; body = owner.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)body)) { damage = body.damage; modelLocator = body.modelLocator; if (Object.op_Implicit((Object)(object)modelLocator) && Object.op_Implicit((Object)(object)modelLocator.modelTransform)) { eventBehaviour = ((Component)modelLocator.modelTransform).GetComponent<AnimationEventBehaviour>(); if (Object.op_Implicit((Object)(object)eventBehaviour)) { eventBehaviour.fireSphere = false; eventBehaviour.sphereScale = false; } ChildLocator component = ((Component)modelLocator.modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component)) { parent = component.FindChild(parentName); } } } } } if (Object.op_Implicit((Object)(object)eventBehaviour)) { SphereScale(); if (Object.op_Implicit((Object)(object)collider) && !eventBehaviour.fireSphere) { ((Collider)collider).enabled = false; if (!playLaunchSound) { playLaunchSound = true; launchID = AkSoundEngine.PostEvent(launchSound, ((Component)this).gameObject); } } } if (Object.op_Implicit((Object)(object)parent)) { ((Component)this).transform.position = parent.position; } if (Object.op_Implicit((Object)(object)rigidBody) && Object.op_Implicit((Object)(object)simple) && ((Behaviour)simple).enabled && yDirection != 0f && rigidBody.velocity.y != yDirection) { rigidBody.velocity = new Vector3(rigidBody.velocity.x, yDirection, rigidBody.velocity.z); } } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; FireSphere(); } protected virtual void SphereScale() { if (eventBehaviour.sphereScale && Object.op_Implicit((Object)(object)scale)) { ((Behaviour)scale).enabled = true; if (!playScaleSound) { playScaleSound = true; AkSoundEngine.PostEvent(scaleSound, ((Component)this).gameObject); } } } protected virtual void FireSphere() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)eventBehaviour) || !eventBehaviour.fireSphere || !Object.op_Implicit((Object)(object)simple)) { return; } ((Component)this).transform.rotation = Util.QuaternionSafeLookRotation(eventBehaviour.direction); parent = null; ((Behaviour)simple).enabled = true; if (Object.op_Implicit((Object)(object)collider)) { ((Collider)collider).enabled = true; collider.radius = radius; } else if (addCollider) { SphereCollider val = ((Component)this).gameObject.AddComponent<SphereCollider>(); if (Object.op_Implicit((Object)(object)val)) { val.radius = radius; } } } } internal class MasterBehaviour : MonoBehaviour { public CharacterMaster master; public EscanorBehaviour behaviour; public TheOneBehaviour oneBehaviour; public CharacterBody body; public float timer = 0f; public GameObject powerupBar; public TextMeshProUGUI currentPowerup; public Image barImage; public bool transformed; public bool justDetransformed; public float maxTime => transformed ? 60 : 360; private void Start() { master = ((Component)this).GetComponent<CharacterMaster>(); } private void OnEnable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HUD.Update += new hook_Update(HUD_Update); Stage.onStageStartGlobal += delegate { powerupBar = null; }; } private void OnDisable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HUD.Update -= new hook_Update(HUD_Update); } private void HUD_Update(orig_Update orig, HUD self) { orig.Invoke(self); if (!Object.op_Implicit((Object)(object)master) || !Object.op_Implicit((Object)(object)self.targetMaster) || !((Object)(object)self.targetMaster == (Object)(object)master) || !Object.op_Implicit((Object)(object)self.mainUIPanel) || Object.op_Implicit((Object)(object)powerupBar)) { return; } HealthBar componentInChildren = self.mainUIPanel.GetComponentInChildren<HealthBar>(); if (Object.op_Implicit((Object)(object)componentInChildren)) { Image[] componentsInChildren = ((Component)componentInChildren).gameObject.GetComponentsInChildren<Image>(); if (componentsInChildren.Length == 5 && Object.op_Implicit((Object)(object)self.targetBodyObject) && Util.HasEffectiveAuthority(self.targetBodyObject)) { AddBar(((Component)componentInChildren).gameObject); } } } private void AddBar(GameObject healthBar) { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) powerupBar = Object.Instantiate<GameObject>(healthBar, healthBar.transform.parent); ((Object)powerupBar).name = "PowerupBar"; Object.Destroy((Object)(object)powerupBar.GetComponent<HealthBar>()); TextMeshProUGUI[] componentsInChildren = powerupBar.GetComponentsInChildren<TextMeshProUGUI>(); for (int i = 0; i < componentsInChildren.Length; i++) { if (Object.op_Implicit((Object)(object)componentsInChildren[i]) && Object.op_Implicit((Object)(object)((Component)componentsInChildren[i]).gameObject)) { if (((Object)((Component)componentsInChildren[i]).gameObject).name == "CurrentHealthText") { ((TMP_Text)componentsInChildren[i]).transform.localPosition = Vector2.op_Implicit(new Vector2(30f, 15f)); currentPowerup = componentsInChildren[i]; ((TMP_Text)currentPowerup).text = "0%"; ((TMP_Text)((Component)((TMP_Text)componentsInChildren[i]).transform.parent).GetComponent<TextMeshProUGUI>()).text = ""; } if (((Object)((Component)componentsInChildren[i]).gameObject).name == "FullHealthText") { Object.Destroy((Object)(object)((Component)componentsInChildren[i]).gameObject); } } } Image[] componentsInChildren2 = powerupBar.GetComponentsInChildren<Image>(); for (int j = 0; j < componentsInChildren2.Length; j++) { if (Object.op_Implicit((Object)(object)componentsInChildren2[j]) && Object.op_Implicit((Object)(object)((Component)componentsInChildren2[j]).gameObject)) { if ((Object)(object)componentsInChildren2[j] != (Object)(object)componentsInChildren2[3] && (Object)(object)componentsInChildren2[j] != (Object)(object)componentsInChildren2[0]) { Object.Destroy((Object)(object)((Component)componentsInChildren2[j]).gameObject); } if ((Object)(object)componentsInChildren2[j] == (Object)(object)componentsInChildren2[3]) { barImage = componentsInChildren2[j]; ((Graphic)barImage).color = new Color(1f, 0.79608f, 0.09412f); barImage.type = (Type)3; barImage.fillMethod = (FillMethod)0; barImage.fillCenter = false; } } } } private void FixedUpdate() { float num = timer / maxTime; if (Object.op_Implicit((Object)(object)barImage)) { barImage.fillAmount = num; } if (Object.op_Implicit((Object)(object)currentPowerup)) { string text = Mathf.Clamp(Mathf.FloorToInt(num * 100f), 0, 100) + "%"; ((TMP_Text)currentPowerup).text = (transformed ? "" : text); } if (Object.op_Implicit((Object)(object)master) && !Object.op_Implicit((Object)(object)body)) { body = master.GetBody(); } if (!Object.op_Implicit((Object)(object)master) || !Object.op_Implicit((Object)(object)body) || !body.isPlayerControlled) { return; } if (!transformed && timer < maxTime) { timer += Time.fixedDeltaTime; } if (timer >= maxTime && !transformed && Object.op_Implicit((Object)(object)behaviour) && behaviour.canExecute) { timer = 60f; transformed = true; if (Object.op_Implicit((Object)(object)body) && body.hasEffectiveAuthority) { behaviour.CallCmdTransformBody("TheOneBody"); } } if (!transformed) { return; } timer -= Time.fixedDeltaTime; if (timer <= 0f && Object.op_Implicit((Object)(object)oneBehaviour) && oneBehaviour.canExecute && Object.op_Implicit((Object)(object)behaviour)) { timer = 0f; transformed = false; justDetransformed = true; if (Object.op_Implicit((Object)(object)body) && body.hasEffectiveAuthority) { behaviour.CallCmdTransformBody("EscanorBody"); } } } } internal class PPReduction : MonoBehaviour { public float duration; public PostProcessVolume pp; private float stopwatch; private float age; private AnimationCurve curve = AnimationCurve.Linear(0f, 0f, 1f, 1f); private void OnEnable() { pp = ((Component)this).GetComponent<PostProcessVolume>(); pp.weight = 0f; } private void FixedUpdate() { age += Time.fixedDeltaTime; if (age >= duration * 0.8f) { stopwatch += Time.fixedDeltaTime; float num = curve.Evaluate(stopwatch / duration * 0.2f); PostProcessVolume obj = pp; obj.weight -= num; } else if (pp.weight < 1f) { float num2 = curve.Evaluate(age / duration * 0.1f); PostProcessVolume obj2 = pp; obj2.weight += num2; } } } internal class TheOneBehaviour : HuntressTracker { public bool canExecute = true; public float forceSpeed = 1045f; public float returnSpeed = 5f; public float rotSpeed = -900f; public CharacterMaster master; public MasterBehaviour masterBehaviour; public bool specialUsed = false; public HurtBox target => Object.op_Implicit((Object)(object)base.trackingTarget) ? base.trackingTarget : null; private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown base.indicator = new Indicator(((Component)this).gameObject, Prefabs.oneIndicator); } private void OnEnable() { ((HuntressTracker)this).OnEnable(); base.maxTrackingDistance = 40f; } private void Start() { ((HuntressTracker)this).Start(); master = base.characterBody.master; if (Object.op_Implicit((Object)(object)master)) { masterBehaviour = ((Component)master).GetComponent<MasterBehaviour>(); if (Object.op_Implicit((Object)(object)masterBehaviour)) { masterBehaviour.oneBehaviour = this; } } } private void FixedUpdate() { ((HuntressTracker)this).FixedUpdate(); } } internal class EscanorSkillDef : SkillDef { private class InstanceData : BaseSkillInstanceData { public SkillLocator skillLocator; public EscanorBehaviour behaviour; public CharacterMotor motor; } public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData { skillLocator = ((Component)skillSlot).GetComponent<SkillLocator>(), behaviour = ((Component)skillSlot).GetComponent<EscanorBehaviour>(), motor = ((Component)skillSlot).GetComponent<CharacterMotor>() }; } internal static bool IsExecutable([NotNull] GenericSkill skillSlot) { InstanceData instanceData = (InstanceData)(object)skillSlot.skillInstanceData; EscanorBehaviour behaviour = instanceData.behaviour; SkillLocator skillLocator = instanceData.skillLocator; CharacterMotor motor = instanceData.motor; if (Object.op_Implicit((Object)(object)skillLocator) && Object.op_Implicit((Object)(object)behaviour) && Object.op_Implicit((Object)(object)motor)) { if ((Object)(object)skillSlot == (Object)(object)skillLocator.primary) { } if ((Object)(object)skillSlot == (Object)(object)skillLocator.secondary && skillSlot.skillNameToken == "ESCANOR_M2") { return behaviour.canExecute && motor.isGrounded; } if ((Object)(object)skillSlot == (Object)(object)skillLocator.utility) { } if ((Object)(object)skillSlot == (Object)(object)skillLocator.special && skillSlot.skillNameToken == "ESCANOR_SPEC") { return behaviour.canExecute && motor.isGrounded; } return behaviour.canExecute; } return true; } public override bool CanExecute([NotNull] GenericSkill skillSlot) { return IsExecutable(skillSlot) && ((SkillDef)this).CanExecute(skillSlot); } public override bool IsReady([NotNull] GenericSkill skillSlot) { return ((SkillDef)this).IsReady(skillSlot) && IsExecutable(skillSlot); } } internal class Hook { internal static void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); TeleportOutController.OnStartClient += new hook_OnStartClient(TeleportOutController_OnStartClient); BurnEffectController.Start += new hook_Start(BurnEffectController_Start); BossGroup.onBossGroupDefeatedServer += BossGroup_onBossGroupDefeatedServer; CharacterBody.UpdateMasterLink += new hook_UpdateMasterLink(CharacterBody_UpdateMasterLink); } private static void CharacterBody_UpdateMasterLink(orig_UpdateMasterLink orig, CharacterBody self) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (self.baseNameToken == "THEONE_NAME") { self.skinIndex = self.master.loadout.bodyLoadoutManager.GetSkinIndex(BodyCatalog.FindBodyIndex("EscanorBody")); } } private static void BossGroup_onBossGroupDefeatedServer(BossGroup bossGroup) { string name = ((Object)bossGroup).name; if (name == "BrotherEncounter, Phase 4") { ((MonoBehaviour)bossGroup).StartCoroutine(PlayVO(2f)); } } private static IEnumerator PlayVO(float delay) { yield return (object)new WaitForSeconds(delay); ReadOnlyCollection<CharacterBody> c = CharacterBody.readOnlyInstancesList; for (int i = 0; i < c.Count; i++) { if ((Object.op_Implicit((Object)(object)c[i]) && c[i].isPlayerControlled && c[i].baseNameToken == "ESCANOR_NAME") || c[i].baseNameToken == "THEONE_NAME") { AkSoundEngine.PostEvent(Sounds.Play_Escanor_VO_MithrixInsult, ((Component)c[i]).gameObject); } } } private static void BurnEffectController_Start(orig_Start orig, BurnEffectController self) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!Object.op_Implicit((Object)(object)self.target) || !Object.op_Implicit((Object)(object)self.target.GetComponent<AnimationEventBehaviour>())) { return; } foreach (GameObject burnEffectInstance in self.burnEffectInstances) { ParticleSystem[] componentsInChildren = burnEffectInstance.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val in componentsInChildren) { ShapeModule shape = val.shape; ((ShapeModule)(ref shape)).enabled = false; } } } private static void TeleportOutController_OnStartClient(orig_OnStartClient orig, TeleportOutController self) { //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) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.bodyGlowParticles) && Object.op_Implicit((Object)(object)self.Networktarget) && Object.op_Implicit((Object)(object)self.Networktarget.GetComponent<EscanorBehaviour>())) { ParticleSystem component = ((Component)self.bodyGlowParticles).GetComponent<ParticleSystem>(); ShapeModule shape = component.shape; ((ShapeModule)(ref shape)).enabled = false; } } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Prefabs.speed)) { args.moveSpeedMultAdd += 0.6f; } if (sender.HasBuff(Prefabs.armor)) { args.armorAdd += 100f; } if (sender.HasBuff(Prefabs.power)) { args.damageMultAdd += 0.5f; } if (sender.HasBuff(Prefabs.weak)) { args.armorAdd -= 20f; args.moveSpeedReductionMultAdd += 0.4f; args.damageMultAdd -= 0.4f; } } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Invalid comparison between Unknown and I4 //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Invalid comparison between Unknown and I4 //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body)) { if ((int)damageInfo.damageType == 96 && Object.op_Implicit((Object)(object)damageInfo.attacker)) { DotController.InflictDot(((Component)self).gameObject, damageInfo.attacker, (DotIndex)1, 10f, 3f, (uint?)uint.MaxValue); } if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.go) && self.body.HasBuff(Prefabs.goHit)) { damageInfo.damage = 0f; damageInfo.procCoefficient = 0f; damageInfo.rejected = true; } if ((self.body.HasBuff(Prefabs.overheat) && (int)damageInfo.dotIndex == 1) || DamageAPI.HasModdedDamageType(damageInfo, Prefabs.fire) || DamageAPI.HasModdedDamageType(damageInfo, Prefabs.overheatDMG)) { damageInfo.damage *= 2f; } if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.overheatDMG)) { self.body.AddTimedBuff(Prefabs.overheat, 8f); } } orig.Invoke(self, damageInfo); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Dragonyck.Escanor", "Escanor", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.Escanor"; public const string MODNAME = "Escanor"; public const string VERSION = "1.0.0"; public const string SURVIVORNAME = "Escanor"; public const string SURVIVORNAMEKEY = "ESCANOR"; public const string BIGSURVIVORNAME = "The One"; public const string BIGSURVIVORNAMEKEY = "THEONE"; public static GameObject characterPrefab; public static GameObject characterPowerupPrefab; private static readonly Color characterColor = new Color(1f, 0.79608f, 0.09412f); private void Awake() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) Assets.PopulateAssets(); Achievements.RegisterUnlockables(); Prefabs.CreatePrefabs(); characterPrefab = CreatePrefab("escanor", "EscanorBody", "ESCANOR"); ContentAddition.AddBody(characterPrefab); characterPrefab.GetComponent<EntityStateMachine>().initialStateType = new SerializableEntityStateType(typeof(EscanorSpawnState)); RegisterStates(); SkillSetup(); SetupPowerupBody(); RegisterCharacter(); Hook.Hooks(); } internal static GameObject CreatePrefab(string modelName, string bodyName, string nameKey) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0158: 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_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: 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_01be: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_0640: Unknown result type (might be due to invalid IL or missing references) //IL_066d: Unknown result type (might be due to invalid IL or missing references) //IL_084a: Unknown result type (might be due to invalid IL or missing references) //IL_0861: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_086e: Unknown result type (might be due to invalid IL or missing references) //IL_08cc: Unknown result type (might be due to invalid IL or missing references) //IL_09a2: Unknown result type (might be due to invalid IL or missing references) //IL_09a7: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09f5: Unknown result type (might be due to invalid IL or missing references) //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_0a19: Unknown result type (might be due to invalid IL or missing references) //IL_0a37: Unknown result type (might be due to invalid IL or missing references) //IL_0a5c: Unknown result type (might be due to invalid IL or missing references) //IL_0a7a: Unknown result type (might be due to invalid IL or missing references) //IL_0a9f: Unknown result type (might be due to invalid IL or missing references) //IL_0abd: Unknown result type (might be due to invalid IL or missing references) //IL_0ae2: Unknown result type (might be due to invalid IL or missing references) //IL_0b00: Unknown result type (might be due to invalid IL or missing references) //IL_0b28: Unknown result type (might be due to invalid IL or missing references) //IL_0b48: Unknown result type (might be due to invalid IL or missing references) //IL_0b68: Unknown result type (might be due to invalid IL or missing references) //IL_0b88: Unknown result type (might be due to invalid IL or missing references) //IL_0b98: Unknown result type (might be due to invalid IL or missing references) //IL_0b9d: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion(); GameObject val2 = PrefabAPI.InstantiateClone(val, modelName + "Body", true); val2.AddComponent<EscanorBehaviour>(); val2.GetComponent<NetworkIdentity>().localPlayerAuthority = true; Object.Destroy((Object)(object)((Component)val2.transform.Find("ModelBase")).gameObject); Object.Destroy((Object)(object)((Component)val2.transform.Find("CameraPivot")).gameObject); Object.Destroy((Object)(object)((Component)val2.transform.Find("AimOrigin")).gameObject); GameObject val3 = Assets.MainAssetBundle.LoadAsset<GameObject>(modelName); val3.AddComponent<AnimationEventBehaviour>(); GameObject val4 = new GameObject("ModelBase"); val4.transform.parent = val2.transform; val4.transform.localPosition = new Vector3(0f, -0.94f, 0f); val4.transform.localRotation = Quaternion.identity; val4.transform.localScale = Vector3.one; GameObject val5 = new GameObject("AimOrigin"); val5.transform.parent = val4.transform; val5.transform.localPosition = new Vector3(0f, 2f, 0f); val5.transform.localRotation = Quaternion.identity; val5.transform.localScale = Vector3.one; Transform transform = val3.transform; transform.parent = val4.transform; transform.localPosition = Vector3.zero; transform.localScale = new Vector3(1f, 1f, 1f); transform.localRotation = Quaternion.identity; CharacterDirection component = val2.GetComponent<CharacterDirection>(); component.moveVector = Vector3.zero; component.targetTransform = val4.transform; component.overrideAnimatorForwardTransform = null; component.rootMotionAccumulator = null; component.modelAnimator = val3.GetComponentInChildren<Animator>(); component.driveFromRootRotation = false; component.turnSpeed = 720f; CharacterBody component2 = val2.GetComponent<CharacterBody>(); ((Object)component2).name = bodyName; component2.baseNameToken = nameKey + "_NAME"; component2.subtitleNameToken = nameKey + "_SUBTITLE"; component2.bodyFlags = (BodyFlags)16; component2.rootMotionInMainState = false; component2.mainRootSpeed = 0f; component2.baseMaxHealth = 250f; component2.levelMaxHealth = 40f; component2.baseRegen = 2.5f; component2.levelRegen = 0.25f; component2.baseMaxShield = 0f; component2.levelMaxShield = 0f; component2.baseMoveSpeed = 6f; component2.levelMoveSpeed = 0f; component2.baseAcceleration = 110f; component2.baseJumpPower = 15f; component2.levelJumpPower = 0f; component2.baseDamage = 12f; component2.levelDamage = 2.4f; component2.baseAttackSpeed = 1f; component2.levelAttackSpeed = 0f; component2.baseCrit = 1f; component2.levelCrit = 0f; component2.baseArmor = 15f; component2.levelArmor = 1f; component2.baseJumpCount = 1; component2.sprintingSpeedMultiplier = 1.45f; component2.wasLucky = false; component2.hideCrosshair = false; component2.aimOriginTransform = val5.transform; component2.hullClassification = (HullClassification)0; component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait").texture; component2.isChampion = false; component2.currentVehicle = null; component2.skinIndex = 0u; component2.bodyColor = characterColor; component2._defaultCrosshairPrefab = Prefabs.Load<GameObject>("RoR2/Base/UI/SimpleDotCrosshair.prefab"); CharacterMotor component3 = val2.GetComponent<CharacterMotor>(); component3.walkSpeedPenaltyCoefficient = 1f; component3.characterDirection = component; component3.muteWalkMotion = false; component3.mass = 160f; component3.airControl = 0.25f; component3.disableAirControlUntilCollision = false; component3.generateParametersOnAwake = true; InputBankTest component4 = val2.GetComponent<InputBankTest>(); component4.moveVector = Vector3.zero; CameraTargetParams component5 = val2.GetComponent<CameraTargetParams>(); component5.cameraParams = Prefabs.Load<CharacterCameraParams>("RoR2/Base/Common/ccpStandardMelee.asset"); component5.cameraPivotTransform = null; component5.recoil = Vector2.zero; component5.dontRaycastToPivot = false; ModelLocator component6 = val2.GetComponent<ModelLocator>(); component6.modelTransform = transform; component6.modelBaseTransform = val4.transform; component6.dontReleaseModelOnDeath = false; component6.autoUpdateModelTransform = true; component6.dontDetatchFromParent = false; component6.noCorpse = false; component6.normalizeToFloor = false; component6.preserveModel = false; ChildLocator component7 = val3.GetComponent<ChildLocator>(); CharacterModel val6 = val3.AddComponent<CharacterModel>(); MeshRenderer componentInChildren = val3.GetComponentInChildren<MeshRenderer>(); SkinnedMeshRenderer[] componentsInChildren = val3.GetComponentsInChildren<SkinnedMeshRenderer>(); List<RendererInfo> list = new List<RendererInfo>(); list.Add(new RendererInfo { renderer = (Renderer)(object)componentInChildren, defaultMaterial = Utils.InstantiateMaterial(((Renderer)componentInChildren).material.mainTexture), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = true }); SkinnedMeshRenderer[] array = componentsInChildren; foreach (SkinnedMeshRenderer val7 in array) { if (!((Object)val7).name.Contains("outline")) { list.Add(new RendererInfo { renderer = (Renderer)(object)val7, defaultMaterial = Utils.InstantiateMaterial(((Renderer)val7).material.mainTexture), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }); } } RendererInfo[] array2 = list.ToArray(); val6.body = component2; val6.baseRendererInfos = array2; val6.autoPopulateLightInfos = true; val6.invisibilityCount = 0; val6.temporaryOverlays = new List<TemporaryOverlay>(); Reflection.SetFieldValue<SkinnedMeshRenderer>((object)val6, "mainSkinnedMeshRenderer", val3.GetComponentsInChildren<SkinnedMeshRenderer>()[0]); GameObject gameObject = ((Component)transform).gameObject; ModelSkinController val8 = gameObject.AddComponent<ModelSkinController>(); LanguageAPI.Add(nameKey + "BODY_DEFAULT_SKIN_NAME", "Default"); LanguageAPI.Add(nameKey + "BODY_HOLY_SKIN_NAME", "Holy Knight"); val8.skins = (SkinDef[])(object)new SkinDef[2] { LoadoutAPI.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(gameObject, nameKey + "BODY_DEFAULT_SKIN_NAME", array2, skin: false, nameKey == "THEONE")), LoadoutAPI.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(gameObject, nameKey + "BODY_HOLY_SKIN_NAME", array2, skin: true, nameKey == "THEONE", Achievements.masteryUnlock)) }; HealthComponent component8 = val2.GetComponent<HealthComponent>(); component8.health = component2.baseMaxHealth; component8.shield = 0f; component8.barrier = 0f; component8.magnetiCharge = 0f; component8.body = null; component8.dontShowHealthbar = false; component8.globalDeathEventChanceCoefficient = 1f; val2.GetComponent<Interactor>().maxInteractionDistance = 3f; val2.GetComponent<InteractionDriver>().highlightInteractor = true; SfxLocator component9 = val2.GetComponent<SfxLocator>(); component9.deathSound = "Play_ui_player_death"; component9.barkSound = ""; component9.openSound = ""; component9.landingSound = "Play_char_land"; component9.fallDamageSound = "Play_char_land_fall_damage"; component9.aliveLoopStart = ""; component9.aliveLoopStop = ""; Rigidbody component10 = val2.GetComponent<Rigidbody>(); component10.mass = 100f; component10.drag = 0f; component10.angularDrag = 0f; component10.useGravity = false; component10.isKinematic = true; component10.interpolation = (RigidbodyInterpolation)0; component10.collisionDetectionMode = (CollisionDetectionMode)0; component10.constraints = (RigidbodyConstraints)0; CapsuleCollider component11 = ((Component)component7.FindChild("collider")).GetComponent<CapsuleCollider>(); ((Collider)component11).isTrigger = false; ((Collider)component11).material = null; KinematicCharacterMotor component12 = val2.GetComponent<KinematicCharacterMotor>(); component12.CharacterController = (BaseCharacterController)(object)component3; component12.Capsule = component11; component12.Rigidbody = component10; component12.DetectDiscreteCollisions = false; component12.GroundDetectionExtraDistance = 0f; component12.MaxStepHeight = 0.2f; component12.MinRequiredStepDepth = 0.1f; component12.MaxStableSlopeAngle = 55f; component12.MaxStableDistanceFromLedge = 0.5f; component12.PreventSnappingOnLedges = false; component12.MaxStableDenivelationAngle = 55f; component12.RigidbodyInteractionType = (RigidbodyInteractionType)0; component12.PreserveAttachedRigidbodyMomentum = true; component12.HasPlanarConstraint = false; component12.PlanarConstraintAxis = Vector3.up; component12.StepHandling = (StepHandlingMethod)0; component12.LedgeHandling = true; component12.InteractiveRigidbodyHandling = true; component12.SafeMovement = false; HurtBoxGroup val9 = val3.AddComponent<HurtBoxGroup>(); HurtBox val10 = ((Component)component11).gameObject.AddComponent<HurtBox>(); ((Component)val10).gameObject.layer = LayerIndex.entityPrecise.intVal; val10.healthComponent = component8; val10.isBullseye = true; val10.damageModifier = (DamageModifier)0; val10.hurtBoxGroup = val9; val10.indexInGroup = 0; val9.hurtBoxes = (HurtBox[])(object)new HurtBox[1] { val10 }; val9.mainHurtBox = val10; val9.bullseyeCount = 1; AimAnimator val11 = val3.AddComponent<AimAnimator>(); val11.inputBank = component4; val11.directionComponent = component; val11.pitchRangeMin = -50f; val11.pitchRangeMax = 50f; val11.yawRangeMin = -50f; val11.yawRangeMax = 50f; val11.pitchGiveupRange = 30f; val11.yawGiveupRange = 10f; val11.giveupDuration = 3f; FootstepHandler val12 = val3.AddComponent<FootstepHandler>(); val12.baseFootstepString = "Play_player_footstep"; val12.sprintFootstepOverrideString = ""; val12.enableFootstepDust = true; val12.footstepDustPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion(); EntityStateMachine component13 = ((Component)component2).GetComponent<EntityStateMachine>(); component13.mainStateType = new SerializableEntityStateType(typeof(GenericCharacterMain)); CharacterDeathBehavior component14 = val2.GetComponent<CharacterDeathBehavior>(); component14.deathStateMachine = val2.GetComponent<EntityStateMachine>(); component14.deathState = new SerializableEntityStateType(typeof(GenericCharacterDeath)); Utils.CreateHitbox("Swing", val3.transform, new Vector3(4.5f, 4.5f, 4.8f)).transform.localPosition = new Vector3(0f, 1f, 1.1f); Utils.CreateHitbox("Dash", val3.transform, new Vector3(5f, 5f, 5.5f)).transform.localPosition = new Vector3(0f, 1f, 1.1f); Utils.CreateHitbox("Fire", val3.transform, new Vector3(8f, 12f, 12f)).transform.localPosition = new Vector3(0f, 5f, 5f); Utils.CreateHitbox("Heavy", val3.transform, new Vector3(1.5f, 6f, 7f)).transform.localPosition = new Vector3(0f, 1f, 1.5f); HitBoxGroup h = null; Utils.CreateHitbox("HeavySides", val3.transform, new Vector3(2.5f, 6f, 7f), out h).transform.localPosition = new Vector3(-2f, 1f, 1.5f); Utils.CreateHitbox(val3.transform, new Vector3(2.5f, 6f, 7f), h).transform.localPosition = new Vector3(2f, 1f, 1.5f); GameObject val13 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercMonsterMaster.prefab").WaitForCompletion(), modelName + "Master", true); ContentAddition.AddMaster(val13); CharacterMaster component15 = val13.GetComponent<CharacterMaster>(); component15.bodyPrefab = val2; return val2; } private void SetupPowerupBody() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) characterPowerupPrefab = CreatePrefab("theone", "The OneBody", "THEONE"); characterPowerupPrefab.AddComponent<TheOneBehaviour>(); ContentAddition.AddBody(characterPowerupPrefab); LanguageAPI.Add("THEONE_NAME", "The One"); CharacterBody component = characterPowerupPrefab.GetComponent<CharacterBody>(); ((Object)component).name = "TheOneBody"; component.bodyFlags = (BodyFlags)16; component.rootMotionInMainState = false; component.mainRootSpeed = 0f; component.baseMaxHealth = 750f; component.levelMaxHealth = 40f; component.baseRegen = 12.5f; component.levelRegen = 0.25f; component.baseMaxShield = 0f; component.levelMaxShield = 0f; component.baseMoveSpeed = 6f; component.levelMoveSpeed = 0f; component.baseAcceleration = 110f; component.baseJumpPower = 15f; component.levelJumpPower = 0f; component.baseDamage = 84f; component.levelDamage = 2.4f; component.baseAttackSpeed = 1f; component.levelAttackSpeed = 0f; component.baseCrit = 1f; component.levelCrit = 0f; component.baseArmor = 15f; component.levelArmor = 1f; component.baseJumpCount = 1; component.sprintingSpeedMultiplier = 1f; component.wasLucky = false; component.hideCrosshair = false; component.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("bigPortrait").texture; ((Component)component.aimOriginTransform.parent).transform.localScale = Vector3.one * 1.25f; component.aimOriginTransform.localPosition = new Vector3(0f, 2.7f, 0f); ((Component)component).GetComponent<SetStateOnHurt>().canBeFrozen = false; EntityStateMachine component2 = ((Component)component).GetComponent<EntityStateMachine>(); component2.initialStateType = new SerializableEntityStateType(typeof(FastSpawnState)); characterPowerupPrefab.GetComponent<HealthComponent>().health = component.baseMaxHealth; GenericSkill[] components = characterPowerupPrefab.GetComponents<GenericSkill>(); foreach (GenericSkill val in components) { Object.DestroyImmediate((Object)(object)val); } PrimarySetup(characterPowerupPrefab, "THEONE", "Swing Axe foward, dealing <style=cIsDamage>400% damage</style> to nearby enemies.", typeof(OnePrimary)); OneSecondarySetup(); OneUtilitySetup(); OneSpecialSetup(); } private void RegisterCharacter() { //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_0144: 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) string text = "<style=cSub>\r\n\r\n< ! > Secondary Skills specialize in closing the gap, his pride places him in the midst of the fight!" + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Escanor is a close-quarters fighter, keep an eye out for airborne enemies!" + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Charge and Fire allows you to not only gain some air superiority over your enemies, but also Stun them, perfect for buying valuable time." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Take advantage of his larger health pool and quicker regeneration to maximize his time in combat!"; string text2 = "..and so he left, standing at the pinnacle of all"; string text3 = "..and so he vanished, the strongest takes his leave"; LanguageAPI.Add("ESCANOR_NAME", "Escanor"); LanguageAPI.Add("ESCANOR_DESCRIPTION", text); LanguageAPI.Add("ESCANOR_SUBTITLE", "Lion Sin of Pride"); LanguageAPI.Add("ESCANOR_OUTRO", text2); LanguageAPI.Add("ESCANOR_FAIL", text3); SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>(); val.cachedName = "ESCANOR_NAME"; val.unlockableDef = null; val.descriptionToken = "ESCANOR_DESCRIPTION"; val.primaryColor = characterColor; val.bodyPrefab = characterPrefab; val.displayPrefab = Utils.NewDisplayModel(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "EscanorDisplay"); val.outroFlavorToken = "ESCANOR_OUTRO"; val.desiredSortPosition = 11f; val.mainEndingEscapeFailureFlavorToken = "ESCANOR_FAIL"; ContentAddition.AddSurvivorDef(val); val = ScriptableObject.CreateInstance<SurvivorDef>(); val.cachedName = "THEONE_NAME"; val.unlockableDef = null; val.descriptionToken = "ESCANOR_DESCRIPTION"; val.primaryColor = characterColor; val.bodyPrefab = characterPowerupPrefab; val.displayPrefab = Utils.NewDisplayModel(((Component)characterPowerupPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "EscanorDisplay"); val.outroFlavorToken = "ESCANOR_OUTRO"; val.mainEndingEscapeFailureFlavorToken = "ESCANOR_FAIL"; val.hidden = true; ContentAddition.AddSurvivorDef(val); } private void RegisterStates() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) bool flag = default(bool); ContentAddition.AddEntityState<Primary>(ref flag); ContentAddition.AddEntityState<Secondary>(ref flag); ContentAddition.AddEntityState<SecondaryFollowup>(ref flag); ContentAddition.AddEntityState<SecondaryAltSelect>(ref flag); ContentAddition.AddEntityState<SecondaryAlt>(ref flag); ContentAddition.AddEntityState<SecondaryAltFollowup>(ref flag); ContentAddition.AddEntityState<Utility>(ref flag); ContentAddition.AddEntityState<UtilityAim>(ref flag); ContentAddition.AddEntityState<UtilityFire>(ref flag); ContentAddition.AddEntityState<UtilityAlt>(ref flag); ContentAddition.AddEntityState<Special>(ref flag); ContentAddition.AddEntityState<SpecialSwing>(ref flag); ContentAddition.AddEntityState<SpecialEnd>(ref flag); ContentAddition.AddEntityState<EscanorSpawnState>(ref flag); ContentAddition.AddEntityState<FastSpawnState>(ref flag); ContentAddition.AddEntityState<OnePrimary>(ref flag); ContentAddition.AddEntityState<OneSecondary>(ref flag); ContentAddition.AddEntityState<OneSecondaryFollowup>(ref flag); ContentAddition.AddEntityState<OneUtility>(ref flag); ContentAddition.AddEntityState<OneSpecial>(ref flag); } private void SkillSetup() { GenericSkill[] components = characterPrefab.GetComponents<GenericSkill>(); foreach (GenericSkill val in components) { Object.DestroyImmediate((Object)(object)val); } PassiveSetup(); PrimarySetup(characterPrefab, "ESCANOR", "Swing Axe forward, dealing <style=cIsDamage>300% damage</style> to nearby enemies.", typeof(Primary)); SecondarySetup(); UtilitySetup(); SpecialSetup(); } private void OneSecondarySetup() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPowerupPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("THEONE_M2", "Super Slash"); LanguageAPI.Add("THEONE_M2_DESCRIPTION", "Launch towards enemies with extreme might. After a short period, scorching flames erupt forward for <style=cIsDamage>750% damage</style>, applying a <style=cIsHealth>300% burn</style>."); OneSkillDef oneSkillDef = ScriptableObject.CreateInstance<OneSkillDef>(); ((SkillDef)oneSkillDef).activationState = new SerializableEntityStateType(typeof(OneSecondary)); ((SkillDef)oneSkillDef).activationStateMachineName = "Body"; ((SkillDef)oneSkillDef).baseMaxStock = 1; ((SkillDef)oneSkillDef).baseRechargeInterval = 7f; ((SkillDef)oneSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)oneSkillDef).canceledFromSprinting = false; ((SkillDef)oneSkillDef).fullRestockOnAssign = false; ((SkillDef)oneSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)oneSkillDef).isCombatSkill = true; ((SkillDef)oneSkillDef).mustKeyPress = true; ((SkillDef)oneSkillDef).cancelSprintingOnActivation = true; ((SkillDef)oneSkillDef).rechargeStock = 1; ((SkillDef)oneSkillDef).requiredStock = 1; ((SkillDef)oneSkillDef).stockToConsume = 1; ((SkillDef)oneSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("SuperSlash"); ((SkillDef)oneSkillDef).skillDescriptionToken = "THEONE_M2_DESCRIPTION"; ((SkillDef)oneSkillDef).skillName = "THEONE_M2"; ((SkillDef)oneSkillDef).skillNameToken = "THEONE_M2"; ContentAddition.AddSkillDef((SkillDef)(object)oneSkillDef); component.secondary = characterPowerupPrefab.AddComponent<GenericSkill>(); SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>(); val.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.secondary, "_skillFamily", val); SkillFamily skillFamily = component.secondary.skillFamily; Variant[] variants = skillFamily.variants; Variant val2 = new Variant { skillDef = (SkillDef)(object)oneSkillDef }; ((Variant)(ref val2)).viewableNode = new Node(((SkillDef)oneSkillDef).skillNameToken, false, (Node)null); variants[0] = val2; ContentAddition.AddSkillFamily(skillFamily); } private void OneUtilitySetup() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPowerupPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("THEONE_UTIL", "Supernova"); LanguageAPI.Add("THEONE_UTIL_DESCRIPTION", "Locks onto and lunges towards a single enemy, dealing <style=cIsDamage>1500% damage</style> in a fiery cone. Applies <style=cIsDamage>Overheat</style>."); OneSkillDef oneSkillDef = ScriptableObject.CreateInstance<OneSkillDef>(); ((SkillDef)oneSkillDef).activationState = new SerializableEntityStateType(typeof(OneUtility)); ((SkillDef)oneSkillDef).activationStateMachineName = "Body"; ((SkillDef)oneSkillDef).baseMaxStock = 1; ((SkillDef)oneSkillDef).baseRechargeInterval = 8f; ((SkillDef)oneSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)oneSkillDef).canceledFromSprinting = false; ((SkillDef)oneSkillDef).fullRestockOnAssign = false; ((SkillDef)oneSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)oneSkillDef).isCombatSkill = true; ((SkillDef)oneSkillDef).mustKeyPress = true; ((SkillDef)oneSkillDef).cancelSprintingOnActivation = true; ((SkillDef)oneSkillDef).rechargeStock = 1; ((SkillDef)oneSkillDef).requiredStock = 1; ((SkillDef)oneSkillDef).stockToConsume = 1; ((SkillDef)oneSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("Supernova"); ((SkillDef)oneSkillDef).skillDescriptionToken = "THEONE_UTIL_DESCRIPTION"; ((SkillDef)oneSkillDef).skillName = "THEONE_UTIL"; ((SkillDef)oneSkillDef).skillNameToken = "THEONE_UTIL"; ((SkillDef)oneSkillDef).keywordTokens = new string[1] { "ESCANOR_OVERHEAT_KEYWORD" }; ContentAddition.AddSkillDef((SkillDef)(object)oneSkillDef); component.utility = characterPowerupPrefab.AddComponent<GenericSkill>(); SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>(); val.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.utility, "_skillFamily", val); SkillFamily skillFamily = component.utility.skillFamily; Variant[] variants = skillFamily.variants; Variant val2 = new Variant { skillDef = (SkillDef)(object)oneSkillDef }; ((Variant)(ref val2)).viewableNode = new Node(((SkillDef)oneSkillDef).skillNameToken, false, (Node)null); variants[0] = val2; ContentAddition.AddSkillFamily(skillFamily); } private void OneSpecialSetup() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPowerupPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("THEONE_SPEC", "Divine Sword Escanor"); LanguageAPI.Add("THEONE_SPEC_DESCRIPTION", "Slices the very air before him with an open hand, scorching all enemies on stage, applying burn for <style=cIsDamage>50000% damage</style>."); OneSkillDef oneSkillDef = ScriptableObject.CreateInstance<OneSkillDef>(); ((SkillDef)oneSkillDef).activationState = new SerializableEntityStateType(typeof(OneSpecial)); ((SkillDef)oneSkillDef).activationStateMachineName = "Body"; ((SkillDef)oneSkillDef).baseMaxStock = 1; ((SkillDef)oneSkillDef).baseRechargeInterval = 0f; ((SkillDef)oneSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)oneSkillDef).canceledFromSprinting = false; ((SkillDef)oneSkillDef).fullRestockOnAssign = false; ((SkillDef)oneSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)oneSkillDef).isCombatSkill = true; ((SkillDef)oneSkillDef).mustKeyPress = true; ((SkillDef)oneSkillDef).cancelSprintingOnActivation = true; ((SkillDef)oneSkillDef).rechargeStock = 0; ((SkillDef)oneSkillDef).dontAllowPastMaxStocks = true; ((SkillDef)oneSkillDef).requiredStock = 1; ((SkillDef)oneSkillDef).stockToConsume = 1; ((SkillDef)oneSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("DivineSword"); ((SkillDef)oneSkillDef).skillDescriptionToken = "THEONE_SPEC_DESCRIPTION"; ((SkillDef)oneSkillDef).skillName = "THEONE_SPEC"; ((SkillDef)oneSkillDef).skillNameToken = "THEONE_SPEC"; ContentAddition.AddSkillDef((SkillDef)(object)oneSkillDef); component.special = characterPowerupPrefab.AddComponent<GenericSkill>(); SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>(); val.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.special, "_skillFamily", val); SkillFamily skillFamily = component.special.skillFamily; Variant[] variants = skillFamily.variants; Variant val2 = new Variant { skillDef = (SkillDef)(object)oneSkillDef }; ((Variant)(ref val2)).viewableNode = new Node(((SkillDef)oneSkillDef).skillNameToken, false, (Node)null); variants[0] = val2; ContentAddition.AddSkillFamily(skillFamily); } private void PassiveSetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("THEONE_PASSIVE_KEYWORD", "<style=cKeywordName>The One</style><style=cSub></style>" + Environment.NewLine + "<style=cIsDamage>+300% Max Health</style>" + Environment.NewLine + "<style=cIsDamage>+700% Base Damage</style>" + Environment.NewLine + "<style=cIsDamage>+500% Health Regeneration</style>" + Environment.NewLine + "<style=cIsHealth>-1 Base Movement Speed</style>" + Environment.NewLine + "<style=cIsHealth>0 Sprint Speed</style>"); LanguageAPI.Add("ESCANOR_PASSIVE_NAME", "Sunshine"); LanguageAPI.Add("ESCANOR_PASSIVE_DESCRIPTION", "Every passing moment, his strength rises alongside the sun, and at high noon, it reaches its peak. During that time, for just one minute, he becomes the Invincible Incarnation of Power; he becomes '<style=cIsDamage>The One</style>'."); component.passiveSkill.enabled = true; component.passiveSkill.skillNameToken = "ESCANOR_PASSIVE_NAME"; component.passiveSkill.skillDescriptionToken = "ESCANOR_PASSIVE_DESCRIPTION"; component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("Sunshine"); component.passiveSkill.keywordToken = "THEONE_PASSIVE_KEYWORD"; } private void PrimarySetup(GameObject prefab, string nameKey, string description, Type type) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = prefab.GetComponent<SkillLocator>(); LanguageAPI.Add(nameKey + "_M1", "Divine Axe Rhitta"); LanguageAPI.Add(nameKey + "_M1_DESCRIPTION", description); SkillDef val = null; val = (SkillDef)((!(nameKey == "ESCANOR")) ? ((object)ScriptableObject.CreateInstance<OneSkillDef>()) : ((object)ScriptableObject.CreateInstance<EscanorSkillDef>())); val.activationState = new SerializableEntityStateType(type); val.activationStateMachineName = "Weapon"; val.baseMaxStock = 0; val.baseRechargeInterval = 0f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.fullRestockOnAssign = true; val.interruptPriority = (InterruptPriority)0; val.isCombatSkill = true; val.mustKeyPress = false; val.cancelSprintingOnActivation = true; val.rechargeStock = 0; val.requiredStock = 0; val.stockToConsume = 0; val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("DivineAxeRhitta"); val.skillDescriptionToken = nameKey + "_M1_DESCRIPTION"; val.skillName = nameKey + "_M1"; val.skillNameToken = nameKey + "_M1"; ContentAddition.AddSkillDef(val); component.primary = prefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.primary, "_skillFamily", val2); SkillFamily skillFamily = component.primary.skillFamily; Variant[] variants = skillFamily.variants; Variant val3 = new Variant { skillDef = val }; ((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[0] = val3; ContentAddition.AddSkillFamily(skillFamily); } private void SecondarySetup() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("ESCANOR_M2", "Blazing Sun"); LanguageAPI.Add("ESCANOR_M2_DESCRIPTION", "Burst forward with great speed, gaining <style=cIsDamage>60% movement speed</style> for a short duration, and dealing <style=cIsDamage>150% damage</style> to enemies, before calling upwards a plume of fire for <style=cIsDamage>250% damage</style>."); EscanorSkillDef escanorSkillDef = ScriptableObject.CreateInstance<EscanorSkillDef>(); ((SkillDef)escanorSkillDef).activationState = new SerializableEntityStateType(typeof(Secondary)); ((SkillDef)escanorSkillDef).activationStateMachineName = "Body"; ((SkillDef)escanorSkillDef).baseMaxStock = 1; ((SkillDef)escanorSkillDef).baseRechargeInterval = 6f; ((SkillDef)escanorSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)escanorSkillDef).canceledFromSprinting = false; ((SkillDef)escanorSkillDef).fullRestockOnAssign = false; ((SkillDef)escanorSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)escanorSkillDef).isCombatSkill = true; ((SkillDef)escanorSkillDef).mustKeyPress = true; ((SkillDef)escanorSkillDef).cancelSprintingOnActivation = true; ((SkillDef)escanorSkillDef).rechargeStock = 1; ((SkillDef)escanorSkillDef).requiredStock = 1; ((SkillDef)escanorSkillDef).stockToConsume = 1; ((SkillDef)escanorSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("BlazingSun"); ((SkillDef)escanorSkillDef).skillDescriptionToken = "ESCANOR_M2_DESCRIPTION"; ((SkillDef)escanorSkillDef).skillName = "ESCANOR_M2"; ((SkillDef)escanorSkillDef).skillNameToken = "ESCANOR_M2"; ((SkillDef)escanorSkillDef).keywordTokens = new string[1] { "KEYWORD_IGNITE" }; ContentAddition.AddSkillDef((SkillDef)(object)escanorSkillDef); component.secondary = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>(); val.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.secondary, "_skillFamily", val); SkillFamily skillFamily = component.secondary.skillFamily; Variant[] variants = skillFamily.variants; Variant val2 = new Variant { skillDef = (SkillDef)(object)escanorSkillDef }; ((Variant)(ref val2)).viewableNode = new Node(((SkillDef)escanorSkillDef).skillNameToken, false, (Node)null); variants[0] = val2; ContentAddition.AddSkillFamily(skillFamily); LanguageAPI.Add("ESCANOR_M2Alt", "Elegant Blow"); LanguageAPI.Add("ESCANOR_M2Alt_DESCRIPTION", "Launch into an Arc, landing with great force and dealing <style=cIsDamage>750% damage</style>. Gain <style=cIsDamage>Power Buff</style> for <style=cIsDamage>+50% damage</style>."); escanorSkillDef = ScriptableObject.CreateInstance<EscanorSkillDef>(); ((SkillDef)escanorSkillDef).activationState = new SerializableEntityStateType(typeof(SecondaryAltSelect)); ((SkillDef)escanorSkillDef).activationStateMachineName = "Body"; ((SkillDef)escanorSkillDef).baseMaxStock = 1; ((SkillDef)escanorSkillDef).baseRechargeInterval = 7f; ((SkillDef)escanorSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)escanorSkillDef).canceledFromSprinting = false; ((SkillDef)escanorSkillDef).fullRestockOnAssign = false; ((SkillDef)escanorSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)escanorSkillDef).isCombatSkill = true; ((SkillDef)escanorSkillDef).mustKeyPress = true; ((SkillDef)escanorSkillDef).cancelSprintingOnActivation = true; ((SkillDef)escanorSkillDef).rechargeStock = 1; ((SkillDef)escanorSkillDef).requiredStock = 1; ((SkillDef)escanorSkillDef).stockToConsume = 1; ((SkillDef)escanorSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("ElegantBlow"); ((SkillDef)escanorSkillDef).skillDescriptionToken = "ESCANOR_M2Alt_DESCRIPTION"; ((SkillDef)escanorSkillDef).skillName = "ESCANOR_M2Alt"; ((SkillDef)escanorSkillDef).skillNameToken = "ESCANOR_M2Alt"; ContentAddition.AddSkillDef((SkillDef)(object)escanorSkillDef); Utils.AddAlt(skillFamily, (SkillDef)(object)escanorSkillDef); } private void UtilitySetup() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Expected O, but got Unknown //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0179: 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_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("ESCANOR_OVERHEAT_KEYWORD", "<style=cKeywordName>Overheat</style><style=cSub></style><style=cIsHealth>Fire</style> damage received is <style=cIsDamage>doubled</style>."); LanguageAPI.Add("ESCANOR_UTIL", "Charge and Fire"); LanguageAPI.Add("ESCANOR_UTIL_DESCRIPTION", "Leap vertically into the air, charge a <style=cIsDamage>stunning</style> blast for <style=cIsDamage>200% damage</style>. Applies <style=cIsDamage>Overheat</style>."); EscanorSkillDef escanorSkillDef = ScriptableObject.CreateInstance<EscanorSkillDef>(); ((SkillDef)escanorSkillDef).activationState = new SerializableEntityStateType(typeof(Utility)); ((SkillDef)escanorSkillDef).activationStateMachineName = "Body"; ((SkillDef)escanorSkillDef).baseMaxStock = 1; ((SkillDef)escanorSkillDef).baseRechargeInterval = 6f; ((SkillDef)escanorSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)escanorSkillDef).canceledFromSprinting = false; ((SkillDef)escanorSkillDef).fullRestockOnAssign = false; ((SkillDef)escanorSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)escanorSkillDef).isCombatSkill = false; ((SkillDef)escanorSkillDef).mustKeyPress = true; ((SkillDef)escanorSkillDef).cancelSprintingOnActivation = true; ((SkillDef)escanorSkillDef).rechargeStock = 1; ((SkillDef)escanorSkillDef).requiredStock = 1; ((SkillDef)escanorSkillDef).stockToConsume = 1; ((SkillDef)escanorSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("ChargeAndFire"); ((SkillDef)escanorSkillDef).skillDescriptionToken = "ESCANOR_UTIL_DESCRIPTION"; ((SkillDef)escanorSkillDef).skillName = "ESCANOR_UTIL"; ((SkillDef)escanorSkillDef).skillNameToken = "ESCANOR_UTIL"; ((SkillDef)escanorSkillDef).keywordTokens = new string[1] { "ESCANOR_OVERHEAT_KEYWORD" }; ContentAddition.AddSkillDef((SkillDef)(object)escanorSkillDef); component.utility = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>(); val.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.utility, "_skillFamily", val); SkillFamily skillFamily = component.utility.skillFamily; Variant[] variants = skillFamily.variants; Variant val2 = new Variant { skillDef = (SkillDef)(object)escanorSkillDef }; ((Variant)(ref val2)).viewableNode = new Node(((SkillDef)escanorSkillDef).skillNameToken, false, (Node)null); variants[0] = val2; ContentAddition.AddSkillFamily(skillFamily); LanguageAPI.Add("ESCANOR_WEAKNESS_KEYWORD", "<style=cKeywordName>Weakness</style><style=cSub>" + Environment.NewLine + "<style=cIsHealth>-20 Armor</style>" + Environment.NewLine + "<style=cIsHealth>-40% Movement Speed</style>" + Environment.NewLine + "<style=cIsHealth>-40% Damage</style></style>"); LanguageAPI.Add("ESCANOR_UTILALT", "Cruel Sun"); LanguageAPI.Add("ESCANOR_UTILALT_DESCRIPTION", "Charge and Toss a miniature star for <style=cIsDamage>600% damage</style>, applying <style=cIsDamage>Weakness</style>."); escanorSkillDef = ScriptableObject.CreateInstance<EscanorSkillDef>(); ((SkillDef)escanorSkillDef).activationState = new SerializableEntityStateType(typeof(UtilityAlt)); ((SkillDef)escanorSkillDef).activationStateMachineName = "Slide"; ((SkillDef)escanorSkillDef).baseMaxStock = 1; ((SkillDef)escanorSkillDef).baseRechargeInterval = 8f; ((SkillDef)escanorSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)escanorSkillDef).canceledFromSprinting = false; ((SkillDef)escanorSkillDef).fullRestockOnAssign = false; ((SkillDef)escanorSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)escanorSkillDef).isCombatSkill = false; ((SkillDef)escanorSkillDef).mustKeyPress = true; ((SkillDef)escanorSkillDef).cancelSprintingOnActivation = false; ((SkillDef)escanorSkillDef).rechargeStock = 1; ((SkillDef)escanorSkillDef).requiredStock = 1; ((SkillDef)escanorSkillDef).stockToConsume = 1; ((SkillDef)escanorSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("CruelSun"); ((SkillDef)escanorSkillDef).skillDescriptionToken = "ESCANOR_UTILALT_DESCRIPTION"; ((SkillDef)escanorSkillDef).skillName = "ESCANOR_UTILALT"; ((SkillDef)escanorSkillDef).skillNameToken = "ESCANOR_UTILALT"; ((SkillDef)escanorSkillDef).keywordTokens = new string[1] { "ESCANOR_WEAKNESS_KEYWORD" }; ContentAddition.AddSkillDef((SkillDef)(object)escanorSkillDef); Utils.AddAlt(skillFamily, (SkillDef)(object)escanorSkillDef); } private void SpecialSetup() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("ESCANOR_SPEC", "Game Over"); LanguageAPI.Add("ESCANOR_SPEC_DESCRIPTION", "Strike down all immediate enemies with incredible force, dealing <style=cIsDamage>6000% damage</style> to enemies hit <style=cIsHealth>directly in front</style>, which otherwise deals <style=cIsDamage>2000% damage</style>."); EscanorSkillDef escanorSkillDef = ScriptableObject.CreateInstance<EscanorSkillDef>(); ((SkillDef)escanorSkillDef).activationState = new SerializableEntityStateType(typeof(Special)); ((SkillDef)escanorSkillDef).activationStateMachineName = "Body"; ((SkillDef)escanorSkillDef).baseMaxStock = 1; ((SkillDef)escanorSkillDef).baseRechargeInterval = 20f; ((SkillDef)escanorSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)escanorSkillDef).canceledFromSprinting = false; ((SkillDef)escanorSkillDef).fullRestockOnAssign = false; ((SkillDef)escanorSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)escanorSkillDef).isCombatSkill = true; ((SkillDef)escanorSkillDef).mustKeyPress = true; ((SkillDef)escanorSkillDef).cancelSprintingOnActivation = true; ((SkillDef)escanorSkillDef).rechargeStock = 1; ((SkillDef)escanorSkillDef).requiredStock = 1; ((SkillDef)escanorSkillDef).stockToConsume = 1; ((SkillDef)escanorSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("GameOver"); ((SkillDef)escanorSkillDef).skillDescriptionToken = "ESCANOR_SPEC_DESCRIPTION"; ((SkillDef)escanorSkillDef).skillName = "ESCANOR_SPEC"; ((SkillDef)escanorSkillDef).skillNameToken = "ESCANOR_SPEC"; ContentAddition.AddSkillDef((SkillDef)(object)escanorSkillDef); component.special = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>(); val.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.special, "_skillFamily", val); SkillFamily skillFamily = component.special.skillFamily; Variant[] variants = skillFamily.variants; Variant val2 = new Variant { skillDef = (SkillDef)(object)escanorSkillDef }; ((Variant)(ref val2)).viewableNode = new Node(((SkillDef)escanorSkillDef).skillNameToken, false, (Node)null); variants[0] = val2; ContentAddition.AddSkillFamily(skillFamily); } } internal class OneSkillDef : SkillDef { private class InstanceData : BaseSkillInstanceData { public SkillLocator skillLocator; public TheOneBehaviour oneBehaviour; public CharacterMotor motor; } public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData { skillLocator = ((Component)skillSlot).GetComponent<SkillLocator>(), oneBehaviour = ((Component)skillSlot).GetComponent<TheOneBehaviour>(), motor = ((Component)skillSlot).GetComponent<CharacterMotor>() }; } internal static bool IsExecutable([NotNull] GenericSkill skillSlot) { InstanceData instanceData = (InstanceData)(object)skillSlot.skillInstanceData; TheOneBehaviour oneBehaviour = instanceData.oneBehaviour; SkillLocator skillLocator = instanceData.skillLocator; CharacterMotor motor = instanceData.motor; if (Object.op_Implicit((Object)(object)skillLocator) && Object.op_Implicit((Object)(object)oneBehaviour) && Object.op_Implicit((Object)(object)motor)) { if ((Object)(object)skillSlot == (Object)(object)skillLocator.primary) { } if ((Object)(object)skillSlot == (Object)(object)skillLocator.secondary) { return oneBehaviour.canExecute && motor.isGrounded; } if ((Object)(object)skillSlot == (Object)(object)skillLocator.utility) { return oneBehaviour.canExecute && Object.op_Implicit((Object)(object)oneBehaviour.target); } if ((Object)(object)skillSlot == (Object)(object)skillLocator.special) { return oneBehaviour.canExecute && motor.isGrounded && !oneBehaviour.specialUsed; } return oneBehaviour.canExecute; } return true; } public override bool CanExecute([NotNull] GenericSkill skillSlot) { return IsExecutable(skillSlot) && ((SkillDef)this).CanExecute(skillSlot); } public override bool IsReady([NotNull] GenericSkill skillSlot) { return ((SkillDef)this).IsReady(skillSlot) && IsExecutable(skillSlot); } } internal class Prefabs { internal static Material baseIndicatorMat; internal static Material redIndicatorMat; internal static Material baseArcMat; internal static Material redArcMat; internal static GameObject fireballProjectileGhost; internal static GameObject fireballProjectile; internal static GameObject fireballExplosion; internal static GameObject lineIndicator; internal static GameObject impactEffect; internal static GameObject sunProjectileImpact; internal static GameObject sunProjectile; internal static GameObject sunProjectileGhost; internal static GameObject scorchEffect; internal static GameObject coneEffect; internal static GameObject oneIndicator; internal static GameObject oneLineProjectile; internal static GameObject oneLineProjectileGhost; internal static GameObject axeHitEffect; internal static GameObject punchHitEffect; internal static GameObject slamEffect; internal static GameObject chargeFireEffect; internal static GameObject powerupEffect; internal static GameObject dePowerupEffect; internal static GameObject mapProjection; internal static ModdedDamageType overheatDMG; internal static ModdedDamageType fire; internal static ModdedDamageType go; internal static BuffDef overheat; internal static BuffDef goHit; internal static BuffDef power; internal static BuffDef weak; internal static BuffDef armor; internal static BuffDef speed; internal static T Load<T>(string path) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Addressables.LoadAssetAsync<T>((object)path).WaitForCompletion(); } internal static void CreatePrefabs() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_005b: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_078b: Unknown result type (might be due to invalid IL or missing references) //IL_0790: Unknown result type (might be due to invalid IL or missing references) //IL_079a: Unknown result type (might be due to invalid IL or missing references) //IL_07a1: Expected O, but got Unknown //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_0804: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_065b: Unknown result type (might be due to invalid IL or missing references) //IL_0684: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Unknown result type (might be due to invalid IL or missing references) //IL_0693: Unknown result type (might be due to invalid IL or missing references) //IL_0861: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_088a: Unknown result type (might be due to invalid IL or missing references) //IL_0894: Unknown result type (might be due to invalid IL or missing references) //IL_08de: Unknown result type (might be due to invalid IL or missing references) //IL_08e8: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_098b: Unknown result type (might be due to invalid IL or missing references) //IL_0990: Unknown result type (might be due to invalid IL or missing references) //IL_0a41: Unknown result type (might be due to invalid IL or missing references) //IL_0a4b: Unknown result type (might be due to invalid IL or missing references) //IL_0b6b: Unknown result type (might be due to invalid IL or missing references) //IL_0b75: Unknown result type (might be due to invalid IL or missing references) //IL_0a18: Unknown result type (might be due to invalid IL or missing references) //IL_0a1d: Unknown result type (might be due to invalid IL or missing references) //IL_09fc: Unknown result type (might be due to invalid IL or missing references) //IL_0a01: Unknown result type (might be due to invalid IL or missing references) overheatDMG = DamageAPI.ReserveDamageType(); fire = DamageAPI.ReserveDamageType(); go = DamageAPI.ReserveDamageType(); baseIndicatorMat = Load<Material>("RoR2/Base/Common/VFX/matAreaIndicatorRim.mat"); redIndicatorMat = Object.Instantiate<Material>(baseIndicatorMat); redIndicatorMat.SetColor("_TintColor", new Color(1f, 0f, 0f, 0.75f)); baseArcMat = Load<Material>("RoR2/Base/Common/VFX/matArcVisual.mat"); redArcMat = Object.Instantiate<Material>(baseArcMat); redArcMat.SetColor("_TintColor", new Color(1f, 0f, 0f, 0.75f)); Sprite sprite = Load<Sprite>("RoR2/Base/Common/texBuffSlow50Icon.tif"); overheat = Utils.NewBuffDef("Overheat", stack: false, hidden: false, sprite, new Color(1f, 0.64706f, 0f)); goHit = Utils.NewBuffDef("GO", stack: false, hidden: true, null, new Color(1f, 0.64706f, 0f)); power = Utils.NewBuffDef("Power", stack: false, hidden: false, Assets.MainAssetBundle.LoadAsset<Sprite>("arrowUpIcon"), Color.red); weak = Utils.NewBuffDef("Weak", stack: false, hidden: false, sprite, Color.yellow); armor = Utils.NewBuffDef("Armor", stack: false, hidden: false, Load<Sprite>("RoR2/Junk/Common/texBuffBodyArmorIcon.tif"), new Color(1f, 0.79608f, 0.09412f)); speed = Utils.NewBuffDef("Speed", stack: false, hidden: false, Load<Sprite>("RoR2/Base/Common/MiscIcons/texSprintIcon.png"), Color.red); dePowerupEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("dePowerupEffect"); Utils.RegisterEffect(dePowerupEffect, 2f); powerupEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("powerupEffect"); Utils.RegisterEffect(powerupEffect, 2f); axeHitEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFXSlash.prefab"), "EscanorAxeHitEffect", false); Utils.RegisterEffect(axeHitEffect, 1f, "Play_Escanor_Slash_Hit"); punchHitEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFXMedi