Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Link v1.2.4
LinkMod.dll
Decompiled 2 years 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.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Commando.CommandoWeapon; using EntityStates.VagrantMonster; using EntityStates.Vulture.Weapon; using HG; using IL.RoR2; using KinematicCharacterController; using LinkMod.Modules; using LinkMod.Modules.Survivors; using LinkMod.SkillStates; using LinkMod.SkillStates.BaseStates; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using R2API; using R2API.Utils; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("LinkMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("LinkMod")] [assembly: AssemblyTitle("LinkMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [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 = new Color(0.12f, 0.39f, 0.25f, 1f); 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 LinkMod { [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.TheWarlock117.LinkMod", "LinkMod", "1.2.3")] [R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI" })] public class LinkPlugin : BaseUnityPlugin { public const string MODUID = "com.TheWarlock117.LinkMod"; public const string MODNAME = "LinkMod"; public const string MODVERSION = "1.2.3"; public const string developerPrefix = "CASEY"; internal List<SurvivorBase> Survivors = new List<SurvivorBase>(); public static LinkPlugin instance; private void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); instance = this; ModAssets.Initialize(); Config.ReadConfig(); States.RegisterStates(); Buffs.RegisterBuffs(); Projectiles.RegisterProjectiles(); Tokens.AddTokens(); ItemDisplays.PopulateDisplays(); new MyCharacter().Initialize(); 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 HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); } private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) UpdateValues component = ((Component)((Component)self).gameObject.GetComponent<CharacterBody>()).GetComponent<UpdateValues>(); if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)component)) { CharacterBody component2 = ((Component)self).gameObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody component3 = damageInfo.attacker.GetComponent<CharacterBody>(); GameObject val = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/CaptainBodyArmorBlockEffect"); EffectData val2 = new EffectData { origin = damageInfo.position, rotation = Util.QuaternionSafeLookRotation(component2.inputBank.aimDirection) }; if ((Object)(object)damageInfo.attacker == (Object)(object)damageInfo.inflictor) { if (component2.HasBuff(Buffs.shieldBuff) && component.ShouldBlock(component3.corePosition, 40f)) { damageInfo.damage = 0f; damageInfo.rejected = true; component.blockedAttacks++; if (Config.ShieldBlockEffect.Value) { EffectManager.SpawnEffect(val, val2, true); } Util.PlaySound("Guard_" + Random.Range(0, 3), ((Component)component2).gameObject); } } else if ((Object)(object)damageInfo.inflictor != (Object)null && component2.HasBuff(Buffs.shieldBuff) && component.ShouldBlock(damageInfo.inflictor.transform.position, 40f)) { damageInfo.damage = 0f; damageInfo.rejected = true; component.blockedAttacks++; if (Config.ShieldBlockEffect.Value) { EffectManager.SpawnEffect(val, val2, true); } Util.PlaySound("Guard_" + Random.Range(0, 3), ((Component)component2).gameObject); } } } orig.Invoke(self, damageInfo); if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)component)) { return; } CharacterBody component4 = ((Component)self).GetComponent<CharacterBody>(); SkillLocator component5 = ((Component)component4).GetComponent<SkillLocator>(); if (Object.op_Implicit((Object)(object)component5) && Object.op_Implicit((Object)(object)component4) && (Object)(object)component5.GetSkill((SkillSlot)3) != (Object)null) { if (component5.GetSkill((SkillSlot)3).skillDef.skillName == "CASEY_LINK_BODY_SPECIAL_MIPHA_NAME" && component5.GetSkill((SkillSlot)3).stock >= 1 && !component4.healthComponent.alive) { component4.inventory.GiveItem(ItemCatalog.FindItemIndex("ExtraLife"), 1); component4.inventory.GiveItem(ItemCatalog.FindItemIndex("UseAmbientLevel"), 1); Util.PlaySound("MiphasGraceUse", ((Component)component4).gameObject); component5.GetSkill((SkillSlot)3).RemoveAllStocks(); } if (component5.GetSkill((SkillSlot)3).skillDef.skillName == "CASEY_LINK_BODY_SPECIAL_DARUK_NAME" && component4.HasBuff(Buffs.darukBuff)) { component.blockDaruk = true; } } if (component.blockDaruk) { component.blockDaruk = false; component.darukBlockedAttacks++; component4.RemoveBuff(Buffs.darukBuff); component4.AddTimedBuffAuthority(Buffs.Immune.buffIndex, 3f); damageInfo.damage = 0f; damageInfo.rejected = true; component4.healthComponent.barrier = 0f; component5.GetSkill((SkillSlot)3).AddOneStock(); component5.GetSkill((SkillSlot)3).RemoveAllStocks(); SummonDaruk(component4); Util.PlaySound("Daruk_Shield_Break", ((Component)self).gameObject); Util.PlaySound("Daruk_Yell", ((Component)self).gameObject); AkSoundEngine.StopPlayingID(component.darukShieldPlayID); } } public void SummonDaruk(CharacterBody body) { //IL_0003: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) Ray val = default(Ray); ((Ray)(ref val)).direction = body.inputBank.aimDirection; ((Ray)(ref val)).origin = body.inputBank.aimOrigin; Ray val2 = val; ProjectileManager.instance.FireProjectile(Projectiles.darukPrefab, ((Ray)(ref val2)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val2)).direction), ((Component)body).gameObject, 0f, 0f, false, (DamageColorIndex)0, (GameObject)null, 0f); } } internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void LogDebug(object data) { _logSource.LogDebug(data); } internal static void LogError(object data) { _logSource.LogError(data); } internal static void LogFatal(object data) { _logSource.LogFatal(data); } internal static void LogInfo(object data) { _logSource.LogInfo(data); } internal static void LogMessage(object data) { _logSource.LogMessage(data); } internal static void LogWarning(object data) { _logSource.LogWarning(data); } } } namespace LinkMod.SkillStates { public class Cryonis : BaseSkillState { public static float damageCoefficient = StaticValues.cryonisDamageCoefficient; public static float baseDuration = 0.65f; public static float radius = 10f; private float duration; private float fireTime; private float timer; private bool hasFired; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; timer = 0f; fireTime = 0.35f * duration; ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: 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_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021d: 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_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: 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_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_0448: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) if (!hasFired && ((EntityState)this).isAuthority) { hasFired = true; Ray aimRay = ((BaseState)this).GetAimRay(); Util.PlaySound("Cryonis_Make", ((Component)((EntityState)this).characterBody).gameObject); new BlastAttack { attacker = ((Component)((EntityState)this).characterBody).gameObject, baseDamage = damageCoefficient * ((BaseState)this).damageStat, baseForce = 0f, bonusForce = Vector3.zero, attackerFiltering = (AttackerFiltering)2, crit = ((EntityState)this).characterBody.RollCrit(), damageColorIndex = (DamageColorIndex)3, damageType = DamageTypeCombo.op_Implicit((DamageType)256), falloffModel = (FalloffModel)0, inflictor = ((EntityState)this).gameObject, position = ((EntityState)this).characterBody.corePosition, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = 10f, losType = (LoSType)1, teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex }.Fire(); Quaternion val = Quaternion.Euler(-90f, 0f, 0f); ProjectileManager.instance.FireProjectile(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MageIcewallpillarProjectile"), ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * 10f, val, ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f); ProjectileManager.instance.FireProjectile(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MageIcewallpillarProjectile"), ((Ray)(ref aimRay)).origin + Quaternion.AngleAxis(36f, Vector3.up) * ((Ray)(ref aimRay)).direction * 10f, val, ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f); ProjectileManager.instance.FireProjectile(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MageIcewallpillarProjectile"), ((Ray)(ref aimRay)).origin + Quaternion.AngleAxis(72f, Vector3.up) * ((Ray)(ref aimRay)).direction * 10f, val, ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f); ProjectileManager.instance.FireProjectile(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MageIcewallpillarProjectile"), ((Ray)(ref aimRay)).origin + Quaternion.AngleAxis(108f, Vector3.up) * ((Ray)(ref aimRay)).direction * 10f, val, ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f); ProjectileManager.instance.FireProjectile(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MageIcewallpillarProjectile"), ((Ray)(ref aimRay)).origin + Quaternion.AngleAxis(144f, Vector3.up) * ((Ray)(ref aimRay)).direction * 10f, val, ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f); ProjectileManager.instance.FireProjectile(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MageIcewallpillarProjectile"), ((Ray)(ref aimRay)).origin + Quaternion.AngleAxis(180f, Vector3.up) * ((Ray)(ref aimRay)).direction * 10f, val, ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f); ProjectileManager.instance.FireProjectile(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MageIcewallpillarProjectile"), ((Ray)(ref aimRay)).origin + Quaternion.AngleAxis(216f, Vector3.up) * ((Ray)(ref aimRay)).direction * 10f, val, ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f); ProjectileManager.instance.FireProjectile(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MageIcewallpillarProjectile"), ((Ray)(ref aimRay)).origin + Quaternion.AngleAxis(252f, Vector3.up) * ((Ray)(ref aimRay)).direction * 10f, val, ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f); ProjectileManager.instance.FireProjectile(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MageIcewallpillarProjectile"), ((Ray)(ref aimRay)).origin + Quaternion.AngleAxis(288f, Vector3.up) * ((Ray)(ref aimRay)).direction * 10f, val, ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f); ProjectileManager.instance.FireProjectile(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MageIcewallpillarProjectile"), ((Ray)(ref aimRay)).origin + Quaternion.AngleAxis(324f, Vector3.up) * ((Ray)(ref aimRay)).direction * 10f, val, ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); Fire(); timer += Time.fixedDeltaTime; if (!(timer < duration)) { ((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; } } public class DaruksProtection : BaseSkillState { public static float damageCoefficient = 16f; public static float procCoefficient = 1f; public static float baseDuration = 5f; public static float throwForce = 80f; private float duration; private float fireTime; private bool hasFired; private bool hasExploded; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration; fireTime = 0.35f; animator = ((EntityState)this).GetModelAnimator(); ((EntityState)this).PlayAnimation("Gesture, Override", "ShieldGuard", "ThrowBomb.playbackRate", fireTime, 0f); ((EntityState)this).PlayCrossfade("Gesture, Override", "ThrowBomb", "ThrowBomb.playbackRate", fireTime, fireTime); Util.PlaySound("ShieldGuardUp", ((EntityState)this).gameObject); Util.PlaySound("AbilityReady", ((EntityState)this).gameObject); ((EntityState)this).characterBody.AddBuff(Buffs.darukBuff); ((EntityState)this).characterBody.healthComponent.AddBarrier(1f); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).outer.SetNextStateToMain(); } public void SummonDaruk() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(Projectiles.darukPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, 0f, 0f, false, (DamageColorIndex)0, (GameObject)null, 0f); } } 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; } } public class GliderState : LinkMain { private UpdateValues updateValues; private SkillLocator skillLocator; private Animator animator; private string[] paraEquipSounds = new string[3] { "Pl_Parashawl_Equip00", "Pl_Parashawl_Equip02", "Pl_Parashawl_Equip04" }; private string[] paraGlideSounds = new string[2] { "Pl_Parashawl_FlapFast00", "Pl_Parashawl_FlapFast01" }; private string[] paraUnEquipSounds = new string[3] { "Pl_Parashawl_UnEquip00", "Pl_Parashawl_UnEquip03", "Pl_Parashawl_UnEquip04" }; public override void OnEnter() { base.OnEnter(); updateValues = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<UpdateValues>(); skillLocator = ((Component)((EntityState)this).characterBody).GetComponent<SkillLocator>(); animator = ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent<Animator>(); updateValues.enteredParaglider = true; updateValues.playedFall = false; } public override void Update() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_0118: 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) base.Update(); ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.paragliderBuff.buffIndex, 0.1f); animator.Play("Glide", 2); updateValues.playedParaUnEquipSound = false; if (!updateValues.playedParaEquipSound) { Util.PlaySound(paraEquipSounds[Random.Range(0, 2)], ((Component)((EntityState)this).characterBody).gameObject); updateValues.playedParaEquipSound = true; } ((EntityState)this).characterBody.characterMotor.velocity = new Vector3(((EntityState)this).characterBody.characterMotor.velocity.x, -1f, ((EntityState)this).characterBody.characterMotor.velocity.z); if (((EntityState)this).characterBody.inputBank.skill2.down) { ((EntityState)this).characterBody.characterMotor.velocity = new Vector3(((EntityState)this).characterBody.characterMotor.velocity.x, 0f, ((EntityState)this).characterBody.characterMotor.velocity.z); } } public override void FixedUpdate() { base.FixedUpdate(); } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); if (updateValues.enteredParaglider && !((EntityState)this).characterBody.inputBank.skill2.down && (!((EntityState)this).characterBody.inputBank.jump.down || ((EntityState)this).characterBody.characterMotor.isGrounded) && !updateValues.playedFall) { animator.Play("Fall", 2); updateValues.playedFall = true; updateValues.playedParaEquipSound = false; if (!updateValues.playedParaUnEquipSound) { Util.PlaySound(paraUnEquipSounds[Random.Range(0, 2)], ((Component)((EntityState)this).characterBody).gameObject); updateValues.playedParaUnEquipSound = true; } } } } public class Magnesis : BaseSkillState { public static float duration = 6f; public static float radius = 30f; private float soundStopwatch; private float timer; private TeamFilter teamFilter; private RadialForce radialForce; private uint magnesisSoundLoopID; public override void OnEnter() { ((BaseState)this).OnEnter(); timer = 0f; if (Object.op_Implicit((Object)(object)((Component)((EntityState)this).characterBody).gameObject.GetComponent<TeamFilter>())) { teamFilter = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<TeamFilter>(); } else { teamFilter = ((Component)((EntityState)this).characterBody).gameObject.AddComponent<TeamFilter>(); } teamFilter.teamIndex = (TeamIndex)1; if (Object.op_Implicit((Object)(object)((Component)((EntityState)this).characterBody).gameObject.GetComponent<RadialForce>())) { radialForce = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<RadialForce>(); } else { radialForce = ((Component)((EntityState)this).characterBody).gameObject.AddComponent<RadialForce>(); } radialForce.forceMagnitude = -5000f; radialForce.radius = radius; radialForce.tetherVfxOrigin = null; soundStopwatch = 0f; } public override void OnExit() { ((EntityState)this).OnExit(); radialForce.radius = 0f; radialForce.forceMagnitude = 0f; Util.PlaySound("Magnesis_End", ((Component)((EntityState)this).characterBody).gameObject); } public override void FixedUpdate() { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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) //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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: 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_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((EntityState)this).FixedUpdate(); timer += Time.fixedDeltaTime; if (!((EntityState)this).isAuthority) { return; } if (((EntityState)this).inputBank.skill3.down && timer < duration) { if (soundStopwatch <= 0f) { magnesisSoundLoopID = Util.PlaySound("Magnesis_Start", ((Component)((EntityState)this).characterBody).gameObject); new BlastAttack { attacker = ((Component)((EntityState)this).characterBody).gameObject, baseDamage = 0f, baseForce = 0f, bonusForce = Vector3.zero, attackerFiltering = (AttackerFiltering)2, crit = ((EntityState)this).characterBody.RollCrit(), damageColorIndex = (DamageColorIndex)3, damageType = DamageTypeCombo.op_Implicit((DamageType)4194304), falloffModel = (FalloffModel)0, inflictor = ((EntityState)this).gameObject, position = ((EntityState)this).characterBody.corePosition, procChainMask = default(ProcChainMask), procCoefficient = 0.0001f, radius = radius, losType = (LoSType)1, teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex }.Fire(); soundStopwatch = 2f; } soundStopwatch -= Time.fixedDeltaTime; } else if (((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; } } public class MiphasGrace : BaseSkillState { public static float damageCoefficient = 16f; public static float procCoefficient = 1f; public static float baseDuration = 0.01f; public static float throwForce = 80f; private float duration; private float fireTime; private Animator animator; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration; fireTime = 0.35f * duration; } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { SkillLocator component = PlayerCharacterMasterController.instances[0].master.GetBodyObject().GetComponent<SkillLocator>(); component.GetSkill((SkillSlot)3).AddOneStock(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void SummonMipha() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(Projectiles.miphaPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, 0f, 0f, false, (DamageColorIndex)0, (GameObject)null, 0f); } } 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; } } public class RevalisGale : BaseSkillState { public static float damageCoefficient = StaticValues.revaliDamageCoefficient; public static float procCoefficient = 1f; public static float baseDuration = 0.5f; public static float throwForce = 80f; private float duration; private float fireTime; private float timer; private float movementSpeedCoefficient; private bool fired; private bool readySoundPlayed; private bool shouldLaunch; private Animator animator; public static AnimationCurve speedCoefficientCurve; public override void OnEnter() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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) //IL_0083: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00cb: 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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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) ((BaseState)this).OnEnter(); duration = baseDuration; fireTime = 0.1f; timer = 0f; readySoundPlayed = false; fired = false; shouldLaunch = false; new BlastAttack { attacker = ((Component)((EntityState)this).characterBody).gameObject, baseDamage = ((BaseState)this).damageStat * damageCoefficient, baseForce = 5000f, bonusForce = Vector3.zero, attackerFiltering = (AttackerFiltering)2, crit = ((EntityState)this).characterBody.RollCrit(), damageColorIndex = (DamageColorIndex)3, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)0, inflictor = ((EntityState)this).gameObject, position = ((EntityState)this).characterBody.corePosition, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = 20f, losType = (LoSType)1, teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex }.Fire(); CharacterMotor characterMotor = ((EntityState)this).characterBody.characterMotor; ((BaseCharacterController)characterMotor).Motor.ForceUnground(0.1f); characterMotor.ApplyForce(Vector3.up * 6000f * (((EntityState)this).characterBody.rigidbody.mass / 100f), true, false); } public override void OnExit() { ((EntityState)this).OnExit(); if (shouldLaunch) { SummonRevali(); } } private void Fire() { if (!shouldLaunch) { shouldLaunch = true; } if (!readySoundPlayed) { Util.PlaySound("AbilityReady", ((EntityState)this).gameObject); Util.PlaySound("Revali_TakeOff", ((EntityState)this).gameObject); readySoundPlayed = true; } } private void SummonRevali() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(Projectiles.revaliPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, 0f, 0f, false, (DamageColorIndex)0, (GameObject)null, 0f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); Fire(); fired = true; timer += Time.fixedDeltaTime; if (!(timer < duration)) { ((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; } } public class Shield : LinkMain { public static float procCoefficient = 1f; public static float baseDuration = 10f; private float duration; private float fireTime; private float timer; private float animationTimer; private bool hasFired; private string muzzleString; private ChildLocator childLocator; private HurtBoxGroup hurtBoxGroup; public override void OnEnter() { base.OnEnter(); duration = baseDuration; fireTime = 20f * duration; ((EntityState)this).characterBody.SetAimTimer(1000000f); timer = 0f; animationTimer = 1f; childLocator = ((EntityState)this).GetModelChildLocator(); ((EntityState)this).PlayAnimation("Gesture, Override", "ShieldGuard"); Util.PlaySound("Weapon_Shield_Metal_Equip0" + Random.Range(0, 2), ((EntityState)this).gameObject); Util.PlaySound("ShieldGuardUp", ((EntityState)this).gameObject); } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); if (!hasFired) { hasFired = true; } ((EntityState)this).characterBody.SetAimTimer(1f); ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); Util.PlaySound("Weapon_Shield_Metal_UnEquip0" + Random.Range(0, 2), ((EntityState)this).gameObject); } public override void FixedUpdate() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (animationTimer > 0f) { animationTimer -= Time.fixedDeltaTime; } else { animationTimer = 2f; ((EntityState)this).PlayAnimation("Gesture, Override", "ShieldGuard"); base.OnEnter(); } timer += Time.fixedDeltaTime; if (!((EntityState)this).inputBank.jump.down && ((EntityState)this).inputBank.skill2.down) { ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.Slow80.buffIndex, 0.1f); ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.shieldBuff.buffIndex, 0.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)2; } } public class Shoot : LinkMain { public static float damageCoefficient = 1f; public static float procCoefficient = 1f; public static float baseDuration = 1.5f; public static float force = 30f; public static float recoil = 3f; public static float range = 256f; public static GameObject tracerEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/TracerGoldGat"); public static GameObject projectilePrefab; private float duration; private float fireTime; private float arrowSpeed; private float timer; private bool hasFired; private string muzzleString; public override void OnEnter() { base.OnEnter(); duration = baseDuration; fireTime = 0.2f * duration; ((EntityState)this).characterBody.SetAimTimer(1000000f); muzzleString = "Muzzle"; timer = 0f; arrowSpeed = 30f; string[] array = new string[6] { "Bow_Draw0", "Bow_Draw1", "Bow_Draw2", "Bow_Draw3", "Bow_Draw4", "Bow_Draw5" }; Util.PlaySound(array[Random.Range(0, 5)], ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture, Override", "BowDraw", "ShootGun.playbackRate", 1.8f, 0f); } public override void OnExit() { //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnExit(); ((EntityState)this).characterBody.SetAimTimer(1f); if (!hasFired) { hasFired = true; ((EntityState)this).characterBody.AddSpreadBloom(1.5f); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); string[] array = new string[4] { "Bow_Release1", "Bow_Release2", "Bow_Release3", "Bow_Release5" }; Util.PlaySound(array[Random.Range(0, 3)], ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture, Override", "BowShoot", "ShootGun.playbackRate", 1.8f, 0f); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(Projectiles.bombArrowPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 1500f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, arrowSpeed); } } } public override void FixedUpdate() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); timer += Time.fixedDeltaTime; if (((EntityState)this).inputBank.skill2.down) { if (((EntityState)this).fixedAge <= duration && ((EntityState)this).isAuthority) { arrowSpeed += timer * 5f; } ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.Slow80.buffIndex, 0.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)2; } } public class ShootFast : LinkMain { public static float damageCoefficient = StaticValues.bowDamageCoefficient / 2f; public static float procCoefficient = 1f; public static float baseDuration = 1.5f; public static float force = 30f; public static float recoil = 3f; public static float range = 256f; public static GameObject tracerEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/TracerGoldGat"); public static GameObject projectilePrefab; private float duration; private float fireTime; private float timer; private bool hasFired; private string muzzleString; public override void OnEnter() { base.OnEnter(); duration = Shoot.baseDuration / 2f; fireTime = 0.2f * duration; ((EntityState)this).characterBody.SetAimTimer(1000000f); muzzleString = "Muzzle"; timer = 0f; damageCoefficient = StaticValues.bowDamageCoefficient / 2f; force = 30f; string[] array = new string[6] { "Bow_Draw0", "Bow_Draw1", "Bow_Draw2", "Bow_Draw3", "Bow_Draw4", "Bow_Draw5" }; Util.PlaySound(array[Random.Range(0, 5)], ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture, Override", "BowDraw", "ShootGun.playbackRate", 0.9f, 0f); } public override void OnExit() { //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnExit(); ((EntityState)this).characterBody.SetAimTimer(1f); if (!hasFired) { hasFired = true; ((EntityState)this).characterBody.AddSpreadBloom(1.5f); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); string[] array = new string[4] { "Bow_Release1", "Bow_Release2", "Bow_Release3", "Bow_Release5" }; Util.PlaySound(array[Random.Range(0, 3)], ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture, Override", "BowShoot", "ShootGun.playbackRate", 1.8f, 0f); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileDamage component = Projectiles.fireArrowPrefab.GetComponent<ProjectileDamage>(); component.damageType = DamageTypeCombo.op_Implicit((DamageType)128); ProjectileManager.instance.FireProjectile(Projectiles.fireArrowPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 39f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, force); } } } public override void FixedUpdate() { base.FixedUpdate(); timer += Time.fixedDeltaTime; if (((EntityState)this).inputBank.skill2.down) { if (((EntityState)this).fixedAge <= duration && ((EntityState)this).isAuthority) { damageCoefficient += timer * 0.1f; force += timer * 10f; } if (timer >= 1f && timer % 1f == 0f) { Util.PlaySound("FireArrow_Charge_Complete", ((EntityState)this).gameObject); } } } 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; } } public class ShootTri : LinkMain { public static float damageCoefficient = StaticValues.bowDamageCoefficient / 3f; public static float procCoefficient = 1f; public static float baseDuration = 1.5f; public static float force = 30f; public static float recoil = 3f; public static float range = 256f; public static GameObject tracerEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/TracerGoldGat"); public static GameObject projectilePrefab; private float duration; private float arrowAngleOffset = 180f; private float arrowAngleOffsetRadians; private float fireTime; private float timer; private bool hasFired; private string muzzleString; public override void OnEnter() { base.OnEnter(); duration = baseDuration; fireTime = 0.2f * duration; ((EntityState)this).characterBody.SetAimTimer(1000000f); muzzleString = "Muzzle"; timer = 0f; damageCoefficient = StaticValues.bowDamageCoefficient / 3f; force = 31f; string[] array = new string[6] { "Bow_Draw0", "Bow_Draw1", "Bow_Draw2", "Bow_Draw3", "Bow_Draw4", "Bow_Draw5" }; Util.PlaySound(array[Random.Range(0, 5)], ((EntityState)this).gameObject); arrowAngleOffsetRadians = arrowAngleOffset * (MathF.PI / 180f); ((EntityState)this).PlayAnimation("Gesture, Override", "BowEquip", "ShootGun.playbackRate", 1.8f, 0f); ((EntityState)this).PlayAnimation("Gesture, Override", "BowDraw", "ShootGun.playbackRate", 1.8f, 0f); } public override void OnExit() { //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_00c9: 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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnExit(); ((EntityState)this).characterBody.SetAimTimer(1f); if (!hasFired) { hasFired = true; ((EntityState)this).characterBody.AddSpreadBloom(1.5f); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); string[] array = new string[4] { "Bow_Release1", "Bow_Release2", "Bow_Release3", "Bow_Release5" }; ((EntityState)this).PlayAnimation("Gesture, Override", "BowShoot", "ShootGun.playbackRate", 1.8f, 0f); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileDamage component = Projectiles.iceArrowPrefab.GetComponent<ProjectileDamage>(); component.damageType = DamageTypeCombo.op_Implicit((DamageType)256); ProjectileManager.instance.FireProjectile(Projectiles.iceArrowPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 41f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, force); Util.PlaySound(array[Random.Range(0, 3)], ((EntityState)this).gameObject); Vector3 val = Quaternion.Euler(0f, 0f - arrowAngleOffsetRadians, 0f) * ((Ray)(ref aimRay)).direction; ProjectileManager.instance.FireProjectile(Projectiles.iceArrowPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(val), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 41f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, force); Util.PlaySound(array[Random.Range(0, 3)], ((EntityState)this).gameObject); Vector3 val2 = Quaternion.Euler(0f, arrowAngleOffsetRadians, 0f) * ((Ray)(ref aimRay)).direction; ProjectileManager.instance.FireProjectile(Projectiles.iceArrowPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(val2), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 41f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, force); Util.PlaySound(array[Random.Range(0, 3)], ((EntityState)this).gameObject); } } } public override void FixedUpdate() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); timer += Time.fixedDeltaTime; if (((EntityState)this).inputBank.skill2.down) { if (((EntityState)this).fixedAge <= duration && ((EntityState)this).isAuthority) { damageCoefficient += timer * 0.1f; force += timer * 5f; } ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.Slow80.buffIndex, 0.1f); if (timer == 1f) { Util.PlaySound("IceArrow_Charge_Complete", ((EntityState)this).gameObject); } if (timer % 5f == 0f) { Util.PlaySound("IceArrow_Charge_Complete", ((EntityState)this).gameObject); } } } 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; } } public class SlashCombo : BaseMeleeAttack { public override void OnEnter() { //IL_000e: 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_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) hitboxName = "Sword"; damageType = (DamageType)0; damageCoefficient = StaticValues.swordDamageCoefficient; procCoefficient = 1f; pushForce = 300f; bonusForce = Vector3.zero; baseDuration = 1f; attackStartTime = 0.2f; attackEndTime = 0.4f; baseEarlyExitTime = 0.4f; hitStopDuration = 0.012f; attackRecoil = 0.5f; hitHopVelocity = 4f; hitSoundString = ""; muzzleString = ((swingIndex % 2 == 0) ? "SwingLeft" : "SwingRight"); swingEffectPrefab = ModAssets.swordSwingEffect; hitEffectPrefab = ModAssets.swordHitImpactEffect; impactSound = ModAssets.swordHitSoundEvent.index; base.OnEnter(); } protected override void PlayAttackAnimation() { base.PlayAttackAnimation(); } protected override void PlaySwingEffect() { base.PlaySwingEffect(); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); } protected override void SetNextState() { int num = swingIndex; num = ((num < 3) ? (num + 1) : 0); ((EntityState)this).outer.SetNextState((EntityState)(object)new SlashCombo { swingIndex = num }); } public override void OnExit() { base.OnExit(); } } public class Stasis : BaseSkillState { public static float baseDuration = 5f; public static float radius = 10f; private float duration; private float fireTime; private float timer; private bool hasFired; private Animator animator; public override void OnEnter() { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration; timer = 0f; ((EntityState)this).characterBody.SetAimTimer(2f); Util.PlaySound("Stasis_Start", ((Component)((EntityState)this).characterBody).gameObject); ((EntityState)this).characterBody.characterMotor.useGravity = false; ((Behaviour)((EntityState)this).characterBody.inputBank).enabled = false; ((EntityState)this).characterBody.characterMotor.velocity = Vector3.zero; ((EntityState)this).characterBody.ClearTimedBuffs(Buffs.shieldBuff); } public override void OnExit() { ((EntityState)this).OnExit(); Util.PlaySound("Stasis_End", ((Component)((EntityState)this).characterBody).gameObject); ((EntityState)this).characterBody.characterMotor.useGravity = true; ((Behaviour)((EntityState)this).characterBody.inputBank).enabled = true; } private void Fire() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) if (!hasFired && ((EntityState)this).isAuthority) { hasFired = true; new BlastAttack { attacker = ((Component)((EntityState)this).characterBody).gameObject, baseDamage = 0f, baseForce = 0f, bonusForce = Vector3.zero, attackerFiltering = (AttackerFiltering)3, crit = ((EntityState)this).characterBody.RollCrit(), damageColorIndex = (DamageColorIndex)3, damageType = DamageTypeCombo.op_Implicit((DamageType)256), falloffModel = (FalloffModel)0, inflictor = ((EntityState)this).gameObject, position = ((EntityState)this).characterBody.corePosition, procChainMask = default(ProcChainMask), procCoefficient = 2.5f, radius = 0.1f, losType = (LoSType)1, teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex }.Fire(); if (Config.StasisTimerSound.Value) { Util.PlaySound("Stasis_Timer_Full", ((Component)((EntityState)this).characterBody).gameObject); } ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.Immune.buffIndex, 5f); ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.CrocoRegen.buffIndex, 5f); } } public override void FixedUpdate() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); Fire(); timer += Time.fixedDeltaTime; if (timer < duration) { ((EntityState)this).characterBody.characterMotor.velocity = Vector3.zero; } else { ((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; } } public class ThrowBomb : LinkMain { public static float damageCoefficient = 1f; public static float procCoefficient = 1f; public static float baseDuration = 0.65f; public static float throwForce = 50f; private float duration; private float fireTime; private bool hasFired; private Animator animator; public override void OnEnter() { base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.35f * duration; ((EntityState)this).characterBody.SetAimTimer(1000000f); animator = ((EntityState)this).GetModelAnimator(); Util.PlaySound("BombDraw", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture, Override", "DrawBomb", "ThrowBomb.playbackRate", duration, 0f); } public override void OnExit() { //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnExit(); ((EntityState)this).characterBody.SetAimTimer(1f); if (hasFired) { return; } hasFired = true; if (((EntityState)this).inputBank.jump.down && ((EntityState)this).characterMotor.velocity.y < 0f && !((EntityState)this).characterMotor.isGrounded) { if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Quaternion val = default(Quaternion); ((Quaternion)(ref val))..ctor(0f, 0f, 0f, 0f); ProjectileManager.instance.FireProjectile(Projectiles.bombPrefab, ((Ray)(ref aimRay)).origin, val, ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 1500f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 0f); } } else if (((EntityState)this).isAuthority) { Ray aimRay2 = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(Projectiles.bombPrefab, ((Ray)(ref aimRay2)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay2)).direction), ((EntityState)this).gameObject, damageCoefficient * ((BaseState)this).damageStat, 1500f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, throwForce); } ((EntityState)this).PlayAnimation("Gesture, Override", "ThrowBomb", "ThrowBomb.playbackRate", duration, 0f); } public override void FixedUpdate() { base.FixedUpdate(); } 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; } } public class UrbosasFury : BaseSkillState { public static float damageCoefficient = StaticValues.urbosaDamageCoefficient; public static float procCoefficient = 1f; public static float baseDuration = 0.51f; public static float throwForce = 80f; public float blastAttackRadius = 50f; public float blastAttackProcCoefficient = 0.5f; public float blastAttackDamageCoefficient = 8f; public float blastAttackForce = 50f; private float duration; private float fireTime; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration; fireTime = 0.5f; SummonUrbosa(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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_0058: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) new BlastAttack { attacker = ((Component)((EntityState)this).characterBody).gameObject, baseDamage = ((BaseState)this).damageStat * damageCoefficient, baseForce = blastAttackForce, bonusForce = Vector3.zero, attackerFiltering = (AttackerFiltering)2, crit = ((EntityState)this).characterBody.RollCrit(), damageColorIndex = (DamageColorIndex)3, damageType = DamageTypeCombo.op_Implicit((DamageType)16777216), falloffModel = (FalloffModel)0, inflictor = ((EntityState)this).gameObject, position = ((EntityState)this).characterBody.corePosition, procChainMask = default(ProcChainMask), procCoefficient = blastAttackProcCoefficient, radius = 150f, losType = (LoSType)1, teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex }.Fire(); EffectData val = new EffectData(); val.origin = ((EntityState)this).characterBody.corePosition; val.SetHurtBoxReference(((EntityState)this).characterBody.mainHurtBox); GameObject val2 = PrefabAPI.InstantiateClone(FireMegaNova.novaEffectPrefab, "urbosaExplosion"); ShakeEmitter val3 = val2.AddComponent<ShakeEmitter>(); val3.duration = 0f; EffectManager.SpawnEffect(val2, val, true); Util.PlaySound("Urbosa_Lightning", ((EntityState)this).gameObject); Util.PlaySound("Urbosa_Yell", ((EntityState)this).gameObject); Util.PlaySound(FireMegaNova.novaSoundString, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void SummonUrbosa() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = Projectiles.urbosaPrefab; val.position = ((Ray)(ref aimRay)).origin; val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.owner = ((EntityState)this).gameObject; val.damage = 0f; val.force = 0f; val.crit = false; val.damageColorIndex = (DamageColorIndex)0; val.target = null; ((FireProjectileInfo)(ref val)).speedOverride = 0f; ((FireProjectileInfo)(ref val)).fuseOverride = 1E-05f; FireProjectileInfo val2 = val; val2.useFuseOverride = true; val2.useSpeedOverride = true; ProjectileManager.instance.FireProjectile(val2); } } 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; } } } namespace LinkMod.SkillStates.BaseStates { public class BaseMeleeAttack : BaseSkillState { public int swingIndex; protected string hitboxName = "Sword"; protected DamageType damageType = (DamageType)0; protected float damageCoefficient = StaticValues.swordDamageCoefficient; protected float procCoefficient = 1f; protected float pushForce = 0f; protected Vector3 bonusForce = Vector3.zero; protected float baseDuration = 1f; protected float attackStartTime = 0.2f; protected float attackEndTime = 0.4f; protected float baseEarlyExitTime = 0.4f; protected float hitStopDuration = 0.012f; protected float attackRecoil = 0.75f; protected float hitHopVelocity = 4f; protected bool cancelled = false; private float projectileForce = 60f; private float projectileDamageCoef = StaticValues.swordDamageCoefficient / 2f; protected string hitSoundString = "SwordOnHit"; protected string muzzleString = "SwingCenter"; protected GameObject swingEffectPrefab; protected GameObject hitEffectPrefab; protected NetworkSoundEventIndex impactSound; private float earlyExitTime; public float duration; private bool hasFired; private float hitPauseTimer; private OverlapAttack attack; protected bool inHitPause; private bool hasHopped; protected float stopwatch; protected Animator animator; private HitStopCachedState hitStopCachedState; private Vector3 storedVelocity; public override void OnEnter() { //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; earlyExitTime = baseEarlyExitTime / ((BaseState)this).attackSpeedStat; hasFired = false; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); animator.SetBool("attacking", true); HitBoxGroup hitBoxGroup = null; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName); } PlayAttackAnimation(); attack = new OverlapAttack(); attack.damageType = DamageTypeCombo.op_Implicit(damageType); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = damageCoefficient * ((BaseState)this).damageStat; attack.procCoefficient = procCoefficient; attack.hitEffectPrefab = hitEffectPrefab; attack.forceVector = bonusForce; attack.pushAwayForce = pushForce; attack.hitBoxGroup = hitBoxGroup; attack.isCrit = ((BaseState)this).RollCrit(); attack.impactSound = impactSound; } protected virtual void PlayAttackAnimation() { ((EntityState)this).PlayCrossfade("Gesture, Override", "Sword" + (1 + swingIndex), "Slash.playbackRate", duration, 0.05f); } public override void OnExit() { if (!hasFired && !cancelled) { FireAttack(); } ((EntityState)this).OnExit(); animator.SetBool("attacking", false); } protected virtual void PlaySwingEffect() { EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, muzzleString, true); } protected virtual void OnHitEnemyAuthority() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound(hitSoundString, ((EntityState)this).gameObject); if (!hasHopped) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded && hitHopVelocity > 0f) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hitHopVelocity); } hasHopped = true; } if (!inHitPause && hitStopDuration > 0f) { storedVelocity = ((EntityState)this).characterMotor.velocity; hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "Slash.playbackRate"); hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat; inHitPause = true; } } private void FireAttack() { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) if ((!((EntityState)this).inputBank.jump.down || !(((EntityState)this).characterMotor.velocity.y < 0f)) && !hasFired) { hasFired = true; PlayAttackSound(); if (((EntityState)this).characterBody.healthComponent.combinedHealth / ((EntityState)this).characterBody.healthComponent.fullCombinedHealth >= 0.9f && ((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(FireWindblade.projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, projectileDamageCoef * ((BaseState)this).damageStat, 40f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, projectileForce); } if (((EntityState)this).isAuthority) { PlaySwingEffect(); ((BaseState)this).AddRecoil(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil); } if (((EntityState)this).isAuthority && attack.Fire((List<HurtBox>)null)) { OnHitEnemyAuthority(); } } } private void PlayAttackSound() { if (Random.Range(1, 3) == 1) { Util.PlayAttackSpeedSound("SwordAttack" + (1 + swingIndex) + "_" + Random.Range(1, 3), ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); } Util.PlayAttackSpeedSound("Sword_Swing" + (1 + swingIndex), ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (swingIndex == 3) { Util.PlayAttackSpeedSound("Sword_Swing2", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); } } protected virtual void SetNextState() { int num = swingIndex; num = ((num < 3) ? (num + 1) : 0); ((EntityState)this).outer.SetNextState((EntityState)(object)new BaseMeleeAttack { swingIndex = num }); } public override void FixedUpdate() { //IL_0037: 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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer <= 0f && inHitPause) { ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); inHitPause = false; ((EntityState)this).characterMotor.velocity = storedVelocity; } if (!inHitPause) { stopwatch += Time.fixedDeltaTime; } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat("Swing.playbackRate", 0f); } } if (stopwatch >= duration * attackStartTime && stopwatch <= duration * attackEndTime) { FireAttack(); } if (stopwatch >= duration - earlyExitTime && ((EntityState)this).isAuthority && ((EntityState)this).inputBank.skill1.down) { if (!hasFired) { FireAttack(); } SetNextState(); } else if (stopwatch >= duration && ((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)1; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(swingIndex); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); swingIndex = reader.ReadInt32(); } } public class DeathState : GenericCharacterDeath { private Vector3 previousPosition; private float upSpeedVelocity; private float upSpeed; private Animator modelAnimator; public override bool shouldAutoDestroy => false; public override void OnEnter() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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_007e: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).OnEnter(); Vector3 val = Vector3.up * 3f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { val += ((EntityState)this).characterMotor.velocity; ((Behaviour)((EntityState)this).characterMotor).enabled = false; } ((GenericCharacterDeath)this).PlayDeathAnimation(0.1f); if (Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { RagdollController component = ((Component)((GenericCharacterDeath)this).cachedModelTransform).GetComponent<RagdollController>(); if (Object.op_Implicit((Object)(object)component)) { component.BeginRagdoll(val); } } if (((EntityState)this).skillLocator.GetSkill((SkillSlot)3).skillDef.skillName == "CASEY_LINK_BODY_SPECIAL_MIPHA_NAME" && ((EntityState)this).skillLocator.GetSkill((SkillSlot)3).stock >= 1) { SummonMipha(); } else { Util.PlaySound("GameOver", ((EntityState)this).gameObject); } } public override void OnExit() { ((GenericCharacterDeath)this).OnExit(); } private void SummonMipha() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = Projectiles.miphaPrefab; val.position = ((Ray)(ref aimRay)).origin; val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.owner = ((EntityState)this).gameObject; val.damage = 0f; val.force = 0f; val.crit = false; val.damageColorIndex = (DamageColorIndex)0; val.target = null; ((FireProjectileInfo)(ref val)).speedOverride = 0f; ((FireProjectileInfo)(ref val)).fuseOverride = -1f; FireProjectileInfo val2 = val; val2.useFuseOverride = true; ProjectileManager.instance.FireProjectile(val2); } } public override void PlayDeathAnimation(float crossfadeDuration = 0.1f) { ((EntityState)this).PlayAnimation("Gesture, Ovveride", "Die"); } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge > 4f) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } 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)7; } } public class LinkMain : GenericCharacterMain { public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); ((Component)((EntityState)this).characterBody).gameObject.AddComponent<UpdateValues>(); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); ((Component)modelChildLocator.FindChild("ShieldHitbox")).gameObject.SetActive(false); } public override void ProcessJump() { ((GenericCharacterMain)this).ProcessJump(); if (((BaseCharacterMain)this).hasCharacterMotor && ((BaseCharacterMain)this).hasInputBank && ((EntityState)this).isAuthority) { if (((object)((EntityState)this).outer.state).GetType() != typeof(GliderState) && ((EntityState)this).inputBank.jump.down && ((EntityState)this).characterMotor.velocity.y < 0f && !((EntityState)this).characterMotor.isGrounded) { ((EntityState)this).outer.SetNextState((EntityState)(object)new GliderState()); } else if (((object)((EntityState)this).outer.state).GetType() == typeof(GliderState) && (!((EntityState)this).inputBank.jump.down || !(((EntityState)this).characterMotor.velocity.y < 0f) || ((EntityState)this).characterMotor.isGrounded)) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void Update() { //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_06ea: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Unknown result type (might be due to invalid IL or missing references) //IL_0727: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).Update(); if (((EntityState)this).healthComponent.combinedHealth / ((EntityState)this).healthComponent.fullCombinedHealth >= 0.9f && !((BaseState)this).HasBuff(Buffs.swordProjectileBuff)) { ((EntityState)this).characterBody.AddBuff(Buffs.swordProjectileBuff); } else if (((BaseState)this).HasBuff(Buffs.swordProjectileBuff) && ((EntityState)this).healthComponent.combinedHealth / ((EntityState)this).healthComponent.fullCombinedHealth < 0.9f) { ((EntityState)this).characterBody.RemoveBuff(Buffs.swordProjectileBuff); } UpdateValues component = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<UpdateValues>(); SkillLocator component2 = ((Component)((EntityState)this).characterBody).GetComponent<SkillLocator>(); if (((BaseCharacterMain)this).hasInputBank && ((EntityState)this).isAuthority) { if (((object)((EntityState)this).outer.state).GetType() == typeof(Shield) && (!((EntityState)this).inputBank.skill2.down || ((EntityState)this).inputBank.skill3.down || ((EntityState)this).inputBank.skill4.down || ((EntityState)this).inputBank.jump.down)) { ((EntityState)this).outer.SetNextStateToMain(); } if ((((object)((EntityState)this).outer.state).GetType() == typeof(Shoot) || ((object)((EntityState)this).outer.state).GetType() == typeof(ShootTri) || ((object)((EntityState)this).outer.state).GetType() == typeof(ShootFast)) && !((EntityState)this).inputBank.skill2.down) { ((EntityState)this).outer.SetNextStateToMain(); } if (((object)((EntityState)this).outer.state).GetType() == typeof(ThrowBomb) && !((EntityState)this).inputBank.skill3.down) { ((EntityState)this).outer.SetNextStateToMain(); } } if (Object.op_Implicit((Object)(object)component2) && (Object)(object)component2.GetSkill((SkillSlot)3) != (Object)null && ((EntityState)this).characterBody.inventory.itemAcquisitionOrder.Contains(ItemCatalog.FindItemIndex("UseAmbientLevel")) && component2.GetSkill((SkillSlot)3).skillDef.skillName == "CASEY_LINK_BODY_SPECIAL_MIPHA_NAME" && component2.GetSkill((SkillSlot)3).stock >= 1) { component2.GetSkill((SkillSlot)3).RemoveAllStocks(); ((EntityState)this).characterBody.inventory.RemoveItem(ItemCatalog.FindItemIndex("ExtraLifeConsumed"), 1); ((EntityState)this).characterBody.inventory.RemoveItem(ItemCatalog.FindItemIndex("UseAmbientLevel"), 1); } if (Object.op_Implicit((Object)(object)component2) && (Object)(object)component2.GetSkill((SkillSlot)3) != (Object)null) { if (component2.GetSkill((SkillSlot)3).skillDef.skillName == "CASEY_LINK_BODY_SPECIAL_MIPHA_NAME") { if (component2.GetSkill((SkillSlot)3).stock < 1) { component.miphaOnCooldown = true; } else if (component.miphaOnCooldown && component2.GetSkill((SkillSlot)3).stock >= 1) { component.miphaOnCooldown = false; if (Config.MiphaReadySound.Value) { Util.PlaySound("MiphasGraceReady", ((Component)((EntityState)this).characterBody).gameObject); } } } if (component2.GetSkill((SkillSlot)3).skillDef.skillName == "CASEY_LINK_BODY_SPECIAL_DARUK_NAME") { if (component2.GetSkill((SkillSlot)3).cooldownRemaining > 0f) { component.darukOnCooldown = true; } else if (component.darukOnCooldown && !(component2.GetSkill((SkillSlot)3).cooldownRemaining > 0f)) { component.darukOnCooldown = false; if (Config.DarukReadySound.Value) { Util.PlaySound("DaruksProtectionReady", ((Component)((EntityState)this).characterBody).gameObject); } } } if (component2.GetSkill((SkillSlot)3).skillDef.skillName == "CASEY_LINK_BODY_SPECIAL_URBOSA_NAME") { if (component2.GetSkill((SkillSlot)3).cooldownRemaining > 0f) { component.urbosaOnCooldown = true; } if (component.urbosaOnCooldown && !(component2.G