using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using ArsonistMod; using ArsonistMod.Content.Controllers; using ArsonistMod.Modules; using ArsonistMod.Modules.Characters; using ArsonistMod.Modules.Networking; using ArsonistMod.Modules.Survivors; using ArsonistMod.SkillStates; using ArsonistMod.SkillStates.Arsonist.Secondary; using ArsonistMod.SkillStates.ZeroPointBlast; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using BetterArsonist.Changes; using BetterArsonist.Modules; using EntityStates; using HarmonyLib; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using On.RoR2; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using RoR2; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2BepInExPack.GameAssetPaths.Version_1_39_0; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("ArsonistMod")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BetterArsonist")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("BetterArsonist")] [assembly: AssemblyTitle("BetterArsonist")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BetterArsonist { [BepInPlugin("com.Bloonjitsu7.BetterArsonist", "BetterArsonist", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Main : BaseUnityPlugin { public const string PluginGUID = "Bloonjitsu7.BetterArsonist"; public const string PluginAuthor = "Bloonjitsu7"; public const string PluginName = "BetterArsonist"; public const string PluginVersion = "1.0.0"; public void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); new ContentPacks().Initialize(); SurvivorChanges survivorChanges = new SurvivorChanges(); survivorChanges.Initialize(); } } internal static class Log { private 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 BetterArsonist.Modules { public static class DamageTypes { public static ModdedDamageType arsonistLifesteal = DamageAPI.ReserveDamageType(); } public static class States { internal static List entityStates = new List(); internal static void RegisterStates() { entityStates.Add(typeof(MasochismFire)); } } public static class Projectiles { internal static GameObject masoFireBall; public static GameObject baseFireBall = Addressables.LoadAssetAsync((object)RoR2_Base_LemurianBruiser.LemurianBigFireball_prefab).WaitForCompletion(); internal static List projectilePrefabs = new List(); internal static bool HasArsonistMod => Chainloader.PluginInfos.ContainsKey("com.PopcornFactory.Arsonist"); internal static void RegisterProjectiles() { if (HasArsonistMod) { CreateMasochismFireBall(); projectilePrefabs.Add(masoFireBall); } else { Log.Warning("Arsonist Not Found!"); } } private static void CreateMasochismFireBall() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) masoFireBall = PrefabAPI.InstantiateClone(baseFireBall, "masoFireBall", true); Rigidbody val = masoFireBall.GetComponent(); if (!Object.op_Implicit((Object)(object)val)) { val = masoFireBall.AddComponent(); } Object.DestroyImmediate((Object)(object)masoFireBall.GetComponent()); ProjectileImpactExplosion val2 = masoFireBall.AddComponent(); InitializeImpactExplosion(val2); ((ProjectileExplosion)val2).blastRadius = 5f; ((ProjectileExplosion)val2).blastProcCoefficient = 0.8f; val2.destroyOnEnemy = true; val2.destroyOnWorld = true; val2.lifetime = 4f; val2.impactEffect = Addressables.LoadAssetAsync((object)RoR2_Base_LemurianBruiser.OmniExplosionVFXLemurianBruiserFireballImpact_prefab).WaitForCompletion(); ((ProjectileExplosion)val2).falloffModel = (FalloffModel)3; ((ProjectileExplosion)val2).blastDamageCoefficient = 1f; val2.timerAfterImpact = false; val2.lifetimeAfterImpact = 0f; ((Component)val2).GetComponent().damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1); ProjectileController component = masoFireBall.GetComponent(); component.rigidbody = val; component.rigidbody.useGravity = false; component.rigidbody.mass = 1f; component.procCoefficient = 0.8f; component.ghostPrefab = AssetsArsonist.fireballWeakGhost; component.startSound = ""; } private static void InitializeImpactExplosion(ProjectileImpactExplosion projectileImpactExplosion) { //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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((ProjectileExplosion)projectileImpactExplosion).blastDamageCoefficient = 1f; ((ProjectileExplosion)projectileImpactExplosion).blastProcCoefficient = 1f; ((ProjectileExplosion)projectileImpactExplosion).blastRadius = 1f; ((ProjectileExplosion)projectileImpactExplosion).bonusBlastForce = Vector3.zero; ((ProjectileExplosion)projectileImpactExplosion).childrenCount = 0; ((ProjectileExplosion)projectileImpactExplosion).childrenDamageCoefficient = 0f; ((ProjectileExplosion)projectileImpactExplosion).childrenProjectilePrefab = null; projectileImpactExplosion.destroyOnEnemy = true; projectileImpactExplosion.destroyOnWorld = true; projectileImpactExplosion.detonateOnEnemy = true; projectileImpactExplosion.impactOnWorld = true; ((ProjectileExplosion)projectileImpactExplosion).falloffModel = (FalloffModel)0; ((ProjectileExplosion)projectileImpactExplosion).fireChildren = false; projectileImpactExplosion.lifetime = 0f; projectileImpactExplosion.lifetimeAfterImpact = 0f; projectileImpactExplosion.lifetimeRandomOffset = 0f; projectileImpactExplosion.offsetForLifetimeExpiredSound = 0f; projectileImpactExplosion.timerAfterImpact = false; ((Component)projectileImpactExplosion).GetComponent().damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1); } } public static class Buffs { internal static List buffDefs = new List(); internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown, bool isHidden) { //IL_0010: 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) BuffDef val = ScriptableObject.CreateInstance(); ((Object)val).name = buffName; val.buffColor = buffColor; val.canStack = canStack; val.isDebuff = isDebuff; val.eliteDef = null; val.iconSprite = buffIcon; val.isCooldown = isCooldown; val.isHidden = isHidden; buffDefs.Add(val); return val; } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public string identifier => "com.Bloonjitsu7.BloonModpackBaseMod"; public void Initialize() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown States.RegisterStates(); Projectiles.RegisterProjectiles(); ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; contentPack.buffDefs.Add(Buffs.buffDefs.ToArray()); contentPack.entityStateTypes.Add(States.entityStates.ToArray()); contentPack.projectilePrefabs.Add(Projectiles.projectilePrefabs.ToArray()); args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } } namespace BetterArsonist.Changes { public class SurvivorChanges : BaseState { private Hook fireSprayHook; private Hook flamethrowerHook; private Hook zeroPointHook; private ILHook zeroPointHookIL; private Hook flareSalvoHook; private Hook flareUpdateHook; private Hook flareUpdateHook2; private Hook flareEnterHook; private Hook masochismConHook; private Hook masochismConHook2; private Hook spiteConHook; private Hook spiteStartHook; private Hook addHeatHook; private Hook energyHook; private Hook arsonistHook; private static GameObject fireExplosionPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Common.TeamAreaIndicator__GroundOnly_prefab).WaitForCompletion(); public static GameObject lemfireBall = Addressables.LoadAssetAsync((object)"RoR2/Base/Lemurian/Fireball.prefab").WaitForCompletion(); public static float zeroPointJump = 0f; public static float zeroPointLongJump = 0f; public void Initialize() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Expected O, but got Unknown //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Expected O, but got Unknown //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Expected O, but got Unknown //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Expected O, but got Unknown //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Expected O, but got Unknown //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Expected O, but got Unknown //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Expected O, but got Unknown //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Expected O, but got Unknown //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Expected O, but got Unknown UpdateText(); SetupArsonist(); MethodInfo methodInfo = AccessTools.Method(typeof(FireSpray), "FireBall", (Type[])null, (Type[])null); fireSprayHook = new Hook((MethodBase)methodInfo, (Delegate)new Action, FireSpray>(OnFireBall)); MethodInfo methodInfo2 = AccessTools.Method(typeof(Flamethrower), "FixedUpdate", (Type[])null, (Type[])null); flamethrowerHook = new Hook((MethodBase)methodInfo2, (Delegate)new Action, Flamethrower>(OnFlamethrowerUpdate)); MethodInfo methodInfo3 = AccessTools.Method(typeof(ZeroPointBlastStart), "OnEnter", (Type[])null, (Type[])null); zeroPointHook = new Hook((MethodBase)methodInfo3, (Delegate)new Action, ZeroPointBlastStart>(OnZeroPointEnter)); MethodInfo methodInfo4 = AccessTools.Method(typeof(ZeroPointBlastStart), "OnEnter", (Type[])null, (Type[])null); zeroPointHookIL = new ILHook((MethodBase)methodInfo4, new Manipulator(IL_ZeroPointEnter)); MethodInfo methodInfo5 = AccessTools.Method(typeof(Flare), "OnEnter", (Type[])null, (Type[])null); flareEnterHook = new Hook((MethodBase)methodInfo5, (Delegate)new Action, Flare>(OnFlareEnter)); MethodInfo methodInfo6 = AccessTools.Method(typeof(FlareEffectControllerStrong), "FireSalvos", (Type[])null, (Type[])null); flareSalvoHook = new Hook((MethodBase)methodInfo6, (Delegate)new Action, FlareEffectControllerStrong>(OnFlareSalvo)); MethodInfo methodInfo7 = AccessTools.Method(typeof(FlareEffectControllerStrong), "FixedUpdate", (Type[])null, (Type[])null); flareUpdateHook = new Hook((MethodBase)methodInfo7, (Delegate)new Action, FlareEffectControllerStrong>(OnFlareUpdateStrong)); MethodInfo methodInfo8 = AccessTools.Method(typeof(FlareEffectControllerStrongChild), "FixedUpdate", (Type[])null, (Type[])null); flareUpdateHook2 = new Hook((MethodBase)methodInfo8, (Delegate)new Action, FlareEffectControllerStrongChild>(OnFlareUpdateChild)); MethodInfo methodInfo9 = AccessTools.Method(typeof(MasochismController), "Start", (Type[])null, (Type[])null); masochismConHook = new Hook((MethodBase)methodInfo9, (Delegate)new Action, MasochismController>(OnMasochismControllerStart)); MethodInfo methodInfo10 = AccessTools.Method(typeof(MasochismController), "DetermineMasoActivateable", (Type[])null, (Type[])null); masochismConHook2 = new Hook((MethodBase)methodInfo10, (Delegate)new Action, MasochismController>(OnMasoActivatable)); MethodInfo methodInfo11 = AccessTools.Method(typeof(SpiteController), "ActivateMaso", (Type[])null, (Type[])null); spiteConHook = new Hook((MethodBase)methodInfo11, (Delegate)new Action, SpiteController>(OnSpiteActivated)); MethodInfo methodInfo12 = AccessTools.Method(typeof(SpiteController), "Start", (Type[])null, (Type[])null); spiteStartHook = new Hook((MethodBase)methodInfo12, (Delegate)new Action, SpiteController>(OnSpiteStart)); MethodInfo methodInfo13 = AccessTools.Method(typeof(EnergySystem), "AddHeat", new Type[2] { typeof(float), typeof(bool) }, (Type[])null); addHeatHook = new Hook((MethodBase)methodInfo13, (Delegate)new Action, EnergySystem, float, bool>(OnAddHeat)); MethodInfo methodInfo14 = AccessTools.Method(typeof(EnergySystem), "CalculateEnergyStats", (Type[])null, (Type[])null); energyHook = new Hook((MethodBase)methodInfo14, (Delegate)new Action, EnergySystem>(OnCalculateEnergy)); HealthComponent.TakeDamage += new hook_TakeDamage(OnTakeDamageMasochism); DotController.InflictDot_refInflictDotInfo += new hook_InflictDot_refInflictDotInfo(OnInflictDot); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnArsonistStats); } public void SetupArsonist() { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) StaticValues.overheatAttackSpeedDebuff = 1f; StaticValues.flamethrowerWeakDamageCoefficient = 0.75f; StaticValues.flamethrowerStrongDamageCoefficient = 0.75f; StaticValues.altFlamethrowerWeakDamageCoefficient = 0.9f; StaticValues.altFlamethrowerStrongDamageCoefficient = 0.9f; StaticValues.flamethrowerBaseTickRate = 3; StaticValues.flamethrowerEnergyCost = 20f; StaticValues.zeropointpounchDamageCoefficient = 3.5f; StaticValues.flareSalvoRadius = 15f; StaticValues.flareStrongDamageCoefficient = 3f; StaticValues.flareStrongChildDamageCoefficient = 3f; Config.masochismSurgeHealOnHitPercentage.Value = 0f; StaticValues.masochismSurgeMoveSpeedMultiplier = 1f; StaticValues.masochismBasePulseSelfDamageTimer = 9999f; StaticValues.masochismSurgeSelfDamage = 0f; StaticValues.masochismEnergyIncreaseOverTimePercentage = 0.05f; StaticValues.masochismSurgeMultiplierPerStack = 1f; StaticValues.masochismSurgeFinalBlastCoefficient = 3f; StaticValues.cleanseDamageCoefficient = 1.5f; StaticValues.SegmentedValuesOnGaugeAlt = new Vector3(0.625f, 0.275f, 0.1f); StaticValues.levelEnergy = 0f; StaticValues.backupEnergyGain = 0f; StaticValues.lysateEnergyGain = 0f; StaticValues.hardlightEnergyGain = 0f; StaticValues.levelBlueEnergy = 0f; StaticValues.backupBlueGain = 0f; StaticValues.lysateBlueGain = 0f; StaticValues.hardlightBlueGain = 0f; Config.masochismMinimumRequiredToActivate.Value = 1; Arsonist.neoMasochismSkillDef.activationState = new SerializableEntityStateType(typeof(MasochismFire)); } private void UpdateText() { string text = "Heat Gauge Your skills can build up or vent Heat. Heat automatically cools over time, scaling with attack speed. If Heat builds up past 100, you Overheat."; LanguageAPI.Add("KEYWORD_MODDED_GAUGE", text); string text2 = "Heat Builds up Heat when used. If used in Overheat, you take damage instead."; LanguageAPI.Add("KEYWORD_MODDED_HEAT", text2); string text3 = "Overheat While in Overheat, you move 25% faster and some skills have longer cooldowns. All skills that build up additional Heat cause you to take damage proporational to the Heat."; LanguageAPI.Add("KEYWORD_MODDED_OVERHEAT", text3); string text4 = "Anticipation For every 100 Heat lost and/or gained, recieve 1 stack of Anticipation, up to maximum of 10. Your special skills require Anticipation to use."; LanguageAPI.Add("KEYWORD_MODDED_ANTICIPATION", text4); string text5 = "Heat Gauge. Your skills deal standard damage in all portions of the gauge."; LanguageAPI.Add("MODDED_ARSONIST_BODY_PASSIVE_NORMAL_GAUGE_DESCRIPTION", text5); string text6 = "Heat Gauge. Your skills deal 0.7x damage while in the white portion of the gauge, and 2.5x damage in the blue portion."; LanguageAPI.Add("MODDED_ARSONIST_BODY_PASSIVE_BLUE_GAUGE_DESCRIPTION", text6); ArsonistPassive component = CharacterBase.instance.bodyPrefab.GetComponent(); component.normalGaugePassive.skillDescriptionToken = "MODDED_ARSONIST_BODY_PASSIVE_NORMAL_GAUGE_DESCRIPTION"; component.normalGaugePassive.keywordTokens = new string[2] { "KEYWORD_MODDED_GAUGE", "KEYWORD_MODDED_OVERHEAT" }; component.blueGaugePassive.skillDescriptionToken = "MODDED_ARSONIST_BODY_PASSIVE_BLUE_GAUGE_DESCRIPTION"; component.blueGaugePassive.keywordTokens = new string[2] { "KEYWORD_MODDED_GAUGE", "KEYWORD_MODDED_OVERHEAT" }; string text7 = "Heat. Ignite. Fire a ball of fire that deals 225% damage in an area on impact."; LanguageAPI.Add("MODDED_ARSONIST_BODY_PRIMARY_FIREBALL_DESCRIPTION", text7); Arsonist.primarySkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_PRIMARY_FIREBALL_DESCRIPTION"; Arsonist.primarySkillDef.keywordTokens = new string[2] { "KEYWORD_MODDED_HEAT", "KEYWORD_IGNITE" }; string text8 = "Heat. Ignite. Fire a beam of fire that deals 450% damage per second. Has increased ignite chance the closer you are to the target."; LanguageAPI.Add("MODDED_ARSONIST_BODY_PRIMARY_FLAMETHROWER_DESCRIPTION", text8); Arsonist.flamethrowerSkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_PRIMARY_FLAMETHROWER_DESCRIPTION"; Arsonist.flamethrowerSkillDef.keywordTokens = new string[2] { "KEYWORD_MODDED_HEAT", "KEYWORD_IGNITE" }; string text9 = "Vents 30% of your Current Heat. Fire a flare that can stick to enemies, dealing 500% damage over 5s before exploding into 5 additional flares. Deals 20% more damage per stack of ignite on the enemy if not in Overheat."; LanguageAPI.Add("MODDED_ARSONIST_BODY_SECONDARY_FLARE_DESCRIPTION", text9); Arsonist.flareSkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_SECONDARY_FLARE_DESCRIPTION"; Arsonist.flareSkillDef.keywordTokens = new string[1] { "KEYWORD_MODDED_OVERHEAT" }; string text10 = "Agile. Vents 50% of your Current Heat to launch yourself forwards, blasting enemies for 350% damage. Launch distance increases with the amount of Heat vented, and it deals no damage in Overheat."; LanguageAPI.Add("MODDED_ARSONIST_BODY_SECONDARY_PUNCH_DESCRIPTION", text10); Arsonist.punchSkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_SECONDARY_PUNCH_DESCRIPTION"; Arsonist.punchSkillDef.keywordTokens = new string[2] { "KEYWORD_AGILE", "KEYWORD_MODDED_OVERHEAT" }; string text11 = "Agile. Vents 50% TOTAL Heat. While not in Overheat, briefly increases your movement speed and health regeneration, and ignites nearby foes for 150% damage. Accelerates cooling in Overheat, at the cost of a much longer recharge time."; LanguageAPI.Add("MODDED_ARSONIST_BODY_UTILITY_CLEANSE_DESCRIPTION", text11); Arsonist.cleanseSkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_UTILITY_CLEANSE_DESCRIPTION"; Arsonist.cleanseSkillDef.keywordTokens = new string[2] { "KEYWORD_AGILE", "KEYWORD_MODDED_OVERHEAT" }; string text12 = "Ignite. Cannot be used in Overheat. Consumes all Anticipation to launch a spread of 5 fireballs with 20% lifesteal, each dealing 60% damage per Anticipation stack. Overheat immediately after."; LanguageAPI.Add("MODDED_ARSONIST_BODY_SPECIAL_MASOCHISM_DESCRIPTION", text12); Arsonist.neoMasochismSkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_SPECIAL_MASOCHISM_DESCRIPTION"; Arsonist.neoMasochismSkillDef.keywordTokens = new string[3] { "KEYWORD_MODDED_ANTICIPATION", "KEYWORD_IGNITE", "KEYWORD_MODDED_OVERHEAT" }; string text13 = "Resets your Heat Gauge. For 1s per Anticipation stack, gain Double Tap and convert 100% of incoming damage into fire damage over time. Once this effect ends, Overheat and detonate in an area around you for 300% damage per Anticipation stack used."; LanguageAPI.Add("MODDED_ARSONIST_BODY_SPECIAL_SPITE_DESCRIPTION", text13); Arsonist.masochismSurgeSkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_SPECIAL_SPITE_DESCRIPTION"; Arsonist.masochismSurgeSkillDef.keywordTokens = new string[3] { "KEYWORD_MODDED_ANTICIPATION", "POPCORN_ARSONIST_BODY_KEYWORD_MASO_DOUBLE_TAP", "KEYWORD_MODDED_OVERHEAT" }; } public void OnArsonistHook(Action orig, ArsonistPlugin self) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown orig(self); DotController.InflictDot_refInflictDotInfo -= new hook_InflictDot_refInflictDotInfo(self.DotController_InflictDot_refInflictDotInfo); } private void OnTakeDamageMasochism(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0085: 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_009a: Invalid comparison between Unknown and I4 //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Invalid comparison between Unknown and I4 //IL_0071: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013d: 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)) { if ((Object)(object)damageInfo.attacker != (Object)null) { CharacterBody component = damageInfo.attacker.GetComponent(); if ((Object)(object)component != (Object)null && DamageAPI.HasModdedDamageType(damageInfo, DamageTypes.arsonistLifesteal)) { component.healthComponent.Heal(damageInfo.damage * 0.2f, default(ProcChainMask), true); } } bool flag = false; _ = damageInfo.dotIndex; if (true) { flag = (int)damageInfo.dotIndex == 1 || (int)damageInfo.dotIndex == 2 || (int)damageInfo.dotIndex == 7; } BuffDef masochismSurgeActiveBuff = Buffs.masochismSurgeActiveBuff; if (self.body.HasBuff(Buffs.masochismSurgeActiveBuff) && !flag) { float damage = damageInfo.damage; InflictDotInfo val = default(InflictDotInfo); val.totalDamage = damage; val.damageMultiplier = 1f; val.attackerObject = ((Component)self.body).gameObject; val.victimObject = ((Component)self.body).gameObject; val.duration = 5f; val.dotIndex = (DotIndex)1; InflictDotInfo val2 = val; DotController.InflictDot(ref val2); damageInfo.damage = 0f; } } orig.Invoke(self, damageInfo); } private void OnInflictDot(orig_InflictDot_refInflictDotInfo orig, ref InflictDotInfo inflictDotInfo) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Invalid comparison between Unknown and I4 //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Invalid comparison between Unknown and I4 //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Invalid comparison between Unknown and I4 if ((Object)(object)inflictDotInfo.victimObject != (Object)null && (Object)(object)inflictDotInfo.attackerObject != (Object)null && (Object)(object)inflictDotInfo.victimObject == (Object)(object)inflictDotInfo.attackerObject) { CharacterBody component = inflictDotInfo.victimObject.GetComponent(); if ((Object)(object)component != (Object)null && component.baseNameToken == "POPCORN_ARSONIST_BODY_NAME" && ((int)inflictDotInfo.dotIndex == 1 || (int)inflictDotInfo.dotIndex == 2 || (int)inflictDotInfo.dotIndex == 7) && inflictDotInfo.damageMultiplier == 0f) { Log.Message("Success!"); inflictDotInfo.damageMultiplier = 1f; } } orig.Invoke(ref inflictDotInfo); } public void OnCalculateEnergy(Action orig, EnergySystem self) { orig(self); self.costmultiplierOverheat = 1f; self.costflatOverheat = 0f; } private void OnArsonistStats(CharacterBody sender, StatHookEventArgs args) { EnergySystem component = ((Component)sender).GetComponent(); if ((Object)(object)component != (Object)null && component.currentOverheat >= component.maxOverheat) { args.moveSpeedMultAdd += 0.25f; } BuffDef cleanseSpeedBoost = Buffs.cleanseSpeedBoost; if (sender.HasBuff(cleanseSpeedBoost)) { args.baseRegenAdd += 5f; args.levelRegenAdd += 1f; } } public void OnAddHeat(Action orig, EnergySystem self, float Energy, bool isNatural) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown if (Energy > 0f && self.currentOverheat >= self.maxOverheat && (Object)(object)self.characterBody.healthComponent != (Object)null) { DamageInfo val = new DamageInfo { attacker = null, crit = false, damage = self.characterBody.healthComponent.fullCombinedHealth * (Energy / 200f), damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)64), (DamageTypeExtended)262144, (DamageSource)0), damageColorIndex = (DamageColorIndex)3, inflictor = ((Component)self.characterBody).gameObject, position = ((Component)self.characterBody).gameObject.transform.position, procCoefficient = 0f }; self.characterBody.healthComponent.TakeDamage(val); self.currentOverheat += Energy; } else { orig(self, Energy, isNatural); } } public void OnSpiteActivated(Action orig, SpiteController self) { orig(self); self.masoStacks++; } public void OnSpiteStart(Action orig, SpiteController self) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) orig(self); self.finalBlastAttack.attackerFiltering = (AttackerFiltering)2; } public void OnMasochismControllerStart(Action orig, MasochismController self) { Config.masochismMinimumRequiredToActivate.Value = 1; orig(self); } public void OnMasoActivatable(Action orig, MasochismController self) { if (self.energySystem.currentOverheat < self.energySystem.maxOverheat) { orig(self); } else { self.skillLoc.special.stock = 0; } } public void OnFlareSalvo(Action orig, FlareEffectControllerStrong self) { //IL_001d: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ac: 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_00cd: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { int num = 5; Vector3 position = self.charbody.transform.position; float num2 = MathF.PI * 2f / (float)num; float num3 = 0f; Log.Message(self.charbody.radius); for (int i = 0; i < num; i++) { float num4 = StaticValues.flareSalvoRadius * Mathf.Cos(num3); float num5 = StaticValues.flareSalvoRadius * Mathf.Sin(num3); float flareSalvoRadius = StaticValues.flareSalvoRadius; Vector3 val = new Vector3(num4, flareSalvoRadius, num5); Vector3 normalized = ((Vector3)(ref val)).normalized; self.FireProjectileSalvo(normalized, new Vector3(position.x + num4 / 9f * self.charbody.radius, position.y, position.z + num5 / 9f * self.charbody.radius)); num3 += num2; } } } public void OnFlareUpdateStrong(Action orig, FlareEffectControllerStrong self) { //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_0107: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)self.charbody)) { if (NetworkServer.active) { if (self.timer > StaticValues.flareInterval) { if (self.timesFired < StaticValues.flareTickNum) { EnergySystem component = ((Component)self.arsonistBody).GetComponent(); float num = self.arsonistBody.damage * StaticValues.flareStrongDamageCoefficient / (float)StaticValues.flareTickNum; if ((self.charbody.HasBuff(Buffs.OnFire) || self.charbody.HasBuff(Buffs.StrongerBurn)) && component.currentOverheat < component.maxOverheat) { num *= 1f + (float)(self.charbody.GetBuffCount(Buffs.OnFire) + self.charbody.GetBuffCount(Buffs.StrongerBurn)) * 0.2f; } self.timesFired++; self.timer = 0f; NetMessageExtensions.Send((INetMessage)new TakeDamageNetworkRequest(self.charbody.masterObjectId, self.arsonistBody.masterObjectId, num, true), (NetworkDestination)1); NetMessageExtensions.Send((INetMessage)new PlaySoundNetworkRequest(((NetworkBehaviour)self.charbody).netId, 3747272580u), (NetworkDestination)1); } else { self.hasFired = true; self.FireExplosion(); EffectManager.SpawnEffect(AssetsArsonist.elderlemurianexplosionEffect, new EffectData { origin = self.charbody.transform.position, scale = StaticValues.flareBlastRadius, rotation = new Quaternion(0f, 0f, 0f, 0f) }, true); Object.Destroy((Object)(object)self); Object.Destroy((Object)(object)self.effectObj); } } else { self.timer += Time.fixedDeltaTime; } } else if (self.timer > StaticValues.flareInterval * (float)StaticValues.flareTickNum) { self.timer += Time.fixedDeltaTime; } else { EffectManager.SpawnEffect(AssetsArsonist.elderlemurianexplosionEffect, new EffectData { origin = self.charbody.transform.position, scale = StaticValues.flareBlastRadius, rotation = new Quaternion(0f, 0f, 0f, 0f) }, true); Object.Destroy((Object)(object)self); Object.Destroy((Object)(object)self.effectObj); } } else { Object.Destroy((Object)(object)self.effectObj); } } public void OnFlareUpdateChild(Action orig, FlareEffectControllerStrongChild self) { //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_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0178: 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: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)self.charbody)) { if (((NetworkBehaviour)self.arsonistBody).hasAuthority) { if (self.timer > StaticValues.flareInterval) { if (self.timesFired < StaticValues.flareTickNum) { EnergySystem component = ((Component)self.arsonistBody).GetComponent(); float num = self.arsonistBody.damage * StaticValues.flareStrongDamageCoefficient / (float)StaticValues.flareTickNum; if ((self.charbody.HasBuff(Buffs.OnFire) || self.charbody.HasBuff(Buffs.StrongerBurn)) && component.currentOverheat < component.maxOverheat) { num *= 1f + (float)(self.charbody.GetBuffCount(Buffs.OnFire) + self.charbody.GetBuffCount(Buffs.StrongerBurn)) * 0.2f; } self.timesFired++; self.timer = 0f; NetMessageExtensions.Send((INetMessage)new TakeDamageNetworkRequest(self.charbody.masterObjectId, self.arsonistBody.masterObjectId, num, true), (NetworkDestination)1); } else { self.FireExplosion(); EffectManager.SpawnEffect(AssetsArsonist.elderlemurianexplosionEffect, new EffectData { origin = self.charbody.transform.position, scale = StaticValues.flareBlastRadius, rotation = new Quaternion(0f, 0f, 0f, 0f) }, true); Object.Destroy((Object)(object)self); Object.Destroy((Object)(object)self.effectObj); } } else { self.timer += Time.fixedDeltaTime; } } else if (self.timer > StaticValues.flareInterval * (float)StaticValues.flareTickNum) { self.timer += Time.fixedDeltaTime; } else { EffectManager.SpawnEffect(AssetsArsonist.elderlemurianexplosionEffect, new EffectData { origin = self.charbody.transform.position, scale = StaticValues.flareBlastRadius, rotation = new Quaternion(0f, 0f, 0f, 0f) }, true); Object.Destroy((Object)(object)self); Object.Destroy((Object)(object)self.effectObj); } } else { Object.Destroy((Object)(object)self); Object.Destroy((Object)(object)self.effectObj); } } public void OnFlareEnter(Action orig, Flare self) { orig(self); self.isStrong = true; } public void OnZeroPointEnter(Action orig, ZeroPointBlastStart self) { self.energySystem = ((Component)((EntityState)self).characterBody).gameObject.GetComponent(); bool flag = self.energySystem.currentOverheat < self.energySystem.maxOverheat && ((EntityState)self).isAuthority; if (flag) { zeroPointJump = 4f * (1f + self.energySystem.currentOverheat * StaticValues.zeropointHeatReductionMultiplier * 0.02f); ZeroPointBlastStart.initialSpeedCoefficient = 7f * (1f + self.energySystem.currentOverheat * StaticValues.zeropointHeatReductionMultiplier * 0.012f); ZeroPointBlastStart.finalSpeedCoefficient = 4f * (1f + self.energySystem.currentOverheat * StaticValues.zeropointHeatReductionMultiplier * 0.012f); } else { zeroPointJump = 8f; ZeroPointBlastStart.initialSpeedCoefficient = 11.2f; ZeroPointBlastStart.finalSpeedCoefficient = 6.4f; } zeroPointLongJump = zeroPointJump * 1.5f; orig(self); if (!flag) { self.blastAttack.baseDamage = 0f; self.damageCoefficient = 0f; } } public void IL_ZeroPointEnter(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_000b: 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_008d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; if (val2.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 6f) })) { val.Next.Operand = zeroPointLongJump; ILCursor val4 = val; if (val4.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 4f) })) { val.Next.Operand = zeroPointJump; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void OnFlamethrowerUpdate(Action orig, Flamethrower self) { self.interval = self.duration / 3f; self.energyCost = self.Energy * ((EntityState)self).characterBody.attackSpeed; orig(self); } public void OnFireBall(Action orig, FireSpray self) { //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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) self.energySystem.AddHeat(self.energyCost); Ray aimRay = ((BaseState)self).GetAimRay(); float num = (self.isBlue ? self.altStrongDamageCoefficient : self.strongdamageCoefficient); Vector3 displacedOrigin = self.GetDisplacedOrigin(aimRay); if (((EntityState)self).isAuthority) { ProjectileManager.instance.FireProjectile(Projectiles.artificerFirebolt, displacedOrigin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)self).gameObject, ((BaseState)self).damageStat * num, self.strongforce, Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, self.strongspeedOverride, (DamageTypeCombo?)new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)128), (DamageTypeExtended)0, (DamageSource)1)); } } } public class MasochismFire : BaseSkillState { private Animator animator; public MasochismController maso; public ArsonistController arsonistCon; public float stopwatch; public static float baseActivationTime = 0.16f; public static float baseDuration = 0.75f; public float duration; public EnergySystem energySystem; public override void OnEnter() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: 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_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); energySystem = ((Component)((EntityState)this).characterBody).gameObject.GetComponent(); maso = ((Component)((EntityState)this).characterBody).gameObject.GetComponent(); ((EntityState)this).characterBody.isSprinting = false; Ray aimRay = ((BaseState)this).GetAimRay(); duration = 0.75f / ((EntityState)this).characterBody.attackSpeed; ((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(); Transform val = modelChildLocator.FindChild("GunMuzzle"); Vector3 displacedOrigin = GetDisplacedOrigin(aimRay); float num = (float)maso.masoStacks * 0.6f; float num2 = 0f; float num3 = 0f; bool crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); if (((EntityState)this).isAuthority) { DamageTypeCombo value = default(DamageTypeCombo); for (int num4 = 5; num4 > 0; num4--) { switch (num4) { case 1: num2 = 0f; num3 = -3f; break; case 2: num2 = 3f; num3 = -0.75f; break; case 3: num2 = -3f; num3 = -0.75f; break; case 4: num2 = 1.75f; num3 = 2.5f; break; case 5: num2 = -1.75f; num3 = 2.5f; break; } Vector3 val2 = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f, 0f, 1f, 1f, num2, num3); FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = Projectiles.masoFireBall; val3.position = displacedOrigin; val3.rotation = Util.QuaternionSafeLookRotation(val2); val3.owner = ((EntityState)this).gameObject; val3.damage = ((BaseState)this).damageStat * num; val3.force = 500f; val3.crit = crit; ((FireProjectileInfo)(ref val3)).speedOverride = 80f; ((DamageTypeCombo)(ref value))..ctor(DamageTypeCombo.op_Implicit((DamageType)128), (DamageTypeExtended)0, (DamageSource)8); DamageAPI.AddModdedDamageType(ref value, DamageTypes.arsonistLifesteal); val3.damageTypeOverride = value; ProjectileManager.instance.FireProjectile(val3); } } Util.PlaySound("Play_lunar_wisp_attack2_launch", ((EntityState)this).gameObject); float num5 = 3200f; if (((BaseState)this).isGrounded) { num5 *= 0.25f; } ((EntityState)this).characterMotor.ApplyForce(((Ray)(ref aimRay)).direction * (0f - num5), false, false); energySystem.AddHeat(energySystem.maxOverheat * 2f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); maso.masoStacks = 0; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } 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 Vector3 GetDisplacedOrigin(Ray aimRay) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) float num = 2.5f; float num2 = 1.25f; Vector3 direction; Vector3 result; if (!CheckLookingDown(aimRay)) { Vector3 origin = ((Ray)(ref aimRay)).origin; direction = ((Ray)(ref aimRay)).direction; result = origin + num2 * ((Vector3)(ref direction)).normalized; } else { Vector3 origin2 = ((Ray)(ref aimRay)).origin; direction = ((Ray)(ref aimRay)).direction; result = origin2 + num * ((Vector3)(ref direction)).normalized; } return result; } private bool CheckLookingDown(Ray aimRay) { //IL_0003: 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) return Vector3.Dot(((Ray)(ref aimRay)).direction, Vector3.down) > 0.6f; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }