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 Arsonist Mod v2.0.3
ArsonistMod.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.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using ArsonistMod.Content.Controllers; using ArsonistMod.Modules; using ArsonistMod.Modules.Achievements; using ArsonistMod.Modules.Characters; using ArsonistMod.Modules.Networking; using ArsonistMod.Modules.ProjectileControllers; using ArsonistMod.Modules.Survivors; using ArsonistMod.SkillStates; using ArsonistMod.SkillStates.Arsonist.Secondary; using ArsonistMod.SkillStates.BaseStates; using ArsonistMod.SkillStates.EmoteStates; using ArsonistMod.SkillStates.ZeroPointBlast; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EmotesAPI; using EntityStates; using EntityStates.Commando.CommandoWeapon; using EntityStates.LemurianMonster; using EntityStates.Mage.Weapon; using HG; using HG.BlendableTypes; using Inferno; using Moonstorm.Starstorm2; using On.RoR2; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("ArsonistMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ArsonistMod")] [assembly: AssemblyTitle("ArsonistMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace ArsonistMod { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.PopcornFactory.Arsonist", "Arsonist", "2.0.3")] public class ArsonistPlugin : BaseUnityPlugin { public const string MODUID = "com.PopcornFactory.Arsonist"; public const string MODNAME = "Arsonist"; public const string MODVERSION = "2.0.3"; public const string DEVELOPER_PREFIX = "POPCORN"; public static bool starstormAvailable; public static bool infernoAvailable; public static ArsonistPlugin instance; private void Awake() { instance = this; Log.Init(((BaseUnityPlugin)this).Logger); Config.ReadConfig(); Assets.Initialize(); if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions")) { Config.SetupRiskOfOptions(); } if (Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm.Starstorm2")) { starstormAvailable = true; } if (Chainloader.PluginInfos.ContainsKey("HIFU.Inferno")) { infernoAvailable = true; } States.RegisterStates(); Buffs.RegisterBuffs(); Projectiles.RegisterProjectiles(); Tokens.AddTokens(); ItemDisplays.PopulateDisplays(); Damage.SetupModdedDamage(); new Arsonist().Initialize(); NetworkRequestSetup(); new ContentPacks().Initialize(); Hook(); } private void NetworkRequestSetup() { NetworkingAPI.RegisterMessageType<BurnNetworkRequest>(); NetworkingAPI.RegisterMessageType<PlaySoundNetworkRequest>(); NetworkingAPI.RegisterMessageType<TakeDamageNetworkRequest>(); NetworkingAPI.RegisterMessageType<AttachFlareNetworkRequest>(); NetworkingAPI.RegisterMessageType<FlamethrowerDotNetworkRequest>(); NetworkingAPI.RegisterMessageType<ToggleMasochismEffectNetworkRequest>(); NetworkingAPI.RegisterMessageType<KillAllEffectsNetworkRequest>(); NetworkingAPI.RegisterMessageType<PlayCleanseBlastNetworkRequest>(); } private void Hook() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); CharacterModel.UpdateOverlays += new hook_UpdateOverlays(CharacterModel_UpdateOverlays); CharacterModel.Start += new hook_Start(CharacterModel_Start); CharacterBody.OnDeathStart += new hook_OnDeathStart(CharacterBody_OnDeathStart); if (Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI")) { SurvivorCatalog.Init += new hook_Init(SurvivorCatalog_Init); } } private void CharacterBody_OnDeathStart(orig_OnDeathStart orig, CharacterBody self) { //IL_001f: 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_0049: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (self.baseNameToken == "POPCORN_ARSONIST_BODY_NAME") { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)self).netId, 2176930590u), (NetworkDestination)1); NetMessageExtensions.Send((INetMessage)(object)new KillAllEffectsNetworkRequest(((NetworkBehaviour)self).netId, killMaso: true), (NetworkDestination)1); NetMessageExtensions.Send((INetMessage)(object)new ToggleMasochismEffectNetworkRequest(((NetworkBehaviour)self).netId, toggleOn: false), (NetworkDestination)1); } } private void SurvivorCatalog_Init(orig_Init orig) { orig.Invoke(); foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs) { if (((Object)allSurvivorDef.bodyPrefab).name == "ArsonistBody") { CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, Assets.mainAssetBundle.LoadAsset<GameObject>("HumanoidArsonist"), 0, true); } } } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { if (!Object.op_Implicit((Object)(object)self.healthComponent)) { return; } orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && self.baseNameToken == "POPCORN_ARSONIST_BODY_NAME") { EnergySystem component = ((Component)self).gameObject.GetComponent<EnergySystem>(); if (self.HasBuff(Buffs.blueBuff)) { self.damage *= StaticValues.blueDamageMultiplier; } if (self.HasBuff(Buffs.lowerBuff)) { self.damage *= StaticValues.lowerDamageMultiplier; } if (self.HasBuff(Buffs.cleanseSpeedBoost)) { self.moveSpeed += 5f; } if (self.HasBuff(Buffs.masochismBuff)) { self.attackSpeed *= StaticValues.igniteAttackSpeedMultiplier; } if (self.HasBuff(Buffs.overheatDebuff) && !self.HasBuff(Buffs.masochismDeactivatedDebuff) && !self.HasBuff(Buffs.masochismDeactivatedNonDebuff)) { self.attackSpeed *= StaticValues.overheatAttackSpeedDebuff; } if (self.skillLocator.secondary.cooldownRemaining > 0f && component.hasOverheatedSecondary) { GenericSkill secondary = self.skillLocator.secondary; secondary.cooldownScale *= 1f; } else if (self.skillLocator.secondary.cooldownRemaining > 0f && !component.hasOverheatedSecondary) { GenericSkill secondary2 = self.skillLocator.secondary; secondary2.cooldownScale *= StaticValues.secondaryCooldownMultiplier; } if (self.skillLocator.utility.cooldownRemaining > 0f && component.hasOverheatedUtility) { GenericSkill utility = self.skillLocator.utility; utility.cooldownScale *= 1f; } else if (self.skillLocator.utility.cooldownRemaining > 0f && !component.hasOverheatedUtility) { GenericSkill utility2 = self.skillLocator.utility; utility2.cooldownScale *= StaticValues.utilityCooldownMultiplier; } if (self.skillLocator.special.cooldownRemaining > 0f && component.hasOverheatedSpecial) { GenericSkill special = self.skillLocator.special; special.cooldownScale *= 1f; } else if (self.skillLocator.special.cooldownRemaining > 0f && !component.hasOverheatedSpecial) { GenericSkill special2 = self.skillLocator.special; special2.cooldownScale *= StaticValues.specialCooldownMultiplier; } } } private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Invalid comparison between Unknown and I4 //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Invalid comparison between Unknown and I4 //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Invalid comparison between Unknown and I4 //IL_0050: 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_003b: Invalid comparison between Unknown and I4 //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: 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_0110: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body)) { bool flag = (int)damageInfo.dotIndex == 1 || (int)damageInfo.dotIndex == 2 || (int)damageInfo.dotIndex == 7; bool flag2 = (int)damageInfo.damageType == 128; if (DamageAPI.HasModdedDamageType(damageInfo, Damage.arsonistStickyDamageType)) { NetMessageExtensions.Send((INetMessage)(object)new AttachFlareNetworkRequest(((NetworkBehaviour)self.body).netId, ((NetworkBehaviour)damageInfo.attacker.GetComponent<CharacterBody>()).netId, AttachFlareNetworkRequest.FlareType.STRONG), (NetworkDestination)1); } else if (DamageAPI.HasModdedDamageType(damageInfo, Damage.arsonistWeakStickyDamageType)) { NetMessageExtensions.Send((INetMessage)(object)new AttachFlareNetworkRequest(((NetworkBehaviour)self.body).netId, ((NetworkBehaviour)damageInfo.attacker.GetComponent<CharacterBody>()).netId, AttachFlareNetworkRequest.FlareType.WEAK), (NetworkDestination)1); } else if (DamageAPI.HasModdedDamageType(damageInfo, Damage.arsonistChildExplosionDamageType)) { NetMessageExtensions.Send((INetMessage)(object)new AttachFlareNetworkRequest(((NetworkBehaviour)self.body).netId, ((NetworkBehaviour)damageInfo.attacker.GetComponent<CharacterBody>()).netId, AttachFlareNetworkRequest.FlareType.CHILD_STRONG), (NetworkDestination)1); } DamageType val = (DamageType)2097153; DamageType val2 = (DamageType)2359296; if (self.body.HasBuff(Buffs.fallDamageReductionBuff) && (damageInfo.damageType == val || damageInfo.damageType == val2) && damageInfo.damage >= 20f) { damageInfo.damage = 20f; } if (self.body.baseNameToken == "POPCORN_ARSONIST_BODY_NAME" && damageInfo.damage > self.fullHealth * Config.passiveHealthPercentageTriggerIgnite.Value && damageInfo.damageType != val) { if (!flag) { damageInfo.damage *= StaticValues.igniteDamageReduction; InflictDotInfo val3 = default(InflictDotInfo); val3.totalDamage = damageInfo.damage; val3.attackerObject = ((Component)self.body).gameObject; val3.victimObject = ((Component)self.body).gameObject; val3.duration = StaticValues.passiveIgniteLength; val3.dotIndex = (DotIndex)1; DotController.InflictDot(ref val3); } if (damageInfo.damage > 0f && (flag || flag2)) { damageInfo.damage *= StaticValues.igniteDamageReduction; } } } orig.Invoke(self, damageInfo); } private void CharacterModel_UpdateOverlays(orig_UpdateOverlays orig, CharacterModel self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body)) { ArsonistController component = ((Component)self.body).GetComponent<ArsonistController>(); if (Object.op_Implicit((Object)(object)component)) { overlayFunction(Assets.arsonistOverheatingMaterial, Object.op_Implicit((Object)(object)component), self); } } } private void CharacterModel_Start(orig_Start orig, CharacterModel self) { orig.Invoke(self); if (((Object)((Component)self).gameObject).name.Contains("ArsonistDisplay")) { ArsonistDisplayController component = ((Component)self).gameObject.GetComponent<ArsonistDisplayController>(); if (!Object.op_Implicit((Object)(object)component)) { component = ((Component)self).gameObject.AddComponent<ArsonistDisplayController>(); } } } private void overlayFunction(Material overlayMaterial, bool condition, CharacterModel model) { if (model.activeOverlayCount < CharacterModel.maxOverlays && condition) { Material[] currentOverlays = model.currentOverlays; int activeOverlayCount = model.activeOverlayCount; model.activeOverlayCount = activeOverlayCount + 1; currentOverlays[activeOverlayCount] = overlayMaterial; } } } internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } } namespace ArsonistMod.SkillStates { public class Cleanse : BaseSkillState { public ArsonistController arsonistController; public EnergySystem energySystem; public float baseDuration = 1f; public float duration; public bool isStrong; public override void OnEnter() { //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_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Expected O, but got Unknown //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); energySystem = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<EnergySystem>(); arsonistController = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ArsonistController>(); Ray aimRay = ((BaseState)this).GetAimRay(); duration = baseDuration; isStrong = false; ((EntityState)this).characterBody.SetAimTimer(duration); if (NetworkServer.active) { Util.CleanseBody(((EntityState)this).characterBody, true, false, false, true, true, false); } ((EntityState)this).PlayCrossfade("Gesture, Override", "Cleanse", "Attack.playbackRate", duration, 0.1f); if (energySystem.currentOverheat < energySystem.maxOverheat && ((EntityState)this).isAuthority) { energySystem.LowerHeat(energySystem.maxOverheat * StaticValues.cleanseHeatReductionMultiplier); energySystem.hasOverheatedUtility = false; ApplyBurn(); if (((EntityState)this).characterBody.HasBuff(Buffs.OnFire.buffIndex)) { isStrong = true; } NetMessageExtensions.Send((INetMessage)(object)new PlayCleanseBlastNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, strong: true), (NetworkDestination)1); if (!((EntityState)this).characterBody.characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterBody.characterMotor, 3f); } EffectManager.SpawnEffect(Assets.explosionPrefab, new EffectData { origin = ((EntityState)this).characterBody.transform.position, scale = StaticValues.cleanseBlastRadius, rotation = new Quaternion(0f, 0f, 0f, 0f) }, false); NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.cleanseSpeedBoost.buffIndex, 1, duration * 2.5f); } else if (energySystem.currentOverheat == energySystem.maxOverheat && ((EntityState)this).isAuthority) { if (!((EntityState)this).characterBody.characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterBody.characterMotor, 3f); } NetMessageExtensions.Send((INetMessage)(object)new PlayCleanseBlastNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, strong: false), (NetworkDestination)1); energySystem.isAcceleratedCooling = true; } if (((EntityState)this).isAuthority) { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 1924783034u), (NetworkDestination)1); } } public void ApplyBurn() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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_0043: 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_0060: Expected O, but got Unknown //IL_00d6: 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) Ray aimRay = ((BaseState)this).GetAimRay(); BullseyeSearch val = new BullseyeSearch { teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()), filterByLoS = false, searchOrigin = ((EntityState)this).characterBody.footPosition, searchDirection = Random.onUnitSphere, sortMode = (SortMode)1, maxDistanceFilter = StaticValues.cleanseBlastRadius, maxAngleFilter = 360f }; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); List<HurtBox> list = val.GetResults().ToList(); foreach (HurtBox item in list) { if (Object.op_Implicit((Object)(object)item) && Object.op_Implicit((Object)(object)item.healthComponent) && Object.op_Implicit((Object)(object)item.healthComponent.body)) { NetMessageExtensions.Send((INetMessage)(object)new BurnNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody.master).netId, ((NetworkBehaviour)item.healthComponent.body.master).netId), (NetworkDestination)1); } } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); if (!isStrong) { } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= 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)6; } } public class FireSpray : BaseSkillState { public EnergySystem energySystem; public float baseDuration = 0.5f; public float duration; public static GameObject effectPrefab; private string muzzleString = "GunMuzzle"; private Transform muzzlePos; private Animator animator; private float damageCoefficient = StaticValues.firesprayWeakDamageCoefficient; private float altDamageCoefficient = StaticValues.altFiresprayWeakDamageCoefficient; private float strongdamageCoefficient = StaticValues.firesprayStrongDamageCoefficient; private float altStrongDamageCoefficient = StaticValues.altFiresprayStrongDamageCoefficient; public static float spreadBloomValue = 10f; private float force = 400f; private float strongforce = 1000f; private float speedOverride = 100f; private float strongspeedOverride = 100f; private GameObject chargeVfxInstance; private ArsonistPassive passive; private bool isBlue; public float Energy = StaticValues.firesprayEnergyCost; private float energyCost; private float energyflatCost; public override void OnEnter() { //IL_0053: 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_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); energySystem = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<EnergySystem>(); passive = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ArsonistPassive>(); isBlue = passive.isBlueGauge(); ((EntityState)this).characterBody.isSprinting = false; Ray aimRay = ((BaseState)this).GetAimRay(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(duration); animator = ((EntityState)this).GetModelAnimator(); animator.SetBool("attacking", true); ((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayCrossfade("Gesture, Override", "FireSpray", "Attack.playbackRate", duration, 0.1f); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); muzzlePos = modelChildLocator.FindChild(muzzleString); energyflatCost = Energy - energySystem.costflatOverheat; if (energyflatCost < 0f) { energyflatCost = 0f; } energyCost = energySystem.costmultiplierOverheat * energyflatCost; if (energyCost < 0f) { energyCost = 0f; } if (energySystem.currentOverheat < energySystem.maxOverheat && ((EntityState)this).isAuthority) { FireBolt(); energySystem.AddHeat(energyCost); NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 470984906u), (NetworkDestination)1); } else if (energySystem.currentOverheat == energySystem.maxOverheat && ((EntityState)this).isAuthority) { FireBall(); NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 2300744954u), (NetworkDestination)1); } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue); } public void FireBall() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); float num = (isBlue ? altDamageCoefficient : damageCoefficient); if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectile(Projectiles.lemurianFireBall, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * num, force, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, speedOverride); } } public void FireBolt() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); float num = (isBlue ? altStrongDamageCoefficient : strongdamageCoefficient); if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectile(Projectiles.artificerFirebolt, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * num, strongforce, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, strongspeedOverride); } } public override void OnExit() { ((EntityState)this).OnExit(); animator.SetBool("attacking", false); ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); if (Object.op_Implicit((Object)(object)chargeVfxInstance)) { EntityState.Destroy((Object)(object)chargeVfxInstance); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority && ((BaseSkillState)this).IsKeyDownAuthority()) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireSpray()); } else if (((EntityState)this).fixedAge >= 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)2; } } internal class Flamethrower : BaseSkillState { public int tickRate; public int baseTickRate = StaticValues.flamethrowerBaseTickRate; public float weakCoefficient = StaticValues.flamethrowerWeakDamageCoefficient; public float strongCoefficient = StaticValues.flamethrowerStrongDamageCoefficient; public float altWeakCoefficient = StaticValues.altFlamethrowerWeakDamageCoefficient; public float altStrongCoefficient = StaticValues.altFlamethrowerStrongDamageCoefficient; internal BulletAttack bulletAttack; public float flamethrowerRange = StaticValues.flamethrowerRange; public float procCoefficient = StaticValues.flamethrowerProcCoefficient; public float radius = StaticValues.flamethowerRadius; public static float spreadBloomValue = 10f; private string muzzleString = "GunMuzzle"; private float baseDuration = 0.5f; private float duration; private float interval; private float stopwatch = 0f; private EnergySystem energySystem; private ArsonistPassive passive; private ArsonistController controller; private bool isBlue; private float energyFlatCost; public float Energy = StaticValues.flamethrowerEnergyCost; private float energyCost; public override void OnEnter() { //IL_0125: 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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Expected O, but got Unknown //IL_0243: Expected O, but got Unknown //IL_02be: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); energySystem = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<EnergySystem>(); passive = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ArsonistPassive>(); controller = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ArsonistController>(); isBlue = passive.isBlueGauge(); ((EntityState)this).characterBody.isSprinting = false; energyFlatCost = Energy - energySystem.costflatOverheat; if (energyFlatCost < 0f) { energyFlatCost = 0f; } energyCost = energySystem.costmultiplierOverheat * energyFlatCost; if (energyCost < 0f) { energyCost = 0f; } duration = baseDuration / ((BaseState)this).attackSpeedStat; tickRate = (int)((float)baseTickRate * ((BaseState)this).attackSpeedStat); interval = duration / (float)tickRate; ((EntityState)this).characterBody.SetAimTimer(duration * 2f); bulletAttack = new BulletAttack { bulletCount = 1u, damage = strongCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)0, falloffModel = (FalloffModel)0, maxDistance = flamethrowerRange, force = 0f, hitMask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, hitEffectPrefab = Flamethrower.impactEffectPrefab, minSpread = 1f, maxSpread = 4f, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = radius, sniper = false, stopperMask = ((LayerIndex)(ref LayerIndex.noCollision)).mask, weapon = null, spreadPitchScale = 0f, spreadYawScale = 0f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitCallback = new HitCallback(flamethrowerFlameChanceHitCallback) }; if (energySystem.ifOverheatMaxed) { controller.weakFlamethrower.Play(); } else { controller.flamethrower.Play(); } if (Object.op_Implicit((Object)(object)controller) && !controller.playingFlamethrower) { controller.playingFlamethrower = true; if (((EntityState)this).isAuthority) { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 934132236u), (NetworkDestination)1); controller.flamethrowerPlayingID = AkSoundEngine.PostEvent(587096102u, ((Component)((EntityState)this).characterBody).gameObject); } } } public override void OnExit() { ((EntityState)this).OnExit(); controller.flamethrower.Stop(); controller.weakFlamethrower.Stop(); } public override void FixedUpdate() { //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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= interval && ((EntityState)this).isAuthority) { float num = strongCoefficient; float maxDistance = flamethrowerRange; if (energySystem.currentOverheat < energySystem.maxOverheat && ((EntityState)this).isAuthority) { energySystem.AddHeat(energyCost / (float)tickRate); num = (isBlue ? altStrongCoefficient : strongCoefficient); } else if (energySystem.currentOverheat >= energySystem.maxOverheat && ((EntityState)this).isAuthority) { num = (isBlue ? altWeakCoefficient : weakCoefficient); maxDistance = flamethrowerRange * 0.66f; } Ray aimRay = ((BaseState)this).GetAimRay(); bulletAttack.aimVector = ((Ray)(ref aimRay)).direction; bulletAttack.origin = ((Ray)(ref aimRay)).origin; bulletAttack.damage = num * ((BaseState)this).damageStat; bulletAttack.maxDistance = maxDistance; bulletAttack.Fire(); ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue); stopwatch = 0f; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (((EntityState)this).inputBank.skill1.down) { ((EntityState)this).outer.SetState((EntityState)(object)new Flamethrower()); return; } controller.flamethrower.Stop(); controller.weakFlamethrower.Stop(); ((EntityState)this).outer.SetNextStateToMain(); } } public bool flamethrowerFlameChanceHitCallback(BulletAttack bulletRef, ref BulletHit hitInfo) { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Invalid comparison between Unknown and I4 //IL_00fe: 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) BulletAttack.defaultHitCallback.Invoke(bulletRef, ref hitInfo); if (Object.op_Implicit((Object)(object)hitInfo.hitHurtBox)) { float num = hitInfo.distance / StaticValues.flamethrowerRange; float num2 = -1f * Mathf.Pow(num, 0.8f) + 1.2f; num2 = Mathf.Clamp(num2, 0f, 1f); float num3 = Random.Range(1f, 100f); float num4 = ((EntityState)this).characterBody.master.luck; if (num4 < 1f) { num4 = 1f; } if (num3 * num4 * num2 >= StaticValues.flamethrowerFireChance && (int)hitInfo.hitHurtBox.healthComponent.body.teamComponent.teamIndex != 1) { if (Object.op_Implicit((Object)(object)hitInfo.hitHurtBox.healthComponent.body.master)) { NetMessageExtensions.Send((INetMessage)(object)new FlamethrowerDotNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody.master).netId, ((NetworkBehaviour)hitInfo.hitHurtBox.healthComponent.body.master).netId, 5f), (NetworkDestination)1); } return true; } return true; } return false; } 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 Flare : BaseSkillState { public EnergySystem energySystem; private Ray aimRay; public float baseDuration = 1f; public float duration; public float fireTime; public float recoil = 1f; private bool hasFired; private bool isStrong; private Animator animator; private string muzzleString = "FlareMuzzle"; private float energyCost; private float energyflatCost; private float speedOverride = StaticValues.flareSpeedCoefficient; private BulletAttack bulletAttack; private BlastAttack blastAttack; public override void OnEnter() { //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_0129: 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_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); hasFired = false; energySystem = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<EnergySystem>(); aimRay = ((BaseState)this).GetAimRay(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireTime = duration * 0.35f; ((EntityState)this).characterBody.SetAimTimer(duration); animator = ((EntityState)this).GetModelAnimator(); animator.SetBool("attacking", true); ((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayCrossfade("Gesture, Override", "Flare", "Attack.playbackRate", duration, 0.1f); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); Transform val = modelChildLocator.FindChild(muzzleString); if (energySystem.currentOverheat < energySystem.maxOverheat && ((EntityState)this).isAuthority) { energySystem.LowerHeat(energySystem.currentOverheat * StaticValues.flareHeatReductionMultiplier); energySystem.hasOverheatedSecondary = false; NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 3747272580u), (NetworkDestination)1); isStrong = true; } else if (energySystem.currentOverheat == energySystem.maxOverheat && ((EntityState)this).isAuthority) { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 1608533803u), (NetworkDestination)1); isStrong = false; } ModdedDamageTypeHolderComponent val2 = Projectiles.strongFlare.AddComponent<ModdedDamageTypeHolderComponent>(); val2.Add(Damage.arsonistStickyDamageType); ModdedDamageTypeHolderComponent val3 = Projectiles.weakFlare.AddComponent<ModdedDamageTypeHolderComponent>(); val3.Add(Damage.arsonistWeakStickyDamageType); } public override void OnExit() { ((EntityState)this).OnExit(); animator.SetBool("attacking", false); ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); } public void StrongFlare() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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) Ray val = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.AddSpreadBloom(1f); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); ProjectileManager.instance.FireProjectile(Projectiles.strongFlare, ((Ray)(ref val)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat, 0f, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)13, (GameObject)null, speedOverride); } } public void WeakFlare() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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) Ray val = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { ((EntityState)this).characterBody.AddSpreadBloom(1f); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); ProjectileManager.instance.FireProjectile(Projectiles.weakFlare, ((Ray)(ref val)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat, 0f, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)13, (GameObject)null, speedOverride); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).fixedAge > fireTime && ((EntityState)this).isAuthority) { hasFired = true; if (isStrong) { StrongFlare(); } else if (!isStrong) { WeakFlare(); } } if (((EntityState)this).fixedAge >= 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)3; } } internal class Masochism : BaseSkillState { internal static float giveBuffFraction = 0.3f; internal static float baseDuration = 0.5f; internal float duration; internal bool buffGiven; internal EnergySystem energySystem; public float Energy = StaticValues.masochismEnergyCost; private float energyCost; private float energyflatCost; public override void OnEnter() { //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); energySystem = ((EntityState)this).gameObject.GetComponent<EnergySystem>(); duration = baseDuration / ((BaseState)this).attackSpeedStat; buffGiven = false; energyflatCost = Energy - energySystem.costflatOverheat; if (energyflatCost < 0f) { energyflatCost = 0f; } energyCost = energySystem.costmultiplierOverheat * energyflatCost; if (energyCost < 0f) { energyCost = 0f; } if (energySystem.currentOverheat < energySystem.maxOverheat && ((EntityState)this).isAuthority) { energySystem.hasOverheatedSpecial = false; energySystem.currentOverheat += energyCost; } else if (energySystem.currentOverheat == energySystem.maxOverheat && !((EntityState)this).isAuthority) { } if (((EntityState)this).isAuthority) { if (!Config.shouldHaveVoice.Value) { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 1840962711u), (NetworkDestination)1); return; } uint soundNum = ((((EntityState)this).characterBody.HasBuff(Buffs.masochismBuff) || ((EntityState)this).characterBody.HasBuff(Buffs.fallDamageReductionBuff)) ? 1840962711u : 3831238989u); NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, soundNum), (NetworkDestination)1); } } public override void OnExit() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); if (!buffGiven) { buffGiven = true; if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.masochismBuff.buffIndex, StaticValues.masochismBuffDuration); } } } public override void FixedUpdate() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration * giveBuffFraction && !buffGiven) { buffGiven = true; if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.masochismBuff.buffIndex, StaticValues.masochismBuffDuration); } } if (((EntityState)this).fixedAge > 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)4; } } internal class NeoMasochism : BaseSkillState { public MasochismController maso; public ArsonistController arsonistCon; public float stopwatch; public static float baseActivationTime = 0.16f; public static float baseDuration = 3.1f; public float duration; public float originalFOV; public float targetFOV; public float originalLerpTime; public static float tempLerpTime = 0.25f; public float multiplier = 1.1f; public EnergySystem energySystem; private CameraParamsOverrideHandle handle; public override void OnEnter() { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_00d4: 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_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: 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_0241: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); maso = ((EntityState)this).gameObject.GetComponent<MasochismController>(); arsonistCon = ((EntityState)this).gameObject.GetComponent<ArsonistController>(); energySystem = ((EntityState)this).gameObject.GetComponent<EnergySystem>(); duration = baseDuration; if (Object.op_Implicit((Object)(object)energySystem)) { energySystem.SetCurrentHeatToLowerBound(); } if (Object.op_Implicit((Object)(object)arsonistCon.cameraRigController)) { originalFOV = arsonistCon.cameraRigController.baseFov; targetFOV = originalFOV * multiplier; } CameraTargetParams cameraTargetParams = ((EntityState)this).cameraTargetParams; CharacterCameraParamsData currentCameraParamsData = cameraTargetParams.currentCameraParamsData; currentCameraParamsData.fov = BlendableFloat.op_Implicit(targetFOV); CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest); val.cameraParamsData = currentCameraParamsData; val.priority = 0f; CameraParamsOverrideRequest val2 = val; if (((EntityState)this).isAuthority && Config.ToggleMasochismFOVWarp.Value) { handle = cameraTargetParams.AddParamsOverride(val2, baseDuration * baseActivationTime); } if (Object.op_Implicit((Object)(object)maso) && Object.op_Implicit((Object)(object)maso)) { maso.masoRecentlyActivated = true; } if (Object.op_Implicit((Object)(object)maso) && maso.masochismActive && ((EntityState)this).isAuthority) { maso.TriggerMasochismAndEXOverheat(applyDebuff: false); ((EntityState)this).outer.SetNextStateToMain(); } else if (((EntityState)this).isAuthority) { if (!Config.shouldHaveVoice.Value) { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 955478894u), (NetworkDestination)1); } else { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(soundNum: (((EntityState)this).characterBody.skinIndex != ArsonistMod.Modules.Survivors.Arsonist.FirebugSkinIndex) ? (((EntityState)this).characterBody.HasBuff(Buffs.masochismBuff) ? 955478894u : 1305067912u) : (((EntityState)this).characterBody.HasBuff(Buffs.masochismBuff) ? 955478894u : 1845947419u), charnetID: ((NetworkBehaviour)((EntityState)this).characterBody).netId), (NetworkDestination)1); } } } public override void OnExit() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).cameraTargetParams.RemoveParamsOverride(handle, 0.2f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= duration * baseActivationTime && ((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)maso) && !maso.masochismActive) { maso.ActivateMaso(); } ((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)4; } } } namespace ArsonistMod.SkillStates.ZeroPointBlast { public class ZeroPointBlastEnd : BaseSkillState { public ArsonistController arsonistCon; public float stopwatch; public float duration; public static float baseDuration = 0.6f; public static float earlyExitFrac = 0.48f; public static float unlockVelocity = 0.2f; public BlastAttack blastAttack; protected float pushForce = 500f; public float damageCoefficient; public float radius = 5f; public Animator animator; private string muzzleString = "GunMuzzle"; public Transform muzzlePos; public override void OnEnter() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: 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_01c4: Expected O, but got Unknown //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); muzzlePos = modelChildLocator.FindChild(muzzleString); if (((EntityState)this).isAuthority) { if (!Config.shouldHaveVoice.Value) { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 1486446844u), (NetworkDestination)1); } else { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(soundNum: (((EntityState)this).characterBody.skinIndex != ArsonistMod.Modules.Survivors.Arsonist.FirebugSkinIndex) ? (((EntityState)this).characterBody.HasBuff(Buffs.masochismBuff) ? 1486446844u : 3858611310u) : (((EntityState)this).characterBody.HasBuff(Buffs.masochismBuff) ? 1486446844u : 896468461u), charnetID: ((NetworkBehaviour)((EntityState)this).characterBody).netId), (NetworkDestination)1); } } animator = ((EntityState)this).GetModelAnimator(); stopwatch = 0f; duration = baseDuration; animator.SetBool("attacking", true); animator.SetFloat("Attack.playbackRate", 1f); if (((BaseState)this).isGrounded) { ((EntityState)this).PlayAnimation("UpperBody, Override", "BufferEmpty"); ((EntityState)this).PlayCrossfade("FullBody, Override", "ZPBHit", "Attack.playbackRate", duration, 0.02f); } else { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).PlayCrossfade("UpperBody, Override", "ZPBHit", "Attack.playbackRate", duration, 0.02f); } ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterMotor.lastVelocity = Vector3.zero; blastAttack = new BlastAttack(); blastAttack.radius = radius; blastAttack.procCoefficient = 0.5f; blastAttack.position = ((EntityState)this).characterBody.corePosition; blastAttack.attacker = ((EntityState)this).gameObject; blastAttack.crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); blastAttack.baseDamage = ((EntityState)this).characterBody.damage * damageCoefficient; blastAttack.falloffModel = (FalloffModel)0; blastAttack.baseForce = pushForce; blastAttack.teamIndex = TeamComponent.GetObjectTeam(blastAttack.attacker); blastAttack.damageType = (DamageType)32; blastAttack.attackerFiltering = (AttackerFiltering)2; blastAttack.Fire(); EffectManager.SpawnEffect(Assets.elderlemurianexplosionEffect, new EffectData { origin = ((EntityState)this).characterBody.corePosition, scale = 3f }, true); arsonistCon = ((EntityState)this).gameObject.GetComponent<ArsonistController>(); arsonistCon.steamDownParticle.Stop(); arsonistCon.fireBeamForward.Play(); } public override void OnExit() { ((EntityState)this).OnExit(); animator.SetBool("attacking", false); arsonistCon.fireBeam.Stop(); arsonistCon.fireBeamForward.Stop(); ((EntityState)this).PlayAnimation("UpperBody, Override", "BufferEmpty"); } public override void FixedUpdate() { //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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch <= duration * unlockVelocity) { ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterMotor.lastVelocity = Vector3.zero; } if (stopwatch >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(damageCoefficient); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); damageCoefficient = reader.ReadSingle(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (stopwatch >= duration * earlyExitFrac) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class ZeroPointBlastStart : BaseSkillState { public ArsonistController arsonistController; public EnergySystem energySystem; private OverlapAttack detector; private OverlapAttack attack; protected float procCoefficient = 1f; protected DamageType damageType = (DamageType)128; private float damageCoefficient; private Vector3 direction; protected float pushForce = 500f; protected Vector3 bonusForce = new Vector3(10f, 400f, 0f); protected string hitboxName = "ZeroPoint"; private BlastAttack blastAttack; public float radius = 5f; private Transform muzzlePos; private string muzzleString = "GunMuzzle"; private float hitPauseTimer; protected bool inHitPause; private HitStopCachedState hitStopCachedState; private Vector3 storedVelocity; private Vector3 bounceVector; public bool hasHit; public float stopwatch; public Animator animator; private Vector3 aimRayDir; private Ray aimRay; public static float baseduration = 0.8f; public static float duration; public static float initialSpeedCoefficient = 6f; public float SpeedCoefficient; public static float finalSpeedCoefficient = 4f; private float extraDuration; private static float startupFrac = 0.2f; private static float freezeFrac = 0.58f; private static float blastFrac = 0.3f; private static float stopFlameFrac = 0.35f; private bool hasFired = false; public static float hitExtraDuration = 0.44f; public static float minExtraDuration = 0.2f; private Transform modelTransform; private CharacterModel characterModel; private float rollSpeed; public override void OnEnter() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_020b: 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_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Expected O, but got Unknown //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_042a: 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_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_04cf: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Expected O, but got Unknown //IL_0506: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); stopwatch = 0f; if (((EntityState)this).isAuthority) { if (!Config.shouldHaveVoice.Value) { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 3585665340u), (NetworkDestination)1); } else { NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(soundNum: (((EntityState)this).characterBody.skinIndex != ArsonistMod.Modules.Survivors.Arsonist.FirebugSkinIndex) ? (((EntityState)this).characterBody.HasBuff(Buffs.masochismBuff) ? 3585665340u : 289708206u) : (((EntityState)this).characterBody.HasBuff(Buffs.masochismBuff) ? 3585665340u : 3167811629u), charnetID: ((NetworkBehaviour)((EntityState)this).characterBody).netId), (NetworkDestination)1); } } energySystem = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<EnergySystem>(); if (energySystem.currentOverheat < energySystem.maxOverheat && ((EntityState)this).isAuthority) { energySystem.LowerHeat(energySystem.currentOverheat * StaticValues.zeropointHeatReductionMultiplier); damageCoefficient = StaticValues.zeropointpounchDamageCoefficient; } else if (energySystem.currentOverheat == energySystem.maxOverheat && ((EntityState)this).isAuthority) { damageCoefficient = StaticValues.zeropointpounchDamageCoefficient * 0.5f; } hasHit = false; aimRayDir = ((Ray)(ref aimRay)).direction; duration = baseduration; float num = ((BaseState)this).moveSpeedStat; if (((EntityState)this).characterBody.isSprinting) { num /= ((EntityState)this).characterBody.sprintingSpeedMultiplier; } float num2 = num / (((EntityState)this).characterBody.baseMoveSpeed - 1f); SpeedCoefficient = initialSpeedCoefficient * num2; extraDuration = Math.Max(hitExtraDuration / (num2 + 1f), minExtraDuration); ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.HiddenInvincibility.buffIndex, duration / 2f); animator = ((EntityState)this).GetModelAnimator(); animator.SetBool("attacking", true); ((EntityState)this).characterBody.SetAimTimer(duration); HitBoxGroup hitBoxGroup = null; HitBoxGroup hitBoxGroup2 = null; Transform val = ((EntityState)this).GetModelTransform(); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { animator = ((Component)modelTransform).GetComponent<Animator>(); characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); } if (Object.op_Implicit((Object)(object)val)) { hitBoxGroup = Array.Find(((Component)val).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName); hitBoxGroup2 = Array.Find(((Component)val).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName); } attack = new OverlapAttack(); attack.damageType = damageType; attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = ((EntityState)this).characterBody.damage; attack.procCoefficient = procCoefficient; attack.hitEffectPrefab = FireBarrage.hitEffectPrefab; attack.forceVector = bonusForce; attack.pushAwayForce = pushForce; attack.hitBoxGroup = hitBoxGroup; attack.isCrit = ((BaseState)this).RollCrit(); detector = new OverlapAttack(); detector.damageType = damageType; detector.attacker = ((EntityState)this).gameObject; detector.inflictor = ((EntityState)this).gameObject; detector.teamIndex = ((BaseState)this).GetTeam(); detector.damage = 0f; detector.procCoefficient = 0f; detector.hitEffectPrefab = null; detector.forceVector = Vector3.zero; detector.pushAwayForce = 0f; detector.hitBoxGroup = hitBoxGroup2; detector.isCrit = false; Ray val2 = ((BaseState)this).GetAimRay(); Vector3 val3 = ((Ray)(ref val2)).direction; direction = ((Vector3)(ref val3)).normalized; ((EntityState)this).characterDirection.forward = ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized; animator.SetFloat("Attack.playbackRate", ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayCrossfade("FullBody, Override", "ZPBStart", "Attack.playbackRate", duration, 0.1f); blastAttack = new BlastAttack(); blastAttack.radius = radius; blastAttack.procCoefficient = 0.5f; blastAttack.position = ((EntityState)this).characterBody.corePosition; blastAttack.attacker = ((EntityState)this).gameObject; blastAttack.crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); blastAttack.baseDamage = ((EntityState)this).characterBody.damage * damageCoefficient; blastAttack.falloffModel = (FalloffModel)0; blastAttack.baseForce = pushForce; blastAttack.teamIndex = TeamComponent.GetObjectTeam(blastAttack.attacker); blastAttack.damageType = (DamageType)32; blastAttack.attackerFiltering = (AttackerFiltering)2; arsonistController = ((EntityState)this).gameObject.GetComponent<ArsonistController>(); if (Object.op_Implicit((Object)(object)arsonistController)) { arsonistController.steamDownParticle.Play(); arsonistController.hasZPBedRecently = true; } ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator(); muzzlePos = modelChildLocator.FindChild(muzzleString); if (((BaseState)this).isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 6f); } else { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 4f); } if (((EntityState)this).isAuthority) { NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.fallDamageReductionBuff.buffIndex, 1, 3f); } } private bool CheckLookingTowardsVector(Vector3 dir) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) Ray val = ((BaseState)this).GetAimRay(); if (Vector3.Dot(((Ray)(ref val)).direction, dir) > 0.866f) { return true; } return false; } private void RecalculateRollSpeed() { float num = ((BaseState)this).moveSpeedStat; if (((EntityState)this).characterBody.isSprinting) { num /= ((EntityState)this).characterBody.sprintingSpeedMultiplier; } if (num >= 12f) { num = Mathf.Log10(num - 11f) + 12f; } rollSpeed = num * Mathf.Lerp(SpeedCoefficient, finalSpeedCoefficient, (stopwatch - duration * blastFrac) / (duration * freezeFrac - duration * blastFrac)); } private void FireAttack() { if (((EntityState)this).isAuthority) { List<HurtBox> list = new List<HurtBox>(); if (detector.Fire(list)) { OnHitEnemyAuthority(); } } } protected virtual void OnHitEnemyAuthority() { //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) if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).outer.SetState((EntityState)(object)new ZeroPointBlastEnd { damageCoefficient = damageCoefficient }); } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); } public override void FixedUpdate() { //IL_003c: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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: Expected O, but got Unknown //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch <= duration * startupFrac) { ((EntityState)this).characterDirection.forward = direction; } if (stopwatch >= duration * blastFrac && !hasFired) { hasFired = true; blastAttack.position = muzzlePos.position; blastAttack.Fire(); arsonistController.fireBeam.Play(); EffectManager.SpawnEffect(Assets.elderlemurianexplosionEffect, new EffectData { origin = ((EntityState)this).characterBody.corePosition, scale = 1.5f }, true); } if (stopwatch >= duration * blastFrac && stopwatch <= duration * freezeFrac) { RecalculateRollSpeed(); FireAttack(); ((EntityState)this).characterDirection.forward = direction; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Vector3 val = direction * rollSpeed; float num = Mathf.Max(Vector3.Dot(val, direction), 0f); val = direction * num; ((EntityState)this).characterMotor.velocity = val; } } if (stopwatch >= duration * freezeFrac && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetState((EntityState)(object)new ZeroPointBlastWhiff { damageCoefficient = damageCoefficient }); } } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(damageCoefficient); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); damageCoefficient = reader.ReadSingle(); } 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)4; } } public class ZeroPointBlastWhiff : BaseSkillState { public ArsonistController arsonistCon; public float stopwatch; public float duration; public static float baseDuration = 0.6f; public static float earlyExitFrac = 0.48f; public static float stopFiringFrac = 0.24f; public Animator anim; public OverlapAttack detector; protected DamageType damageType = (DamageType)128; protected string hitboxName = "ZeroPoint"; public float damageCoefficient; 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); stopwatch = 0f; duration = baseDuration; anim = ((EntityState)this).GetModelAnimator(); anim.SetBool("attacking", true); ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).PlayCrossfade("UpperBody, Override", "ZPBWhiff", "Attack.playbackRate", duration, 0.02f); Transform modelTransform = ((EntityState)this).GetModelTransform(); HitBoxGroup hitBoxGroup = null; if (Object.op_Implicit((Object)(object)modelTransform)) { hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName); } detector = new OverlapAttack(); detector.damageType = damageType; detector.attacker = ((EntityState)this).gameObject; detector.inflictor = ((EntityState)this).gameObject; detector.teamIndex = ((BaseState)this).GetTeam(); detector.damage = 0f; detector.procCoefficient = 0f; detector.hitEffectPrefab = null; detector.forceVector = Vector3.zero; detector.pushAwayForce = 0f; detector.hitBoxGroup = hitBoxGroup; detector.isCrit = false; arsonistCon = ((EntityState)this).gameObject.GetComponent<ArsonistController>(); arsonistCon.steamDownParticle.Stop(); arsonistCon.fireBeam.Stop(); } public override void OnExit() { ((EntityState)this).OnExit(); anim.SetBool("attacking", false); ((EntityState)this).PlayAnimation("UpperBody, Override", "BufferEmpty"); } private void FireAttack() { if (((EntityState)this).isAuthority) { List<HurtBox> list = new List<HurtBox>(); if (detector.Fire(list)) { OnHitEnemyAuthority(); } } } protected virtual void OnHitEnemyAuthority() { //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) if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).outer.SetState((EntityState)(object)new ZeroPointBlastEnd { damageCoefficient = damageCoefficient }); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch <= duration * stopFiringFrac) { FireAttack(); } if (stopwatch >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(damageCoefficient); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); damageCoefficient = reader.ReadSingle(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (stopwatch >= duration * earlyExitFrac) { return (InterruptPriority)0; } return (InterruptPriority)2; } } } namespace ArsonistMod.SkillStates.Unused { internal class FlareEffectControllerStrongWorld : MonoBehaviour { public CharacterBody arsonistBody; public GameObject effectObj; public GameObject gameObj; public Vector3 worldPos; private int timesFired; private float timer; private void Start() { //IL_004d: 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_0058: Unknown result type (might be due to invalid IL or missing references) timer = 0f; timesFired = 0; gameObj = ((Component)this).gameObject.GetComponent<GameObject>(); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor((float)Random.Range(-2, 2), (float)Random.Range(-2, 2), (float)Random.Range(-2, 2)); effectObj = Object.Instantiate<GameObject>(Assets.arsonistFlareAttached, worldPos, Quaternion.LookRotation(worldPos)); } private void FixedUpdate() { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown if (timer > StaticValues.flareInterval) { if (timesFired < StaticValues.flareTickNum) { timesFired++; timer = 0f; FireExplosion(StaticValues.flareBlastRadius / 2f); AkSoundEngine.PostEvent(3747272580u, gameObj); return; } FireExplosion(StaticValues.flareBlastRadius); AkSoundEngine.PostEvent(3061346618u, gameObj); EffectManager.SpawnEffect(Assets.explosionPrefab, new EffectData { origin = worldPos, scale = StaticValues.flareBlastRadius, rotation = new Quaternion(0f, 0f, 0f, 0f) }, true); Object.Destroy((Object)(object)this); Object.Destroy((Object)(object)effectObj); } else { timer += Time.deltaTime; } } private void FireExplosion(float radius) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) BlastAttack val = new BlastAttack(); val.radius = radius; val.procCoefficient = 1f; val.teamIndex = (TeamIndex)1; val.position = worldPos; val.attacker = ((Component)arsonistBody).gameObject; val.crit = arsonistBody.RollCrit(); val.baseDamage = arsonistBody.baseDamage * StaticValues.flareStrongDamageCoefficient; val.falloffModel = (FalloffModel)0; val.baseForce = 1f; val.damageType = (DamageType)0; val.Fire(); } private void OnDestroy() { Object.Destroy((Object)(object)effectObj); } } internal class FlareEffectControllerWeakWorld : MonoBehaviour { public CharacterBody arsonistBody; public GameObject effectObj; public GameObject gameObj; public Vector3 worldPos; private int timesFired; private float timer; private void Start() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) timer = 0f; timesFired = 0; gameObj = ((Component)this).gameObject.GetComponent<GameObject>(); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor((float)Random.Range(-2, 2), (float)Random.Range(-2, 2), (float)Random.Range(-2, 2)); effectObj = Object.Instantiate<GameObject>(Assets.mainAssetBundle.LoadAsset<GameObject>("flareAttached"), worldPos, Quaternion.LookRotation(worldPos)); } private void FixedUpdate() { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown if (timer > StaticValues.flareInterval) { if (timesFired < StaticValues.flareTickNum) { timesFired++; timer = 0f; FireExplosion(StaticValues.flareBlastRadius / 2f); AkSoundEngine.PostEvent(3747272580u, gameObj); return; } FireExplosion(StaticValues.flareBlastRadius); AkSoundEngine.PostEvent(3061346618u, gameObj); EffectManager.SpawnEffect(Assets.explosionPrefab, new EffectData { origin = worldPos, scale = StaticValues.flareBlastRadius, rotation = new Quaternion(0f, 0f, 0f, 0f) }, true); Object.Destroy((Object)(object)this); Object.Destroy((Object)(object)effectObj); } else { timer += Time.deltaTime; } } private void FireExplosion(float radius) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) BlastAttack val = new BlastAttack(); val.radius = radius; val.procCoefficient = 1f; val.teamIndex = (TeamIndex)1; val.position = worldPos; val.attacker = ((Component)arsonistBody).gameObject; val.crit = arsonistBody.RollCrit(); val.baseDamage = arsonistBody.baseDamage * StaticValues.flareWeakDamageCoefficient; val.falloffModel = (FalloffModel)0; val.baseForce = 1f; val.damageType = (DamageType)0; val.Fire(); } private void OnDestroy() { Object.Destroy((Object)(object)effectObj); } } } namespace ArsonistMod.SkillStates.Arsonist.Secondary { internal class FlareEffectControllerStrong : MonoBehaviour { public CharacterBody arsonistBody; public CharacterBody charbody; public GameObject effectObj; private int timesFired; private float timer; private bool hasFired; public uint burningSound; private void Start() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) timer = 0f; timesFired = 0; charbody = ((Component)this).gameObject.GetComponent<CharacterBody>(); effectObj = Object.Instantiate<GameObject>(Assets.arsonistFlareAttached, charbody.corePosition, Quaternion.LookRotation(Vector3.forward)); effectObj.transform.parent = ((Component)charbody).gameObject.transform; Util.PlaySound("Arsonist_Secondary_Flare_Projectile_Impact", ((Component)this).gameObject); burningSound = Util.PlaySound("Arsonist_Secondary_Flare_Projectile_Burning", ((Component)this).gameObject); } private void FixedUpdate() { //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Expected O, but got Unknown //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) //IL_00e0: 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_00f6: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_0067: 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_00a2: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)charbody)) { if (NetworkServer.active) { if (timer > StaticValues.flareInterval) { if (timesFired < StaticValues.flareTickNum) { timesFired++; timer = 0f; NetMessageExtensions.Send((INetMessage)(object)new TakeDamageNetworkRequest(charbody.masterObjectId, arsonistBody.masterObjectId, arsonistBody.damage * StaticValues.flareStrongDamageCoefficient / (float)StaticValues.flareTickNum, burn: true), (NetworkDestination)1); NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)charbody).netId, 3747272580u), (NetworkDestination)1); return; } hasFired = true; FireExplosion(); EffectManager.SpawnEffect(Assets.elderlemurianexplosionEffect, new EffectData { origin = charbody.transform.position, scale = StaticValues.flareBlastRadius, rotation = new Quaternion(0f, 0f, 0f, 0f) }, true); Object.Destroy((Object)(object)this); Object.Destroy((Object)(object)effectObj); } else { timer += Time.fixedDeltaTime; } } else if (timer > StaticValues.flareInterval * (float)StaticValues.flareTickNum) { timer += Time.fixedDeltaTime; } else { EffectManager.SpawnEffect(Assets.elderlemurianexplosionEffect, new EffectData { origin = charbody.transform.position, scale = StaticValues.flareBlastRadius, rotation = new Quaternion(0f, 0f, 0f, 0f) }, true); Object.Destroy((Object)(object)this); Object.Destroy((Object)(object)effectObj); } } else { Object.Destroy((Object)(object)effectObj); } } private void FireExplosion() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) BlastAttack val = new BlastAttack(); val.radius = StaticValues.flareBlastRadius; val.procCoefficient = 1f; val.teamIndex = (TeamIndex)1; val.position = charbody.transform.position; val.attacker = ((Component)arsonistBody).gameObject; val.crit = arsonistBody.RollCrit(); val.baseDamage = arsonistBody.damage * StaticValues.flareStrongDamageCoefficient; val.falloffModel = (FalloffModel)0; val.baseForce = 1f; val.damageType = (DamageType)128; val.Fire(); AkSoundEngine.PostEvent("Arsonist_Secondary_Flare_Explosion_New", ((Component)this).gameObject); FireSalvos(); } private void FireSalvos() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //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) //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_008d: 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_00a2: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { int value = Config.flareSalvoAmount.Value; Vector3 position = charbody.transform.position; float num = MathF.PI * 2f / (float)value; float num2 = 0f; for (int i = 0; i < value; i++) { float num3 = StaticValues.flareSalvoRadius * Mathf.Cos(num2); float num4 = StaticValues.flareSalvoRadius * Mathf.Sin(num2); float flareSalvoRadius = StaticValues.flareSalvoRadius; Vector3 val = new Vector3(num3, flareSalvoRadius, num4); Vector3 normalized = ((Vector3)(ref val)).normalized; FireProjectileSalvo(normalized, new Vector3(position.x + num3 / 9f, position.y, position.z + num4 / 9f)); num2 += num; } } } public void FireProjectileSalvo(Vector3 direction, Vector3 origin) { //IL_000b: 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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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) ProjectileManager.instance.FireProjectile(Projectiles.flareChildPrefab, new Vector3(origin.x, origin.y + 2f, origin.z), Util.QuaternionSafeLookRotation(direction), ((Component)arsonistBody).gameObject, StaticValues.flareStrongChildDamageCoefficient * arsonistBody.damage, Random.Range(1000f, 4000f), arsonistBody.RollCrit(), (DamageColorIndex)0, (GameObject)null, Random.Range(15f, 25f)); } private void OnDestroy() { AkSoundEngine.StopPlayingID(burningSound); if (!hasFired && charbody.hasEffectiveAuthority) { FireExplosion(); } Object.Destroy((Object)(object)effectObj); } } internal class FlareEffectControllerStrongChild : MonoBehaviour { public CharacterBody arsonistBody; public CharacterBody charbody; public GameObject effectObj; private int timesFired; private float timer; public uint burningSound; private void Start() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) timer = 0f; timesFired = 0; charbody = ((Component)this).gameObject.GetComponent<CharacterBody>(); effectObj = Object.Instantiate<GameObject>(Assets.arsonistFlareAttached, charbody.corePosition, Quaternion.LookRotation(Vector3.forward)); effectObj.transform.parent = ((Component)charbody).gameObject.transform; Util.PlaySound("Arsonist_Secondary_Flare_Projectile_Impact", ((Component)this).gameObject); burningSound = Util.PlaySound("Arsonist_Secondary_Flare_Projectile_Burning", ((Component)this).gameObject); } private void FixedUpdate() { //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_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_011a: Expected O, but got Unknown //IL_006d: 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_00a8: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)charbody)) { if (arsonistBody.hasEffectiveAuthority) { if (timer > StaticValues.flareInterval) { if (timesFired < StaticValues.flareTickNum) { timesFired++; timer = 0f; NetMessageExtensions.Send((INetMessage)(object)new TakeDamageNetworkRequest(charbody.masterObjectId, arsonistBody.masterObjectId, arsonistBody.dam