using System; using System.CodeDom.Compiler; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using System.Threading.Tasks; using AncientScepter; using ArtificerExtended.Components; using ArtificerExtended.Helpers; using ArtificerExtended.Modules; using ArtificerExtended.Passive; using ArtificerExtended.Skills; using ArtificerExtended.States; using ArtificerExtended.Unlocks; using Assets.RoR2.Scripts.Platform; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Huntress; using EntityStates.Mage; using EntityStates.Mage.Weapon; using EntityStates.Seeker; using EntityStates.Toolbot; using JetBrains.Annotations; using JetHack; using KinematicCharacterController; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates; using On.EntityStates.Mage; using On.EntityStates.Mage.Weapon; using On.RoR2; using On.RoR2.Skills; using On.RoR2.UI; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using RainrotSharedUtils; using RainrotSharedUtils.Components; using RainrotSharedUtils.Frost; using Rewired.ComponentControls.Effects; using RiskyMod.Survivors.Mage.Components; using RoR2; using RoR2.Achievements; using RoR2.ContentManagement; using RoR2.EntityLogic; using RoR2.ExpansionManagement; using RoR2.Networking; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.UI; using RoR2BepInExPack.GameAssetPaths; using RoR2BepInExPack.GameAssetPathsBetter; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.ResourceManagement.AsyncOperations; using VRAPI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("ArtificerExtended")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ArtificerExtended")] [assembly: AssemblyTitle("ArtificerExtended")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] [module: UnverifiableCode] namespace ArtificerExtended { [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.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [R2APISubmoduleDependency(new string[] { "LanguageAPI", "LoadoutAPI", "PrefabAPI", "UnlockableAPI", "SkillsAPI", "DamageAPI", "RecalculateStatsAPI", "DeployableAPI", "Skins", "NetworkingAPI" })] [BepInPlugin("com.Borbo.ArtificerExtended", "ArtificerExtended", "4.0.29")] public class ArtificerExtendedPlugin : BaseUnityPlugin { public delegate TCheese GiveCheese(); private class FlamethrowerContext { public AltArtiPassive passive; public float timer; public FlamethrowerContext(AltArtiPassive passive) { this.passive = passive; timer = 0f; } } private class PrepWallContext { public AltArtiPassive passive; public AltArtiPassive.BatchHandle handle; public PrepWallContext(AltArtiPassive passive, AltArtiPassive.BatchHandle handle) { this.passive = passive; this.handle = handle; } } private class NanoBombContext { public AltArtiPassive passive; public AltArtiPassive.BatchHandle handle; public float timer; public NanoBombContext(AltArtiPassive passive, AltArtiPassive.BatchHandle handle) { this.passive = passive; this.handle = handle; timer = 0f; } } public const string guid = "com.Borbo.ArtificerExtended"; public const string modName = "ArtificerExtended"; public const string teamName = "Borbo"; public const string version = "4.0.29"; public static ArtificerExtendedPlugin instance; public const string iconsPath = "Assets/Icons/"; public const string DEVELOPER_PREFIX = "AE_"; public const string achievementIdentifier = "_ACHIEVEMENT_NAME"; public static bool isJethackLoaded = Tools.isLoaded("JetHack.JetHackPlugin.guid"); public static bool isScepterLoaded = Tools.isLoaded("com.DestroyedClone.AncientScepter"); public static bool autosprintLoaded = Tools.isLoaded("com.johnedwa.RTAutoSprintEx"); public static bool is2r4rLoaded = Tools.isLoaded("com.HouseOfFruits.RiskierRain"); public static bool isRiskyModLoaded = Tools.isLoaded("com.RiskyLives.RiskyMod"); public static GameObject mageObject; public static CharacterBody mageBody; public static SkillLocator mageSkillLocator; public static GenericSkill magePassive; public static SkillFamily magePassiveFamily; public static SkillFamily magePrimary; public static SkillFamily mageSecondary; public static SkillFamily mageUtility; public static SkillFamily mageSpecial; public static float artiBoltDamage = 2.8f; public static float artiNanoDamage = 20f; public static float artiUtilCooldown = 12f; public static float meleeRangeChannel = 21f; public static float meleeRangeSingle = meleeRangeChannel + 7f; private static bool LegacyIonSurge; public static List entityStates = new List(); public static List Skills = new List(); public static Dictionary SkillStatusDictionary = new Dictionary(); private readonly Dictionary flamethrowerContext = new Dictionary(); private readonly Dictionary prepWallContext = new Dictionary(); private readonly Dictionary nanoBombContext = new Dictionary(); public const string ThunderSurgeHitBoxGroupName = "IonCharge"; public static Material ionSurgePowerOverlay; public static BuffDef ionSurgePower; public static GameObject muzzleflashIonSurgeTrail; public static string surgeFullDesc = "Stunning. Surge forward, dealing " + Tools.ConvertDecimal(SurgeExtendedDash.grazeDamageCoefficient) + " damage to enemies in your path. Upon impact, create an explosion for " + Tools.ConvertDecimal(SurgeExtendedDash.impactDamageCoefficient) + " damage."; public static AssetBundle iconBundle => Tools.mainAssetBundle; internal static ConfigFile CustomConfigFile { get; set; } public static ConfigEntry RecolorMeteor { get; set; } public static bool ShouldReworkIonSurge { get; set; } private void Awake() { //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Expected O, but got Unknown instance = this; Materials.SwapShadersFromMaterialsInBundle(iconBundle); Config.Init(); Log.Init(((BaseUnityPlugin)this).Logger); InitializeConfig(); LegacyIonSurge = ConfigManager.DualBindToConfig("ArtificerExtended", Config.MyConfig, "Legacy Ion Surge", defaultValue: false, "!!!! WARNING: Using Ion Surge with this config set to TRUE may cause issues with other abilities; these bugs WILL NOT be fixed, so USE WITH CAUTION !!!! (Reverts Ion Surge rework back to vanilla functionality.)"); Language.Init(); CommonAssets.Init(); AddHooks(); mageObject = LegacyResourcesAPI.Load("prefabs/characterbodies/MageBody"); mageBody = mageObject.GetComponent(); ElementCounter elementCounter = mageObject.AddComponent(); elementCounter.body = mageBody; mageSkillLocator = mageObject.GetComponent(); if (Object.op_Implicit((Object)(object)mageObject) && Object.op_Implicit((Object)(object)mageBody) && Object.op_Implicit((Object)(object)mageSkillLocator)) { ArtificerExtended.Modules.Skills.characterSkillLocators.Add("MageBody", mageSkillLocator); Log.Debug("AE Skill Setup succeeded!"); } magePassive = CreateMagePassiveSlot(mageObject, mageSkillLocator); magePassiveFamily = magePassive.skillFamily; magePrimary = mageSkillLocator.primary.skillFamily; mageSecondary = mageSkillLocator.secondary.skillFamily; mageUtility = mageSkillLocator.utility.skillFamily; mageSpecial = mageSkillLocator.special.skillFamily; Log.Debug("ArtificerExtended setup succeeded!"); CreateMagePassives(magePassiveFamily); DoSurgeReworkAssetSetup(); SkillCatalog.Init += new hook_Init(ReplaceSkillDefs); if (is2r4rLoaded) { artiNanoDamage = 12f; artiUtilCooldown = 8f; } ArtiChanges(); InitializeContent(); InitializeSkins(); CharacterMaster.OnBodyStart += new hook_OnBodyStart(AddAEBodyFX); new ContentPacks().Initialize(); } private void InitializeSkins() { //IL_001f: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_016c: 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_0185: Unknown result type (might be due to invalid IL or missing references) //IL_019b: 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_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) Renderer[] componentsInChildren = mageObject.GetComponentsInChildren(true); ModelSkinController componentInChildren = mageObject.GetComponentInChildren(); GameObject gameObject = ((Component)componentInChildren).gameObject; Sprite icon = Skins.CreateSkinIcon(Color.white, new Color(1f, 0f, 0f), new Color(0.8f, 0.2f, 0.2f), new Color(0.3f, 0f, 0f)); UnlockableDef val = UnlockBase.CreateUnlockDef(typeof(SuperbugUnlock), icon); bool flag = ConfigManager.DualBindToConfig("Skins : Lousy Bug", Config.MyConfig, "Bypass Unlock", defaultValue: false, ""); LanguageAPI.Add("ARTIFICEREXTENDED_SKIN_SUPERBUG", "Lousy Bug"); SkinDefInfo val2 = new SkinDefInfo { Icon = icon, Name = "Superbug", NameToken = "ARTIFICEREXTENDED_SKIN_SUPERBUG", RootObject = gameObject, BaseSkins = (SkinDef[])(object)new SkinDef[1] { componentInChildren.skins[0] }, UnlockableDef = (flag ? null : val), GameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[0], RendererInfos = (RendererInfo[])(object)new RendererInfo[2] { new RendererInfo { defaultMaterial = null, defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false, renderer = componentsInChildren[6] }, new RendererInfo { defaultMaterial = iconBundle.LoadAsset("Assets/SuperbugSkin/matBug.mat").SetHopooMaterial(), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false, renderer = componentsInChildren[7] } }, MeshReplacements = (MeshReplacement[])(object)new MeshReplacement[2] { new MeshReplacement { mesh = null, renderer = componentsInChildren[6] }, new MeshReplacement { mesh = iconBundle.LoadAsset("Assets/SuperbugSkin/BugMesh.mesh"), renderer = componentsInChildren[7] } }, ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[0], MinionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[0] }; Skins.AddSkinToCharacter(mageObject, SkinDefInfo.op_Implicit(val2)); } public static bool BodyHasAncientScepterItem(CharacterBody body) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return false; } if (!isScepterLoaded) { return false; } return _BodyHasAncientScepterItem(body); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static bool _BodyHasAncientScepterItem(CharacterBody body) { return body.inventory.GetItemCount(((ItemBase)ItemBase.instance).ItemDef) > 0; } private void InitializeContent() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); BeginInitializing(types, "SwanSongSkills.txt"); } private void BeginInitializing(Type[] allTypes, string fileName = "") where T : SharedBase { Type baseType = typeof(T); if (!baseType.IsAbstract) { Log.Error(Log.Combine() + "Incorrect BaseType: " + baseType.Name); return; } IEnumerable enumerable = allTypes.Where((Type type) => !type.IsAbstract && type.IsSubclassOf(baseType)); if (enumerable.Count() <= 0) { return; } Log.Debug(Log.Combine(baseType.Name) + "Initializing"); foreach (Type item in enumerable) { string text = Log.Combine(baseType.Name, item.Name); Log.Debug(text); T obj = (T)Activator.CreateInstance(item); if (ValidateBaseType(obj)) { Log.Debug(text + "Validated"); InitializeBaseType(obj); Log.Debug(text + "Initialized"); } } if (!string.IsNullOrEmpty(fileName)) { Language.TryPrintOutput(fileName); } } private bool ValidateBaseType(SharedBase obj) { bool isEnabled = obj.isEnabled; if (obj.lockEnabled) { return isEnabled; } return obj.Bind(isEnabled, "Should This Content Be Enabled"); } private void InitializeBaseType(SharedBase obj) { obj.Init(); } private GenericSkill CreateMagePassiveSlot(GameObject body, SkillLocator skillLocator) { //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) GenericSkill[] components = body.GetComponents(); foreach (GenericSkill val in components) { if (((Object)val.skillFamily).name.ToLower().Contains("passive")) { return val; } } SkillFamily val2 = ScriptableObject.CreateInstance(); val2.variants = (Variant[])(object)new Variant[1]; GenericSkill val3 = body.gameObject.AddComponent(); val3._skillFamily = val2; SkillsAPI.SetOrderPriority(val3, -1); SkillsAPI.SetLoadoutTitleTokenOverride(val3, "MAGE_LOADOUT_PASSIVE"); val3._skillFamily = val2; ((Object)val3.skillFamily).name = "MageBodyPassive"; LanguageAPI.Add("MAGE_LOADOUT_PASSIVE", "Passive"); Content.AddSkillFamily(val2); skillLocator.passiveSkill.enabled = false; EntityStateMachine[] components2 = body.GetComponents(); foreach (EntityStateMachine val4 in components2) { if (val4.customName == "Body") { val4.mainStateType = new SerializableEntityStateType(typeof(GenericCharacterMain)); } } return val3; } private void CharacterSelectController_BuildSkillStripDisplayData(orig_BuildSkillStripDisplayData orig, CharacterSelectController self, Loadout loadout, ValueType bodyInfo, object dest) { throw new NotImplementedException(); } public void CreateMagePassives(SkillFamily passiveFamily) { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0190: 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_01a6: 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_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Expected O, but got Unknown //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Expected O, but got Unknown //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) PassiveSkillDef passiveSkillDef = ScriptableObject.CreateInstance(); ((SkillDef)passiveSkillDef).skillNameToken = mageSkillLocator.passiveSkill.skillNameToken; ((Object)passiveSkillDef).name = mageSkillLocator.passiveSkill.skillNameToken; ((SkillDef)passiveSkillDef).skillDescriptionToken = mageSkillLocator.passiveSkill.skillDescriptionToken; ((SkillDef)passiveSkillDef).icon = mageSkillLocator.passiveSkill.icon; ((SkillDef)passiveSkillDef).canceledFromSprinting = false; ((SkillDef)passiveSkillDef).cancelSprintingOnActivation = false; passiveSkillDef.stateMachineDefaults = new PassiveSkillDef.StateMachineDefaults[1] { new PassiveSkillDef.StateMachineDefaults { machineName = "Body", initalState = new SerializableEntityStateType(typeof(MageCharacterMain)), mainState = new SerializableEntityStateType(typeof(MageCharacterMain)), defaultInitalState = new SerializableEntityStateType(typeof(GenericCharacterMain)), defaultMainState = new SerializableEntityStateType(typeof(GenericCharacterMain)) } }; LanguageAPI.Add("MAGE_PASSIVE_ENERGY_NAME", "Energetic Resonance"); Sprite icon = iconBundle.LoadAsset("Assets/Icons/passiveilyborbo.png"); PassiveSkillDef passiveSkillDef2 = ScriptableObject.CreateInstance(); ((SkillDef)passiveSkillDef2).skillNameToken = "MAGE_PASSIVE_ENERGY_NAME"; ((SkillDef)passiveSkillDef2).skillDescriptionToken = CommonAssets.magePassiveDescToken; ((SkillDef)passiveSkillDef2).icon = icon; ((SkillDef)passiveSkillDef2).canceledFromSprinting = false; ((SkillDef)passiveSkillDef2).cancelSprintingOnActivation = false; passiveSkillDef2.stateMachineDefaults = new PassiveSkillDef.StateMachineDefaults[1] { new PassiveSkillDef.StateMachineDefaults { machineName = "Jet", initalState = new SerializableEntityStateType(typeof(AltArtiPassive)), mainState = new SerializableEntityStateType(typeof(AltArtiPassive)), defaultInitalState = new SerializableEntityStateType(typeof(Idle)), defaultMainState = new SerializableEntityStateType(typeof(Idle)) } }; ((SkillDef)passiveSkillDef2).keywordTokens = new string[3] { CommonAssets.meltKeywordToken, CommonAssets.arcticBlastKeywordToken, CommonAssets.lightningBoltKeywordToken }; Variant[] array = new Variant[2]; Variant val = new Variant { skillDef = (SkillDef)(object)passiveSkillDef, unlockableName = "" }; ((Variant)(ref val)).viewableNode = new Node(((SkillDef)passiveSkillDef).skillNameToken, false, (Node)null); array[0] = val; val = new Variant { skillDef = (SkillDef)(object)passiveSkillDef2, unlockableDef = UnlockBase.CreateUnlockDef(typeof(FullKitElementUnlock), icon) }; ((Variant)(ref val)).viewableNode = new Node(((SkillDef)passiveSkillDef2).skillNameToken, false, (Node)null); array[1] = val; passiveFamily.variants = (Variant[])(object)array; Content.AddSkillDef((SkillDef)(object)passiveSkillDef); Content.AddSkillDef((SkillDef)(object)passiveSkillDef2); } private void ReplaceSkillDefs(orig_Init orig) { orig.Invoke(); ReplaceVanillaIonSurge(!LegacyIonSurge); } private void AddAEBodyFX(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { orig.Invoke(self, body); AEBodyEffects aEBodyEffects = ((Component)body).gameObject.AddComponent(); aEBodyEffects.body = body; } private void InitializeConfig() { } private void ArtiChanges() { LanguageAPI.Add("MAGE_OUTRO_FLAVOR", "..and so she left, still searching for a heaven that no longer exists."); GameObject val = LegacyResourcesAPI.Load("prefabs/projectiles/MageIcewallPillarProjectile"); ProjectileImpactExplosion componentInChildren = val.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.destroyOnEnemy = false; } LanguageAPI.Add("MAGE_UTILITY_ICE_DESCRIPTION", "Freezing. Create a barrier that hurts enemies for up to 12x100% damage."); SkillDef skillDef = mageSpecial.variants[0].skillDef; if ((Object)(object)skillDef != (Object)null) { skillDef.mustKeyPress = true; } } public static SkillDef CloneSkillDef(SkillDef oldDef) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) SkillDef val = ScriptableObject.CreateInstance(); val.skillName = oldDef.skillName; val.skillNameToken = oldDef.skillNameToken; val.skillDescriptionToken = oldDef.skillDescriptionToken; val.icon = oldDef.icon; val.activationStateMachineName = oldDef.activationStateMachineName; val.activationState = oldDef.activationState; val.interruptPriority = oldDef.interruptPriority; val.baseRechargeInterval = oldDef.baseRechargeInterval; val.baseMaxStock = oldDef.baseMaxStock; val.rechargeStock = oldDef.rechargeStock; val.requiredStock = oldDef.requiredStock; val.stockToConsume = oldDef.stockToConsume; val.beginSkillCooldownOnSkillEnd = oldDef.beginSkillCooldownOnSkillEnd; val.fullRestockOnAssign = oldDef.fullRestockOnAssign; val.dontAllowPastMaxStocks = oldDef.dontAllowPastMaxStocks; val.resetCooldownTimerOnUse = oldDef.resetCooldownTimerOnUse; val.isCombatSkill = oldDef.isCombatSkill; val.cancelSprintingOnActivation = oldDef.cancelSprintingOnActivation; val.canceledFromSprinting = oldDef.canceledFromSprinting; val.forceSprintDuringState = oldDef.forceSprintDuringState; val.mustKeyPress = oldDef.mustKeyPress; val.keywordTokens = oldDef.keywordTokens; return val; } public void DoHooks() { AddHooks(); } private void RemoveHooks() { } private void AddHooks() { //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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: 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_01c9: Unknown result type (might be due to invalid IL or missing references) FireFireBolt.FireGauntlet += new hook_FireGauntlet(FireFireBolt_FireGauntlet); BaseChargeBombState.OnEnter += new hook_OnEnter(BaseChargeBombState_OnEnter); BaseChargeBombState.FixedUpdate += new hook_FixedUpdate(BaseChargeBombState_FixedUpdate); BaseChargeBombState.OnExit += new hook_OnExit(BaseChargeBombState_OnExit); PrepWall.OnEnter += new hook_OnEnter(PrepWall_OnEnter); PrepWall.OnExit += new hook_OnExit(PrepWall_OnExit); Flamethrower.OnEnter += new hook_OnEnter(Flamethrower_OnEnter); Flamethrower.FixedUpdate += new hook_FixedUpdate(Flamethrower_FixedUpdate); Flamethrower.OnExit += new hook_OnExit(Flamethrower_OnExit); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_OnCharacterDeath; CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart); CharacterMaster.OnBodyDestroyed += new hook_OnBodyDestroyed(CharacterMaster_OnBodyDestroyed); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(MeltAttackSpeedBuff); FrozenState.OnEnter += new hook_OnEnter(FrostNovaOnFreeze); FrozenState.FixedUpdate += new hook_FixedUpdate(RemoveFrostWhileFrozen); SetStateOnHurt.SetFrozenInternal += new hook_SetFrozenInternal(FixSetFrozen); CharacterBody.AddTimedBuff_BuffIndex_float += new hook_AddTimedBuff_BuffIndex_float(FixFrostStacks); CharacterBody.AddTimedBuff_BuffDef_float += new hook_AddTimedBuff_BuffDef_float(FixFrostStacks2); GlobalEventManager.OnHitAll += new hook_OnHitAll(ChainLightningHook); AssetReferenceT val = new AssetReferenceT(RoR2_Base_Mage.MageIceBombProjectile_prefab); AsyncOperationHandle val2 = AssetAsyncReferenceManager.LoadAsset(val, (AsyncReferenceHandleUnloadType)2); val2.Completed += FixIceSpear; AssetReferenceT val3 = new AssetReferenceT(RoR2_Base_Lightning.LightningStrikeImpact_prefab); val2 = AssetAsyncReferenceManager.LoadAsset(val3, (AsyncReferenceHandleUnloadType)2); val2.Completed += delegate(AsyncOperationHandle ctx) { FixLightningStrike(ctx.Result); }; AssetReferenceT val4 = new AssetReferenceT(RoR2_Base_LightningStrikeOnHit.SimpleLightningStrikeImpact_prefab); val2 = AssetAsyncReferenceManager.LoadAsset(val4, (AsyncReferenceHandleUnloadType)2); val2.Completed += delegate(AsyncOperationHandle ctx) { FixLightningStrike(ctx.Result); }; } private void FixLightningStrike(GameObject lightningStrikeImpactPrefab) { EffectComponent val = default(EffectComponent); if (!lightningStrikeImpactPrefab.TryGetComponent(ref val)) { Log.Error("Lightning strike impact is missing EffectComponent"); } else if (string.IsNullOrEmpty(val.soundName)) { val.soundName = "Play_item_use_lighningArm"; } } private void RemoveFrostWhileFrozen(orig_FixedUpdate orig, FrozenState self) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.SetBuffCount(Buffs.Frost.buffIndex, 0); } orig.Invoke(self); } private void FixFrostStacks2(orig_AddTimedBuff_BuffDef_float orig, CharacterBody self, BuffDef buffDef, float duration) { if (!Object.op_Implicit((Object)(object)self.healthComponent) || !self.healthComponent.isInFrozenState || !((Object)(object)buffDef == (Object)(object)Buffs.Frost)) { orig.Invoke(self, buffDef, duration); } } private void FixFrostStacks(orig_AddTimedBuff_BuffIndex_float orig, CharacterBody self, BuffIndex buffDef, float duration) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)self.healthComponent) || !self.healthComponent.isInFrozenState || buffDef != Buffs.Frost.buffIndex) { orig.Invoke(self, buffDef, duration); } } private void FixSoulSpiralNRE(orig_DiscoverUnassignedSpirals orig, SeekerSoulSpiralManager self) { if (self == null || (Object)(object)self.seekerController == (Object)null || SoulSpiralProjectile.unassignedSoulSpirals == null || SoulSpiralProjectile.unassignedSoulSpirals.Count <= 0) { self.StopListeningForUnassignedSpirals(); } else { orig.Invoke(self); } } private void FixIceSpear(AsyncOperationHandle iceSpearPrefab) { iceSpearPrefab.Result.layer = LayerIndex.projectileWorldOnly.intVal; } private void FixSetFrozen(orig_SetFrozenInternal orig, SetStateOnHurt self, float duration) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)self.targetStateMachine)) { FrozenState val = new FrozenState(); val.freezeDuration = duration; self.targetStateMachine.SetInterruptState((EntityState)(object)val, (InterruptPriority)7); } EntityStateMachine[] idleStateMachine = self.idleStateMachine; for (int i = 0; i < idleStateMachine.Length; i++) { idleStateMachine[i].SetNextStateToMain(); } } private void FrostNovaOnFreeze(orig_OnEnter orig, FrozenState self) { if (NetworkServer.active) { CharacterBody val = null; GameObject lastHitAttacker = ((EntityState)self).healthComponent.lastHitAttacker; bool isCrit = false; if (Object.op_Implicit((Object)(object)lastHitAttacker)) { val = lastHitAttacker.GetComponent(); } if (Object.op_Implicit((Object)(object)val)) { isCrit = Util.CheckRoll(val.crit, val.master); } FrostNovaOnMaxChill(val, ((EntityState)self).characterBody, isCrit); } orig.Invoke(self); } private static void ChainLightningHook(orig_OnHitAll orig, GlobalEventManager self, DamageInfo damageInfo, GameObject hitObject) { //IL_0002: 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_001a: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) if (DamageAPI.HasModdedDamageType(damageInfo, CommonAssets.ChainLightningDamageType)) { LightningOrb val = new LightningOrb(); ((Orb)val).origin = damageInfo.position; val.damageValue = damageInfo.damage * CommonAssets.chainLightningZapDamageFraction; val.isCrit = damageInfo.crit; val.teamIndex = TeamComponent.GetObjectTeam(damageInfo.attacker); val.attacker = damageInfo.attacker; val.bouncesRemaining = 0; val.canBounceOnSameTarget = false; val.bouncedObjects = new List(); HurtBox component = hitObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent)) { val.bouncedObjects.Add(component.healthComponent); } else { HealthComponent component2 = hitObject.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { val.bouncedObjects.Add(component2); } } val.procChainMask = damageInfo.procChainMask; val.procCoefficient = CommonAssets.chainLightningZapDamageCoefficient; val.lightningType = (LightningType)0; val.damageColorIndex = (DamageColorIndex)0; val.range = CommonAssets.chainLightningZapDistance; HurtBox val2 = val.PickNextTarget(damageInfo.position); if (Object.op_Implicit((Object)(object)val2)) { ((Orb)val).target = val2; OrbManager.instance.AddOrb((Orb)(object)val); } } orig.Invoke(self, damageInfo, hitObject); } private void MeltAttackSpeedBuff(CharacterBody sender, StatHookEventArgs args) { int buffCount = sender.GetBuffCount(CommonAssets.meltBuff); if (buffCount > 0) { args.baseAttackSpeedAdd += AltArtiPassive.meltAspdIncrease * (float)buffCount; } } private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { ElementCounter component = ((Component)body).GetComponent(); if ((Object)(object)component != (Object)null) { component.OnBodyStart(body.skillLocator); } orig.Invoke(self, body); } private void CharacterMaster_OnBodyDestroyed(orig_OnBodyDestroyed orig, CharacterMaster self, CharacterBody body) { ElementCounter component = ((Component)body).GetComponent(); if ((Object)(object)component != (Object)null) { component.OnBodyEnd(); } orig.Invoke(self, body); } private void GlobalEventManager_OnCharacterDeath(DamageReport damageReport) { //IL_0116: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || damageReport == null) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterBody victimBody = damageReport.victimBody; if (!Object.op_Implicit((Object)(object)victimBody) || !Object.op_Implicit((Object)(object)attackerBody) || !Object.op_Implicit((Object)(object)victimBody.healthComponent) || !AltArtiPassive.instanceLookup.TryGetValue(((Component)attackerBody).gameObject, out var value)) { return; } ElementCounter.Power powerLevelFromBody = ElementCounter.GetPowerLevelFromBody(((Component)attackerBody).gameObject, (MageElement)2, value); int num = victimBody.GetBuffCount(Buffs.Frost); if (victimBody.healthComponent.isInFrozenState) { num = Mathf.Min(num + 3, 5); } int num2 = 0; int num3 = ((num2 <= 0) ? 1 : 3); if (num >= num3 && powerLevelFromBody > ElementCounter.Power.None) { float num4 = (float)num / 6f; float num5 = 1f - num4; float num6 = Mathf.Pow(num5, 2f); float num7 = 1f - num6; if (Util.CheckRoll(num7 * 100f, damageReport.attackerMaster)) { AltArtiPassive.DoArcticBlast(attackerBody, powerLevelFromBody, ((Component)damageReport.victim).transform.position, damageReport.damageInfo.crit, num); } } } private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { orig.Invoke(self, damageInfo); } private void MaxFrostHook(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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); if (!val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "IsChefFrostDamage") }) || !val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "SetFrozen") })) { return; } val.Emit(OpCodes.Ldarg_0, 0); val.Emit(OpCodes.Ldloc, 0); val.Emit(OpCodes.Ldloc, 1); val.EmitDelegate>((Action)delegate(DamageInfo damageInfo, CharacterBody attackerBody, CharacterBody victimBody) { if (NetworkServer.active) { FrostNovaOnMaxChill(attackerBody, victimBody, damageInfo.crit); } }); } private static void FrostNovaOnMaxChill(CharacterBody aBody, CharacterBody vBody, bool isCrit) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)aBody != (Object)null && AltArtiPassive.instanceLookup.TryGetValue(((Component)aBody).gameObject, out var value)) { ElementCounter.Power powerLevelFromBody = ElementCounter.GetPowerLevelFromBody(((Component)aBody).gameObject, (MageElement)2, value); if (powerLevelFromBody > ElementCounter.Power.None) { AltArtiPassive.DoArcticBlast(aBody, powerLevelFromBody, vBody.corePosition, isCrit); } } } private void Flamethrower_OnEnter(orig_OnEnter orig, Flamethrower self) { orig.Invoke(self); GameObject gameObject = ((Component)((EntityState)self).outer).gameObject; if (AltArtiPassive.instanceLookup.ContainsKey(gameObject)) { AltArtiPassive altArtiPassive = AltArtiPassive.instanceLookup[gameObject]; FlamethrowerContext value = new FlamethrowerContext(altArtiPassive); altArtiPassive.SkillCast(null, isFire: true); flamethrowerContext[self] = value; } } private void Flamethrower_FixedUpdate(orig_FixedUpdate orig, Flamethrower self) { orig.Invoke(self); if (this.flamethrowerContext.ContainsKey(self)) { FlamethrowerContext flamethrowerContext = this.flamethrowerContext[self]; flamethrowerContext.timer += Time.fixedDeltaTime * ((BaseState)flamethrowerContext.passive).attackSpeedStat; int num = 0; while (flamethrowerContext.timer >= flamethrowerContext.passive.ext_flamethrowerInterval && num <= flamethrowerContext.passive.ext_flamethrowerMaxPerTick) { flamethrowerContext.passive.SkillCast(null, isFire: true); num++; flamethrowerContext.timer -= flamethrowerContext.passive.ext_flamethrowerInterval; } } } private void Flamethrower_OnExit(orig_OnExit orig, Flamethrower self) { orig.Invoke(self); if (this.flamethrowerContext.ContainsKey(self)) { FlamethrowerContext flamethrowerContext = this.flamethrowerContext[self]; flamethrowerContext.passive.SkillCast(null, isFire: true); this.flamethrowerContext.Remove(self); } } private void PrepWall_OnEnter(orig_OnEnter orig, PrepWall self) { orig.Invoke(self); GameObject gameObject = ((Component)((EntityState)self).outer).gameObject; if (AltArtiPassive.instanceLookup.ContainsKey(gameObject)) { AltArtiPassive altArtiPassive = AltArtiPassive.instanceLookup[gameObject]; AltArtiPassive.BatchHandle handle = new AltArtiPassive.BatchHandle(); altArtiPassive.SkillCast(handle); PrepWallContext value = new PrepWallContext(altArtiPassive, handle); prepWallContext[self] = value; } } private void PrepWall_OnExit(orig_OnExit orig, PrepWall self) { orig.Invoke(self); if (this.prepWallContext.ContainsKey(self)) { PrepWallContext prepWallContext = this.prepWallContext[self]; prepWallContext.handle.Fire(prepWallContext.passive.ext_prepWallMinDelay, prepWallContext.passive.ext_prepWallMaxDelay); this.prepWallContext.Remove(self); } } private void BaseChargeBombState_OnEnter(orig_OnEnter orig, BaseChargeBombState self) { orig.Invoke(self); GameObject gameObject = ((Component)((EntityState)self).outer).gameObject; if (AltArtiPassive.instanceLookup.ContainsKey(gameObject)) { AltArtiPassive altArtiPassive = AltArtiPassive.instanceLookup[gameObject]; AltArtiPassive.BatchHandle handle = new AltArtiPassive.BatchHandle(); NanoBombContext value = new NanoBombContext(altArtiPassive, handle); nanoBombContext[self] = value; altArtiPassive.SkillCast(handle, self is ChargeSolarFlare); } } private void BaseChargeBombState_FixedUpdate(orig_FixedUpdate orig, BaseChargeBombState self) { orig.Invoke(self); if (this.nanoBombContext.ContainsKey(self)) { NanoBombContext nanoBombContext = this.nanoBombContext[self]; nanoBombContext.timer += Time.fixedDeltaTime * nanoBombContext.passive.ext_attackSpeedStat; int num = 0; while (nanoBombContext.timer >= nanoBombContext.passive.ext_nanoBombInterval && num <= nanoBombContext.passive.ext_nanoBombMaxPerTick) { num++; nanoBombContext.passive.SkillCast(nanoBombContext.handle, self is ChargeSolarFlare); nanoBombContext.timer -= nanoBombContext.passive.ext_nanoBombInterval; } } } private void BaseChargeBombState_OnExit(orig_OnExit orig, BaseChargeBombState self) { orig.Invoke(self); if (this.nanoBombContext.ContainsKey(self)) { NanoBombContext nanoBombContext = this.nanoBombContext[self]; int num = 0; while (nanoBombContext.timer >= nanoBombContext.passive.ext_nanoBombInterval && num <= nanoBombContext.passive.ext_nanoBombMaxPerTick) { num++; nanoBombContext.passive.SkillCast(nanoBombContext.handle, self is ChargeSolarFlare); nanoBombContext.timer -= nanoBombContext.passive.ext_nanoBombInterval; } nanoBombContext.handle.Fire(nanoBombContext.passive.ext_nanoBombMinDelay, nanoBombContext.passive.ext_nanoBombMaxDelay); this.nanoBombContext.Remove(self); } } private void FireFireBolt_FireGauntlet(orig_FireGauntlet orig, FireFireBolt self) { orig.Invoke(self); GameObject gameObject = ((Component)((EntityState)self).outer).gameObject; if (AltArtiPassive.instanceLookup.TryGetValue(gameObject, out var value)) { value.SkillCast(null, !(self is FireLightningBolt) && !(self is FireSnowBall)); } } public void ReplaceVanillaIonSurge(bool shouldReworkSurge) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) SkillDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MageBodyFlyUp.asset").WaitForCompletion(); if ((Object)(object)val != (Object)null) { Debug.Log((object)"Changing ion surge"); if (!shouldReworkSurge) { Debug.LogError((object)"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nArtificerExtended will not replace ION SURGE functionality. This WILL break Artificer Extended's alt passives. \nEither turn on ArtificerExtended's Ion Surge rework, or avoid using Ion Surge with ArtificerExtended's alt passive. \n This is NOT an error that can be fixed on the ArtificerExtended side.\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); return; } ModifyVanillaIonSurge(val); } if (isScepterLoaded) { ReplaceScepterIonSurge(shouldReworkSurge, val); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void ReplaceScepterIonSurge(bool shouldReworkSurge, SkillDef surgeSkillDef) { if (!shouldReworkSurge || (Object)(object)surgeSkillDef == (Object)null) { Debug.LogError((object)"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nArtificerExtended could not replace Ancient Scepter's Antimatter Surge. Antimatter Surge WILL break Artificer Extended's alt passives. \nEither turn on ArtificerExtended's Ion Surge rework to use ArtificerExtended's Antimatter Surge, avoid using Antimatter Surge with ArtificerExtended's alt passive, or tell the Ancient Scepter developers to get in contact to fix Antimatter Surge. \nThis is NOT an error that can be fixed on the ArtificerExtended side.\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); return; } SkillDef skillDef = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName(surgeSkillDef.skillName + "Scepter")); if ((Object)(object)skillDef != (Object)null) { ModifyScepterSurge(skillDef); } } private void DoSurgeReworkAssetSetup() { //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: 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_01aa: Expected O, but got Unknown //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_00cd: 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_0100: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) ModelLocator component = ((Component)mageBody).GetComponent(); Transform val = ((component != null) ? component.modelTransform : null); if (Object.op_Implicit((Object)(object)val)) { HitBoxGroup val2 = ((Component)val).gameObject.AddComponent(); val2.groupName = "IonCharge"; ChildLocator component2 = ((Component)val).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { Transform obj = component2.FindChild("Base"); Transform val3 = ((obj != null) ? obj.parent : null); if (Object.op_Implicit((Object)(object)val3)) { GameObject val4 = new GameObject(); HitBox val5 = val4.AddComponent(); val4.transform.parent = val3; val4.layer = LayerIndex.projectile.intVal; val4.transform.localPosition = new Vector3(0f, 1.5f, 0f); val4.transform.localRotation = Quaternion.identity; val4.transform.localScale = new Vector3(4f, 4f, 4f); val2.hitBoxes = (HitBox[])(object)new HitBox[1] { val5 }; } } } ionSurgePower = Content.CreateAndAddBuff("bdIonSurgePower", null, Color.black, canStack: false, isDebuff: false); ionSurgePower.isHidden = true; ionSurgePowerOverlay = Object.Instantiate(Addressables.LoadAssetAsync((object)"RoR2/DLC1/VoidSurvivor/matVoidSurvivorCorruptOverlay.mat").WaitForCompletion()); ((Object)ionSurgePowerOverlay).name = "matIonSurgePowerOverlay"; ionSurgePowerOverlay.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)0, (byte)210, byte.MaxValue, byte.MaxValue))); CharacterModel.UpdateOverlays += new hook_UpdateOverlays(SurgeOverlay); muzzleflashIonSurgeTrail = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Mage/MuzzleflashMageLightningLargeWithTrail.prefab").WaitForCompletion(), "MuzzleflashIonSurgeTrail"); ParticleSystem[] componentsInChildren = muzzleflashIonSurgeTrail.GetComponentsInChildren(); ParticleSystem[] array = componentsInChildren; foreach (ParticleSystem val6 in array) { Debug.Log((object)((Object)((Component)val6).gameObject).name); MainModule main = val6.main; ((MainModule)(ref main)).duration = SurgeExtendedDash.flightDuration; } TrailRenderer componentInChildren = muzzleflashIonSurgeTrail.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.time = SurgeExtendedDash.flightDuration + 0.5f; } Transform val7 = muzzleflashIonSurgeTrail.transform.Find("Particles").Find("Trail"); if (Object.op_Implicit((Object)(object)val7)) { TrailRenderer component3 = ((Component)val7).GetComponent(); component3.time = SurgeExtendedDash.flightDuration + 0.5f; } Transform val8 = muzzleflashIonSurgeTrail.transform.Find("Particles").Find("Matrix, Mesh"); if (Object.op_Implicit((Object)(object)val8)) { ParticleSystem component4 = ((Component)val8).GetComponent(); MainModule main2 = component4.main; ((MainModule)(ref main2)).duration = SurgeExtendedDash.flightDuration; ((MainModule)(ref main2)).loop = true; } Transform val9 = muzzleflashIonSurgeTrail.transform.Find("Particles").Find("Point Light"); if (Object.op_Implicit((Object)(object)val9)) { LightIntensityCurve component5 = ((Component)val9).GetComponent(); component5.timeMax = 2f; } Transform val10 = muzzleflashIonSurgeTrail.transform.Find("Particles").Find("Smoke"); if (Object.op_Implicit((Object)(object)val10)) { ParticleSystem component6 = ((Component)val10).GetComponent(); MainModule main3 = component6.main; ((MainModule)(ref main3)).duration = SurgeExtendedDash.flightDuration; ((MainModule)(ref main3)).loop = true; } } private void SurgeOverlay(orig_UpdateOverlays orig, CharacterModel self) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if ((int)self.visibility != 0 && !((Object)(object)self.body == (Object)null)) { AddOverlay(ionSurgePowerOverlay, self.body.HasBuff(ionSurgePower)); } void AddOverlay(Material overlayMaterial, bool condition) { if (self.activeOverlayCount < CharacterModel.maxOverlays && condition) { Material[] currentOverlays = self.currentOverlays; CharacterModel obj = self; int activeOverlayCount = obj.activeOverlayCount; obj.activeOverlayCount = activeOverlayCount + 1; currentOverlays[activeOverlayCount] = overlayMaterial; } } } public void ModifyVanillaIonSurge(SkillDef surge) { //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) Content.AddEntityState(typeof(SurgeExtendedDash)); Content.AddEntityState(typeof(SurgeExtendedImpact)); LanguageAPI.Add("MAGE_SPECIAL_LIGHTNING_DESCRIPTION", surgeFullDesc); surge.activationState = new SerializableEntityStateType(typeof(SurgeExtendedDash)); surge.baseRechargeInterval = 8f; } public void ModifyScepterSurge(SkillDef surge2) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) LanguageAPI.Add("MAGE_ANTISURGE_LIGHTNING_DESC", surgeFullDesc + "\nSCEPTER: 30% longer flight time, 200% impact damage."); surge2.activationState = new SerializableEntityStateType(typeof(SurgeExtendedDash)); } } public class AEBodyEffects : MonoBehaviour { public CharacterBody body; private TemporaryVisualEffect blizzardArmorTempEffect; private void Update() { UpdateSingleTemporaryVisualEffect(ref blizzardArmorTempEffect, _1FrostbiteSkill.blizzardArmorVFX, body.radius * 0.5f, body.GetBuffCount(_1FrostbiteSkill.artiIceShield)); } private void UpdateSingleTemporaryVisualEffect(ref TemporaryVisualEffect tempEffect, GameObject obj, float effectRadius, int count, string childLocatorOverride = "") { //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) bool flag = (Object)(object)tempEffect != (Object)null; if (flag == count > 0) { return; } if (count > 0) { if (flag) { return; } GameObject val = Object.Instantiate(obj, body.corePosition, Quaternion.identity); tempEffect = val.GetComponent(); tempEffect.parentTransform = body.coreTransform; tempEffect.visualState = (VisualState)0; tempEffect.healthComponent = body.healthComponent; tempEffect.radius = effectRadius; LocalCameraEffect component = val.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.targetCharacter = ((Component)this).gameObject; } if (string.IsNullOrEmpty(childLocatorOverride)) { return; } ModelLocator modelLocator = body.modelLocator; ChildLocator val2; if ((Object)(object)modelLocator == (Object)null) { val2 = null; } else { Transform modelTransform = modelLocator.modelTransform; val2 = (((Object)(object)modelTransform != (Object)null) ? ((Component)modelTransform).GetComponent() : null); } ChildLocator val3 = val2; if (Object.op_Implicit((Object)(object)val3)) { Transform val4 = val3.FindChild(childLocatorOverride); if (Object.op_Implicit((Object)(object)val4)) { tempEffect.parentTransform = val4; } } } else if (Object.op_Implicit((Object)(object)tempEffect)) { tempEffect.visualState = (VisualState)1; } } } public abstract class SharedBase { public virtual string BASE_TOKEN => TOKEN_PREFIX + TOKEN_IDENTIFIER; public abstract string TOKEN_IDENTIFIER { get; } public abstract string TOKEN_PREFIX { get; } public virtual bool lockEnabled { get; } = false; public abstract string ConfigName { get; } public virtual bool isEnabled { get; } = true; public virtual ConfigFile configFile { get; } = Config.MyConfig; public static ManualLogSource Logger => Log._logSource; public abstract AssetBundle assetBundle { get; } public virtual Type RequiredUnlock { get; } public abstract void Hooks(); public abstract void Lang(); public virtual void Init() { ConfigManager.HandleConfigAttributes(GetType(), ConfigName, configFile); Hooks(); Lang(); } public T Bind(T defaultValue, string configName, string configDesc = "") { return ConfigManager.DualBindToConfig(ConfigName, configFile, configName, defaultValue, configDesc); } public static float GetHyperbolic(float firstStack, float cap, float chance) { if (firstStack >= cap) { return cap * (chance / firstStack); } float num = chance / firstStack; float num2 = 100f * firstStack / (cap - firstStack); return cap * (1f - 100f / (num * num2 + 100f)); } } internal static class Log { public static bool enableDebugging; internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { enableDebugging = ConfigManager.DualBindToConfig("Artificer Extended", Config.MyConfig, "Enable Debugging", defaultValue: false, "Enable debug outputs to the log for troubleshooting purposes. Enabling this will slow down the game."); _logSource = logSource; } internal static string Combine(params string[] parameters) { string text = "ArtificerExtended : "; foreach (string text2 in parameters) { text = text + text2 + " : "; } return text; } internal static void Debug(object data) { if (enableDebugging) { _logSource.LogDebug(data); } } internal static void Error(object data) { _logSource.LogError(data); } internal static void ErrorAssetBundle(string assetName, string bundleName) { Error("failed to load asset, " + assetName + ", because it does not exist in asset bundle, " + bundleName); } 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); } } public static class Tools { internal static Dictionary loadedBundles = new Dictionary(); private static AssetBundle _mainAssetBundle; public static string modPrefix = string.Format("@{0}+{1}", "ArtificerExtended", "artiskillicons"); public static AssetBundle mainAssetBundle { get { if ((Object)(object)_mainAssetBundle == (Object)null) { _mainAssetBundle = LoadAssetBundle("artiextended"); } return _mainAssetBundle; } set { _mainAssetBundle = value; } } internal static AssetBundle LoadAssetBundle(string bundleName) { if (loadedBundles.ContainsKey(bundleName)) { return loadedBundles[bundleName]; } AssetBundle val = null; val = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)ArtificerExtendedPlugin.instance).Info.Location), bundleName)); loadedBundles[bundleName] = val; return val; } public static string GetModPrefix(this BaseUnityPlugin plugin, string bundleName) { return $"@{plugin.Info.Metadata.Name}+{bundleName}"; } public static string ConvertDecimal(float f) { return f * 100f + "%"; } internal static bool isLoaded(string modguid) { foreach (KeyValuePair pluginInfo in Chainloader.PluginInfos) { string key = pluginInfo.Key; PluginInfo value = pluginInfo.Value; if (key == modguid) { return true; } } return false; } internal static void GetMaterial(GameObject model, string childObject, Color color, ref Material material, float scaleMultiplier = 1f, bool replaceAll = false) { //IL_0030: 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_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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) Renderer[] componentsInChildren = model.GetComponentsInChildren(); Renderer[] array = componentsInChildren; foreach (Renderer val in array) { Renderer val2 = val; if (string.Equals(((Object)val).name, childObject)) { if (color == Color.clear) { Object.Destroy((Object)(object)val); break; } if ((Object)(object)material == (Object)null) { material = new Material(val.material); material.mainTexture = val.material.mainTexture; material.shader = val.material.shader; material.color = color; } val.material = material; Transform transform = ((Component)val).transform; transform.localScale *= scaleMultiplier; if (!replaceAll) { break; } } } } internal static void DebugMaterial(GameObject model) { Renderer[] componentsInChildren = model.GetComponentsInChildren(); Renderer[] array = componentsInChildren; foreach (Renderer val in array) { Renderer val2 = val; Debug.Log((object)("Material: " + ((Object)val2).name.ToString())); } } internal static void GetParticle(GameObject model, string childObject, Color color, float sizeMultiplier = 1f, bool replaceAll = false) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0069: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) ParticleSystem[] componentsInChildren = model.GetComponentsInChildren(); ParticleSystem[] array = componentsInChildren; foreach (ParticleSystem val in array) { ParticleSystem val2 = val; MainModule main = val2.main; ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ColorBySpeedModule colorBySpeed = val2.colorBySpeed; if (string.Equals(((Object)val2).name, childObject)) { ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(color); ((MainModule)(ref main)).startSizeMultiplier = ((MainModule)(ref main)).startSizeMultiplier * sizeMultiplier; ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(color); ((ColorBySpeedModule)(ref colorBySpeed)).color = MinMaxGradient.op_Implicit(color); if (!replaceAll) { break; } } } } internal static void DebugParticleSystem(GameObject model) { ParticleSystem[] componentsInChildren = model.GetComponentsInChildren(); ParticleSystem[] array = componentsInChildren; foreach (ParticleSystem val in array) { ParticleSystem val2 = val; Debug.Log((object)("Particle: " + ((Object)val2).name.ToString())); } } internal static void GetLight(GameObject model, string childObject, Color color, bool replaceAll = false) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) Light[] componentsInChildren = model.GetComponentsInChildren(); Light[] array = componentsInChildren; foreach (Light val in array) { Light val2 = val; if (string.Equals(((Object)val2).name, childObject)) { val2.color = color; if (!replaceAll) { break; } } } } internal static void DebugLight(GameObject model) { Light[] componentsInChildren = model.GetComponentsInChildren(); Light[] array = componentsInChildren; foreach (Light val in array) { Light val2 = val; Debug.Log((object)("Light: " + ((Object)val2).name.ToString())); } } } public static class VRStuff { public static bool VRInstalled; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void SetupVR() { if (Chainloader.PluginInfos.ContainsKey("com.DrBibop.VRAPI")) { VRInstalled = VR.enabled && MotionControls.enabled; } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static Ray GetVRHandAimRay(bool dominant) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_001a: 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) return dominant ? MotionControls.dominantHand.aimRay : MotionControls.nonDominantHand.aimRay; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void AnimateVRHand(bool dominant, string triggerName) { HandController val = (dominant ? MotionControls.dominantHand : MotionControls.nonDominantHand); val.animator.SetTrigger(triggerName); } } } namespace ArtificerExtended.Unlocks { [RegisterAchievement("AbsoluteZeroUnlock", "AbsoluteZeroUnlock", "FreeMage", 5u, null)] public class AbsoluteZeroUnlock : UnlockBase { public override string TOKEN_IDENTIFIER => "AbsoluteZeroUnlock".ToUpperInvariant(); public override string AchievementName => "Artificer: Absolute Zero"; public override string AchievementDesc => "As Artificer, freeze and execute the King of Nothing."; private void ExecuteMithrixCheck(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //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) //IL_0017: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) bool flag = false; CharacterBody body = self.body; BodyIndex bodyIndex = body.bodyIndex; if ((bodyIndex == BodyCatalog.FindBodyIndex("BrotherBody") || bodyIndex == BodyCatalog.FindBodyIndex("BrotherGlassBody") || bodyIndex == BodyCatalog.FindBodyIndex("BrotherHauntBody") || bodyIndex == BodyCatalog.FindBodyIndex("BrotherHurtBody")) && self.isInFrozenState) { flag = true; } orig.Invoke(self, damageInfo); if (!flag || self.alive) { return; } GameObject attacker = damageInfo.attacker; CharacterBody val = ((attacker != null) ? attacker.GetComponent() : null); if ((Object)(object)val != (Object)null) { BodyIndex bodyIndex2 = val.bodyIndex; if (bodyIndex2 == ((BaseAchievement)this).LookUpRequiredBodyIndex()) { ((BaseAchievement)this).Grant(); } } } public override void OnInstall() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HealthComponent.TakeDamage += new hook_TakeDamage(ExecuteMithrixCheck); ((BaseAchievement)this).OnInstall(); } public override void OnUninstall() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HealthComponent.TakeDamage -= new hook_TakeDamage(ExecuteMithrixCheck); ((BaseAchievement)this).OnUninstall(); } } [RegisterAchievement("FastHellUnlock", "FastHellUnlock", "FreeMage", 5u, null)] internal class FastHellUnlock : UnlockBase { private static readonly string[] requiredScenes = new string[2] { "dampcavesimple", "helminthroost" }; private static float timeInMinutes = 3f; private static float gracePeriodInSeconds = 10f; private bool stageOk = false; private float stageEntryStopwatchValue = float.NegativeInfinity; public override string TOKEN_IDENTIFIER => "FastHellUnlock".ToUpperInvariant(); public override string AchievementName => "Artificer: God, It’s Pretty Hot Down Here"; public override string AchievementDesc => $"As Artificer, leave the Abyssal Depths or Helminth Hatchery within {timeInMinutes} minutes of entering."; public override void OnInstall() { ((BaseAchievement)this).OnInstall(); } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); Stage.onStageStartGlobal += OnStageStart; } public override void OnBodyRequirementBroken() { ((BaseAchievement)this).OnBodyRequirementBroken(); Stage.onStageStartGlobal -= OnStageStart; stageEntryStopwatchValue = float.NegativeInfinity; stageOk = false; } private void OnStageStart(Stage newStageDef) { SceneDef sceneDef = newStageDef.sceneDef; HandleMostRecentSceneDefChanged(sceneDef); } private bool CheckSceneRequirement(SceneDef sceneDef) { Debug.Log((object)sceneDef.baseSceneName); return requiredScenes.Contains(sceneDef.baseSceneName); } private void HandleMostRecentSceneDefChanged(SceneDef newSceneDef) { if (stageOk) { float num = Run.instance.GetRunStopwatch() - stageEntryStopwatchValue; Debug.Log((object)("seconds this stage: " + num)); if (num <= timeInMinutes * 60f + gracePeriodInSeconds) { ((BaseAchievement)this).Grant(); stageOk = false; return; } } if (CheckSceneRequirement(newSceneDef)) { stageEntryStopwatchValue = Stage.instance.entryStopwatchValue; stageOk = true; } else { stageEntryStopwatchValue = float.NegativeInfinity; stageOk = false; } } } [RegisterAchievement("FreezeManySimultaneousUnlock", "FreezeManySimultaneousUnlock", "FreeMage", 5u, typeof(FreezeManySimultaneousServerAchievement))] internal class FreezeManySimultaneousUnlock : UnlockBase { private class FreezeManySimultaneousServerAchievement : BaseServerAchievement { private Dictionary avalancheUnlockTrackers; private CharacterBody trackedBody; public override void OnInstall() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown ((BaseServerAchievement)this).OnInstall(); avalancheUnlockTrackers = new Dictionary(); RoR2Application.onFixedUpdate += SetTrackedBody; SetStateOnHurt.SetFrozenInternal += new hook_SetFrozenInternal(AddFreezeTracker); } private void AddFreezeTracker(orig_SetFrozenInternal orig, SetStateOnHurt self, float duration) { orig.Invoke(self, duration); CharacterBody val = default(CharacterBody); if (!((Component)self).TryGetComponent(ref val)) { return; } HealthComponent healthComponent = val.healthComponent; GameObject val2 = ((healthComponent != null) ? healthComponent.lastHitAttacker : null); CharacterBody val3 = default(CharacterBody); if (!Object.op_Implicit((Object)(object)val2) || !val2.TryGetComponent(ref val3) || (Object)(object)val3 != (Object)(object)trackedBody) { return; } int num = 1; bool flag = false; foreach (KeyValuePair avalancheUnlockTracker in avalancheUnlockTrackers) { if (!((Object)(object)avalancheUnlockTracker.Key == (Object)null) && !(Time.time > avalancheUnlockTracker.Value)) { num++; if (num >= freezeRequirementTotal) { flag = true; break; } } } if (flag) { ((BaseServerAchievement)this).Grant(); ((BaseServerAchievement)this).ServerTryToCompleteActivity(); } else if (avalancheUnlockTrackers.ContainsKey(self)) { avalancheUnlockTrackers[self] = Time.time + duration; } else { avalancheUnlockTrackers.Add(self, Time.time + duration); } } private void SetTrackedBody() { trackedBody = ((BaseServerAchievement)this).GetCurrentBody(); } public override void OnUninstall() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown ((BaseServerAchievement)this).OnUninstall(); RoR2Application.onFixedUpdate -= SetTrackedBody; SetStateOnHurt.SetFrozenInternal += new hook_SetFrozenInternal(AddFreezeTracker); } } public static int freezeRequirementTotal = 5; public override string AchievementName => "Artificer: Ice V Has Arrived"; public override string AchievementDesc => $"As Artificer, have {freezeRequirementTotal} monsters frozen at once."; public override string TOKEN_IDENTIFIER => "FreezeManySimultaneousUnlock".ToUpperInvariant(); public override void TryToCompleteActivity() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown bool flag = ((BaseAchievement)this).localUser.id == LocalUserManager.GetFirstLocalUser().id; if (((BaseAchievement)this).shouldGrant && flag) { BaseActivitySelector val = new BaseActivitySelector(); val.activityAchievementID = "FreezeManySimultaneousUnlock"; PlatformSystems.activityManager.TryToCompleteActivity(val, true, true); } } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); ((BaseAchievement)this).SetServerTracked(true); } public override void OnBodyRequirementBroken() { ((BaseAchievement)this).OnBodyRequirementBroken(); ((BaseAchievement)this).SetServerTracked(false); } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } } [RegisterAchievement("FullKitElementUnlock", "FullKitElementUnlock", "FreeMage", 5u, null)] internal class FullKitElementUnlock : UnlockBase { public override string TOKEN_IDENTIFIER => "FullKitElementUnlock".ToUpperInvariant(); public override string AchievementName => "Artificer: Elemental Intensity"; public override string AchievementDesc => "As Artificer, win with 4 abilities of a single element equipped at once."; public override void OnInstall() { ((BaseAchievement)this).OnInstall(); } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); Run.onClientGameOverGlobal += ClearCheck; } public override void OnBodyRequirementBroken() { ((BaseAchievement)this).OnBodyRequirementBroken(); Run.onClientGameOverGlobal -= ClearCheck; } private void ClearCheck(Run run, RunReport runReport) { if (run != null && runReport != null && Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin) { CharacterBody cachedBody = ((BaseAchievement)this).localUser.cachedBody; if (!Object.op_Implicit((Object)(object)cachedBody)) { Log.Error("FullKitElementUnlock : Local Body destroyed, unable to access element counter! This may be a result of the ending destroying the body or dying before the ending!"); } if (ElementCounter.localUserFirePower >= ElementCounter.Power.Extreme || ElementCounter.localUserIcePower >= ElementCounter.Power.Extreme || ElementCounter.localUserLightningPower >= ElementCounter.Power.Extreme) { ((BaseAchievement)this).Grant(); } } } private void PowerCheck(orig_OnEnter orig, MageCharacterMain self) { orig.Invoke(self); CharacterBody characterBody = ((EntityState)self).characterBody; ElementCounter elementCounter = ((characterBody != null) ? ((Component)characterBody).GetComponent() : null); if ((Object)(object)elementCounter != (Object)null && (elementCounter.firePower >= ElementCounter.Power.Extreme || elementCounter.icePower >= ElementCounter.Power.Extreme || elementCounter.lightningPower >= ElementCounter.Power.Extreme)) { ((BaseAchievement)this).Grant(); } } } [RegisterAchievement("KillBlazingWithFireUnlock", "KillBlazingWithFireUnlock", "FreeMage", 5u, null)] internal class KillBlazingWithFireUnlock : UnlockBase { public static int burnRequirementTotal = 15; public int burnCounter = 0; public override string TOKEN_IDENTIFIER => "KillBlazingWithFireUnlock".ToUpperInvariant(); public override string AchievementName => "Artificer: Sinners For Dinner"; public override string AchievementDesc => $"As Artificer, kill {burnRequirementTotal} Blazing Elites with burn damage in a single run."; public override void OnInstall() { GlobalEventManager.onCharacterDeathGlobal += AddBurnCounter; Run.onRunStartGlobal += ResetBurnCounter; ((BaseAchievement)this).OnInstall(); } public override void OnUninstall() { GlobalEventManager.onCharacterDeathGlobal -= AddBurnCounter; Run.onRunStartGlobal -= ResetBurnCounter; ((BaseAchievement)this).OnUninstall(); } private void ResetBurnCounter(Run obj) { burnCounter = 0; } private void AddBurnCounter(DamageReport obj) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Invalid comparison between Unknown and I4 //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Invalid comparison between Unknown and I4 CharacterBody attackerBody = obj.attackerBody; CharacterBody victimBody = obj.victimBody; if (!Object.op_Implicit((Object)(object)attackerBody) || !Object.op_Implicit((Object)(object)victimBody) || attackerBody.bodyIndex != ((BaseAchievement)this).LookUpRequiredBodyIndex() || !victimBody.HasBuff(Buffs.AffixRed)) { return; } DamageInfo damageInfo = obj.damageInfo; bool flag = ((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)128) || ((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)8192); bool flag2 = (int)damageInfo.dotIndex == 1 || (int)damageInfo.dotIndex == 3 || (int)damageInfo.dotIndex == 7; if (flag || flag2) { burnCounter++; if (burnCounter >= burnRequirementTotal) { ((BaseAchievement)this).Grant(); } } } } [RegisterAchievement("MeteoriteDeathUnlock", "MeteoriteDeathUnlock", "FreeMage", 5u, null)] internal class MeteoriteDeathUnlock : UnlockBase { private GameObject meteorGameObject = LegacyResourcesAPI.Load("Prefabs/NetworkedObjects/MeteorStorm"); public override string TOKEN_IDENTIFIER => "MeteoriteDeathUnlock".ToUpperInvariant(); public override string AchievementName => "Artificer: Cloudy, With A Risk Of..."; public override string AchievementDesc => "As Artificer, kill yourself with a meteor strike."; public override void OnInstall() { GlobalEventManager.onCharacterDeathGlobal += MeteorCheck; ((BaseAchievement)this).OnInstall(); } public override void OnUninstall() { GlobalEventManager.onCharacterDeathGlobal -= MeteorCheck; ((BaseAchievement)this).OnUninstall(); } private void MeteorCheck(DamageReport obj) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) CharacterBody attackerBody = obj.attackerBody; CharacterBody victimBody = obj.victimBody; if ((Object)(object)attackerBody == (Object)(object)victimBody && attackerBody.bodyIndex == ((BaseAchievement)this).LookUpRequiredBodyIndex()) { GameObject inflictor = obj.damageInfo.inflictor; MeteorStormController component = inflictor.GetComponent(); if ((Object)(object)component != (Object)null && attackerBody.equipmentSlot.equipmentIndex == Equipment.Meteor.equipmentIndex) { ((BaseAchievement)this).Grant(); } } } } [RegisterAchievement("NoDamageUnlock", "NoDamageUnlock", "FreeMage", 5u, null)] internal class NoDamageUnlock : UnlockBase { public static float maxHealthFraction = 0.8f; private HealthComponent healthComponent; private bool failed; private bool characterOk; private ToggleAction healthCheck; private ToggleAction teleporterCheck; public override string TOKEN_IDENTIFIER => "NoDamageUnlock".ToUpperInvariant(); public override string AchievementName => "Artificer: Flawless Execution"; public override string AchievementDesc => "As Artificer, start and finish any stage without falling below " + Tools.ConvertDecimal(maxHealthFraction) + " health."; private void SubscribeHealthCheck() { RoR2Application.onFixedUpdate += CheckHealth; } private void UnsubscribeHealthCheck() { RoR2Application.onFixedUpdate -= CheckHealth; } private void SubscribeTeleporterCheck() { TeleporterInteraction.onTeleporterChargedGlobal += CheckTeleporter; } private void UnsubscribeTeleporterCheck() { TeleporterInteraction.onTeleporterChargedGlobal -= CheckTeleporter; } private void CheckTeleporter(TeleporterInteraction teleporterInteraction) { if (characterOk && !failed) { ((BaseAchievement)this).Grant(); } } public override void OnInstall() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown ((BaseAchievement)this).OnInstall(); healthCheck = new ToggleAction((Action)SubscribeHealthCheck, (Action)UnsubscribeHealthCheck); teleporterCheck = new ToggleAction((Action)SubscribeTeleporterCheck, (Action)UnsubscribeTeleporterCheck); SceneCatalog.onMostRecentSceneDefChanged += OnMostRecentSceneDefChanged; ((BaseAchievement)this).localUser.onBodyChanged += OnBodyChanged; } public override void OnUninstall() { ((BaseAchievement)this).localUser.onBodyChanged -= OnBodyChanged; SceneCatalog.onMostRecentSceneDefChanged -= OnMostRecentSceneDefChanged; healthCheck.Dispose(); teleporterCheck.Dispose(); ((BaseAchievement)this).OnUninstall(); } private void OnBodyChanged() { if (characterOk && !failed && Object.op_Implicit((Object)(object)((BaseAchievement)this).localUser.cachedBody)) { healthComponent = ((BaseAchievement)this).localUser.cachedBody.healthComponent; healthCheck.SetActive(true); teleporterCheck.SetActive(true); } } private void OnMostRecentSceneDefChanged(SceneDef sceneDef) { failed = false; } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); characterOk = true; } public override void OnBodyRequirementBroken() { characterOk = false; Fail(); ((BaseAchievement)this).OnBodyRequirementBroken(); } private void Fail() { failed = true; healthCheck.SetActive(false); teleporterCheck.SetActive(false); } private void CheckHealth() { if (Object.op_Implicit((Object)(object)healthComponent) && healthComponent.combinedHealth < healthComponent.fullCombinedHealth * maxHealthFraction) { Fail(); } } } [RegisterAchievement("OverkillOverloadingUnlock", "OverkillOverloadingUnlock", "FreeMage", 5u, typeof(OverkillOverloadingServerAchievement))] internal class OverkillOverloadingUnlock : UnlockBase { private class OverkillOverloadingServerAchievement : BaseServerAchievement { public override void OnInstall() { ((BaseServerAchievement)this).OnInstall(); GlobalEventManager.onCharacterDeathGlobal += OnDeathOverkillCheck; GlobalEventManager.onServerCharacterExecuted += OnExecuteOverkillCheck; } public override void OnUninstall() { ((BaseServerAchievement)this).OnUninstall(); GlobalEventManager.onCharacterDeathGlobal -= OnDeathOverkillCheck; GlobalEventManager.onServerCharacterExecuted -= OnExecuteOverkillCheck; } private void OnDeathOverkillCheck(DamageReport damageReport) { OnExecuteOverkillCheck(damageReport, 0f); } private void OnExecuteOverkillCheck(DamageReport damageReport, float executionHealthLost) { if ((Object)(object)damageReport.attackerBody != (Object)(object)((BaseServerAchievement)this).GetCurrentBody()) { return; } CharacterBody victimBody = damageReport.victimBody; HealthComponent healthComponent = victimBody.healthComponent; bool flag = victimBody.HasBuff(Buffs.AffixBlue); float num = healthComponent.fullCombinedHealth - executionHealthLost; if (flag) { float num2 = damageReport.damageDealt - damageReport.combinedHealthBeforeDamage; if (num2 >= num * overkillAmount) { ((BaseServerAchievement)this).Grant(); ((BaseServerAchievement)this).ServerTryToCompleteActivity(); } } } } private static float overkillAmount = 1f; public override string TOKEN_IDENTIFIER => "OverkillOverloadingUnlock".ToUpperInvariant(); public override string AchievementName => "Artificer: Powertrippin’"; public override string AchievementDesc => $"As Artificer, overkill an Overloading Elite enemy by more than {overkillAmount * 100f}% of its combined maximum health."; public override void TryToCompleteActivity() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown bool flag = ((BaseAchievement)this).localUser.id == LocalUserManager.GetFirstLocalUser().id; if (((BaseAchievement)this).shouldGrant && flag) { BaseActivitySelector val = new BaseActivitySelector(); val.activityAchievementID = "FreezeManySimultaneousUnlock"; PlatformSystems.activityManager.TryToCompleteActivity(val, true, true); } } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); ((BaseAchievement)this).SetServerTracked(true); } public override void OnBodyRequirementBroken() { ((BaseAchievement)this).OnBodyRequirementBroken(); ((BaseAchievement)this).SetServerTracked(false); } private void OverkillCheck(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0070: 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) CharacterBody body = self.body; bool flag = body.HasBuff(Buffs.AffixBlue); float combinedHealth = self.combinedHealth; float num = self.fullHealth; orig.Invoke(self, damageInfo); if (!(!self.alive && flag)) { return; } CharacterBody val = null; if ((Object)(object)damageInfo.attacker != (Object)null) { val = damageInfo.attacker.GetComponent(); } if ((Object)(object)val != (Object)null && val.bodyIndex == ((BaseAchievement)this).LookUpRequiredBodyIndex()) { if (self.isInFrozenState) { num *= 0.7f; } float num2 = damageInfo.damage - combinedHealth; if (num2 > num * overkillAmount) { ((BaseAchievement)this).Grant(); } } } } [RegisterAchievement("StackBurnUnlock", "StackBurnUnlock", "FreeMage", 5u, null)] internal class StackBurnUnlock : UnlockBase { public static int burnRequirementTotal = 25; public override string TOKEN_IDENTIFIER => "StackBurnUnlock".ToUpperInvariant(); public override string AchievementName => "Artificer: The Ultimate Stonecutter"; public override string AchievementDesc => $"As Artificer, apply {burnRequirementTotal} stacks of burn to a single target."; public override void OnInstall() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(CountBurn); ((BaseAchievement)this).OnInstall(); } public override void OnUninstall() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown GlobalEventManager.OnHitEnemy -= new hook_OnHitEnemy(CountBurn); ((BaseAchievement)this).OnUninstall(); } private void CountBurn(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0078: 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) if (damageInfo.procCoefficient == 0f || damageInfo.rejected || !NetworkServer.active) { return; } CharacterBody component = victim.GetComponent(); CharacterBody val = null; if ((Object)(object)damageInfo.attacker != (Object)null) { val = damageInfo.attacker.GetComponent(); } if ((Object)(object)component != (Object)null && (Object)(object)val != (Object)null && val.bodyIndex == ((BaseAchievement)this).LookUpRequiredBodyIndex()) { int num = component.GetBuffCount(Buffs.OnFire) + component.GetBuffCount(Buffs.StrongerBurn) + 1; if (num >= burnRequirementTotal) { ((BaseAchievement)this).Grant(); } } orig.Invoke(self, damageInfo, victim); } } [RegisterAchievement("SuperbugUnlock", "SuperbugUnlock", "FreeMage", 5u, null)] internal class SuperbugUnlock : UnlockBase { public override string TOKEN_IDENTIFIER => "SUPERBUG"; public override string AchievementName => "Artificer: Death is in Your Blood"; public override string AchievementDesc => "As Artificer, apply 1 stack of bleed to a single target."; public override void OnInstall() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(CountBurn); ((BaseAchievement)this).OnInstall(); } public override void OnUninstall() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown GlobalEventManager.OnHitEnemy -= new hook_OnHitEnemy(CountBurn); ((BaseAchievement)this).OnUninstall(); } private void CountBurn(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0083: 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) if (damageInfo.procCoefficient == 0f || damageInfo.rejected || !NetworkServer.active) { return; } orig.Invoke(self, damageInfo, victim); CharacterBody component = victim.GetComponent(); CharacterBody val = null; if ((Object)(object)damageInfo.attacker != (Object)null) { val = damageInfo.attacker.GetComponent(); } if ((Object)(object)component != (Object)null && (Object)(object)val != (Object)null && val.bodyIndex == ((BaseAchievement)this).LookUpRequiredBodyIndex()) { int num = component.GetBuffCount(Buffs.Bleeding) + component.GetBuffCount(Buffs.SuperBleed); if (num >= 1) { ((BaseAchievement)this).Grant(); } } } } [RegisterAchievement("TankDamageUnlock", "TankDamageUnlock", "FreeMage", 5u, null)] internal class TankDamageUnlock : UnlockBase { public static int damageRequirementTotal = 5000; private float damageTakenCount = 0f; public ulong killRequirementTotal = 5uL; public StatDef postmortemKillCounter = UnlockBase.GetCareerStatTotal("artificerKillsPostMortem"); public override string TOKEN_IDENTIFIER => "TankDamageUnlock".ToUpperInvariant(); public override string AchievementName => "Artificer: Cold Hearted"; public override string AchievementDesc => $"As Artificer, take more than {damageRequirementTotal} points of damage in a single life."; private void ResetDamageCount() { damageTakenCount = 0f; } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); GlobalEventManager.onServerDamageDealt += DamageCounter; Run.onClientGameOverGlobal += ClearCheck; } private void ClearCheck(Run run, RunReport runReport) { ResetDamageCount(); } public override void OnBodyRequirementBroken() { ((BaseAchievement)this).OnBodyRequirementBroken(); GlobalEventManager.onServerDamageDealt -= DamageCounter; } private void DamageCounter(DamageReport damageReport) { if (!((Object)(object)damageReport.victimBody == (Object)(object)((BaseAchievement)this).localUser.cachedBody)) { return; } if (!damageReport.victimBody.healthComponent.alive) { ResetDamageCount(); return; } damageTakenCount += damageReport.damageDealt; if (damageTakenCount > (float)damageRequirementTotal) { ((BaseAchievement)this).Grant(); } } private unsafe void ColdFusionKillCounter(DamageReport damageReport) { //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_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_004e: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Invalid comparison between Unknown and I4 BodyIndex attackerBodyIndex = damageReport.attackerBodyIndex; CharacterMaster attackerMaster = damageReport.attackerMaster; Debug.Log((object)(((object)(*(BodyIndex*)(&attackerBodyIndex))/*cast due to .constrained prefix*/).ToString() + " + " + ((object)((BaseAchievement)this).LookUpRequiredBodyIndex()/*cast due to .constrained prefix*/).ToString())); if (!Object.op_Implicit((Object)(object)attackerMaster) || (attackerBodyIndex != ((BaseAchievement)this).LookUpRequiredBodyIndex() && (int)attackerBodyIndex != -1)) { return; } CharacterBody attackerBody = damageReport.attackerBody; if ((Object)(object)attackerBody == (Object)null || !attackerBody.healthComponent.alive) { StatSheet currentStats = attackerMaster.playerStatsComponent.currentStats; currentStats.PushStatValue(postmortemKillCounter, 1uL); ulong statValueULong = ((BaseAchievement)this).userProfile.statSheet.GetStatValueULong(postmortemKillCounter); Debug.Log((object)statValueULong); if (statValueULong >= killRequirementTotal) { ((BaseAchievement)this).Grant(); } } } } [RegisterAchievement("UgornsMusicUnlock", "UgornsMusicUnlock", "FreeMage", 5u, typeof(UgornsMusicServerAchievement))] internal class UgornsMusicUnlock : UnlockBase { private class UgornsMusicServerAchievement : BaseServerAchievement { private CharacterBody trackedBody; public override void OnInstall() { ((BaseServerAchievement)this).OnInstall(); GlobalEventManager.onCharacterDeathGlobal += OnDeathResonanceCheck; } public override void OnUninstall() { ((BaseServerAchievement)this).OnUninstall(); GlobalEventManager.onCharacterDeathGlobal -= OnDeathResonanceCheck; } private void OnDeathResonanceCheck(DamageReport damageReport) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) CharacterBody currentBody = ((BaseServerAchievement)this).networkUser.GetCurrentBody(); if (Object.op_Implicit((Object)(object)currentBody)) { CharacterBody victimBody = damageReport.victimBody; if (victimBody.bodyIndex == BodyCatalog.FindBodyIndex("ElectricWormBody") && ElementCounter.GetPowerLevelFromBody(((Component)currentBody).gameObject, (MageElement)3) >= ElementCounter.Power.Low) { ((BaseServerAchievement)this).Grant(); ((BaseServerAchievement)this).ServerTryToCompleteActivity(); } } } } private Inventory currentInventory; public override string TOKEN_IDENTIFIER => "UgornsMusicUnlock".ToUpperInvariant(); public override string AchievementName => "Artificer: Ugorn’s Music"; public override string AchievementDesc => "As Artificer, with at least one Lightning ability equipped, triumph over an Overloading Worm."; public override void TryToCompleteActivity() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown bool flag = ((BaseAchievement)this).localUser.id == LocalUserManager.GetFirstLocalUser().id; if (((BaseAchievement)this).shouldGrant && flag) { BaseActivitySelector val = new BaseActivitySelector(); val.activityAchievementID = "FreezeManySimultaneousUnlock"; PlatformSystems.activityManager.TryToCompleteActivity(val, true, true); } } public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); ((BaseAchievement)this).SetServerTracked(true); } public override void OnBodyRequirementBroken() { ((BaseAchievement)this).OnBodyRequirementBroken(); ((BaseAchievement)this).SetServerTracked(false); } public override void OnInstall() { ((BaseAchievement)this).OnInstall(); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } private void UpdateInventory() { Inventory val = null; if (Object.op_Implicit((Object)(object)((BaseAchievement)this).localUser.cachedMasterController)) { val = ((BaseAchievement)this).localUser.cachedMasterController.master.inventory; } SetCurrentInventory(val); } private void SetCurrentInventory(Inventory newInventory) { if (!((Object)(object)currentInventory == (Object)(object)newInventory)) { if ((Object)(object)currentInventory != (Object)null) { currentInventory.onInventoryChanged -= OnInventoryChanged; } currentInventory = newInventory; if ((Object)(object)currentInventory != (Object)null) { currentInventory.onInventoryChanged += OnInventoryChanged; OnInventoryChanged(); } } } private void OnInventoryChanged() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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) GameObject cachedBodyObject = ((BaseAchievement)this).localUser.cachedBodyObject; if (!((Object)(object)((Component)currentInventory).gameObject == (Object)(object)cachedBodyObject) || !((BaseAchievement)this).meetsBodyRequirement) { return; } ElementCounter component = cachedBodyObject.GetComponent(); if ((Object)(object)component != (Object)null && component.lightningPower >= ElementCounter.Power.Low) { if (currentInventory.currentEquipmentIndex == Equipment.AffixBlue.equipmentIndex) { ((BaseAchievement)this).Grant(); } else if (currentInventory.currentEquipmentIndex == Equipment.Lightning.equipmentIndex && currentInventory.GetItemCount(Items.LightningStrikeOnHit) > 0) { ((BaseAchievement)this).Grant(); } } } private void ImpBossSmiteCheck(DamageReport obj) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0062: 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_0071: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) CharacterBody attackerBody = obj.attackerBody; CharacterBody victimBody = obj.victimBody; DamageInfo damageInfo = obj.damageInfo; if (Object.op_Implicit((Object)(object)attackerBody) && Object.op_Implicit((Object)(object)victimBody) && damageInfo != null) { bool flag = victimBody.bodyIndex == BodyCatalog.FindBodyIndex("ImpBossBody"); if (attackerBody.bodyIndex == ((BaseAchievement)this).LookUpRequiredBodyIndex() && flag && (damageInfo.force == Vector3.down * 1500f || (damageInfo.force == Vector3.down * 3000f && ((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)32))) && (Object)(object)damageInfo.inflictor == (Object)null) { ((BaseAchievement)this).Grant(); } } } } public abstract class UnlockBase : UnlockBase where T : UnlockBase { public static T instance { get; private set; } public UnlockBase() { if (instance != null) { Log.Warning("Singleton class \"" + typeof(T).Name + "\" inheriting UnlockBase was instantiated twice"); } else { instance = this as T; } } } public abstract class UnlockBase : BaseAchievement { public static Dictionary allUnlockDefs = new Dictionary(); public abstract string TOKEN_IDENTIFIER { get; } public abstract string AchievementName { get; } public abstract string AchievementDesc { get; } public static UnlockableDef CreateUnlockDef(Type RequiredUnlock, Sprite icon) { string name = RequiredUnlock.Name; if (allUnlockDefs.ContainsKey(name)) { return allUnlockDefs[name]; } string text = name.ToUpperInvariant(); UnlockableDef val = Content.CreateAndAddUnlockbleDef(name, name, icon); string nameToken = "ACHIEVEMENT_" + text + "_NAME"; string descToken = "ACHIEVEMENT_" + text + "_DESCRIPTION"; LanguageAPI.Add(nameToken, Reflection.GetPropertyValue(RequiredUnlock, "AchievementName")); LanguageAPI.Add(descToken, Reflection.GetPropertyValue(RequiredUnlock, "AchievementDesc")); val.getHowToUnlockString = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString(nameToken), Language.GetString(descToken) }); val.getUnlockedString = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString(nameToken), Language.GetString(descToken) }); allUnlockDefs[name] = val; return val; } public void AddLang() { LanguageAPI.Add("ACHIEVEMENT_" + TOKEN_IDENTIFIER + "_NAME", AchievementName); LanguageAPI.Add("ACHIEVEMENT_" + TOKEN_IDENTIFIER + "_DESCRIPTION", AchievementDesc); } public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("MageBody"); } public static StatDef GetCareerStatTotal(string name) { StatDef val = StatDef.Find(name); if (val == null) { val = StatDef.Register(name, (StatRecordType)0, (StatDataType)0, 0.0, (DisplayValueFormatterDelegate)null); } return val; } } [RegisterAchievement("WoolieRushUnlock", "WoolieRushUnlock", "FreeMage", 5u, null)] internal class WoolieRushUnlock : UnlockBase { public static float timeRequirement = 600f; public override string TOKEN_IDENTIFIER => "TankDamageUnlock".ToUpperInvariant(); public override string AchievementName => "Artificer: Lightning-Fast"; public override string AchievementDesc => $"As Artificer, fully charge the third teleporter before the timer reaches {timeRequirement / 60f} minutes."; public override void OnInstall() { ((BaseAchievement)this).OnInstall(); } public override void OnUninstall() { ((BaseAchievement)this).OnUninstall(); } private void OnTeleporterChargedGlobal(TeleporterInteraction teleporterInteraction) { if (Run.instance.GetRunStopwatch() < timeRequirement && Run.instance.stageClearCount == 2 && ((BaseAchievement)this).isUserAlive) { ((BaseAchievement)this).Grant(); } } public override void OnBodyRequirementMet() { TeleporterInteraction.onTeleporterChargedGlobal += OnTeleporterChargedGlobal; ((BaseAchievement)this).OnBodyRequirementMet(); } public override void OnBodyRequirementBroken() { TeleporterInteraction.onTeleporterChargedGlobal -= OnTeleporterChargedGlobal; ((BaseAchievement)this).OnBodyRequirementBroken(); } } } namespace ArtificerExtended.States { internal class FireIceShard : BaseSkillState, IStepSetter { public enum Gauntlet { Left, Right } public static GameObject effectPrefab = LegacyResourcesAPI.Load("prefabs/effects/MuzzleflashMageLightningLarge"); public static GameObject hitEffectPrefab = LegacyResourcesAPI.Load("prefabs/effects/impacteffects/HitsparkCommandoShotgun"); public GameObject muzzleflashEffectPrefab = Addressables.LoadAssetAsync((object)RoR2_Junk_Mage.MuzzleflashMageIce_prefab).WaitForCompletion(); public static float maxRange = ArtificerExtendedPlugin.meleeRangeSingle; public static float force = 0f; public float baseDuration = 0.5f; private float duration; public static float attackSpeedAltAnimationThreshold = FireFireBolt.attackSpeedAltAnimationThreshold; public string attackSoundString = "Play_mage_m2_iceSpear_shoot"; public string attackSoundString2 = "Play_mage_shift_wall_build"; public static float bloom = 0f; private bool hasFiredGauntlet; private Animator animator; private string muzzleString; private Transform muzzleTransform; private Gauntlet gauntlet; private ChildLocator childLocator; public static bool hasAssignedToRiskyModReload = false; private int bulletCount => _4IceShardsSkill.bulletCountPoint + _4IceShardsSkill.bulletCountSpread + _4IceShardsSkill.bulletCountBuckshot; public void SetStep(int i) { gauntlet = (Gauntlet)i; } public override void OnEnter() { ((BaseState)this).OnEnter(); ((BaseState)this).AddRecoil(-1f * _4IceShardsSkill.recoilAmplitude, -2f * _4IceShardsSkill.recoilAmplitude, -0.5f * _4IceShardsSkill.recoilAmplitude, 0.5f * _4IceShardsSkill.recoilAmplitude); ((EntityState)this).characterBody.AddSpreadBloom(_4IceShardsSkill.spreadBloomValue); duration = baseDuration / ((BaseState)this).attackSpeedStat; Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); Util.PlaySound(attackSoundString2, ((EntityState)this).gameObject); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { childLocator = ((Component)animator).GetComponent(); } switch (gauntlet) { case Gauntlet.Right: muzzleString = "MuzzleRight"; if (((BaseState)this).attackSpeedStat < attackSpeedAltAnimationThreshold) { ((EntityState)this).PlayCrossfade("Gesture, Additive", "Cast1Right", "FireGauntlet.playbackRate", duration, 0.1f); ((EntityState)this).PlayAnimation("Gesture Left, Additive", "Empty"); ((EntityState)this).PlayAnimation("Gesture Right, Additive", "Empty"); } else { ((EntityState)this).PlayAnimation("Gesture Right, Additive", "FireGauntletRight", "FireGauntlet.playbackRate", duration, 0f); ((EntityState)this).PlayAnimation("Gesture, Additive", "HoldGauntletsUp", "FireGauntlet.playbackRate", duration, 0f); FireGauntlet(); } break; case Gauntlet.Left: muzzleString = "MuzzleLeft"; if (((BaseState)this).attackSpeedStat < attackSpeedAltAnimationThreshold) { ((EntityState)this).PlayCrossfade("Gesture, Additive", "Cast1Left", "FireGauntlet.playbackRate", duration, 0.1f); ((EntityState)this).PlayAnimation("Gesture Left, Additive", "Empty"); ((EntityState)this).PlayAnimation("Gesture Right, Additive", "Empty"); } else { ((EntityState)this).PlayAnimation("Gesture Left, Additive", "FireGauntletLeft", "FireGauntlet.playbackRate", duration, 0f); ((EntityState)this).PlayAnimation("Gesture, Additive", "HoldGauntletsUp", "FireGauntlet.playbackRate", duration, 0f); FireGauntlet(); } break; } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public void FireSkill() { if (!hasAssignedToRiskyModReload) { MageStockController.StatePairs.Add(typeof(FireIceShard), MageStockController.iceMuzzleflashEffectPrefab); hasAssignedToRiskyModReload = true; } if (hasAssignedToRiskyModReload) { MageStockController component = ((EntityState)this).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.FireSkill(duration); } } } private void FireGauntlet() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: 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) if (!hasFiredGauntlet) { GameObject gameObject = ((Component)((EntityState)this).outer).gameObject; if (AltArtiPassive.instanceLookup.TryGetValue(gameObject, out var value)) { value.SkillCast(); } ((EntityState)this).characterBody.AddSpreadBloom(bloom); hasFiredGauntlet = true; Ray val; if (VRStuff.VRInstalled) { muzzleString = "MuzzleRight"; val = VRStuff.GetVRHandAimRay(dominant: true); VRStuff.AnimateVRHand(dominant: true, "Cast"); } else { val = ((BaseState)this).GetAimRay(); } if (Object.op_Implicit((Object)(object)childLocator)) { muzzleTransform = childLocator.FindChild(muzzleString); } if (Object.op_Implicit((Object)(object)muzzleflashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } ((BaseState)this).StartAimMode(val, 2f, false); if (((EntityState)this).isAuthority) { float num = ((EntityState)this).characterBody.spreadBloomAngle * _4IceShardsSkill.spreadAmplitude; bool isCrit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master); CreateIceShardSpread(100f, val, 0f, 0f, (_4IceShardsSkill.bulletCountPoint <= 0) ? 1u : ((uint)_4IceShardsSkill.bulletCountPoint), _4IceShardsSkill.procCoefficientPoint, (FalloffModel)0, isCrit).Fire(); CreateIceShardSpread(100f, val, num * 0.1f, num * _4IceShardsSkill.spreadShotFraction, (_4IceShardsSkill.bulletCountSpread > 0) ? ((uint)_4IceShardsSkill.bulletCountSpread) : 0u, _4IceShardsSkill.procCoefficientSpread, (FalloffModel)1, isCrit).Fire(); CreateIceShardSpread(100f, val, num * _4IceShardsSkill.spreadShotFraction, num, (_4IceShardsSkill.bulletCountBuckshot > 0) ? ((uint)_4IceShardsSkill.bulletCountBuckshot) : 0u, _4IceShardsSkill.procCoefficientBuckshot, (FalloffModel)2, isCrit, useChill: false).Fire(); } } } internal BulletAttack CreateIceShardSpread(float frostChance, Ray aimRay, float minSpread, float maxSpread, uint bulletsPerSpread, float procCoefficient, FalloffModel falloffModel, bool isCrit, bool useChill = true) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) BulletAttack val = new BulletAttack(); val.damageType = DamageTypeCombo.op_Implicit((DamageType)0); val.owner = ((EntityState)this).gameObject; val.weapon = ((EntityState)this).gameObject; val.origin = ((Ray)(ref aimRay)).origin; val.aimVector = ((Ray)(ref aimRay)).direction; val.minSpread = minSpread; val.maxSpread = maxSpread; val.bulletCount = bulletsPerSpread; val.procCoefficient = procCoefficient; val.damage = _4IceShardsSkill.damageCoefficient * ((BaseState)this).damageStat / (float)bulletCount; val.force = force; val.falloffModel = falloffModel; val.tracerEffectPrefab = _4IceShardsSkill.tracerShotgun; val.muzzleName = muzzleString; val.hitEffectPrefab = hitEffectPrefab; val.isCrit = isCrit; val.HitEffectNormal = false; val.radius = _4IceShardsSkill.bulletRadius; val.maxDistance = maxRange; val.damageType = DamageTypeCombo.GenericPrimary; if (Util.CheckRoll(frostChance, ((EntityState)this).characterBody.master)) { val.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)131072, (DamageSource)1); } return val; } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if ((Object)(object)animator != (Object)null && animator.GetFloat("FireGauntlet.fire") > 0f && !hasFiredGauntlet) { FireGauntlet(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (!hasFiredGauntlet) { FireGauntlet(); } ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write((byte)gauntlet); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); gauntlet = (Gauntlet)reader.ReadByte(); } } internal class FireLaserbolts : BaseSkillState, IStepSetter { public enum Gauntlet { Left, Right } public GameObject muzzleflashEffectPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Mage.MuzzleflashMageLightning_prefab).WaitForCompletion(); public float procCoefficient = 1f; public float force = 20f; public static float attackSpeedAltAnimationThreshold = FireFireBolt.attackSpeedAltAnimationThreshold; public float baseDuration = 0.45f; public string attackSoundString = FireLaserbolt.attackString; public string attackSoundString2 = "Play_mage_m2_impact"; private float duration; private bool hasFiredGauntlet = false; private string muzzleString; private Transform muzzleTransform; private Animator animator; private ChildLocator childLocator; private Gauntlet gauntlet; public static float baseRecoilAmplitude = 1.6f; public static float maxRange = 45f; public static float damageCoefficient => _3LaserBoltsSkill.damageCoefficient; public void SetStep(int i) { gauntlet = (Gauntlet)i; } public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); Util.PlaySound(attackSoundString2, ((EntityState)this).gameObject); float num = baseRecoilAmplitude / ((BaseState)this).attackSpeedStat; ((BaseState)this).AddRecoil(0f - num, -2f * num, 0f - num, num); ((EntityState)this).characterBody.SetAimTimer(2f); animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { childLocator = ((Component)animator).GetComponent(); } switch (gauntlet) { case Gauntlet.Right: muzzleString = "MuzzleRight"; if (((BaseState)this).attackSpeedStat < FireFireBolt.attackSpeedAltAnimationThreshold) { ((EntityState)this).PlayCrossfade("Gesture, Additive", "Cast1Right", "FireGauntlet.playbackRate", duration, 0.1f); ((EntityState)this).PlayAnimation("Gesture Left, Additive", "Empty"); ((EntityState)this).PlayAnimation("Gesture Right, Additive", "Empty"); } else { ((EntityState)this).PlayAnimation("Gesture Right, Additive", "FireGauntletRight", "FireGauntlet.playbackRate", duration, 0f); ((EntityState)this).PlayAnimation("Gesture, Additive", "HoldGauntletsUp", "FireGauntlet.playbackRate", duration, 0f); FireGauntlet(); } break; case Gauntlet.Left: muzzleString = "MuzzleLeft"; if (((BaseState)this).attackSpeedStat < FireFireBolt.attackSpeedAltAnimationThreshold) { ((EntityState)this).PlayCrossfade("Gesture, Additive", "Cast1Left", "FireGauntlet.playbackRate", duration, 0.1f); ((EntityState)this).PlayAnimation("Gesture Left, Additive", "Empty"); ((EntityState)this).PlayAnimation("Gesture Right, Additive", "Empty"); } else { ((EntityState)this).PlayAnimation("Gesture Left, Additive", "FireGauntletLeft", "FireGauntlet.playbackRate", duration, 0f); ((EntityState)this).PlayAnimation("Gesture, Additive", "HoldGauntletsUp", "FireGauntlet.playbackRate", duration, 0f); FireGauntlet(); } break; } } public override void OnExit() { ((EntityState)this).OnExit(); } private void FireGauntlet() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_0199: 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_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) if (!hasFiredGauntlet) { ((EntityState)this).characterBody.AddSpreadBloom(FireFireBolt.bloom); hasFiredGauntlet = true; Ray val; if (VRStuff.VRInstalled) { muzzleString = "MuzzleRight"; val = VRStuff.GetVRHandAimRay(dominant: true); VRStuff.AnimateVRHand(dominant: true, "Cast"); } else { val = ((BaseState)this).GetAimRay(); } if (Object.op_Implicit((Object)(object)childLocator)) { muzzleTransform = childLocator.FindChild(muzzleString); } if (Object.op_Implicit((Object)(object)muzzleflashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); } if (((EntityState)this).isAuthority) { BulletAttack val2 = new BulletAttack(); val2.owner = ((EntityState)this).gameObject; val2.weapon = ((EntityState)this).gameObject; val2.origin = ((Ray)(ref val)).origin; val2.aimVector = ((Ray)(ref val)).direction; val2.minSpread = 0f; val2.maxSpread = 0f; val2.damage = damageCoefficient * ((BaseState)this).damageStat; val2.force = FireLaserbolt.force; val2.tracerEffectPrefab = _3LaserBoltsSkill.tracerLaser; val2.muzzleName = muzzleString; val2.hitEffectPrefab = FireLaserbolt.impactEffectPrefab; val2.isCrit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master); val2.radius = 0.25f; val2.falloffModel = (FalloffModel)0; val2.smartCollision = true; val2.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)8192, (DamageSource)1); DamageAPI.AddModdedDamageType(val2, CommonAssets.ChainLightningDamageType); val2.Fire(); } GameObject gameObject = ((Component)((EntityState)this).outer).gameObject; if (AltArtiPassive.instanceLookup.TryGetValue(gameObject, out var value)) { value.SkillCast(); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if ((Object)(object)animator != (Object)null && animator.GetFloat("FireGauntlet.fire") > 0f && !hasFiredGauntlet) { FireGauntlet(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { if (!hasFiredGauntlet) { FireGauntlet(); } ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write((byte)gauntlet); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); gauntlet = (Gauntlet)reader.ReadByte(); } } internal class FireLavaBolt : FireFireBolt, IStepSetter { public void SetStep(int i) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) base.gauntlet = (Gauntlet)i; } public override void OnEnter() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) base.projectilePrefab = _2LavaBoltsSkill.sloshProjectilePrefab; base.muzzleflashEffectPrefab = Addressables.LoadAssetAsync((object)RoR2_Junk_Mage.MuzzleflashMageFireLarge_prefab).WaitForCompletion(); base.damageCoefficient = _2LavaBoltsSkill.damageCoefficient; base.baseDuration = _2LavaBoltsSkill.baseDuration; base.attackSoundString = "Play_mage_shift_wall_build"; base.attackSoundPitch = 10f; if (VRStuff.VRInstalled) { VRStuff.AnimateVRHand(dominant: true, "Cast"); } base.muzzleString = (((int)base.gauntlet == 0) ? "MuzzleLeft" : "MuzzleRight"); ((FireFireBolt)this).OnEnter(); base.muzzleString = (((int)base.gauntlet == 0) ? "MuzzleLeft" : "MuzzleRight"); } public override void ModifyProjectileInfo(ref FireProjectileInfo fireProjectileInfo) { //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) ((FireFireBolt)this).ModifyProjectileInfo(ref fireProjectileInfo); if ((Object)(object)base.muzzleTransform != (Object)null) { fireProjectileInfo.position = base.muzzleTransform.position; } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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) if (((EntityState)this).fixedAge <= base.duration * 0.2f) { return (InterruptPriority)2; } return ((FireFireBolt)this).GetMinimumInterruptPriority(); } } public class FireSnowBall : FireFireBolt, IStepSetter { public static float damageCoeff = _1SnowballsSkill.snowballBaseDamage; public void SetStep(int i) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) base.gauntlet = (Gauntlet)i; } public override void OnEnter() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) base.projectilePrefab = _1SnowballsSkill.snowballProjectilePrefab; base.muzzleflashEffectPrefab = Addressables.LoadAssetAsync((object)RoR2_Junk_Mage.MuzzleflashMageIce_prefab).WaitForCompletion(); base.damageCoefficient = damageCoeff; base.baseDuration = _1SnowballsSkill.snowballBaseDuration; base.attackSoundString = "Play_mage_shift_wall_build"; base.attackSoundPitch = 10f; if (VRStuff.VRInstalled) { VRStuff.AnimateVRHand(dominant: true, "Cast"); } base.muzzleString = (((int)base.gauntlet == 0) ? "MuzzleLeft" : "MuzzleRight"); ((FireFireBolt)this).OnEnter(); base.muzzleString = (((int)base.gauntlet == 0) ? "MuzzleLeft" : "MuzzleRight"); } public override void ModifyProjectileInfo(ref FireProjectileInfo fireProjectileInfo) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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) ((FireFireBolt)this).ModifyProjectileInfo(ref fireProjectileInfo); fireProjectileInfo.damageTypeOverride = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)131072, (DamageSource)1); if ((Object)(object)base.muzzleTransform != (Object)null) { fireProjectileInfo.position = base.muzzleTransform.position; } } } internal class AimSnowglobe : AimThrowableBase { public override void OnEnter() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) base.damageCoefficient = _3SnowglobeSkill.impactDamageCoefficient; base.projectileBaseSpeed = _3SnowglobeSkill.projectileBaseSpeed; base.detonationRadius = _3SnowglobeSkill.snowWardRadius / 2f; base.projectilePrefab = _3SnowglobeSkill.snowglobeDeployProjectilePrefab; base.baseMinimumDuration = 0.4f; base.maxDistance = 100f; base.setFuse = true; base.arcVisualizerPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/BasicThrowableVisualizer.prefab").WaitForCompletion(); base.endpointVisualizerPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Huntress.HuntressArrowRainIndicator_prefab).WaitForCompletion(); ((AimThrowableBase)this).OnEnter(); ((EntityState)this).PlayAnimation("Gesture, Additive", PrepWall.PrepWallStateHash, PrepWall.PrepWallParamHash, base.minimumDuration); } public override void ModifyProjectile(ref FireProjectileInfo fireProjectileInfo) { ((AimThrowableBase)this).ModifyProjectile(ref fireProjectileInfo); } public override void OnExit() { ((EntityState)this).PlayAnimation("Gesture, Additive", BaseThrowBombState.FireNovaBombStateHash, BaseThrowBombState.FireNovaBombParamHash, base.minimumDuration); EffectManager.SimpleMuzzleFlash(_3SnowglobeSkill.muzzleflashEffectPrefab, ((EntityState)this).gameObject, "MuzzleLeft", false); EffectManager.SimpleMuzzleFlash(_3SnowglobeSkill.muzzleflashEffectPrefab, ((EntityState)this).gameObject, "MuzzleRight", false); ((AimThrowableBase)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)1; } } public class ChargeMeteors : BaseSkillState { public GameObject muzzleflashEffectPrefab = Addressables.LoadAssetAsync((object)RoR2_Junk_Mage.MuzzleflashMageFireLarge_prefab).WaitForCompletion(); public GameObject chargeEffectPrefab = LegacyResourcesAPI.Load("prefabs/effects/ChargeMageFireBomb"); public string chargeSoundString = "Play_mage_m2_charge"; public float force = 300f; public static GameObject crosshairOverridePrefab; private float stopwatch; private float timer; private float windDownDuration; private float chargeDuration; private bool hasFiredBomb; private string muzzleString; private Transform muzzleTransform; private Animator animator; private ChildLocator childLocator; private GameObject chargeEffectInstance; private GameObject defaultCrosshairPrefab; public float minRadius = 0f; public float maxRadius = 0.5f; private uint soundID; private AltArtiPassive.BatchHandle handle; public static GameObject areaIndicatorPrefab = ChargeMeteor.areaIndicatorPrefab; public static GameObject aoeEffect = LegacyResourcesAPI.Load("prefabs/effects/omnieffect/OmniImpactVFXLightningMage"); public static GameObject muzzleflashEffect = ChargeMeteor.muzzleflashEffect; public static GameObject meteorEffect = _1EruptionSkill.meteorImpactEffectPrefab; private float radius; private GameObject areaIndicatorInstance; private Vector3 targetLocation; private bool disableIndicator = false; private float minChargeDuration => _1EruptionSkill.minDuration; private float maxChargeDuration => _1EruptionSkill.maxDuration; private float baseWinddownDuration => _1EruptionSkill.windDownDuration; private float minDamage => _1EruptionSkill.minBlastDamage; private float maxDamage => _1EruptionSkill.maxBlastDamage; private float minMeteorRadius => _1EruptionSkill.minBlastRadius; private float maxMeteorRadius => _1EruptionSkill.maxBlastRadius; private int minProjectiles => _1EruptionSkill.minClusterProjectiles; private int maxProjectiles => _1EruptionSkill.maxClusterProjectiles; public override void OnEnter() { ((BaseState)this).OnEnter(); if ((Object)(object)ChargeMeteor.areaIndicatorPrefab != (Object)null) { areaIndicatorInstance = Object.Instantiate(ChargeMeteor.areaIndicatorPrefab); UpdateAreaIndicator(); } else { Debug.Log((object)"Damn, area indicator prefab null?"); } handle = new AltArtiPassive.BatchHandle(); windDownDuration = baseWinddownDuration / ((BaseState)this).attackSpeedStat; chargeDuration = maxChargeDuration / ((BaseState)this).attackSpeedStat; soundID = Util.PlayAttackSpeedSound(chargeSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); ((EntityState)this).characterBody.SetAimTimer(chargeDuration + windDownDuration + 2f); chargeEffectPrefab = ChargeSolarFlare.fireBombChargeEffectPrefab; muzzleString = "MuzzleBetween"; animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { childLocator = ((Component)animator).GetComponent(); } if (Object.op_Implicit((Object)(object)childLocator)) { muzzleTransform = childLocator.FindChild(muzzleString); if (Object.op_Implicit((Object)(object)muzzleTransform) && !Object.op_Implicit((Object)(object)chargeEffectPrefab)) { } } ((EntityState)this).PlayAnimation("Gesture, Additive", "PrepWall", "PrepWall.playbackRate", chargeDuration, 0f); defaultCrosshairPrefab = ((EntityState)this).characterBody._defaultCrosshairPrefab; if (Object.op_Implicit((Object)(object)crosshairOverridePrefab)) { ((EntityState)this).characterBody._defaultCrosshairPrefab = crosshairOverridePrefab; } if (VRStuff.VRInstalled) { VRStuff.AnimateVRHand(dominant: false, "Charge"); } } private void UpdateAreaIndicator() { //IL_004b: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)areaIndicatorInstance) && !disableIndicator) { areaIndicatorInstance.SetActive(true); float num = 100f; float num2 = 0f; Ray val = ((!VRStuff.VRInstalled) ? ((BaseState)this).GetAimRay() : VRStuff.GetVRHandAimRay(dominant: false)); RaycastHit val2 = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, CameraRigController.ModifyAimRayIfApplicable(val, ((EntityState)this).gameObject, ref num2), ref val2, num + num2, CommonMasks.bullet, (QueryTriggerInteraction)0)) { targetLocation = ((RaycastHit)(ref val2)).point; areaIndicatorInstance.transform.position = targetLocation; areaIndicatorInstance.transform.up = ((RaycastHit)(ref val2)).normal; } radius = Util.Remap(GetChargeProgressSmooth(), 0f, 1f, minMeteorRadius, maxMeteorRadius); areaIndicatorInstance.transform.localScale = new Vector3(radius, radius, radius); areaIndicatorInstance.SetActive(true); } } public override void Update() { ((EntityState)this).Update(); ((EntityState)this).characterBody.SetSpreadBloom(Util.Remap(GetChargeProgressSmooth(), 0f, 1f, minRadius, maxRadius), true); UpdateAreaIndicator(); } private float GetChargeProgressSmooth() { return Mathf.Clamp01(stopwatch / chargeDuration); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; timer += Time.fixedDeltaTime * ((EntityState)this).characterBody.attackSpeed; GameObject gameObject = ((Component)((EntityState)this).outer).gameObject; if (AltArtiPassive.instanceLookup.TryGetValue(gameObject, out var value)) { while (timer > 0.5f) { timer -= 0.5f; value.SkillCast(handle, isFire: true); } } if (!hasFiredBomb && (stopwatch >= chargeDuration || !((BaseSkillState)this).IsKeyDownAuthority()) && !hasFiredBomb && stopwatch >= minChargeDuration) { FireMeteor(); } if (stopwatch >= windDownDuration && hasFiredBomb && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void FireMeteor() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0129: 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) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Expected O, but got Unknown //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_012e: 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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: 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_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) hasFiredBomb = true; ((EntityState)this).PlayAnimation("Gesture, Additive", "FireNovaBomb", "FireNovaBomb.playbackRate", windDownDuration, 0f); ((EntityState)this).PlayAnimation("Gesture, Additive", "FireWall"); Ray val = ((!VRStuff.VRInstalled) ? ((BaseState)this).GetAimRay() : VRStuff.GetVRHandAimRay(dominant: false)); if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } if (Object.op_Implicit((Object)(object)muzzleflashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, "MuzzleLeft", false); EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, "MuzzleRight", false); } if (((EntityState)this).isAuthority) { Vector3 val2 = ((EntityState)this).characterBody.corePosition; Vector3 val3 = Vector3.up; if ((Object)(object)areaIndicatorInstance != (Object)null) { val2 = areaIndicatorInstance.transform.position; val3 = areaIndicatorInstance.transform.up; } else { float num = 1000f; float num2 = 0f; Ray val4 = ((!VRStuff.VRInstalled) ? ((BaseState)this).GetAimRay() : VRStuff.GetVRHandAimRay(dominant: false)); RaycastHit val5 = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, CameraRigController.ModifyAimRayIfApplicable(val4, ((EntityState)this).gameObject, ref num2), ref val5, num + num2, CommonMasks.bullet, (QueryTriggerInteraction)0)) { val2 = ((RaycastHit)(ref val5)).point; val3 = ((RaycastHit)(ref val5)).normal; } } disableIndicator = true; areaIndicatorInstance.SetActive(false); float chargeProgressSmooth = GetChargeProgressSmooth(); bool crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); float num3 = Util.Remap(chargeProgressSmooth, minChargeDuration / maxChargeDuration, 1f, minDamage, maxDamage); EffectManager.SpawnEffect(_1EruptionSkill.meteorImpactEffectPrefab, new EffectData { origin = targetLocation, scale = radius }, true); BlastAttack val6 = new BlastAttack(); val6.radius = radius; val6.procCoefficient = 1f; val6.position = targetLocation; val6.attacker = ((EntityState)this).gameObject; val6.crit = crit; val6.baseDamage = ((EntityState)this).characterBody.damage * num3; val6.falloffModel = (FalloffModel)0; val6.baseForce = force; val6.teamIndex = TeamComponent.GetObjectTeam(val6.attacker); val6.damageType = DamageTypeCombo.op_Implicit((DamageType)128); val6.damageType.damageSource = (DamageSource)2; val6.Fire(); if (val3 == Vector3.one) { val3 += Vector3.forward * 0.1f; } int num4 = Mathf.FloorToInt(Util.Remap(chargeProgressSmooth, minChargeDuration / maxChargeDuration, 1f, (float)minProjectiles, (float)maxProjectiles)); for (int i = 0; i < num4; i++) { Vector3 val7 = Random.insideUnitSphere + val3; Vector3 normalized = ((Vector3)(ref val7)).normalized; ProjectileManager instance = ProjectileManager.instance; FireProjectileInfo val8 = new FireProjectileInfo { projectilePrefab = CommonAssets.lavaProjectilePrefab, position = val2 + normalized * 1.5f, rotation = Util.QuaternionSafeLookRotation(normalized), owner = ((Component)((EntityState)this).outer).gameObject, damage = _1EruptionSkill.clusterProjectileDamage, force = 300f, crit = crit, damageColorIndex = (DamageColorIndex)0 }; ((FireProjectileInfo)(ref val8)).speedOverride = 15f; instance.FireProjectile(val8); } } ((EntityState)this).characterBody._defaultCrosshairPrefab = defaultCrosshairPrefab; stopwatch = 0f; timer = 0f; EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); disableIndicator = true; } public override void OnExit() { handle.Fire(0f, 0.5f); if (!((EntityState)this).outer.destroying && !hasFiredBomb) { ((EntityState)this).PlayAnimation("Gesture, Additive", "Empty"); } if (Object.op_Implicit((Object)(object)chargeEffectInstance)) { EntityState.Destroy((Object)(object)chargeEffectInstance); } AkSoundEngine.StopPlayingID(soundID); ((EntityState)this).characterBody._defaultCrosshairPrefab = defaultCrosshairPrefab; if (VRStuff.VRInstalled) { VRStuff.AnimateVRHand(dominant: false, "Cast"); } ((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)3; } } internal class ChargeSolarFlare : BaseChargeBombState { public static GameObject fireBombChargeEffectPrefab = Addressables.LoadAssetAsync((object)RoR2_Junk_Mage.ChargeMageFireBomb_prefab).WaitForCompletion(); public override void OnEnter() { base.chargeEffectPrefab = fireBombChargeEffectPrefab; base.minChargeDuration = _4SolarFlareSkill.minChargeDuration; base.baseDuration = _4SolarFlareSkill.maxChargeDuration; ((BaseChargeBombState)this).OnEnter(); } public override BaseThrowBombState GetNextState() { return (BaseThrowBombState)(object)new ThrowSolarFlare(); } } internal class ThrowSolarFlare : BaseThrowBombState { private GameObject solarFlareProjectilePrefab => _4SolarFlareSkill.projectilePrefab; public override void OnEnter() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) base.muzzleflashEffectPrefab = Addressables.LoadAssetAsync((object)RoR2_Junk_Mage.MuzzleflashMageFireLarge_prefab).WaitForCompletion(); base.projectilePrefab = solarFlareProjectilePrefab; base.minDamageCoefficient = _4SolarFlareSkill.blastDamage; base.maxDamageCoefficient = _4SolarFlareSkill.blastDamage; base.baseDuration = 1f; ((BaseThrowBombState)this).OnEnter(); } public override void ModifyProjectile(ref FireProjectileInfo projectileInfo) { //IL_003a: 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) ((FireProjectileInfo)(ref projectileInfo)).speedOverride = Util.Remap(base.charge, _4SolarFlareSkill.minChargeDuration / _4SolarFlareSkill.maxChargeDuration, 1f, _4SolarFlareSkill.minSendSpeed, _4SolarFlareSkill.maxSendSpeed); projectileInfo.useSpeedOverride = true; projectileInfo.damageTypeOverride = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)128), (DamageTypeExtended)0, (DamageSource)2); ((BaseThrowBombState)this).ModifyProjectile(ref projectileInfo); } } internal class ThunderStrikeDash : BasicMeleeAttack { private bool hasIncreasedDuration = false; public float speedCoefficientOnExit = 1f; private CharacterModel characterModel; private float invulDuration = 0.1f; public float exitSmallHop = 6f; public float delay = 0.25f; public float delayPerHit = 0f; public string enterAnimationLayerName = "Gesture, Additive"; public string enterAnimationStateName = "PrepWall"; public float enterAnimationCrossfadeDuration = 0.1f; public string exitAnimationLayerName = "Gesture, Additive"; public string exitAnimationStateName = "FireNovaBomb"; public GameObject selfOnHitOverlayEffectPrefab; private Transform modelTransform; private Vector3 dashVector; private int originalLayer; private int currentHitCount; private GameObject surgeTrailEffectInstanceL; private GameObject surgeTrailEffectInstanceR; public float speedCoefficient => _2ThunderstrikeSkill.speedCoefficient; public string endSoundString => PrepWall.fireSoundString; public float delayedDamageCoefficient => _2ThunderstrikeSkill.delayDamageCoefficient; public float delayedProcCoefficient => _2ThunderstrikeSkill.delayProcCoefficient; public GameObject delayedEffectPrefab => _2ThunderstrikeSkill.lightningImpactEffect; public GameObject orbEffect => _2ThunderstrikeSkill.lightningOrbEffect; private Vector3 dashVelocity => dashVector * ((BaseState)this).moveSpeedStat * speedCoefficient * ((BaseState)this).attackSpeedStat; public override string GetHitBoxGroupName() { return "Strike"; } public override void OnEnter() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) base.hitPauseDuration = 0.06f; base.baseDuration = _2ThunderstrikeSkill.baseDuration; ((BasicMeleeAttack)this).OnEnter(); dashVector = ((EntityState)this).inputBank.aimDirection; originalLayer = ((EntityState)this).gameObject.layer; ((EntityState)this).gameObject.layer = LayerIndex.GetAppropriateFakeLayerForTeam(((EntityState)this).teamComponent.teamIndex).intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = Vector3.zero; modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val.duration = 0.6f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = LegacyResourcesAPI.Load("Materials/matHuntressFlashBright"); val.AddToCharacterModel(((Component)modelTransform).GetComponent()); TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject); val2.duration = 0.7f; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val2.destroyComponentOnEnd = true; val2.originalMaterial = LegacyResourcesAPI.Load("Materials/matHuntressFlashExpanded"); val2.AddToCharacterModel(((Component)modelTransform).GetComponent()); } modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount + 1; } ((EntityState)this).PlayAnimation("Gesture, Additive", "PrepWall", "PrepWall.playbackRate", enterAnimationCrossfadeDuration, 0f); ((EntityState)this).characterDirection.forward = ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized; if (NetworkServer.active) { } Util.PlaySound(FlyUpState.beginSoundString, ((EntityState)this).gameObject); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); } private void CreateBlinkEffect(Vector3 origin) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(dashVector); val.origin = origin; EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false); Transform val2 = ((BaseState)this).FindModelChild("MuzzleLeft"); if (Object.op_Implicit((Object)(object)val2)) { surgeTrailEffectInstanceL = Object.Instantiate(ArtificerExtendedPlugin.muzzleflashIonSurgeTrail, val2); } Transform val3 = ((BaseState)this).FindModelChild("MuzzleRight"); if (Object.op_Implicit((Object)(object)val3)) { surgeTrailEffectInstanceR = Object.Instantiate(ArtificerExtendedPlugin.muzzleflashIonSurgeTrail, val3); } } public override void OnExit() { //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)surgeTrailEffectInstanceL)) { EntityState.Destroy((Object)(object)surgeTrailEffectInstanceL); } if (Object.op_Implicit((Object)(object)surgeTrailEffectInstanceR)) { EntityState.Destroy((Object)(object)surgeTrailEffectInstanceR); } GameObject gameObject = ((Component)((EntityState)this).outer).gameObject; if (AltArtiPassive.instanceLookup.TryGetValue(gameObject, out var value)) { value.SkillCast(); } if (ElementCounter.GetPowerLevelFromBody(gameObject, (MageElement)3, value) >= ElementCounter.Power.Extreme) { int num = Mathf.Min(currentHitCount, _2ThunderstrikeSkill.resonantCdrMax); GenericSkill secondary = ((EntityState)this).skillLocator.secondary; secondary.RunRecharge(_2ThunderstrikeSkill.resonantCdrFirst + _2ThunderstrikeSkill.resonantCdr * (float)(num - 1)); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount - 1; } if (NetworkServer.active) { } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= speedCoefficientOnExit; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, exitSmallHop); Util.PlaySound(endSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation(exitAnimationLayerName, exitAnimationStateName); ((EntityState)this).gameObject.layer = originalLayer; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((BasicMeleeAttack)this).OnExit(); } public override void PlayAnimation() { ((BasicMeleeAttack)this).PlayAnimation(); ((EntityState)this).PlayCrossfade(enterAnimationLayerName, enterAnimationStateName, enterAnimationCrossfadeDuration); } public override void AuthorityFixedUpdate() { //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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityFixedUpdate(); if (!((BasicMeleeAttack)this).authorityInHitPause) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += dashVelocity * ((EntityState)this).GetDeltaTime(); ((EntityState)this).characterDirection.forward = dashVelocity; ((EntityState)this).characterDirection.moveVector = dashVelocity; ((EntityState)this).characterBody.isSprinting = true; } } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); overlapAttack.damage = _2ThunderstrikeSkill.damageCoefficient * ((BaseState)this).damageStat; overlapAttack.damageType = DamageTypeCombo.GenericSecondary; } public override void FixedUpdate() { if (currentHitCount <= 0 || !hasIncreasedDuration) { } ((BasicMeleeAttack)this).FixedUpdate(); } public override void OnMeleeHitAuthority() { //IL_0013: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown ((BasicMeleeAttack)this).OnMeleeHitAuthority(); ((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.HiddenInvincibility.buffIndex, invulDuration); if (!hasIncreasedDuration) { hasIncreasedDuration = true; base.duration *= _2ThunderstrikeSkill.durationMultOnHit; } float num = base.hitPauseDuration / ((BaseState)this).attackSpeedStat; if (Object.op_Implicit((Object)(object)selfOnHitOverlayEffectPrefab) && num > 1f / 30f) { EffectData val = new EffectData { origin = ((EntityState)this).transform.position, genericFloat = base.hitPauseDuration / ((BaseState)this).attackSpeedStat }; val.SetNetworkedObjectReference(((EntityState)this).gameObject); EffectManager.SpawnEffect(selfOnHitOverlayEffectPrefab, val, true); } foreach (HurtBox hitResult in base.hitResults) { currentHitCount++; float damageValue = ((EntityState)this).characterBody.damage * delayedDamageCoefficient; float num2 = delay + delayPerHit * (float)currentHitCount; bool isCrit = ((BaseState)this).RollCrit(); HandleHit(((EntityState)this).gameObject, hitResult, damageValue, delayedProcCoefficient, isCrit, num2, orbEffect, delayedEffectPrefab); } } 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; } private static void HandleHit(GameObject attackerObject, HurtBox victimHurtBox, float damageValue, float procCoefficient, bool isCrit, float delay, GameObject orbEffectPrefab, GameObject orbImpactEffectPrefab) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_002d: 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_006b: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown if (!NetworkServer.active) { NetworkWriter val = new NetworkWriter(); val.StartMessage((short)21206); val.Write(attackerObject); NetworkExtensions.Write(val, HurtBoxReference.FromHurtBox(victimHurtBox)); val.Write(damageValue); val.Write(procCoefficient); val.Write(isCrit); val.Write(delay); NetworkExtensions.WriteEffectIndex(val, EffectCatalog.FindEffectIndexFromPrefab(orbEffectPrefab)); NetworkExtensions.WriteEffectIndex(val, EffectCatalog.FindEffectIndexFromPrefab(orbImpactEffectPrefab)); val.FinishMessage(); NetworkConnection readyConnection = ClientScene.readyConnection; if (readyConnection != null) { readyConnection.SendWriter(val, QosChannelIndex.defaultReliable.intVal); } } else if (Object.op_Implicit((Object)(object)victimHurtBox) && Object.op_Implicit((Object)(object)victimHurtBox.healthComponent)) { SetStateOnHurt.SetStunOnObject(((Component)victimHurtBox.healthComponent).gameObject, delay); OrbManager.instance.AddOrb((Orb)new SimpleLightningStrikeOrb { attacker = attackerObject, target = victimHurtBox, damageColorIndex = (DamageColorIndex)0, damageValue = damageValue, isCrit = isCrit, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient }); } } [NetworkMessageHandler(msgType = 21206, client = false, server = true)] private static void HandleReportMercFocusedAssaultHitReplaceMeLater(NetworkMessage netMsg) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) GameObject attackerObject = netMsg.reader.ReadGameObject(); HurtBoxReference val = NetworkExtensions.ReadHurtBoxReference(netMsg.reader); HurtBox victimHurtBox = ((HurtBoxReference)(ref val)).ResolveHurtBox(); float damageValue = netMsg.reader.ReadSingle(); float procCoefficient = netMsg.reader.ReadSingle(); bool isCrit = netMsg.reader.ReadBoolean(); float num = netMsg.reader.ReadSingle(); EffectDef effectDef = EffectCatalog.GetEffectDef(NetworkExtensions.ReadEffectIndex(netMsg.reader)); GameObject orbEffectPrefab = ((effectDef != null) ? effectDef.prefab : null) ?? null; EffectDef effectDef2 = EffectCatalog.GetEffectDef(NetworkExtensions.ReadEffectIndex(netMsg.reader)); GameObject orbImpactEffectPrefab = ((effectDef2 != null) ? effectDef2.prefab : null) ?? null; HandleHit(attackerObject, victimHurtBox, damageValue, procCoefficient, isCrit, num, orbEffectPrefab, orbImpactEffectPrefab); } } internal class CastHeatColumn : BaseSkillState { public static float baseDuration = 0.3f; private float baseSpeed = 15f; public static GameObject aoeEffect = Addressables.LoadAssetAsync((object)RoR2_Base_Mage.OmniImpactVFXLightningMage_prefab).WaitForCompletion(); public static GameObject muzzleflashEffect = Addressables.LoadAssetAsync((object)RoR2_Junk_Mage.MuzzleflashMageFireLarge_prefab).WaitForCompletion(); public static float damagePerMeatball = 1.8f; public static int meatballCount = 3; public static float meatballAngleMin = 1f; public static float meatballAngleMax = 7f; public static float meatballForce = 250f; private float stopwatch; private float radius; private float duration; private GameObject cachedCrosshairPrefab; private GameObject areaIndicatorInstance; public static GameObject projectilePrefab => _1HeatColumnSkill.HeatWardPrefab; public static GameObject areaIndicatorPrefab => _1HeatColumnSkill.HeatWardAreaIndicator; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = CastThunderOld.baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(duration + 2f); cachedCrosshairPrefab = ((EntityState)this).characterBody._defaultCrosshairPrefab; ((EntityState)this).PlayAnimation("Gesture, Additive", "PrepWall", "PrepWall.playbackRate", duration, 0f); areaIndicatorInstance = Object.Instantiate(areaIndicatorPrefab); UpdateAreaIndicator(); if (VRStuff.VRInstalled) { VRStuff.AnimateVRHand(dominant: false, "Charge"); } ((BaseState)this).OnEnter(); } private void UpdateAreaIndicator() { //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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) areaIndicatorInstance.SetActive(true); if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { float num = 1000f; float num2 = 0f; Ray val = ((!VRStuff.VRInstalled) ? ((BaseState)this).GetAimRay() : VRStuff.GetVRHandAimRay(dominant: false)); RaycastHit val2 = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, CameraRigController.ModifyAimRayIfApplicable(val, ((EntityState)this).gameObject, ref num2), ref val2, num + num2, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.enemyBody)).mask)), (QueryTriggerInteraction)0)) { areaIndicatorInstance.transform.position = ((RaycastHit)(ref val2)).point; areaIndicatorInstance.transform.up = Vector3.one; } } radius = _1HeatColumnSkill.heatWardRadius; areaIndicatorInstance.transform.localScale = new Vector3(radius, areaIndicatorInstance.transform.localScale.y, radius); areaIndicatorInstance.transform.rotation = Quaternion.identity; areaIndicatorInstance.SetActive(true); } public override void Update() { ((EntityState)this).Update(); UpdateAreaIndicator(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= duration && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)muzzleflashEffect)) { EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleLeft", false); EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleRight", false); } if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { ((EntityState)this).PlayAnimation("Gesture, Additive", "FireWall"); if (!((EntityState)this).outer.destroying && ((EntityState)this).isAuthority) { GameObject gameObject = ((Component)((EntityState)this).outer).gameObject; if (AltArtiPassive.instanceLookup.TryGetValue(gameObject, out var value)) { value.SkillCast(null, isFire: true); } EffectManager.SpawnEffect(aoeEffect, new EffectData { origin = areaIndicatorInstance.transform.position }, true); Vector3 up = areaIndicatorInstance.transform.up; SummonHeatColumn(areaIndicatorInstance.transform.position, meatballCount, meatballForce); } EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); } ((EntityState)this).characterBody._defaultCrosshairPrefab = cachedCrosshairPrefab; if (VRStuff.VRInstalled) { VRStuff.AnimateVRHand(dominant: false, "Cast"); } ((EntityState)this).OnExit(); } private void SummonHeatColumn(Vector3 impactPosition, int meatballCount, float meatballForce) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) ProjectileManager.instance.FireProjectile(new FireProjectileInfo { projectilePrefab = projectilePrefab, position = impactPosition, rotation = Quaternion.identity, owner = ((Component)((EntityState)this).outer).gameObject, damage = ((EntityState)this).characterBody.damage, force = meatballForce, crit = false, damageColorIndex = (DamageColorIndex)0 }); } 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; } } public class CastThunderOld : BaseSkillState { public static float baseDuration = 0.3f; private float baseSpeed = 15f; public static GameObject areaIndicatorPrefab = ChargeMeteor.areaIndicatorPrefab; public static GameObject aoeEffect = LegacyResourcesAPI.Load("prefabs/effects/omnieffect/OmniImpactVFXLightningMage"); public static GameObject muzzleflashEffect = ChargeMeteor.muzzleflashEffect; public static float minMeteorRadius = _2ThunderSkill.thunderBlastRadius; public static float damagePerMeatball = 1.8f; public static int meatballCount = 3; public static float meatballAngleMin = 1f; public static float meatballAngleMax = 7f; public static float meatballForce = 250f; public static GameObject meatballProjectile = _2ThunderSkill.projectilePrefabThunder; private float stopwatch; private float radius; private float duration; private GameObject cachedCrosshairPrefab; private GameObject areaIndicatorInstance; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(duration + 2f); cachedCrosshairPrefab = ((EntityState)this).characterBody._defaultCrosshairPrefab; ((EntityState)this).PlayAnimation("Gesture, Additive", "PrepWall", "PrepWall.playbackRate", duration, 0f); areaIndicatorInstance = Object.Instantiate(ChargeMeteor.areaIndicatorPrefab); UpdateAreaIndicator(); if (VRStuff.VRInstalled) { VRStuff.AnimateVRHand(dominant: false, "Charge"); } ((BaseState)this).OnEnter(); } private void UpdateAreaIndicator() { //IL_00c3: 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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) areaIndicatorInstance.SetActive(true); if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { float num = 1000f; float num2 = 0f; Ray val = ((!VRStuff.VRInstalled) ? ((BaseState)this).GetAimRay() : VRStuff.GetVRHandAimRay(dominant: false)); RaycastHit val2 = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, CameraRigController.ModifyAimRayIfApplicable(val, ((EntityState)this).gameObject, ref num2), ref val2, num + num2, CommonMasks.bullet, (QueryTriggerInteraction)0)) { areaIndicatorInstance.transform.position = ((RaycastHit)(ref val2)).point; areaIndicatorInstance.transform.up = Vector3.one; } } radius = minMeteorRadius; areaIndicatorInstance.transform.localScale = new Vector3(radius, radius, radius); areaIndicatorInstance.SetActive(true); } public override void Update() { ((EntityState)this).Update(); UpdateAreaIndicator(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= duration && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00b7: 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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { ((EntityState)this).PlayAnimation("Gesture, Additive", "FireWall"); EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "Muzzle", false); if (!((EntityState)this).outer.destroying && ((EntityState)this).isAuthority) { GameObject gameObject = ((Component)((EntityState)this).outer).gameObject; if (AltArtiPassive.instanceLookup.TryGetValue(gameObject, out var value)) { value.SkillCast(); } EffectManager.SpawnEffect(aoeEffect, new EffectData { origin = areaIndicatorInstance.transform.position }, true); Vector3 up = areaIndicatorInstance.transform.up; FireMeatballs(up, areaIndicatorInstance.transform.position + Vector3.up * 0.2f, meatballCount, meatballForce); } EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); } ((EntityState)this).characterBody._defaultCrosshairPrefab = cachedCrosshairPrefab; if (VRStuff.VRInstalled) { VRStuff.AnimateVRHand(dominant: false, "Cast"); } ((EntityState)this).OnExit(); } private async void FireMeatballs(Vector3 impactNormal, Vector3 impactPosition, int meatballCount, float meatballForce) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: 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_0021: Unknown result type (might be due to invalid IL or missing references) int delay = 100; float rotationInverval = 360f / (float)meatballCount; float rotationExtra = Random.Range(0, 360); Vector3 val = Vector3.ProjectOnPlane(Vector3.up, impactNormal); Vector3 normalized = ((Vector3)(ref val)).normalized; for (int i = 0; i < meatballCount; i++) { float speedOverride = baseSpeed + (_2ThunderSkill.desiredForwardSpeedMax - baseSpeed) * (float)(i + 1) / (float)meatballCount; float angle = Random.Range(meatballAngleMin, meatballAngleMax); Vector3 point = Vector3.RotateTowards(Vector3.up, normalized, angle * (MathF.PI / 180f), float.PositiveInfinity); Vector3 forward2 = Quaternion.AngleAxis(rotationExtra + rotationInverval * (float)i, Vector3.up) * point; ProjectileManager instance = ProjectileManager.instance; FireProjectileInfo val2 = new FireProjectileInfo { projectilePrefab = meatballProjectile, position = impactPosition, rotation = Util.QuaternionSafeLookRotation(forward2), owner = ((EntityState)this).gameObject, damage = ((EntityState)this).characterBody.damage * damagePerMeatball, force = meatballForce, crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), damageColorIndex = (DamageColorIndex)0, target = null }; ((FireProjectileInfo)(ref val2)).speedOverride = speedOverride; instance.FireProjectile(val2); await Task.Delay(delay); } } 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; } } public class CastThunder : BaseSkillState { public static float baseDuration = 0.3f; private float baseSpeed = 15f; public static GameObject areaIndicatorPrefab = ChargeMeteor.areaIndicatorPrefab; public static GameObject aoeEffect = LegacyResourcesAPI.Load("prefabs/effects/omnieffect/OmniImpactVFXLightningMage"); public static GameObject muzzleflashEffect = Addressables.LoadAssetAsync((object)RoR2_Base_Mage.MuzzleflashMageLightningLarge_prefab).WaitForCompletion(); public static float minMeteorRadius = _2ThunderSkill.thunderBlastRadius; public static float damagePerMeatball = 3f; public static int meatballCount = 3; public static float meatballForce = 250f; public static GameObject meatballProjectile = _2ThunderSkill.projectilePrefabThunder; private float stopwatch; private float duration; private GameObject cachedCrosshairPrefab; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(duration + 2f); cachedCrosshairPrefab = ((EntityState)this).characterBody._defaultCrosshairPrefab; ((EntityState)this).PlayAnimation("Gesture, Additive", "PrepWall", "PrepWall.playbackRate", duration, 0f); if (VRStuff.VRInstalled) { VRStuff.AnimateVRHand(dominant: false, "Charge"); } ((BaseState)this).OnEnter(); } public override void Update() { ((EntityState)this).Update(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= duration && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0139: 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_0153: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).PlayAnimation("Gesture, Additive", "FireWall"); if (Object.op_Implicit((Object)(object)muzzleflashEffect)) { EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleLeft", false); EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleRight", false); } if (!((EntityState)this).outer.destroying && ((EntityState)this).isAuthority) { GameObject gameObject = ((Component)((EntityState)this).outer).gameObject; if (AltArtiPassive.instanceLookup.TryGetValue(gameObject, out var value)) { value.SkillCast(); } Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager.instance.FireProjectile(new FireProjectileInfo { projectilePrefab = _2ThunderSkill.magnetRollerProjectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((EntityState)this).gameObject, damage = ((EntityState)this).characterBody.damage * damagePerMeatball, force = meatballForce, crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), damageColorIndex = (DamageColorIndex)0, damageTypeOverride = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)8192, (DamageSource)4) }); } ((EntityState)this).characterBody._defaultCrosshairPrefab = cachedCrosshairPrefab; if (VRStuff.VRInstalled) { VRStuff.AnimateVRHand(dominant: false, "Cast"); } ((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)3; } } public class Clapfreeze : BaseSkillState { public static GameObject areaIndicatorPrefab = PrepWall.areaIndicatorPrefab; public static GameObject projectilePrefab; public static GameObject muzzleflashEffect; public static GameObject goodCrosshairPrefab; public static GameObject badCrosshairPrefab; private GameObject areaIndicatorInstance; private GameObject cachedCrosshairPrefab; public static float damageCoefficient; public static float baseDuration = PrepWall.baseDuration; private float duration; public static float maxDistance; public static float maxSlopeAngle; private bool goodPlacement; public static string prepWallSoundString = "Play_mage_shift_start"; public static string fireSoundString = "Play_mage_shift_stop"; private float stopwatch; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(duration + 2f); cachedCrosshairPrefab = ((EntityState)this).characterBody._defaultCrosshairPrefab; ((EntityState)this).PlayAnimation("Gesture, Additive", "PrepWall", "PrepWall.playbackRate", duration, 0f); Util.PlaySound(prepWallSoundString, ((EntityState)this).gameObject); areaIndicatorInstance = Object.Instantiate(PrepWall.areaIndicatorPrefab); UpdateAreaIndicator(); if (VRStuff.VRInstalled) { VRStuff.AnimateVRHand(dominant: false, "Charge"); } } private void UpdateAreaIndicator() { //IL_0044: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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) goodPlacement = false; areaIndicatorInstance.SetActive(true); if (Object.op_Implicit((Object)(object)areaIndicatorInstance)) { float num = PrepWall.maxDistance; float num2 = 0f; Ray val = ((!VRStuff.VRInstalled) ? ((BaseState)this).GetAimRay() : VRStuff.GetVRHandAimRay(dominant: false)); RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(CameraRigController.ModifyAimRayIfApplicable(val, ((EntityState)this).gameObject, ref num2), ref val2, num + num2, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { areaIndicatorInstance.transform.position = ((RaycastHit)(ref val2)).point; areaIndicatorInstance.transform.up = ((RaycastHit)(ref val2)).normal; areaIndicatorInstance.transform.right = -((Ray)(ref val)).direction; goodPlacement = Vector3.Angle(Vector3.up, ((RaycastHit)(ref val2)).normal) < PrepWall.maxSlopeAngle; } ((EntityState)this).characterBody._defaultCrosshairPrefab = (goodPlacement ? PrepWall.goodCrosshairPrefab : PrepWall.badCrosshairPrefab); } areaIndicatorInstance.SetActive(goodPlacement); } public override void Update() { ((EntityState)this).Update(); UpdateAreaIndicator(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= duration && !((EntityState)this).inputBank.skill3.down && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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_015d: 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_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: 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_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).outer.destroying) { if (goodPlacement) { ((EntityState)this).PlayAnimation("Gesture, Additive", "FireWall"); Util.PlaySound(PrepWall.fireSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)areaIndicatorInstance) && ((EntityState)this).isAuthority) { EffectManager.SimpleMuzzleFlash(PrepWall.muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleLeft", true); EffectManager.SimpleMuzzleFlash(PrepWall.muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleRight", true); Vector3 forward = areaIndicatorInstance.transform.forward; forward.y = 0f; ((Vector3)(ref forward)).Normalize(); Vector3 val = Vector3.Cross(Vector3.up, forward); bool crit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master); ProjectileManager.instance.FireProjectile(new FireProjectileInfo { projectilePrefab = PrepWall.projectilePrefab, position = areaIndicatorInstance.transform.position + Vector3.up, rotation = Util.QuaternionSafeLookRotation(val), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * PrepWall.damageCoefficient, force = 0f, crit = crit, damageColorIndex = (DamageColorIndex)0, target = null }); ProjectileManager.instance.FireProjectile(new FireProjectileInfo { projectilePrefab = PrepWall.projectilePrefab, position = areaIndicatorInstance.transform.position + Vector3.up, rotation = Util.QuaternionSafeLookRotation(-val), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * PrepWall.damageCoefficient, force = 0f, crit = crit, damageColorIndex = (DamageColorIndex)0, target = null }); } } else { ((EntityState)this).skillLocator.utility.AddOneStock(); ((EntityState)this).PlayCrossfade("Gesture, Additive", "BufferEmpty", 0.2f); } } EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject); ((EntityState)this).characterBody._defaultCrosshairPrefab = cachedCrosshairPrefab; ((EntityState)this).OnExit(); if (VRStuff.VRInstalled) { VRStuff.AnimateVRHand(dominant: false, "Cast"); } } 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; } } public class FrostSurgeState : GenericCharacterMain { private bool crit = false; private Vector3 flyVector = Vector3.zero; private bool flyingUp = false; private Transform modelTransform; private Vector3 blastPosition; public float duration = 0.8f; private GameObject iceExplosionEffectPrefab = LegacyResourcesAPI.Load("prefabs/effects/impacteffects/MageIceExplosion"); public GameObject wallPrefab = LegacyResourcesAPI.Load("prefabs/projectiles/MageIcewallPillarProjectile"); public GameObject bigWallPrefab = LegacyResourcesAPI.Load("prefabs/projectiles/MageIcewallPillarProjectile"); private static GameObject muzzleflashEffect => PolarVortexBase.muzzleflashEffect; public static float blastDamageCoefficient => _3IceSurgeSkill.blastDamageCoefficient; public static float wallDamageCoefficient => _3IceSurgeSkill.wallDamageCoefficient; public override void OnEnter() { //IL_0091: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_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_01f3: 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_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnEnter(); GameObject gameObject = ((Component)((EntityState)this).outer).gameObject; if (AltArtiPassive.instanceLookup.TryGetValue(gameObject, out var value)) { value.SkillCast(); } flyingUp = ((Vector3)(ref ((EntityState)this).inputBank.moveVector)).sqrMagnitude < 0.1f || ((EntityState)this).inputBank.jump.down; if (flyingUp) { flyVector = Vector3.up; duration = _3IceSurgeSkill.baseDurationVertical; } else { flyVector = Vector3.Normalize(((Vector3)(ref ((EntityState)this).inputBank.moveVector)).normalized + Vector3.up / 2f) * 0.8f; duration = _3IceSurgeSkill.baseDurationHorizontal; } crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); Util.PlaySound(FlyUpState.beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); ((EntityState)this).PlayCrossfade("Body", "FlyUp", "FlyUp.playbackRate", FlyUpState.duration, 0.1f); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = Vector3.zero; EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleLeft", false); EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleRight", false); if (((EntityState)this).isAuthority) { blastPosition = ((EntityState)this).characterBody.corePosition; } if (NetworkServer.active) { float num = ((EntityState)this).characterBody.damage * 3.5f; FrostUtilsModule.CreateIceBlast(((EntityState)this).characterBody, FlyUpState.blastAttackForce, num, FlyUpState.blastAttackProcCoefficient, FlyUpState.blastAttackRadius * 1.3f, crit, blastPosition, true, (DamageSource)8); FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = bigWallPrefab, position = ((EntityState)this).transform.position, rotation = Util.QuaternionSafeLookRotation(flyVector), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * wallDamageCoefficient, force = 0f, crit = crit }; ProjectileManager.instance.FireProjectile(val); if (((BaseState)this).isGrounded) { InstantiateCircle(); } } void InstantiateCircle() { //IL_001e: 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_002a: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) float num2 = 2f; int num3 = 6; float num4 = 360f / (float)num3; for (int i = 0; i < num3; i++) { Quaternion val2 = Quaternion.AngleAxis((float)i * num4, Vector3.up); Vector3 val3 = val2 * (Vector3.forward * 0.3f); Vector3 val4 = ((EntityState)this).transform.position + val3 * num2; FireProjectileInfo val5 = new FireProjectileInfo { projectilePrefab = wallPrefab, position = val4 + Vector3.down * 3f, rotation = Util.QuaternionSafeLookRotation(Vector3.Normalize(val3 + Vector3.up)), owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * wallDamageCoefficient, force = 0f, crit = crit }; ProjectileManager.instance.FireProjectile(val5); } } } public override void OnExit() { if (!((EntityState)this).outer.destroying) { Util.PlaySound(FlyUpState.endSoundString, ((EntityState)this).gameObject); } ((GenericCharacterMain)this).OnExit(); if (((EntityState)this).isAuthority && ArtificerExtendedPlugin.isJethackLoaded) { SetHoverStateCache(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void SetHoverStateCache() { JetHackPlugin.hoverStateCache = true; } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void CreateBlinkEffect(Vector3 origin) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(flyVector); val.origin = origin; EffectManager.SpawnEffect(FlyUpState.blinkPrefab, val, false); } public override void OnSerialize(NetworkWriter writer) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); writer.Write(blastPosition); } public override void OnDeserialize(NetworkReader reader) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnDeserialize(reader); blastPosition = reader.ReadVector3(); } public override void HandleMovements() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) ((GenericCharacterMain)this).HandleMovements(); Vector3 val = flyVector * (FlyUpState.speedCoefficientCurve.Evaluate(((EntityState)this).fixedAge / duration) * Time.fixedDeltaTime); val = (flyingUp ? (val * ((EntityState)this).characterBody.baseMoveSpeed) : (val * ((BaseState)this).moveSpeedStat)); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += val; ((EntityState)this).characterMotor.velocity.y = 0f; } public override void UpdateAnimationParameters() { ((BaseCharacterMain)this).UpdateAnimationParameters(); } } internal class SurgeExtendedDash : BaseCharacterMain { public static float baseSurgeSkillCastInterval = 0.7f; public static float grazeDamageCoefficient = 3f; public static float grazeProcCoefficient = 0.5f; public static float grazeUpForceMagnitude = ToolbotDash.upwardForceMagnitude; public static float grazeAwayForceMagnitude = ToolbotDash.awayForceMagnitude; public static float grazeHitPauseDuration = ToolbotDash.hitPauseDuration; public static float zapRange = 13f; public static int zapFireCount = 3; public static float baseZapAttackInterval = 0.25f; public static float baseZapClearInterval = 1f; public static float impactDamageCoefficient = 12f; public static float impactProcCoefficient = 1f; public static float impactRadius = 21f; public static float impactBlastForce = 1250f; public static float impactKnockbackForce = 750f; public static float impactRecoilAmplitude = ToolbotDash.recoilAmplitude; public static float aftershockDamageCoefficient = 3f; public static float aftershockProcCoefficient = 1f; public static float aftershockRadius = 18f; public static float aftershockFrequency = 2f; public static float aftershockTotalWaves = 3f; public static float massThresholdForImpact = 250f; public static float baseWindupDuration = 0.6f; public static float antiGravityDuration = 2f; public static float flightDuration = 3.5f; public static float minFlightDuration = 0.15f; public static float startingSurgeSpeed = 5f; public static float endingSurgeSpeed = 2f; public static float baseSurgeDrag = 0.6f; public static float surgeJumpFactor = 0.3f; public static float gravityStrengthOverTime = 11f; private GameObject surgeTrailEffectInstanceL; private GameObject surgeTrailEffectInstanceR; private CharacterModel model; private Rotator rotator; private Vector3 idealDirection; private float windupDuration; private bool hasStartedFlight; private bool isInFlight; private bool isAntiGravity; private bool detonateNextFrame; private bool isCrit; public AltArtiPassive.BatchHandle handle; private float skillCastInterval; private float skillCastTimer; private List victimsStruck = new List(); private OverlapAttack attack; private bool inHitPause; private float hitPauseTimer; private BullseyeSearch search = new BullseyeSearch(); private List previousTargets = new List(); private float zapAttackInterval; private float zapAttackTimer; private float zapClearInterval; private float zapClearTimer; public override void OnEnter() { //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).OnEnter(); windupDuration = Mathf.Max(baseWindupDuration / ((BaseState)this).attackSpeedStat, 0f); skillCastInterval = baseSurgeSkillCastInterval / ((BaseState)this).attackSpeedStat; zapAttackInterval = baseZapAttackInterval / ((BaseState)this).attackSpeedStat; zapClearInterval = baseZapClearInterval / ((BaseState)this).attackSpeedStat; skillCastTimer = 0f; handle = new AltArtiPassive.BatchHandle(); ((EntityState)this).characterBody.SetAimTimer(windupDuration + flightDuration + 5f); BeginCharging(); HitBoxGroup hitBoxGroup = null; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { model = ((Component)modelTransform).GetComponent(); hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents(), (HitBoxGroup element) => element.groupName == "IonCharge"); Transform obj = modelTransform.Find("MageArmature"); GameObject val = ((obj != null) ? ((Component)obj).gameObject : null); if (Object.op_Implicit((Object)(object)val)) { rotator = val.GetComponent(); if ((Object)(object)rotator == (Object)null) { rotator = val.AddComponent(); } } } attack = new OverlapAttack(); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = grazeDamageCoefficient * ((BaseState)this).damageStat; attack.procCoefficient = grazeProcCoefficient; attack.hitEffectPrefab = ToolbotDash.impactEffectPrefab; attack.forceVector = Vector3.up * grazeUpForceMagnitude; attack.pushAwayForce = grazeAwayForceMagnitude; attack.hitBoxGroup = hitBoxGroup; attack.damageType = DamageTypeCombo.op_Implicit((DamageType)32); attack.damageType.damageSource = (DamageSource)8; isCrit = ((BaseState)this).RollCrit(); attack.isCrit = isCrit; } private void OnSurgeImpactAuthority(ref MovementHitInfo movementHitInfo) { detonateNextFrame = true; } public override void FixedUpdate() { //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0157: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).FixedUpdate(); if (ArtificerExtendedPlugin.BodyHasAncientScepterItem(((EntityState)this).characterBody)) { ((EntityState)this).fixedAge = ((EntityState)this).fixedAge - Time.fixedDeltaTime * 0.3f; } if (!isInFlight && ((EntityState)this).fixedAge >= windupDuration && ((EntityState)this).fixedAge < windupDuration + flightDuration) { BeginFlight(); } if (hasStartedFlight) { if (((EntityState)this).isAuthority && (detonateNextFrame || (((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.FoundAnyGround && !((BaseCharacterController)((EntityState)this).characterMotor).Motor.LastGroundingStatus.FoundAnyGround))) { Debug.Log((object)"Ground detonation"); OnSurgeImpact(); return; } if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.isSprinting = true; } if (!inHitPause) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.moveVector = Vector3.zero; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += GetIdealVelocity() * ((EntityState)this).GetDeltaTime(); } } ProcessHits(); } else { ((EntityState)this).characterMotor.velocity = Vector3.zero; hitPauseTimer -= ((EntityState)this).GetDeltaTime(); if (hitPauseTimer < 0f) { inHitPause = false; } } } if (isInFlight) { ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; if (((EntityState)this).fixedAge >= windupDuration + flightDuration) { EndFlight(); return; } skillCastTimer -= ((EntityState)this).GetDeltaTime(); if (skillCastTimer <= 0f) { AddSkillCast(); } UpdateDirection(); } } if (isAntiGravity && ((EntityState)this).fixedAge >= antiGravityDuration + windupDuration) { if (windupDuration > 0f && ((EntityState)this).characterBody.HasBuff(Buffs.ArmorBoost) && NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.ArmorBoost); } SetAntiGravity(notGravity: false); } } private void ProcessHits() { //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ce: 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_01e8: Unknown result type (might be due to invalid IL or missing references) attack.damage = ((BaseState)this).damageStat * (ToolbotDash.chargeDamageCoefficient * GetDamageBoostFromSpeed()); if (attack.Fire(victimsStruck)) { Util.PlaySound(ToolbotDash.impactSoundString, ((EntityState)this).gameObject); inHitPause = true; hitPauseTimer = grazeHitPauseDuration; for (int i = 0; i < victimsStruck.Count; i++) { float num = 0f; HurtBox val = victimsStruck[i]; HealthComponent healthComponent = val.healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent)) { continue; } previousTargets.Add(healthComponent); CharacterMotor component = ((Component)healthComponent).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { num = component.mass; } else { Rigidbody component2 = ((Component)healthComponent).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { num = component2.mass; } } if (num >= massThresholdForImpact) { OnSurgeImpact(); break; } } } else { if (!isInFlight) { return; } zapClearTimer -= ((EntityState)this).GetDeltaTime(); if (zapClearTimer <= 0f) { ClearList(); zapClearTimer = zapClearInterval; } zapAttackTimer -= ((EntityState)this).GetDeltaTime(); if (!(zapAttackTimer <= 0f)) { return; } zapAttackTimer += zapAttackInterval; Vector3 position = ((EntityState)this).transform.position; Vector3 forward = ((EntityState)this).transform.forward; for (int j = 0; j < zapFireCount; j++) { HurtBox val2 = FindNextTarget(position, forward); if (Object.op_Implicit((Object)(object)val2)) { OnZapTargetFound(position, val2); continue; } break; } } } public virtual void OnZapTargetFound(Vector3 position, HurtBox hurtBox) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) previousTargets.Add(hurtBox.healthComponent); LightningOrb val = new LightningOrb(); val.bouncedObjects = new List(); val.attacker = ((EntityState)this).gameObject; val.inflictor = ((EntityState)this).gameObject; val.teamIndex = attack.teamIndex; val.damageValue = attack.damage; val.isCrit = isCrit; ((Orb)val).origin = position; val.bouncesRemaining = 1; val.lightningType = (LightningType)8; val.procCoefficient = grazeProcCoefficient; ((Orb)val).target = hurtBox; val.damageColorIndex = (DamageColorIndex)0; val.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)8192, (DamageSource)8); OrbManager.instance.AddOrb((Orb)(object)val); } public HurtBox FindNextTarget(Vector3 position, Vector3 forward) { //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_0013: 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) search.searchOrigin = position; search.searchDirection = forward; search.sortMode = (SortMode)1; search.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref search.teamMaskFilter)).RemoveTeam(((BaseState)this).GetTeam()); search.filterByLoS = false; search.minAngleFilter = 0f; search.maxAngleFilter = 180f; search.maxDistanceFilter = zapRange; search.RefreshCandidates(); return search.GetResults().FirstOrDefault((Func)((HurtBox hurtBox) => !previousTargets.Contains(hurtBox.healthComponent))); } private void ClearList() { previousTargets.Clear(); } public override void OnExit() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown ((BaseCharacterMain)this).OnExit(); rotator.ResetRotation(0.2f); handle.Fire(0.5f, 1f); SetAntiGravity(notGravity: false); EndFlight(); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.IgnoreFallDamage.buffIndex); } if (((EntityState)this).characterBody.HasBuff(Buffs.ArmorBoost) && NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.ArmorBoost); } if (((EntityState)this).isAuthority) { ((EntityState)this).characterMotor.onMovementHit -= new MovementHitDelegate(OnSurgeImpactAuthority); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)5; } private Vector3 GetIdealVelocity(bool useGravity = true) { //IL_0037: 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_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_0010: 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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_00ce: Unknown result type (might be due to invalid IL or missing references) if (!isInFlight) { return idealDirection * ((EntityState)this).characterBody.moveSpeed * endingSurgeSpeed; } Vector3 val = idealDirection * ((EntityState)this).characterBody.moveSpeed * Util.Remap(1f - (((EntityState)this).fixedAge - windupDuration) / flightDuration, 0f, 1f, endingSurgeSpeed, startingSurgeSpeed); if (!useGravity) { return val; } float num = ((EntityState)this).fixedAge - (windupDuration + antiGravityDuration); float num2 = Mathf.Max(0f, num) * gravityStrengthOverTime; return val + num2 * Vector3.down; } private float GetDamageBoostFromSpeed() { if (ArtificerExtendedPlugin.BodyHasAncientScepterItem(((EntityState)this).characterBody)) { return 2f; } return 1f; } public void OnSurgeImpact() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) if (!(((EntityState)this).fixedAge <= minFlightDuration)) { EndFlight(); ((EntityState)this).outer.SetNextState((EntityState)(object)new SurgeExtendedImpact { idealDirection = idealDirection, damageBoostFromSpeed = GetDamageBoostFromSpeed(), isCrit = isCrit }); } } private void UpdateDirection() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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_0064: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { Vector3 aimDirection = ((EntityState)this).inputBank.aimDirection; if (aimDirection != Vector3.zero) { ((Vector3)(ref aimDirection)).Normalize(); idealDirection = Vector3.Lerp(idealDirection, aimDirection, 1f / baseSurgeDrag * ((EntityState)this).GetDeltaTime()); } } if (isInFlight) { _ = idealDirection; if (true) { rotator.SetRotation(Quaternion.LookRotation(idealDirection, Vector3.up), ((EntityState)this).GetDeltaTime()); return; } } rotator.SetRotation(Quaternion.LookRotation(((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized, Vector3.up), ((EntityState)this).GetDeltaTime()); } public void BeginCharging() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterMotor.useGravity = false; SetAntiGravity(notGravity: true); if (windupDuration <= 0f) { BeginFlight(); return; } ((EntityState)this).characterBody.AddBuff(Buffs.ArmorBoost); ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterBody.previousPosition = ((EntityState)this).characterBody.transform.position; ((EntityState)this).characterBody.notMovingStopwatch = 1f; ((EntityState)this).PlayAnimation("Gesture, Additive", PrepWall.PrepWallStateHash, PrepWall.PrepWallParamHash, windupDuration); } private void SetAntiGravity(bool notGravity) { //IL_000e: 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_001d: Unknown result type (might be due to invalid IL or missing references) if (notGravity) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.5f; } isAntiGravity = notGravity; } public void BeginFlight() { //IL_0194: 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_017b: Expected O, but got Unknown //IL_0113: 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_0131: 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_0140: 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) if (hasStartedFlight) { return; } ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; hasStartedFlight = true; isInFlight = true; Util.PlaySound(FlyUpState.beginSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture, Additive", "FireWall"); ((EntityState)this).PlayCrossfade("Body", "FlyUp", "FlyUp.playbackRate", flightDuration, 0.1f); Transform val = ((BaseState)this).FindModelChild("MuzzleLeft"); if (Object.op_Implicit((Object)(object)val)) { surgeTrailEffectInstanceL = Object.Instantiate(ArtificerExtendedPlugin.muzzleflashIonSurgeTrail, val); } Transform val2 = ((BaseState)this).FindModelChild("MuzzleRight"); if (Object.op_Implicit((Object)(object)val2)) { surgeTrailEffectInstanceR = Object.Instantiate(ArtificerExtendedPlugin.muzzleflashIonSurgeTrail, val2); } ((EntityState)this).characterBody.AddBuff(ArtificerExtendedPlugin.ionSurgePower); if (Object.op_Implicit((Object)(object)model)) { model.forceUpdate = true; } if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { idealDirection = ((EntityState)this).inputBank.aimDirection; if (((EntityState)this).characterMotor.isGrounded) { idealDirection += Vector3.up * surgeJumpFactor; ((Vector3)(ref idealDirection)).Normalize(); } } UpdateDirection(); ((EntityState)this).characterMotor.onMovementHit += new MovementHitDelegate(OnSurgeImpactAuthority); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.IgnoreFallDamage.buffIndex); } AddSkillCast(); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(minFlightDuration); } private void AddSkillCast() { skillCastTimer += skillCastInterval; if (AltArtiPassive.instanceLookup.TryGetValue(((Component)((EntityState)this).outer).gameObject, out var value)) { value.SkillCast(handle); } } public void EndFlight() { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).characterBody.HasBuff(ArtificerExtendedPlugin.ionSurgePower) && NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(ArtificerExtendedPlugin.ionSurgePower); } if (Object.op_Implicit((Object)(object)model)) { model.forceUpdate = true; } if (Object.op_Implicit((Object)(object)surgeTrailEffectInstanceL)) { EntityState.Destroy((Object)(object)surgeTrailEffectInstanceL); } if (Object.op_Implicit((Object)(object)surgeTrailEffectInstanceR)) { EntityState.Destroy((Object)(object)surgeTrailEffectInstanceR); } if (isInFlight && !detonateNextFrame) { ((EntityState)this).healthComponent.TakeDamageForce(GetIdealVelocity(useGravity: false), true, false); } isInFlight = false; ((EntityState)this).characterMotor.useGravity = true; } } internal class SurgeExtendedImpact : BaseCharacterMain { public static float baseDuration = 0.1f; private float duration; public Vector3 idealDirection; public float damageBoostFromSpeed; public bool isCrit; 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_0037: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown //IL_00c8: 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_00df: 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) ((BaseCharacterMain)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; if (NetworkServer.active) { BlastAttack val = new BlastAttack { radius = SurgeExtendedDash.impactRadius, attacker = ((EntityState)this).gameObject, baseDamage = ((BaseState)this).damageStat * SurgeExtendedDash.impactDamageCoefficient * damageBoostFromSpeed, crit = isCrit, procCoefficient = 1f, damageColorIndex = (DamageColorIndex)0, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)8192, (DamageSource)8), position = ((EntityState)this).characterBody.corePosition, falloffModel = (FalloffModel)0, baseForce = SurgeExtendedDash.impactBlastForce, teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject) }; val.Fire(); ((EntityState)this).healthComponent.TakeDamageForce(Vector3.down * (0f - SurgeExtendedDash.impactKnockbackForce), true, false); } if (((EntityState)this).isAuthority) { ((BaseState)this).AddRecoil(-0.5f * SurgeExtendedDash.impactRecoilAmplitude * 3f, -0.5f * SurgeExtendedDash.impactRecoilAmplitude * 3f, -0.5f * SurgeExtendedDash.impactRecoilAmplitude * 8f, 0.5f * SurgeExtendedDash.impactRecoilAmplitude * 3f); CreateBlinkEffect(((EntityState)this).characterBody.corePosition); } } public override void FixedUpdate() { ((BaseCharacterMain)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((BaseCharacterMain)this).OnExit(); if (((EntityState)this).isAuthority && ArtificerExtendedPlugin.isJethackLoaded) { SetHoverStateCache(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void SetHoverStateCache() { JetHackPlugin.hoverStateCache = true; } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)7; } private void CreateBlinkEffect(Vector3 origin) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(idealDirection); val.origin = origin; EffectManager.SpawnEffect(FlyUpState.blinkPrefab, val, false); } public override void OnSerialize(NetworkWriter writer) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); writer.Write(idealDirection); writer.Write(damageBoostFromSpeed); writer.Write(isCrit); } public override void OnDeserialize(NetworkReader reader) { //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) ((EntityState)this).OnDeserialize(reader); GameObject val = reader.ReadGameObject(); idealDirection = reader.ReadVector3(); damageBoostFromSpeed = reader.ReadSingle(); isCrit = reader.ReadBoolean(); } } internal class PolarVortex : PolarVortexBase { private SeekerController orbitProjectileManager; public static float endingSpeedMultiplier = 10f; private bool keyReleased; private float armorAddStopwatch; private float stopwatch; private int maxIcicles = _1FrostbiteSkill.icicleCount; private float baseBuffInterval = _1FrostbiteSkill.buffInterval; private float buffInterval; private int currentIcicles = 0; private bool hasFiredIcicles => currentIcicles >= maxIcicles; public override void OnEnter() { base.OnEnter(); if ((Object)(object)base.activatorSkillSlot == (Object)null) { base.activatorSkillSlot = ((EntityState)this).skillLocator.special; } int stock = base.activatorSkillSlot.stock; if (Object.op_Implicit((Object)(object)base.activatorSkillSlot) && (Object)(object)SkillBase.instance.SkillDef != (Object)null) { base.activatorSkillSlot.SetSkillOverride((object)this, SkillBase.instance.SkillDef, (SkillOverridePriority)4); base.activatorSkillSlot.stock = stock; } buffInterval = baseBuffInterval; if (ArtificerExtendedPlugin.BodyHasAncientScepterItem(((EntityState)this).characterBody)) { currentIcicles -= 3; buffInterval *= 1f + 0.5f * (float)stock; } if (!((Component)((EntityState)this).outer).gameObject.TryGetComponent(ref orbitProjectileManager)) { orbitProjectileManager = ((Component)((EntityState)this).outer).gameObject.AddComponent(); } if (NetworkServer.active) { AddIceArmorBuff(); } } public override void FixedUpdate() { base.FixedUpdate(); if (!hasFiredIcicles && ((EntityState)this).isAuthority) { FireIcicles(); } if (NetworkServer.active) { float num = (base.vortexEnding ? endingSpeedMultiplier : 1f); armorAddStopwatch += Time.fixedDeltaTime * num; while (armorAddStopwatch > buffInterval) { armorAddStopwatch -= buffInterval; AddIceArmorBuff(); } } if (!((EntityState)this).isAuthority) { return; } int buffCount = ((EntityState)this).characterBody.GetBuffCount(_1FrostbiteSkill.artiIceShield); if (buffCount >= _1FrostbiteSkill.maxBuffStacks) { if (!base.vortexEnding) { ((EntityState)this).PlayAnimation("Gesture, Additive", "PrepWall", "PrepWall.playbackRate", 0.3f / ((BaseState)this).attackSpeedStat, 0f); } SetNextState(); } if (!base.vortexEnding) { bool flag = SkillStateMethods.IsKeyDownAuthority((ISkillState)(object)this, ((EntityState)this).skillLocator, ((EntityState)this).inputBank); keyReleased |= !flag; if (keyReleased && flag) { base.vortexEnding = true; ((EntityState)this).PlayAnimation("Gesture, Additive", "PrepWall", "PrepWall.playbackRate", 0.3f / ((BaseState)this).attackSpeedStat, 0f); } } } private void FireIcicles() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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) currentIcicles++; if ((Object)(object)orbitProjectileManager != (Object)null) { FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = _1FrostbiteSkill.icicleProjectilePrefab, owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * _1FrostbiteSkill.icicleDamage, force = SoulSpiral.projectileForce, position = ((EntityState)this).characterBody.corePosition, crit = crit }; orbitProjectileManager.FireSoulSpiral(val); } } private void AddIceArmorBuff() { ((EntityState)this).characterBody.AddBuff(_1FrostbiteSkill.artiIceShield); } public override void OnExit() { base.OnExit(); if (Object.op_Implicit((Object)(object)base.activatorSkillSlot) && (Object)(object)ToolbotDualWieldBase.cancelSkillDef != (Object)null) { base.activatorSkillSlot.UnsetSkillOverride((object)this, SkillBase.instance.SkillDef, (SkillOverridePriority)4); } if ((Object)(object)orbitProjectileManager != (Object)null) { EntityState.Destroy((Object)(object)orbitProjectileManager); } if (!authorityProceedToNextState) { InflictSnowAuthority(); } } protected override void SetNextState() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) authorityProceedToNextState = true; ((EntityState)this).outer.SetNextState((EntityState)(object)new PolarVortexStart { addedFallImmunity = addedFallImmunity, exiting = true, activatorSkillSlot = base.activatorSkillSlot, _activatorSkillSlot = (SkillSlot)(sbyte)((EntityState)this).skillLocator.GetSkillSlotIndex(base.activatorSkillSlot), crit = crit }); } } internal class PolarVortexBase : GenericCharacterMain, ISkillState { internal SkillSlot _activatorSkillSlot; internal bool authorityProceedToNextState = false; internal bool addedFallImmunity = false; internal bool crit = false; internal bool _vortexEnding = false; public static GameObject muzzleflashEffect => Addressables.LoadAssetAsync((object)RoR2_Base_Mage.MuzzleflashMageIceLarge_prefab).WaitForCompletion(); internal bool vortexEnding { get { return ((EntityState)this).characterBody.HasBuff(_1FrostbiteSkill.vortexEndingBuff); } set { //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (!_vortexEnding) { if (!_vortexEnding) { ((EntityState)this).characterBody.AddTimedBuffAuthority(_1FrostbiteSkill.vortexEndingBuff.buffIndex, 20f); } _vortexEnding = value; } } } public GenericSkill activatorSkillSlot { get; set; } protected virtual void SetNextState() { authorityProceedToNextState = false; ((EntityState)this).outer.SetNextStateToMain(); } public override void OnSerialize(NetworkWriter writer) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected I4, but got Unknown ((EntityState)this).OnSerialize(writer); writer.Write(addedFallImmunity); writer.Write(crit); writer.Write((int)_activatorSkillSlot); } public override void OnDeserialize(NetworkReader reader) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_0047: 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_005e: Expected I4, but got Unknown ((EntityState)this).OnDeserialize(reader); addedFallImmunity = reader.ReadBoolean(); crit = reader.ReadBoolean(); _activatorSkillSlot = (SkillSlot)(sbyte)reader.ReadInt32(); if ((Object)(object)activatorSkillSlot == (Object)null) { SkillSlot val = _activatorSkillSlot; SkillSlot val2 = val; switch ((int)val2) { case 0: activatorSkillSlot = ((EntityState)this).skillLocator.primary; break; case 1: activatorSkillSlot = ((EntityState)this).skillLocator.secondary; break; case 2: activatorSkillSlot = ((EntityState)this).skillLocator.utility; break; case 3: activatorSkillSlot = ((EntityState)this).skillLocator.special; break; } } } public override void OnEnter() { //IL_0015: 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_0042: 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) ((GenericCharacterMain)this).OnEnter(); if (NetworkServer.active && !((Enum)((EntityState)this).characterBody.bodyFlags).HasFlag((Enum)(object)(BodyFlags)1)) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); addedFallImmunity = true; } } public override void FixedUpdate() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(1f); if (((EntityState)this).isAuthority && ((EntityState)this).characterBody.HasBuff(Buffs.DisableAllSkills.buffIndex)) { ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); if (!authorityProceedToNextState && ((EntityState)this).isAuthority) { NetMessageExtensions.Send((INetMessage)(object)new SyncVortexClear(((Component)((EntityState)this).characterBody).gameObject, addedFallImmunity), (NetworkDestination)2); } if (NetworkServer.active) { ((EntityState)this).characterBody.ClearTimedBuffs(_1FrostbiteSkill.vortexEndingBuff); } } protected void StopHover() { if (((EntityState)this).isAuthority) { EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Jet"); if (!((Object)(object)val == (Object)null) && !(((object)val.state).GetType() != typeof(JetpackOn))) { val.SetNextStateToMain(); } } } public void InflictSnowAuthority() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleLeft", true); EffectManager.SimpleMuzzleFlash(muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleRight", true); NetMessageExtensions.Send((INetMessage)(object)new SyncVortexBlast(((EntityState)this).characterBody.corePosition, ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * _1FrostbiteSkill.blizzardDamageCoefficient, crit), (NetworkDestination)2); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)5; } } internal class PolarVortexStart : PolarVortexBase { public static float baseDurationEnter = 1f; public static float baseDurationExit = 0.6f; private float duration; public bool exiting = false; public override void OnSerialize(NetworkWriter writer) { base.OnSerialize(writer); writer.Write(exiting); } public override void OnDeserialize(NetworkReader reader) { base.OnDeserialize(reader); exiting = reader.ReadBoolean(); } public override void OnEnter() { base.OnEnter(); duration = (exiting ? baseDurationExit : baseDurationEnter) / ((BaseState)this).attackSpeedStat; StopHover(); crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); GameObject gameObject = ((Component)((EntityState)this).outer).gameObject; if (AltArtiPassive.instanceLookup.TryGetValue(gameObject, out var value)) { value.SkillCast(); } if (!exiting) { ((EntityState)this).PlayAnimation("Gesture, Additive", "PrepWall", "PrepWall.playbackRate", duration, 0f); SeekerController val = default(SeekerController); if (!((Component)((EntityState)this).outer).gameObject.TryGetComponent(ref val)) { ((Component)((EntityState)this).outer).gameObject.AddComponent(); } } } public override void OnExit() { base.OnExit(); InflictSnowAuthority(); } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).PlayAnimation("Gesture, Additive", "FireWall"); if (((EntityState)this).isAuthority) { SetNextState(); } } } protected override void SetNextState() { if (exiting) { base.SetNextState(); return; } authorityProceedToNextState = true; ((EntityState)this).outer.SetNextState((EntityState)(object)new PolarVortex { addedFallImmunity = addedFallImmunity, activatorSkillSlot = base.activatorSkillSlot, crit = crit }); } } internal class SyncVortexBlast : INetMessage, ISerializableObject { private Vector3 position; private bool isCrit; private double damage; private GameObject attackerObject; public SyncVortexBlast() { } public SyncVortexBlast(Vector3 position, GameObject attackerObject, double damage, bool isCrit) { //IL_0009: 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) this.position = position; this.attackerObject = attackerObject; this.damage = damage; this.isCrit = isCrit; } public void Serialize(NetworkWriter writer) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) writer.Write(position); writer.Write(attackerObject); writer.Write(damage); writer.Write(isCrit); } public void Deserialize(NetworkReader reader) { //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) position = reader.ReadVector3(); attackerObject = reader.ReadGameObject(); damage = reader.ReadDouble(); isCrit = reader.ReadBoolean(); } public void OnReceived() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = default(CharacterBody); if (NetworkServer.active && attackerObject.TryGetComponent(ref val)) { FrostUtilsModule.CreateIceBlast(val, FlyUpState.blastAttackForce, (float)damage, _1FrostbiteSkill.blizzardProcCoefficient, _1FrostbiteSkill.blizzardRadius, isCrit, position, true, (DamageSource)8); } } } internal class SyncVortexClear : INetMessage, ISerializableObject { private GameObject bodyObject; private bool removeFallImmunity; public SyncVortexClear() { } public SyncVortexClear(GameObject bodyObject, bool removeFallImmunity) { this.bodyObject = bodyObject; this.removeFallImmunity = removeFallImmunity; } public void Serialize(NetworkWriter writer) { writer.Write(bodyObject); writer.Write(removeFallImmunity); } public void Deserialize(NetworkReader reader) { bodyObject = reader.ReadGameObject(); removeFallImmunity = reader.ReadBoolean(); } public void OnReceived() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = default(CharacterBody); if (NetworkServer.active && bodyObject.TryGetComponent(ref val)) { while (val.HasBuff(_1FrostbiteSkill.artiIceShield)) { val.RemoveBuff(_1FrostbiteSkill.artiIceShield); } if (removeFallImmunity) { CharacterBody obj = val; obj.bodyFlags = (BodyFlags)(obj.bodyFlags & -2); } } } } public class VanillaIonSurge : GenericCharacterMain { private Vector3 flyVector = Vector3.zero; private Transform modelTransform; private CharacterModel characterModel; private HurtBoxGroup hurtboxGroup; private Vector3 blastPosition; public override void OnEnter() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0165: 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_0172: 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_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).OnEnter(); Util.PlaySound(FlyUpState.beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); flyVector = Vector3.up; CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject)); ((EntityState)this).PlayCrossfade("Body", "FlyUp", "FlyUp.playbackRate", FlyUpState.duration, 0.1f); ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.velocity = Vector3.zero; EffectManager.SimpleMuzzleFlash(FlyUpState.muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleLeft", false); EffectManager.SimpleMuzzleFlash(FlyUpState.muzzleflashEffect, ((EntityState)this).gameObject, "MuzzleRight", false); if (((EntityState)this).isAuthority) { blastPosition = ((EntityState)this).characterBody.corePosition; } if (NetworkServer.active) { BlastAttack val = new BlastAttack(); val.radius = FlyUpState.blastAttackRadius; val.procCoefficient = FlyUpState.blastAttackProcCoefficient; val.position = blastPosition; val.attacker = ((EntityState)this).gameObject; val.crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); val.baseDamage = ((EntityState)this).characterBody.damage * FlyUpState.blastAttackDamageCoefficient; val.falloffModel = (FalloffModel)0; val.baseForce = FlyUpState.blastAttackForce; val.teamIndex = TeamComponent.GetObjectTeam(val.attacker); val.damageType = DamageTypeCombo.op_Implicit((DamageType)32); val.attackerFiltering = (AttackerFiltering)2; val.Fire(); } if (AltArtiPassive.instanceLookup.TryGetValue(((Component)((EntityState)this).outer).gameObject, out var value)) { value.SkillCast(); } } public override void OnSerialize(NetworkWriter writer) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); writer.Write(blastPosition); } public override void OnDeserialize(NetworkReader reader) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnDeserialize(reader); blastPosition = reader.ReadVector3(); } public override void HandleMovements() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).HandleMovements(); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += flyVector * (((BaseState)this).moveSpeedStat * FlyUpState.speedCoefficientCurve.Evaluate(((EntityState)this).fixedAge / FlyUpState.duration) * Time.fixedDeltaTime); ((EntityState)this).characterMotor.velocity.y = 0f; } public override void UpdateAnimationParameters() { ((BaseCharacterMain)this).UpdateAnimationParameters(); } private void CreateBlinkEffect(Vector3 origin) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(flyVector); val.origin = origin; EffectManager.SpawnEffect(FlyUpState.blinkPrefab, val, false); } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); if (((EntityState)this).fixedAge >= FlyUpState.duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (!((EntityState)this).outer.destroying) { Util.PlaySound(FlyUpState.endSoundString, ((EntityState)this).gameObject); } ((GenericCharacterMain)this).OnExit(); if (((EntityState)this).isAuthority) { JetHackPlugin.hoverStateCache = true; } } } } namespace ArtificerExtended.Skills { internal class _1SnowballsSkill : SkillBase { private const string CryoBoltHitBoxGroupName = "CryoBoltPierce"; [AutoConfig("Attack Velocity", "Vanilla bolts are 80", 60f)] public static float snowballVelocity = 60f; [AutoConfig("Attack Base Duration", 0.3f)] public static float snowballBaseDuration = 0.3f; [AutoConfig("Attack Base Damage", 2.8f)] public static float snowballBaseDamage = 2.8f; [AutoConfig("Attack Proc Coefficient", 0.5f)] public static float snowballProcCoeff = 0.5f; [AutoConfig("Pierce Hit Limit", 3)] public static int snowballPierceLimit = 3; [AutoConfig("Pierce Hitbox Size", 2.5f)] public static float snowballHitBoxSize = 2.5f; [AutoConfig("Pierce Damage Decay (First Hit)", 0.5f)] public static float snowballPierceDamageDecayFirstHit = 0.5f; [AutoConfig("Pierce Damage Decay (Later Hits)", "1.0 means pierce damage will not continue to decay after the first hit.", 1f)] public static float snowballPierceDamageDecay = 1f; public static GameObject snowballProjectilePrefab; public override string SkillName => "Frost Bolt"; public override string TOKEN_IDENTIFIER => "SNOWBALL"; public override string SkillDescription => "Frost. Fire a bolt for " + Tools.ConvertDecimal(FireSnowBall.damageCoeff) + " damage " + $"that pierces up to {snowballPierceLimit} times. Hold up to 4."; public override Sprite Icon => LoadSpriteFromBundle("frostbolt"); public override MageElement Element => (MageElement)2; public override Type ActivationState => typeof(FireSnowBall); public override SkillSlot SkillSlot => (SkillSlot)0; public override SimpleSkillData SkillData => new SimpleSkillData(4); public override InterruptPriority InterruptPriority => (InterruptPriority)0; public override Type BaseSkillDef => typeof(SteppedSkillDef); public override float BaseCooldown => 1.2f; public override Type RequiredUnlock => typeof(FreezeManySimultaneousUnlock); public override void Init() { KeywordTokens = new string[1] { "KEYWORD_FROST" }; base.Init(); } public override void Hooks() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) AssetReferenceT val = new AssetReferenceT(RoR2_Junk_Mage.MageIceBolt_prefab); AsyncOperationHandle val2 = AssetAsyncReferenceManager.LoadAsset(val, (AsyncReferenceHandleUnloadType)2); val2.Completed += LoadSnowballProjectile; } private void LoadSnowballProjectile(AsyncOperationHandle obj) { snowballProjectilePrefab = obj.Result; FixSnowballProjectile(); } private void FixSnowballProjectile() { //IL_0077: 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_008d: 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_00ce: 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_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) ProjectileSimple component = snowballProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.desiredForwardSpeed = snowballVelocity; } ProjectileDamage component2 = snowballProjectilePrefab.GetComponent(); ProjectileController component3 = snowballProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { component3.procCoefficient = snowballProcCoeff; } BoxCollider component4 = snowballProjectilePrefab.GetComponent(); if ((Object)(object)component4 != (Object)null) { snowballProjectilePrefab.transform.localScale = Vector3.one; component4.size = Vector3.one * 0.2f; } HitBox val = null; Transform val2 = null; MineProximityDetonator componentInChildren = snowballProjectilePrefab.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { val2 = ((Component)componentInChildren).transform; val2.localScale = Vector3.one * snowballHitBoxSize; val2.localPosition = Vector3.zero; val = ((Component)val2).gameObject.AddComponent(); SphereCollider component5 = ((Component)componentInChildren).GetComponent(); if (Object.op_Implicit((Object)(object)component5)) { Object.Destroy((Object)(object)component5); } Object.Destroy((Object)(object)componentInChildren); } if (!((Object)(object)val != (Object)null)) { return; } HitBoxGroup val3 = snowballProjectilePrefab.AddComponent(); val3.groupName = "CryoBoltPierce"; val3.hitBoxes = (HitBox[])(object)new HitBox[1] { val }; ProjectileOverlapAttack projectileOverlap = snowballProjectilePrefab.AddComponent(); projectileOverlap.damageCoefficient = 1f; projectileOverlap.maximumOverlapTargets = 100; projectileOverlap.fireFrequency = 60f; AssetReferenceT val4 = new AssetReferenceT(RoR2_Junk_Mage.MuzzleflashMageIce_prefab); AsyncOperationHandle val5 = AssetAsyncReferenceManager.LoadAsset(val4, (AsyncReferenceHandleUnloadType)2); val5.Completed += delegate(AsyncOperationHandle obj) { projectileOverlap.impactEffect = obj.Result; }; ProjectileOverlapDecayDamage val6 = snowballProjectilePrefab.AddComponent(); val6.firstHitDamageMultiplier = snowballPierceDamageDecayFirstHit; ((ProjectileOverlapLimitHits)val6).hitLimit = snowballPierceLimit; if ((Object)(object)component4 != (Object)null) { ((Component)component4).gameObject.layer = LayerIndex.projectileWorldOnly.intVal; ProjectileSingleTargetImpact psti = snowballProjectilePrefab.AddComponent(); psti.destroyOnWorld = true; psti.destroyWhenNotAlive = true; AssetReferenceT val7 = new AssetReferenceT(RoR2_Junk_Mage.MuzzleflashMageIce_prefab); val5 = AssetAsyncReferenceManager.LoadAsset(val7, (AsyncReferenceHandleUnloadType)2); val5.Completed += delegate(AsyncOperationHandle obj) { psti.impactEffect = obj.Result; }; } ProjectileImpactExplosion component6 = snowballProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component6)) { Object.Destroy((Object)(object)component6); } } } internal class _2LavaBoltsSkill : SkillBase<_2LavaBoltsSkill> { public static GameObject sloshProjectilePrefab; public static GameObject lavaGhostPrefab; public static GameObject lavaImpactEffect; public static int maxStock = 6; public static int rechargeStock = 2; public static float rechargeInterval = 2f; public static float baseDuration = 1.2f; public static float visualScale = 0.3f; private static float pierceDamageCoefficient = 3.8f; private static float pierceProcCoefficient = 1f; public static float damageCoefficient = pierceDamageCoefficient * 0.5f; public static float procCoefficient = 0.5f; public static float sloshProjectileSize = 4.5f; public static float sloshProjectileSpeed = 25f; public static float maxDistance = 21f; public static float durationBeforeGravity = maxDistance / sloshProjectileSpeed; public static GameObject lavaProjectilePrefab => CommonAssets.lavaProjectilePrefab; public static int totalDrops => Mathf.CeilToInt(maxDistance / (CommonAssets.lavaPoolSize * 2f)); public static float delayBetweenDrops => maxDistance / (float)totalDrops / sloshProjectileSpeed; public override string SkillName => "Lava Bolt"; public override string SkillDescription => "Ignite. Lob a molten projectile for " + Tools.ConvertDecimal(pierceDamageCoefficient) + " damage, leaving a trail of " + $"molten pools for {totalDrops + 1}x{Tools.ConvertDecimal(damageCoefficient)} damage."; public override string TOKEN_IDENTIFIER => "LAVABOLTS"; public override Type RequiredUnlock => typeof(StackBurnUnlock); public override MageElement Element => (MageElement)1; public override Type ActivationState => typeof(FireLavaBolt); public override SimpleSkillData SkillData => new SimpleSkillData { stockToConsume = 0, baseMaxStock = 1, rechargeStock = 1 }; public override Sprite Icon => LoadSpriteFromBundle("LavaBoltIcon"); public override SkillSlot SkillSlot => (SkillSlot)0; public override InterruptPriority InterruptPriority => (InterruptPriority)0; public override Type BaseSkillDef => typeof(SteppedSkillDef); public override float BaseCooldown => rechargeInterval; public override void Init() { KeywordTokens = new string[2] { CommonAssets.lavaPoolKeywordToken, "KEYWORD_IGNITE" }; base.Init(); } public override void Hooks() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle val = Addressables.LoadAssetAsync((object)RoR2_Junk_Commando.FMJ_prefab); val.Completed += delegate(AsyncOperationHandle ctx) { CreateSloshProjectile(ctx.Result); }; } private void CreateSloshProjectile(GameObject orig) { //IL_0037: 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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) sloshProjectilePrefab = PrefabAPI.InstantiateClone(orig, "MageLavaSloshProjectile", true); sloshProjectilePrefab.layer = LayerIndex.projectileWorldOnly.intVal; sloshProjectilePrefab.transform.localScale = Vector3.one * sloshProjectileSize; ProjectileController pc = sloshProjectilePrefab.GetComponent(); AsyncOperationHandle val = Addressables.LoadAssetAsync((object)RoR2_Base_Commando.FMJRampingGhost_prefab); val.Completed += delegate(AsyncOperationHandle ctx) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) GameObject val5 = PrefabAPI.InstantiateClone(ctx.Result, "MageLavaSloshGhost"); pc.ghostPrefab = val5; val5.transform.localScale = Vector3.one * sloshProjectileSize * visualScale; val5.transform.localPosition = Vector3.zero; ParticleSystemRenderer[] componentsInChildren = val5.GetComponentsInChildren(); foreach (ParticleSystemRenderer val6 in componentsInChildren) { string name = ((Object)((Component)val6).gameObject).name; Color32 val7 = Color32.op_Implicit(Color.white); string text = ""; string text2 = ""; if (name == "Distortion" || name == "BurstVFX") { ((Component)val6).gameObject.SetActive(false); ((Renderer)val6).enabled = false; } else { switch (name) { case "Flames": text = "matLavaSloshFlames"; text2 = RoR2_Base_Common_ColorRamps.texRampParentFire_png; ((Color32)(ref val7))..ctor((byte)195, (byte)179, (byte)0, (byte)190); break; case "Trail": text = "matLavaSloshTrail"; ((Color32)(ref val7))..ctor((byte)217, (byte)58, (byte)0, byte.MaxValue); break; case "Core": text = "matLavaSloshCore"; ((Color32)(ref val7))..ctor((byte)113, (byte)9, (byte)0, byte.MaxValue); break; } if (text != "") { Material mat = Object.Instantiate(((Renderer)val6).material); ((Renderer)val6).material = mat; ((Object)mat).name = text; if (text2 != "") { AsyncOperationHandle val8 = Addressables.LoadAssetAsync((object)text2); val8.Completed += delegate(AsyncOperationHandle val9) { mat.SetTexture("_RemapTex", val9.Result); }; } mat.DisableKeyword("VERTEXCOLOR"); mat.SetFloat("_VertexColorOn", 0f); mat.SetColor("_TintColor", Color32.op_Implicit(val7)); } } } Light componentInChildren2 = val5.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren2)) { componentInChildren2.color = Color32.op_Implicit(new Color32((byte)79, (byte)46, (byte)0, byte.MaxValue)); } }; ProjectileMageFirewallWalkerController val2 = sloshProjectilePrefab.AddComponent(); val2.dropInterval = delayBetweenDrops; val2.firePillarPrefab = CommonAssets.lavaProjectilePrefab; val2.totalProjectiles = totalDrops; ProjectileOverlapAttack component = sloshProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.damageCoefficient = ((damageCoefficient > 0f) ? (pierceDamageCoefficient / damageCoefficient) : pierceDamageCoefficient); component.overlapProcCoefficient = ((procCoefficient > 0f) ? (pierceProcCoefficient / procCoefficient) : procCoefficient); } HitBox componentInChildren = sloshProjectilePrefab.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { ((Component)componentInChildren).transform.localScale = Vector3.one; ((Component)componentInChildren).transform.localPosition = Vector3.zero; } SphereCollider component2 = sloshProjectilePrefab.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.radius = 0.2f; ((Collider)component2).isTrigger = false; } ProjectileImpactExplosion val3 = sloshProjectilePrefab.AddComponent(); if (Object.op_Implicit((Object)(object)val3)) { ((ProjectileExplosion)val3).childrenProjectilePrefab = CommonAssets.lavaPoolPrefab; ((ProjectileExplosion)val3).fireChildren = true; ((ProjectileExplosion)val3).childrenCount = 1; ((ProjectileExplosion)val3).useChildRotation = true; val3.impactEffect = CommonAssets.lavaImpactEffect; val3.destroyOnEnemy = false; val3.destroyOnWorld = true; val3.lifetime = 10f; } ProjectileSimple component3 = sloshProjectilePrefab.GetComponent(); component3.desiredForwardSpeed = sloshProjectileSpeed; Rigidbody component4 = sloshProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component4)) { component4.useGravity = true; AntiGravityForce val4 = sloshProjectilePrefab.AddComponent(); val4.rb = component4; GravityAfterDuration gravityAfterDuration = sloshProjectilePrefab.AddComponent(); gravityAfterDuration.antiGrav = val4; gravityAfterDuration.antiGravCoefficient = -0.5f; gravityAfterDuration.durationBeforeGravity = durationBeforeGravity; } FindAndDestroy(sloshProjectilePrefab.transform, "SweetSpotBehavior"); FindAndDestroy(sloshProjectilePrefab.transform, "SweetSpotVFX"); FindAndDestroy(sloshProjectilePrefab.transform, "SweetSpotWindupVFX"); FindAndDestroy(sloshProjectilePrefab.transform, "SweetSpotEndVFX"); Content.AddProjectilePrefab(sloshProjectilePrefab); static void FindAndDestroy(Transform gameObject, string name) { Transform val5 = gameObject.Find(name); if (Object.op_Implicit((Object)(object)val5) && (Object)(object)((Component)val5).gameObject != (Object)(object)gameObject) { Object.Destroy((Object)(object)((Component)val5).gameObject); } else { Debug.LogError((object)("Could not find transform [" + name + "] to destroy")); } } } private void CreateLavaProjectile() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) Color color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)40, (byte)0, byte.MaxValue)); GameObject ghostPrefab = lavaProjectilePrefab.GetComponent().ghostPrefab; lavaGhostPrefab = PrefabAPI.InstantiateClone(ghostPrefab, "NapalmSpitGhost", false); Tools.GetParticle(lavaGhostPrefab, "SpitCore", color); lavaImpactEffect = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("e184c0c8bc862ff40b9fd07db0b8e98c"), "NapalmSpitExplosion", false); Transform val = lavaImpactEffect.transform.Find("Particles"); if (Object.op_Implicit((Object)(object)val)) { Tools.GetParticle(((Component)val).gameObject, "Flames", color); Tools.GetParticle(((Component)val).gameObject, "Flash", Color.yellow); Tools.GetParticle(((Component)val).gameObject, "Ring, Mesh", Color.yellow); FindAndDestroy(val, "Bugs"); FindAndDestroy(val, "Distortion"); } ProjectileImpactExplosion component = lavaProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component) && (Object)(object)CommonAssets.lavaPoolPrefab != (Object)null) { ((ProjectileExplosion)component).childrenProjectilePrefab = CommonAssets.lavaPoolPrefab; component.impactEffect = lavaImpactEffect; ((ProjectileExplosion)component).blastRadius = CommonAssets.lavaPoolSize; ((ProjectileExplosion)component).blastProcCoefficient = procCoefficient; ((ProjectileExplosion)component).bonusBlastForce = new Vector3(0f, 500f, 0f); } ProjectileController component2 = lavaProjectilePrefab.GetComponent(); component2.ghostPrefab = lavaGhostPrefab; ProjectileDamage component3 = lavaProjectilePrefab.GetComponent(); component3.damageType = DamageTypeCombo.op_Implicit((DamageType)128); Content.CreateAndAddEffectDef(lavaImpactEffect); Content.AddProjectilePrefab(lavaProjectilePrefab); static void FindAndDestroy(Transform gameObject, string name) { Transform val2 = gameObject.Find(name); if (Object.op_Implicit((Object)(object)val2) && (Object)(object)((Component)val2).gameObject != (Object)(object)gameObject) { Object.Destroy((Object)(object)((Component)val2).gameObject); } else { Debug.LogError((object)("Could not find transform [" + name + "] to destroy")); } } } } internal class _3LaserBoltsSkill : SkillBase { public static GameObject tracerLaser; public static float damageCoefficient = 2.2f; private int maxStock = 4; public override string SkillName => "Laser Bolt"; public override string SkillDescription => "Fire a long-range laser that chains lightning for 2x" + Tools.ConvertDecimal(damageCoefficient) + " damage. Hold up to 4, recharging all at once."; public override string TOKEN_IDENTIFIER => "LASERBOLTS"; public override Type RequiredUnlock => typeof(WoolieRushUnlock); public override MageElement Element => (MageElement)3; public override Type ActivationState => typeof(FireLaserbolts); public override SimpleSkillData SkillData => new SimpleSkillData(maxStock, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, cancelSprintingOnActivation: true, forceSprintingDuringState: false, dontAllowPastMaxStocks: false, fullRestockOnAssign: true, isCombatSkill: true, mustKeyPress: false, maxStock, 1, resetCooldownTimerOnUse: true, 1, useAttackSpeedScaling: true); public override Sprite Icon => LoadSpriteFromBundle("LaserboltIcon"); public override SkillSlot SkillSlot => (SkillSlot)0; public override InterruptPriority InterruptPriority => (InterruptPriority)0; public override Type BaseSkillDef => typeof(SteppedSkillDef); public override float BaseCooldown => 2f; public override void Init() { CreateTracer(); base.Init(); } public override void Hooks() { } private void CreateTracer() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) tracerLaser = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("prefabs/effects/tracers/TracerGolem"), "tracerMageLaser", false); Tracer component = tracerLaser.GetComponent(); component.speed = 300f; component.length = 15f; component.beamDensity = 10f; VFXAttributes val = tracerLaser.AddComponent(); val.vfxPriority = (VFXPriority)2; val.vfxIntensity = (VFXIntensity)2; Tools.GetParticle(tracerLaser, "SmokeBeam", new Color(0.05f, 0.45f, 1f), 0.66f); MainModule main = tracerLaser.GetComponentInChildren().main; ((MainModule)(ref main)).startSizeXMultiplier = ((MainModule)(ref main)).startSizeXMultiplier * 0.4f; ((MainModule)(ref main)).startSizeYMultiplier = ((MainModule)(ref main)).startSizeYMultiplier * 0.4f; ((MainModule)(ref main)).startSizeZMultiplier = ((MainModule)(ref main)).startSizeZMultiplier * 2f; Content.CreateAndAddEffectDef(tracerLaser); } } internal class _4IceShardsSkill : SkillBase { public static GameObject tracerShotgun; public static GameObject tracerBuckshot; public static float damageCoefficient = 6.4f; public static float procCoefficientPoint = 0.5f; public static float procCoefficientSpread = 0.7f; public static float procCoefficientBuckshot = 0.7f; public static float bulletRadius = 0.3f; public static int bulletCountPoint = 1; public static int bulletCountSpread = 1; public static int bulletCountBuckshot = 2; public static float recoilAmplitude = 3.25f; public static float spreadAmplitude = 1.2f; public static float spreadBloomValue = 0.3f; public static float spreadShotFraction = 0.4f; private float totalShards = bulletCountBuckshot + bulletCountPoint + bulletCountSpread; public override string SkillName => "Icicle Bolts"; public override string SkillDescription => "Frost. Fire a blast of ice shards for " + $"up to {totalShards}x{Tools.ConvertDecimal(damageCoefficient / totalShards)} damage total. " + "Hold up to 2."; public override string TOKEN_IDENTIFIER => "ICESHARDS"; public override Type RequiredUnlock => typeof(NoDamageUnlock); public override MageElement Element => (MageElement)2; public override Type ActivationState => typeof(FireIceShard); public override SimpleSkillData SkillData => new SimpleSkillData(2, beginSkillCooldownOnSkillEnd: false, canceledFromSprinting: false, cancelSprintingOnActivation: true, forceSprintingDuringState: false, dontAllowPastMaxStocks: false, fullRestockOnAssign: true, isCombatSkill: true, mustKeyPress: false, 1, 1, resetCooldownTimerOnUse: false, 1, useAttackSpeedScaling: true); public override Sprite Icon => LoadSpriteFromBundle("IceShardsIcon"); public override SkillSlot SkillSlot => (SkillSlot)0; public override InterruptPriority InterruptPriority => (InterruptPriority)0; public override Type BaseSkillDef => typeof(SteppedSkillDef); public override float BaseCooldown => 1.3f; public override void Init() { KeywordTokens = new string[1] { "KEYWORD_FROST" }; CreateTracerEffects(); base.Init(); } public override void Hooks() { } private void CreateTracerEffects() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) tracerShotgun = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("prefabs/effects/tracers/TracerCommandoShotgun"), "tracerMageIceShard", false); Tracer component = tracerShotgun.GetComponent(); component.speed = 100f; component.length = 3f; component.beamDensity = 5f; VFXAttributes val = tracerShotgun.AddComponent(); val.vfxPriority = (VFXPriority)1; val.vfxIntensity = (VFXIntensity)1; tracerBuckshot = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("prefabs/effects/tracers/TracerCommandoShotgun"), "tracerMageIceShardBuckshot", false); Tracer component2 = tracerBuckshot.GetComponent(); component2.speed = 60f; component2.length = 2f; component2.beamDensity = 3f; VFXAttributes val2 = tracerBuckshot.AddComponent(); val2.vfxPriority = (VFXPriority)1; val2.vfxIntensity = (VFXIntensity)1; Content.CreateAndAddEffectDef(tracerShotgun); Content.CreateAndAddEffectDef(tracerBuckshot); } } internal class _1EruptionSkill : SkillBase<_1EruptionSkill> { public static GameObject meteorImpactEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/MeteorAttackOnHighDamage/RunicMeteorStrikeImpact.prefab").WaitForCompletion(); public static float minDuration = 0.2f; public static float maxDuration = 2f; public static float windDownDuration = 0.5f; public static float minBlastDamage = 3f; public static float maxBlastDamage = 8f; public static float minBlastRadius = 6f; public static float maxBlastRadius = 9f; public static int minClusterProjectiles = 3; public static int maxClusterProjectiles = 8; public static float clusterProjectileDamage = 3f; public override string SkillName => "Focused Nano-Eruption"; public override string SkillDescription => "Ignite. Charge up a nano-eruption that deals " + Tools.ConvertDecimal(minBlastDamage) + "-" + Tools.ConvertDecimal(maxBlastDamage) + " damage in an area, " + $"plus {minClusterProjectiles}-{maxClusterProjectiles} molten pools " + "for " + Tools.ConvertDecimal(clusterProjectileDamage) + " damage."; public override string TOKEN_IDENTIFIER => "ERUPTIONEXTENDED"; public override Type RequiredUnlock => typeof(MeteoriteDeathUnlock); public override MageElement Element => (MageElement)1; public override Type ActivationState => typeof(ChargeMeteors); public override SimpleSkillData SkillData => new SimpleSkillData(1, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, cancelSprintingOnActivation: true, forceSprintingDuringState: false, dontAllowPastMaxStocks: false, fullRestockOnAssign: true, isCombatSkill: true, mustKeyPress: true); public override Sprite Icon => LoadSpriteFromBundle("eruptionAE"); public override SkillSlot SkillSlot => (SkillSlot)1; public override InterruptPriority InterruptPriority => (InterruptPriority)1; public override Type BaseSkillDef => typeof(SkillDef); public override float BaseCooldown => 5f; public override void Init() { KeywordTokens = new string[2] { CommonAssets.lavaPoolKeywordToken, "KEYWORD_IGNITE" }; CreateMeteorImpactEffect(); base.Init(); } private void CreateMeteorImpactEffect() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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_006c: 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_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_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Expected O, but got Unknown //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: 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_019a: 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_012c: 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) meteorImpactEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Meteor/MeteorStrikeImpact.prefab").WaitForCompletion(), "MageEruptionImpact", false); float num = 2f; meteorImpactEffectPrefab.transform.localScale = Vector3.one * num; Light componentInChildren = meteorImpactEffectPrefab.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)96, (byte)102, byte.MaxValue)); } ParticleSystemRenderer[] componentsInChildren = meteorImpactEffectPrefab.GetComponentsInChildren(); foreach (ParticleSystemRenderer val in componentsInChildren) { string name = ((Object)((Component)val).gameObject).name; Color32 val2 = Color32.op_Implicit(Color.white); Texture val3 = null; bool flag = false; string text = ""; switch (name) { case "Flash": case "Sparks": text = "matEruptionTracerBright"; flag = true; ((Color32)(ref val2))..ctor((byte)199, (byte)39, (byte)0, (byte)213); break; case "Flash Lines, Fire": case "Fire": text = "matEruptionFire"; val3 = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/ColorRamps/texRampMagmaWorm.png").WaitForCompletion(); ((Color32)(ref val2))..ctor((byte)134, (byte)51, (byte)45, byte.MaxValue); flag = true; break; default: continue; } if (text != "") { Material val4 = (((Renderer)val).material = Object.Instantiate(((Renderer)val).material)); ((Object)val4).name = text; val4.SetColor("_TintColor", Color32.op_Implicit(val2)); if ((Object)(object)val3 != (Object)null) { val4.SetTexture("_RemapTex", val3); } if (flag) { val4.DisableKeyword("VERTEXCOLOR"); val4.SetFloat("_VertexColorOn", 0f); } } } GameObject val6 = Addressables.LoadAssetAsync((object)"d9cbb9db8a4992e49b933ab13eea4f9c").WaitForCompletion(); GameObject val7 = Object.Instantiate(val6); Decal componentInChildren2 = val7.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren2)) { Transform transform = ((Component)componentInChildren2).transform; transform.parent = meteorImpactEffectPrefab.transform; transform.localPosition = Vector3.zero; Material val8 = new Material(componentInChildren2.Material); val8.SetColor("_Color", Color32.op_Implicit(new Color32((byte)205, (byte)74, (byte)0, (byte)143))); val8.SetTexture("_MaskTex", Addressables.LoadAssetAsync((object)"RoR2/Base/CrippleWard/texLunarWardImpactMask.png").WaitForCompletion()); val8.SetTexture("_RemapTex", Addressables.LoadAssetAsync((object)"RoR2/Base/Common/ColorRamps/texRampCloth.jpg").WaitForCompletion()); componentInChildren2.Material = val8; AnimateShaderAlpha component = ((Component)transform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.timeMax = 2f; } } Object.Destroy((Object)(object)val7); Content.CreateAndAddEffectDef(meteorImpactEffectPrefab); } public override void Hooks() { } } internal class _2ThunderstrikeSkill : SkillBase { public static GameObject shockwaveZapConePrefab; public static int shockwaveMaxAngleFilter = 35; public static float shockwaveMaxRange = 20f; public const string ThunderStrikeHitBoxGroupName = "Strike"; public static float baseDuration = 0.36f; public static float durationMultOnHit = 1.3f; public static GameObject lightningOrbEffect; public static GameObject lightningImpactEffect; public static Material enterOverlayMaterial; public static float speedCoefficient = 9f; public static float damageCoefficient = 1f; public static float procCoefficient = 0.25f; public static float delayDamageCoefficient = 9f; public static float delayProcCoefficient = 1f; public static float resonantCdrFirst = 1f; public static float resonantCdr = 0.5f; public static int resonantCdrMax = 15; public override string SkillName => "Pulse Strike"; public override string SkillDescription => "Resonant. Stunning. Become a beam of energy, surging forward a short distance. Enemies struck will attract lightning for " + Tools.ConvertDecimal(damageCoefficient + delayDamageCoefficient) + " damage."; public override string TOKEN_IDENTIFIER => "THUNDERDASH"; public override Type RequiredUnlock => typeof(OverkillOverloadingUnlock); public override MageElement Element => (MageElement)3; public override Type ActivationState => typeof(ThunderStrikeDash); public override SimpleSkillData SkillData => new SimpleSkillData(1, beginSkillCooldownOnSkillEnd: false, canceledFromSprinting: false, cancelSprintingOnActivation: true, forceSprintingDuringState: false, dontAllowPastMaxStocks: false, fullRestockOnAssign: true, isCombatSkill: true, mustKeyPress: true); public override Sprite Icon => LoadSpriteFromBundle("pulsestrikeAE2"); public override SkillSlot SkillSlot => (SkillSlot)1; public override InterruptPriority InterruptPriority => (InterruptPriority)1; public override Type BaseSkillDef => typeof(SkillDef); public override float BaseCooldown => 8f; public override void Init() { //IL_006d: 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_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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_018d: 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) string text = "AE_KEYWORD_RESONANTTHUNDERDASH"; CommonAssets.AddResonantKeyword(text, "Pulse Conduit", $"If only Lightning abilities are equipped, striking an enemy reduces {SkillName} cooldown by {resonantCdrFirst} second, " + $"plus {resonantCdr} seconds for every additional enemy (up to {resonantCdrMax} times)."); KeywordTokens = new string[2] { text, "KEYWORD_STUNNING" }; lightningOrbEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/LightningStrikeOnHit/SimpleLightningStrikeOrbEffect.prefab").WaitForCompletion(); lightningImpactEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/LightningStrikeOnHit/SimpleLightningStrikeImpact.prefab").WaitForCompletion(); base.Init(); ModelLocator component = ((Component)ArtificerExtendedPlugin.mageBody).GetComponent(); Transform val = ((component != null) ? component.modelTransform : null); if (!Object.op_Implicit((Object)(object)val)) { return; } HitBoxGroup val2 = ((Component)val).gameObject.AddComponent(); val2.groupName = "Strike"; ChildLocator component2 = ((Component)val).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { Transform obj = component2.FindChild("Base"); Transform val3 = ((obj != null) ? obj.parent : null); if (Object.op_Implicit((Object)(object)val3)) { GameObject val4 = new GameObject(); HitBox val5 = val4.AddComponent(); val4.transform.parent = val3; val4.layer = LayerIndex.projectile.intVal; val4.transform.localPosition = new Vector3(0f, 1.564f, 0f); val4.transform.localRotation = Quaternion.identity; val4.transform.localScale = Vector3.one * 10f; val2.hitBoxes = (HitBox[])(object)new HitBox[1] { val5 }; } } } public override void Hooks() { } } internal class _3SnowglobeSkill : SkillBase { public GetDeployableSameSlotLimit GetSnowglobeSlotLimit; public static DeployableSlot snowglobeDeployableSlot; public static GameObject muzzleflashEffectPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Mage.MuzzleflashMageIceLarge_prefab).WaitForCompletion(); public static GameObject snowglobeDeployProjectilePrefab; public static GameObject snowglobeProjectilePrefab; public static int maxSnowglobeBase = 2; public static int maxSnowglobeUpgrade = 3; public static float impactDamageCoefficient = 7f; public static float impactProcCoefficient = 1f; public static float impactBlastRadius = 14f; public static float snowWardRadius = 10f; public static float damageCoefficientPerSecond = 0.5f; public static float procCoefficientPerTick = 1f; public static float damageInterval = 1f; public static int chillStacksPerSnowglobe = 2; public static float projectileBaseSpeed = 120f; public override string SkillName => "Stasis Field"; public override string SkillDescription => "Resonant. Aim a supercooled projectile for " + Tools.ConvertDecimal(impactDamageCoefficient) + " damage, leaving behind a stasis field that Frosts until replaced. " + $"Hold up to {maxSnowglobeBase}."; public override string TOKEN_IDENTIFIER => "SNOWGLOBE"; public override Type RequiredUnlock => typeof(TankDamageUnlock); public override MageElement Element => (MageElement)2; public override Type ActivationState => typeof(AimSnowglobe); public override SimpleSkillData SkillData => new SimpleSkillData(maxSnowglobeBase, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: true); public override Sprite Icon => LoadSpriteFromBundle("stasisfield"); public override SkillSlot SkillSlot => (SkillSlot)1; public override InterruptPriority InterruptPriority => (InterruptPriority)0; public override Type BaseSkillDef => typeof(SkillDef); public override float BaseCooldown => 5f; public override void Init() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) string text = "AE_KEYWORD_RESONANTSNOWGLOBE"; CommonAssets.AddResonantKeyword(text, "Sustained Stasis", $"Max of {maxSnowglobeBase} stasis fields. " + $"If only Ice abilities are equipped, increase max to {maxSnowglobeUpgrade}."); KeywordTokens = new string[2] { text, "KEYWORD_FROST" }; GetSnowglobeSlotLimit = (GetDeployableSameSlotLimit)Delegate.Combine((Delegate?)(object)GetSnowglobeSlotLimit, (Delegate?)new GetDeployableSameSlotLimit(GetMaxSnowglobes)); snowglobeDeployableSlot = DeployableAPI.RegisterDeployableSlot(GetSnowglobeSlotLimit); CreateSnowglobeProjectile(); CreateBombProjectile(); base.Init(); } public override void Hooks() { } private void CreateSnowglobeProjectile() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0379: 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_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) snowglobeProjectilePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/DLC1/Railgunner/RailgunnerMineAltDetonated.prefab").WaitForCompletion(), "MageSnowglobePrefab", true); if (!Object.op_Implicit((Object)(object)snowglobeProjectilePrefab)) { return; } Content.AddProjectilePrefab(snowglobeProjectilePrefab); snowglobeProjectilePrefab.transform.rotation = Quaternion.identity; Deployable val = snowglobeProjectilePrefab.AddComponent(); GenericOwnership val2 = snowglobeProjectilePrefab.AddComponent(); ProjectileController component = snowglobeProjectilePrefab.GetComponent(); if ((Object)(object)component != (Object)null) { component.cannotBeDeleted = true; } SlowDownProjectiles component2 = snowglobeProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { Object.Destroy((Object)(object)component2); } SphereCollider component3 = snowglobeProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { Object.Destroy((Object)(object)component3); } GameObject gameObject = ((Component)snowglobeProjectilePrefab.transform.Find("AreaIndicator")).gameObject; if (Object.op_Implicit((Object)(object)gameObject)) { Transform val3 = gameObject.transform.Find("Sphere"); if (Object.op_Implicit((Object)(object)val3)) { MeshRenderer component4 = ((Component)val3).GetComponent(); if (Object.op_Implicit((Object)(object)component4)) { Material val4 = Object.Instantiate(Addressables.LoadAssetAsync((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/ITAssets/matITSafeWardAreaIndicator2.mat").WaitForCompletion()); val4.SetTexture("_RemapTex", Addressables.LoadAssetAsync((object)"RoR2/Base/Common/ColorRamps/texRampLunarInfection.png").WaitForCompletion()); ((Renderer)component4).sharedMaterials[1] = val4; Material val5 = Object.Instantiate(Addressables.LoadAssetAsync((object)"RoR2/Base/EliteIce/matAffixWhiteSphereExplosion.mat").WaitForCompletion()); val5.SetTexture("_RemapTex", (Texture)(object)Assets.iceNovaRampPersistent); val5.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)81, byte.MaxValue, (byte)160, (byte)55))); ((Renderer)component4).material = val5; } RotateAroundAxis component5 = ((Component)val3).GetComponent(); if (Object.op_Implicit((Object)(object)component5)) { component5.reverse = true; component5.slowRotationSpeed = 5f; } } Light componentInChildren = gameObject.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.intensity = 12f; componentInChildren.range = snowWardRadius * 2f; componentInChildren.color = Color32.op_Implicit(new Color32((byte)89, (byte)186, byte.MaxValue, byte.MaxValue)); } Transform val6 = gameObject.transform.Find("ChargeIn"); if (Object.op_Implicit((Object)(object)val6)) { ParticleSystemRenderer component6 = ((Component)val6).GetComponent(); ((Renderer)component6).material = Addressables.LoadAssetAsync((object)"RoR2/Base/Commando/matCommandoShotgunTracerCore.mat").WaitForCompletion(); } Transform val7 = gameObject.transform.Find("SoftGlow"); if (Object.op_Implicit((Object)(object)val7)) { Object.Destroy((Object)(object)((Component)val7).gameObject); } Transform val8 = gameObject.transform.Find("Core"); if (Object.op_Implicit((Object)(object)val8)) { Object.Destroy((Object)(object)((Component)val8).gameObject); } } BuffWard component7 = snowglobeProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component7)) { component7.radius = snowWardRadius; component7.buffDef = Addressables.LoadAssetAsync((object)"7f3ccdb51063fc0439ba0f7bd64c4679").WaitForCompletion(); component7.buffDuration = damageInterval * (float)chillStacksPerSnowglobe; component7.interval = damageInterval; component7.expireDuration = 9999f; component7.shape = (BuffWardShape)0; component7.invertTeamFilter = true; component7.requireGrounded = false; } } private int GetMaxSnowglobes(CharacterMaster self, int deployableCountMultiplier) { GameObject bodyObject = self.GetBodyObject(); if (Object.op_Implicit((Object)(object)bodyObject) && ElementCounter.GetPowerLevelFromBody(bodyObject, (MageElement)2) >= ElementCounter.Power.Extreme) { return maxSnowglobeUpgrade; } return maxSnowglobeBase; } private static void CreateBombProjectile() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) snowglobeDeployProjectilePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Toolbot/CryoCanisterProjectile.prefab").WaitForCompletion(), "MageSnowglobeBombProjectile"); SphereCollider component = snowglobeProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } ProjectileDamage component2 = snowglobeDeployProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.damageType.damageType = DamageTypeCombo.op_Implicit(new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageTypeExtended)0), (DamageTypeExtended)131072, (DamageSource)2)); } ProjectileImpactExplosion component3 = snowglobeDeployProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { ((ProjectileExplosion)component3).blastRadius = impactBlastRadius; ((ProjectileExplosion)component3).blastProcCoefficient = impactProcCoefficient; ((ProjectileExplosion)component3).childrenCount = 0; ((ProjectileExplosion)component3).falloffModel = (FalloffModel)2; } ProjectileController component4 = snowglobeDeployProjectilePrefab.GetComponent(); SnowglobeDeployProjectile snowglobeDeployProjectile = snowglobeDeployProjectilePrefab.AddComponent(); snowglobeDeployProjectile.snowglobeProjectilePrefab = snowglobeProjectilePrefab; snowglobeDeployProjectile.pc = component4; GameObject val = Addressables.LoadAssetAsync((object)RoR2_Junk_Mage.MageIceboltExpandedGhost_prefab).WaitForCompletion(); if ((Object)(object)val != (Object)null) { component4.ghostPrefab = val; } component4.startSound = ""; Content.AddProjectilePrefab(snowglobeDeployProjectilePrefab); } } internal class _4SolarFlareSkill : SkillBase<_4SolarFlareSkill> { public static GameObject projectilePrefab; public static GameObject missileProjectilePrefab; public static float minChargeDuration = 0.2f; public static float maxChargeDuration = 2f; public static float minSendSpeed = 5f; public static float maxSendSpeed = 25f; public static float returnSpeed = 5f; public static float returnDelay = 1.5f; public static float returnTransitionDelay = 0.5f; public static float tornadoHitFrequency = 3f; public static float tornadoDPS = 2f; public static float tornadoLifetime = 7f; public static float tornadoProcCoefficient = 0.7f; public static float tornadoRadius = 8f; public static float blastDamage = 8f; public static float blastProcCoefficient = 1f; public static float blastRadius = 14f; public static float missileDamageCoefficient = 0.8f; public static float missileProcCoefficient = 0.5f; public static float missileFireInterval = 0.5f; public override string SkillName => "Solar Flare"; public override string SkillDescription => "Resonant. Ignite. Send out a movement tracking solar flare that deals " + Tools.ConvertDecimal(tornadoDPS) + " damage over time. " + $"Dissipates after {tornadoLifetime} seconds " + "for " + Tools.ConvertDecimal(blastDamage) + " damage."; public override string TOKEN_IDENTIFIER => "STAR"; public override Type RequiredUnlock => typeof(KillBlazingWithFireUnlock); public override MageElement Element => (MageElement)1; public override Type ActivationState => typeof(ChargeSolarFlare); public override SimpleSkillData SkillData => new SimpleSkillData(1, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, cancelSprintingOnActivation: true, forceSprintingDuringState: false, dontAllowPastMaxStocks: false, fullRestockOnAssign: true, isCombatSkill: true, mustKeyPress: true); public override Sprite Icon => LoadSpriteFromBundle("solarflareAE"); public override SkillSlot SkillSlot => (SkillSlot)1; public override InterruptPriority InterruptPriority => (InterruptPriority)1; public override Type BaseSkillDef => typeof(SkillDef); public override float BaseCooldown => 8f; public override void Init() { string text = "AE_KEYWORD_RESONANTSTAR"; CommonAssets.AddResonantKeyword(text, "Coronal Mass Ejection", "If only Fire abilities are equipped, periodically launches superheated plasma for " + Language.Styling.DamageValueText(missileDamageCoefficient) + "."); CreateMissileProjectile(); CreateTornadoProjectile(); KeywordTokens = new string[2] { text, "KEYWORD_IGNITE" }; base.Init(); } private void CreateMissileProjectile() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) missileProjectilePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Common/MissileProjectile.prefab").WaitForCompletion(), "MageMassEjectionMissile", true); ProjectileDamage component = missileProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.damageType.damageType = (DamageType)128; component.damageType.damageSource = (DamageSource)0; } Content.AddProjectilePrefab(missileProjectilePrefab); } public override void Hooks() { } private void CreateTornadoProjectile() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: 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_0190: 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_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) projectilePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/LunarSkillReplacements/LunarSecondaryProjectile.prefab").WaitForCompletion(), "ArtiSolarFlareProjectile", true); Content.AddProjectilePrefab(projectilePrefab); GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_Base_Mage.MageFireboltGhost_prefab).WaitForCompletion(), "ArtiSolarFlareGhost"); if (Object.op_Implicit((Object)(object)val)) { GameObject val2 = Addressables.LoadAssetAsync((object)RoR2_Base_Grandparent.GrandParentSun_prefab).WaitForCompletion(); Transform val3 = val2.transform.Find("VfxRoot"); if (Object.op_Implicit((Object)(object)val3)) { GameObject val4 = PrefabAPI.InstantiateClone(((Component)val3).gameObject, "ArtiSolarFlareSunEffect"); val4.transform.parent = val.transform; val4.transform.localPosition = Vector3.zero; FindAndDestroy(val4.transform.Find("Mesh").Find("SunMesh"), "MoonMesh"); FindAndDestroy(val4.transform.Find("Particles"), "Sparks"); FindAndDestroy(val4.transform.Find("Particles"), "Goo, Drip"); FindAndDestroy(val4.transform.Find("Particles"), "HeatDistortionEmitter"); FindAndDestroy(val4.transform, "PP"); FindAndDestroy(val4.transform, "LightSpinner"); FindAndDestroy(val4.transform.Find("Mesh"), "AreaIndicator"); FindAndResize(val4, "Mesh", Vector3.one * 0.4f); FindAndResize(val4, "Particles", Vector3.one * 2.5f); Transform val5 = val4.transform.Find("Mesh").Find("SunMesh"); if (Object.op_Implicit((Object)(object)val5)) { MeshRenderer component = ((Component)val5).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Material val6 = Object.Instantiate(((Renderer)component).material); val6.SetTexture("_RemapTex", Addressables.LoadAssetAsync((object)"RoR2/DLC2/Scorchling/texRampScorchling.png").WaitForCompletion()); ((Renderer)component).material = val6; } } } GameObject val7 = Addressables.LoadAssetAsync((object)"RoR2/Base/WardOnLevel/WarbannerWard.prefab").WaitForCompletion(); GameObject val8 = Object.Instantiate(val7); MeshRenderer[] componentsInChildren = val8.GetComponentsInChildren(); MeshRenderer[] array = componentsInChildren; foreach (MeshRenderer val9 in array) { if (((Object)((Component)val9).gameObject).name == "IndicatorSphere") { ((Renderer)val9).material = CommonAssets.matMageFlameAura; ((Component)val9).transform.parent = val.transform; ((Component)val9).transform.localScale = Vector3.one * tornadoRadius * 2f; ((Component)val9).transform.localPosition = Vector3.zero; Material[] array2 = ((Renderer)val9).sharedMaterials; Array.Resize(ref array2, 2); array2[1] = Addressables.LoadAssetAsync((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/ITAssets/matITSafeWardAreaIndicator2.mat").WaitForCompletion(); ((Renderer)val9).sharedMaterials = array2; break; } } Object.Destroy((Object)(object)val8); } ProjectileDamage component2 = projectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.damageType = DamageTypeCombo.op_Implicit((DamageType)128); } ProjectileController component3 = projectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { if (Object.op_Implicit((Object)(object)val)) { component3.ghostPrefab = val; } SolarFlareMissileComponent solarFlareMissileComponent = projectilePrefab.AddComponent(); solarFlareMissileComponent.pc = component3; solarFlareMissileComponent.fireMissileBaseInterval = missileFireInterval; solarFlareMissileComponent.fireMissileDamageCoefficient = missileDamageCoefficient; solarFlareMissileComponent.fireMissileProcCoefficient = missileProcCoefficient; solarFlareMissileComponent.missilePrefab = missileProjectilePrefab; if (Object.op_Implicit((Object)(object)component2)) { solarFlareMissileComponent.pd = component2; } } ProjectileSimple component4 = projectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component4)) { component4.lifetime = tornadoLifetime + 1f; } ProjectileFuse component5 = projectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component5)) { component5.fuse = tornadoLifetime; } ProjectileDotZone component6 = projectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component6)) { component6.damageCoefficient = tornadoDPS / (blastDamage * tornadoHitFrequency); component6.resetFrequency = tornadoHitFrequency; component6.lifetime = tornadoLifetime; component6.overlapProcCoefficient = tornadoProcCoefficient; component6.impactEffect = Flamethrower.impactEffectPrefab; } ProjectileExplosion component7 = projectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component7)) { component7.blastDamageCoefficient = blastDamage; component7.blastProcCoefficient = blastProcCoefficient; component7.falloffModel = (FalloffModel)2; } Rigidbody component8 = projectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component8)) { component8.drag = 0f; } ProjectileRecallToOwner projectileRecallToOwner = projectilePrefab.AddComponent(); if (Object.op_Implicit((Object)(object)projectileRecallToOwner)) { projectileRecallToOwner.returnSpeed = returnSpeed; projectileRecallToOwner.delay = returnDelay; projectileRecallToOwner.transitionDuration = returnTransitionDelay; } HitBox[] componentsInChildren2 = projectilePrefab.GetComponentsInChildren(); HitBox[] array3 = componentsInChildren2; foreach (HitBox val10 in array3) { ((Component)val10).transform.localScale = Vector3.one * tornadoRadius; } static void FindAndDestroy(Transform gameObject, string name) { Transform val11 = gameObject.Find(name); if (Object.op_Implicit((Object)(object)val11) && (Object)(object)((Component)val11).gameObject != (Object)(object)gameObject) { Object.Destroy((Object)(object)((Component)val11).gameObject); } else { Debug.LogError((object)("Could not find transform [" + name + "] to destroy")); } } static void FindAndResize(GameObject gameObject, string name, Vector3 size) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) Transform val11 = gameObject.transform.Find(name); if (Object.op_Implicit((Object)(object)val11)) { val11.localScale = size; } else { Debug.LogError((object)("Could not find transform [" + name + "] to resize")); } } } } internal class _1HeatColumnSkill : SkillBase<_1HeatColumnSkill> { public static BuffDef HeatWardBuff; public static GameObject HeatWardPrefab; public static GameObject HeatWardAreaIndicator; public static float heatWardRadius = 13f; public static float heatWardDuration = 8f; public static float maxHeatRiseRate = 10f; public static float igniteDuration = 1f; public static float igniteFrequency = 0.5f; public static float igniteDamage = 1f; public override string SkillName => "Convection Current"; public override string SkillDescription => "Create a column of heat, igniting enemies inside for " + Tools.ConvertDecimal(igniteDamage / igniteFrequency) + " damage per second. Allies inside the column rise into the air while holding the Jump input."; public override string TOKEN_IDENTIFIER => "HEATCOLUMN"; public override Type RequiredUnlock => typeof(FastHellUnlock); public override MageElement Element => (MageElement)1; public override Type ActivationState => typeof(CastHeatColumn); public override SimpleSkillData SkillData => new SimpleSkillData(1, beginSkillCooldownOnSkillEnd: false, canceledFromSprinting: true); public override Sprite Icon => LoadSpriteFromBundle("risingflameAE"); public override SkillSlot SkillSlot => (SkillSlot)2; public override InterruptPriority InterruptPriority => (InterruptPriority)1; public override Type BaseSkillDef => typeof(SkillDef); public override float BaseCooldown => 16f; public override void Init() { KeywordTokens = new string[1] { "KEYWORD_IGNITE" }; CreateRisingHeatBuff(); CreateHeatWardPrefab(); base.Init(); } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown GenericCharacterMain.FixedUpdate += new hook_FixedUpdate(RiseFromHeat); } private void RiseFromHeat(orig_FixedUpdate orig, GenericCharacterMain self) { //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (((BaseCharacterMain)self).hasCharacterMotor && ((BaseCharacterMain)self).hasInputBank && ((EntityState)self).isAuthority) { CharacterBody characterBody = ((EntityState)self).characterBody; CharacterMotor characterMotor = ((EntityState)self).characterMotor; if (Object.op_Implicit((Object)(object)characterBody) && characterBody.HasBuff(HeatWardBuff) && ((EntityState)self).inputBank.jump.down) { float y = characterMotor.velocity.y; float num = Mathf.Clamp(maxHeatRiseRate * (characterBody.moveSpeed / characterBody.baseMoveSpeed), JetpackOn.hoverVelocity, maxHeatRiseRate); float num2 = ((y < 0f) ? 2f : 1f); y = Mathf.MoveTowards(y, num, JetpackOn.hoverAcceleration * ((EntityState)self).GetDeltaTime() * num2); characterMotor.velocity = new Vector3(characterMotor.velocity.x, y, characterMotor.velocity.z); } } } private void CreateRisingHeatBuff() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) HeatWardBuff = Content.CreateAndAddBuff("bdRisingHeatLift", ArtificerExtendedPlugin.iconBundle.LoadAsset("Assets/Icons/texBuffFrostbiteShield.png"), Color.yellow, canStack: false, isDebuff: false); } private void CreateHeatWardPrefab() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0226: 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_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) HeatWardAreaIndicator = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Seeker/UnseenHandAreaIndicator.prefab").WaitForCompletion(); HeatWardAreaIndicator.transform.rotation = Quaternion.identity; Material val = Object.Instantiate(Addressables.LoadAssetAsync((object)"RoR2/DLC2/Seeker/matUnseenHandAreaIndicator.mat").WaitForCompletion()); val.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)146, (byte)73, (byte)0, (byte)201))); MeshRenderer componentInChildren = HeatWardAreaIndicator.GetComponentInChildren(); ((Renderer)componentInChildren).material = val; GameObject val2 = Addressables.LoadAssetAsync((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/ITAssets/InfiniteTowerSafeWardAwaitingInteraction.prefab").WaitForCompletion(); Transform obj = val2.transform.Find("Indicator"); GameObject val3 = ((obj != null) ? ((Component)obj).gameObject : null); GameObject val4 = PrefabAPI.InstantiateClone(val3, "HeatWardIndicatorPrefab"); Material val5 = Object.Instantiate(Addressables.LoadAssetAsync((object)"RoR2/Base/WardOnLevel/matWarbannerSphereIndicator2.mat").WaitForCompletion()); val5.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)146, (byte)73, (byte)0, (byte)201))); MeshRenderer componentInChildren2 = val4.GetComponentInChildren(); ((Renderer)componentInChildren2).material = CommonAssets.matMageFlameAura; HeatWardPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/DLC1/Railgunner/RailgunnerMineAltDetonated.prefab").WaitForCompletion(), "HeatWardPrefab", true); if (!Object.op_Implicit((Object)(object)HeatWardPrefab)) { return; } Content.AddProjectilePrefab(HeatWardPrefab); HeatWardPrefab.transform.rotation = Quaternion.identity; ProjectileController component = HeatWardPrefab.GetComponent(); if ((Object)(object)component != (Object)null) { component.cannotBeDeleted = true; } SlowDownProjectiles component2 = HeatWardPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { Object.Destroy((Object)(object)component2); } SphereCollider component3 = HeatWardPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { Object.Destroy((Object)(object)component3); } GameObject gameObject = ((Component)HeatWardPrefab.transform.Find("AreaIndicator")).gameObject; if (Object.op_Implicit((Object)(object)gameObject)) { Object.Destroy((Object)(object)gameObject); } val4.transform.parent = HeatWardPrefab.transform; val4.transform.localScale = new Vector3(heatWardRadius, val4.transform.localScale.y, heatWardRadius); val4.transform.rotation = Quaternion.identity; BuffWard component4 = HeatWardPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component4)) { component4.rangeIndicator = (Object.op_Implicit((Object)(object)val3) ? val4.transform : component4.rangeIndicator); component4.radius = heatWardRadius; component4.buffDef = HeatWardBuff; component4.buffDuration = 0.5f; component4.interval = 0.5f; component4.expireDuration = heatWardDuration; component4.shape = (BuffWardShape)1; component4.invertTeamFilter = false; component4.requireGrounded = false; } if (Object.op_Implicit((Object)(object)component)) { DotWard val6 = HeatWardPrefab.AddComponent(); if (Object.op_Implicit((Object)(object)val6)) { val6.projectileController = component; val6.dotIndex = (DotIndex)1; val6.damageCoefficient = igniteDamage; ((BuffWard)val6).rangeIndicator = (Object.op_Implicit((Object)(object)val3) ? val4.transform : component4.rangeIndicator); ((BuffWard)val6).radius = heatWardRadius; ((BuffWard)val6).buffDuration = igniteDuration; ((BuffWard)val6).interval = igniteFrequency; ((BuffWard)val6).expireDuration = heatWardDuration; ((BuffWard)val6).shape = (BuffWardShape)1; ((BuffWard)val6).invertTeamFilter = true; } } } } internal class _2ThunderSkill : SkillBase { public static int totalStrikes = 8; public static float delayBetweenStrikes = 0.5f; public static float rollerVelocity = 12f; public static float thunderBlastRadius = 8f; public static GameObject magnetRollerProjectilePrefab; public static GameObject projectilePrefabThunder; public static float desiredForwardSpeedMax = 0f; private int maxCharges = 2; public override string SkillName => "Rolling Thunder"; public override string SkillDescription => "Stunning. Roll a magnetic sphere that periodically attracts lightning for " + $"{totalStrikes}x{Tools.ConvertDecimal(CastThunder.damagePerMeatball)} damage."; public override string TOKEN_IDENTIFIER => "THUNDERMEATBALLS"; public override Type RequiredUnlock => typeof(UgornsMusicUnlock); public override MageElement Element => (MageElement)3; public override Type ActivationState => typeof(CastThunder); public override SimpleSkillData SkillData => new SimpleSkillData(1, beginSkillCooldownOnSkillEnd: false, canceledFromSprinting: true); public override Sprite Icon => LoadSpriteFromBundle("thundericon"); public override SkillSlot SkillSlot => (SkillSlot)2; public override InterruptPriority InterruptPriority => (InterruptPriority)1; public override Type BaseSkillDef => typeof(SkillDef); public override float BaseCooldown => ArtificerExtendedPlugin.artiUtilCooldown; public override void Init() { KeywordTokens = new string[1] { "KEYWORD_STUNNING" }; RegisterProjectileThunder(); RegisterMagnetRoller(); base.Init(); } public override void Hooks() { } private void RegisterMagnetRoller() { //IL_0086: 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) magnetRollerProjectilePrefab = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("prefabs/projectiles/MageIcewallWalkerProjectile"), "MagnetRollerProjectile", true); ProjectileCharacterController component = magnetRollerProjectilePrefab.GetComponent(); component.lifetime = (float)totalStrikes * delayBetweenStrikes + 0.1f; component.velocity = rollerVelocity; ProjectileMageFirewallWalkerController component2 = magnetRollerProjectilePrefab.GetComponent(); component2.dropInterval = delayBetweenStrikes; component2.firePillarPrefab = projectilePrefabThunder; component2.totalProjectiles = totalStrikes; ProjectileController component3 = magnetRollerProjectilePrefab.GetComponent(); component3.ghostPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/ElectricWorm/ElectricOrbGhost.prefab").WaitForCompletion(); Content.AddProjectilePrefab(magnetRollerProjectilePrefab); } private void RegisterProjectileThunder() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_028c: 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_01a9: 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) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/ElectricWorm/ElectricOrbProjectile.prefab").WaitForCompletion(); projectilePrefabThunder = PrefabAPI.InstantiateClone(val, "ThunderProjectile", true); GameObject val2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Lightning/LightningStrikeImpact.prefab").WaitForCompletion(); GameObject val3 = PrefabAPI.InstantiateClone(val2, "ThunderImpact", false); if ((Object)(object)val3 != (Object)null) { EffectComponent component = val3.GetComponent(); component.soundName = "Play_item_use_lighningArm"; ShakeEmitter component2 = val3.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.radius = 15f; component2.duration = 0.1f; } Transform val4 = val3.transform.Find("Point Light"); if (Object.op_Implicit((Object)(object)val4)) { Debug.LogWarning((object)"Destroying thunder point light"); } Transform val5 = val3.transform.Find("Flash"); if (Object.op_Implicit((Object)(object)val5)) { Debug.LogWarning((object)"Destroying thunder flash"); Object.Destroy((Object)(object)((Component)val5).gameObject); } Transform val6 = val3.transform.Find("Flash Lines"); if (Object.op_Implicit((Object)(object)val6)) { Debug.LogWarning((object)"Destroying thunder lines"); Object.Destroy((Object)(object)((Component)val6).gameObject); } Transform val7 = val3.transform.Find("PostProcess"); if (Object.op_Implicit((Object)(object)val7)) { Debug.LogWarning((object)"Destroying thunder pp"); Object.Destroy((Object)(object)((Component)val7).gameObject); } Transform val8 = val3.transform.Find("Sphere"); if (Object.op_Implicit((Object)(object)val8)) { Debug.LogWarning((object)"Destroying thunder point light"); val8.localScale = Vector3.one * thunderBlastRadius / 4f; } Content.CreateAndAddEffectDef(val3); } ProjectileController component3 = projectilePrefabThunder.GetComponent(); component3.procCoefficient = 1f; component3.ghostPrefab = null; ProjectileDamage component4 = projectilePrefabThunder.GetComponent(); component4.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)8192, (DamageSource)4); ProjectileSimple component5 = projectilePrefabThunder.GetComponent(); component5.desiredForwardSpeed = desiredForwardSpeedMax; component5.lifetime = 10f; ProjectileImpactExplosion component6 = projectilePrefabThunder.GetComponent(); ((ProjectileExplosion)component6).childrenCount = 0; ((ProjectileExplosion)component6).bonusBlastForce = Vector3.zero; ((ProjectileExplosion)component6).blastRadius = thunderBlastRadius; ((ProjectileExplosion)component6).falloffModel = (FalloffModel)0; ((ProjectileExplosion)component6).blastProcCoefficient = 1f; component6.impactEffect = val3; float num = 0.2f; projectilePrefabThunder.transform.localScale = new Vector3(num, num, num); Content.AddProjectilePrefab(projectilePrefabThunder); Content.CreateAndAddEffectDef(val3); } } internal class _3IceSurgeSkill : SkillBase<_3IceSurgeSkill> { public static float blastDamageCoefficient = 3.5f; public static float wallDamageCoefficient = 2f; public static float baseDurationHorizontal = 1f; public static float baseDurationVertical = 1.4f; public override string TOKEN_IDENTIFIER => "ICESURGE"; public override string SkillName => "Cryoburst"; public override string SkillDescription => Language.Styling.UtilityColor("Agile") + ". " + Language.Styling.UtilityColor("Freezing") + ". Cause a glacial burst beneath you for " + Language.Styling.DamageValueText(blastDamageCoefficient) + ", launching you into the air."; public override Sprite Icon => LoadSpriteFromBundle("cryoburstAE"); public override Type ActivationState => typeof(FrostSurgeState); public override string ActivationStateMachineName => "Body"; public override Type BaseSkillDef => typeof(SkillDef); public override SkillSlot SkillSlot => (SkillSlot)2; public override float BaseCooldown => 8f; public override InterruptPriority InterruptPriority => (InterruptPriority)5; public override SimpleSkillData SkillData => new SimpleSkillData(1, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, cancelSprintingOnActivation: false, forceSprintingDuringState: false, dontAllowPastMaxStocks: false, fullRestockOnAssign: true, isCombatSkill: false, mustKeyPress: true); public override MageElement Element => (MageElement)2; public override void Init() { KeywordTokens = new string[2] { "KEYWORD_AGILE", "KEYWORD_FREEZING" }; base.Init(); } public override void Hooks() { } } internal class _1FrostbiteSkill : SkillBase { public static GameObject novaEffectPrefab = LegacyResourcesAPI.Load("prefabs/effects/impacteffects/AffixWhiteExplosion"); [AutoConfig("Frost Nova Damage Coefficient", 5f)] public static float blizzardDamageCoefficient = 5f; [AutoConfig("Frost Nova Proc Coefficient", 5f)] public static float blizzardProcCoefficient = 1f; public static float blizzardRadius = ArtificerExtendedPlugin.meleeRangeChannel; public static float novaDamageCoefficient = 5f; public static float novaProcCoefficient = 1f; public static float novaRadius = ArtificerExtendedPlugin.meleeRangeChannel; public static string frostArmorKeywordToken = "AE_KEYWORD_FROSTARMOR"; public static int bonusArmor = 100; public static int icicleCount = 3; public static float icicleDamage = 0.35f; public static int buffsForZeroMovementIncrease = 6; public static float movementIncreasePerBuff = 0.12f; public static float movementDecreasePerBuff = 0.15f; public static GameObject icicleProjectilePrefab; public static GameObject blizzardArmorVFX; public static BuffDef artiIceShield; public static BuffDef vortexEndingBuff; public static float buffInterval = 1.2f; public static int maxBuffStacks = 10; public static float maxDuration => buffInterval * (float)maxBuffStacks; public override string SkillName => "Polar Vortex"; public override string SkillDescription => "Agile. Frost. Create a blast for " + Tools.ConvertDecimal(blizzardDamageCoefficient) + " damage, then " + $"cover yourself in Frost Armor for up to {maxDuration} seconds. " + "Press again to cancel."; public override string TOKEN_IDENTIFIER => "FROSTBITE"; public override Type RequiredUnlock => typeof(AbsoluteZeroUnlock); public override MageElement Element => (MageElement)2; public override Type ActivationState => typeof(PolarVortexStart); public override SimpleSkillData SkillData => new SimpleSkillData(1, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, cancelSprintingOnActivation: false, forceSprintingDuringState: false, dontAllowPastMaxStocks: false, fullRestockOnAssign: false, isCombatSkill: true, mustKeyPress: true); public override Sprite Icon => LoadSpriteFromBundle("PolarVortexAE"); public override SkillSlot SkillSlot => (SkillSlot)3; public override InterruptPriority InterruptPriority => (InterruptPriority)1; public override Type BaseSkillDef => typeof(SkillDef); public override float BaseCooldown => 8f; public override string ActivationStateMachineName => "Body"; public override string ScepterSkillName => "Cryostasis"; public override string ScepterSkillDesc => "+100 armor, +3 frost crystals, 50% more duration per charge consumed."; public override void Init() { LanguageAPI.Add(frostArmorKeywordToken, "Frost Armor" + $"Gain +{bonusArmor} armor, " + "and Frost nearby enemies for " + $"{icicleCount}x{Tools.ConvertDecimal(icicleDamage)} damage. " + "When ending, creates a second " + Language.Styling.UtilityColor("Frost") + " blast for " + Language.Styling.DamageValueText(blizzardDamageCoefficient) + ".\nWhile armored, move up to +" + Tools.ConvertDecimal(movementIncreasePerBuff * (float)(buffsForZeroMovementIncrease - 1)) + " faster, gradually decaying to -" + Tools.ConvertDecimal(movementDecreasePerBuff * (float)(10 - buffsForZeroMovementIncrease)) + " slower. \n" + Language.Styling.UtilityColor("Frost Armor") + " disables hovering, but " + Language.Styling.UtilityColor("prevents fall damage") + "."); Content.AddEntityState(typeof(PolarVortex)); NetworkingAPI.RegisterMessageType(); NetworkingAPI.RegisterMessageType(); KeywordTokens = new string[3] { "KEYWORD_AGILE", "KEYWORD_FROST", frostArmorKeywordToken }; RegisterBuffWhiteout(); RegisterArmorEffects(); CreateIcicleProjectile(); base.Init(); } public override SkillDef ModifyScepterSkill(SkillDef scepterSkillDef) { scepterSkillDef.icon = LoadSpriteFromBundle("PolarVortexSCEPTERAE"); scepterSkillDef.fullRestockOnAssign = false; return scepterSkillDef; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(FrostArmorStats); } private void FrostArmorStats(CharacterBody sender, StatHookEventArgs args) { int buffCount = sender.GetBuffCount(artiIceShield); if (buffCount > 0) { args.armorAdd += 100f; if (ArtificerExtendedPlugin.BodyHasAncientScepterItem(sender)) { args.armorAdd += 100f; } if (buffCount < buffsForZeroMovementIncrease) { args.moveSpeedMultAdd += 0.12f * (float)(buffsForZeroMovementIncrease - buffCount); } else if (buffCount > buffsForZeroMovementIncrease) { args.moveSpeedReductionMultAdd += 0.15f * (float)(buffCount - buffsForZeroMovementIncrease); } } } private void CreateIcicleProjectile() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) icicleProjectilePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/DLC2/Seeker/SoulSpiralProjectile.prefab").WaitForCompletion(), "ArtiOrbitIcicle", true); Content.AddProjectilePrefab(icicleProjectilePrefab); GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Junk/Mage/MageIceboltExpandedGhost.prefab").WaitForCompletion(), "ArtiOrbitIcicleGhost"); AnimateShaderAlpha componentInChildren = val.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.timeMax = maxDuration; } ObjectScaleCurve componentInChildren2 = val.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren2)) { componentInChildren2.timeMax = maxDuration; } ProjectileController component = icicleProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.ghostPrefab = val; component.procCoefficient = 0.1f; } ProjectileOwnerOrbiter component2 = icicleProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.degreesPerSecond = -90f; } ProjectileDamage component3 = icicleProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { component3.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageTypeExtended)0), (DamageTypeExtended)131072, (DamageSource)8); } UnseenHandHealingProjectile component4 = icicleProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component4)) { Object.Destroy((Object)(object)component4); } ProjectileOverlapLimitHits component5 = icicleProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component5)) { Object.Destroy((Object)(object)component4); } } private void RegisterArmorEffects() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) GameObject val = LegacyResourcesAPI.Load("Prefabs/TemporaryVisualEffects/ElephantDefense"); blizzardArmorVFX = PrefabAPI.InstantiateClone(val, "ArtificerExtendedBlizzardArmor", false); RotateObject component = blizzardArmorVFX.GetComponent(); if ((Object)(object)component != (Object)null) { component.rotationSpeed = new Vector3(0f, 75f, 0f); } Material material = null; Tools.GetMaterial(blizzardArmorVFX, "ShieldMesh", Color.cyan, ref material, 2.5f, replaceAll: true); } public void RegisterBuffWhiteout() { //IL_0015: 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) artiIceShield = Content.CreateAndAddBuff("bdArtiIceShield", ArtificerExtendedPlugin.iconBundle.LoadAsset("Assets/Icons/texBuffFrostbiteShield.png"), Color.cyan, canStack: true, isDebuff: false); vortexEndingBuff = Content.CreateAndAddBuff("bdVortexEnding", null, Color.black, canStack: true, isDebuff: false); vortexEndingBuff.isHidden = true; } public void CastNova(CharacterBody self) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { EffectManager.SpawnEffect(novaEffectPrefab, new EffectData { origin = self.transform.position, scale = novaRadius }, true); BlastAttack val = new BlastAttack(); val.radius = novaRadius; val.procCoefficient = novaProcCoefficient; val.position = self.transform.position; val.attacker = ((Component)self).gameObject; val.crit = Util.CheckRoll(self.crit, self.master); val.baseDamage = self.damage * novaDamageCoefficient; val.falloffModel = (FalloffModel)2; val.baseForce = 0f; val.teamIndex = TeamComponent.GetObjectTeam(val.attacker); val.attackerFiltering = (AttackerFiltering)2; val.damageType = DamageTypeCombo.op_Implicit((DamageType)256); val.Fire(); } } } internal class CancelFrostbiteSkill : SkillBase { public override string SkillName => "Shed Ice Armor"; public override string SkillDescription => "Focus, and shed your ice armor early."; public override string TOKEN_IDENTIFIER => "CANCELICEARMOR"; public override MageElement Element => (MageElement)2; public override Type ActivationState => typeof(Idle); public override SimpleSkillData SkillData => new SimpleSkillData { requiredStock = 0, rechargeStock = 0, baseMaxStock = 0, stockToConsume = 0, fullRestockOnAssign = true, mustKeyPress = true, isCombatSkill = true }; public override Sprite Icon => LoadSpriteFromBundle("polarvortexreactivationAE"); public override SkillSlot SkillSlot => (SkillSlot)(-1); public override InterruptPriority InterruptPriority => (InterruptPriority)1; public override Type BaseSkillDef => typeof(SkillDef); public override float BaseCooldown => 8f; public override string ActivationStateMachineName => "Body"; public override void Init() { base.Init(); } public override void Hooks() { } } public abstract class SkillBase : SkillBase where T : SkillBase { public static T instance { get; private set; } public SkillBase() { if (instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting ArtificerExtended " + typeof(SkillBase).Name + " was instantiated twice"); } instance = this as T; } } public abstract class SkillBase : SharedBase { public class SimpleSkillData { internal int baseMaxStock; internal bool beginSkillCooldownOnSkillEnd; internal bool canceledFromSprinting; internal bool cancelSprintingOnActivation; internal bool forceSprintingDuringState; internal bool dontAllowPastMaxStocks; internal bool fullRestockOnAssign; internal bool isCombatSkill; internal bool mustKeyPress; internal int rechargeStock; internal int requiredStock; internal bool resetCooldownTimerOnUse; internal int stockToConsume; internal bool useAttackSpeedScaling; public SimpleSkillData(int baseMaxStock = 1, bool beginSkillCooldownOnSkillEnd = false, bool canceledFromSprinting = false, bool cancelSprintingOnActivation = true, bool forceSprintingDuringState = false, bool dontAllowPastMaxStocks = false, bool fullRestockOnAssign = true, bool isCombatSkill = true, bool mustKeyPress = false, int rechargeStock = 1, int requiredStock = 1, bool resetCooldownTimerOnUse = false, int stockToConsume = 1, bool useAttackSpeedScaling = false) { this.baseMaxStock = baseMaxStock; this.beginSkillCooldownOnSkillEnd = beginSkillCooldownOnSkillEnd; this.canceledFromSprinting = canceledFromSprinting; this.cancelSprintingOnActivation = cancelSprintingOnActivation; this.forceSprintingDuringState = forceSprintingDuringState; this.dontAllowPastMaxStocks = dontAllowPastMaxStocks; this.fullRestockOnAssign = fullRestockOnAssign; this.isCombatSkill = isCombatSkill; this.mustKeyPress = mustKeyPress; this.rechargeStock = rechargeStock; this.requiredStock = requiredStock; this.resetCooldownTimerOnUse = resetCooldownTimerOnUse; this.stockToConsume = stockToConsume; this.useAttackSpeedScaling = useAttackSpeedScaling; } } public string[] KeywordTokens; private SkillDef _SkillDef; private SkillDef _ScepterSkillDef; private int variantIndex; public UnlockableDef unlockDef; public override string BASE_TOKEN => base.BASE_TOKEN + GetElementString(Element); public override string TOKEN_PREFIX { get; } = "SKILL_"; public override AssetBundle assetBundle => ArtificerExtendedPlugin.iconBundle; public override string ConfigName => "Skills : " + SkillName; public abstract string SkillName { get; } public abstract string SkillDescription { get; } public abstract Sprite Icon { get; } public abstract Type ActivationState { get; } public abstract Type BaseSkillDef { get; } public virtual string CharacterName { get; set; } = "MageBody"; public abstract SkillSlot SkillSlot { get; } public abstract float BaseCooldown { get; } public abstract InterruptPriority InterruptPriority { get; } public abstract SimpleSkillData SkillData { get; } public virtual string ActivationStateMachineName { get; set; } = "Weapon"; public SkillDef SkillDef { get { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if ((Object)(object)_SkillDef == (Object)null) { _SkillDef = (SkillDef)ScriptableObject.CreateInstance(BaseSkillDef); } return _SkillDef; } set { _SkillDef = value; } } public SkillDef ScepterSkillDef { get { return _ScepterSkillDef; } private set { _ScepterSkillDef = value; } } public virtual string ScepterSkillName { get; } public virtual string ScepterSkillDesc { get; } public virtual Type ScepterActivationState { get; } public abstract MageElement Element { get; } private string GetElementString(MageElement type) { //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_0009: 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_000b: 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_001f: Expected I4, but got Unknown string text = ""; return (type - 1) switch { 0 => "_FIRE", 2 => "_LIGHTNING", 1 => "_ICE", _ => "_MAGIC", }; } public override void Init() { base.Init(); CreateSkill(); if (RequiredUnlock != null) { UnlockableDef val = UnlockBase.CreateUnlockDef(RequiredUnlock, Icon); if (!Bind(defaultValue: false, "Bypass Unlock")) { unlockDef = val; } } AddSkillToSkillFamily(); if (ArtificerExtendedPlugin.isScepterLoaded && ScepterSkillName != null) { CreateScepterSkill(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void CreateScepterSkill() { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) ScepterSkillDef = ArtificerExtendedPlugin.CloneSkillDef(SkillDef); ScepterSkillDef.skillNameToken = BASE_TOKEN + "_SCEPTER_NAME"; ScepterSkillDef.skillDescriptionToken = BASE_TOKEN + "_SCEPTER_DESC"; ScepterSkillDef = ModifyScepterSkill(ScepterSkillDef); LanguageAPI.Add(BASE_TOKEN + "_SCEPTER_NAME", ScepterSkillName); LanguageAPI.Add(BASE_TOKEN + "_SCEPTER_DESC", SkillDescription + "\nSCEPTER: " + ScepterSkillDesc + ""); if (ItemBase.instance.RegisterScepterSkill(ScepterSkillDef, CharacterName, SkillSlot, variantIndex)) { Content.AddSkillDef(ScepterSkillDef); } } public virtual SkillDef ModifyScepterSkill(SkillDef scepterSkillDef) { return scepterSkillDef; } public override void Lang() { LanguageAPI.Add(BASE_TOKEN + "_NAME", SkillName); LanguageAPI.Add(BASE_TOKEN + "_DESCRIPTION", SkillDescription); } public Sprite LoadSpriteFromBundle(string name) { return assetBundle.LoadAsset("Assets/Icons/" + name + ".png"); } public Sprite LoadSpriteFromRor(string path) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Addressables.LoadAssetAsync((object)path).WaitForCompletion(); } public Sprite LoadSpriteFromRorSkill(string path) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Addressables.LoadAssetAsync((object)path).WaitForCompletion().icon; } private void CreateSkill() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if ((Object)(object)SkillDef == (Object)null) { SkillDef = (SkillDef)ScriptableObject.CreateInstance(BaseSkillDef); } Content.AddEntityState(ActivationState); SkillDef.activationState = new SerializableEntityStateType(ActivationState); Object.SetName((Object)(object)SkillDef, BASE_TOKEN.ToLowerInvariant()); SkillDef.skillNameToken = BASE_TOKEN + "_NAME"; SkillDef.skillName = SkillName; SkillDef.skillDescriptionToken = BASE_TOKEN + "_DESCRIPTION"; SkillDef.activationStateMachineName = ActivationStateMachineName; SkillDef.keywordTokens = KeywordTokens; SkillDef.icon = Icon; SkillDef.baseRechargeInterval = Bind(BaseCooldown, "Base Cooldown"); SkillDef.attackSpeedBuffsRestockSpeed = Bind(SkillData.useAttackSpeedScaling, "Scale Cooldown With Attack Speed"); SkillDef.baseMaxStock = Bind(SkillData.baseMaxStock, "Base Max Stock"); SkillDef.rechargeStock = Mathf.Min(Bind(SkillData.rechargeStock, "Recharge Stock"), SkillDef.baseMaxStock); SkillDef.interruptPriority = InterruptPriority; SkillDef.beginSkillCooldownOnSkillEnd = SkillData.beginSkillCooldownOnSkillEnd; SkillDef.dontAllowPastMaxStocks = SkillData.dontAllowPastMaxStocks; SkillDef.fullRestockOnAssign = SkillData.fullRestockOnAssign; SkillDef.isCombatSkill = Bind(SkillData.isCombatSkill, "Is Combat Skill"); SkillDef.mustKeyPress = Bind(SkillData.mustKeyPress, "Must Key Press", "Setting to FALSE will allow the skill to be recast after it ends as long as the button is held."); SkillDef.requiredStock = SkillData.requiredStock; SkillDef.resetCooldownTimerOnUse = SkillData.resetCooldownTimerOnUse; SkillDef.stockToConsume = SkillData.stockToConsume; SkillDef.cancelSprintingOnActivation = Bind(SkillData.cancelSprintingOnActivation, "Cancels Sprinting", "Recommended to use HuntressBuffULTIMATE for intended behavior."); SkillDef.forceSprintDuringState = Bind(SkillData.forceSprintingDuringState, "Force Sprinting During State", "Used by mobility skills."); SkillDef.canceledFromSprinting = !ArtificerExtendedPlugin.autosprintLoaded && SkillData.cancelSprintingOnActivation && !SkillData.forceSprintingDuringState && Bind(SkillData.canceledFromSprinting, "Canceled From Sprinting", "Note: Only set to true if AUTOSPRINT isnt loaded, the skill cancels sprinting, and the skill doesn't force sprinting. This avoids situations where the skill can cancel itself without additional input."); Content.AddSkillDef(SkillDef); } protected void AddSkillToSkillFamily() { //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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected I4, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: 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_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown //IL_01b6: 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) if (string.IsNullOrEmpty(CharacterName)) { return; } string text = Log.Combine("Skills", SkillName); string characterName = CharacterName; SkillLocator val; if (ArtificerExtended.Modules.Skills.characterSkillLocators.ContainsKey(characterName)) { val = ArtificerExtended.Modules.Skills.characterSkillLocators[characterName]; } else { GameObject val2 = LegacyResourcesAPI.Load("prefabs/characterbodies/" + characterName); val = ((val2 != null) ? val2.GetComponent() : null); if (Object.op_Implicit((Object)(object)val)) { ArtificerExtended.Modules.Skills.characterSkillLocators.Add(characterName, val); } } if ((Object)(object)val != (Object)null) { SkillFamily val3 = null; SkillSlot skillSlot = SkillSlot; SkillSlot val4 = skillSlot; switch (val4 - -1) { case 1: val3 = val.primary.skillFamily; break; case 2: val3 = val.secondary.skillFamily; break; case 3: val3 = val.utility.skillFamily; break; case 4: val3 = val.special.skillFamily; break; case 0: Log.Warning(text + "Special case!"); break; } if ((Object)(object)val3 != (Object)null) { Log.Debug(text + "initializing!"); variantIndex = val3.variants.Length; Array.Resize(ref val3.variants, variantIndex + 1); Variant[] variants = val3.variants; int num = variantIndex; Variant val5 = new Variant { skillDef = SkillDef, unlockableDef = unlockDef }; ((Variant)(ref val5)).viewableNode = new Node(SkillDef.skillNameToken, false, (Node)null); variants[num] = val5; Log.Debug(text + "success!"); } else { Log.Error(text + "No skill family " + ((object)SkillSlot/*cast due to .constrained prefix*/).ToString() + " found from " + CharacterName); } } else { Log.Error(text + "No skill locator found from " + CharacterName); } } internal UnlockableDef GetUnlockDef(Type type) { return null; } } } namespace ArtificerExtended.Passive { public class AltArtiPassive : BaseState { public class BatchHandle { public List handledProjectiles = new List(); public void Fire(float minDelay, float maxDelay) { foreach (ProjectileData handledProjectile in handledProjectiles) { handledProjectile.batchTriggered = true; handledProjectile.timerMin = minDelay; handledProjectile.timerMax = maxDelay; } } } public class ProjectileData { public bool hasBatch; public bool batchTriggered; public bool timerAssigned; public bool radiusAssigned; public float timer; public float timerMin = -0.05f; public float timerMax = 0.05f; public Vector3 localPos; public int type; public float rotation; public BatchHandle handle; private readonly InstancedRandom random; public ProjectileData(InstancedRandom random, BatchHandle handle = null) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) this.random = random; type = Mathf.FloorToInt(this.random.Range(0f, lightningSwordEffectCount - 1)); rotation = this.random.Range(0f, 360f); localPos = this.random.InsideUnitSphere(); timerAssigned = true; if (handle != null) { hasBatch = true; batchTriggered = false; handle.handledProjectiles.Add(this); this.handle = handle; timerAssigned = false; } } public void AssignTimer() { if (!timerAssigned) { timer = random.Range(timerMin, timerMax); timerAssigned = true; } } public void AssignRadius(float radius) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) if (!radiusAssigned) { localPos *= radius; radiusAssigned = true; } } } private class ProjectileNode { private int type = -1; public Transform location; public List queue; public float fireTime; public float fireRadius; private float timer = 0f; public ProjectileData nextProj; private GameObject effectInstance; private readonly AltArtiPassive passive; public int GetProjType() { if (type >= 0) { return type; } return 0; } public ProjectileNode(Vector3 position, Transform parent, AltArtiPassive passive) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) location = new GameObject("ProjNode").transform; location.parent = parent; location.localPosition = position; location.localRotation = Quaternion.identity; location.localScale = Vector3.one; queue = new List(); fireRadius = 0.25f; fireTime = 0.65f; this.passive = passive; } public void AddToQueue(ProjectileData data) { queue.Add(data); } public void AddImmediate(ProjectileData data) { if (nextProj != null) { queue.Insert(0, nextProj); } nextProj = data; nextProj.AssignRadius(fireRadius); CreateEffect(nextProj); } public void UpdateNode(float deltaT, HurtBox target, Vector3 direction) { //IL_008a: 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_0090: 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_0096: Unknown result type (might be due to invalid IL or missing references) if (nextProj == null) { nextProj = TryGetNextProj(); if (nextProj == null) { ClearPreFire(); queue.Clear(); return; } } if (!Object.op_Implicit((Object)(object)effectInstance)) { return; } if (!effectInstance.activeSelf) { effectInstance.SetActive(true); } effectInstance.transform.rotation = Quaternion.AngleAxis(nextProj.rotation, direction) * Util.QuaternionSafeLookRotation(direction); if (!nextProj.timerAssigned) { if (nextProj.hasBatch && !nextProj.batchTriggered) { return; } nextProj.AssignTimer(); } timer += deltaT; if (timer >= fireTime + nextProj.timer) { Fire(target); } } private ProjectileData TryGetNextProj() { if (queue.Count <= 0) { return null; } ProjectileData projectileData = queue[0]; queue.RemoveAt(0); if (projectileData != null) { projectileData.AssignTimer(); projectileData.AssignRadius(fireRadius); CreateEffect(projectileData); } return projectileData; } private void Fire(HurtBox target) { //IL_001b: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_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_00dc: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)passive).isAuthority) { ProjectileManager.instance.FireProjectile(new FireProjectileInfo { crit = ((EntityState)passive).characterBody.RollCrit(), damage = ((EntityState)passive).characterBody.damage * lightningDamageMult, damageColorIndex = (DamageColorIndex)0, force = lightningForce, owner = ((EntityState)passive).gameObject, position = effectInstance.transform.position, procChainMask = default(ProcChainMask), projectilePrefab = lightningProjectile[GetProjType()], rotation = effectInstance.transform.rotation, target = ((target != null) ? ((Component)target).gameObject : null) }); } ClearPreFire(); nextProj = null; } private void ClearPreFire() { timer = 0f; if (Object.op_Implicit((Object)(object)effectInstance)) { effectInstance.SetActive(false); } } private void CreateEffect(ProjectileData proj) { //IL_0075: 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_00a2: Unknown result type (might be due to invalid IL or missing references) if (type == -1) { type = proj.type; } if ((Object)(object)effectInstance == (Object)null) { effectInstance = Object.Instantiate(lightningPreFireEffect[GetProjType()], location); } if (!effectInstance.activeSelf) { effectInstance.SetActive(true); } effectInstance.transform.localScale = Vector3.one; effectInstance.transform.localPosition = proj.localPos; effectInstance.transform.localRotation = Quaternion.identity; } } public const float nanoBombInterval = 0.5f; private const float nanoBombMinDelay = 0.3f; private const float nanoBombMaxDelay = 0.7f; private const float prepWallMaxDelay = 0.3f; private const float prepWallMinDelay = 0.7f; private const float flamethrowerInterval = 0.5f; private const int nanoBombMaxPerTick = 10; private const int flamethrowerMaxPerTick = 10; private const float nodeYOffset = 1.6f; private const float nodeArcFrac = 0.6f; private const float nodeMinRadius = 1.15f; private const float nodeMaxRadius = 1.6f; private const float nodeFireRadius = 0.25f; private const float nodeFireRate = 0.65f; private const float nodeFireMin = -0.05f; private const float nodeFireMax = 0.05f; private const int nodesToCreate = 24; public static int lightningSwordEffectCount = 1; public static float lightningDamageMult = 0.3f; public static float lightningBlastDamageMult = 1f; public static float lightningForce = 100f; public static float lightningProcCoef = 0.2f; public static float meltAspdIncrease = 0.025f; public static int burnBuffMaxStacks = 100; public static float burnBuffDurationBase = 4f; public static float burnBuffDurationStack = -0.6f; public static float slowProcChance = 1f; public static float freezeProcCount = 3f; public static float chillProcDuration = 8f; public static float novaMaxRadius = 8f; public static float novaMinRadius = 3f; public static float novaRadiusPerPower = 1.5f; public static float novaBaseDamage = 3.8f; public static float targetUpdateFreq = 5f; public static float targetRange = 60f; public static float targetAng = 40f; public static BuffIndex fireBuff; public static GameObject[] lightningProjectile; public static GameObject[] lightningPreFireEffect; public static GameObject iceBlast; public static Dictionary instanceLookup = new Dictionary(); private float searchTimer = 0f; public ElementCounter elementPower; private InstancedRandom random; private Transform modelTransform; private HurtBox target; private readonly List projNodes = new List(); private readonly BullseyeSearch search = new BullseyeSearch(); public CharacterBody ext_characterBody => ((EntityState)this).characterBody; public float ext_attackSpeedStat => ((EntityState)this).characterBody.attackSpeed; public float ext_nanoBombInterval => 0.5f; public float ext_nanoBombMinDelay => 0.3f; public float ext_nanoBombMaxDelay => 0.7f; public float ext_prepWallMinDelay => 0.7f; public float ext_prepWallMaxDelay => 0.3f; public float ext_flamethrowerInterval => 0.5f; public int ext_nanoBombMaxPerTick => 10; public int ext_flamethrowerMaxPerTick => 10; public void SkillCast(BatchHandle handle = null, bool isFire = false) { if ((Object)(object)elementPower == (Object)null) { Debug.Log((object)"Energetic Resonance passive has no element counter component!"); return; } DoLightning(elementPower.lightningPower, handle); if (isFire) { DoFire(elementPower.firePower); } } public static void DoArcticBlast(CharacterBody attacker, ElementCounter.Power currentPower, Vector3 position, bool isCrit, int strength = 6) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)attacker == (Object)null) && currentPower != ElementCounter.Power.None && strength != 0) { float num = (float)currentPower; float num2 = Util.Remap((float)strength, 0f, 6f, novaMinRadius, novaMaxRadius); float procCoefficient = 0.8f - 0.1f * (float)currentPower; CreateIceBlast(attacker, 0f, attacker.damage * novaBaseDamage, procCoefficient, num + num2, isCrit, position, (DamageSource)0); } } private void DoLightning(ElementCounter.Power power, BatchHandle handle) { for (int i = 0; i < (int)power; i++) { ProjectileData proj = new ProjectileData(random, handle); AddProjectileToRandomNode(proj, handle != null); } } private void DoFire(ElementCounter.Power power) { if (NetworkServer.active) { for (int i = 0; i < (int)power; i++) { ((EntityState)this).characterBody.AddTimedBuff(CommonAssets.meltBuff, burnBuffDurationBase + burnBuffDurationStack * (float)(power - 1), burnBuffMaxStacks); } } } public static void CreateIceBlast(CharacterBody attackerBody, float baseForce, float damage, float procCoefficient, float radius, bool crit, Vector3 blastPosition, DamageSource damageSource = (DamageSource)0) { //IL_000e: 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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { FrostUtilsModule.ApplyChillSphere(blastPosition, radius, attackerBody.teamComponent.teamIndex, 6f, 3f); GameObject val = Object.Instantiate(FrostUtilsModule.iceExplosion, blastPosition, Quaternion.identity); val.transform.localScale = new Vector3(radius, radius, radius); DelayBlast component = val.GetComponent(); component.maxTimer += Random.Range(-0.1f, 0.1f); component.position = blastPosition; component.baseDamage = damage; component.procCoefficient = procCoefficient; component.attacker = ((Component)attackerBody).gameObject; component.radius = radius; component.damageType = DamageTypeCombo.op_Implicit((DamageTypeExtended)131072); component.falloffModel = (FalloffModel)2; val.GetComponent().teamIndex = attackerBody.teamComponent.teamIndex; component.explosionEffect = FrostUtilsModule.GetIceBlastEffect(false); NetworkServer.Spawn(val); } } private void GenerateNodes() { //IL_006e: 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_0075: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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) Vector3 val = default(Vector3); for (int i = 0; i < 24; i++) { float num = random.Value(); float num2 = random.Value(); float num3 = 1.15f + num2 * 0.45000005f; float num4 = num - 0.5f; num4 *= MathF.PI * 2f; num4 *= 0.6f; float num5 = Mathf.Sin(num4); float num6 = Mathf.Cos(num4); ((Vector3)(ref val))..ctor(num5, num6, 0f); val = Vector3.Normalize(val); val *= num3; val += new Vector3(0f, 1.6f, 0f); projNodes.Add(new ProjectileNode(val, modelTransform, this)); } } private HurtBox GetTarget() { //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_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); search.teamMaskFilter = TeamMask.all; ((TeamMask)(ref search.teamMaskFilter)).RemoveTeam(((EntityState)this).teamComponent.teamIndex); search.filterByLoS = true; search.searchOrigin = ((Ray)(ref aimRay)).origin; search.searchDirection = ((Ray)(ref aimRay)).direction; search.sortMode = (SortMode)2; search.maxDistanceFilter = targetRange; search.maxAngleFilter = targetAng; search.RefreshCandidates(); return search.GetResults().FirstOrDefault(); } private void AddProjectileToRandomNode(ProjectileData proj, bool immediate) { List list = new List(); for (int i = 0; i < projNodes.Count; i++) { list.Add(projNodes[i].queue.Count + ((projNodes[i].nextProj != null) ? 5 : 0)); } int num = list.Min(); List list2 = new List(); for (int j = 0; j < list.Count; j++) { if (list[j] == num) { list2.Add(j); } } int index = 0; if (list2.Count > 1) { index = list2[Mathf.FloorToInt(random.Range(0f, list2.Count))]; } if (immediate) { projNodes[index].AddImmediate(proj); } else { projNodes[index].AddToQueue(proj); } } public override void OnEnter() { //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) ((BaseState)this).OnEnter(); NetworkInstanceId netId = ((NetworkBehaviour)((EntityState)this).characterBody).netId; random = new InstancedRandom((int)((NetworkInstanceId)(ref netId)).Value); modelTransform = ((EntityState)this).GetModelTransform(); instanceLookup[((EntityState)this).gameObject] = this; elementPower = ((Component)((EntityState)this).characterBody).gameObject.GetComponent(); if ((Object)(object)elementPower == (Object)null) { Debug.Log((object)"Energetic Resonance passive failed to find an element counter component!"); } GenerateNodes(); } public override void Update() { ((EntityState)this).Update(); } public override void FixedUpdate() { //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_0058: 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_0081: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); float fixedDeltaTime = Time.fixedDeltaTime; searchTimer += fixedDeltaTime; if (searchTimer >= 1f / targetUpdateFreq) { target = GetTarget(); searchTimer = 0f; } Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; foreach (ProjectileNode projNode in projNodes) { projNode.UpdateNode(fixedDeltaTime, target, direction); } } public override void OnExit() { if (instanceLookup.ContainsKey(((EntityState)this).gameObject)) { instanceLookup.Remove(((EntityState)this).gameObject); } ((EntityState)this).OnExit(); } } public class PassiveSkillDef : SkillDef { public struct StateMachineDefaults { public string machineName; public SerializableEntityStateType initalState; public SerializableEntityStateType mainState; public SerializableEntityStateType defaultInitalState; public SerializableEntityStateType defaultMainState; } public StateMachineDefaults[] stateMachineDefaults; public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { //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_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) //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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) EntityStateMachine[] components = ((Component)skillSlot).GetComponents(); StateMachineDefaults[] array = this.stateMachineDefaults; for (int i = 0; i < array.Length; i++) { StateMachineDefaults stateMachineDefaults = array[i]; EntityStateMachine[] array2 = components; foreach (EntityStateMachine val in array2) { if (val.customName == stateMachineDefaults.machineName) { val.initialStateType = stateMachineDefaults.initalState; val.mainStateType = stateMachineDefaults.mainState; Type type = ((object)val.state).GetType(); SerializableEntityStateType defaultMainState = stateMachineDefaults.defaultMainState; if (type == ((SerializableEntityStateType)(ref defaultMainState)).stateType) { SerializableEntityStateType mainState = stateMachineDefaults.mainState; val.SetNextState(EntityStateCatalog.InstantiateState(ref mainState)); } break; } } } return ((SkillDef)this).OnAssigned(skillSlot); } public override void OnUnassigned([NotNull] GenericSkill skillSlot) { //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_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) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) EntityStateMachine[] components = ((Component)skillSlot).GetComponents(); StateMachineDefaults[] array = this.stateMachineDefaults; for (int i = 0; i < array.Length; i++) { StateMachineDefaults stateMachineDefaults = array[i]; EntityStateMachine[] array2 = components; foreach (EntityStateMachine val in array2) { if (!(val.customName == stateMachineDefaults.machineName)) { continue; } val.initialStateType = stateMachineDefaults.defaultInitalState; val.mainStateType = stateMachineDefaults.defaultMainState; if (val.state != null) { Type type = ((object)val.state).GetType(); SerializableEntityStateType mainState = stateMachineDefaults.mainState; if (type == ((SerializableEntityStateType)(ref mainState)).stateType) { SerializableEntityStateType defaultMainState = stateMachineDefaults.defaultMainState; val.SetNextState(EntityStateCatalog.InstantiateState(ref defaultMainState)); } } break; } } ((SkillDef)this).OnUnassigned(skillSlot); } } } namespace ArtificerExtended.Properties { [GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [DebuggerNonUserCode] [CompilerGenerated] internal class Resources { private static ResourceManager resourceMan; private static CultureInfo resourceCulture; [EditorBrowsable(EditorBrowsableState.Advanced)] internal static ResourceManager ResourceManager { get { if (resourceMan == null) { ResourceManager resourceManager = new ResourceManager("ArtificerExtended.Properties.Resources", typeof(Resources).Assembly); resourceMan = resourceManager; } return resourceMan; } } [EditorBrowsable(EditorBrowsableState.Advanced)] internal static CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } internal static byte[] artiskillicons { get { object obj = ResourceManager.GetObject("artiskillicons", resourceCulture); return (byte[])obj; } } internal Resources() { } } } namespace ArtificerExtended.Helpers { public class InstancedRandom { private State localState; private State globalState; public InstancedRandom(int seed) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) globalState = Random.state; Random.InitState(seed); localState = Random.state; Random.state = globalState; } public Vector2 InsideUnitCircle() { //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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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) CacheState(); Vector2 insideUnitCircle = Random.insideUnitCircle; RestoreState(); return insideUnitCircle; } public Vector3 InsideUnitSphere() { //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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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) CacheState(); Vector3 insideUnitSphere = Random.insideUnitSphere; RestoreState(); return insideUnitSphere; } public Vector3 OnUnitSphere() { //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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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) CacheState(); Vector3 onUnitSphere = Random.onUnitSphere; RestoreState(); return onUnitSphere; } public Quaternion Rotation() { //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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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) CacheState(); Quaternion rotation = Random.rotation; RestoreState(); return rotation; } public Quaternion RotationUniform() { //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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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) CacheState(); Quaternion rotationUniform = Random.rotationUniform; RestoreState(); return rotationUniform; } public float Value() { CacheState(); float value = Random.value; RestoreState(); return value; } public float Range(float min, float max) { CacheState(); float result = Random.Range(min, max); RestoreState(); return result; } public Color ColorHSV() { //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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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) CacheState(); Color result = Random.ColorHSV(); RestoreState(); return result; } public Color ColorHSV(float hueMin, float hueMax) { //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) //IL_0017: 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_001b: Unknown result type (might be due to invalid IL or missing references) CacheState(); Color result = Random.ColorHSV(hueMin, hueMax); RestoreState(); return result; } public Color ColorHSV(float hueMin, float hueMax, float saturationMin, float saturationMax) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) CacheState(); Color result = Random.ColorHSV(hueMin, hueMax, saturationMin, saturationMax); RestoreState(); return result; } public Color ColorHSV(float hueMin, float hueMax, float saturationMin, float saturationMax, float valueMin, float valueMax) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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_001f: 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) CacheState(); Color result = Random.ColorHSV(hueMin, hueMax, saturationMin, saturationMax, valueMin, valueMax); RestoreState(); return result; } public Color ColorHSV(float hueMin, float hueMax, float saturationMin, float saturationMax, float valueMin, float valueMax, float alphaMin, float alphaMax) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) CacheState(); Color result = Random.ColorHSV(hueMin, hueMax, saturationMin, saturationMax, valueMin, valueMax, alphaMin, alphaMax); RestoreState(); return result; } private void CacheState() { //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_000d: Unknown result type (might be due to invalid IL or missing references) globalState = Random.state; Random.state = localState; } private void RestoreState() { //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_000d: Unknown result type (might be due to invalid IL or missing references) localState = Random.state; Random.state = globalState; } } } namespace ArtificerExtended.Modules { public static class CommonAssets { private static AssetBundle _mainAssetBundle; public static string dropPrefabsPath = "Assets/Models/DropPrefabs"; public static string iconsPath = "Assets/Textures/Icons/"; public static string eliteMaterialsPath = "Assets/Textures/Materials/Elite/"; public static Material matMageFlameAura; public static float chainLightningZapDistance = 25f; public static float chainLightningZapDamageFraction = 1f; public static float chainLightningZapDamageCoefficient = 0.2f; public static ModdedDamageType ChainLightningDamageType; public static BuffDef meltBuff; public static string meltKeywordToken = "AE_KEYWORD_RESONANTMELT"; public static string arcticBlastKeywordToken = "AE_KEYWORD_RESONANTARCTICBLAST"; public static string lightningBoltKeywordToken = "AE_KEYWORD_RESONANTBOLTS"; public static string magePassiveDescToken = "MAGE_PASSIVE_ENERGY_DESC"; public static string lavaPoolKeywordToken = "AE_KEYWORD_LAVAPOOLS"; public static float napalmFireFrequency = 2f; public static float napalmDamageCoefficient = 0.5f; public static float napalmDuration = 3f; public static float napalmProcCoefficient = 0.25f; public static float lavaPoolSize = 3f; public static GameObject lavaPoolPrefab; public static GameObject lavaProjectilePrefab; public static GameObject lavaImpactEffect; public static AssetBundle mainAssetBundle { get { if ((Object)(object)_mainAssetBundle == (Object)null) { _mainAssetBundle = Assets.LoadAssetBundle("itmightbebad"); } return _mainAssetBundle; } set { _mainAssetBundle = value; } } public static void AddResonantKeyword(string keywordToken, string resonantAbilityName, string resonantDesc) { LanguageAPI.Add(keywordToken, "Resonance: " + resonantAbilityName + "" + resonantDesc + ""); } public static void Init() { CreateZapDamageType(); AddAAPassiveBuffs(); AddAAKeywords(); CreateLavaPool(); CreateLavaImpactEffect(); CreateLavaProjectile(); CreateLightningPreFire(); CreateLightningSwords(); CreateFlameAuraMaterial(); } private static void CreateFlameAuraMaterial() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) matMageFlameAura = Object.Instantiate(Addressables.LoadAssetAsync((object)"RoR2/Base/WardOnLevel/matWarbannerSphereIndicator2.mat").WaitForCompletion()); ((Object)matMageFlameAura).name = "matMageFlameAura"; matMageFlameAura.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)146, (byte)73, (byte)0, (byte)201))); matMageFlameAura.SetFloat("_RimPower", 2f); matMageFlameAura.SetFloat("_RimStrength", 0.58f); } public static void CreateNebulaOrbitals() { GameObject val = LegacyResourcesAPI.Load("prefabs/networkedobjects/teleporters/Teleporter1"); if (!((Object)(object)val != (Object)null)) { return; } List list = new List(); int num = 0; FlickerLight[] componentsInChildren = val.GetComponentsInChildren(); foreach (FlickerLight val2 in componentsInChildren) { Debug.Log((object)((Object)((Component)val2).gameObject).name); if (((Object)((Component)val2).gameObject).name == "SmallOrb") { GameObject item = PrefabAPI.InstantiateClone(((Component)val2).gameObject, "NebulaOrb" + num, false); num++; list.Add(item); } } Debug.Log((object)list.Count); } private static void CreateLightningPreFire() { AltArtiPassive.lightningPreFireEffect = (GameObject[])(object)new GameObject[AltArtiPassive.lightningSwordEffectCount]; for (int i = 0; i < AltArtiPassive.lightningPreFireEffect.Length; i++) { GameObject val = CreateLightningSwordGhost(i, isPreFire: true); Object.Destroy((Object)(object)val.GetComponent()); AltArtiPassive.lightningPreFireEffect[i] = val; } } internal static void CreateLightningSwords() { AltArtiPassive.lightningProjectile = (GameObject[])(object)new GameObject[AltArtiPassive.lightningSwordEffectCount]; for (int i = 0; i < AltArtiPassive.lightningProjectile.Length; i++) { CreateLightningSword(i); } } private static void CreateLightningSword(int meshInd) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_018e: 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_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: 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) GameObject ghostPrefab = CreateLightningSwordGhost(meshInd); GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("Prefabs/Projectiles/LunarNeedleProjectile"), "LightningSwordProjectile" + meshInd, true); NetworkIdentity component = val.GetComponent(); component.localPlayerAuthority = true; ProjectileDamage component2 = val.GetComponent(); component2.damage = 1f; component2.damageType = DamageTypeCombo.op_Implicit((DamageTypeExtended)8192); ProjectileController component3 = val.GetComponent(); component3.ghostPrefab = ghostPrefab; component3.procCoefficient = AltArtiPassive.lightningProcCoef; component3.allowPrediction = true; ProjectileSimple component4 = val.GetComponent(); ((Behaviour)component4).enabled = true; component4.enableVelocityOverLifetime = false; component4.desiredForwardSpeed = 80f; ProjectileDirectionalTargetFinder component5 = val.GetComponent(); ((Behaviour)component5).enabled = true; component5.lookRange = 150f; component5.lookCone = 25f; ProjectileSteerTowardTarget component6 = val.GetComponent(); ((Behaviour)component6).enabled = true; component6.rotationSpeed = 120f; ProjectileStickOnImpact component7 = val.GetComponent(); Object.Destroy((Object)(object)component7); ProjectileImpactExplosion component8 = val.GetComponent(); component8.impactEffect = LegacyResourcesAPI.Load("Prefabs/Effects/LightningStakeNova"); ((ProjectileExplosion)component8).explosionSoundString = "Play_item_proc_dagger_impact"; component8.lifetimeExpiredSoundString = ""; component8.offsetForLifetimeExpiredSound = 0f; component8.destroyOnEnemy = true; component8.destroyOnWorld = true; ((ProjectileExplosion)component8).falloffModel = (FalloffModel)0; component8.lifetime = 10f; component8.lifetimeRandomOffset = 0f; ((ProjectileExplosion)component8).blastRadius = 0.1f; ((ProjectileExplosion)component8).blastDamageCoefficient = AltArtiPassive.lightningBlastDamageMult; ((ProjectileExplosion)component8).blastProcCoefficient = AltArtiPassive.lightningProcCoef; ((ProjectileExplosion)component8).bonusBlastForce = Vector3.zero; ((ProjectileExplosion)component8).fireChildren = false; ((ProjectileExplosion)component8).childrenProjectilePrefab = null; ((ProjectileExplosion)component8).childrenCount = 0; ((ProjectileExplosion)component8).childrenDamageCoefficient = 0f; ((ProjectileExplosion)component8).minAngleOffset = Vector3.zero; ((ProjectileExplosion)component8).maxAngleOffset = Vector3.zero; component8.transformSpace = (TransformSpace)0; ((ProjectileExplosion)component8).projectileHealthComponent = null; ModdedDamageTypeHolderComponent val2 = val.AddComponent(); val2.Add(ChainLightningDamageType); val.AddComponent().sound = "Play_item_proc_dagger_spawn"; Object.Destroy((Object)(object)val.GetComponent()); Object.Destroy((Object)(object)val.GetComponent()); Content.AddProjectilePrefab(val); AltArtiPassive.lightningProjectile[meshInd] = val; } internal static GameObject CreateLightningSwordGhost(int meshInd, bool isPreFire = false) { //IL_0082: 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_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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("Prefabs/ProjectileGhosts/ElectricWormSeekerGhost"), "LightningBolt" + (isPreFire ? "Prefire" : "ProjectileGhost") + meshInd, false); GameObject gameObject = ((Component)val.transform.Find("mdlRock")).gameObject; GameObject gameObject2 = ((Component)val.transform.Find("Trail")).gameObject; TrailRenderer component = gameObject2.GetComponent(); gameObject2.SetActive(false); gameObject.SetActive(true); Object.Destroy((Object)(object)gameObject.GetComponent()); Color startColor = component.startColor; Color endColor = component.endColor; Assets.DoMesh(gameObject, meshInd, startColor, endColor); Object.Instantiate(((Renderer)component).material); ((Renderer)gameObject.GetComponent()).material = ((Renderer)component).material; return val; } public static void CreateZapDamageType() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) ChainLightningDamageType = DamageAPI.ReserveDamageType(); } private static void AddAAPassiveBuffs() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: 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) meltBuff = Content.CreateAndAddBuff("bdResonanceMelt", Addressables.LoadAssetAsync((object)"RoR2/DLC1/StrengthenBurn/texBuffStrongerBurnIcon.tif").WaitForCompletion(), new Color(0.9f, 0.4f, 0.2f), canStack: true, isDebuff: false); } private static void AddAAKeywords() { LanguageAPI.Add(magePassiveDescToken, "- " + Language.Styling.DamageColor("FIRE Resonance") + " increases " + Language.Styling.UtilityColor("Incinerate") + " intensity.\n- " + Language.Styling.DamageColor("ICE Resonance") + " increases " + Language.Styling.UtilityColor("Arctic Blast") + " range.\n- " + Language.Styling.DamageColor("LIGHTNING Resonance") + " increases " + Language.Styling.UtilityColor("Lightning Bolts") + " fired."); AddResonantKeyword(meltKeywordToken, "Incinerate", "On " + Language.Styling.UtilityColor("FIRE SKILL Cast") + ", gain 1 stack of " + Language.Styling.UtilityColor("Incinerate") + " for each " + Language.Styling.DamageColor("Fire") + " ability equipped. " + Language.Styling.UtilityColor("Incinerate") + " increases " + Language.Styling.DamageColor("attack speed") + " on ALL skills by " + Language.Styling.DamageColor(Tools.ConvertDecimal(AltArtiPassive.meltAspdIncrease)) + " per stack."); AddResonantKeyword(arcticBlastKeywordToken, "Arctic Blast", "On " + Language.Styling.UtilityColor("Freezing") + " or " + Language.Styling.UtilityColor("killing Frosted enemies") + ", cause a " + Language.Styling.UtilityColor("Frost") + " blast that extends " + Language.Styling.UtilityColor(AltArtiPassive.novaRadiusPerPower + "m") + " for each " + Language.Styling.DamageColor("Ice") + " ability equipped. " + Language.Styling.UtilityColor("Arctic Blasts") + " deal " + Language.Styling.DamageValueText(AltArtiPassive.novaBaseDamage) + " to nearby enemies."); AddResonantKeyword(lightningBoltKeywordToken, "Lightning Bolts", "On " + Language.Styling.UtilityColor("ANY SKILL Cast") + ", fire a spear of energy for each " + Language.Styling.DamageColor("Lightning") + " ability equipped. Each " + Language.Styling.UtilityColor("Lightning Bolt") + " seeks out enemies in front of you for " + Language.Styling.DamageColor("2x" + Tools.ConvertDecimal(AltArtiPassive.lightningDamageMult) + " damage") + "."); } private static void CreateLavaImpactEffect() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_0047: 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) //IL_0079: 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_00ab: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)RoR2_Base_BeetleQueen.BeetleSpitExplosion_prefab).WaitForCompletion(); lavaImpactEffect = PrefabAPI.InstantiateClone(val, "LavaPoolImpact", false); Color color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)40, (byte)0, byte.MaxValue)); Tools.GetParticle(lavaImpactEffect, "Bugs", Color.clear); Tools.GetParticle(lavaImpactEffect, "Flames", color); Tools.GetParticle(lavaImpactEffect, "Flash", Color.yellow); Tools.GetParticle(lavaImpactEffect, "Distortion", color); Tools.GetParticle(lavaImpactEffect, "Ring, Mesh", Color.yellow); Transform val2 = lavaImpactEffect.transform.Find("Distortion"); if (Object.op_Implicit((Object)(object)val2)) { Object.Destroy((Object)(object)val2); } Content.CreateAndAddEffectDef(lavaImpactEffect); } internal static void CreateLavaProjectile() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)RoR2_Base_BeetleQueen.BeetleQueenSpit_prefab).WaitForCompletion(); lavaProjectilePrefab = PrefabAPI.InstantiateClone(val, "MageLavaProjectile", true); ProjectileImpactExplosion component = lavaProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component) && (Object)(object)lavaPoolPrefab != (Object)null) { ((ProjectileExplosion)component).blastDamageCoefficient = 1f; ((ProjectileExplosion)component).childrenProjectilePrefab = lavaPoolPrefab; component.impactEffect = lavaImpactEffect; ((ProjectileExplosion)component).blastRadius = lavaPoolSize; ((ProjectileExplosion)component).blastProcCoefficient = 1f; ((ProjectileExplosion)component).bonusBlastForce = new Vector3(0f, 500f, 0f); } ProjectileController pc = lavaProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)pc)) { AsyncOperationHandle val2 = Addressables.LoadAssetAsync((object)RoR2_Base_Drones.PaladinRocketGhost_prefab); val2.Completed += delegate(AsyncOperationHandle ctx) { pc.ghostPrefab = ctx.Result; }; } ProjectileDamage component2 = lavaProjectilePrefab.GetComponent(); component2.damageType = DamageTypeCombo.op_Implicit((DamageType)128); ProjectileSimple component3 = lavaProjectilePrefab.GetComponent(); component3.desiredForwardSpeed = 0f; lavaProjectilePrefab.gameObject.layer = LayerIndex.projectileWorldOnly.intVal; Content.AddProjectilePrefab(lavaProjectilePrefab); } internal static void CreateLavaPool() { //IL_0032: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: 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_0180: 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_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: 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) //IL_01f1: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0324: 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_0355: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) LanguageAPI.Add(lavaPoolKeywordToken, "Molten PoolsCreates a lingering pool on impact with any surface, which ignites enemies and deals " + Tools.ConvertDecimal(napalmFireFrequency * napalmDamageCoefficient) + " TOTAL damage per second."); string text = "21516298ba7220c41bc56ab2e0215f92"; lavaPoolPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)text).WaitForCompletion(), "MageLavaPool", true); string text2 = "ee66af398b28cda46b311d0be4f9ca0a"; GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)text2).WaitForCompletion(), "MageLavaPoolGhost", false); lavaPoolPrefab.transform.localScale = new Vector3(lavaPoolSize, lavaPoolSize, lavaPoolSize); ProjectileDotZone component = lavaPoolPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.lifetime = napalmDuration; component.resetFrequency = napalmFireFrequency; component.damageCoefficient = napalmDamageCoefficient; component.overlapProcCoefficient = napalmProcCoefficient; component.attackerFiltering = (AttackerFiltering)0; } ProjectileDamage component2 = lavaPoolPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.damageType = DamageTypeCombo.op_Implicit((DamageType)128); } ProjectileController component3 = lavaPoolPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { component3.procCoefficient = 1f; component3.ghostPrefab = val; } Color val2 = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)100, (byte)50, byte.MaxValue)); Transform val3 = val.transform.Find("FX"); if (Object.op_Implicit((Object)(object)val3)) { ((Component)val3).transform.localScale = Vector3.one * lavaPoolSize; ((Component)val3.Find("Spittle")).gameObject.SetActive(false); Decal componentInChildren = ((Component)val3).GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { ((Component)componentInChildren).transform.localScale = Vector3.one * lavaPoolSize; Material val4 = new Material(componentInChildren.Material); ((Object)val4).name = "matMageLavaPoolDecal"; val4.SetColor("_TintColor", val2); val4.SetColor("_Color", val2); val4.SetTexture("_RemapTex", Addressables.LoadAssetAsync((object)"RoR2/DLC2/Scorchling/texRampScorchling.png").WaitForCompletion()); componentInChildren.Material = val4; } GameObject val5 = LegacyResourcesAPI.Load("prefabs/FireTrail"); GameObject val6 = ((val5 == null) ? null : val5.GetComponent()?.segmentPrefab); if (Object.op_Implicit((Object)(object)val6)) { GameObject val7 = Object.Instantiate(val6, ((Component)val3).transform); ParticleSystem component4 = val7.GetComponent(); MainModule main = component4.main; ((MainModule)(ref main)).duration = 8f; ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(-0.075f); MinMaxCurve startSizeX = ((MainModule)(ref main)).startSizeX; ((MinMaxCurve)(ref startSizeX)).constantMin = ((MinMaxCurve)(ref startSizeX)).constantMin * 0.6f; ((MinMaxCurve)(ref startSizeX)).constantMax = ((MinMaxCurve)(ref startSizeX)).constantMax * 0.8f; MinMaxCurve startSizeY = ((MainModule)(ref main)).startSizeY; ((MinMaxCurve)(ref startSizeY)).constantMin = ((MinMaxCurve)(ref startSizeY)).constantMin * 0.8f; ((MinMaxCurve)(ref startSizeY)).constantMax = ((MinMaxCurve)(ref startSizeY)).constantMax * 1f; MinMaxCurve startSizeZ = ((MainModule)(ref main)).startSizeZ; ((MinMaxCurve)(ref startSizeZ)).constantMin = ((MinMaxCurve)(ref startSizeZ)).constantMin * 0.6f; ((MinMaxCurve)(ref startSizeZ)).constantMax = ((MinMaxCurve)(ref startSizeZ)).constantMax * 0.8f; MinMaxCurve startLifetime = ((MainModule)(ref main)).startLifetime; ((MinMaxCurve)(ref startLifetime)).constantMin = 0.9f; ((MinMaxCurve)(ref startLifetime)).constantMax = 1.1f; ((Behaviour)val7.GetComponent()).enabled = false; val7.transform.localPosition = Vector3.zero; val7.transform.localPosition = Vector3.zero; val7.transform.localScale = Vector3.one; ShapeModule shape = val7.GetComponent().shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)0; ((ShapeModule)(ref shape)).scale = Vector3.one * 0.5f; } GameObject gameObject = ((Component)val3.Find("Point Light")).gameObject; Light component5 = gameObject.GetComponent(); component5.color = new Color(1f, 1f, 0f); component5.intensity = 2.5f; component5.range = lavaPoolSize * 1.5f; } Content.AddProjectilePrefab(lavaPoolPrefab); } } public class CustomRendererInfo { public string childName; public Material material = null; public bool dontHotpoo = false; public bool ignoreOverlays = false; } internal static class Assets { internal static Dictionary loadedBundles = new Dictionary(); internal static void DoMesh(GameObject model, int meshInd, Color color1, Color color2) { //IL_0042: 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_0057: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0108: 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_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_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_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) Vector2 val2 = default(Vector2); switch (meshInd) { default: Debug.LogError((object)"Mesh index for sword out of range"); break; case 0: { model.transform.localScale = new Vector3(0.5f, 0.5f, 1.5f); Mesh val = Object.Instantiate(((Component)Addressables.LoadAssetAsync((object)"a931fe3391939d84383a030b3098d78b").WaitForCompletion().transform.Find("mdlTriTip")).GetComponent().sharedMesh); model.GetComponent().sharedMesh = val; ((Vector2)(ref val2))..ctor(0.5f, 0.5f); Vector2[] uv = val.uv; Color[] array = (Color[])(object)new Color[uv.Length]; for (int j = 0; j < uv.Length; j++) { Vector2 val4 = uv[j]; float num2 = Mathf.Pow(val4.x - 0.5f, 2f) + Mathf.Pow(val4.y - 0.5f, 2f); array[j] = Color.Lerp(color1, color2, Mathf.Sqrt(num2)); uv[j] = val2; } val.uv = uv; val.colors = array; break; } case 1: { model.transform.localScale = new Vector3(1f, 1f, 1f); Mesh val = Object.Instantiate(((Component)Addressables.LoadAssetAsync((object)"c9898f15e54a0194dbd2ab62ad507bd4").WaitForCompletion().transform.Find("ModelBase/mdlMerc/MercSwordMesh")).GetComponent().sharedMesh); model.GetComponent().sharedMesh = val; ((Vector2)(ref val2))..ctor(0.5f, 0.5f); Vector2[] uv = val.uv; Color[] array = (Color[])(object)new Color[uv.Length]; for (int k = 0; k < uv.Length; k++) { Vector2 val5 = uv[k]; float num3 = Mathf.Pow(val5.x - 0.5f, 2f) + Mathf.Pow(val5.y - 0.5f, 2f); array[k] = Color.Lerp(color1, color2, Mathf.Sqrt(num3)); uv[k] = val2; } val.uv = uv; val.colors = array; break; } case 2: { model.transform.localScale = new Vector3(0.06f, 0.06f, 0.15f); model.transform.eulerAngles = new Vector3(0f, 180f, 0f); Mesh val = Object.Instantiate(((Component)Addressables.LoadAssetAsync((object)"41f30d571bf74fd4ab6e76601054e7ca").WaitForCompletion().transform.Find("ModelBase/mdlTitan/TitanArmature/ROOT/base/stomach/chest/upper_arm.r/lower_arm.r/hand.r/RightFist/Sword")).GetComponent().sharedMesh); model.GetComponent().sharedMesh = val; ((Vector2)(ref val2))..ctor(0.5f, 0.5f); Vector2[] uv = val.uv; Color[] array = (Color[])(object)new Color[uv.Length]; for (int i = 0; i < uv.Length; i++) { Vector2 val3 = uv[i]; float num = Mathf.Pow(val3.x - 0.5f, 2f) + Mathf.Pow(val3.y - 0.5f, 2f); array[i] = Color.Lerp(color1, color2, Mathf.Sqrt(num)); uv[i] = val2; } val.uv = uv; val.colors = array; break; } } } internal static AssetBundle LoadAssetBundle(string bundleName) { if (loadedBundles.ContainsKey(bundleName)) { return loadedBundles[bundleName]; } AssetBundle val = null; val = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)ArtificerExtendedPlugin.instance).Info.Location), bundleName)); loadedBundles[bundleName] = val; return val; } internal static GameObject CloneTracer(string originalTracerName, string newTracerName) { if ((Object)(object)LegacyResourcesAPI.Load("Prefabs/Effects/Tracers/" + originalTracerName) == (Object)null) { return null; } GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("Prefabs/Effects/Tracers/" + originalTracerName), newTracerName, true); if (!Object.op_Implicit((Object)(object)val.GetComponent())) { val.AddComponent(); } if (!Object.op_Implicit((Object)(object)val.GetComponent())) { val.AddComponent(); } if (!Object.op_Implicit((Object)(object)val.GetComponent())) { val.AddComponent(); } val.GetComponent().speed = 250f; val.GetComponent().length = 50f; Content.CreateAndAddEffectDef(val); return val; } internal static void ConvertAllRenderersToHopooShader(GameObject objectToConvert) { if (!Object.op_Implicit((Object)(object)objectToConvert)) { return; } MeshRenderer[] componentsInChildren = objectToConvert.GetComponentsInChildren(); foreach (MeshRenderer val in componentsInChildren) { if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Renderer)val).sharedMaterial)) { ((Renderer)val).sharedMaterial.ConvertDefaultShaderToHopoo(); } } SkinnedMeshRenderer[] componentsInChildren2 = objectToConvert.GetComponentsInChildren(); foreach (SkinnedMeshRenderer val2 in componentsInChildren2) { if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)((Renderer)val2).sharedMaterial)) { ((Renderer)val2).sharedMaterial.ConvertDefaultShaderToHopoo(); } } } internal static GameObject LoadCrosshair(string crosshairName) { GameObject val = LegacyResourcesAPI.Load("Prefabs/Crosshair/" + crosshairName + "Crosshair"); if ((Object)(object)val == (Object)null) { Log.Error("could not load crosshair with the name " + crosshairName + ". defaulting to Standard"); return LegacyResourcesAPI.Load("Prefabs/Crosshair/StandardCrosshair"); } return val; } internal static GameObject LoadEffect(this AssetBundle assetBundle, string resourceName, bool parentToTransform) { return assetBundle.LoadEffect(resourceName, "", parentToTransform); } internal static GameObject LoadEffect(this AssetBundle assetBundle, string resourceName, string soundName = "", bool parentToTransform = false) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) GameObject val = assetBundle.LoadAsset(resourceName); if (!Object.op_Implicit((Object)(object)val)) { Log.ErrorAssetBundle(resourceName, ((Object)assetBundle).name); return null; } val.AddComponent().duration = 12f; val.AddComponent(); val.AddComponent().vfxPriority = (VFXPriority)2; EffectComponent val2 = val.AddComponent(); val2.applyScale = false; val2.effectIndex = (EffectIndex)(-1); val2.parentToReferencedTransform = parentToTransform; val2.positionAtReferencedTransform = true; val2.soundName = soundName; Content.CreateAndAddEffectDef(val); return val; } internal static GameObject CreateProjectileGhostPrefab(this AssetBundle assetBundle, string ghostName) { GameObject val = assetBundle.LoadAsset(ghostName); if ((Object)(object)val == (Object)null) { Log.Error("Failed to load ghost prefab " + ghostName); } if (!Object.op_Implicit((Object)(object)val.GetComponent())) { val.AddComponent(); } if (!Object.op_Implicit((Object)(object)val.GetComponent())) { val.AddComponent(); } ConvertAllRenderersToHopooShader(val); return val; } internal static GameObject CreateProjectileGhostPrefab(GameObject ghostObject, string newName) { if ((Object)(object)ghostObject == (Object)null) { Log.Error("Failed to load ghost prefab " + ((Object)ghostObject).name); } GameObject val = PrefabAPI.InstantiateClone(ghostObject, newName); if (!Object.op_Implicit((Object)(object)val.GetComponent())) { val.AddComponent(); } if (!Object.op_Implicit((Object)(object)val.GetComponent())) { val.AddComponent(); } return val; } internal static GameObject CloneProjectilePrefab(string prefabName, string newPrefabName) { return PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("Prefabs/Projectiles/" + prefabName), newPrefabName); } internal static GameObject LoadAndAddProjectilePrefab(this AssetBundle assetBundle, string newPrefabName) { GameObject val = assetBundle.LoadAsset(newPrefabName); if ((Object)(object)val == (Object)null) { Log.ErrorAssetBundle(newPrefabName, ((Object)assetBundle).name); return null; } Content.AddProjectilePrefab(val); return val; } } internal static class Materials { private static List cachedMaterials = new List(); internal static Shader hotpoo = LegacyResourcesAPI.Load("Shaders/Deferred/HGStandard"); public static List MaterialsWithSwappedShaders { get; } = new List(); internal static void GetMaterial(GameObject model, string childObject, Color color, ref Material material, float scaleMultiplier = 1f, bool replaceAll = false) { //IL_0030: 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_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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) Renderer[] componentsInChildren = model.GetComponentsInChildren(); Renderer[] array = componentsInChildren; foreach (Renderer val in array) { Renderer val2 = val; if (string.Equals(((Object)val).name, childObject)) { if (color == Color.clear) { Object.Destroy((Object)(object)val); break; } if ((Object)(object)material == (Object)null) { material = new Material(val.material); material.mainTexture = val.material.mainTexture; material.shader = val.material.shader; material.color = color; } val.material = material; Transform transform = ((Component)val).transform; transform.localScale *= scaleMultiplier; if (!replaceAll) { break; } } } } internal static void DebugMaterial(GameObject model) { Renderer[] componentsInChildren = model.GetComponentsInChildren(); Renderer[] array = componentsInChildren; foreach (Renderer val in array) { Renderer val2 = val; Debug.Log((object)("Material: " + ((Object)val2).name.ToString())); } } public static void SwapShadersFromMaterialsInBundle(AssetBundle bundle) { if (bundle.isStreamedSceneAssetBundle) { Debug.LogWarning((object)"Cannot swap material shaders from a streamed scene assetbundle."); return; } Material[] array = (from mat in bundle.LoadAllAssets() where ((Object)mat.shader).name.StartsWith("Stubbed") select mat).ToArray(); foreach (Material val in array) { if (!((Object)val.shader).name.StartsWith("Stubbed")) { Debug.LogWarning((object)$"The material {val} has a shader which's name doesnt start with \"Stubbed\" ({((Object)val.shader).name}), this is not allowed for stubbed shaders for MSU. not swapping shader."); continue; } try { SwapShader(val); } catch (Exception arg) { Debug.LogError((object)$"Failed to swap shader of material {val}: {arg}"); } } } private static void SwapShader(Material material) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) string text = ((Object)material.shader).name.Substring("Stubbed".Length); string text2 = text + ".shader"; Shader shader = Addressables.LoadAssetAsync((object)text2).WaitForCompletion(); material.shader = shader; MaterialsWithSwappedShaders.Add(material); } public static Material LoadMaterial(this AssetBundle assetBundle, string materialName) { return assetBundle.CreateHopooMaterialFromBundle(materialName); } public static Material CreateHopooMaterialFromBundle(this AssetBundle assetBundle, string materialName) { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown Material val = cachedMaterials.Find(delegate(Material mat) { materialName.Replace(" (Instance)", ""); return ((Object)mat).name.Contains(materialName); }); if (Object.op_Implicit((Object)(object)val)) { Log.Debug(((Object)val).name + " has already been loaded. returning cached"); return val; } val = assetBundle.LoadAsset(materialName); if (!Object.op_Implicit((Object)(object)val)) { Log.ErrorAssetBundle(materialName, ((Object)assetBundle).name); return new Material(hotpoo); } return val.ConvertDefaultShaderToHopoo(); } public static Material SetHopooMaterial(this Material tempMat) { return tempMat.ConvertDefaultShaderToHopoo(); } public static Material ConvertDefaultShaderToHopoo(this Material tempMat) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) if (cachedMaterials.Contains(tempMat)) { Log.Debug(((Object)tempMat).name + " has already been loaded. returning cached"); return tempMat; } float? num = null; Color? val = null; if (tempMat.IsKeywordEnabled("_NORMALMAP")) { num = tempMat.GetFloat("_BumpScale"); } if (tempMat.IsKeywordEnabled("_EMISSION")) { val = tempMat.GetColor("_EmissionColor"); } tempMat.shader = hotpoo; tempMat.SetTexture("_EmTex", tempMat.GetTexture("_EmissionMap")); tempMat.EnableKeyword("DITHER"); if (num.HasValue) { tempMat.SetFloat("_NormalStrength", num.Value); tempMat.SetTexture("_NormalTex", tempMat.GetTexture("_BumpMap")); } if (val.HasValue) { tempMat.SetColor("_EmColor", val.Value); tempMat.SetFloat("_EmPower", 1f); } if (tempMat.IsKeywordEnabled("NOCULL")) { tempMat.SetInt("_Cull", 0); } if (tempMat.IsKeywordEnabled("LIMBREMOVAL")) { tempMat.SetInt("_LimbRemovalOn", 1); } cachedMaterials.Add(tempMat); return tempMat; } public static Material MakeUnique(this Material material) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown if (cachedMaterials.Contains(material)) { return new Material(material); } return material; } public static Material SetColor(this Material material, Color color) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) material.SetColor("_Color", color); return material; } public static Material SetNormal(this Material material, float normalStrength = 1f) { material.SetFloat("_NormalStrength", normalStrength); return material; } public static Material SetEmission(this Material material) { return material.SetEmission(1f); } public static Material SetEmission(this Material material, float emission) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return material.SetEmission(emission, Color.white); } public static Material SetEmission(this Material material, float emission, Color emissionColor) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) material.SetFloat("_EmPower", emission); material.SetColor("_EmColor", emissionColor); return material; } public static Material SetCull(this Material material, bool cull = false) { material.SetInt("_Cull", cull ? 1 : 0); return material; } public static Material SetSpecular(this Material material, float strength) { material.SetFloat("_SpecularStrength", strength); return material; } public static Material SetSpecular(this Material material, float strength, float exponent) { material.SetFloat("_SpecularStrength", strength); material.SetFloat("SpecularExponent", exponent); return material; } } internal static class Particles { internal static void GetParticle(GameObject model, string childObject, Color color, float sizeMultiplier = 1f, bool replaceAll = false) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0069: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) ParticleSystem[] componentsInChildren = model.GetComponentsInChildren(); ParticleSystem[] array = componentsInChildren; foreach (ParticleSystem val in array) { ParticleSystem val2 = val; MainModule main = val2.main; ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ColorBySpeedModule colorBySpeed = val2.colorBySpeed; if (string.Equals(((Object)val2).name, childObject)) { ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(color); ((MainModule)(ref main)).startSizeMultiplier = ((MainModule)(ref main)).startSizeMultiplier * sizeMultiplier; ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(color); ((ColorBySpeedModule)(ref colorBySpeed)).color = MinMaxGradient.op_Implicit(color); if (!replaceAll) { break; } } } } internal static void DebugParticleSystem(GameObject model) { ParticleSystem[] componentsInChildren = model.GetComponentsInChildren(); ParticleSystem[] array = componentsInChildren; foreach (ParticleSystem val in array) { ParticleSystem val2 = val; Debug.Log((object)("Particle: " + ((Object)val2).name.ToString())); } } } internal class Content { internal static void AddExpansionDef(ExpansionDef expansion) { ContentPacks.expansionDefs.Add(expansion); } internal static void AddCharacterBodyPrefab(GameObject bprefab) { ContentPacks.bodyPrefabs.Add(bprefab); } internal static void AddMasterPrefab(GameObject prefab) { ContentPacks.masterPrefabs.Add(prefab); } internal static void AddProjectilePrefab(GameObject prefab) { ContentPacks.projectilePrefabs.Add(prefab); } internal static void AddSurvivorDef(SurvivorDef survivorDef) { ContentPacks.survivorDefs.Add(survivorDef); } internal static void AddItemDef(ItemDef itemDef) { ContentPacks.itemDefs.Add(itemDef); } internal static void AddEliteDef(EliteDef eliteDef) { ContentPacks.eliteDefs.Add(eliteDef); } internal static void AddArtifactDef(ArtifactDef artifactDef) { ContentPacks.artifactDefs.Add(artifactDef); } internal static void AddNetworkedObjectPrefab(GameObject prefab) { ContentPacks.networkedObjectPrefabs.Add(prefab); } internal static void AddUnlockableDef(UnlockableDef unlockableDef) { ContentPacks.unlockableDefs.Add(unlockableDef); } internal static UnlockableDef CreateAndAddUnlockbleDef(string identifier, string nameToken, Sprite achievementIcon) { UnlockableDef val = ScriptableObject.CreateInstance(); val.cachedName = identifier; val.nameToken = nameToken; val.achievementIcon = achievementIcon; AddUnlockableDef(val); return val; } internal static void AddSkillDef(SkillDef skillDef) { ContentPacks.skillDefs.Add(skillDef); } internal static void AddSkillFamily(SkillFamily skillFamily) { ContentPacks.skillFamilies.Add(skillFamily); } internal static void AddEntityState(Type entityState) { ContentPacks.entityStates.Add(entityState); } internal static void AddBuffDef(BuffDef buffDef) { ContentPacks.buffDefs.Add(buffDef); } internal static BuffDef CreateAndAddBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff) { //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; AddBuffDef(val); return val; } internal static void AddEffectDef(EffectDef effectDef) { ContentPacks.effectDefs.Add(effectDef); } internal static EffectDef CreateAndAddEffectDef(GameObject effectPrefab) { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00a5: 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_00c0: Expected O, but got Unknown if ((Object)(object)effectPrefab == (Object)null) { Debug.LogError((object)"Effect prefab was null"); return null; } EffectComponent component = effectPrefab.GetComponent(); if ((Object)(object)component == (Object)null) { Debug.LogErrorFormat("Effect prefab: \"{0}\" does not have an EffectComponent.", new object[1] { ((Object)effectPrefab).name }); return null; } VFXAttributes component2 = effectPrefab.GetComponent(); if ((Object)(object)component2 == (Object)null) { Debug.LogErrorFormat("Effect prefab: \"{0}\" does not have a VFXAttributes component.", new object[1] { ((Object)effectPrefab).name }); return null; } EffectDef val = new EffectDef { prefab = effectPrefab, prefabEffectComponent = component, prefabVfxAttributes = component2, prefabName = ((Object)effectPrefab).name, spawnSoundEventName = component.soundName }; AddEffectDef(val); return val; } internal static void AddNetworkSoundEventDef(NetworkSoundEventDef networkSoundEventDef) { ContentPacks.networkSoundEventDefs.Add(networkSoundEventDef); } internal static NetworkSoundEventDef CreateAndAddNetworkSoundEventDef(string eventName) { NetworkSoundEventDef val = ScriptableObject.CreateInstance(); val.akId = AkSoundEngine.GetIDFromString(eventName); val.eventName = eventName; AddNetworkSoundEventDef(val); return val; } } internal static class Skills { public static Dictionary characterSkillLocators = new Dictionary(); public static void CreateSkillFamilies(GameObject targetPrefab) { SkillSlot[] array = new SkillSlot[4]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); CreateSkillFamilies(targetPrefab, (SkillSlot[])(object)array); } public static void CreateSkillFamilies(GameObject targetPrefab, params SkillSlot[] slots) { //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) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected I4, but got Unknown SkillLocator component = targetPrefab.GetComponent(); foreach (SkillSlot val in slots) { SkillSlot val2 = val; switch (val2 - -1) { case 1: component.primary = CreateGenericSkillWithSkillFamily(targetPrefab, "Primary"); break; case 2: component.secondary = CreateGenericSkillWithSkillFamily(targetPrefab, "Secondary"); break; case 3: component.utility = CreateGenericSkillWithSkillFamily(targetPrefab, "Utility"); break; case 4: component.special = CreateGenericSkillWithSkillFamily(targetPrefab, "Special"); break; } } } public static void ClearGenericSkills(GameObject targetPrefab) { GenericSkill[] componentsInChildren = targetPrefab.GetComponentsInChildren(); foreach (GenericSkill val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } } public static GenericSkill CreateGenericSkillWithSkillFamily(GameObject targetPrefab, SkillSlot skillSlot, bool hidden = false) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: 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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected I4, but got Unknown SkillLocator component = targetPrefab.GetComponent(); switch (skillSlot - -1) { case 1: return component.primary = CreateGenericSkillWithSkillFamily(targetPrefab, "Primary", hidden); case 2: return component.secondary = CreateGenericSkillWithSkillFamily(targetPrefab, "Secondary", hidden); case 3: return component.utility = CreateGenericSkillWithSkillFamily(targetPrefab, "Utility", hidden); case 4: return component.special = CreateGenericSkillWithSkillFamily(targetPrefab, "Special", hidden); case 0: Log.Error("Failed to create GenericSkill with skillslot None. If making a GenericSkill outside of the main 4, specify a familyName, and optionally a genericSkillName"); return null; default: return null; } } public static GenericSkill CreateGenericSkillWithSkillFamily(GameObject targetPrefab, string familyName, bool hidden = false) { return CreateGenericSkillWithSkillFamily(targetPrefab, familyName, familyName, hidden); } public static GenericSkill CreateGenericSkillWithSkillFamily(GameObject targetPrefab, string genericSkillName, string familyName, bool hidden = false) { GenericSkill val = targetPrefab.AddComponent(); val.skillName = genericSkillName; val.hideInCharacterSelect = hidden; SkillFamily val2 = ScriptableObject.CreateInstance(); ((Object)val2).name = ((Object)targetPrefab).name + familyName + "Family"; val2.variants = (Variant[])(object)new Variant[0]; val._skillFamily = val2; Content.AddSkillFamily(val2); return val; } public static void AddSkillToFamily(SkillFamily skillFamily, SkillDef skillDef, UnlockableDef unlockableDef = null) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0054: 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) Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = skillFamily.variants.Length - 1; Variant val = new Variant { skillDef = skillDef, unlockableDef = unlockableDef }; ((Variant)(ref val)).viewableNode = new Node(skillDef.skillNameToken, false, (Node)null); variants[num] = val; } public static void AddSkillsToFamily(SkillFamily skillFamily, params SkillDef[] skillDefs) { foreach (SkillDef skillDef in skillDefs) { AddSkillToFamily(skillFamily, skillDef); } } public static void AddPrimarySkills(GameObject targetPrefab, params SkillDef[] skillDefs) { AddSkillsToFamily(targetPrefab.GetComponent().primary.skillFamily, skillDefs); } public static void AddSecondarySkills(GameObject targetPrefab, params SkillDef[] skillDefs) { AddSkillsToFamily(targetPrefab.GetComponent().secondary.skillFamily, skillDefs); } public static void AddUtilitySkills(GameObject targetPrefab, params SkillDef[] skillDefs) { AddSkillsToFamily(targetPrefab.GetComponent().utility.skillFamily, skillDefs); } public static void AddSpecialSkills(GameObject targetPrefab, params SkillDef[] skillDefs) { AddSkillsToFamily(targetPrefab.GetComponent().special.skillFamily, skillDefs); } public static void AddUnlockablesToFamily(SkillFamily skillFamily, params UnlockableDef[] unlockableDefs) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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) for (int i = 0; i < unlockableDefs.Length; i++) { Variant val = skillFamily.variants[i]; val.unlockableDef = unlockableDefs[i]; skillFamily.variants[i] = val; } } public static Combo ComboFromType(Type t) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) return new Combo { activationStateType = new SerializableEntityStateType(t) }; } } [AttributeUsage(AttributeTargets.Field, AllowMultiple = false)] public class AutoConfigAttribute : Attribute { public string name; public string desc; public object defaultValue; public AutoConfigAttribute(string name, object defaultValue) { Init(name, string.Empty, defaultValue); } public AutoConfigAttribute(string name, string desc, object defaultValue) { Init(name, desc, defaultValue); } public void Init(string name, string desc, object defaultValue) { this.name = name; this.desc = desc; this.defaultValue = defaultValue; } } public static class Config { public static ConfigFile MyConfig; public static ConfigFile BackupConfig; public static void Init() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown MyConfig = new ConfigFile(Paths.ConfigPath + "\\com.Borbo.ArtificerExtended.cfg", true); BackupConfig = new ConfigFile(Paths.ConfigPath + "\\com.Borbo.ArtificerExtended.Backup.cfg", true); BackupConfig.Bind(": DO NOT MODIFY THIS FILES CONTENTS :", ": DO NOT MODIFY THIS FILES CONTENTS :", ": DO NOT MODIFY THIS FILES CONTENTS :", ": DO NOT MODIFY THIS FILES CONTENTS :"); } public static ConfigEntry CharacterEnableConfig(string section, string characterName, string description = "", bool enabledByDefault = true) { if (string.IsNullOrEmpty(description)) { description = "Set to false to disable this character and as much of its code and content as possible"; } return BindAndOptions(section, "Enable " + characterName, enabledByDefault, description, restartRequired: true); } public static ConfigEntry BindAndOptions(string section, string name, T defaultValue, string description = "", bool restartRequired = false) { return BindAndOptions(section, name, defaultValue, 0f, 20f, description, restartRequired); } public static ConfigEntry BindAndOptions(string section, string name, T defaultValue, float min, float max, string description = "", bool restartRequired = false) { if (string.IsNullOrEmpty(description)) { description = name; } if (restartRequired) { description += " (restart required)"; } ConfigEntry val = MyConfig.Bind(section, name, defaultValue, description); if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions")) { TryRegisterOption(val, min, max, restartRequired); } return val; } public static ConfigEntry BindAndOptionsSlider(string section, string name, float defaultValue, string description, float min = 0f, float max = 20f, bool restartRequired = false) { return BindAndOptions(section, name, defaultValue, min, max, description, restartRequired); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void TryRegisterOption(ConfigEntry entry, float min, float max, bool restartRequired) { } public static bool GetKeyPressed(KeyboardShortcut entry) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) foreach (KeyCode modifier in ((KeyboardShortcut)(ref entry)).Modifiers) { if (!Input.GetKey(modifier)) { return false; } } return Input.GetKeyDown(((KeyboardShortcut)(ref entry)).MainKey); } } public class ConfigManager { internal static bool ConfigChanged; internal static bool VersionChanged; public static void HandleConfigAttributes(Type type, string section, ConfigFile config) { TypeInfo typeInfo = type.GetTypeInfo(); FieldInfo[] fields = typeInfo.GetFields(); foreach (FieldInfo fieldInfo in fields) { if (fieldInfo.IsStatic) { Type fieldType = fieldInfo.FieldType; AutoConfigAttribute customAttribute = fieldInfo.GetCustomAttribute(); if (customAttribute != null) { string name = customAttribute.name; object defaultValue = customAttribute.defaultValue; string desc = customAttribute.desc; fieldInfo.SetValue(null, DualBindToConfig(fieldType, section, config, name, defaultValue, desc)); } } } } private static object DualBindToConfig(Type t, string section, ConfigFile config, string configName, object defaultValue, string configDesc) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown if (string.IsNullOrWhiteSpace(section) || string.IsNullOrWhiteSpace(configName)) { return defaultValue; } ConfigDescription val = new ConfigDescription(configDesc, (AcceptableValueBase)null, Array.Empty()); MethodInfo methodInfo = (from x in typeof(ConfigFile).GetMethods() where x.Name == "Bind" select x).First(); methodInfo = methodInfo.MakeGenericMethod(t); ConfigEntryBase val2 = (ConfigEntryBase)methodInfo.Invoke(config, new object[3] { (object)new ConfigDefinition(section, configName), defaultValue, val }); ConfigEntryBase val3 = (ConfigEntryBase)methodInfo.Invoke(Config.BackupConfig, new object[3] { (object)new ConfigDefinition(Regex.Replace(config.ConfigFilePath, "\\W", "") + " : " + section, configName), defaultValue, val }); if (!ConfigEqual(val3.DefaultValue, val3.BoxedValue)) { bool flag = true; Log.Warning("Syncing config to new version"); val2.BoxedValue = val2.DefaultValue; val3.BoxedValue = val3.DefaultValue; } if (!ConfigEqual(val2.DefaultValue, val2.BoxedValue)) { ConfigChanged = true; } return val2.BoxedValue; } public static T DualBind(string section, string configName, T defaultValue, string configDesc) { return (T)DualBindToConfig(typeof(T), section, Config.MyConfig, configName, defaultValue, configDesc); } public static T DualBindToConfig(string section, ConfigFile config, string configName, T defaultValue, string configDesc) { return (T)DualBindToConfig(typeof(T), section, config, configName, defaultValue, configDesc); } private static bool ConfigEqual(object a, object b) { if (a.Equals(b)) { return true; } if (float.TryParse(a.ToString(), out var result) && float.TryParse(b.ToString(), out var result2) && (double)Mathf.Abs(result - result2) < 0.0001) { return true; } return false; } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public static List expansionDefs = new List(); public static List bodyPrefabs = new List(); public static List masterPrefabs = new List(); public static List projectilePrefabs = new List(); public static List survivorDefs = new List(); public static List unlockableDefs = new List(); public static List skillFamilies = new List(); public static List skillDefs = new List(); public static List entityStates = new List(); public static List buffDefs = new List(); public static List effectDefs = new List(); public static List itemDefs = new List(); public static List eliteDefs = new List(); public static List artifactDefs = new List(); public static List networkSoundEventDefs = new List(); public static List networkedObjectPrefabs = new List(); public string identifier => "com.Borbo.ArtificerExtended"; public void Initialize() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown 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.expansionDefs.Add(expansionDefs.ToArray()); contentPack.bodyPrefabs.Add(bodyPrefabs.ToArray()); contentPack.masterPrefabs.Add(masterPrefabs.ToArray()); contentPack.projectilePrefabs.Add(projectilePrefabs.ToArray()); contentPack.survivorDefs.Add(survivorDefs.ToArray()); contentPack.eliteDefs.Add(eliteDefs.ToArray()); contentPack.itemDefs.Add(itemDefs.ToArray()); contentPack.buffDefs.Add(buffDefs.ToArray()); contentPack.artifactDefs.Add(artifactDefs.ToArray()); contentPack.skillDefs.Add(skillDefs.ToArray()); contentPack.skillFamilies.Add(skillFamilies.ToArray()); contentPack.entityStateTypes.Add(entityStates.ToArray()); contentPack.unlockableDefs.Add(unlockableDefs.ToArray()); contentPack.effectDefs.Add(effectDefs.ToArray()); contentPack.networkSoundEventDefs.Add(networkSoundEventDefs.ToArray()); contentPack.networkedObjectPrefabs.Add(networkedObjectPrefabs.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; } } internal static class Language { public static class Styling { public static string ConvertDecimal(float value) { return value * 100f + "%"; } public static string DamageColor(string text) { return "" + text + ""; } public static string HealingColor(string text) { return "" + text + ""; } public static string DamageValueText(float value) { return DamageColor(ConvertDecimal(value) + " damage"); } public static string UtilityColor(string text) { return "" + text + ""; } public static string RedText(string text) { return HealthColor(text); } public static string HealthColor(string text) { return "" + text + ""; } public static string KeywordText(string keyword, string sub) { return "" + keyword + "" + sub + ""; } public static string ScepterDescription(string desc) { return "\nSCEPTER: " + desc + ""; } public static string VoidColor(string text) { return "" + text + ""; } public static string StackText(string text) { return StackColor("(" + text + " per stack)"); } public static string StackColor(string text) { return "" + text + ""; } public static string GetAchievementNameToken(string identifier) { return "ACHIEVEMENT_" + identifier.ToUpperInvariant() + "_NAME"; } public static string GetAchievementDescriptionToken(string identifier) { return "ACHIEVEMENT_" + identifier.ToUpperInvariant() + "_DESCRIPTION"; } public static string NumToAdj(int num) { return num switch { 1 => num + "st", 2 => num + "nd", 3 => num + "rd", _ => num + "th", }; } } public static string TokensOutput = ""; public static bool usingLanguageFolder = false; public static bool printingEnabled = false; public static void Init() { if (usingLanguageFolder) { Language.collectLanguageRootFolders += Language_collectLanguageRootFolders; } } private static void Language_collectLanguageRootFolders(List obj) { string text = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)ArtificerExtendedPlugin.instance).Info.Location), "Language"); if (Directory.Exists(text)) { obj.Add(text); } } public static void Add(string token, string text) { if (!usingLanguageFolder) { LanguageAPI.Add(token, text); } if (printingEnabled) { TokensOutput = TokensOutput + "\n \"" + token + "\" : \"" + text.Replace(Environment.NewLine, "\\n").Replace("\n", "\\n") + "\","; } } public static void TryPrintOutput(string fileName = "") { if (usingLanguageFolder && printingEnabled) { PrintOutput(fileName); } } public static void PrintOutput(string fileName = "") { if (printingEnabled) { string text = "{\n strings:\n {" + TokensOutput + "\n }\n}"; Log.Message(fileName + ": \n" + text); if (!string.IsNullOrEmpty(fileName)) { string path = Path.Combine(Directory.GetParent(((BaseUnityPlugin)ArtificerExtendedPlugin.instance).Info.Location).FullName, "Language", "en", fileName); File.WriteAllText(path, text); } TokensOutput = ""; } } } } namespace ArtificerExtended.Components { public class ElementCounter : MonoBehaviour { public enum Power { None, Low, Medium, High, Extreme, Unfathomable } internal CharacterBody body; internal bool useIceAspect = false; internal bool useFireAspect = false; internal bool useLightningAspect = false; public Power firePower; public Power icePower; public Power lightningPower; private SkillLocator loc = null; public static Power localUserFirePower { get; private set; } public static Power localUserIcePower { get; private set; } public static Power localUserLightningPower { get; private set; } public void OnBodyStart(SkillLocator skillLocator = null) { if ((Object)(object)loc == (Object)null) { if ((Object)(object)skillLocator == (Object)null) { Debug.Log((object)"Element Counter has no state assigned!"); return; } loc = skillLocator; } loc.primary.onSkillChanged += delegate { RecalculatePowers(); }; loc.secondary.onSkillChanged += delegate { RecalculatePowers(); }; loc.utility.onSkillChanged += delegate { RecalculatePowers(); }; loc.special.onSkillChanged += delegate { RecalculatePowers(); }; if (!Object.op_Implicit((Object)(object)body)) { body = ((Component)loc).GetComponent(); } RecalculatePowers(); } public void OnBodyEnd() { if (!((Object)(object)loc == (Object)null)) { loc.primary.onSkillChanged -= delegate { RecalculatePowers(); }; loc.secondary.onSkillChanged -= delegate { RecalculatePowers(); }; loc.utility.onSkillChanged -= delegate { RecalculatePowers(); }; loc.special.onSkillChanged -= delegate { RecalculatePowers(); }; } } public void RecalculatePowers() { firePower = Power.None; icePower = Power.None; lightningPower = Power.None; GetPowerFromSkill(loc.primary); GetPowerFromSkill(loc.secondary); GetPowerFromSkill(loc.utility); GetPowerFromSkill(loc.special); if (Object.op_Implicit((Object)(object)body) && ((NetworkBehaviour)body).hasAuthority) { localUserFirePower = firePower; localUserIcePower = icePower; localUserLightningPower = lightningPower; } Debug.Log((object)$"Fire: {firePower}\nIce: {icePower}\nLightning: {lightningPower}"); } private void GetPowerFromSkill(GenericSkill skill) { if (skill.baseSkill.skillNameToken.Contains("_")) { string[] array = skill.baseSkill.skillNameToken.Split('_'); string text = ((array.Length > 2) ? array[2].ToLower() : ""); switch (text) { default: Debug.Log((object)("Element: " + text + " is not handled")); break; case "fire": firePower++; break; case "ice": icePower++; break; case "lightning": lightningPower++; break; } } } public static Power GetPowerLevelFromBody(GameObject body, MageElement element, AltArtiPassive altArtiPassive) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) ElementCounter powerComponent = null; if (altArtiPassive != null) { powerComponent = altArtiPassive.elementPower; } return GetPowerLevelFromBody(body, element, powerComponent); } public static Power GetPowerLevelFromBody(GameObject body, MageElement element, ElementCounter powerComponent = null) { //IL_003b: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected I4, but got Unknown Power power = Power.None; if ((Object)(object)body == (Object)null) { return power; } if ((Object)(object)powerComponent == (Object)null) { powerComponent = GetPowerComponentFromBody(body); } if ((Object)(object)powerComponent != (Object)null) { bool flag = false; switch (element - 1) { case 0: power = powerComponent.firePower; flag = powerComponent.useFireAspect; break; case 2: power = powerComponent.lightningPower; flag = powerComponent.useLightningAspect; break; case 1: power = powerComponent.icePower; flag = powerComponent.useIceAspect; break; } if (flag && power >= Power.Unfathomable) { } } return power; } public static ElementCounter GetPowerComponentFromBody(GameObject body) { ElementCounter elementCounter = null; if (AltArtiPassive.instanceLookup.ContainsKey(body)) { AltArtiPassive altArtiPassive = AltArtiPassive.instanceLookup[body]; return altArtiPassive.elementPower; } return body.GetComponent(); } } [RequireComponent(typeof(AntiGravityForce))] internal class GravityAfterDuration : MonoBehaviour { public float antiGravCoefficient = 0f; public float durationBeforeGravity = 0f; internal AntiGravityForce antiGrav; private float stopwatch = 0f; private void Awake() { if (!Object.op_Implicit((Object)(object)antiGrav)) { antiGrav = ((Component)this).GetComponent(); } if (Object.op_Implicit((Object)(object)antiGrav)) { antiGrav.antiGravityCoefficient = 1f; } } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (stopwatch >= durationBeforeGravity && Object.op_Implicit((Object)(object)antiGrav)) { antiGrav.antiGravityCoefficient = antiGravCoefficient; } } private void OnEnable() { stopwatch = 0f; } private void OnDisable() { stopwatch = 0f; } } [RequireComponent(typeof(ProjectileController), typeof(Rigidbody))] internal class ProjectileRecallToOwner : NetworkBehaviour { public float delay; public float transitionDuration; public float returnSpeed; private ProjectileController projectileController; private Rigidbody rigidbody; private float startSpeed; private float stopwatch; [SyncVar] private BoomerangState boomerangState = (BoomerangState)0; public BoomerangState NetworkboomerangState { get { //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) return boomerangState; } [param: In] set { //IL_0001: 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) //IL_000d: Unknown result type (might be due to invalid IL or missing references) ulong num = (ulong)(long)value; ulong num2 = (ulong)(long)boomerangState; ((NetworkBehaviour)this).SetSyncVarEnum(value, num, ref boomerangState, num2, 1u); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected I4, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected I4, but got Unknown if (forceAll) { writer.Write((int)boomerangState); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & 1) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write((int)boomerangState); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (initialState) { boomerangState = (BoomerangState)reader.ReadInt32(); return; } int num = (int)reader.ReadPackedUInt32(); if ((num & 1) != 0) { boomerangState = (BoomerangState)reader.ReadInt32(); } } public override void PreStartClient() { } private void Start() { //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) projectileController = ((Component)this).GetComponent(); rigidbody = ((Component)this).GetComponent(); Vector3 velocity = rigidbody.velocity; startSpeed = ((Vector3)(ref velocity)).magnitude; } private void FixedUpdate() { //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_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected I4, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) BoomerangState val = boomerangState; BoomerangState val2 = val; switch ((int)val2) { case 0: stopwatch += Time.fixedDeltaTime; if (stopwatch >= delay) { stopwatch = 0f; NetworkboomerangState = (BoomerangState)1; } break; case 1: { stopwatch += Time.fixedDeltaTime; float num = stopwatch / transitionDuration; Vector3 val4 = CalculatePullDirection(); rigidbody.velocity = Vector3.Lerp(startSpeed * ((Component)this).transform.forward, returnSpeed * val4, num); if (stopwatch >= transitionDuration) { NetworkboomerangState = (BoomerangState)1; } break; } case 2: { Vector3 val3 = CalculatePullDirection(); rigidbody.velocity = returnSpeed * val3; break; } } Vector3 CalculatePullDirection() { //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) //IL_0026: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)projectileController.owner)) { Vector3 val5 = projectileController.owner.transform.position - ((Component)this).transform.position; return ((Vector3)(ref val5)).normalized; } return ((Component)this).transform.forward; } } } public class Rotator : MonoBehaviour { private float rotationTime; private float rotationTimer; private bool rotating; private bool useTarget; private Vector3 basePosition; private Vector3 baseOffset; private Vector3 centerPoint = new Vector3(0f, 2f, 0f); private Quaternion baseRotation; private Quaternion target; private Quaternion rotStart; private Quaternion internalTarget; public void SetRotation(Quaternion target, float time) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) rotating = true; useTarget = true; rotationTime = time; rotationTimer = time; this.target = target; rotStart = ((Component)this).transform.rotation; } public void ResetRotation(float time) { //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) rotating = true; useTarget = false; rotationTime = time; rotationTimer = time; rotStart = ((Component)this).transform.rotation; } public void Awake() { //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_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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) baseRotation = ((Component)this).transform.localRotation; basePosition = ((Component)this).transform.localPosition; baseOffset = ((Component)this).transform.InverseTransformPoint(((Component)this).transform.parent.TransformPoint(centerPoint)); } public void LateUpdate() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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 (!rotating) { return; } float num = rotationTimer; rotationTimer -= Time.deltaTime; rotationTimer = Math.Max(0f, rotationTimer); _ = rotationTimer; internalTarget = (useTarget ? target : (((Component)this).transform.parent.rotation * baseRotation)); ((Component)this).transform.rotation = Quaternion.Lerp(rotStart, internalTarget, 1f - rotationTimer / rotationTime); Vector3 val = ((Component)this).transform.parent.TransformPoint(centerPoint); Vector3 val2 = ((Component)this).transform.TransformPoint(baseOffset); Vector3 val3 = val - val2; Transform transform = ((Component)this).transform; transform.position += val3; if (rotationTimer <= 0f) { rotating = false; if (!useTarget) { ((Component)this).transform.localRotation = baseRotation; ((Component)this).transform.localPosition = basePosition; } } } } [RequireComponent(typeof(ProjectileController))] internal class SnowglobeDeployProjectile : MonoBehaviour, IProjectileImpactBehavior { internal ProjectileController pc; public GameObject snowglobeProjectilePrefab; private bool isAlive = true; private static DeployableSlot deployableSlot => _3SnowglobeSkill.snowglobeDeployableSlot; public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (isAlive && (Object)(object)snowglobeProjectilePrefab != (Object)null) { SpawnSnowglobe(impactInfo.estimatedPointOfImpact); isAlive = false; } } private void OnDestroy() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (isAlive && (Object)(object)snowglobeProjectilePrefab != (Object)null) { SpawnSnowglobe(((Component)this).transform.position); isAlive = false; } } private void SpawnSnowglobe(Vector3 position) { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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_0199: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } if ((Object)(object)pc == (Object)null) { pc = ((Component)this).GetComponent(); } if (!Object.op_Implicit((Object)(object)pc) || !Object.op_Implicit((Object)(object)pc.owner)) { return; } CharacterBody component = pc.owner.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } CharacterMaster master = component.master; if (!Object.op_Implicit((Object)(object)master)) { return; } ProjectileDamage component2 = ((Component)this).GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { GameObject val = Object.Instantiate(snowglobeProjectilePrefab, position, Quaternion.identity); val.GetComponent().teamIndex = component.teamComponent.teamIndex; val.GetComponent().ownerObject = ((Component)component).gameObject; Deployable component3 = val.GetComponent(); if (Object.op_Implicit((Object)(object)component3) && Object.op_Implicit((Object)(object)master)) { component3.onUndeploy.AddListener(new UnityAction(component3.DestroyGameObject)); master.AddDeployable(component3, deployableSlot); } ProjectileDamage component4 = val.GetComponent(); if (Object.op_Implicit((Object)(object)component4)) { component4.crit = component2.crit; component4.damage = component2.damage; component4.damageColorIndex = (DamageColorIndex)0; component4.force = 0f; component4.damageType = DamageTypeCombo.op_Implicit((DamageType)0); component4.damageType.damageSource = (DamageSource)2; } NetworkServer.Spawn(val); } } } [RequireComponent(typeof(ProjectileController))] internal class SolarFlareMissileComponent : MonoBehaviour { private bool shouldFireMissiles = false; internal ProjectileController pc; internal ProjectileDamage pd; private CharacterBody ownerBody; private bool crit; public float fireMissileDamageCoefficient = 1f; public float fireMissileProcCoefficient = 1f; public float fireMissileBaseInterval = 1f; private float fireMissileTimer = 0f; public float resetTargetsBaseInterval = 1f; private float resetTargetsTimer = 0f; public GameObject missilePrefab; private List previousTargets = new List(); private BullseyeSearch search; private void Start() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown if (!NetworkServer.active) { return; } previousTargets = new List(); search = new BullseyeSearch(); if ((Object)(object)pc == (Object)null) { pc = ((Component)this).GetComponent(); } if (Object.op_Implicit((Object)(object)pc) && Object.op_Implicit((Object)(object)pc.owner) && ElementCounter.GetPowerLevelFromBody(pc.owner, (MageElement)1) >= ElementCounter.Power.Extreme) { shouldFireMissiles = true; ownerBody = pc.owner.GetComponent(); ResetMissileTimer(); if ((Object)(object)pd == (Object)null) { pd = ((Component)this).GetComponent(); } } } private void ResetMissileTimer() { fireMissileTimer += fireMissileBaseInterval / GetAttackSpeed(); } private float GetAttackSpeed() { if (!Object.op_Implicit((Object)(object)ownerBody)) { return 1f; } return ownerBody.attackSpeed; } private void FixedUpdate() { if (NetworkServer.active && shouldFireMissiles) { int num = 0; while (fireMissileTimer <= 0f) { ResetMissileTimer(); num++; } FireSolarFlareMissile(num); fireMissileTimer -= Time.fixedDeltaTime; } } public void FireSolarFlareMissile(int count) { //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_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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013c: 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_0165: 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) if (!NetworkServer.active || !shouldFireMissiles || count <= 0) { return; } Vector3 position = ((Component)this).transform.position; Vector3 insideUnitSphere = Random.insideUnitSphere; for (int i = 0; i < count; i++) { previousTargets.Clear(); HurtBox val = FindNextTarget(position, insideUnitSphere); if (Object.op_Implicit((Object)(object)val)) { previousTargets.Add(val.healthComponent); LightningOrb val2 = new LightningOrb(); val2.bouncedObjects = new List(); val2.attacker = ((Component)ownerBody).gameObject; val2.inflictor = ((Component)this).gameObject; val2.teamIndex = ownerBody.teamComponent.teamIndex; val2.damageValue = fireMissileDamageCoefficient * ownerBody.damage; val2.isCrit = (Object.op_Implicit((Object)(object)pd) ? pd.crit : Util.CheckRoll(ownerBody.crit, ownerBody.master)); ((Orb)val2).origin = position; val2.bouncesRemaining = 0; val2.lightningType = (LightningType)2; val2.procCoefficient = _4SolarFlareSkill.missileProcCoefficient; ((Orb)val2).target = val; val2.damageColorIndex = (DamageColorIndex)0; val2.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)128), (DamageTypeExtended)0, (DamageSource)2); OrbManager.instance.AddOrb((Orb)(object)val2); } } } public HurtBox FindNextTarget(Vector3 position, Vector3 forward) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_0034: 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_0044: 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) if (search == null) { return null; } search.searchOrigin = position; search.searchDirection = forward; search.sortMode = (SortMode)1; search.teamMaskFilter = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)ownerBody.teamComponent)) { ((TeamMask)(ref search.teamMaskFilter)).RemoveTeam(ownerBody.teamComponent.teamIndex); } search.filterByLoS = false; search.maxDistanceFilter = 40f; search.RefreshCandidates(); HurtBox val = search.GetResults().FirstOrDefault((Func)((HurtBox hurtBox) => !previousTargets.Contains(hurtBox.healthComponent))); if (!Object.op_Implicit((Object)(object)val)) { val = search.GetResults().FirstOrDefault(); } return val; } } public class SoundOnAwake : MonoBehaviour { public string sound; public void Awake() { Util.PlaySound(sound, ((Component)this).gameObject); } } }