Decompiled source of Oryx v1.1.0
Oryx.dll
Decompiled 5 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; 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.Merc; using HG.BlendableTypes; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Utils; using RoR2; using RoR2.CharacterAI; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")] [assembly: AssemblyCompany("Dragonyck")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Oryx")] [assembly: AssemblyTitle("Oryx")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] public class TexScroll : MonoBehaviour { [SerializeField] public bool reset; [SerializeField] public float speedX = 0f; [SerializeField] public float speedY = -0.6f; [SerializeField] public bool xAxis; [SerializeField] public bool yAxis; public Material mat; public float offsetX; public float offsetY; public float stopwatch; public float baseDuration; private void Start() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) Renderer component = ((Component)this).GetComponent<Renderer>(); if (Object.op_Implicit((Object)(object)component)) { mat = component.material; mat.SetTextureOffset("_MainTex", new Vector2(0f, 0f)); } } private void Update() { //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (reset) { stopwatch += Time.deltaTime; if (stopwatch >= baseDuration) { stopwatch = 0f; mat.SetTextureOffset("_MainTex", new Vector2(0f, 0f)); } } if (Object.op_Implicit((Object)(object)mat)) { offsetX += speedX * Time.deltaTime; offsetY += speedY * Time.deltaTime; mat.SetTextureOffset("_MainTex", new Vector2(offsetX, offsetY)); } } } namespace Spearman.SkillStates { internal class MeleeSkillState : BaseSkillState { internal float hitPauseDuration; internal float hopVelocity = Assaulter.smallHopVelocity; internal string animParameter = ""; internal float hitPauseTimer; internal bool isInHitPause; internal HitStopCachedState hitStopCachedState; internal Animator animator; internal float stopwatch; internal OverlapAttack attack; internal bool hitCallback; internal float damage; internal GameObject hitEffectPrefab; internal HitBoxGroup hitBoxGroup; internal DamageType damageType = (DamageType)0; internal DamageColorIndex damageColor = (DamageColorIndex)0; internal Vector3 forceVector = Vector3.back * 100f; internal float attackStopwatch; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); isInHitPause = false; hitPauseDuration = GroundLight.hitPauseDuration / ((BaseState)this).attackSpeedStat; } internal OverlapAttack NewOverlapAttack() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) OverlapAttack val = new OverlapAttack(); val.procChainMask = default(ProcChainMask); val.procCoefficient = 1f; val.attacker = ((EntityState)this).gameObject; val.inflictor = ((EntityState)this).gameObject; val.teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex; val.damage = ((EntityState)this).characterBody.damage * damage; val.forceVector = forceVector; val.hitEffectPrefab = hitEffectPrefab; val.isCrit = ((EntityState)this).characterBody.RollCrit(); val.damageColorIndex = damageColor; val.damageType = damageType; val.maximumOverlapTargets = 100; val.hitBoxGroup = hitBoxGroup; return val; } public override void FixedUpdate() { //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); hitPauseTimer -= Time.fixedDeltaTime; if (hitCallback && !isInHitPause) { if (!((BaseState)this).isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); } if (!Utility.IsNullOrWhiteSpace(animParameter)) { hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, animParameter); } hitPauseTimer = hitPauseDuration / ((BaseState)this).attackSpeedStat; isInHitPause = true; } if (!Utility.IsNullOrWhiteSpace(animParameter) && hitPauseTimer <= 0f && isInHitPause) { ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); isInHitPause = false; } if (!isInHitPause) { attackStopwatch += Time.fixedDeltaTime; stopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)animator)) { animator.speed = 1f; } } else if (Object.op_Implicit((Object)(object)animator)) { animator.speed = 0f; } } } } namespace Oryx { internal class Assets { public static AssetBundle MainAssetBundle; public static void PopulateAssets() { if ((Object)(object)MainAssetBundle == (Object)null) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Oryx.oryxassets"); MainAssetBundle = AssetBundle.LoadFromStream(stream); } using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Oryx.Oryx.bnk"); byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } } internal class IntroParticle : MonoBehaviour { private ChildLocator childLocator; private static GameObject particleInstance; private float stopwatch; public static uint soundID; private void Start() { childLocator = ((Component)this).GetComponentInChildren<ChildLocator>(); soundID = AkSoundEngine.PostEvent(Sounds.Play_Oryx_Select, ((Component)this).gameObject); } private void FixedUpdate() { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) stopwatch += Time.fixedDeltaTime; if (stopwatch >= 2.6f && !Object.op_Implicit((Object)(object)particleInstance)) { particleInstance = Object.Instantiate<GameObject>(Assets.MainAssetBundle.LoadAsset<GameObject>("IntroTakeFX"), childLocator.FindChild("handMuzzleL")); particleInstance.transform.localPosition = Vector3.zero; particleInstance.transform.localRotation = Quaternion.Euler(310f, 180f, 180f); } } private void OnDisable() { AkSoundEngine.StopPlayingID(soundID); } } internal class OryxBlightBehaviour : MonoBehaviour { private TeamComponent teamComponent; private SphereSearch sphereSearch = new SphereSearch(); private float radius = 10f; private float stopwatch; private float stunStopwatch; private float searchInterval = 1f; private float stunInterval = 5f; private float stunDuration = 1f; private static GameObject indicatorInstance; private void Start() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) teamComponent = ((Component)this).GetComponent<TeamComponent>(); sphereSearch.origin = ((Component)this).transform.position; sphereSearch.radius = radius; SphereSearch obj = sphereSearch; LayerIndex entityPrecise = LayerIndex.entityPrecise; obj.mask = ((LayerIndex)(ref entityPrecise)).mask; indicatorInstance = Object.Instantiate<GameObject>(Prefabs.blightAreaIndicator, ((Component)((Component)this).GetComponent<ModelLocator>().modelTransform).GetComponent<ChildLocator>().FindChild("collider")); indicatorInstance.transform.localPosition = Vector3.zero; indicatorInstance.transform.localScale = Vector3.one * radius; } private void FixedUpdate() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) stopwatch += Time.fixedDeltaTime; stunStopwatch += Time.fixedDeltaTime; sphereSearch.origin = ((Component)this).transform.position; if (!(stopwatch >= searchInterval) || !Object.op_Implicit((Object)(object)teamComponent)) { return; } stopwatch = 0f; HurtBox[] hurtBoxes = sphereSearch.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(teamComponent.teamIndex)).OrderCandidatesByDistance() .FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); for (int i = 0; i < hurtBoxes.Length; i++) { if (Object.op_Implicit((Object)(object)hurtBoxes[i]) && Object.op_Implicit((Object)(object)hurtBoxes[i].healthComponent)) { if (stunStopwatch >= stunInterval) { stunStopwatch = 0f; SetStateOnHurt.SetStunOnObject(((Component)hurtBoxes[i].healthComponent).gameObject, stunDuration); } BlightDotBehaviour.SetDotOnObject(((Component)hurtBoxes[i].healthComponent).gameObject, ((Component)this).GetComponent<CharacterBody>()); } } } } internal class BlightDotBehaviour : MonoBehaviour { internal CharacterBody inflictor; private static CharacterBody victim; private HealthComponent healthComponent; private float stopwatch; private float dotInterval = 1f; private float damageCoefficient = 1.15f; private float dotDuration = 6f; private float dotStopwatch; private float stacks { get { if (Object.op_Implicit((Object)(object)victim)) { victim.GetBuffCount(Prefabs.blightDebuff); } return 1f; } } internal static void SetDotOnObject(GameObject target, CharacterBody inflictor) { if (Object.op_Implicit((Object)(object)inflictor)) { BlightDotBehaviour component = target.GetComponent<BlightDotBehaviour>(); if (Object.op_Implicit((Object)(object)component)) { component.AddStack(); } else { target.AddComponent<BlightDotBehaviour>().inflictor = inflictor; } } } internal void AddStack() { dotStopwatch = 0f; if (Object.op_Implicit((Object)(object)victim) && NetworkServer.active) { victim.AddBuff(Prefabs.blightDebuff); } } private void OnEnable() { victim = ((Component)this).GetComponent<CharacterBody>(); AddStack(); healthComponent = ((Component)this).GetComponent<HealthComponent>(); } private void FixedUpdate() { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_013d: 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_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_0180: 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_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) stopwatch += Time.fixedDeltaTime; dotStopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)victim) && Object.op_Implicit((Object)(object)inflictor) && Object.op_Implicit((Object)(object)victim.teamComponent) && Object.op_Implicit((Object)(object)inflictor.teamComponent)) { if (victim.teamComponent.teamIndex != inflictor.teamComponent.teamIndex) { if (stopwatch >= dotInterval && Object.op_Implicit((Object)(object)victim) && Object.op_Implicit((Object)(object)healthComponent) && Object.op_Implicit((Object)(object)inflictor.healthComponent) && Object.op_Implicit((Object)(object)inflictor) && NetworkServer.active) { stopwatch = 0f; DamageInfo val = new DamageInfo { attacker = ((Component)inflictor).gameObject, inflictor = ((Component)inflictor).gameObject, damage = inflictor.damage * damageCoefficient * stacks, procCoefficient = 0f, crit = false, damageType = (DamageType)0, damageColorIndex = (DamageColorIndex)3, position = ((Component)victim.mainHurtBox).transform.position, rejected = false }; DamageAPI.AddModdedDamageType(val, Prefabs.blightDamage); healthComponent.TakeDamage(val); inflictor.healthComponent.Heal(val.damage, default(ProcChainMask), true); EffectManager.SimpleEffect(Prefabs.blightHitFX, ((Component)victim.mainHurtBox).transform.position, Quaternion.identity, true); } } else { if (NetworkServer.active) { victim.ClearTimedBuffs(Prefabs.blightDebuff); } Object.Destroy((Object)(object)this); } } if (dotStopwatch >= dotDuration) { Object.Destroy((Object)(object)this); } } private void OnDisable() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)victim) && NetworkServer.active) { victim.SetBuffCount(Prefabs.blightDebuff.buffIndex, 0); } } } internal class OryxSiphonController : MonoBehaviour { private SphereSearch sphereSearch = new SphereSearch(); private CharacterBody body; private float stopwatch; private float searchInterval = 0.5f; private float radius = 8f; private float damageCoefficient = 1.2f; private uint soundID; private void Start() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) soundID = AkSoundEngine.PostEvent(Sounds.Play_Oryx_Blight_Loop, ((Component)this).gameObject); ProjectileController component = ((Component)this).GetComponent<ProjectileController>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.owner)) { body = component.owner.GetComponent<CharacterBody>(); } sphereSearch.origin = ((Component)this).transform.position; sphereSearch.radius = radius; SphereSearch obj = sphereSearch; LayerIndex entityPrecise = LayerIndex.entityPrecise; obj.mask = ((LayerIndex)(ref entityPrecise)).mask; Dot(); } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (stopwatch >= searchInterval && Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.teamComponent) && Object.op_Implicit((Object)(object)body.healthComponent)) { stopwatch = 0f; Dot(); } } private void Dot() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) HurtBox[] hurtBoxes = sphereSearch.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(body.teamComponent.teamIndex)).OrderCandidatesByDistance() .FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); for (int i = 0; i < hurtBoxes.Length; i++) { if (Object.op_Implicit((Object)(object)hurtBoxes[i]) && Object.op_Implicit((Object)(object)hurtBoxes[i].healthComponent) && NetworkServer.active) { DamageInfo val = new DamageInfo { attacker = ((Component)body).gameObject, inflictor = ((Component)body).gameObject, damage = body.damage * damageCoefficient, procCoefficient = 0f, damageType = (DamageType)0, damageColorIndex = (DamageColorIndex)3, position = ((Component)hurtBoxes[i]).transform.position, rejected = false }; DamageAPI.AddModdedDamageType(val, Prefabs.blightDamage); hurtBoxes[i].healthComponent.TakeDamage(val); body.healthComponent.Heal(val.damage, default(ProcChainMask), true); EffectManager.SimpleEffect(Prefabs.blightHitFX, hurtBoxes[i].healthComponent.body.corePosition, Quaternion.identity, true); } } } private void OnDisable() { AkSoundEngine.StopPlayingID(soundID); AkSoundEngine.PostEvent(Sounds.Play_Oryx_Blight_End, ((Component)this).gameObject); } } 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_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 RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; CharacterMaster.OnBodyDeath += new hook_OnBodyDeath(CharacterMaster_OnBodyDeath); HealthComponent.Heal += new hook_Heal(HealthComponent_Heal); } private static float HealthComponent_Heal(orig_Heal orig, HealthComponent self, float amount, ProcChainMask procChainMask, bool nonRegen) { //IL_009e: Unknown result type (might be due to invalid IL or missing references) int buffCount = self.body.GetBuffCount(Prefabs.takenBuff); if (Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(Prefabs.minionBuff) && nonRegen && !((ProcChainMask)(ref procChainMask)).HasProc((ProcType)13)) { amount *= 3f; } if (Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(Prefabs.takenBuff) && nonRegen && !((ProcChainMask)(ref procChainMask)).HasProc((ProcType)13)) { amount *= 1.5f * (float)buffCount; } return orig.Invoke(self, amount, procChainMask, nonRegen); } private static void CharacterMaster_OnBodyDeath(orig_OnBodyDeath orig, CharacterMaster self, CharacterBody body) { //IL_006d: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, body); if (((Object)body).name.Contains("OryxBody") && NetworkServer.active && body.GetBuffCount(Prefabs.graspBuff) >= 50) { ((MonoBehaviour)self).Invoke("RespawnExtraLife", 2f); ((MonoBehaviour)self).Invoke("PlayExtraLifeSFX", 1f); body.SetBuffCount(Prefabs.graspBuff.buffIndex, 0); if (Object.op_Implicit((Object)(object)body.skillLocator) && Object.op_Implicit((Object)(object)body.skillLocator.utility)) { body.skillLocator.utility.Reset(); } } } private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Invalid comparison between Unknown and I4 //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)damageReport.attackerBody) && Object.op_Implicit((Object)(object)damageReport.victimBody)) { if (damageReport.victimBody.HasBuff(Prefabs.blightDebuff) && (int)damageReport.damageInfo.damageType != 64) { OryxConsumeOrb oryxConsumeOrb = new OryxConsumeOrb(); ((Orb)oryxConsumeOrb).origin = damageReport.victimBody.corePosition; ((Orb)oryxConsumeOrb).target = damageReport.attackerBody.mainHurtBox; oryxConsumeOrb.speed = 15f; oryxConsumeOrb.owner = ((Component)damageReport.attackerBody).gameObject; OrbManager.instance.AddOrb((Orb)(object)oryxConsumeOrb); } if (((Object)damageReport.attackerBody).name.Contains("OryxBody") && (int)damageReport.damageInfo.damageType == 64 && Object.op_Implicit((Object)(object)damageReport.attackerBody.inventory)) { damageReport.attackerBody.inventory.GiveItem(Prefabs.dmgBuff, 1); } } } internal static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { int buffCount = sender.GetBuffCount(Prefabs.takenBuff); if (Object.op_Implicit((Object)(object)sender.inventory)) { int itemCount = sender.inventory.GetItemCount(Prefabs.dmgBuff); int itemCount2 = sender.inventory.GetItemCount(Prefabs.hpBuff); args.baseDamageAdd += 0.5f * (float)itemCount; args.baseHealthAdd += (float)itemCount2; } if (sender.HasBuff(Prefabs.takenBuff)) { args.damageMultAdd += 0.05f * (float)buffCount; args.moveSpeedMultAdd += 0.2f * (float)buffCount; } if (sender.HasBuff(Prefabs.minionBuff)) { args.damageMultAdd += 3f; args.healthMultAdd += 3f; } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Dragonyck.Oryx", "Oryx", "1.1.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.Oryx"; public const string MODNAME = "Oryx"; public const string VERSION = "1.1.0"; public const string SURVIVORNAME = "Oryx"; public const string SURVIVORNAMEKEY = "ORYX"; public const string TAKEN = "<color=#0f0f0f>Taken</color> "; public static GameObject characterPrefab; private static readonly Color characterColor = new Color(0.37f, 0.37f, 0.37f); private void Awake() { new TexScroll(); Assets.PopulateAssets(); Prefabs.CreatePrefabs(); CreatePrefab(); RegisterStates(); RegisterCharacter(); Hook.Hooks(); } internal static void CreatePrefab() { //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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: 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_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_064a: Unknown result type (might be due to invalid IL or missing references) //IL_065e: Unknown result type (might be due to invalid IL or missing references) //IL_068a: Unknown result type (might be due to invalid IL or missing references) //IL_0697: Unknown result type (might be due to invalid IL or missing references) //IL_0699: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06de: Unknown result type (might be due to invalid IL or missing references) //IL_06e7: Unknown result type (might be due to invalid IL or missing references) //IL_0707: Unknown result type (might be due to invalid IL or missing references) //IL_0714: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_074c: Unknown result type (might be due to invalid IL or missing references) //IL_0759: Unknown result type (might be due to invalid IL or missing references) //IL_075b: Unknown result type (might be due to invalid IL or missing references) //IL_0764: Unknown result type (might be due to invalid IL or missing references) //IL_0775: Unknown result type (might be due to invalid IL or missing references) //IL_0789: Unknown result type (might be due to invalid IL or missing references) //IL_07b5: Unknown result type (might be due to invalid IL or missing references) //IL_07c2: Unknown result type (might be due to invalid IL or missing references) //IL_07c4: Unknown result type (might be due to invalid IL or missing references) //IL_07cd: Unknown result type (might be due to invalid IL or missing references) //IL_07de: Unknown result type (might be due to invalid IL or missing references) //IL_07f2: Unknown result type (might be due to invalid IL or missing references) //IL_082c: Unknown result type (might be due to invalid IL or missing references) //IL_0839: Unknown result type (might be due to invalid IL or missing references) //IL_083b: Unknown result type (might be due to invalid IL or missing references) //IL_0844: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0880: Unknown result type (might be due to invalid IL or missing references) //IL_0889: Unknown result type (might be due to invalid IL or missing references) //IL_08a9: Unknown result type (might be due to invalid IL or missing references) //IL_08b6: Unknown result type (might be due to invalid IL or missing references) //IL_08b8: Unknown result type (might be due to invalid IL or missing references) //IL_08c1: Unknown result type (might be due to invalid IL or missing references) //IL_08ee: Unknown result type (might be due to invalid IL or missing references) //IL_08fb: Unknown result type (might be due to invalid IL or missing references) //IL_08fd: Unknown result type (might be due to invalid IL or missing references) //IL_0907: Unknown result type (might be due to invalid IL or missing references) //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_092c: Unknown result type (might be due to invalid IL or missing references) //IL_0958: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0967: Unknown result type (might be due to invalid IL or missing references) //IL_0971: Unknown result type (might be due to invalid IL or missing references) //IL_099e: Unknown result type (might be due to invalid IL or missing references) //IL_09ab: Unknown result type (might be due to invalid IL or missing references) //IL_09ad: Unknown result type (might be due to invalid IL or missing references) //IL_09b7: Unknown result type (might be due to invalid IL or missing references) //IL_09d7: Unknown result type (might be due to invalid IL or missing references) //IL_09e4: Unknown result type (might be due to invalid IL or missing references) //IL_09e6: Unknown result type (might be due to invalid IL or missing references) //IL_09f0: 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_0a2a: Unknown result type (might be due to invalid IL or missing references) //IL_0a2c: Unknown result type (might be due to invalid IL or missing references) //IL_0ad5: Unknown result type (might be due to invalid IL or missing references) //IL_0b0e: Unknown result type (might be due to invalid IL or missing references) //IL_0b34: Unknown result type (might be due to invalid IL or missing references) //IL_0b36: Unknown result type (might be due to invalid IL or missing references) //IL_0b3f: Unknown result type (might be due to invalid IL or missing references) //IL_0b65: Unknown result type (might be due to invalid IL or missing references) //IL_0b67: Unknown result type (might be due to invalid IL or missing references) //IL_0b70: Unknown result type (might be due to invalid IL or missing references) //IL_0b96: 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_0ba1: Unknown result type (might be due to invalid IL or missing references) //IL_0bc7: Unknown result type (might be due to invalid IL or missing references) //IL_0bc9: Unknown result type (might be due to invalid IL or missing references) //IL_0bd2: Unknown result type (might be due to invalid IL or missing references) //IL_0bf8: Unknown result type (might be due to invalid IL or missing references) //IL_0bfa: Unknown result type (might be due to invalid IL or missing references) //IL_0c03: Unknown result type (might be due to invalid IL or missing references) //IL_0c29: Unknown result type (might be due to invalid IL or missing references) //IL_0c2b: Unknown result type (might be due to invalid IL or missing references) //IL_0c34: Unknown result type (might be due to invalid IL or missing references) //IL_0c5a: Unknown result type (might be due to invalid IL or missing references) //IL_0c5c: Unknown result type (might be due to invalid IL or missing references) //IL_0c65: Unknown result type (might be due to invalid IL or missing references) //IL_0c8b: Unknown result type (might be due to invalid IL or missing references) //IL_0c8d: Unknown result type (might be due to invalid IL or missing references) //IL_0c96: Unknown result type (might be due to invalid IL or missing references) //IL_0cbc: Unknown result type (might be due to invalid IL or missing references) //IL_0cbe: Unknown result type (might be due to invalid IL or missing references) //IL_0cc8: Unknown result type (might be due to invalid IL or missing references) //IL_0cee: Unknown result type (might be due to invalid IL or missing references) //IL_0cf0: Unknown result type (might be due to invalid IL or missing references) //IL_0cfa: Unknown result type (might be due to invalid IL or missing references) //IL_0d20: Unknown result type (might be due to invalid IL or missing references) //IL_0d22: Unknown result type (might be due to invalid IL or missing references) //IL_0d2c: Unknown result type (might be due to invalid IL or missing references) //IL_0d52: Unknown result type (might be due to invalid IL or missing references) //IL_0d54: Unknown result type (might be due to invalid IL or missing references) //IL_0d5e: Unknown result type (might be due to invalid IL or missing references) //IL_0d84: Unknown result type (might be due to invalid IL or missing references) //IL_0d86: Unknown result type (might be due to invalid IL or missing references) //IL_0dea: Unknown result type (might be due to invalid IL or missing references) //IL_0df5: Unknown result type (might be due to invalid IL or missing references) //IL_0e2e: Unknown result type (might be due to invalid IL or missing references) //IL_0e54: Unknown result type (might be due to invalid IL or missing references) //IL_0e56: Unknown result type (might be due to invalid IL or missing references) //IL_0e5f: Unknown result type (might be due to invalid IL or missing references) //IL_0e85: Unknown result type (might be due to invalid IL or missing references) //IL_0e87: Unknown result type (might be due to invalid IL or missing references) //IL_0e90: Unknown result type (might be due to invalid IL or missing references) //IL_0eb6: Unknown result type (might be due to invalid IL or missing references) //IL_0eb8: Unknown result type (might be due to invalid IL or missing references) //IL_0ec1: Unknown result type (might be due to invalid IL or missing references) //IL_0ee7: Unknown result type (might be due to invalid IL or missing references) //IL_0ee9: Unknown result type (might be due to invalid IL or missing references) //IL_0ef2: Unknown result type (might be due to invalid IL or missing references) //IL_0f18: Unknown result type (might be due to invalid IL or missing references) //IL_0f1a: Unknown result type (might be due to invalid IL or missing references) //IL_0f23: Unknown result type (might be due to invalid IL or missing references) //IL_0f49: Unknown result type (might be due to invalid IL or missing references) //IL_0f4b: Unknown result type (might be due to invalid IL or missing references) //IL_0f54: Unknown result type (might be due to invalid IL or missing references) //IL_0f7a: Unknown result type (might be due to invalid IL or missing references) //IL_0f7c: Unknown result type (might be due to invalid IL or missing references) //IL_0f85: Unknown result type (might be due to invalid IL or missing references) //IL_0fab: Unknown result type (might be due to invalid IL or missing references) //IL_0fad: Unknown result type (might be due to invalid IL or missing references) //IL_0fb6: Unknown result type (might be due to invalid IL or missing references) //IL_0fdc: Unknown result type (might be due to invalid IL or missing references) //IL_0fde: Unknown result type (might be due to invalid IL or missing references) //IL_0fe8: Unknown result type (might be due to invalid IL or missing references) //IL_100e: Unknown result type (might be due to invalid IL or missing references) //IL_1010: Unknown result type (might be due to invalid IL or missing references) //IL_101a: Unknown result type (might be due to invalid IL or missing references) //IL_1040: Unknown result type (might be due to invalid IL or missing references) //IL_1042: Unknown result type (might be due to invalid IL or missing references) //IL_104c: Unknown result type (might be due to invalid IL or missing references) //IL_1072: Unknown result type (might be due to invalid IL or missing references) //IL_1074: Unknown result type (might be due to invalid IL or missing references) //IL_107e: Unknown result type (might be due to invalid IL or missing references) //IL_10a4: Unknown result type (might be due to invalid IL or missing references) //IL_10a6: Unknown result type (might be due to invalid IL or missing references) //IL_110a: Unknown result type (might be due to invalid IL or missing references) //IL_1115: Unknown result type (might be due to invalid IL or missing references) //IL_114e: Unknown result type (might be due to invalid IL or missing references) //IL_1174: Unknown result type (might be due to invalid IL or missing references) //IL_1176: Unknown result type (might be due to invalid IL or missing references) //IL_117f: Unknown result type (might be due to invalid IL or missing references) //IL_11a5: Unknown result type (might be due to invalid IL or missing references) //IL_11a7: Unknown result type (might be due to invalid IL or missing references) //IL_11b0: Unknown result type (might be due to invalid IL or missing references) //IL_11d6: Unknown result type (might be due to invalid IL or missing references) //IL_11d8: Unknown result type (might be due to invalid IL or missing references) //IL_11e1: Unknown result type (might be due to invalid IL or missing references) //IL_1207: Unknown result type (might be due to invalid IL or missing references) //IL_1209: Unknown result type (might be due to invalid IL or missing references) //IL_1212: Unknown result type (might be due to invalid IL or missing references) //IL_1238: Unknown result type (might be due to invalid IL or missing references) //IL_123a: Unknown result type (might be due to invalid IL or missing references) //IL_1243: Unknown result type (might be due to invalid IL or missing references) //IL_1269: Unknown result type (might be due to invalid IL or missing references) //IL_126b: Unknown result type (might be due to invalid IL or missing references) //IL_1274: Unknown result type (might be due to invalid IL or missing references) //IL_129a: Unknown result type (might be due to invalid IL or missing references) //IL_129c: Unknown result type (might be due to invalid IL or missing references) //IL_12a5: Unknown result type (might be due to invalid IL or missing references) //IL_12cb: Unknown result type (might be due to invalid IL or missing references) //IL_12cd: Unknown result type (might be due to invalid IL or missing references) //IL_12d6: Unknown result type (might be due to invalid IL or missing references) //IL_12fc: Unknown result type (might be due to invalid IL or missing references) //IL_12fe: Unknown result type (might be due to invalid IL or missing references) //IL_1308: Unknown result type (might be due to invalid IL or missing references) //IL_132e: Unknown result type (might be due to invalid IL or missing references) //IL_1330: Unknown result type (might be due to invalid IL or missing references) //IL_133a: Unknown result type (might be due to invalid IL or missing references) //IL_1360: Unknown result type (might be due to invalid IL or missing references) //IL_1362: Unknown result type (might be due to invalid IL or missing references) //IL_136c: Unknown result type (might be due to invalid IL or missing references) //IL_1392: Unknown result type (might be due to invalid IL or missing references) //IL_1394: Unknown result type (might be due to invalid IL or missing references) //IL_139e: Unknown result type (might be due to invalid IL or missing references) //IL_13c4: Unknown result type (might be due to invalid IL or missing references) //IL_13c6: Unknown result type (might be due to invalid IL or missing references) //IL_142a: Unknown result type (might be due to invalid IL or missing references) //IL_165a: Unknown result type (might be due to invalid IL or missing references) //IL_1671: Unknown result type (might be due to invalid IL or missing references) //IL_1676: Unknown result type (might be due to invalid IL or missing references) //IL_167e: Unknown result type (might be due to invalid IL or missing references) //IL_16dc: Unknown result type (might be due to invalid IL or missing references) //IL_17b2: Unknown result type (might be due to invalid IL or missing references) //IL_17b7: Unknown result type (might be due to invalid IL or missing references) //IL_17da: Unknown result type (might be due to invalid IL or missing references) //IL_17df: Unknown result type (might be due to invalid IL or missing references) //IL_180d: Unknown result type (might be due to invalid IL or missing references) //IL_1812: Unknown result type (might be due to invalid IL or missing references) //IL_183b: Unknown result type (might be due to invalid IL or missing references) //IL_1840: Unknown result type (might be due to invalid IL or missing references) //IL_1851: Unknown result type (might be due to invalid IL or missing references) //IL_1856: Unknown result type (might be due to invalid IL or missing references) //IL_187f: Unknown result type (might be due to invalid IL or missing references) //IL_1884: Unknown result type (might be due to invalid IL or missing references) //IL_1895: Unknown result type (might be due to invalid IL or missing references) //IL_189a: Unknown result type (might be due to invalid IL or missing references) //IL_18f8: Unknown result type (might be due to invalid IL or missing references) characterPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion(), "OryxBody", true); characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true; characterPrefab.AddComponent<OryxBlightBehaviour>(); Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("ModelBase")).gameObject); Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("CameraPivot")).gameObject); Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("AimOrigin")).gameObject); GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>("oryx"); GameObject val2 = new GameObject("ModelBase"); val2.transform.parent = characterPrefab.transform; val2.transform.localPosition = new Vector3(0f, -0.94f, 0f); val2.transform.localRotation = Quaternion.identity; val2.transform.localScale = new Vector3(1f, 1f, 1f); GameObject val3 = new GameObject("AimOrigin"); val3.transform.parent = val2.transform; val3.transform.localPosition = new Vector3(0f, 3.4f, 0f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = Vector3.one; Transform transform = val.transform; transform.parent = val2.transform; transform.localPosition = Vector3.zero; transform.localScale = new Vector3(1f, 1f, 1f); transform.localRotation = Quaternion.identity; CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>(); component.moveVector = Vector3.zero; component.targetTransform = val2.transform; component.overrideAnimatorForwardTransform = null; component.rootMotionAccumulator = null; component.modelAnimator = val.GetComponentInChildren<Animator>(); component.driveFromRootRotation = false; component.turnSpeed = 720f; CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>(); ((Object)component2).name = "OryxBody"; component2.baseNameToken = "ORYX_NAME"; component2.subtitleNameToken = "ORYX_SUBTITLE"; component2.bodyFlags = (BodyFlags)16; component2.rootMotionInMainState = false; component2.mainRootSpeed = 0f; component2.baseMaxHealth = 210f; component2.levelMaxHealth = 35f; component2.baseRegen = 1f; component2.levelRegen = 0.33f; component2.baseMaxShield = 0f; component2.levelMaxShield = 0f; component2.baseMoveSpeed = 7f; component2.levelMoveSpeed = 0f; component2.baseAcceleration = 110f; component2.baseJumpPower = 15f; component2.levelJumpPower = 0f; component2.baseDamage = 8f; component2.levelDamage = 2.4f; component2.baseAttackSpeed = 1f; component2.levelAttackSpeed = 0f; component2.baseCrit = 1f; component2.levelCrit = 0f; component2.baseArmor = 0f; component2.levelArmor = 0f; component2.baseJumpCount = 1; component2.sprintingSpeedMultiplier = 1.45f; component2.wasLucky = false; component2.hideCrosshair = false; component2.aimOriginTransform = val3.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.preferredPodPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Toolbot/RoboCratePod.prefab").WaitForCompletion(); component2.bodyColor = characterColor; CharacterMotor component3 = characterPrefab.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 = characterPrefab.GetComponent<InputBankTest>(); component4.moveVector = Vector3.zero; CharacterCameraParams val4 = Object.Instantiate<CharacterCameraParams>(characterPrefab.GetComponent<CameraTargetParams>().cameraParams); val4.data.pivotVerticalOffset = BlendableFloat.op_Implicit(3.3f); val4.data.idealLocalCameraPos = BlendableVector3.op_Implicit(new Vector3(0f, 0f, -18f)); CameraTargetParams component5 = characterPrefab.GetComponent<CameraTargetParams>(); component5.cameraParams = val4; component5.cameraPivotTransform = null; component5.recoil = Vector2.zero; component5.dontRaycastToPivot = false; ModelLocator component6 = characterPrefab.GetComponent<ModelLocator>(); component6.modelTransform = transform; component6.modelBaseTransform = val2.transform; component6.dontReleaseModelOnDeath = false; component6.autoUpdateModelTransform = true; component6.dontDetatchFromParent = false; component6.noCorpse = false; component6.normalizeToFloor = false; component6.preserveModel = false; ChildLocator component7 = val.GetComponent<ChildLocator>(); SkinnedMeshRenderer componentInChildren = ((Component)component7.FindChild("defaultBody")).GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren2 = ((Component)component7.FindChild("defaultCloth")).GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren3 = ((Component)component7.FindChild("defaultEyes")).GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren4 = ((Component)component7.FindChild("defaultWings")).GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren5 = ((Component)component7.FindChild("sword")).GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren6 = ((Component)component7.FindChild("echoBody")).GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren7 = ((Component)component7.FindChild("echoCloth")).GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren8 = ((Component)component7.FindChild("echoEyes")).GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren9 = ((Component)component7.FindChild("echoWings")).GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren10 = ((Component)component7.FindChild("raidBody")).GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren11 = ((Component)component7.FindChild("raidCloth")).GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren12 = ((Component)component7.FindChild("raidEyes")).GetComponentInChildren<SkinnedMeshRenderer>(); SkinnedMeshRenderer componentInChildren13 = ((Component)component7.FindChild("raidWings")).GetComponentInChildren<SkinnedMeshRenderer>(); CharacterModel val5 = val.AddComponent<CharacterModel>(); val5.body = component2; val5.baseRendererInfos = (RendererInfo[])(object)new RendererInfo[13] { new RendererInfo { renderer = (Renderer)(object)componentInChildren, defaultMaterial = Utils.InstantiateMaterial(Color.white, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("default_body_d"), Color.black, 0f, null, 1f, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("default_body_n")), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)componentInChildren2, defaultMaterial = Utils.ShaderSwap(Assets.MainAssetBundle.LoadAsset<Material>("defaultCloth")), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)componentInChildren3, defaultMaterial = ((Renderer)componentInChildren3).material, defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)componentInChildren4, defaultMaterial = Utils.ShaderSwap(Assets.MainAssetBundle.LoadAsset<Material>("defaultWings")), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)componentInChildren5, defaultMaterial = Utils.InstantiateMaterial(Color.white, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("swordout"), Color.black, 0f, null, 1f, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("sword_nout")), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)componentInChildren6, defaultMaterial = Utils.InstantiateMaterial(Color.white, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("bodyout"), Color.white, 0.4f, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("glowout"), 1f, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("body_nout")), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)componentInChildren7, defaultMaterial = Utils.ShaderSwap(Assets.MainAssetBundle.LoadAsset<Material>("echoCloth")), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)componentInChildren8, defaultMaterial = ((Renderer)componentInChildren8).material, defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)componentInChildren9, defaultMaterial = Utils.ShaderSwap(Assets.MainAssetBundle.LoadAsset<Material>("echoWings")), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)componentInChildren10, defaultMaterial = Utils.InstantiateMaterial(Color.white, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("raid_body_d"), Color.black, 0f, null, 1f, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("raid_body_n")), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)componentInChildren11, defaultMaterial = Utils.ShaderSwap(Assets.MainAssetBundle.LoadAsset<Material>("raidCloth")), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)componentInChildren12, defaultMaterial = ((Renderer)componentInChildren12).material, defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)componentInChildren13, defaultMaterial = Utils.ShaderSwap(Assets.MainAssetBundle.LoadAsset<Material>("raidWings")), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false } }; val5.autoPopulateLightInfos = true; val5.invisibilityCount = 0; val5.temporaryOverlays = new List<TemporaryOverlay>(); Reflection.SetFieldValue<SkinnedMeshRenderer>((object)val5, "mainSkinnedMeshRenderer", ((Component)val5.baseRendererInfos[0].renderer).gameObject.GetComponent<SkinnedMeshRenderer>()); GameObject gameObject = ((Component)characterPrefab.GetComponentInChildren<ModelLocator>().modelTransform).gameObject; ModelSkinController val6 = gameObject.AddComponent<ModelSkinController>(); ChildLocator component8 = gameObject.GetComponent<ChildLocator>(); LanguageAPI.Add("ORYXBODY_DEFAULT_SKIN_NAME", "Default"); LanguageAPI.Add("ORYXBODY_ECHO_SKIN_NAME", "Echo"); LanguageAPI.Add("ORYXBODY_RAID_SKIN_NAME", "Raid"); SkinDefInfo val7 = default(SkinDefInfo); val7.BaseSkins = Array.Empty<SkinDef>(); val7.MinionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[0]; val7.ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[0]; val7.GameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[13] { new GameObjectActivation { gameObject = ((Component)component8.FindChild("defaultBody")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("defaultCloth")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("defaultEyes")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("defaultWings")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("sword")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("echoBody")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("echoCloth")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("echoEyes")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("echoWings")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("raidBody")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("raidCloth")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("raidEyes")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("raidWings")).gameObject, shouldActivate = false } }; val7.Icon = Assets.MainAssetBundle.LoadAsset<Sprite>("skin1"); val7.MeshReplacements = (MeshReplacement[])(object)new MeshReplacement[0]; val7.Name = "ORYXBODY_DEFAULT_SKIN_NAME"; val7.NameToken = "ORYXBODY_DEFAULT_SKIN_NAME"; val7.RendererInfos = val5.baseRendererInfos; val7.RootObject = gameObject; val7.UnlockableDef = null; SkinDef val8 = LoadoutAPI.CreateNewSkinDef(val7); SkinDefInfo val9 = default(SkinDefInfo); val9.BaseSkins = Array.Empty<SkinDef>(); val9.MinionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[0]; val9.ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[0]; val9.GameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[13] { new GameObjectActivation { gameObject = ((Component)component8.FindChild("defaultBody")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("defaultCloth")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("defaultEyes")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("defaultWings")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("sword")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("echoBody")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("echoCloth")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("echoEyes")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("echoWings")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("raidBody")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("raidCloth")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("raidEyes")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("raidWings")).gameObject, shouldActivate = false } }; val9.Icon = Assets.MainAssetBundle.LoadAsset<Sprite>("skin2"); val9.MeshReplacements = (MeshReplacement[])(object)new MeshReplacement[0]; val9.Name = "ORYXBODY_ECHO_SKIN_NAME"; val9.NameToken = "ORYXBODY_ECHO_SKIN_NAME"; val9.RendererInfos = val5.baseRendererInfos; val9.RootObject = gameObject; val9.UnlockableDef = null; SkinDef val10 = LoadoutAPI.CreateNewSkinDef(val9); SkinDefInfo val11 = default(SkinDefInfo); val11.BaseSkins = Array.Empty<SkinDef>(); val11.MinionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[0]; val11.ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[0]; val11.GameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[13] { new GameObjectActivation { gameObject = ((Component)component8.FindChild("defaultBody")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("defaultCloth")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("defaultEyes")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("defaultWings")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("sword")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("echoBody")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("echoCloth")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("echoEyes")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("echoWings")).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("raidBody")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("raidCloth")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("raidEyes")).gameObject, shouldActivate = true }, new GameObjectActivation { gameObject = ((Component)component8.FindChild("raidWings")).gameObject, shouldActivate = true } }; val11.Icon = Assets.MainAssetBundle.LoadAsset<Sprite>("skin3"); val11.MeshReplacements = (MeshReplacement[])(object)new MeshReplacement[0]; val11.Name = "ORYXBODY_RAID_SKIN_NAME"; val11.NameToken = "ORYXBODY_RAID_SKIN_NAME"; val11.RendererInfos = val5.baseRendererInfos; val11.RootObject = gameObject; val11.UnlockableDef = null; SkinDef val12 = LoadoutAPI.CreateNewSkinDef(val11); val6.skins = (SkinDef[])(object)new SkinDef[3] { val8, val10, val12 }; TeamComponent val13 = null; val13 = ((!((Object)(object)characterPrefab.GetComponent<TeamComponent>() != (Object)null)) ? characterPrefab.GetComponent<TeamComponent>() : characterPrefab.GetComponent<TeamComponent>()); val13.hideAllyCardDisplay = false; val13.teamIndex = (TeamIndex)(-1); HealthComponent component9 = characterPrefab.GetComponent<HealthComponent>(); component9.health = 110f; component9.shield = 0f; component9.barrier = 0f; component9.magnetiCharge = 0f; characterPrefab.GetComponent<Interactor>().maxInteractionDistance = 3f; characterPrefab.GetComponent<InteractionDriver>().highlightInteractor = true; SfxLocator component10 = characterPrefab.GetComponent<SfxLocator>(); component10.deathSound = "Play_ui_player_death"; component10.barkSound = ""; component10.openSound = ""; component10.landingSound = "Play_char_land"; component10.fallDamageSound = "Play_char_land_fall_damage"; component10.aliveLoopStart = ""; component10.aliveLoopStop = ""; Rigidbody component11 = characterPrefab.GetComponent<Rigidbody>(); component11.mass = 100f; component11.drag = 0f; component11.angularDrag = 0f; component11.useGravity = false; component11.isKinematic = true; component11.interpolation = (RigidbodyInterpolation)0; component11.collisionDetectionMode = (CollisionDetectionMode)0; component11.constraints = (RigidbodyConstraints)0; CapsuleCollider component12 = ((Component)component7.FindChild("collider")).GetComponent<CapsuleCollider>(); ((Collider)component12).isTrigger = false; ((Collider)component12).material = null; KinematicCharacterMotor component13 = characterPrefab.GetComponent<KinematicCharacterMotor>(); component13.CharacterController = (BaseCharacterController)(object)component3; component13.Capsule = component12; component13.Rigidbody = component11; component13.DetectDiscreteCollisions = false; component13.GroundDetectionExtraDistance = 0f; component13.MaxStepHeight = 0.2f; component13.MinRequiredStepDepth = 0.1f; component13.MaxStableSlopeAngle = 55f; component13.MaxStableDistanceFromLedge = 0.5f; component13.PreventSnappingOnLedges = false; component13.MaxStableDenivelationAngle = 55f; component13.RigidbodyInteractionType = (RigidbodyInteractionType)0; component13.PreserveAttachedRigidbodyMomentum = true; component13.HasPlanarConstraint = false; component13.PlanarConstraintAxis = Vector3.up; component13.StepHandling = (StepHandlingMethod)0; component13.LedgeHandling = true; component13.InteractiveRigidbodyHandling = true; component13.SafeMovement = false; HurtBoxGroup val14 = val.AddComponent<HurtBoxGroup>(); HurtBox val15 = ((Component)component12).gameObject.AddComponent<HurtBox>(); ((Component)val15).gameObject.layer = LayerIndex.entityPrecise.intVal; val15.healthComponent = component9; val15.isBullseye = true; val15.damageModifier = (DamageModifier)0; val15.hurtBoxGroup = val14; val15.indexInGroup = 0; val14.hurtBoxes = (HurtBox[])(object)new HurtBox[1] { val15 }; val14.mainHurtBox = val15; val14.bullseyeCount = 1; AimAnimator val16 = val.AddComponent<AimAnimator>(); val16.inputBank = component4; val16.directionComponent = component; val16.pitchRangeMax = 55f; val16.pitchRangeMin = -50f; val16.yawRangeMin = -44f; val16.yawRangeMax = 44f; val16.pitchGiveupRange = 30f; val16.yawGiveupRange = 10f; val16.giveupDuration = 8f; FootstepHandler val17 = val.AddComponent<FootstepHandler>(); val17.baseFootstepString = "Play_player_footstep"; val17.sprintFootstepOverrideString = ""; val17.enableFootstepDust = true; val17.footstepDustPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion(); EntityStateMachine component14 = ((Component)component2).GetComponent<EntityStateMachine>(); component14.mainStateType = new SerializableEntityStateType(typeof(CharacterMain)); CharacterDeathBehavior component15 = characterPrefab.GetComponent<CharacterDeathBehavior>(); component15.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>(); component15.deathState = new SerializableEntityStateType(typeof(DeathState)); EntityStateMachine val18 = characterPrefab.AddComponent<EntityStateMachine>(); val18.customName = "Dox"; val18.initialStateType = new SerializableEntityStateType(typeof(Idle)); val18.mainStateType = new SerializableEntityStateType(typeof(Idle)); EntityStateMachine val19 = characterPrefab.AddComponent<EntityStateMachine>(); val19.customName = "Take"; val19.initialStateType = new SerializableEntityStateType(typeof(Idle)); val19.mainStateType = new SerializableEntityStateType(typeof(Idle)); NetworkStateMachine component16 = ((Component)component2).GetComponent<NetworkStateMachine>(); List<EntityStateMachine> list = component16.stateMachines.ToList(); list.Add(val18); list.Add(val19); component16.stateMachines = list.ToArray(); Utils.CreateHitbox("Slash", component7.FindChild("swordMuzzle"), new Vector3(8.5f, 8.5f, 9f)); ContentAddition.AddBody(characterPrefab); } private void RegisterCharacter() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "OryxDisplay", true); val.transform.localScale = Vector3.one * 0.45f; val.AddComponent<NetworkIdentity>(); val.AddComponent<IntroParticle>(); string text = "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > "; string text2 = "..and so he left."; string text3 = "..and so he vanished."; LanguageAPI.Add("ORYX_NAME", "Oryx"); LanguageAPI.Add("ORYX_DESCRIPTION", text); LanguageAPI.Add("ORYX_SUBTITLE", "The Taken King"); LanguageAPI.Add("ORYX_OUTRO", text2); LanguageAPI.Add("ORYX_FAIL", text3); SurvivorDef val2 = ScriptableObject.CreateInstance<SurvivorDef>(); val2.cachedName = "ORYX_NAME"; val2.unlockableDef = null; val2.descriptionToken = "ORYX_DESCRIPTION"; val2.primaryColor = characterColor; val2.bodyPrefab = characterPrefab; val2.displayPrefab = val; val2.outroFlavorToken = "ORYX_OUTRO"; val2.desiredSortPosition = 9f; val2.mainEndingEscapeFailureFlavorToken = "ORYX_FAIL"; ContentAddition.AddSurvivorDef(val2); SkillSetup(); GameObject val3 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoMonsterMaster.prefab").WaitForCompletion(), "OryxMaster", true); ContentAddition.AddMaster(val3); CharacterMaster component = val3.GetComponent<CharacterMaster>(); component.bodyPrefab = characterPrefab; } 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) bool flag = default(bool); ContentAddition.AddEntityState<Primary>(ref flag); ContentAddition.AddEntityState<PrimaryEnd>(ref flag); ContentAddition.AddEntityState<SecondaryStart>(ref flag); ContentAddition.AddEntityState<Secondary>(ref flag); ContentAddition.AddEntityState<SecondaryEnd>(ref flag); ContentAddition.AddEntityState<Utility>(ref flag); ContentAddition.AddEntityState<UtilityFire>(ref flag); ContentAddition.AddEntityState<Special>(ref flag); ContentAddition.AddEntityState<CharacterMain>(ref flag); OrbAPI.AddOrb(typeof(OryxConsumeOrb)); } private void SkillSetup() { GenericSkill[] componentsInChildren = characterPrefab.GetComponentsInChildren<GenericSkill>(); foreach (GenericSkill val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } PassiveSetup(); PrimarySetup(); SecondarySetup(); UtilitySetup(); SpecialSetup(); } private void PassiveSetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("ORYX_PASSIVE_NAME", "King's Decree"); LanguageAPI.Add("ORYX_PASSIVE_DESCRIPTION", "All Enemies within a <style=cIsDamage>10m</style> radius are <style=cIsDamage>suppressed</style>, being <style=cIsDamage>stunned</style> every <style=cIsUtility>5s</style>, affected by <style=cKeywordName><style=cIsDamage>Blight</style></style><style=cSub>"); LanguageAPI.Add("ORYX_PASSIVE_KEYWORD", "<style=cKeywordName><style=cIsDamage>Blight</style></style><style=cSub>Deals <style=cIsDamage>100%</style> damage every second and heals Oryx for the same amount."); component.passiveSkill.enabled = true; component.passiveSkill.skillNameToken = "ORYX_PASSIVE_NAME"; component.passiveSkill.skillDescriptionToken = "ORYX_PASSIVE_DESCRIPTION"; component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("passive"); component.passiveSkill.keywordToken = "ORYX_PASSIVE_KEYWORD"; } private void PrimarySetup() { //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("ORYX_M1", "Willbreaker"); LanguageAPI.Add("ORYX_M1_DESCRIPTION", "Oryx slashes his sword dealing <style=cIsDamage>180%</style> damage to all enemies in a 45 degree range. Kills with his sword add a permanent buff increasing damage by .5 per kill. "); SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(Primary)); 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>("m1"); val.skillDescriptionToken = "ORYX_M1_DESCRIPTION"; val.skillName = "ORYX_M1"; val.skillNameToken = "ORYX_M1"; ContentAddition.AddSkillDef(val); component.primary = characterPrefab.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_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("ORYX_M2", "Taken Blight"); LanguageAPI.Add("ORYX_M2_DESCRIPTION", "Oryx spawns a taken blight, Debuffs all enemies with Blight, siphons HP from enemies within the AOE of the blight and convert it to <style=cIsHealing>heals</style> for oryx. Enemies are sucked into the blight when in close proximity. All Enemies Killed in the blight adds a permanent buff increasing Max <style=cIsHealth>health</style> by 1 per kill."); SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(SecondaryStart)); val.activationStateMachineName = "Weapon"; val.baseMaxStock = 1; val.baseRechargeInterval = 12f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.fullRestockOnAssign = false; val.interruptPriority = (InterruptPriority)0; val.isCombatSkill = true; val.mustKeyPress = true; val.cancelSprintingOnActivation = false; val.rechargeStock = 1; val.requiredStock = 1; val.stockToConsume = 1; val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("m2"); val.skillDescriptionToken = "ORYX_M2_DESCRIPTION"; val.skillName = "ORYX_M2"; val.skillNameToken = "ORYX_M2"; ContentAddition.AddSkillDef(val); component.secondary = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.secondary, "_skillFamily", val2); SkillFamily skillFamily = component.secondary.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 UtilitySetup() { //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("ORYX_UTIL", "Doxology"); LanguageAPI.Add("ORYX_UTIL_DESCRIPTION", "Oryx drains the life of all enemies in the phase and inflicts an irrevocable <style=cDeath>death</style> upon them all. All enemies killed by this ability adds a Unique buff called Grasp of the King. If oryx has 50 Stacks of Grasp Of the King deny death, <style=cIsHealing>reviving</style> himself at full <style=cIsHealth>health</style>, grants immortality for 10 seconds and removes the cooldown of Doxology."); SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(Utility)); val.activationStateMachineName = "Weapon"; val.baseMaxStock = 1; val.baseRechargeInterval = 80f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.fullRestockOnAssign = false; val.interruptPriority = (InterruptPriority)0; val.isCombatSkill = false; val.mustKeyPress = true; val.cancelSprintingOnActivation = false; val.rechargeStock = 1; val.requiredStock = 1; val.stockToConsume = 1; val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("utility"); val.skillDescriptionToken = "ORYX_UTIL_DESCRIPTION"; val.skillName = "ORYX_UTIL"; val.skillNameToken = "ORYX_UTIL"; ContentAddition.AddSkillDef(val); component.utility = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.utility, "_skillFamily", val2); SkillFamily skillFamily = component.utility.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 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("ORYX_SPEC", "Take"); LanguageAPI.Add("ORYX_SPEC_DESCRIPTION", "Erases other beings from existence and brings them back empowered and possessed by the darkness, totally subservient to the will of Oryx. The number of taken allies is capped at 30. If oryx already has 30 allies, he consumes the enemy being taken and adds it to his max <style=cIsHealth>health</style> (3 per enemy taken). Every 5 allies oryx has he gains the Unique buff The Taken King that adds <style=cIsDamage>+5%</style> damage and <style=cIsDamage>+20%</style> movement speed."); SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(Special)); val.activationStateMachineName = "Weapon"; val.baseMaxStock = 1; val.baseRechargeInterval = 7f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.fullRestockOnAssign = false; val.interruptPriority = (InterruptPriority)0; val.isCombatSkill = true; val.mustKeyPress = true; val.cancelSprintingOnActivation = false; val.rechargeStock = 1; val.requiredStock = 1; val.stockToConsume = 1; val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("special"); val.skillDescriptionToken = "ORYX_SPEC_DESCRIPTION"; val.skillName = "ORYX_SPEC"; val.skillNameToken = "ORYX_SPEC"; ContentAddition.AddSkillDef(val); component.special = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.special, "_skillFamily", val2); SkillFamily skillFamily = component.special.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); } } internal class Prefabs { internal static BuffDef takenBuff; internal static BuffDef allyBuff; internal static BuffDef reviveBuff; internal static BuffDef blightDebuff; internal static BuffDef graspBuff; internal static BuffDef minionBuff; internal static GameObject slashRFX; internal static GameObject slashLFX; internal static GameObject orbConsumeVFX; internal static GameObject echoVFX; internal static GameObject graspKillVFX; internal static GameObject explosionFX; internal static GameObject chargeFX; internal static GameObject takeFX; internal static GameObject doxologyExplosionFX; internal static GameObject swingHitFX; internal static GameObject blightOrb; internal static GameObject blightHitFX; internal static GameObject blightAreaIndicator; internal static ModdedDamageType meleeStrike; internal static ModdedDamageType blightDamage; internal static ItemDef dmgBuff { get; set; } internal static ItemDef hpBuff { get; set; } 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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Expected O, but got Unknown //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Expected O, but got Unknown //IL_02b5: 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_02e4: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Expected O, but got Unknown //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: 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_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_062a: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Unknown result type (might be due to invalid IL or missing references) //IL_067f: 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_06e8: Unknown result type (might be due to invalid IL or missing references) //IL_06ed: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Unknown result type (might be due to invalid IL or missing references) //IL_0727: Unknown result type (might be due to invalid IL or missing references) meleeStrike = DamageAPI.ReserveDamageType(); blightDamage = DamageAPI.ReserveDamageType(); blightDebuff = ScriptableObject.CreateInstance<BuffDef>(); ((Object)blightDebuff).name = "Blight"; blightDebuff.buffColor = Color.white; blightDebuff.canStack = true; blightDebuff.iconSprite = Assets.MainAssetBundle.LoadAsset<Sprite>("blightDebuff"); blightDebuff.isCooldown = false; blightDebuff.isDebuff = true; blightDebuff.isHidden = false; blightDebuff.startSfx = null; ContentAddition.AddBuffDef(blightDebuff); graspBuff = ScriptableObject.CreateInstance<BuffDef>(); ((Object)graspBuff).name = "Grasp of the King"; graspBuff.buffColor = new Color(0.25f, 0.25f, 0.25f); graspBuff.canStack = true; graspBuff.iconSprite = null; graspBuff.isCooldown = false; graspBuff.isDebuff = false; graspBuff.isHidden = false; graspBuff.startSfx = null; ContentAddition.AddBuffDef(graspBuff); minionBuff = ScriptableObject.CreateInstance<BuffDef>(); ((Object)minionBuff).name = "Echo"; minionBuff.buffColor = Color.black; minionBuff.canStack = false; minionBuff.iconSprite = null; minionBuff.isCooldown = false; minionBuff.isDebuff = false; minionBuff.isHidden = false; minionBuff.startSfx = null; ContentAddition.AddBuffDef(minionBuff); takenBuff = ScriptableObject.CreateInstance<BuffDef>(); ((Object)takenBuff).name = "The Taken King"; takenBuff.buffColor = Color.black; takenBuff.canStack = true; takenBuff.iconSprite = null; takenBuff.isCooldown = false; takenBuff.isDebuff = false; takenBuff.isHidden = false; takenBuff.startSfx = null; ContentAddition.AddBuffDef(takenBuff); dmgBuff = ScriptableObject.CreateInstance<ItemDef>(); dmgBuff.canRemove = false; dmgBuff.deprecatedTier = (ItemTier)5; dmgBuff.hidden = true; ((Object)dmgBuff).name = "ORYX_DMGBUFFITEM"; dmgBuff.pickupModelPrefab = new GameObject(); ItemDef obj = dmgBuff; ItemTag[] array = new ItemTag[5]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj.tags = (ItemTag[])(object)array; ItemAPI.Add(new CustomItem(dmgBuff, new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()))); hpBuff = ScriptableObject.CreateInstance<ItemDef>(); hpBuff.canRemove = false; hpBuff.deprecatedTier = (ItemTier)5; hpBuff.hidden = true; ((Object)hpBuff).name = "ORYX_HPBUFFITEM"; hpBuff.pickupModelPrefab = new GameObject(); ItemDef obj2 = hpBuff; ItemTag[] array2 = new ItemTag[5]; RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj2.tags = (ItemTag[])(object)array2; ItemAPI.Add(new CustomItem(hpBuff, new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()))); slashRFX = Assets.MainAssetBundle.LoadAsset<GameObject>("SlashFXR"); Utils.RegisterEffect(slashRFX, 1f); slashLFX = Assets.MainAssetBundle.LoadAsset<GameObject>("SlashFXL"); Utils.RegisterEffect(slashLFX, 1f); blightHitFX = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidBarnacle/VoidBarnacleImpactExplosion.prefab").WaitForCompletion(), "OryxBlightHitFX", false); Utils.RegisterEffect(blightHitFX, 1f, "Play_Oryx_Dot"); swingHitFX = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/OmniImpactVFXHuntress.prefab").WaitForCompletion(), "OryxHitFX", false); Utils.RegisterEffect(swingHitFX, 1f, "Play_Oryx_SwingHit"); GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/moon2/BloodSiphonNearbyAttachment.prefab").WaitForCompletion(); blightOrb = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(), "OryxBlightOrb", true); Utils.CopyComponent<SphereCollider>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Blackhole/GravSphere.prefab").WaitForCompletion().GetComponent<SphereCollider>(), blightOrb); TetherVfxOrigin val2 = Utils.CopyComponent<TetherVfxOrigin>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Blackhole/GravSphere.prefab").WaitForCompletion().GetComponent<TetherVfxOrigin>(), blightOrb); val2.tetherPrefab = null; Utils.CopyComponent<RadialForce>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Blackhole/GravSphere.prefab").WaitForCompletion().GetComponent<RadialForce>(), blightOrb).tetherVfxOrigin = val2; GameObject val3 = Object.Instantiate<GameObject>(Assets.MainAssetBundle.LoadAsset<GameObject>("orbVFX"), blightOrb.transform); val3.transform.localPosition = Vector3.zero; val3.transform.localScale = Vector3.one * 2f; Transform[] componentsInChildren = val3.GetComponentsInChildren<Transform>(); for (int i = 0; i < componentsInChildren.Length; i++) { ((Component)componentsInChildren[i]).gameObject.AddComponent<TexScroll>(); } Object.Destroy((Object)(object)blightOrb.GetComponentInChildren<MeshRenderer>()); blightOrb.AddComponent<NetworkIdentity>(); blightOrb.AddComponent<ProjectileController>(); blightOrb.AddComponent<ProjectileSimple>().lifetime = 8f; blightOrb.transform.localScale = Vector3.one * 8f; OryxSiphonController oryxSiphonController = blightOrb.AddComponent<OryxSiphonController>(); ContentAddition.AddProjectile(blightOrb); orbConsumeVFX = Assets.MainAssetBundle.LoadAsset<GameObject>("takeConsumeVFX"); Utils.CopyComponent<OrbEffect>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/NovaOnHeal/DevilOrbEffect.prefab").WaitForCompletion().GetComponent<OrbEffect>(), orbConsumeVFX); Utils.RegisterEffect(orbConsumeVFX, 99f); echoVFX = Assets.MainAssetBundle.LoadAsset<GameObject>("echoVFX"); Utils.RegisterEffect(echoVFX, 2.2f); graspKillVFX = Assets.MainAssetBundle.LoadAsset<GameObject>("graspKillVFX"); Utils.RegisterEffect(graspKillVFX, 2f); doxologyExplosionFX = Assets.MainAssetBundle.LoadAsset<GameObject>("doxologyExplosion"); Utils.CopyComponent<ShakeEmitter>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Brother/BrotherDashEffect.prefab").WaitForCompletion().GetComponent<ShakeEmitter>(), doxologyExplosionFX).duration = 99f; Utils.RegisterEffect(doxologyExplosionFX, 1.25f); explosionFX = Assets.MainAssetBundle.LoadAsset<GameObject>("OrbExplosionFX"); Utils.CopyComponent<ShakeEmitter>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Brother/BrotherDashEffect.prefab").WaitForCompletion().GetComponent<ShakeEmitter>(), explosionFX).duration = 99f; Utils.RegisterEffect(explosionFX, 0.75f); chargeFX = Assets.MainAssetBundle.LoadAsset<GameObject>("ChargeOrbFX"); takeFX = Assets.MainAssetBundle.LoadAsset<GameObject>("TakeFX"); blightAreaIndicator = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(), "OryxBlightAreaIndicator", false); MeshRenderer[] componentsInChildren2 = blightAreaIndicator.GetComponentsInChildren<MeshRenderer>(); for (int j = 0; j < componentsInChildren2.Length; j++) { ((Renderer)componentsInChildren2[j]).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidMegaCrab/matVoidCrabAntiMatterAreaIndicator.mat").WaitForCompletion(); } } } internal class DeathState : GenericCharacterDeath { public override void OnEnter() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).OnEnter(); ((EntityState)this).PlayAnimation("Gesture, Override", "Take", "Special", 2.5f); EffectManager.SimpleEffect(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidBarnacle/VoidBarnacleImpactExplosion.prefab").WaitForCompletion(), ((EntityState)this).characterBody.corePosition, Quaternion.identity, false); CharacterModel component = ((Component)((EntityState)this).GetModelTransform()).GetComponent<CharacterModel>(); TemporaryOverlay val = ((Component)component).gameObject.AddComponent<TemporaryOverlay>(); val.duration = 2f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f,