Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of NoctisMod v1.6.2
NoctisMod.dll
Decompiled 11 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EmotesAPI; using EntityStates; using EntityStates.BeetleGuardMonster; using EntityStates.Commando.CommandoWeapon; using EntityStates.Huntress; using EntityStates.Merc; using EntityStates.Sniper.SniperWeapon; using EntityStates.Treebot.Weapon; using ExtraSkillSlots; using HG; using KinematicCharacterController; using NoctisMod.Modules; using NoctisMod.Modules.Networking; using NoctisMod.Modules.Survivors; using NoctisMod.SkillStates; using NoctisMod.SkillStates.BaseStates; using On.RoR2; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("NoctisMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("NoctisMod")] [assembly: AssemblyTitle("NoctisMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] internal class BodyInfo { internal string bodyName = ""; internal string bodyNameToken = ""; internal string subtitleNameToken = ""; internal string bodyNameToClone = "Commando"; internal Texture characterPortrait = null; internal GameObject crosshair = null; internal GameObject podPrefab = null; internal float maxHealth = 100f; internal float healthGrowth = 2f; internal float healthRegen = 0f; internal float shield = 0f; internal float shieldGrowth = 0f; internal float moveSpeed = 7f; internal float moveSpeedGrowth = 0f; internal float acceleration = 80f; internal float jumpPower = 15f; internal float jumpPowerGrowth = 0f; internal float damage = 12f; internal float attackSpeed = 1f; internal float attackSpeedGrowth = 0f; internal float armor = 0f; internal float armorGrowth = 0f; internal float crit = 1f; internal float critGrowth = 0f; internal int jumpCount = 1; internal Color bodyColor = Color.grey; internal Vector3 aimOriginPosition = new Vector3(0f, 1.8f, 0f); internal Vector3 modelBasePosition = new Vector3(0f, -0.92f, 0f); internal Vector3 cameraPivotPosition = new Vector3(0f, 1.6f, 0f); } internal class CustomRendererInfo { internal string childName; internal Material material; internal bool ignoreOverlays; } internal class SkillDefInfo { public string skillName; public string skillNameToken; public string skillDescriptionToken; public Sprite skillIcon; public SerializableEntityStateType activationState; public string activationStateMachineName; public int baseMaxStock; public float baseRechargeInterval; public bool beginSkillCooldownOnSkillEnd; public bool canceledFromSprinting; public bool forceSprintDuringState; public bool fullRestockOnAssign; public InterruptPriority interruptPriority; public bool resetCooldownTimerOnUse; public bool isCombatSkill; public bool mustKeyPress; public bool cancelSprintingOnActivation; public int rechargeStock; public int requiredStock; public int stockToConsume; public string[] keywordTokens; } namespace NoctisMod { internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.TeaL.NoctisMod", "NoctisMod", "1.6.2")] public class NoctisPlugin : BaseUnityPlugin { public static bool scepterInstalled; public NoctisController Noctiscon; public const string MODUID = "com.TeaL.NoctisMod"; public const string MODNAME = "NoctisMod"; public const string MODVERSION = "1.6.2"; public const string developerPrefix = "TEAL"; internal List<SurvivorBase> Survivors = new List<SurvivorBase>(); public static NoctisPlugin instance; public static CharacterBody NoctisCharacterBody; private BlastAttack blastAttack; private GameObject armigerEffectPrefab = NoctisAssets.armigerSwordParticle; private void Awake() { instance = this; NoctisCharacterBody = null; instance = this; NoctisAssets.Initialize(); Config.ReadConfig(); Damage.SetupModdedDamage(); if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions")) { Config.SetupRiskOfOptions(); } States.RegisterStates(); Buffs.RegisterBuffs(); Projectiles.RegisterProjectiles(); Tokens.AddTokens(); ItemDisplays.PopulateDisplays(); new Noctis().Initialize(); NetworkingAPI.RegisterMessageType<TakeDamageRequest>(); NetworkingAPI.RegisterMessageType<SetFreezeOnBodyRequest>(); NetworkingAPI.RegisterMessageType<ForceCounterState>(); NetworkingAPI.RegisterMessageType<ForceFollowUpState>(); NetworkingAPI.RegisterMessageType<ForceGSSwapAerial>(); NetworkingAPI.RegisterMessageType<ExtractNetworkRequest>(); NetworkingAPI.RegisterMessageType<ForceDodgeState>(); new ContentPacks().Initialize(); ContentManager.onContentPacksAssigned += LateSetup; Hook(); } private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj) { SurvivorBase.instance.SetItemDisplays(); } private void Hook() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown CharacterBody.OnDeathStart += new hook_OnDeathStart(CharacterBody_OnDeathStart); CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy); CharacterModel.Awake += new hook_Awake(CharacterModel_Awake); if (Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI")) { SurvivorCatalog.Init += new hook_Init(SurvivorCatalog_Init); } } private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0085: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_00e5: 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_00fc: 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_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: 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_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: 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_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: 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_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_026f: 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_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: 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_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0329: 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_0336: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Expected O, but got Unknown orig.Invoke(self, damageInfo, victim); if (!Object.op_Implicit((Object)(object)damageInfo.attacker) || !((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>() != (Object)null)) { return; } CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); CharacterBody component2 = victim.GetComponent<CharacterBody>(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component2) || !Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component2) || !(damageInfo.damage > 0f) || (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) == 67108864) { return; } if (component.baseNameToken == "TEAL_NOCTIS_BODY_NAME") { NetworkingHelpers.ApplyBuff(component, Buffs.manaBuff.buffIndex, 1, 2f); } if (DamageAPI.HasModdedDamageType(damageInfo, Damage.noctisVulnerability)) { NetworkingHelpers.ApplyBuff(component2, Buffs.vulnerabilityDebuff.buffIndex, component2.GetBuffCount(Buffs.vulnerabilityDebuff) + 1, -1f); } if (component.HasBuff(Buffs.armigerBuff) && damageInfo.procCoefficient > 0f) { float num = Random.Range(0f, MathF.PI * 2f); float num2 = Random.Range(0f, MathF.PI * 2f); float num3 = 8f; float num4 = num3 * Mathf.Cos(num) * Mathf.Sin(num2); float num5 = num3 * Mathf.Sin(num) * Mathf.Sin(num2); float num6 = num3 * Mathf.Cos(num2); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(num4, num5, num6); EffectData val2 = new EffectData { scale = 1f, origin = component2.corePosition + val, rotation = Quaternion.LookRotation(component2.corePosition - (component2.corePosition + val)) }; if (Object.op_Implicit((Object)(object)NoctisAssets.armigerSwordParticle)) { EffectManager.SpawnEffect(NoctisAssets.armigerSwordParticle, val2, true); } BulletAttack val3 = new BulletAttack { bulletCount = 1u, aimVector = component2.corePosition - (component2.corePosition + val), origin = component2.corePosition + val, damage = damageInfo.damage * StaticValues.armigerDamageBonus, damageColorIndex = (DamageColorIndex)11, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)2), falloffModel = (FalloffModel)1, maxDistance = 10f, force = 0f, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = 0f, isCrit = component.RollCrit(), owner = ((Component)component).gameObject, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = 0f, radius = 1f, sniper = false, stopperMask = ((LayerIndex)(ref LayerIndex.noCollision)).mask, weapon = null, spreadPitchScale = 0f, spreadYawScale = 0f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FireRifle.hitEffectPrefab }; val3.Fire(); } } private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body) && Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody body = self.body; CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)body) && body.HasBuff(Buffs.vulnerabilityDebuff.buffIndex)) { damageInfo.damage += damageInfo.damage * (float)body.GetBuffCount(Buffs.vulnerabilityDebuff) * StaticValues.GSVulnerabilityDebuff; } } orig.Invoke(self, damageInfo); } private void CharacterBody_OnDeathStart(orig_OnDeathStart orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && self.baseNameToken == "TEAL_NOCTIS_BODY_NAME") { NoctisController component = ((Component)self).gameObject.GetComponent<NoctisController>(); if (Config.allowVoice.Value) { AkSoundEngine.PostEvent("NoctisDeath", ((Component)self).gameObject); } } } private void CharacterModel_Awake(orig_Awake orig, CharacterModel self) { orig.Invoke(self); if (((Object)((Component)self).gameObject).name.Contains("NoctisDisplay") && Config.allowVoice.Value) { AkSoundEngine.PostEvent("newNoctisEntrance", ((Component)self).gameObject); } } private void SurvivorCatalog_Init(orig_Init orig) { orig.Invoke(); foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs) { Debug.Log((object)((Object)allSurvivorDef.bodyPrefab).name); if (((Object)allSurvivorDef.bodyPrefab).name == "NoctisBody") { CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, NoctisAssets.mainAssetBundle.LoadAsset<GameObject>("noctisHumanoid"), 0, true); } } } private void GlobalEventManager_OnDamageDealt(DamageReport report) { bool flag = !Object.op_Implicit((Object)(object)report.attacker) || !Object.op_Implicit((Object)(object)report.attackerBody); } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { if (Object.op_Implicit((Object)(object)((self != null) ? self.healthComponent : null))) { orig.Invoke(self); if (self.HasBuff(Buffs.armorBuff)) { self.armor += StaticValues.dodgeArmor; } if (self.HasBuff(Buffs.counterBuff)) { self.armor += StaticValues.GSArmor; } if (self.HasBuff(Buffs.GSarmorBuff)) { self.armor += StaticValues.GSArmor; } } } private void CharacterModel_UpdateOverlays(orig_UpdateOverlays orig, CharacterModel self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && !Object.op_Implicit((Object)(object)self.body)) { } } private void OverlayFunction(Material overlayMaterial, bool condition, CharacterModel model) { if (model.activeOverlayCount < CharacterModel.maxOverlays && condition) { Material[] currentOverlays = model.currentOverlays; int activeOverlayCount = model.activeOverlayCount; model.activeOverlayCount = activeOverlayCount + 1; currentOverlays[activeOverlayCount] = overlayMaterial; } } } } namespace NoctisMod.SkillStates { internal class NoctisCharacterMain : GenericCharacterMain { private EntityStateMachine bodyStateMachine; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); bodyStateMachine = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Body"); } public override void ProcessJump() { float num = ((EntityState)this).characterMotor.jumpCount; ((GenericCharacterMain)this).ProcessJump(); float num2 = ((EntityState)this).characterMotor.jumpCount; if (num2 == num && ((BaseCharacterMain)this).hasCharacterMotor && ((BaseCharacterMain)this).hasInputBank && ((EntityState)this).isAuthority && ((ButtonState)(ref ((EntityState)this).inputBank.jump)).justPressed) { bodyStateMachine.SetNextState((EntityState)(object)new Dodge()); } } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); } } public class GreatswordAerial : BaseMeleeAttack { private float dropTimer; private GameObject slamIndicatorInstance; private bool hasDropped; public float dropForce = StaticValues.GSDropSpeed; public override void OnEnter() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_012d: Unknown result type (might be due to invalid IL or missing references) weaponDef = Noctis.greatswordSkillDef; hitboxName = "AOEHitbox"; damageType = DamageTypeCombo.op_Implicit((DamageType)0); damageCoefficient = StaticValues.GSDamage; procCoefficient = StaticValues.GSProc; pushForce = 300f; baseDuration = 1f; attackStartTime = 0.4f; attackEndTime = 0.9f; baseEarlyExitTime = 0.9f; hitStopDuration = 0.1f; attackRecoil = 0.75f; hitHopVelocity = 4f; swingSoundString = "GreatswordSwingSFX"; hitSoundString = ""; muzzleString = "SwordSwingDown"; swingEffectPrefab = NoctisAssets.noctisSwingEffectMedium; hitEffectPrefab = NoctisAssets.noctisHitEffect; impactSound = NoctisAssets.hitSoundEffect.index; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = Vector3.zero; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 1, -1f); base.OnEnter(); hasVulnerability = true; } public override void FixedUpdate() { dropTimer += Time.fixedDeltaTime; if (!hasDropped) { ((EntityState)this).characterMotor.velocity.y = 0f; } if (((EntityState)this).fixedAge >= baseDuration * attackStartTime * 0.25f && !Object.op_Implicit((Object)(object)slamIndicatorInstance)) { CreateIndicator(); } if (((EntityState)this).fixedAge >= baseDuration * attackStartTime && !hasDropped) { StartDrop(); } if (hasDropped && ((EntityState)this).isAuthority && !((EntityState)this).characterMotor.disableAirControlUntilCollision) { LandingImpact(); ((EntityState)this).outer.SetNextStateToMain(); } base.FixedUpdate(); } public override void Update() { ((EntityState)this).Update(); if (Object.op_Implicit((Object)(object)slamIndicatorInstance)) { UpdateSlamIndicator(); } } private void StartDrop() { hasDropped = true; ((EntityState)this).characterMotor.disableAirControlUntilCollision = true; ((EntityState)this).characterMotor.velocity.y = 0f - dropForce; } private void CreateIndicator() { if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab)) { slamIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab); slamIndicatorInstance.SetActive(true); } } private void UpdateSlamIndicator() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0064: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)slamIndicatorInstance)) { slamIndicatorInstance.transform.localScale = Vector3.one * StaticValues.GSSlamRadius * (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat; slamIndicatorInstance.transform.localPosition = ((EntityState)this).transform.position; } } private void LandingImpact() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //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_00d5: 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) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Expected O, but got Unknown AkSoundEngine.PostEvent("SlamSFX", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.1f; BlastAttack val = new BlastAttack(); val.radius = StaticValues.GSSlamRadius * (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat; val.procCoefficient = StaticValues.GSProc; val.position = ((EntityState)this).characterBody.footPosition; val.attacker = ((EntityState)this).gameObject; val.crit = ((BaseState)this).RollCrit(); val.baseDamage = ((EntityState)this).characterBody.damage * damageCoefficient * (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat; val.falloffModel = (FalloffModel)0; val.baseForce = pushForce * (1f + dropTimer); val.teamIndex = ((EntityState)this).teamComponent.teamIndex; val.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)2); val.attackerFiltering = (AttackerFiltering)2; for (int i = 0; i < attackAmount; i++) { val.Fire(); } for (int j = 0; j < 3; j++) { Vector3 origin = ((EntityState)this).characterBody.footPosition + Random.insideUnitSphere * (StaticValues.GSSlamRadius * (1f + dropTimer) * 0.5f); origin.y = ((EntityState)this).characterBody.footPosition.y; EffectManager.SpawnEffect(GroundSlam.slamEffectPrefab, new EffectData { origin = origin, scale = StaticValues.GSSlamRadius * (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat }, true); } } } protected override void PlayAttackAnimation() { ((EntityState)this).PlayCrossfade("FullBody, Override", "GSAerialSlash", "Attack.playbackRate", baseDuration, 0.05f); } protected override void PlaySwingEffect() { base.PlaySwingEffect(); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); } protected override void SetNextState() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { if (!hasFired) { FireAttack(); } NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 0, -1f); if (Object.op_Implicit((Object)(object)slamIndicatorInstance)) { slamIndicatorInstance.SetActive(false); } EntityState.Destroy((Object)(object)slamIndicatorInstance); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); GreatswordCombo nextState = new GreatswordCombo(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } public override void OnExit() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) base.OnExit(); NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 0, -1f); if (Object.op_Implicit((Object)(object)slamIndicatorInstance)) { slamIndicatorInstance.SetActive(false); } EntityState.Destroy((Object)(object)slamIndicatorInstance); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); } } public class GreatswordBackward : BaseMeleeAttack { public override void OnEnter() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) weaponDef = Noctis.greatswordSkillDef; hitboxName = "GreatswordBigHitbox"; damageType = DamageTypeCombo.op_Implicit((DamageType)0); damageCoefficient = StaticValues.GSDamage; procCoefficient = 1f; pushForce = 5000f; bonusForce = ((EntityState)this).characterBody.characterDirection.forward * pushForce; baseDuration = 1.8f; attackStartTime = 0.15f; attackEndTime = 0.45f; baseEarlyExitTime = 0.45f; hitStopDuration = 0.1f; attackRecoil = 0.75f; hitHopVelocity = 7f; swingSoundString = "SwordSwingSFX"; hitSoundString = ""; muzzleString = "SwordSwingLeft"; swingEffectPrefab = NoctisAssets.noctisSwingEffectLarge; hitEffectPrefab = NoctisAssets.noctisHitEffect; impactSound = NoctisAssets.hitSoundEffect.index; base.OnEnter(); animator.SetBool("releaseChargeSlash", true); hasVulnerability = true; AkSoundEngine.PostEvent("GreatswordSwingSFX", ((EntityState)this).gameObject); NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 1, -1f); } protected override void PlayAttackAnimation() { ((EntityState)this).PlayCrossfade("FullBody, Override", "GSChargeSlash", "Attack.playbackRate", baseDuration - baseEarlyExitTime, 0.05f); } protected override void PlaySwingEffect() { base.PlaySwingEffect(); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); } protected override void SetNextState() { if (((EntityState)this).isAuthority) { if (!hasFired) { FireAttack(); } GreatswordCombo nextState = new GreatswordCombo(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } public override void OnExit() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) base.OnExit(); NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 0, -1f); animator.SetBool("releaseChargeSlash", false); animator.SetBool("releaseChargeLeap", false); } } internal class GreatswordCounterSlam : BaseSkillState { public ExtraInputBankTest extrainputBankTest; private ExtraSkillLocator extraskillLocator; public NoctisController noctisCon; private float baseDuration = 0.8f; internal float radius; internal Vector3 moveVec; private float baseForce = 600f; public float procCoefficient = StaticValues.GSProc; private Animator animator; private CharacterModel characterModel; private Transform modelTransform; public GameObject blastEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/effects/SonicBoomEffect"); private float partialAttack; private float attackEndTime = 0.45f; private bool hasFired; private Vector3 direction; private int attackAmount; public override void OnEnter() { //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Expected O, but got Unknown ((BaseState)this).OnEnter(); noctisCon = ((EntityState)this).gameObject.GetComponent<NoctisController>(); extraskillLocator = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ExtraSkillLocator>(); extrainputBankTest = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ExtraInputBankTest>(); hasFired = false; animator = ((EntityState)this).GetModelAnimator(); animator.SetFloat("Attack.playbackRate", 1f); animator.SetBool("releaseCounterSlam", true); ((EntityState)this).PlayCrossfade("FullBody, Override", "GSDownSlam", "Attack.playbackRate", baseDuration, 0.05f); AkSoundEngine.PostEvent("NoctisHitSFX", ((EntityState)this).gameObject); AkSoundEngine.PostEvent("SlamSFX", ((EntityState)this).gameObject); AkSoundEngine.PostEvent("NoctisVoice", ((EntityState)this).gameObject); noctisCon.SetSwapTrue(baseDuration); radius = StaticValues.GSSlamRadius * ((BaseState)this).attackSpeedStat; attackAmount = (int)((BaseState)this).attackSpeedStat; if (attackAmount < 1) { attackAmount = 1; } partialAttack = ((BaseState)this).attackSpeedStat - (float)attackAmount; modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { animator = ((Component)modelTransform).GetComponent<Animator>(); characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(new GameObject()); val.duration = 0.3f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashBright"); TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(new GameObject()); val2.duration = 0.3f; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val2.destroyComponentOnEnd = true; val2.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashExpanded"); } NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.HiddenInvincibility.buffIndex, 1, 1f); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)5; } public override void FixedUpdate() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= baseDuration * attackEndTime * 1.3f && ((EntityState)this).inputBank.moveVector != Vector3.zero) { ((EntityState)this).outer.SetNextStateToMain(); } if (((EntityState)this).fixedAge > baseDuration * attackEndTime) { if (!hasFired) { FireAttack(); hasFired = true; } if (((EntityState)this).isAuthority) { if (extrainputBankTest.extraSkill1.down) { Warpstrike warpstrike = new Warpstrike(); warpstrike.weaponSwap = true; ((EntityState)this).outer.SetNextState((EntityState)(object)warpstrike); return; } if (((EntityState)this).inputBank.jump.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Jump()); return; } if (((EntityState)this).inputBank.skill1.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (((EntityState)this).inputBank.skill2.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (((EntityState)this).inputBank.skill3.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge()); return; } if (((EntityState)this).inputBank.skill4.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } } } if (((EntityState)this).fixedAge > baseDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void FireAttack() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0159: 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_0173: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 3; i++) { Vector3 origin = ((EntityState)this).characterBody.footPosition + Random.insideUnitSphere * radius / 2f; origin.y = ((EntityState)this).characterBody.footPosition.y; EffectManager.SpawnEffect(GroundSlam.slamEffectPrefab, new EffectData { origin = origin, scale = radius / 2f }, true); } if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack(); val.position = ((EntityState)this).characterBody.corePosition; val.baseDamage = ((BaseState)this).damageStat * StaticValues.GSCounterDamage; val.baseForce = baseForce * StaticValues.GSCounterDamage; val.radius = radius; val.attacker = ((EntityState)this).gameObject; val.inflictor = ((EntityState)this).gameObject; val.teamIndex = ((EntityState)this).teamComponent.teamIndex; val.crit = ((BaseState)this).RollCrit(); val.procChainMask = default(ProcChainMask); val.procCoefficient = procCoefficient; val.falloffModel = (FalloffModel)0; val.damageColorIndex = (DamageColorIndex)0; val.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)2); val.attackerFiltering = (AttackerFiltering)0; DamageAPI.AddModdedDamageType(val, Damage.noctisVulnerability); for (int j = 0; j < attackAmount; j++) { val.Fire(); } if (partialAttack > 0f) { val.baseDamage = ((BaseState)this).damageStat * partialAttack; val.procCoefficient = procCoefficient * partialAttack; val.Fire(); } } } public override void OnExit() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); if (((EntityState)this).characterBody.HasBuff(Buffs.GSarmorBuff)) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 0, -1f); } if (((EntityState)this).characterBody.HasBuff(Buffs.armorBuff)) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.armorBuff.buffIndex, 0, -1f); } if (((EntityState)this).characterBody.HasBuff(Buffs.counterBuff)) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.counterBuff.buffIndex, 0, -1f); } } } public class GreatswordFollowUpSlam : BaseSkillState { public NoctisController noctisCon; public ExtraInputBankTest extrainputBankTest; private ExtraSkillLocator extraskillLocator; public bool hasTeleported; public bool hasFired; public float baseDuration = 1f; public float attackStartTime = 0.4f; public float earlyExitTime = 0.2f; public float attackEndTime = 0.8f; private BlastAttack blastAttack; private Animator animator; private CharacterModel characterModel; private Transform modelTransform; private readonly BullseyeSearch search = new BullseyeSearch(); public CharacterBody Target; private Vector3 stillPosition; public override void OnEnter() { //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0222: 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_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); hasFired = false; hasTeleported = false; noctisCon = ((EntityState)this).gameObject.GetComponent<NoctisController>(); extraskillLocator = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ExtraSkillLocator>(); extrainputBankTest = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ExtraInputBankTest>(); ((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", 1f); AkSoundEngine.PostEvent("Dodge", ((EntityState)this).gameObject); AkSoundEngine.PostEvent("GreatswordSwingSFX", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { AkSoundEngine.PostEvent("NoctisVoice", ((EntityState)this).gameObject); } noctisCon.SetSwapTrue(baseDuration); ((EntityState)this).PlayCrossfade("FullBody, Override", "GSAerialSlash", "Attack.playbackRate", baseDuration, 0.05f); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { animator = ((Component)modelTransform).GetComponent<Animator>(); characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(new GameObject()); val.duration = 0.3f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashBright"); TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(new GameObject()); val2.duration = 0.3f; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val2.destroyComponentOnEnd = true; val2.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashExpanded"); } if (!Object.op_Implicit((Object)(object)Target)) { ((EntityState)this).outer.SetNextStateToMain(); return; } stillPosition = Target.transform.position; KinematicCharacterMotor motor = ((BaseCharacterController)((EntityState)this).characterMotor).Motor; Vector3 val3 = stillPosition + Vector3.up * 2f; Ray aimRay = ((BaseState)this).GetAimRay(); motor.SetPositionAndRotation(val3, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), true); } public override void OnExit() { //IL_0039: 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) ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); if (((EntityState)this).characterBody.HasBuff(Buffs.GSarmorBuff)) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 0, -1f); } if (((EntityState)this).characterBody.HasBuff(Buffs.armorBuff)) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.armorBuff.buffIndex, 0, -1f); } } public override void Update() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); if (((EntityState)this).age < baseDuration * attackStartTime) { Ray aimRay; if (Object.op_Implicit((Object)(object)Target.characterMotor)) { KinematicCharacterMotor motor = ((BaseCharacterController)Target.characterMotor).Motor; Vector3 val = stillPosition; aimRay = ((BaseState)this).GetAimRay(); motor.SetPositionAndRotation(val, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), true); } else if (Object.op_Implicit((Object)(object)Target.rigidbody)) { Target.rigidbody.MovePosition(stillPosition); } KinematicCharacterMotor motor2 = ((BaseCharacterController)((EntityState)this).characterMotor).Motor; Vector3 val2 = Target.transform.position + Vector3.up * 2f; aimRay = ((BaseState)this).GetAimRay(); motor2.SetPositionAndRotation(val2, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), true); } } public override void FixedUpdate() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= baseDuration * attackStartTime && !hasFired && ((EntityState)this).isAuthority) { hasFired = true; EffectManager.SimpleMuzzleFlash(NoctisAssets.noctisSwingEffectMedium, ((EntityState)this).gameObject, "SwordSwingDown", true); AkSoundEngine.PostEvent("NoctisHitSFX", ((Component)Target).gameObject); NetMessageExtensions.Send((INetMessage)(object)new TakeDamageRequest(((EntityState)this).characterBody.masterObjectId, Target.masterObjectId, ((BaseState)this).damageStat * StaticValues.GSDamage, Vector3.down, causeForce: true, vulnerability: true), (NetworkDestination)1); EffectManager.SpawnEffect(NoctisAssets.sonicboomEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position, scale = 2f, rotation = Quaternion.LookRotation(Vector3.down) }, true); } if (((EntityState)this).fixedAge >= baseDuration * earlyExitTime) { if (((EntityState)this).inputBank.skill3.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge()); return; } if (((EntityState)this).inputBank.jump.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Jump()); return; } } if (((EntityState)this).fixedAge >= baseDuration * attackEndTime * 1.3f && ((EntityState)this).inputBank.moveVector != Vector3.zero) { ((EntityState)this).outer.SetNextStateToMain(); } if (((EntityState)this).fixedAge >= baseDuration * attackEndTime) { if (extrainputBankTest.extraSkill1.down) { Warpstrike warpstrike = new Warpstrike(); warpstrike.weaponSwap = true; ((EntityState)this).outer.SetNextState((EntityState)(object)warpstrike); return; } if (((EntityState)this).inputBank.skill1.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (((EntityState)this).inputBank.skill2.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (((EntityState)this).inputBank.skill4.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } } if (((EntityState)this).fixedAge >= baseDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class GreatswordForward : BaseSkillState { public ExtraInputBankTest extrainputBankTest; private ExtraSkillLocator extraskillLocator; public NoctisController noctisCon; private float baseDuration = 2f; internal float radius; internal Vector3 moveVec; private float baseForce = 600f; public float procCoefficient = StaticValues.GSProc; private Animator animator; public GameObject blastEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/effects/SonicBoomEffect"); private float rollSpeed; private float partialAttack; private float SpeedCoefficient; public static float initialSpeedCoefficient = StaticValues.GSLeapSpeed; private float finalSpeedCoefficient = 0f; private float attackEndTime = 0.36f; private bool hasFired; private Vector3 direction; private int attackAmount; public override void OnEnter() { //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); noctisCon = ((EntityState)this).gameObject.GetComponent<NoctisController>(); extraskillLocator = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ExtraSkillLocator>(); extrainputBankTest = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ExtraInputBankTest>(); hasFired = false; animator = ((EntityState)this).GetModelAnimator(); animator.SetFloat("Attack.playbackRate", 1f); ((EntityState)this).PlayCrossfade("FullBody, Override", "GSLeapSlash", "Attack.playbackRate", baseDuration, 0.05f); radius = StaticValues.GSSlamRadius * ((BaseState)this).attackSpeedStat; attackAmount = (int)((BaseState)this).attackSpeedStat; if (attackAmount < 1) { attackAmount = 1; } partialAttack = ((BaseState)this).attackSpeedStat - (float)attackAmount; SpeedCoefficient = initialSpeedCoefficient; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).direction; direction = ((Vector3)(ref val)).normalized; direction.y = 0f; AkSoundEngine.PostEvent("GreatswordSwingSFX", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { AkSoundEngine.PostEvent("NoctisVoice", ((EntityState)this).gameObject); } noctisCon.SetSwapTrue(baseDuration); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)5; } private void RecalculateRollSpeed() { float num = ((BaseState)this).moveSpeedStat; if (((EntityState)this).characterBody.isSprinting) { num /= ((EntityState)this).characterBody.sprintingSpeedMultiplier; } float num2 = num / ((EntityState)this).characterBody.baseMoveSpeed * 0.67f; float num3 = num2 + 1f; rollSpeed = num3 * Mathf.Lerp(SpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / (baseDuration * attackEndTime)); } public override void FixedUpdate() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); RecalculateRollSpeed(); if (((EntityState)this).fixedAge <= baseDuration * attackEndTime) { Vector3 velocity = direction * rollSpeed; velocity.y = ((EntityState)this).characterMotor.velocity.y; ((EntityState)this).characterMotor.velocity = velocity; ((EntityState)this).characterDirection.forward = ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized; } if (((EntityState)this).fixedAge >= baseDuration * attackEndTime * 1.3f && ((EntityState)this).inputBank.moveVector != Vector3.zero) { ((EntityState)this).outer.SetNextStateToMain(); } if (((EntityState)this).fixedAge > baseDuration * attackEndTime) { if (!hasFired) { FireAttack(); hasFired = true; } if (((EntityState)this).isAuthority) { if (extrainputBankTest.extraSkill1.down) { Warpstrike warpstrike = new Warpstrike(); warpstrike.weaponSwap = true; ((EntityState)this).outer.SetNextState((EntityState)(object)warpstrike); return; } if (((EntityState)this).inputBank.jump.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Jump()); return; } if (((EntityState)this).inputBank.skill1.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (((EntityState)this).inputBank.skill2.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (((EntityState)this).inputBank.skill3.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge()); return; } if (((EntityState)this).inputBank.skill4.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } } } if (((EntityState)this).fixedAge > baseDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void FireAttack() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0159: 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_0173: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 3; i++) { Vector3 origin = ((EntityState)this).characterBody.footPosition + Random.insideUnitSphere * radius / 2f; origin.y = ((EntityState)this).characterBody.footPosition.y; EffectManager.SpawnEffect(GroundSlam.slamEffectPrefab, new EffectData { origin = origin, scale = radius / 2f }, true); } if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack(); val.position = ((EntityState)this).characterBody.corePosition; val.baseDamage = ((BaseState)this).damageStat * StaticValues.GSDamage; val.baseForce = baseForce * StaticValues.GSDamage; val.radius = radius; val.attacker = ((EntityState)this).gameObject; val.inflictor = ((EntityState)this).gameObject; val.teamIndex = ((EntityState)this).teamComponent.teamIndex; val.crit = ((BaseState)this).RollCrit(); val.procChainMask = default(ProcChainMask); val.procCoefficient = procCoefficient; val.falloffModel = (FalloffModel)0; val.damageColorIndex = (DamageColorIndex)0; val.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)2); val.attackerFiltering = (AttackerFiltering)0; DamageAPI.AddModdedDamageType(val, Damage.noctisVulnerability); for (int j = 0; j < attackAmount; j++) { val.Fire(); } if (partialAttack > 0f) { val.baseDamage = ((BaseState)this).damageStat * partialAttack; val.procCoefficient = procCoefficient * partialAttack; val.Fire(); } } } public override void OnExit() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); animator.SetBool("releaseChargeSlash", false); animator.SetBool("releaseChargeLeap", false); if (((EntityState)this).characterBody.HasBuff(Buffs.GSarmorBuff)) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 0, -1f); } if (((EntityState)this).characterBody.HasBuff(Buffs.armorBuff)) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.armorBuff.buffIndex, 0, -1f); } } } public class GreatswordNeutral : BaseSkillState { public enum DangerState { STARTBUFF, CHECKCOUNTER } public NoctisController noctisCon; public ExtraInputBankTest extrainputBankTest; private ExtraSkillLocator extraskillLocator; public Animator animator; private CharacterModel characterModel; private Transform modelTransform; private bool activateCounter; private int skillslot; public DangerState state; public DamageType damageType = (DamageType)256; public override void OnEnter() { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown ((BaseState)this).OnEnter(); noctisCon = ((EntityState)this).GetComponent<NoctisController>(); extraskillLocator = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ExtraSkillLocator>(); extrainputBankTest = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ExtraInputBankTest>(); animator = ((EntityState)this).GetModelAnimator(); animator.SetBool("releaseCounter", false); animator.SetBool("releaseCounterSlam", false); ((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", 1f); ((EntityState)this).PlayCrossfade("FullBody, Override", "GSCounterStance", "Attack.playbackRate", 1f, 0.05f); state = DangerState.STARTBUFF; HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); noctisCon.WeaponAppearR(1f, NoctisController.WeaponTypeR.GREATSWORD); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { animator = ((Component)modelTransform).GetComponent<Animator>(); characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(new GameObject()); val.duration = 0.3f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashBright"); TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(new GameObject()); val2.duration = 0.3f; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val2.destroyComponentOnEnd = true; val2.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashExpanded"); } if ((Object)(object)((EntityState)this).skillLocator.primary.skillDef == (Object)(object)Noctis.greatswordSkillDef) { skillslot = 1; } if ((Object)(object)((EntityState)this).skillLocator.secondary.skillDef == (Object)(object)Noctis.greatswordSkillDef) { skillslot = 2; } if ((Object)(object)((EntityState)this).skillLocator.special.skillDef == (Object)(object)Noctis.greatswordSkillDef) { skillslot = 4; } } private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Invalid comparison between Unknown and I4 //IL_0066: Unknown result type (might be due to invalid IL or missing references) if (damageInfo != null && Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>()) && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)2)) <= 0 && damageInfo.damage > 0f && self.body.HasBuff(Buffs.counterBuff.buffIndex) && (Object)(object)damageInfo.attacker != (Object)(object)self) { activateCounter = true; } orig.Invoke(self, damageInfo); } public override void OnExit() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) HealthComponent.TakeDamage -= new hook_TakeDamage(HealthComponent_TakeDamage); if (((EntityState)this).characterBody.HasBuff(Buffs.GSarmorBuff)) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 0, -1f); } if (((EntityState)this).characterBody.HasBuff(Buffs.armorBuff)) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.armorBuff.buffIndex, 0, -1f); } if (((EntityState)this).characterBody.HasBuff(Buffs.counterBuff)) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.counterBuff.buffIndex, 0, -1f); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); switch (state) { case DangerState.STARTBUFF: if (!((EntityState)this).characterBody.HasBuff(Buffs.counterBuff.buffIndex)) { if (NetworkServer.active) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.counterBuff.buffIndex, 1, -1f); } state = DangerState.CHECKCOUNTER; } break; case DangerState.CHECKCOUNTER: noctisCon.SetSwapTrue(1f); noctisCon.WeaponAppearR(1f, NoctisController.WeaponTypeR.GREATSWORD); if (activateCounter) { animator.SetBool("releaseCounterSlam", true); NetMessageExtensions.Send((INetMessage)(object)new ForceCounterState(((EntityState)this).characterBody.masterObjectId), (NetworkDestination)1); break; } ((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", 0.01f); if (((EntityState)this).inputBank.skill3.down) { animator.SetBool("releaseCounter", true); ((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge()); break; } if (((EntityState)this).inputBank.jump.down) { animator.SetBool("releaseCounter", true); ((EntityState)this).outer.SetNextState((EntityState)(object)new Jump()); break; } if (extrainputBankTest.extraSkill1.down) { Warpstrike warpstrike = new Warpstrike(); warpstrike.weaponSwap = true; ((EntityState)this).outer.SetNextState((EntityState)(object)warpstrike); animator.SetBool("releaseCounter", true); break; } if (skillslot == 1) { if (((EntityState)this).inputBank.skill1.down) { state = DangerState.CHECKCOUNTER; animator.SetBool("releaseCounter", false); animator.SetBool("releaseCounterSlam", false); } else if (!((EntityState)this).inputBank.skill1.down) { animator.SetBool("releaseCounter", true); ((EntityState)this).outer.SetNextStateToMain(); break; } } if (skillslot == 2) { if (((EntityState)this).inputBank.skill2.down) { state = DangerState.CHECKCOUNTER; animator.SetBool("releaseCounter", false); animator.SetBool("releaseCounterSlam", false); } else if (!((EntityState)this).inputBank.skill2.down) { animator.SetBool("releaseCounter", true); ((EntityState)this).outer.SetNextStateToMain(); break; } } if (skillslot == 4) { if (((EntityState)this).inputBank.skill4.down) { state = DangerState.CHECKCOUNTER; animator.SetBool("releaseCounter", false); animator.SetBool("releaseCounterSlam", false); } else if (!((EntityState)this).inputBank.skill4.down) { animator.SetBool("releaseCounter", true); ((EntityState)this).outer.SetNextStateToMain(); } } break; } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)5; } } public class GreatswordSwapAerial : BaseMeleeAttack { public CharacterBody target; private bool hasLaunched; public override void OnEnter() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: 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_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) weaponDef = Noctis.greatswordSkillDef; hitboxName = "GreatswordHitbox"; damageType = DamageTypeCombo.op_Implicit((DamageType)32); damageCoefficient = 1f; procCoefficient = StaticValues.GSProc; pushForce = 1000f; bonusForce = new Vector3(0f, 5000f, 0f); baseDuration = 1f; attackStartTime = 0.25f; attackEndTime = 0.85f; baseEarlyExitTime = 0.8f; hitStopDuration = 0.1f; attackRecoil = 0.75f; hitHopVelocity = 4f; swingSoundString = "GreatswordSwingSFX"; hitSoundString = ""; muzzleString = "SwordSwingUp"; swingEffectPrefab = NoctisAssets.noctisSwingEffectMedium; hitEffectPrefab = NoctisAssets.noctisHitEffect; impactSound = NoctisAssets.hitSoundEffect.index; NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 1, -1f); base.OnEnter(); hasVulnerability = true; if (isSwapped) { baseDuration = 0.7f; attackStartTime = 0f; attackEndTime = 0.6f; baseEarlyExitTime = 0.3f; } if (((EntityState)this).isAuthority) { KinematicCharacterMotor motor = ((BaseCharacterController)((EntityState)this).characterMotor).Motor; Vector3 val = target.healthComponent.body.transform.position - ((EntityState)this).characterDirection.forward * 2f; Ray aimRay = ((BaseState)this).GetAimRay(); motor.SetPositionAndRotation(val, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), true); } ((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", 1f); } public override void FixedUpdate() { //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_0069: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (stopwatch >= baseDuration * attackStartTime && !hasLaunched) { hasLaunched = true; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 20f); NetMessageExtensions.Send((INetMessage)(object)new TakeDamageRequest(((EntityState)this).characterBody.masterObjectId, target.masterObjectId, ((BaseState)this).damageStat * StaticValues.GSDamage, Vector3.up, causeForce: true, vulnerability: true), (NetworkDestination)1); } } protected override void PlayAttackAnimation() { if (isSwapped) { animator.Play("FullBody, Override.GSDP", -1, 0.25f); } else { ((EntityState)this).PlayCrossfade("FullBody, Override", "GSDP", "Attack.playbackRate", baseDuration - baseEarlyExitTime, 0.05f); } } protected override void PlaySwingEffect() { base.PlaySwingEffect(); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); } protected override void SetNextState() { //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) if (((EntityState)this).isAuthority) { if (!hasFired) { FireAttack(); } if (hasLaunched && target.healthComponent.health > 1f) { NetMessageExtensions.Send((INetMessage)(object)new ForceFollowUpState(((EntityState)this).characterBody.masterObjectId, target.masterObjectId), (NetworkDestination)1); return; } GreatswordCombo nextState = new GreatswordCombo(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } public override void OnExit() { //IL_0013: 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_0032: 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) base.OnExit(); NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 0, -1f); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); } } public class GreatswordSwapBackward : BaseSkillState { private Transform modelTransform; private CharacterModel characterModel; public NoctisController noctisCon; private float baseDuration = 0.7f; private Animator animator; private float chargeMultiplier; private float chargePercent; private float maxCharge = StaticValues.GSMaxCharge; private float damageMult; private float baseDistance = 2f; private RaycastHit raycastHit; private float hitDis; private GameObject areaIndicator; private float radius; private float baseRadius = StaticValues.GSChargeRadius; private Vector3 maxMoveVec; public override void OnEnter() { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Expected O, but got Unknown ((BaseState)this).OnEnter(); noctisCon = ((EntityState)this).GetComponent<NoctisController>(); animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(baseDuration, false); animator.SetBool("releaseChargeSlash", false); animator.SetBool("releaseChargeLeap", false); ((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", 1f); ((EntityState)this).PlayCrossfade("FullBody, Override", "GSCharge", "Attack.playbackRate", baseDuration, 0.05f); areaIndicator = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab); areaIndicator.SetActive(true); NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 1, -1f); chargeMultiplier = 1f; if (noctisCon.isSwapped) { chargeMultiplier = 3f; modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { animator = ((Component)modelTransform).GetComponent<Animator>(); characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(new GameObject()); val.duration = 0.3f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashBright"); TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(new GameObject()); val2.duration = 0.3f; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val2.destroyComponentOnEnd = true; val2.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashExpanded"); } } else { chargeMultiplier = 1f; } } public void ChargeCalc() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) chargePercent = ((EntityState)this).fixedAge * ((BaseState)this).attackSpeedStat / maxCharge; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; ((Ray)(ref aimRay)).origin = ((EntityState)this).characterBody.corePosition; Physics.Raycast(((Ray)(ref aimRay)).origin, ((Ray)(ref aimRay)).direction, ref raycastHit, baseDistance); hitDis = ((RaycastHit)(ref raycastHit)).distance; if (hitDis < baseDistance && hitDis > 0f) { baseDistance = hitDis; } damageMult = StaticValues.GSChargeDamage + StaticValues.GSChargeMultiplier * (chargePercent * StaticValues.GSChargeDamage); radius = (baseRadius * damageMult + 10f) / 4f; maxMoveVec = baseDistance * direction; areaIndicator.transform.localScale = Vector3.one * radius; areaIndicator.transform.localPosition = ((Ray)(ref aimRay)).origin + maxMoveVec; noctisCon.WeaponAppearR(3f, NoctisController.WeaponTypeR.GREATSWORD); } public override void FixedUpdate() { //IL_000e: 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) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterMotor.velocity = Vector3.zero; if (((EntityState)this).fixedAge < maxCharge) { if (((EntityState)this).inputBank.skill1.down && (Object)(object)((EntityState)this).skillLocator.primary.skillDef == (Object)(object)Noctis.greatswordSkillDef) { ChargeCalc(); return; } if (((EntityState)this).inputBank.skill2.down && (Object)(object)((EntityState)this).skillLocator.secondary.skillDef == (Object)(object)Noctis.greatswordSkillDef) { ChargeCalc(); return; } if (((EntityState)this).inputBank.skill4.down && (Object)(object)((EntityState)this).skillLocator.special.skillDef == (Object)(object)Noctis.greatswordSkillDef) { ChargeCalc(); return; } GreatswordSwapBackward2 greatswordSwapBackward = new GreatswordSwapBackward2(); greatswordSwapBackward.damageMult = damageMult; greatswordSwapBackward.radius = radius; ((EntityState)this).outer.SetNextState((EntityState)(object)greatswordSwapBackward); animator.SetBool("releaseChargeLeap", true); } else { GreatswordSwapBackward2 greatswordSwapBackward2 = new GreatswordSwapBackward2(); greatswordSwapBackward2.damageMult = damageMult; greatswordSwapBackward2.radius = radius; ((EntityState)this).outer.SetNextState((EntityState)(object)greatswordSwapBackward2); animator.SetBool("releaseChargeLeap", true); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)areaIndicator)) { areaIndicator.SetActive(false); } EntityState.Destroy((Object)(object)areaIndicator); } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(damageMult); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); damageMult = reader.ReadInt64(); } } internal class GreatswordSwapBackward2 : BaseSkillState { public NoctisController noctisCon; public ExtraInputBankTest extrainputBankTest; private ExtraSkillLocator extraskillLocator; private float baseDuration = 2f; internal float damageMult; internal float radius; internal Vector3 moveVec; private float baseForce = 600f; public float procCoefficient = StaticValues.GSProc; private Animator animator; public GameObject blastEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/effects/SonicBoomEffect"); private float rollSpeed; private float partialAttack; private float SpeedCoefficient; public static float initialSpeedCoefficient = StaticValues.GSLeapSpeed; private float finalSpeedCoefficient = 0f; private float attackStartTime = 0.1f; private float attackEndTime = 0.38f; private bool hasFired; private Vector3 direction; private int attackAmount; public override void OnEnter() { //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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00da: 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) ((BaseState)this).OnEnter(); noctisCon = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<NoctisController>(); extraskillLocator = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ExtraSkillLocator>(); extrainputBankTest = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ExtraInputBankTest>(); hasFired = false; animator = ((EntityState)this).GetModelAnimator(); animator.SetBool("releaseChargeLeap", true); animator.SetFloat("Attack.playbackRate", 1f); attackAmount = (int)((BaseState)this).attackSpeedStat; if (attackAmount < 1) { attackAmount = 1; } partialAttack = ((BaseState)this).attackSpeedStat - (float)attackAmount; SpeedCoefficient = initialSpeedCoefficient; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).direction; direction = ((Vector3)(ref val)).normalized; direction.y = 0f; AkSoundEngine.PostEvent("GreatswordSwingSFX", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { AkSoundEngine.PostEvent("NoctisVoice", ((EntityState)this).gameObject); } noctisCon.SetSwapTrue(baseDuration); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)5; } private void RecalculateRollSpeed() { float num = ((BaseState)this).moveSpeedStat; if (((EntityState)this).characterBody.isSprinting) { num /= ((EntityState)this).characterBody.sprintingSpeedMultiplier; } float num2 = num / ((EntityState)this).characterBody.baseMoveSpeed * 0.67f; float num3 = num2 + 1f; rollSpeed = num3 * Mathf.Lerp(SpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / (baseDuration * attackEndTime)); } public override void FixedUpdate() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_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_0065: 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_007c: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_010a: 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_0146: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge <= baseDuration * attackStartTime) { RecalculateRollSpeed(); Vector3 velocity = direction * rollSpeed / 2f; velocity.y = ((EntityState)this).characterMotor.velocity.y; ((EntityState)this).characterMotor.velocity = velocity; ((EntityState)this).characterDirection.forward = ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized; } if (((EntityState)this).fixedAge > baseDuration * attackStartTime && ((EntityState)this).fixedAge <= baseDuration * attackEndTime) { RecalculateRollSpeed(); Vector3 velocity2 = direction * rollSpeed; velocity2.y = ((EntityState)this).characterMotor.velocity.y; ((EntityState)this).characterMotor.velocity = velocity2; ((EntityState)this).characterDirection.forward = ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized; } if (((EntityState)this).fixedAge >= baseDuration * attackEndTime * 1.3f && ((EntityState)this).inputBank.moveVector != Vector3.zero) { ((EntityState)this).outer.SetNextStateToMain(); } if (((EntityState)this).fixedAge > baseDuration * attackEndTime) { if (!hasFired) { FireAttack(); hasFired = true; } if (((EntityState)this).isAuthority) { if (extrainputBankTest.extraSkill1.down) { Warpstrike warpstrike = new Warpstrike(); warpstrike.weaponSwap = true; ((EntityState)this).outer.SetNextState((EntityState)(object)warpstrike); return; } if (((EntityState)this).inputBank.jump.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Jump()); return; } if (((EntityState)this).inputBank.skill1.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (((EntityState)this).inputBank.skill2.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (((EntityState)this).inputBank.skill3.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge()); return; } if (((EntityState)this).inputBank.skill4.down) { ((EntityState)this).outer.SetNextStateToMain(); return; } if (((EntityState)this).inputBank.jump.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Jump()); return; } } } if (((EntityState)this).fixedAge > baseDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void FireAttack() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_013e: 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_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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 3; i++) { Vector3 origin = ((EntityState)this).characterBody.footPosition + Random.insideUnitSphere * radius / 2f; origin.y = ((EntityState)this).characterBody.footPosition.y; EffectManager.SpawnEffect(GroundSlam.slamEffectPrefab, new EffectData { origin = origin, scale = radius / 2f }, true); } if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack(); val.position = ((EntityState)this).characterBody.corePosition; val.baseDamage = ((BaseState)this).damageStat * damageMult; val.baseForce = baseForce * damageMult; val.radius = radius; val.attacker = ((EntityState)this).gameObject; val.inflictor = ((EntityState)this).gameObject; val.teamIndex = ((EntityState)this).teamComponent.teamIndex; val.crit = ((BaseState)this).RollCrit(); val.procChainMask = default(ProcChainMask); val.procCoefficient = procCoefficient; val.falloffModel = (FalloffModel)0; val.damageColorIndex = (DamageColorIndex)0; val.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)2); val.attackerFiltering = (AttackerFiltering)0; DamageAPI.AddModdedDamageType(val, Damage.noctisVulnerability); for (int j = 0; j < attackAmount; j++) { val.Fire(); } if (partialAttack > 0f) { val.baseDamage = ((BaseState)this).damageStat * damageMult * partialAttack; val.procCoefficient = procCoefficient * partialAttack; val.Fire(); } } } public override void OnExit() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); animator.SetBool("releaseChargeSlash", false); animator.SetBool("releaseChargeLeap", false); if (((EntityState)this).characterBody.HasBuff(Buffs.GSarmorBuff)) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.GSarmorBuff.buffIndex, 0, -1f); } if (((EntityState)this).characterBody.HasBuff(Buffs.armorBuff)) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.armorBuff.buffIndex, 0, -1f); } } } public class GreatswordSwapForward : BaseMeleeAttack { public override void OnEnter() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) weaponDef = Noctis.greatswordSkillDef; hitboxName = "GreatswordHitbox"; damageType = DamageTypeCombo.op_Implicit((DamageType)32); damageCoefficient = StaticValues.GSSwapForwardDamage; procCoefficient = StaticValues.GSProc; pushForce = 300f; baseDuration = 1f; attackStartTime = 0.33f; attackEndTime = 0.68f; baseEarlyExitTime = 0.68f; hitStopDuration = 0.1f; attackRecoil = 0.75f; hitHopVelocity = 7f;