Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Mordekaiser v1.0.3
Mordekaiser.dll
Decompiled 9 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.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using EntityStates; using EntityStates.Merc; using JetBrains.Annotations; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Utils; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.Skills; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.UI; [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyProduct("Mordekaiser")] [assembly: AssemblyTitle("Mordekaiser")] [assembly: AssemblyConfiguration("Debug")] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyCompany("Mordekaiser")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Mordekaiser; internal class Assets { public static AssetBundle MainAssetBundle; public static T Load<T>(string name) where T : Object { return MainAssetBundle.LoadAsset<T>(name); } public static void PopulateAssets() { Assembly executingAssembly = Assembly.GetExecutingAssembly(); if ((Object)(object)MainAssetBundle == (Object)null) { using Stream stream = executingAssembly.GetManifestResourceStream("Mordekaiser.AssetBundle." + "Mordekaiser".ToLower() + "assets"); MainAssetBundle = AssetBundle.LoadFromStream(stream); } using Stream stream2 = executingAssembly.GetManifestResourceStream("Mordekaiser.Mordekaiser.bnk"); byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } } internal class AimIndicator : HuntressTracker { private void OnEnable() { base.maxTrackingDistance = 30f; ((HuntressTracker)this).OnEnable(); } private void Update() { base.indicator.active = base.characterBody.skillLocator.special.stock >= 1; } } internal class DelayedCurse : MonoBehaviour { public CharacterMaster master; public CharacterBody body; private void Start() { master = ((Component)this).GetComponent<CharacterMaster>(); } private void FixedUpdate() { //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: 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_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Expected O, but got Unknown //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)master)) { return; } if (!Object.op_Implicit((Object)(object)body)) { body = master.GetBody(); return; } body.baseNameToken = Language.GetString(body.baseNameToken) + " (Dominated)"; if (Object.op_Implicit((Object)(object)body.modelLocator) && Object.op_Implicit((Object)(object)body.modelLocator.modelTransform)) { float num = 0f; SkinnedMeshRenderer[] componentsInChildren = ((Component)body.modelLocator.modelTransform).GetComponentsInChildren<SkinnedMeshRenderer>(); foreach (SkinnedMeshRenderer val in componentsInChildren) { float num2 = num; Bounds bounds = ((Renderer)val).bounds; Vector3 size = ((Bounds)(ref bounds)).size; num = num2 + ((Vector3)(ref size)).magnitude; } GameObject val2 = Object.Instantiate<GameObject>(Prefabs.crownMark, body.modelLocator.modelTransform.position + Vector3.up * num / 2f, Quaternion.Euler(-90f, 0f, 0f), body.modelLocator.modelTransform); Vector3 localScale = body.modelLocator.modelTransform.localScale; Transform transform = val2.transform; transform.localScale /= (localScale.x + localScale.y + localScale.z) / 3f; bool flag = ((Object)body).name.Contains("Wisp"); CharacterModel component = ((Component)body.modelLocator.modelTransform).GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)component)) { for (int j = 0; j < component.baseRendererInfos.Length; j++) { component.baseRendererInfos[j].defaultMaterial = Prefabs.ghostEffectMat; } for (int k = 0; k < component.baseRendererInfos.Length; k++) { RendererInfo val3 = component.baseRendererInfos[k]; if (((object)val3.renderer).GetType() != typeof(ParticleSystemRenderer)) { val3.defaultMaterial = Prefabs.ghostEffectMat; } else if (flag) { val3.defaultMaterial = new Material(component.baseRendererInfos[k].defaultMaterial); val3.defaultMaterial.DisableKeyword("VERTEXCOLOR"); val3.defaultMaterial.SetTexture("_RemapTex", (Texture)(object)Prefabs.ghostRamp); } } } } Object.Destroy((Object)(object)this); } } internal class HUDTracker : MonoBehaviour { public GameObject barRoot; public Image bar; public TextMeshProUGUI currentText; public TextMeshProUGUI fullText; public HUD hud; private MordBehaviour behaviour; private void Awake() { hud = ((Component)this).GetComponent<HUD>(); } private void FixedUpdate() { if (!Object.op_Implicit((Object)(object)behaviour)) { if (Object.op_Implicit((Object)(object)hud) && Object.op_Implicit((Object)(object)hud.targetBodyObject) && Util.HasEffectiveAuthority(hud.targetBodyObject)) { behaviour = hud.targetBodyObject.GetComponent<MordBehaviour>(); if (Object.op_Implicit((Object)(object)behaviour)) { barRoot.gameObject.SetActive(true); behaviour.shieldBar = barRoot; behaviour.currentShield = currentText; behaviour.fullShield = fullText; behaviour.barImage = bar; } } if (barRoot.activeInHierarchy) { barRoot.gameObject.SetActive(false); } } else if (!barRoot.activeInHierarchy) { barRoot.gameObject.SetActive(true); } } } internal class MordBehaviour : NetworkBehaviour { public bool canExecute = true; public float pushForce = 25f; public float airbornePushMult = 0.85f; public float bonkDownwardForceMult = 15f; public Animator animator; public CharacterBody body; public SkillLocator skillLocator; public GameObject shieldBar; public TextMeshProUGUI currentShield; public TextMeshProUGUI fullShield; public Image barImage; public float stepMult = 6f; [SyncVar] public float shieldValue = 0f; public int maxShieldValue; public float shieldHealthMult = MainPlugin.passiveHPCap.Value; public bool barSetupDone; public bool canShield = true; public float passiveShieldTime = 12f; public float shieldAdded; public CharacterMaster minion; private NetworkedBodyAttachment darknessAttachment; public Renderer[] helmets = (Renderer[])(object)new Renderer[13]; public Renderer[] crowns = (Renderer[])(object)new Renderer[13]; public float barrierDecayStopwatch = 3f; public TemporaryOverlayInstance shieldOverlay = null; private static int kRpcRpcCurseTarget; private static int kCmdCmdAddDarkness; private static int kCmdCmdDamageTarget; internal bool maxShield => shieldValue >= (float)maxShieldValue; public float NetworkshieldValue { get { return shieldValue; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar<float>(value, ref shieldValue, 1u); } } [ClientRpc] public void RpcCurseTarget(GameObject masterObject) { if (Object.op_Implicit((Object)(object)masterObject)) { minion = masterObject.GetComponent<CharacterMaster>(); ((Component)minion).gameObject.AddComponent<DelayedCurse>(); } } [Server] public void RemoveUltBuff() { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Mordekaiser.MordBehaviour::RemoveUltBuff()' called on client"); } else if (Object.op_Implicit((Object)(object)body)) { body.RemoveBuff(Prefabs.ultBuff); } } [Server] public void AddShield(float value) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Mordekaiser.MordBehaviour::AddShield(System.Single)' called on client"); } else if (!(shieldValue >= (float)maxShieldValue)) { NetworkshieldValue = shieldValue + value; } } [Server] public void Heal() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Mordekaiser.MordBehaviour::Heal()' called on client"); return; } float barrier = shieldAdded; if (body.healthComponent.barrier < shieldAdded) { barrier = body.healthComponent.barrier; } HealthComponent healthComponent = body.healthComponent; healthComponent.Networkbarrier -= barrier; body.healthComponent.Heal(barrier, default(ProcChainMask), true); } [Server] public void ConsumeShieldBar() { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Mordekaiser.MordBehaviour::ConsumeShieldBar()' called on client"); return; } barrierDecayStopwatch = 0f; body.healthComponent.AddBarrier(shieldValue); shieldAdded = shieldValue; NetworkshieldValue = 0f; } [Command] public void CmdAddDarkness() { AddDarknessServer(); } [Server] public void AddDarknessServer() { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Mordekaiser.MordBehaviour::AddDarknessServer()' called on client"); } else if (Object.op_Implicit((Object)(object)body)) { body.AddTimedBuff(Prefabs.darkness, 6f); if (body.GetBuffCount(Prefabs.darkness) >= 4 && !Object.op_Implicit((Object)(object)darknessAttachment)) { darknessAttachment = Object.Instantiate<GameObject>(Prefabs.darknessAttachment).GetComponent<NetworkedBodyAttachment>(); darknessAttachment.AttachToGameObjectAndSpawn(((Component)this).gameObject, (string)null); } } } [Command] public void CmdDamageTarget(GameObject target, float damage, bool isCrit) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = target.GetComponent<CharacterBody>(); HealthComponent healthComponent = component.healthComponent; DamageInfo val = new DamageInfo(); val.attacker = ((Component)this).gameObject; val.inflictor = ((Component)this).gameObject; val.force = Vector3.zero; val.damage = damage; val.crit = isCrit; val.position = component.corePosition; val.procChainMask = default(ProcChainMask); val.procCoefficient = 0f; val.damageColorIndex = (DamageColorIndex)5; val.damageType = DamageTypeCombo.op_Implicit((DamageType)0); healthComponent.TakeDamage(val); } private void OnEnable() { body = ((Component)this).GetComponent<CharacterBody>(); skillLocator = body.skillLocator; if (Object.op_Implicit((Object)(object)body.modelLocator.modelTransform)) { animator = ((Component)body.modelLocator.modelTransform).GetComponent<Animator>(); } } private void FixedUpdate() { //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: 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_014e: 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) if (!Object.op_Implicit((Object)(object)body)) { return; } if (shieldOverlay != null && body.healthComponent.barrier <= 0f) { shieldOverlay.Destroy(); } if (Object.op_Implicit((Object)(object)crowns[body.skinIndex])) { ((Component)crowns[body.skinIndex]).gameObject.SetActive(Object.op_Implicit((Object)(object)minion)); } if (Object.op_Implicit((Object)(object)helmets[body.skinIndex])) { ((Component)helmets[body.skinIndex]).gameObject.SetActive(!Object.op_Implicit((Object)(object)minion)); } body.modelLocator.modelTransform.localScale = (body.HasBuff(Prefabs.ultBuff) ? (Vector3.one * 1.25f) : Vector3.one); body.modelLocator.modelBaseTransform.localScale = (body.HasBuff(Prefabs.ultBuff) ? (Vector3.one * 1.25f) : Vector3.one); if (Util.HasEffectiveAuthority(((Component)this).gameObject)) { skillLocator.secondary.skillDef.icon = (body.characterMotor.isGrounded ? Prefabs.slam : Prefabs.pull); } if (NetworkServer.active) { barrierDecayStopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)body) && barrierDecayStopwatch < 3f) { body.barrierDecayRate = 0f; } } maxShieldValue = Mathf.CeilToInt(body.healthComponent.fullCombinedHealth * shieldHealthMult); NetworkshieldValue = Mathf.FloorToInt(Mathf.Clamp(shieldValue, 0f, (float)maxShieldValue)); if (Object.op_Implicit((Object)(object)barImage)) { barImage.fillAmount = shieldValue / (float)maxShieldValue; } if (Object.op_Implicit((Object)(object)currentShield)) { ((TMP_Text)currentShield).text = shieldValue.ToString(); } if (Object.op_Implicit((Object)(object)fullShield)) { ((TMP_Text)fullShield).text = maxShieldValue.ToString(); } } private void OnDisable() { if (Util.HasEffectiveAuthority(((Component)this).gameObject)) { skillLocator.primary.skillDef.icon = Prefabs.q1; skillLocator.secondary.skillDef.icon = Prefabs.slam; skillLocator.utility.skillDef.icon = Prefabs.shield; skillLocator.special.skillDef.icon = Prefabs.ult; } } private void UNetVersion() { } protected static void InvokeCmdCmdAddDarkness(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkServer.active) { Debug.LogError((object)"Command CmdAddDarkness called on client."); } else { ((MordBehaviour)(object)obj).CmdAddDarkness(); } } protected static void InvokeCmdCmdDamageTarget(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkServer.active) { Debug.LogError((object)"Command CmdDamageTarget called on client."); } else { ((MordBehaviour)(object)obj).CmdDamageTarget(reader.ReadGameObject(), reader.ReadSingle(), reader.ReadBoolean()); } } public void CallCmdAddDarkness() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogError((object)"Command function CmdAddDarkness called on server."); return; } if (((NetworkBehaviour)this).isServer) { CmdAddDarkness(); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)5); val.WritePackedUInt32((uint)kCmdCmdAddDarkness); val.Write(((Component)this).GetComponent<NetworkIdentity>().netId); ((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdAddDarkness"); } public void CallCmdDamageTarget(GameObject target, float damage, bool isCrit) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogError((object)"Command function CmdDamageTarget called on server."); return; } if (((NetworkBehaviour)this).isServer) { CmdDamageTarget(target, damage, isCrit); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)5); val.WritePackedUInt32((uint)kCmdCmdDamageTarget); val.Write(((Component)this).GetComponent<NetworkIdentity>().netId); val.Write(target); val.Write(damage); val.Write(isCrit); ((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdDamageTarget"); } protected static void InvokeRpcRpcCurseTarget(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcCurseTarget called on server."); } else { ((MordBehaviour)(object)obj).RpcCurseTarget(reader.ReadGameObject()); } } public void CallRpcCurseTarget(GameObject masterObject) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcCurseTarget called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcCurseTarget); val.Write(((Component)this).GetComponent<NetworkIdentity>().netId); val.Write(masterObject); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcCurseTarget"); } static MordBehaviour() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown kCmdCmdAddDarkness = -315140379; NetworkBehaviour.RegisterCommandDelegate(typeof(MordBehaviour), kCmdCmdAddDarkness, new CmdDelegate(InvokeCmdCmdAddDarkness)); kCmdCmdDamageTarget = 202705001; NetworkBehaviour.RegisterCommandDelegate(typeof(MordBehaviour), kCmdCmdDamageTarget, new CmdDelegate(InvokeCmdCmdDamageTarget)); kRpcRpcCurseTarget = -1298055292; NetworkBehaviour.RegisterRpcDelegate(typeof(MordBehaviour), kRpcRpcCurseTarget, new CmdDelegate(InvokeRpcRpcCurseTarget)); NetworkCRC.RegisterBehaviour("MordBehaviour", 0); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(shieldValue); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(shieldValue); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { shieldValue = reader.ReadSingle(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { shieldValue = reader.ReadSingle(); } } } internal class MordCurseDotBehaviour : MonoBehaviour { private float stopwatch; private float damageFrequency = 0.1f; public CharacterBody attackerBody; private CharacterBody body; private float damageCoefficient => MainPlugin.specialDamage.Value * damageFrequency; private void Start() { body = ((Component)this).GetComponent<CharacterBody>(); } private void FixedUpdate() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)attackerBody)) { stopwatch += Time.fixedDeltaTime; if (stopwatch >= damageFrequency) { stopwatch = 0f; DamageInfo val = new DamageInfo(); val.attacker = ((Component)attackerBody).gameObject; val.inflictor = ((Component)attackerBody).gameObject; val.force = Vector3.zero; val.damage = attackerBody.damage * damageCoefficient; val.crit = attackerBody.RollCrit(); val.position = body.corePosition; val.procChainMask = default(ProcChainMask); val.procCoefficient = 0f; val.damageColorIndex = (DamageColorIndex)7; val.damageType = DamageTypeCombo.op_Implicit((DamageType)262210) | DamageTypeCombo.GenericSpecial; body.healthComponent.TakeDamage(val); } } } } internal class MordekaiserDarknessBehaviour : MonoBehaviour { public float baseRadius = 2f; public float additionalRadiusPerStack = 2f; public float radius; public float stopwatch; public float fireFrequency = 0.25f; public float damageCoefficient = 0.55f; public float scaleVelocity = 0f; public CharacterBody body; public int buffCount; public NetworkedBodyAttachment attachment; private void Start() { attachment = ((Component)this).GetComponent<NetworkedBodyAttachment>(); } private void FixedUpdate() { //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_014e: Unknown result type (might be due to invalid IL or missing references) //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) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)body)) { if (Object.op_Implicit((Object)(object)attachment)) { body = attachment.attachedBody; } return; } buffCount = body.GetBuffCount(Prefabs.darkness); radius = baseRadius + additionalRadiusPerStack * (float)buffCount; if (NetworkServer.active) { stopwatch += Time.fixedDeltaTime; if (stopwatch >= fireFrequency) { stopwatch = 0f; new BlastAttack { attacker = ((Component)body).gameObject, inflictor = ((Component)this).gameObject, teamIndex = body.teamComponent.teamIndex, position = ((Component)this).transform.position, procCoefficient = fireFrequency, radius = radius, baseForce = 0f, baseDamage = body.damage * damageCoefficient, bonusForce = Vector3.zero, crit = false, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)0, damageColorIndex = (DamageColorIndex)3, attackerFiltering = (AttackerFiltering)2 }.Fire(); } } float num = Mathf.SmoothDamp(((Component)this).transform.localScale.x, radius, ref scaleVelocity, 0.5f); ((Component)this).transform.localScale = new Vector3(num, num, num); if (buffCount == 0) { Object.Destroy((Object)(object)((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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Prefabs.ultBuff)) { args.damageMultAdd += MainPlugin.specialDamageBuff.Value; args.healthMultAdd += MainPlugin.specialHPBuff.Value; args.moveSpeedMultAdd += MainPlugin.specialMovementSpeedBuff.Value; args.armorAdd += MainPlugin.specialArmorBuff.Value; } int buffCount = sender.GetBuffCount(Prefabs.darkness); if (buffCount >= MainPlugin.passiveStacks.Value) { args.moveSpeedMultAdd += MainPlugin.passiveBuff.Value * (float)buffCount; } } private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport) { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Expected O, but got Unknown //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Expected O, but got Unknown //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Expected O, but got Unknown //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Expected O, but got Unknown if (!NetworkServer.active || !Object.op_Implicit((Object)(object)damageReport.victimBody) || !damageReport.victimBody.HasBuff(Prefabs.ultMark) || !Object.op_Implicit((Object)(object)damageReport.victimBody.master)) { return; } MordCurseDotBehaviour[] components = ((Component)damageReport.victimBody).GetComponents<MordCurseDotBehaviour>(); MordCurseDotBehaviour[] array = components; foreach (MordCurseDotBehaviour mordCurseDotBehaviour in array) { CharacterBody attackerBody = mordCurseDotBehaviour.attackerBody; if (Object.op_Implicit((Object)(object)attackerBody)) { EffectManager.SimpleEffect(Prefabs.curseSpawnEffect, damageReport.victimBody.transform.position, Quaternion.identity, true); MasterSummon val = new MasterSummon { masterPrefab = MasterCatalog.GetMasterPrefab(damageReport.victimBody.master.masterIndex), position = damageReport.victimBody.transform.position, rotation = damageReport.victimBody.transform.rotation, summonerBodyObject = ((Component)attackerBody).gameObject, ignoreTeamMemberLimit = true, teamIndexOverride = attackerBody.teamComponent.teamIndex, inventoryToCopy = (Object.op_Implicit((Object)(object)damageReport.victimBody.inventory) ? damageReport.victimBody.inventory : null) }; CharacterMaster val2 = val.Perform(); val2.inventory.GiveItem(Items.BoostDamage, 5); val2.inventory.GiveItem(Items.BoostHp, 5); val2.inventory.GiveItem(Items.HealthDecay, MainPlugin.specialDuration.Value); Deployable val3 = ((Component)val2).gameObject.AddComponent<Deployable>(); val3.onUndeploy = new UnityEvent(); val3.onUndeploy.AddListener(new UnityAction(val2.TrueKill)); attackerBody.master.AddDeployable(val3, Prefabs.cursed); MordBehaviour component = ((Component)attackerBody).GetComponent<MordBehaviour>(); component.minion = val2; component.CallRpcCurseTarget(((Component)val2).gameObject); val2.onBodyDeath.AddListener(new UnityAction(component.RemoveUltBuff)); } } } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_008a: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) MordBehaviour component = ((Component)self).GetComponent<MordBehaviour>(); if (Object.op_Implicit((Object)(object)component) && component.canShield) { component.AddShield(damageInfo.damage * MainPlugin.passiveTaken.Value); } if (Object.op_Implicit((Object)(object)self.body) && Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<MordBehaviour>()) && DamageTypeCombo.op_Implicit(damageInfo.damageType | DamageTypeCombo.op_Implicit((DamageType)1)) != 0) { damageInfo.damageType = DamageTypeCombo.op_Implicit((DamageType)0); self.body.AddTimedBuff(Buffs.Slow60, 2f); } orig.Invoke(self, damageInfo); MordBehaviour mordBehaviour = (Object.op_Implicit((Object)(object)damageInfo.attacker) ? damageInfo.attacker.GetComponent<MordBehaviour>() : null); if (Object.op_Implicit((Object)(object)mordBehaviour) && mordBehaviour.canShield) { mordBehaviour.AddShield(damageInfo.damage * MainPlugin.passiveDealt.Value); } } } [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Dragonyck.Mordekaiser", "Mordekaiser", "1.0.3")] [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.*/)] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.Mordekaiser"; public const string MODNAME = "Mordekaiser"; public const string VERSION = "1.0.3"; public const string SURVIVORNAME = "Mordekaiser"; public const string SURVIVORNAMEKEY = "MORDEKAISER"; public static GameObject characterPrefab; private static readonly Color characterColor = new Color(0.7f, 0.7f, 0.7f); internal static ConfigEntry<int> passiveStacks; internal static ConfigEntry<float> passiveHPCap; internal static ConfigEntry<float> passiveBuff; internal static ConfigEntry<float> passiveTaken; internal static ConfigEntry<float> passiveDealt; internal static ConfigEntry<int> secondaryStock; internal static ConfigEntry<float> secondaryCD; internal static ConfigEntry<int> utilityStock; internal static ConfigEntry<float> utilityCD; internal static ConfigEntry<float> utilityDecayTime; internal static ConfigEntry<int> specialStock; internal static ConfigEntry<float> specialCD; internal static ConfigEntry<float> specialDamageBuff; internal static ConfigEntry<float> specialHPBuff; internal static ConfigEntry<float> specialMovementSpeedBuff; internal static ConfigEntry<float> specialArmorBuff; internal static ConfigEntry<int> specialDuration; internal static ConfigEntry<float> passiveDamage; internal static ConfigEntry<float> primaryDamage; internal static ConfigEntry<float> secondaryDamage; internal static ConfigEntry<float> secondaryDamageAir; internal static ConfigEntry<float> utilityDamage; internal static ConfigEntry<float> specialDamage; private void Awake() { secondaryStock = ((BaseUnityPlugin)this).Config.Bind<int>("", "", 1, (ConfigDescription)null); passiveDamage = ((BaseUnityPlugin)this).Config.Bind<float>("Passive", "Damage", 2.2f, (ConfigDescription)null); passiveHPCap = ((BaseUnityPlugin)this).Config.Bind<float>("Passive", "HP Cap", 0.3f, (ConfigDescription)null); passiveStacks = ((BaseUnityPlugin)this).Config.Bind<int>("Passive", "Required Stacks", 4, (ConfigDescription)null); passiveBuff = ((BaseUnityPlugin)this).Config.Bind<float>("Passive", "Buff", 0.05f, (ConfigDescription)null); passiveTaken = ((BaseUnityPlugin)this).Config.Bind<float>("Passive", "Damage Taken Mult", 0.075f, (ConfigDescription)null); passiveDealt = ((BaseUnityPlugin)this).Config.Bind<float>("Passive", "Damage Dealt Mult", 0.045f, (ConfigDescription)null); primaryDamage = ((BaseUnityPlugin)this).Config.Bind<float>("Primary", "Damage", 3.45f, (ConfigDescription)null); secondaryDamage = ((BaseUnityPlugin)this).Config.Bind<float>("Secondary", "Damage", 5.8f, (ConfigDescription)null); secondaryDamageAir = ((BaseUnityPlugin)this).Config.Bind<float>("Secondary", "Damage Air Skill", 3.2f, (ConfigDescription)null); secondaryStock = ((BaseUnityPlugin)this).Config.Bind<int>("Secondary", "Base Stocks", 1, (ConfigDescription)null); secondaryCD = ((BaseUnityPlugin)this).Config.Bind<float>("Secondary", "Base Cooldown", 5f, (ConfigDescription)null); utilityStock = ((BaseUnityPlugin)this).Config.Bind<int>("Utility", "Base Stocks", 1, (ConfigDescription)null); utilityCD = ((BaseUnityPlugin)this).Config.Bind<float>("Utility", "Base Cooldown", 5f, (ConfigDescription)null); utilityDecayTime = ((BaseUnityPlugin)this).Config.Bind<float>("Utility", "Decay Time", 3f, (ConfigDescription)null); specialDamage = ((BaseUnityPlugin)this).Config.Bind<float>("Special", "Damage", 2f, (ConfigDescription)null); specialDamageBuff = ((BaseUnityPlugin)this).Config.Bind<float>("Special", "Damage Buff", 0.5f, (ConfigDescription)null); specialHPBuff = ((BaseUnityPlugin)this).Config.Bind<float>("Special", "HP Buff", 0.5f, (ConfigDescription)null); specialMovementSpeedBuff = ((BaseUnityPlugin)this).Config.Bind<float>("Special", "Movement Speed Buff", 0.25f, (ConfigDescription)null); specialArmorBuff = ((BaseUnityPlugin)this).Config.Bind<float>("Special", "Armor Buff", 5f, (ConfigDescription)null); specialDuration = ((BaseUnityPlugin)this).Config.Bind<int>("Special", "Duration", 90, (ConfigDescription)null); specialStock = ((BaseUnityPlugin)this).Config.Bind<int>("Special", "Base Stocks", 1, (ConfigDescription)null); specialCD = ((BaseUnityPlugin)this).Config.Bind<float>("Special", "Base Cooldown", 30f, (ConfigDescription)null); 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: 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_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_0734: Unknown result type (might be due to invalid IL or missing references) //IL_0752: Unknown result type (might be due to invalid IL or missing references) //IL_0770: Unknown result type (might be due to invalid IL or missing references) //IL_078e: Unknown result type (might be due to invalid IL or missing references) //IL_07ac: Unknown result type (might be due to invalid IL or missing references) //IL_07ca: Unknown result type (might be due to invalid IL or missing references) //IL_07e8: Unknown result type (might be due to invalid IL or missing references) //IL_0806: Unknown result type (might be due to invalid IL or missing references) //IL_0825: 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_0863: Unknown result type (might be due to invalid IL or missing references) //IL_0882: Unknown result type (might be due to invalid IL or missing references) //IL_09a2: Unknown result type (might be due to invalid IL or missing references) //IL_0a0d: Unknown result type (might be due to invalid IL or missing references) //IL_0a2b: Unknown result type (might be due to invalid IL or missing references) //IL_0a50: Unknown result type (might be due to invalid IL or missing references) //IL_0a6e: Unknown result type (might be due to invalid IL or missing references) //IL_0a9b: Unknown result type (might be due to invalid IL or missing references) //IL_0aa0: Unknown result type (might be due to invalid IL or missing references) //IL_0ab6: Unknown result type (might be due to invalid IL or missing references) //IL_0abb: Unknown result type (might be due to invalid IL or missing references) //IL_0ad7: Unknown result type (might be due to invalid IL or missing references) //IL_0adc: Unknown result type (might be due to invalid IL or missing references) //IL_0af2: Unknown result type (might be due to invalid IL or missing references) //IL_0af7: Unknown result type (might be due to invalid IL or missing references) //IL_0b31: 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_0b59: Unknown result type (might be due to invalid IL or missing references) //IL_0b5e: Unknown result type (might be due to invalid IL or missing references) //IL_0b8c: Unknown result type (might be due to invalid IL or missing references) //IL_0b91: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_05a7: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion(); characterPrefab = PrefabAPI.InstantiateClone(val, "MordekaiserBody", true); MordBehaviour behaviour = characterPrefab.AddComponent<MordBehaviour>(); characterPrefab.AddComponent<AimIndicator>(); characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true; 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 val2 = Assets.MainAssetBundle.LoadAsset<GameObject>("Assets/MordekaiserAssets/mordekaiser.prefab"); val2.AddComponent<AnimationEvents>().soundCenter = val2.gameObject; GameObject val3 = new GameObject("ModelBase"); val3.transform.parent = characterPrefab.transform; val3.transform.localPosition = new Vector3(0f, -0.94f, 0f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = new Vector3(1f, 1f, 1f); GameObject val4 = new GameObject("AimOrigin"); val4.transform.parent = val3.transform; val4.transform.localPosition = new Vector3(0f, 1.4f, 0f); val4.transform.localRotation = Quaternion.identity; val4.transform.localScale = Vector3.one; Transform transform = val2.transform; transform.parent = val3.transform; transform.localPosition = Vector3.zero; transform.localScale = Vector3.one; transform.localRotation = Quaternion.identity; CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>(); component.targetTransform = val3.transform; component.modelAnimator = val2.GetComponentInChildren<Animator>(); component.turnSpeed = 720f; CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>(); ((Object)component2).name = "MordekaiserBody"; component2.baseNameToken = "MORDEKAISER_NAME"; component2.subtitleNameToken = "MORDEKAISER_SUBTITLE"; component2.bodyFlags = (BodyFlags)16; component2.rootMotionInMainState = false; component2.mainRootSpeed = 0f; component2.baseMaxHealth = 150f; component2.levelMaxHealth = 40f; component2.baseRegen = 1.5f; component2.levelRegen = 0.5f; component2.baseMaxShield = 0f; component2.levelMaxShield = 0f; component2.baseMoveSpeed = 7f; component2.levelMoveSpeed = 0f; component2.baseAcceleration = 110f; component2.baseJumpPower = 15f; component2.levelJumpPower = 0f; component2.baseDamage = 15f; component2.levelDamage = 3f; component2.baseAttackSpeed = 1f; component2.levelAttackSpeed = 0f; component2.baseCrit = 1f; component2.levelCrit = 0f; component2.baseArmor = 20f; component2.levelArmor = 0f; component2.baseJumpCount = 1; component2.sprintingSpeedMultiplier = 1.45f; component2.wasLucky = false; component2.hideCrosshair = false; component2.aimOriginTransform = val4.transform; component2.hullClassification = (HullClassification)0; component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait2").texture; component2._defaultCrosshairPrefab = Prefabs.Load<GameObject>("RoR2/Base/UI/SimpleDotCrosshair.prefab"); component2.isChampion = false; component2.currentVehicle = null; component2.skinIndex = 0u; component2.bodyColor = characterColor; characterPrefab.GetComponent<HealthComponent>().health = component2.baseMaxHealth; 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; characterPrefab.GetComponent<KinematicCharacterMotor>().playerCharacter = true; InputBankTest component4 = characterPrefab.GetComponent<InputBankTest>(); component4.moveVector = Vector3.zero; CameraTargetParams component5 = characterPrefab.GetComponent<CameraTargetParams>(); component5.cameraParams = val.GetComponent<CameraTargetParams>().cameraParams; component5.cameraPivotTransform = null; component5.recoil = Vector2.zero; component5.dontRaycastToPivot = false; ModelLocator component6 = characterPrefab.GetComponent<ModelLocator>(); component6.modelTransform = transform; component6.modelBaseTransform = val3.transform; component6.dontReleaseModelOnDeath = false; component6.autoUpdateModelTransform = true; component6.dontDetatchFromParent = false; component6.noCorpse = false; component6.normalizeToFloor = false; component6.preserveModel = false; CharacterModel val5 = val2.AddComponent<CharacterModel>(); Shader val6 = null; SkinnedMeshRenderer[] componentsInChildren = val2.GetComponentsInChildren<SkinnedMeshRenderer>(); List<RendererInfo> list = new List<RendererInfo>(); for (int i = 0; i < componentsInChildren.Length; i++) { if (!Object.op_Implicit((Object)(object)val6)) { val6 = ((Renderer)componentsInChildren[i]).material.shader; } if (((Renderer)componentsInChildren[i]).sharedMaterials.Length == 1 && !((Object)componentsInChildren[i]).name.Contains("FX") && (Object)(object)((Renderer)componentsInChildren[i]).material.shader == (Object)(object)val6) { list.Add(new RendererInfo { renderer = (Renderer)(object)componentsInChildren[i], defaultMaterial = Utils.InstantiateMaterial(((Renderer)componentsInChildren[i]).material.mainTexture), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }); } } RendererInfo[] array = list.ToArray(); val5.body = component2; val5.baseRendererInfos = array; val5.autoPopulateLightInfos = true; val5.invisibilityCount = 0; val5.temporaryOverlays = new List<TemporaryOverlayInstance>(); val5.mainSkinnedMeshRenderer = componentsInChildren[0]; GameObject gameObject = ((Component)transform).gameObject; ModelSkinController val7 = gameObject.AddComponent<ModelSkinController>(); LanguageAPI.Add("MORDEKAISERBODY_DEFAULT_SKIN_NAME", "Iron Revenant"); LanguageAPI.Add("MORDEKAISERBODY_SKIN00_NAME", "Default"); LanguageAPI.Add("MORDEKAISERBODY_SKIN01_NAME", "Dragon Knight"); LanguageAPI.Add("MORDEKAISERBODY_SKIN02_NAME", "Infernal"); LanguageAPI.Add("MORDEKAISERBODY_SKIN03_NAME", "Pentakill"); LanguageAPI.Add("MORDEKAISERBODY_SKIN04_NAME", "Lord"); LanguageAPI.Add("MORDEKAISERBODY_SKIN05_NAME", "King of Clubs"); LanguageAPI.Add("MORDEKAISERBODY_SKIN06_NAME", "Dark Star"); LanguageAPI.Add("MORDEKAISERBODY_SKIN13_NAME", "PROJECT"); LanguageAPI.Add("MORDEKAISERBODY_SKIN23_NAME", "Pentakill III: Lost Chapter"); LanguageAPI.Add("MORDEKAISERBODY_SKIN32_NAME", "High Noon"); LanguageAPI.Add("MORDEKAISERBODY_SKIN42_NAME", "Ashen Graveknight"); LanguageAPI.Add("MORDEKAISERBODY_SKIN44_NAME", "Old God"); val7.skins = (SkinDef[])(object)new SkinDef[13] { Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_SKIN00_NAME", "skin00", array, behaviour)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_DEFAULT_SKIN_NAME", "base", array, behaviour)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_SKIN01_NAME", "skin01", array, behaviour)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_SKIN02_NAME", "skin02", array, behaviour)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_SKIN03_NAME", "skin03", array, behaviour)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_SKIN04_NAME", "skin04", array, behaviour)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_SKIN05_NAME", "skin05", array, behaviour)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_SKIN06_NAME", "skin06", array, behaviour)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_SKIN13_NAME", "skin13", array, behaviour)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_SKIN23_NAME", "skin23", array, behaviour)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_SKIN32_NAME", "skin32", array, behaviour)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_SKIN42_NAME", "skin42", array, behaviour)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "MORDEKAISERBODY_SKIN44_NAME", "skin44", array, behaviour)) }; HealthComponent component7 = characterPrefab.GetComponent<HealthComponent>(); component7.health = component2.baseMaxHealth; component7.shield = 0f; component7.barrier = 0f; component7.magnetiCharge = 0f; component7.body = null; component7.dontShowHealthbar = false; SfxLocator component8 = characterPrefab.GetComponent<SfxLocator>(); component8.deathSound = "Play_ui_player_death"; component8.barkSound = ""; component8.openSound = ""; component8.landingSound = "Play_char_land"; component8.fallDamageSound = "Play_char_land_fall_damage"; component8.aliveLoopStart = ""; component8.aliveLoopStop = ""; Collider[] componentsInChildren2 = val2.GetComponentsInChildren<Collider>(); HurtBoxGroup val8 = val2.AddComponent<HurtBoxGroup>(); List<HurtBox> list2 = new List<HurtBox>(); Collider[] array2 = componentsInChildren2; foreach (Collider val9 in array2) { HurtBox val10 = ((Component)val9).gameObject.AddComponent<HurtBox>(); ((Component)val10).gameObject.layer = LayerIndex.entityPrecise.intVal; val10.healthComponent = component7; val10.isBullseye = true; val10.damageModifier = (DamageModifier)0; val10.hurtBoxGroup = val8; val10.indexInGroup = 0; val8.mainHurtBox = val10; val8.bullseyeCount = 1; list2.Add(val10); } val8.hurtBoxes = list2.ToArray(); Utils.CreateHitbox("Swing", val2.transform, new Vector3(4.5f, 4.5f, 5.2f)).transform.localPosition = new Vector3(0f, 1f, 0.7f); Utils.CreateHitbox("Bonk", val2.transform, new Vector3(5f, 6f, 8f)).transform.localPosition = new Vector3(0f, 1f, 4f); Utils.CreateHitboxes("BigBonk", val2.transform, (Vector3[])(object)new Vector3[2] { new Vector3(5f, 6f, 8f), new Vector3(10f, 6f, 8f) }, (Vector3[])(object)new Vector3[2] { new Vector3(0f, 1f, 4f), new Vector3(0f, 1f, 8f) }); FootstepHandler val11 = val2.AddComponent<FootstepHandler>(); val11.baseFootstepString = "Play_player_footstep"; val11.sprintFootstepOverrideString = ""; val11.enableFootstepDust = true; val11.footstepDustPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion(); EntityStateMachine component9 = ((Component)component2).GetComponent<EntityStateMachine>(); component9.mainStateType = new SerializableEntityStateType(typeof(CharacterMain)); CharacterDeathBehavior component10 = characterPrefab.GetComponent<CharacterDeathBehavior>(); component10.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>(); component10.deathState = new SerializableEntityStateType(typeof(GenericCharacterDeath)); Utils.NewStateMachine<Idle>(characterPrefab, "Ult"); Utils.NewStateMachine<Idle>(characterPrefab, "Shield"); NetworkStateMachine component11 = ((Component)component2).GetComponent<NetworkStateMachine>(); component11.stateMachines = ((Component)component2).GetComponents<EntityStateMachine>(); ContentAddition.AddBody(characterPrefab); } private void RegisterCharacter() { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) 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, returning to Runeterra once more."; string text3 = "..and so he vanished, to Dominate the unknown."; LanguageAPI.Add("MORDEKAISER_NAME", "Mordekaiser"); LanguageAPI.Add("MORDEKAISER_DESCRIPTION", text); LanguageAPI.Add("MORDEKAISER_SUBTITLE", "Iron Revnant"); LanguageAPI.Add("MORDEKAISER_OUTRO", text2); LanguageAPI.Add("MORDEKAISER_FAIL", text3); SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>(); val.cachedName = "MORDEKAISER_NAME"; val.unlockableDef = null; val.descriptionToken = "MORDEKAISER_DESCRIPTION"; val.primaryColor = characterColor; val.bodyPrefab = characterPrefab; val.displayPrefab = Utils.NewDisplayModel(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "MordekaiserDisplay"); val.outroFlavorToken = "MORDEKAISER_OUTRO"; val.desiredSortPosition = 16.2f; val.mainEndingEscapeFailureFlavorToken = "MORDEKAISER_FAIL"; ContentAddition.AddSurvivorDef(val); SkillSetup(); GameObject val2 = PrefabAPI.InstantiateClone(Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoMonsterMaster.prefab"), "MordekaiserMaster", true); ContentAddition.AddMaster(val2); CharacterMaster component = val2.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) bool flag = default(bool); ContentAddition.AddEntityState<Primary>(ref flag); ContentAddition.AddEntityState<Secondary>(ref flag); ContentAddition.AddEntityState<SecondaryAir>(ref flag); ContentAddition.AddEntityState<SecondaryGround>(ref flag); ContentAddition.AddEntityState<Utility>(ref flag); ContentAddition.AddEntityState<Special>(ref flag); ContentAddition.AddEntityState<CharacterMain>(ref flag); ContentAddition.AddEntityState<BaseMordState>(ref flag); } 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() { //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("MORDEKAISER_PASSIVE_NAME", "Iron Man"); LanguageAPI.Add("MORDEKAISER_PASSIVE_DESCRIPTION", "Store <style=cIsDamage>" + passiveDealt.Value * 100f + "%</style> of the post-mitigation damage dealt and <style=cIsDamage>" + passiveTaken.Value * 100f + "%</style> pre-mitigation damage taken as <style=cIsUtility>Potential Shield</style>. It is capped to <style=cIsHealth>" + passiveHPCap.Value * 100f + "% Max HP</style>."); component.passiveSkill.enabled = true; component.passiveSkill.skillNameToken = "MORDEKAISER_PASSIVE_NAME"; component.passiveSkill.skillDescriptionToken = "MORDEKAISER_PASSIVE_DESCRIPTION"; component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("Iron_Man"); LanguageAPI.Add("MORDEKAISER_DARKNESS", "Creeping Death"); LanguageAPI.Add("MORDEKAISER_DARKNESS_DESCRIPTION", "Generate a stack of <style=cIsDamage>Creeping Death</style> for each enemy hit by your abilities, at " + passiveStacks.Value + " stacks summon a cloud of metal shards around you granting <style=cIsUtility>" + passiveBuff.Value * 100f + "% movement speed</style> for each stack and deals <style=cIsDamage>" + passiveDamage.Value * 100f + "% damage</style> per second."); 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 = Prefabs.darknessRise; val.skillDescriptionToken = "MORDEKAISER_DARKNESS_DESCRIPTION"; val.skillName = "MORDEKAISER_DARKNESS"; val.skillNameToken = "MORDEKAISER_DARKNESS"; ContentAddition.AddSkillDef(val); Utils.NewGenericSkill(characterPrefab, val); } private void PrimarySetup() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("MORDEKAISER_M1", "Mace of Spades"); LanguageAPI.Add("MORDEKAISER_M1_DESCRIPTION", "Swing in the aim direction for <style=cIsDamage>" + primaryDamage.Value * 100f + "% damage</style>. Every third hit slams farther, <style=cIsDamage>crits</style> and <style=cIsUtility>slows</style> enemies."); MordSkillDef mordSkillDef = ScriptableObject.CreateInstance<MordSkillDef>(); ((SkillDef)mordSkillDef).activationState = new SerializableEntityStateType(typeof(Primary)); ((SkillDef)mordSkillDef).activationStateMachineName = "Body"; ((SkillDef)mordSkillDef).baseMaxStock = 0; ((SkillDef)mordSkillDef).baseRechargeInterval = 0f; ((SkillDef)mordSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)mordSkillDef).canceledFromSprinting = false; ((SkillDef)mordSkillDef).fullRestockOnAssign = true; ((SkillDef)mordSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)mordSkillDef).isCombatSkill = true; ((SkillDef)mordSkillDef).mustKeyPress = false; ((SkillDef)mordSkillDef).cancelSprintingOnActivation = true; ((SkillDef)mordSkillDef).rechargeStock = 0; ((SkillDef)mordSkillDef).requiredStock = 0; ((SkillDef)mordSkillDef).stockToConsume = 0; ((SkillDef)mordSkillDef).icon = Prefabs.q1; ((SkillDef)mordSkillDef).skillDescriptionToken = "MORDEKAISER_M1_DESCRIPTION"; ((SkillDef)mordSkillDef).skillName = "MORDEKAISER_M1"; ((SkillDef)mordSkillDef).skillNameToken = "MORDEKAISER_M1"; ContentAddition.AddSkillDef((SkillDef)(object)mordSkillDef); component.primary = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)mordSkillDef); } private void SecondarySetup() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("MORDEKAISER_M2", "Obliterate/Siphon of Destruction"); LanguageAPI.Add("MORDEKAISER_M2_DESCRIPTION", "While grounded casts Obliterate, striking down in the aim direction, dealing <style=cIsDamage>" + secondaryDamage.Value * 100f + "% damage</style>, additionally deals the same damage again if only one enemy is hit." + Environment.NewLine + "While airborne, casts Siphon of Destruction, deals <style=cIsDamage>320% damage</style> in a cone in the aim direction, enemies hit are pulled towards you."); MordSkillDef mordSkillDef = ScriptableObject.CreateInstance<MordSkillDef>(); ((SkillDef)mordSkillDef).activationState = new SerializableEntityStateType(typeof(Secondary)); ((SkillDef)mordSkillDef).activationStateMachineName = "Slide"; ((SkillDef)mordSkillDef).baseMaxStock = secondaryStock.Value; ((SkillDef)mordSkillDef).baseRechargeInterval = secondaryCD.Value; ((SkillDef)mordSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)mordSkillDef).canceledFromSprinting = false; ((SkillDef)mordSkillDef).fullRestockOnAssign = false; ((SkillDef)mordSkillDef).interruptPriority = (InterruptPriority)1; ((SkillDef)mordSkillDef).isCombatSkill = true; ((SkillDef)mordSkillDef).mustKeyPress = true; ((SkillDef)mordSkillDef).cancelSprintingOnActivation = false; ((SkillDef)mordSkillDef).rechargeStock = 1; ((SkillDef)mordSkillDef).requiredStock = 1; ((SkillDef)mordSkillDef).stockToConsume = 1; ((SkillDef)mordSkillDef).icon = Prefabs.slam; ((SkillDef)mordSkillDef).skillDescriptionToken = "MORDEKAISER_M2_DESCRIPTION"; ((SkillDef)mordSkillDef).skillName = "MORDEKAISER_M2"; ((SkillDef)mordSkillDef).skillNameToken = "MORDEKAISER_M2"; ContentAddition.AddSkillDef((SkillDef)(object)mordSkillDef); component.secondary = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)mordSkillDef); } private void UtilitySetup() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("MORDEKAISER_UTIL", "Indestructible"); LanguageAPI.Add("MORDEKAISER_UTIL_DESCRIPTION", "Consume all your <style=cIsUtility>Potential Shield</style> to gain a <style=cIsHealing>temporary barrier</style> for the same amount, decaying after <style=cIsUtility>" + utilityDecayTime.Value * 100f + "s</style>. Recast to consume the remaining barrier, <style=cIsHealing>healing</style> for the same amount."); MordSkillDef mordSkillDef = ScriptableObject.CreateInstance<MordSkillDef>(); ((SkillDef)mordSkillDef).activationState = new SerializableEntityStateType(typeof(Utility)); ((SkillDef)mordSkillDef).activationStateMachineName = "Shield"; ((SkillDef)mordSkillDef).baseMaxStock = utilityStock.Value; ((SkillDef)mordSkillDef).baseRechargeInterval = utilityCD.Value; ((SkillDef)mordSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)mordSkillDef).canceledFromSprinting = false; ((SkillDef)mordSkillDef).fullRestockOnAssign = false; ((SkillDef)mordSkillDef).interruptPriority = (InterruptPriority)1; ((SkillDef)mordSkillDef).isCombatSkill = false; ((SkillDef)mordSkillDef).mustKeyPress = true; ((SkillDef)mordSkillDef).cancelSprintingOnActivation = false; ((SkillDef)mordSkillDef).rechargeStock = 1; ((SkillDef)mordSkillDef).requiredStock = 1; ((SkillDef)mordSkillDef).stockToConsume = 1; ((SkillDef)mordSkillDef).icon = Prefabs.shield; ((SkillDef)mordSkillDef).skillDescriptionToken = "MORDEKAISER_UTIL_DESCRIPTION"; ((SkillDef)mordSkillDef).skillName = "MORDEKAISER_UTIL"; ((SkillDef)mordSkillDef).skillNameToken = "MORDEKAISER_UTIL"; ContentAddition.AddSkillDef((SkillDef)(object)mordSkillDef); component.utility = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)mordSkillDef); } private void SpecialSetup() { //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("MORDEKAISER_SPEC_KEYWORD", "<style=cKeywordName>Harvester of Sorrow</style><style=cSub>While you have a <style=cIsDamage>Dominated</style> minion, you are granted <style=cIsDamage>" + specialDamageBuff.Value * 100f + "% damage</style>, <style=cIsHealth>" + specialHPBuff.Value * 100f + "% Max HP</style>, <style=cIsDamage>" + specialMovementSpeedBuff.Value * 100f + "% movement speed</style> and <style=cIsDamage>" + specialArmorBuff.Value * 100f + " armor</style>."); LanguageAPI.Add("MORDEKAISER_SPEC", "Children of the Grave"); LanguageAPI.Add("MORDEKAISER_SPEC_DESCRIPTION", "Curse the target enemy indefinitely, dealing <style=cIsDamage>" + specialDamage.Value * 100f + "% damage</style> per second, granting <style=cKeywordName>Harvester of Sorrow</style><style=cSub>. When the target dies, their soul is enslaved as an ally ghost, with bonus <style=cIsDamage>damage</style> and <style=cIsHealth>health</style>, lasting <style=cIsUtility>" + specialDuration.Value * 100 + "s</style>."); MordSkillDef mordSkillDef = ScriptableObject.CreateInstance<MordSkillDef>(); ((SkillDef)mordSkillDef).activationState = new SerializableEntityStateType(typeof(Special)); ((SkillDef)mordSkillDef).activationStateMachineName = "Ult"; ((SkillDef)mordSkillDef).baseMaxStock = specialStock.Value; ((SkillDef)mordSkillDef).baseRechargeInterval = specialCD.Value; ((SkillDef)mordSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)mordSkillDef).canceledFromSprinting = false; ((SkillDef)mordSkillDef).fullRestockOnAssign = false; ((SkillDef)mordSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)mordSkillDef).isCombatSkill = true; ((SkillDef)mordSkillDef).mustKeyPress = true; ((SkillDef)mordSkillDef).cancelSprintingOnActivation = false; ((SkillDef)mordSkillDef).rechargeStock = 1; ((SkillDef)mordSkillDef).requiredStock = 1; ((SkillDef)mordSkillDef).stockToConsume = 1; ((SkillDef)mordSkillDef).icon = Prefabs.ult; ((SkillDef)mordSkillDef).skillDescriptionToken = "MORDEKAISER_SPEC_DESCRIPTION"; ((SkillDef)mordSkillDef).skillName = "MORDEKAISER_SPEC"; ((SkillDef)mordSkillDef).skillNameToken = "MORDEKAISER_SPEC"; ((SkillDef)mordSkillDef).keywordTokens = new string[1] { "MORDEKAISER_SPEC_KEYWORD" }; ContentAddition.AddSkillDef((SkillDef)(object)mordSkillDef); component.special = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)mordSkillDef); } } internal class MordSkillDef : SkillDef { private class InstanceData : BaseSkillInstanceData { public AimIndicator aimBehaviour; public MordBehaviour behaviour; public SkillLocator skillLocator; } public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData { aimBehaviour = ((Component)skillSlot).GetComponent<AimIndicator>(), behaviour = ((Component)skillSlot).GetComponent<MordBehaviour>(), skillLocator = ((Component)skillSlot).GetComponent<SkillLocator>() }; } internal static bool IsExecutable([NotNull] GenericSkill skillSlot) { InstanceData instanceData = (InstanceData)(object)skillSlot.skillInstanceData; AimIndicator aimBehaviour = instanceData.aimBehaviour; MordBehaviour behaviour = instanceData.behaviour; SkillLocator skillLocator = instanceData.skillLocator; if ((Object)(object)skillSlot == (Object)(object)skillLocator.special) { return Object.op_Implicit((Object)(object)((HuntressTracker)aimBehaviour).trackingTarget); } if ((Object)(object)skillSlot == (Object)(object)skillLocator.utility) { return behaviour.canExecute && behaviour.shieldValue > 0f; } return behaviour.canExecute; } public override bool CanExecute([NotNull] GenericSkill skillSlot) { return IsExecutable(skillSlot) && ((SkillDef)this).CanExecute(skillSlot); } public override bool IsReady([NotNull] GenericSkill skillSlot) { return ((SkillDef)this).IsReady(skillSlot) && IsExecutable(skillSlot); } } internal class Prefabs { internal static GameObject autoHitEffect; internal static GameObject autoHitLightEffect; internal static GameObject autoCritHitEffect; internal static GameObject slamImpactEffect; internal static GameObject swingEffect; internal static GameObject pullHitEffect; internal static GameObject darknessAttachment; internal static GameObject helmMark; internal static GameObject crownMark; internal static GameObject curseDebuffEffect; internal static GameObject curseSpawnEffect; internal static GameObject pullEffect; internal static Material shieldOverlayMat; internal static BuffDef ultMark; internal static BuffDef ultBuff; internal static BuffDef darkness; internal static Material ghostEffectMat; internal static Material curseOverlayMat; internal static Texture2D ghostRamp; internal static Sprite q1; internal static Sprite q2; internal static Sprite q3; internal static Sprite slam; internal static Sprite pull; internal static Sprite w; internal static Sprite shield; internal static Sprite heal; internal static Sprite ult; internal static Sprite control; internal static Sprite darknessRise; internal static DeployableSlot cursed; internal static int DeployableCount(CharacterMaster master, int count) { return 1; } internal static T Load<T>(string path) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Addressables.LoadAssetAsync<T>((object)path).WaitForCompletion(); } internal static void AddBar() { //IL_0075: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) GameObject val = Load<GameObject>("RoR2/Base/UI/HUDSimple.prefab"); Object.DontDestroyOnLoad((Object)(object)val); HUDScaleController component = val.GetComponent<HUDScaleController>(); HUDTracker hUDTracker = val.AddComponent<HUDTracker>(); Transform val2 = val.GetComponent<ChildLocator>().FindChild("BottomLeftCluster"); GameObject gameObject = ((Component)((Component)val2).GetComponentInChildren<HealthBar>()).gameObject; GameObject val3 = Object.Instantiate<GameObject>(gameObject); ((Object)val3).name = "BarRoot"; val3.transform.SetParent(gameObject.transform.parent); val3.transform.localPosition = Vector2.op_Implicit(Vector2.one * 6f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = Vector3.one; HealthBar component2 = val3.GetComponent<HealthBar>(); RectTransform barContainer = component2.barContainer; GameObject val4 = new GameObject("Bar", new Type[2] { typeof(RectTransform), typeof(Image) }); RectTransform val5 = (RectTransform)val4.transform; ((Transform)val5).SetParent((Transform)(object)barContainer); ((Transform)val5).localPosition = Vector2.op_Implicit(Vector2.zero); ((Transform)val5).localRotation = Quaternion.identity; ((Transform)val5).localScale = Vector3.one; val5.sizeDelta = new Vector2(12f, 2f); val5.anchorMin = Vector2.zero; val5.anchorMax = Vector2.one; Image component3 = val4.GetComponent<Image>(); ((Graphic)component3).color = new Color(0.8156863f, 0.6313726f, 0.972549f); component3.sprite = Load<Sprite>("RoR2/Base/UI/texUIMainHealthbar.png"); component3.type = (Type)3; component3.fillMethod = (FillMethod)0; component3.fillAmount = 1f; hUDTracker.barRoot = val3; hUDTracker.bar = component3; hUDTracker.currentText = component2.currentHealthText; ((TMP_Text)hUDTracker.currentText).text = "100"; ((Component)((TMP_Text)hUDTracker.currentText).transform.parent).gameObject.SetActive(true); hUDTracker.fullText = component2.fullHealthText; ((TMP_Text)hUDTracker.fullText).text = "100"; Object.Destroy((Object)(object)component2); val3.SetActive(false); } internal static void CreatePrefabs() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00e0: 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_0163: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Expected O, but got Unknown //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_05f9: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_0659: Unknown result type (might be due to invalid IL or missing references) //IL_0660: Expected O, but got Unknown //IL_04a0: 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_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Expected O, but got Unknown //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Expected O, but got Unknown //IL_08a1: Unknown result type (might be due to invalid IL or missing references) //IL_08ab: Expected O, but got Unknown //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06fd: Unknown result type (might be due to invalid IL or missing references) //IL_0702: Unknown result type (might be due to invalid IL or missing references) //IL_07ed: Unknown result type (might be due to invalid IL or missing references) //IL_07f7: Expected O, but got Unknown //IL_082c: Unknown result type (might be due to invalid IL or missing references) AddBar(); cursed = DeployableAPI.RegisterDeployableSlot(new GetDeployableSameSlotLimit(DeployableCount)); q1 = Assets.Load<Sprite>("mordekaiserq1"); q2 = Assets.Load<Sprite>("mordekaiserq2"); q3 = Assets.Load<Sprite>("mordekaiserq3"); slam = Assets.Load<Sprite>("mordekaiserq"); pull = Assets.Load<Sprite>("Siphon_of_Destruction"); w = Assets.Load<Sprite>("Siphon_of_Destruction"); shield = Assets.Load<Sprite>("mordekaiserw"); heal = Assets.Load<Sprite>("mordekaiserw2"); ult = Assets.Load<Sprite>("Children_of_the_Grave"); control = Assets.Load<Sprite>("Dragon_Force"); darknessRise = Assets.Load<Sprite>("Creeping_Death"); shieldOverlayMat = new Material(Load<Material>("RoR2/DLC1/StrengthenBurn/matStrongerBurn.mat")); shieldOverlayMat.SetColor("_TintColor", Color.white); shieldOverlayMat.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampLightning.png")); shieldOverlayMat.SetTexture("_Cloud1Tex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/texCloudLightning1.png")); shieldOverlayMat.SetVector("_CutoffScroll", new Vector4(10f, -5f, 9f, 9f)); ghostRamp = Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampGhost.png"); ultMark = Utils.NewBuffDef("Children of the Grave", stack: false, hidden: false, ult, Color.white); ultBuff = Utils.NewBuffDef("Harvester of Sorrow", stack: false, hidden: false, ult, Color.white); darkness = Utils.NewBuffDef("Creeping Death", stack: true, hidden: false, darknessRise, Color.white); curseOverlayMat = new Material(Load<Material>("RoR2/Base/ElitePoison/matElitePoisonDarkTrail.mat")); curseOverlayMat.SetTexture("_MainTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Croco/texCrocoDecalMask.png")); curseOverlayMat.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampMysterySpacePortal.png")); autoHitEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFXMedium.prefab"), "MordekaiserAutoHitEffect", false); Utils.RegisterEffect(autoHitEffect, 1f, "Play_Mordekaiser_Auto_Hit_Heavy"); autoHitLightEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFXMedium.prefab"), "MordekaiserAutoHitEffect", false); Utils.RegisterEffect(autoHitLightEffect, 1f, "Play_Mordekaiser_Auto_Hit_Light"); autoCritHitEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Captain/HitsparkCaptainShotgun.prefab"), "MordekaiserAutoCritHitEffect", false); Utils.RegisterEffect(autoCritHitEffect, 1f, "Play_Mordekaiser_Q3_Auto_Hit"); ParticleSystem[] componentsInChildren = Load<GameObject>("RoR2/Base/Brother/BrotherSlamImpact.prefab").GetComponentsInChildren<ParticleSystem>(true); slamImpactEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Parent/ParentSlamEffect.prefab"), "MordekaiserSlamImpactEffect", false); Transform child = slamImpactEffect.transform.GetChild(0); ((Renderer)((Component)Object.Instantiate<ParticleSystem>(componentsInChildren[2], child.position, Quaternion.Euler(-90f, 0f, 0f), child)).GetComponent<ParticleSystemRenderer>()).material = Load<Material>("RoR2/Base/Huntress/matOmniHitspark3Huntress.mat"); ((Renderer)((Component)Object.Instantiate<ParticleSystem>(componentsInChildren[2], child.position, Quaternion.Euler(-90f, 0f, 0f), child)).GetComponent<ParticleSystemRenderer>()).material = Load<Material>("RoR2/Base/Loader/matOmniHitspark1Loader.mat"); Object.Instantiate<ParticleSystem>(componentsInChildren[12], child.position, Quaternion.Euler(-90f, 0f, 0f), child); ((Component)child).transform.localScale = new Vector3(1f, 1f, 1f); Texture2D val = Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampWispSoul.png"); ParticleSystemRenderer[] componentsInChildren2 = slamImpactEffect.GetComponentsInChildren<ParticleSystemRenderer>(true); foreach (ParticleSystemRenderer val2 in componentsInChildren2) { ParticleSystem component = ((Component)val2).GetComponent<ParticleSystem>(); component.scalingMode = (ParticleSystemScalingMode)0; MainModule main = component.main; string name = ((Object)val2).name; if (name == "Dust, Directional") { ((Renderer)val2).material = new Material(Load<Material>("RoR2/DLC1/snowyforest/matSFFireStaticYellowLarge.mat")); ((Renderer)val2).material.SetTexture("_MainTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/VFX/texFluffyCloud3Mask.png")); ((Renderer)val2).material.SetTexture("_RemapTex", (Texture)(object)val); ((Renderer)val2).material.SetFloat("_Boost", 5f); ((Component)val2).transform.localScale = Vector3.one * 1.4f; } if (name == "FoamSplash(Clone)") { ((Renderer)val2).material = Load<Material>("RoR2/Base/Common/VFX/matOpaqueDustSpeckledUnlit.mat"); } if (name == "Flames, Radial") { ((Component)val2).transform.localRotation = Quaternion.Euler(-90f, 0f, 0f); ShapeModule shape = component.shape; ((ShapeModule)(ref shape)).enabled = false; ((Renderer)val2).material = new Material(((Renderer)val2).material); ((Renderer)val2).material.SetTexture("_RemapTex", (Texture)(object)val); ((Renderer)val2).material.SetFloat("_Boost", 5f); ((Renderer)val2).material.SetFloat("_AlphaBoost", 3.8f); } if (name == "Nova Sphere") { ((Renderer)val2).material = new Material(Load<Material>("RoR2/Base/BleedOnHitAndExplode/matBleedOnHitAndExplodeAreaIndicator.mat")); ((Renderer)val2).material.SetTexture("_RemapTex", (Texture)(object)val); } } Utils.RegisterEffect(slamImpactEffect, 1f, "Play_Mordekaiser_Q1_Hit"); pullHitEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Merc/OmniImpactVFXSlashMercEvis.prefab"), "MordekaiserPullHitEffect", false); Utils.RegisterEffect(pullHitEffect, 1f, "Play_Mordekaiser_Pull_Hit"); darknessAttachment = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Icicle/IcicleAura.prefab"), "MordekaiserDarknessAttachment", true); darknessAttachment.GetComponent<NetworkIdentity>().localPlayerAuthority = true; IcicleAuraController component2 = darknessAttachment.GetComponent<IcicleAuraController>(); ParticleSystem[] auraParticles = component2.auraParticles; foreach (ParticleSystem val3 in auraParticles) { MainModule main2 = val3.main; ((MainModule)(ref main2)).loop = true; ((MainModule)(ref main2)).playOnAwake = true; } Object.Destroy((Object)(object)component2); darknessAttachment.AddComponent<NetworkedBodyAttachment>().shouldParentToAttachedBody = true; darknessAttachment.AddComponent<MordekaiserDarknessBehaviour>(); Texture2D val4 = Load<Texture2D>("RoR2/DLC1/VendingMachine/texRampVendingMachine.png"); Material val5 = new Material(Load<Material>("RoR2/Base/Icicle/matIceAura.mat")); val5.SetTexture("_RemapTex", (Texture)(object)val4); val5.SetTexture("_Cloud1Tex", (Texture)(object)Assets.Load<Texture2D>("mordekaiser_skin42_rwing_tx_mask")); ParticleSystemRenderer[] componentsInChildren3 = darknessAttachment.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val6 in componentsInChildren3) { string name2 = ((Object)val6).name; if (name2 == "Chunks" || name2 == "SpinningSharpChunks") { ParticleSystem component3 = ((Component)val6).GetComponent<ParticleSystem>(); component3.startSize = 0.2f; SizeOverLifetimeModule sizeOverLifetime = component3.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = false; EmissionModule emission = component3.emission; ((EmissionModule)(ref emission)).rateOverTimeMultiplier = 5f; ((Renderer)val6).material = Load<Material>("RoR2/Base/Common/TrimSheets/matTrimSheetMetal.mat"); Utils.AddRotationComponent(((Component)val6).gameObject, 75f, (RotationAxis)2); if (name2 == "SpinningSharpChunks") { ((EmissionModule)(ref emission)).rateOverTimeMultiplier = 8f; val6.mesh = Load<GameObject>("RoR2/DLC1/BossHunter/mdlBlunderbussShard.fbx").GetComponentInChildren<MeshFilter>().mesh; } else { Object.Instantiate<GameObject>(((Component)val6).gameObject, ((Component)val6).transform.parent); } } if (name2 == "Ring, Core" || name2 == "Ring, Outer" || name2 == "Ring, Procced") { ((Renderer)val6).material = val5; } if (name2 == "Area") { ((Renderer)val6).material = new Material(Load<Material>("RoR2/DLC1/VoidMegaCrab/matVoidCrabAntiMatterAreaIndicator.mat")); ((Renderer)val6).material.SetTexture("_RemapTex", (Texture)(object)val4); ((Renderer)val6).material.SetColor("_TintColor", new Color(0.69803f, 0.69803f, 0.69803f, 0.71764f)); ((Renderer)val6).material.SetFloat("_RimStrength", 0.45f); } } swingEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Brother/BrotherSwing1.prefab"), "MordekaiserSwingEffect", false); ((Behaviour)swingEffect.GetComponentInChildren<PostProcessVolume>()).enabled = false; ParticleSystemRenderer componentInChildren = swingEffect.GetComponentInChildren<ParticleSystemRenderer>(); ((Renderer)componentInChildren).material = new Material(((Renderer)componentInChildren).material); ((Renderer)componentInChildren).material.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampTwotone.jpg")); ((Renderer)componentInChildren).material.SetFloat("_AlphaBoost", 5f); Object.Destroy((Object)(object)swingEffect.GetComponent<EffectComponent>()); Object.Destroy((Object)(object)swingEffect.GetComponent<VFXAttributes>()); ghostEffectMat = Load<Material>("RoR2/Base/Common/VFX/matGhostEffect.mat"); helmMark = Assets.Load<GameObject>("helm"); Utils.AddRotationComponent(helmMark, 140f, (RotationAxis)2); ((Renderer)helmMark.GetComponent<MeshRenderer>()).material = ghostEffectMat; crownMark = Assets.Load<GameObject>("crown"); ((Renderer)crownMark.GetComponent<MeshRenderer>()).material = ghostEffectMat; curseDebuffEffect = Assets.Load<GameObject>("CurseDebuffEffect"); Utils.RegisterEffect(curseDebuffEffect, 1f); curseSpawnEffect = Assets.Load<GameObject>("CurseSpawnEffect"); Utils.RegisterEffect(curseSpawnEffect, 1f, "Play_Mordekaiser_R_Spawn"); pullEffect = Assets.Load<GameObject>("PullEffect"); Utils.RegisterEffect(pullEffect, 1.2f); } } internal class BaseMordState : BaseSkillState { public Animator animator; public MordBehaviour behaviour; public AimIndicator aimIndicator; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); behaviour = ((EntityState)this).GetComponent<MordBehaviour>(); aimIndicator = ((EntityState)this).GetComponent<AimIndicator>(); } } internal class CharacterMain : GenericCharacterMain { } 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) //IL_00a5: 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 = DamageTypeCombo.op_Implicit(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; } } } internal class Primary : BaseMordState { internal float hitPauseDuration = GroundLight.hitPauseDuration; private float stopwatch; private float attackDuration; private float earlyExitDuration; public OverlapAttack overlapAttack; private float hitPauseTimer; private bool isInHitPause; private bool hasSwung; public bool hasHit; public int comboState = 1; public int maxComboState = 3; private HitStopCachedState hitStopCachedState; public GameObject hitEffectPrefab; public string animCurve = "Curve"; private bool hop; private float stepMult; private float pushAwayForce = 550f; private float attackSpeedScaling; private Vector3 direction; private bool addedDarknessStack; public virtual bool finisher => comboState == maxComboState; public virtual bool changePrimaryIcon => true; public virtual float comboDamageCoefficient => MainPlugin.primaryDamage.Value; public virtual GameObject baseHitEffectPrefab => Prefabs.autoHitEffect; public virtual GameObject finisherHitEffectPrefab => Prefabs.autoCritHitEffect; public virtual string baseComboHitGroup => "Swing"; public virtual string finisherComboHitGroup => "Bonk"; public override void OnEnter() { //IL_0152: 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_014b: 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_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); attackSpeedScaling = Mathf.Clamp(((BaseState)this).attackSpeedStat, 1f, 10f); stepMult = behaviour.stepMult / attackSpeedScaling; attackDuration = (finisher ? 0.75f : 0.55f) / attackSpeedScaling; earlyExitDuration = 0.1f / attackSpeedScaling; animator.SetFloat(animCurve, 0f); hitEffectPrefab = (finisher ? finisherHitEffectPrefab : baseHitEffectPrefab); ((EntityState)this).PlayAnimation("FullBody, Override", "Attack" + comboState, "M1", attackDuration, 0f); overlapAttack = ((BaseState)this).InitMeleeOverlap(comboDamageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), finisher ? finisherComboHitGroup : baseComboHitGroup); SetCrit(); ((BaseState)this).StartAimMode(attackDuration, false); overlapAttack.hitEffectPrefab = hitEffectPrefab; overlapAttack.pushAwayForce = pushAwayForce; overlapAttack.forceVector = (finisher ? (Vector3.down * pushAwayForce * behaviour.bonkDownwardForceMult) : Vector3.one); if (changePrimaryIcon && finisher) { overlapAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)1) | DamageTypeCombo.GenericPrimary; } Ray aimRay = ((BaseState)this).GetAimRay(); direction = ((Ray)(ref aimRay)).direction; AkSoundEngine.PostEvent(Sounds.Play_Mordekaiser_Auto_Cast, ((EntityState)this).gameObject); } public virtual void SetCrit() { overlapAttack.isCrit = finisher; } public override void OnExit() { ((EntityState)this).OnExit(); } public override void Update() { ((EntityState)this).Update(); if (finisher && !((BaseState)this).isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 0f); } ((EntityState)this).characterBody.isSprinting = false; animator.SetBool("isMoving", false); } public override void FixedUpdate() { //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_0153: 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_016d: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); hitPauseTimer -= Time.fixedDeltaTime; if (((EntityState)this).isAuthority) { bool flag = Fire(); hasHit |= flag; if (flag) { if (!addedDarknessStack) { addedDarknessStack = true; behaviour.CallCmdAddDarkness(); } if (!hop && !((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 5f); hop = true; } if (!isInHitPause) { hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "M1"); hitPauseTimer = hitPauseDuration / ((BaseState)this).a