Decompiled source of AerosSkills v2.2.0
AerosSkills.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.Captain.Weapon; using EntityStates.Commando.CommandoWeapon; using EntityStates.Engi.EngiWeapon; using EntityStates.Loader; using EntityStates.Mage.Weapon; using EntityStates.Seeker; using HG; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Utils; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.CharacterAI; using RoR2.Networking; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyCompany("AerosSkills")] [assembly: AssemblyProduct("AerosSkills")] [assembly: AssemblyTitle("AerosSkills")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace AerosSkills; internal class Assets { public static AssetBundle MainAssetBundle; public static T Load<T>(string name) where T : Object { return MainAssetBundle.LoadAsset<T>(name); } public static void PopulateAssets() { Assembly executingAssembly = Assembly.GetExecutingAssembly(); if ((Object)(object)MainAssetBundle == (Object)null) { using (Stream stream = executingAssembly.GetManifestResourceStream("AerosSkills.AssetBundle." + "AerosSkills".ToLower() + "assets")) { MainAssetBundle = AssetBundle.LoadFromStream(stream); } } } } internal class CrosshairSwap : MonoBehaviour { private CharacterBody body; private void Awake() { body = ((Component)this).GetComponent<CharacterBody>(); } private void Start() { if (body.skillLocator.primary.skillNameToken == "AEROS_M1") { body.spreadBloomCurve = Prefabs.spreadBloomCurve; body._defaultCrosshairPrefab = Prefabs.Load<GameObject>("RoR2/Base/UI/StandardCrosshair.prefab"); } } } internal class DebugHelper : MonoBehaviour { public float damage = 55f; } [DefaultExecutionOrder(100)] internal class eee : MonoBehaviour { private Tracer tracer; public float zPos = 13f; private void Start() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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) tracer = ((Component)this).GetComponent<Tracer>(); Vector3 localPosition = tracer.beamObject.transform.localPosition; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(localPosition.x, localPosition.y, localPosition.z + zPos); } } internal class ForcePos : MonoBehaviour { private void LateUpdate() { //IL_0007: 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) ((Component)this).transform.localPosition = Vector3.up * 4f; } } internal class MissileSearchTweak : MonoBehaviour { public float maxAngle = 75f; private MissileController missile; private void Start() { missile = ((Component)this).GetComponent<MissileController>(); missile.search.maxAngleFilter = 20f; } } internal class RadialBuff : MonoBehaviour { private TeamFilter teamFilter; private void OnCollisionEnter(Collision collision) { //IL_00ce: 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_001f: Expected O, but got Unknown //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_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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Expected O, but got Unknown float value = MainPlugin.radius.Value; if (NetworkServer.active) { SphereSearch val = new SphereSearch(); val.origin = ((Component)this).transform.position; val.radius = value; val.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; HurtBox[] hurtBoxes = val.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(teamFilter.teamIndex)).FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); HurtBox[] array = hurtBoxes; foreach (HurtBox val2 in array) { if (Object.op_Implicit((Object)(object)val2.healthComponent)) { SetStateOnHurt component = ((Component)val2.healthComponent).GetComponent<SetStateOnHurt>(); if (Object.op_Implicit((Object)(object)component)) { component.SetPain(); } } } } foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers(teamFilter.teamIndex)) { if (!Object.op_Implicit((Object)(object)teamMember.body) || !(Vector3.Distance(((Component)this).transform.position, ((Component)teamMember).transform.position) <= value)) { continue; } float value2 = MainPlugin.duration.Value; if (Object.op_Implicit((Object)(object)teamMember.body.modelLocator) && Object.op_Implicit((Object)(object)teamMember.body.modelLocator.modelTransform)) { CharacterModel component2 = ((Component)teamMember.body.modelLocator.modelTransform).GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)component2)) { TemporaryOverlayInstance val3 = TemporaryOverlayManager.AddOverlay(((Component)component2).gameObject); val3.duration = value2; val3.animateShaderAlpha = true; val3.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val3.alphaCurve.AddKey(0.85f, 1f); val3.destroyComponentOnEnd = true; val3.originalMaterial = Prefabs.overlay; val3.AddToCharacterModel(component2); } } if (NetworkServer.active) { teamMember.body.AddTimedBuff(Prefabs.overclock, value2); } } EffectManager.SpawnEffect(Prefabs.buffProjectileExplosion, new EffectData { origin = ((Component)this).transform.position, scale = value }, false); } private void Awake() { teamFilter = ((Component)this).GetComponent<TeamFilter>(); } } internal class SeekerGenkidamaProjectile : NetworkBehaviour { private ProjectileController controller; private ProjectileDamage projectileDamage; private ProjectileSimple simple; private Collider collider; private ProjectileImpactExplosion impact; private SkillLocator skillLocator; private CharacterBody ownerBody; private SeekerController seekerController; private EntityStateMachine weapon; public float upPos = 4f; private float damage; private int inputCount; private int tranquilityCount; private static int kCmdCmdUpdateInput; private void Awake() { controller = ((Component)this).GetComponent<ProjectileController>(); simple = ((Component)this).GetComponent<ProjectileSimple>(); projectileDamage = ((Component)this).GetComponent<ProjectileDamage>(); impact = ((Component)this).GetComponent<ProjectileImpactExplosion>(); collider = ((Component)this).GetComponent<Collider>(); } private void Start() { if (Object.op_Implicit((Object)(object)controller.owner)) { GameObject owner = controller.owner; skillLocator = owner.GetComponent<SkillLocator>(); ownerBody = owner.GetComponent<CharacterBody>(); seekerController = owner.GetComponent<SeekerController>(); weapon = Array.Find(owner.GetComponents<EntityStateMachine>(), (EntityStateMachine x) => x.customName == "Weapon"); } } private void Update() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) if (!((Behaviour)simple).enabled && Object.op_Implicit((Object)(object)controller.owner)) { ((Component)this).transform.position = controller.owner.transform.position + Vector3.up * upPos; } } [Command] private void CmdUpdateInput(int input) { inputCount = input; } private void FixedUpdate() { //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_0020: 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_005c: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.localScale = Vector3.Lerp(((Component)this).transform.localScale, Vector3.one * (float)(inputCount + 1), 1.5f * Time.fixedDeltaTime); if (Object.op_Implicit((Object)(object)ownerBody)) { ((Component)this).transform.forward = ownerBody.inputBank.aimDirection; damage = ownerBody.damage; tranquilityCount = ownerBody.GetBuffCount(Buffs.ChakraBuff); } if (!((Behaviour)simple).enabled && Object.op_Implicit((Object)(object)seekerController) && Util.HasEffectiveAuthority(controller.owner)) { CallCmdUpdateInput(seekerController.meditationInputStep); } if ((!((Behaviour)simple).enabled && !Object.op_Implicit((Object)(object)ownerBody)) || (Object.op_Implicit((Object)(object)weapon) && !(weapon.state is Genkidama))) { ((Behaviour)simple).enabled = true; ((Behaviour)impact).enabled = true; ((ProjectileExplosion)impact).blastRadius = 5 * (inputCount + 1); collider.enabled = true; projectileDamage.damage = (MainPlugin.genkidamaBaseDamage.Value + MainPlugin.genkidamaAddDamage.Value * (float)tranquilityCount) * damage; } } private void UNetVersion() { } protected static void InvokeCmdCmdUpdateInput(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkServer.active) { Debug.LogError((object)"Command CmdUpdateInput called on client."); } else { ((SeekerGenkidamaProjectile)(object)obj).CmdUpdateInput((int)reader.ReadPackedUInt32()); } } public void CallCmdUpdateInput(int input) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogError((object)"Command function CmdUpdateInput called on server."); return; } if (((NetworkBehaviour)this).isServer) { CmdUpdateInput(input); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)5); val.WritePackedUInt32((uint)kCmdCmdUpdateInput); val.Write(((Component)this).GetComponent<NetworkIdentity>().netId); val.WritePackedUInt32((uint)input); ((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdUpdateInput"); } static SeekerGenkidamaProjectile() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown kCmdCmdUpdateInput = -1960028162; NetworkBehaviour.RegisterCommandDelegate(typeof(SeekerGenkidamaProjectile), kCmdCmdUpdateInput, new CmdDelegate(InvokeCmdCmdUpdateInput)); NetworkCRC.RegisterBehaviour("SeekerGenkidamaProjectile", 0); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } internal class SimpleUpdate : MonoBehaviour { private ProjectileSimple simple; private ProjectileTargetComponent target; private void Awake() { simple = ((Component)this).GetComponent<ProjectileSimple>(); target = ((Component)this).GetComponent<ProjectileTargetComponent>(); } private void FixedUpdate() { simple.updateAfterFiring = Object.op_Implicit((Object)(object)target.target); } } [DefaultExecutionOrder(100)] internal class TurretChargeBehaviour : MonoBehaviour { private CharacterBody body; private CharacterModel model; private Material mat; public bool firing; public float stopwatch = 3f; public bool addstock; private void Awake() { model = ((Component)this).GetComponent<CharacterModel>(); } private void Start() { body = model.body; UpdateMaterial(); } public void UpdateMaterial() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)mat)) { Object.Destroy((Object)(object)mat); } mat = new Material(model.baseRendererInfos[3].defaultMaterial); model.baseRendererInfos[3].defaultMaterial = mat; model.baseRendererInfos[3].renderer.material = mat; if (!Object.op_Implicit((Object)(object)body)) { mat.SetTextureScale("_MainTex", new Vector2(2.07f, 1f)); mat.SetFloat("_EmPower", 2f); } } private void FixedUpdate() { //IL_00f3: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)model) || !Object.op_Implicit((Object)(object)mat)) { return; } if (firing) { if (stopwatch <= 0f) { stopwatch = 3f; } stopwatch -= Time.fixedDeltaTime; } else { stopwatch = 3f; } GenericSkill primary = body.skillLocator.primary; mat.SetTextureScale("_MainTex", new Vector2(primary.CanExecute() ? 2.07f : (firing ? 2.07f : Util.Remap(Math.Min(1f, primary.rechargeStopwatch / primary.finalRechargeInterval), 0f, 1f, 0.66f, 2.07f)), 1f)); } } [DefaultExecutionOrder(100)] internal class TurretSkinBehaviour : NetworkBehaviour { private CharacterBody body; private CharacterBody ownerBody; private NetworkLoadout networkLoadout; private BodyIndex bodyIndex; private ModelSkinController skinController; private TurretChargeBehaviour chargeBehaviour; private CharacterSelectSurvivorPreviewDisplayController displayController; private CharacterModel characterModel; private Renderer renderer; public Material mat; public bool applySkin = true; public float timer = 0.06f; private float stopwatch; private void Awake() { skinController = ((Component)this).GetComponent<ModelSkinController>(); chargeBehaviour = ((Component)this).GetComponent<TurretChargeBehaviour>(); characterModel = ((Component)this).GetComponent<CharacterModel>(); renderer = characterModel.baseRendererInfos[0].renderer; mat = renderer.material; } private void Start() { //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) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown body = ((Component)this).GetComponent<CharacterModel>().body; bodyIndex = BodyCatalog.FindBodyIndex("EngiBody"); if (!Object.op_Implicit((Object)(object)body)) { displayController = ((Component)this).GetComponentInParent<CharacterSelectSurvivorPreviewDisplayController>(); if (Object.op_Implicit((Object)(object)displayController)) { displayController.skinChangeResponses[0].response.AddListener((UnityAction)delegate { UpdateModel(0); }); displayController.skinChangeResponses[1].response.AddListener((UnityAction)delegate { UpdateModel(1); }); displayController.skinChangeResponses[2].response.AddListener((UnityAction)delegate { UpdateModel(2); }); } } else if (Object.op_Implicit((Object)(object)body.master) && Object.op_Implicit((Object)(object)body.master.minionOwnership) && Object.op_Implicit((Object)(object)body.master.minionOwnership.ownerMaster)) { ownerBody = body.master.minionOwnership.ownerMaster.GetBody(); if (Object.op_Implicit((Object)(object)ownerBody)) { body.skinIndex = ownerBody.skinIndex; UpdateModel((int)ownerBody.skinIndex); } } } private void FixedUpdate() { if (Object.op_Implicit((Object)(object)body)) { stopwatch += Time.fixedDeltaTime; if (applySkin && stopwatch >= timer) { applySkin = false; UpdateModel((int)body.skinIndex); } } } private void UpdateModel(int skinIndex) { if (Object.op_Implicit((Object)(object)skinController) && Object.op_Implicit((Object)(object)chargeBehaviour)) { ((Behaviour)skinController.characterModel).enabled = true; skinController.ApplySkin(skinIndex); chargeBehaviour.UpdateMaterial(); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } internal class TurretSpawner : NetworkBehaviour { private CharacterBody body; private static int kCmdCmdSpawn; private void Awake() { body = ((Component)this).GetComponent<CharacterBody>(); } [Command] public void CmdSpawn(Vector3 pos, Quaternion rot) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_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_0018: 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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0048: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) CharacterMaster val = new MasterSummon { masterPrefab = Prefabs.turretMaster, position = pos, rotation = rot, summonerBodyObject = ((Component)body).gameObject, ignoreTeamMemberLimit = true, inventoryToCopy = body.inventory, teamIndexOverride = body.teamComponent.teamIndex }.Perform(); Deployable val2 = ((Component)val).gameObject.AddComponent<Deployable>(); val2.onUndeploy = new UnityEvent(); val2.onUndeploy.AddListener(new UnityAction(val.TrueKill)); body.master.AddDeployable(val2, Prefabs.bigTurret); } private void UNetVersion() { } protected static void InvokeCmdCmdSpawn(NetworkBehaviour obj, NetworkReader reader) { //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) if (!NetworkServer.active) { Debug.LogError((object)"Command CmdSpawn called on client."); } else { ((TurretSpawner)(object)obj).CmdSpawn(reader.ReadVector3(), reader.ReadQuaternion()); } } public void CallCmdSpawn(Vector3 pos, Quaternion rot) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_005c: 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_0022: 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) if (!NetworkClient.active) { Debug.LogError((object)"Command function CmdSpawn called on server."); return; } if (((NetworkBehaviour)this).isServer) { CmdSpawn(pos, rot); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)5); val.WritePackedUInt32((uint)kCmdCmdSpawn); val.Write(((Component)this).GetComponent<NetworkIdentity>().netId); val.Write(pos); val.Write(rot); ((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdSpawn"); } static TurretSpawner() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown kCmdCmdSpawn = -274844957; NetworkBehaviour.RegisterCommandDelegate(typeof(TurretSpawner), kCmdCmdSpawn, new CmdDelegate(InvokeCmdCmdSpawn)); NetworkCRC.RegisterBehaviour("TurretSpawner", 0); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } internal class ViendUncorruptAlt : MonoBehaviour { private CharacterBody body; public GenericSkill secondary; public GenericSkill utility; public VoidSurvivorController controller; public bool hasAlt; public bool secondaryAlt; public bool utilityAlt; public float angle = 25f; private void Awake() { body = ((Component)this).GetComponent<CharacterBody>(); controller = ((Component)this).GetComponent<VoidSurvivorController>(); } private void Start() { secondary = body.skillLocator.secondary; utility = body.skillLocator.utility; if (secondary.skillNameToken == "AEROSVIEND_SECONDARY") { hasAlt = true; secondaryAlt = true; } if (utility.skillNameToken == "AEROSVIEND_UTIL") { hasAlt = true; utilityAlt = true; } } } internal class Hook { internal static void Hooks() { //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 RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); GenericSkill.SetSkillOverride += new hook_SetSkillOverride(GenericSkill_SetSkillOverride); GenericSkill.UnsetSkillOverride += new hook_UnsetSkillOverride(GenericSkill_UnsetSkillOverride); SeekerController.CmdIncrementChakraGate += new hook_CmdIncrementChakraGate(SeekerController_CmdIncrementChakraGate); } private static void SeekerController_CmdIncrementChakraGate(orig_CmdIncrementChakraGate orig, SeekerController self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.specialSkillSlot) && (Object)(object)self.specialSkillSlot.skillDef == (Object)(object)MainPlugin.seekerGenkidama) { self.UnlockGateEffects(self.characterBody.master.seekerChakraGate); } } private static void GenericSkill_UnsetSkillOverride(orig_UnsetSkillOverride orig, GenericSkill self, object source, SkillDef skillDef, SkillOverridePriority priority) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 //IL_00ae: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown ViendUncorruptAlt component = ((Component)self).GetComponent<ViendUncorruptAlt>(); if (Object.op_Implicit((Object)(object)component) && component.hasAlt && (int)priority == 2) { bool flag = (Object)(object)self == (Object)(object)component.secondary; if ((component.secondaryAlt && flag) || (component.utilityAlt && (Object)(object)self == (Object)(object)component.utility)) { SkillOverride val = new SkillOverride(source, flag ? MainPlugin.viendSecondaryCorrupted : MainPlugin.viendUtilCorrupted, priority); int num = self.FindSkillOverrideIndex(ref val); if (num != -1) { ArrayUtils.ArrayRemoveAtAndResize<SkillOverride>(ref self.skillOverrides, num, 1); self.PickCurrentOverride(); } return; } } orig.Invoke(self, source, skillDef, priority); } private static void GenericSkill_SetSkillOverride(orig_SetSkillOverride orig, GenericSkill self, object source, SkillDef skillDef, SkillOverridePriority priority) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 //IL_00b8: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown ViendUncorruptAlt component = ((Component)self).GetComponent<ViendUncorruptAlt>(); if (Object.op_Implicit((Object)(object)component) && component.hasAlt && (int)priority == 2 && component.controller.corruption >= 100f) { bool flag = (Object)(object)self == (Object)(object)component.secondary; if ((component.secondaryAlt && flag) || (component.utilityAlt && (Object)(object)self == (Object)(object)component.utility)) { SkillOverride val = new SkillOverride(source, flag ? MainPlugin.viendSecondaryCorrupted : MainPlugin.viendUtilCorrupted, priority); if (self.FindSkillOverrideIndex(ref val) == -1) { ArrayUtils.ArrayAppend<SkillOverride>(ref self.skillOverrides, ref val); self.PickCurrentOverride(); } return; } } orig.Invoke(self, source, skillDef, priority); } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_00af: 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_0110: 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_0128: 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_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021b: 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_0231: Expected O, but got Unknown //IL_024e: 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_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: 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_02b5: 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_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) bool flag = Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(Prefabs.block); float damage = damageInfo.damage; float num = Math.Clamp(MainPlugin.blockAmount.Value, 0.01f, 1f); if (flag) { damageInfo.damage *= 1f - num; } orig.Invoke(self, damageInfo); if (flag) { self.AddBarrier(damage * num); } if (!Object.op_Implicit((Object)(object)damageInfo.attacker) || !(damageInfo.procCoefficient > 0f)) { return; } CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.flameSwordHit)) { InflictDotInfo val = default(InflictDotInfo); val.attackerObject = damageInfo.attacker; val.victimObject = ((Component)self).gameObject; val.totalDamage = 5.875f * MainPlugin.mageFlameSwordBurnDuration.Value; val.damageMultiplier = 1f; val.dotIndex = (DotIndex)1; val.maxStacksFromAttacker = 2147483647u; InflictDotInfo val2 = val; StrengthenBurnUtils.CheckDotForUpgrade(component.inventory, ref val2); DotController.InflictDot(ref val2); } if ((Object)(object)MainPlugin.seekerPassive != (Object)null && Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)((Component)component).GetComponent<SeekerController>()) && Object.op_Implicit((Object)(object)Array.Find(((Component)component).GetComponents<GenericSkill>(), (GenericSkill x) => (Object)(object)x.skillDef == (Object)(object)MainPlugin.seekerPassive))) { self.body.AddTimedBuff(Prefabs.seekerPassiveBuff, 8f); int buffCount = self.body.GetBuffCount(Prefabs.seekerPassiveBuff); if (buffCount >= MainPlugin.passiveMaxStacks.Value) { self.body.ClearTimedBuffs(Prefabs.seekerPassiveBuff); Vector3 corePosition = self.body.corePosition; float num2 = 3f; EffectManager.SpawnEffect(Prefabs.Load<GameObject>("RoR2/DLC2/Seeker/SoulSearchExplosionVFX.prefab"), new EffectData { origin = corePosition, scale = num2 }, true); float num3 = (float)(1 + component.GetBuffCount(Buffs.ChakraBuff)) * MainPlugin.passiveAddDamage.Value; new BlastAttack { attacker = damageInfo.attacker, attackerFiltering = (AttackerFiltering)2, falloffModel = (FalloffModel)0, baseDamage = component.damage * MainPlugin.passiveBaseDamage.Value + num3, crit = component.RollCrit(), damageType = DamageTypeCombo.Generic, damageColorIndex = (DamageColorIndex)10, inflictor = ((Component)component).gameObject, procCoefficient = 0f, radius = num2, teamIndex = component.teamComponent.teamIndex, position = corePosition }.Fire(); } } } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Prefabs.viendSpeedBuff)) { args.moveSpeedMultAdd += MainPlugin.viendSpeedBuff.Value; } if (sender.HasBuff(Prefabs.block)) { args.moveSpeedReductionMultAdd += MainPlugin.blockSpeedReduction.Value; } if (sender.HasBuff(Prefabs.overclock)) { args.baseRegenAdd += MainPlugin.regen.Value; args.baseAttackSpeedAdd += MainPlugin.atkspd.Value; args.baseMoveSpeedAdd += MainPlugin.movspd.Value; args.cooldownMultAdd += 0f - MainPlugin.cooldown.Value; } } } [NetworkCompatibility(/*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.*/)] [BepInPlugin("com.Dragonyck.AerosSkills", "AerosSkills", "2.2.0")] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.AerosSkills"; public const string MODNAME = "AerosSkills"; public const string VERSION = "2.2.0"; public const string MODKEY = "AEROS"; internal static ConfigFile captainCfg; internal static ConfigEntry<bool> enableCap; internal static ConfigEntry<bool> enableCapPrimary; internal static ConfigEntry<bool> enableCapSecondary; internal static ConfigEntry<float> burstDMG; internal static ConfigEntry<float> radius; internal static ConfigEntry<float> regen; internal static ConfigEntry<float> atkspd; internal static ConfigEntry<float> movspd; internal static ConfigEntry<float> cooldown; internal static ConfigEntry<float> duration; internal static ConfigEntry<float> CD; internal static ConfigFile engiCfg; internal static ConfigEntry<bool> enableEngi; internal static ConfigEntry<bool> enableEngiPrimary; internal static ConfigEntry<bool> enableEngiSpecial; internal static ConfigEntry<float> missileDamageCoefficient; internal static ConfigEntry<bool> missileTracking; internal static ConfigEntry<float> turretDamageCoefficient; internal static ConfigFile loaderCfg; internal static ConfigEntry<bool> enableLoader; internal static ConfigEntry<bool> enableLoaderUtility; internal static ConfigEntry<bool> enableLoaderSpecial; internal static ConfigEntry<bool> enableLoaderOldSkills; internal static ConfigEntry<float> blockDuration; internal static ConfigEntry<float> blockInvincibilityDuration; internal static ConfigEntry<float> blockSpeedReduction; internal static ConfigEntry<float> blockAmount; internal static ConfigEntry<float> blockAmountOld; internal static ConfigEntry<float> blockWaveDamage; internal static ConfigEntry<int> maxPunchCount; internal static ConfigEntry<float> punchDamageCoefficient; internal static ConfigEntry<float> punchMinDamageCoefficient; internal static ConfigEntry<float> punchMaxDamageCoefficient; internal static ConfigEntry<float> punchChargeTime; internal static ConfigEntry<float> punchVelocity; internal static ConfigEntry<float> punchSpeed; internal static ConfigEntry<float> punchComboBackForce; internal static ConfigEntry<float> punchComboUpForce; internal static ConfigEntry<float> punchComboFirstHitDamageCoefficient; internal static ConfigFile seekerCfg; internal static ConfigEntry<bool> enableSeeker; internal static ConfigEntry<bool> enableSeekerPassive; internal static ConfigEntry<bool> enableSeekerSpecial; internal static ConfigEntry<float> genkidamaBaseDamage; internal static ConfigEntry<float> genkidamaAddDamage; internal static ConfigEntry<float> passiveBaseDamage; internal static ConfigEntry<float> passiveAddDamage; internal static ConfigEntry<int> passiveMaxStacks; internal static ConfigFile viendCfg; internal static ConfigEntry<bool> enableViend; internal static ConfigEntry<bool> enableViendSecondary; internal static ConfigEntry<bool> enableViendUtility; internal static ConfigEntry<float> viendSpeedBuff; internal static ConfigEntry<float> viendSelfDMG; internal static ConfigEntry<float> beamFireFrequency; internal static ConfigEntry<float> beamDMG; internal static ConfigEntry<float> beamForce; internal static ConfigEntry<float> beamDMGCorrupted; internal static ConfigEntry<float> beamDuration; internal static ConfigFile mageCfg; internal static ConfigEntry<bool> enableMage; internal static ConfigEntry<bool> enableMageSecondary; internal static ConfigEntry<bool> enableMageSpecial; internal static ConfigEntry<float> mageSpecialDamage; internal static ConfigEntry<float> mageFlameSwordMinDamage; internal static ConfigEntry<float> mageFlameSwordMaxDamage; internal static ConfigEntry<float> mageFlameSwordMaxChargeTime; internal static ConfigEntry<float> mageFlameSwordBurnDuration; internal static BepInPlugin Metadata; internal static string Location; internal static SkillDef engiScepter; internal static SkillDef viendSecondary; internal static SkillDef viendSecondaryCorrupted; internal static SkillDef viendUtil; internal static SkillDef viendUtilCorrupted; internal static SkillDef seekerPassive; internal static SkillDef seekerGenkidama; private void Awake() { Location = ((BaseUnityPlugin)this).Info.Location; Metadata = ((BaseUnityPlugin)this).Info.Metadata; CreateConfigs(); Assets.PopulateAssets(); Prefabs.CreatePrefabs(); GameObject val = null; SkillLocator val2 = null; if (enableCap.Value) { val = Prefabs.Load<GameObject>("RoR2/Base/Captain/CaptainBody.prefab"); val2 = val.GetComponent<SkillLocator>(); val.AddComponent<CrosshairSwap>(); Prefabs.spreadBloomCurve = Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoBody.prefab").GetComponent<CharacterBody>().spreadBloomCurve; if (enableCapPrimary.Value) { CaptainPrimarySetup(val2); } if (enableCapSecondary.Value) { CaptainSecondarySetup(val2); } } if (enableEngi.Value) { val = Prefabs.Load<GameObject>("RoR2/Base/Engi/EngiBody.prefab"); val.AddComponent<TurretSpawner>(); val2 = val.GetComponent<SkillLocator>(); if (enableEngiPrimary.Value) { EngiPrimarySetup(val2); } if (enableEngiSpecial.Value) { EngiSpecialSetup(val2); } if (ModCompat.AncientScepterEnabled) { ModCompat.AddScepterSupport(); } } if (enableLoader.Value) { val = Prefabs.Load<GameObject>("RoR2/Base/Loader/LoaderBody.prefab"); val2 = val.GetComponent<SkillLocator>(); val.gameObject.AddComponent<DebugHelper>(); if (enableLoaderOldSkills.Value) { if (enableLoaderUtility.Value) { LoaderUtilitySetupOld(val2); } if (enableLoaderSpecial.Value) { LoaderSpecialSetupOld(val2); } } else { LoaderUtilitySetup(val2); LoaderSpecialSetup(val2); } } if (enableSeeker.Value) { val = Prefabs.Load<GameObject>("RoR2/DLC2/Seeker/SeekerBody.prefab"); val2 = val.GetComponent<SkillLocator>(); if (enableSeekerPassive.Value) { SeekerPassiveSetup(val2); } if (enableSeekerSpecial.Value) { SeekerSpecialSetup(val2); } } if (enableViend.Value) { val = Prefabs.Load<GameObject>("RoR2/DLC1/VoidSurvivor/VoidSurvivorBody.prefab"); val.gameObject.AddComponent<ViendUncorruptAlt>(); val2 = val.GetComponent<SkillLocator>(); if (enableViendSecondary.Value) { ViendSecondarySetup(val2); } if (enableViendUtility.Value) { ViendUtilitySetup(val2); } } if (enableMage.Value) { val = Prefabs.Load<GameObject>("RoR2/Base/Mage/MageBody.prefab"); val.gameObject.AddComponent<DebugHelper>(); val2 = val.GetComponent<SkillLocator>(); if (enableMageSecondary.Value) { MageSecondarySetup(val2); } if (enableMageSpecial.Value) { MageSpecialSetup(val2); } } RegisterStates(); Hook.Hooks(); } private void CreateConfigs() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Expected O, but got Unknown //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Expected O, but got Unknown //IL_05ad: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Expected O, but got Unknown //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_06fb: Expected O, but got Unknown captainCfg = new ConfigFile(Paths.ConfigPath + "\\AerosSkills\\Captain.cfg", true); enableCap = captainCfg.Bind<bool>("General", "Enable Captain Skills", true, (ConfigDescription)null); enableCapPrimary = captainCfg.Bind<bool>("General", "Enable Captain Primary Skill", true, (ConfigDescription)null); enableCapSecondary = captainCfg.Bind<bool>("General", "Enable Captain Secondary Skill", true, (ConfigDescription)null); burstDMG = captainCfg.Bind<float>("VulcanRepeater", "Damage Coefficient", 1.65f, (ConfigDescription)null); radius = captainCfg.Bind<float>("Overclock", "Explosion Radius", 12f, (ConfigDescription)null); regen = captainCfg.Bind<float>("Overclock", "Base Health Regen Add", 5f, (ConfigDescription)null); atkspd = captainCfg.Bind<float>("Overclock", "Base Attack Speed Add", 0.6f, (ConfigDescription)null); movspd = captainCfg.Bind<float>("Overclock", "Base Movement Speed Add", 5f, (ConfigDescription)null); cooldown = captainCfg.Bind<float>("Overclock", "Cooldown Reduction Mult", 0.5f, (ConfigDescription)null); duration = captainCfg.Bind<float>("Overclock", "Buff Duration", 5f, (ConfigDescription)null); CD = captainCfg.Bind<float>("Overclock", "Skill Cooldown", 8f, (ConfigDescription)null); engiCfg = new ConfigFile(Paths.ConfigPath + "\\AerosSkills\\Engineer.cfg", true); enableEngi = engiCfg.Bind<bool>("General", "Enable Engineer Skills", true, (ConfigDescription)null); enableEngiPrimary = engiCfg.Bind<bool>("General", "Enable Engineer Primary Skill", true, (ConfigDescription)null); enableEngiSpecial = engiCfg.Bind<bool>("General", "Enable Engineer Special Skill", true, (ConfigDescription)null); missileDamageCoefficient = engiCfg.Bind<float>("Missiles", "Damage Coefficient", 1.4f, (ConfigDescription)null); missileTracking = engiCfg.Bind<bool>("Seekers", "Enable Tracking", true, (ConfigDescription)null); turretDamageCoefficient = engiCfg.Bind<float>("TR90 Railgun Turret", "Damage Coefficient", 30f, (ConfigDescription)null); loaderCfg = new ConfigFile(Paths.ConfigPath + "\\AerosSkills\\Loader.cfg", true); enableLoader = loaderCfg.Bind<bool>("General", "Enable Loader Skills", true, (ConfigDescription)null); enableLoaderUtility = loaderCfg.Bind<bool>("General", "Enable Loader Utility Skill", true, (ConfigDescription)null); enableLoaderSpecial = loaderCfg.Bind<bool>("General", "Enable Loader Special Skill", true, (ConfigDescription)null); blockDuration = loaderCfg.Bind<float>("Block", "Duration", 10f, (ConfigDescription)null); blockInvincibilityDuration = loaderCfg.Bind<float>("Block", "Invincibility Duration", 0.5f, (ConfigDescription)null); blockSpeedReduction = loaderCfg.Bind<float>("Block", "Speed Reduction", 0.6f, (ConfigDescription)null); blockAmount = loaderCfg.Bind<float>("Block", "Block Coefficient", 0.5f, (ConfigDescription)null); blockAmountOld = loaderCfg.Bind<float>("Block", "Old Block Coefficient", 0.8f, (ConfigDescription)null); blockWaveDamage = loaderCfg.Bind<float>("Block", "Block Wave Damage Coefficient", 4.5f, (ConfigDescription)null); maxPunchCount = loaderCfg.Bind<int>("Charged Barrage", "Max Punch Count", 9, (ConfigDescription)null); punchMinDamageCoefficient = loaderCfg.Bind<float>("Charged Barrage", "Charge Min Damage Coefficient", 6f, (ConfigDescription)null); punchMaxDamageCoefficient = loaderCfg.Bind<float>("Charged Barrage", "Charge Max Damage Coefficient", 27f, (ConfigDescription)null); punchDamageCoefficient = loaderCfg.Bind<float>("Charged Barrage", "Damage Coefficient", 3.5f, (ConfigDescription)null); punchChargeTime = loaderCfg.Bind<float>("Charged Barrage", "Charge Time Required Per Punch", 0.15f, (ConfigDescription)null); punchVelocity = loaderCfg.Bind<float>("Charged Barrage", "Added Velocity After Charge", 5f, (ConfigDescription)null); punchSpeed = loaderCfg.Bind<float>("Charged Barrage", "Swing Duration", 0.13f, (ConfigDescription)null); punchComboBackForce = loaderCfg.Bind<float>("Charged Barrage", "Backwards Force", 4400f, (ConfigDescription)null); punchComboUpForce = loaderCfg.Bind<float>("Charged Barrage", "Upwards Force", 2700f, (ConfigDescription)null); punchComboFirstHitDamageCoefficient = loaderCfg.Bind<float>("Charged Barrage", "First Hit Damage Coefficient", 8f, (ConfigDescription)null); enableLoaderOldSkills = loaderCfg.Bind<bool>("General", "Enable Old Skills", false, (ConfigDescription)null); seekerCfg = new ConfigFile(Paths.ConfigPath + "\\AerosSkills\\Seeker.cfg", true); enableSeeker = seekerCfg.Bind<bool>("General", "Enable Seeker Skills", true, (ConfigDescription)null); enableSeekerPassive = seekerCfg.Bind<bool>("General", "Enable Seeker Passive Skill", true, (ConfigDescription)null); enableSeekerSpecial = seekerCfg.Bind<bool>("General", "Enable Seeker Special Skill", true, (ConfigDescription)null); genkidamaBaseDamage = seekerCfg.Bind<float>("Soul Detonation", "Base Damage", 5f, (ConfigDescription)null); genkidamaAddDamage = seekerCfg.Bind<float>("Soul Detonation", "Additional Damage Per Tranquility", 2f, (ConfigDescription)null); passiveBaseDamage = seekerCfg.Bind<float>("Soul Stack", "Base Damage", 0.5f, (ConfigDescription)null); passiveAddDamage = seekerCfg.Bind<float>("Soul Stack", "Additional Damage Per Tranquility", 0.3f, (ConfigDescription)null); passiveMaxStacks = seekerCfg.Bind<int>("Soul Stack", "Max Stacks", 3, (ConfigDescription)null); viendCfg = new ConfigFile(Paths.ConfigPath + "\\AerosSkills\\Viend.cfg", true); enableViend = viendCfg.Bind<bool>("General", "Enable Viend Skills", true, (ConfigDescription)null); enableViendSecondary = viendCfg.Bind<bool>("General", "Enable Viend Secondary Skill", true, (ConfigDescription)null); enableViendUtility = viendCfg.Bind<bool>("General", "Enable Viend Utility Skill", true, (ConfigDescription)null); viendSpeedBuff = viendCfg.Bind<float>("「 Sub?merge?? 】", "Corrupted Speed Mult", 0.4f, (ConfigDescription)null); viendSelfDMG = viendCfg.Bind<float>("「 Sub?merge?? 】", "MaxHP Self Damage Mult", 0.01f, (ConfigDescription)null); beamDuration = viendCfg.Bind<float>("『 P??luck 」", "Max Duration", 3f, (ConfigDescription)null); beamFireFrequency = viendCfg.Bind<float>("『 P??luck 」", "Fire Frequency", 0.25f, (ConfigDescription)null); beamDMG = viendCfg.Bind<float>("『 P??luck 」", "Damage", 0.7f, (ConfigDescription)null); beamForce = viendCfg.Bind<float>("『 P??luck 」", "Pull Force", -1700f, (ConfigDescription)null); beamDMGCorrupted = viendCfg.Bind<float>("『 P??luck 」 Corrupted", "Damage", 4.2f, (ConfigDescription)null); mageCfg = new ConfigFile(Paths.ConfigPath + "\\AerosSkills\\Artificer.cfg", true); enableMage = viendCfg.Bind<bool>("General", "Enable Artificer Skills", true, (ConfigDescription)null); enableMageSecondary = viendCfg.Bind<bool>("General", "Enable Artificer Secondary Skill", true, (ConfigDescription)null); enableMageSpecial = viendCfg.Bind<bool>("General", "Enable Artificer Special Skill", true, (ConfigDescription)null); mageSpecialDamage = mageCfg.Bind<float>("Frigid Outburst", "Damage Coefficient", 8f, (ConfigDescription)null); mageFlameSwordMaxChargeTime = mageCfg.Bind<float>("Conjure Nano-Blade", "Charge Time", 2f, (ConfigDescription)null); mageFlameSwordMinDamage = mageCfg.Bind<float>("Conjure Nano-Blade", "Min Damage Coefficient", 10f, (ConfigDescription)null); mageFlameSwordMaxDamage = mageCfg.Bind<float>("Conjure Nano-Blade", "Max Damage Coefficient", 20f, (ConfigDescription)null); mageFlameSwordBurnDuration = mageCfg.Bind<float>("Conjure Nano-Blade", "Burn Duration", 8f, (ConfigDescription)null); } private void MageSecondarySetup(SkillLocator skillLocator) { LanguageAPI.Add("AEROSMAGE_SEC", "Conjure Nano-Blade"); LanguageAPI.Add("AEROSMAGE_SEC_DESCRIPTION", "<style=cIsDamage>Ignite</style>. Charge up a flaming sword that deals <style=cIsDamage>" + mageFlameSwordMinDamage.Value * 100f + "%-" + mageFlameSwordMaxDamage.Value * 100f + "% damage</style>. At max charge, fire a <style=cIsDamage>piercing</style> projectile instead."); SkillDef skillDef = Utils.NewSkillDef<SkillDef>(typeof(FireSwordCharge), "Weapon", 1, 5f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("mageSecondary"), "AEROSMAGE_SEC_DESCRIPTION", "AEROSMAGE_SEC", Array.Empty<string>()); Utils.AddAlt(skillLocator.secondary._skillFamily, skillDef); } private void MageSpecialSetup(SkillLocator skillLocator) { LanguageAPI.Add("AEROSMAGE_SPEC", "Frigid Outburst"); LanguageAPI.Add("AEROSMAGE_SPEC_DESCRIPTION", "<style=cIsUtility>Freezing</style>. Launches you in the direction you are moving, dealing <style=cIsDamage>" + mageSpecialDamage.Value * 100f + "% damage</style> to nearby enemies."); SkillDef skillDef = Utils.NewSkillDef<SkillDef>(typeof(MageSpecial), "Body", 1, 12f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("mageSpecial"), "AEROSMAGE_SPEC_DESCRIPTION", "AEROSMAGE_SPEC", Array.Empty<string>()); Utils.AddAlt(skillLocator.special._skillFamily, skillDef); } private void LoaderUtilitySetup(SkillLocator skillLocator) { LanguageAPI.Add("AEROSLOADER_UTIL", "Charged Barrage"); LanguageAPI.Add("AEROSLOADER_UTIL_DESCRIPTION", "Charge up to dash forward, dealing <style=cIsDamage>" + punchMinDamageCoefficient.Value * 100f + "%-" + punchMaxDamageCoefficient.Value * 100f + "% damage</style> and perform a series of punches on hit for <style=cIsDamage>5x" + punchDamageCoefficient.Value * 100f + "% damage</style>."); SkillDef skillDef = Utils.NewSkillDef<SkillDef>(typeof(ChargeFist), "Weapon", 1, 8f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("loaderutility"), "AEROSLOADER_UTIL_DESCRIPTION", "AEROSLOADER_UTIL", Array.Empty<string>()); Utils.AddAlt(skillLocator.utility._skillFamily, skillDef); } private void LoaderSpecialSetup(SkillLocator skillLocator) { LanguageAPI.Add("AEROSLOADER_SPEC", "Block"); LanguageAPI.Add("AEROSLOADER_SPEC_DESCRIPTION", "Enter a block stance for up to <style=cIsDamage>" + blockDuration.Value + "s</style>, blocking <style=cIsDamage>" + blockAmount.Value * 100f + "% damage</style> of all incoming damage and turning it into <style=cIsHealing>barrier</style>. Finishes by consuming all barrier and releasing a lightning explosion around you for " + blockWaveDamage.Value * 100f + "% damage</style>, increasing in damage and size based on the amount of barrier consumed. Grants <style=cIsDamage>invincibility</style> for <style=cIsUtility>0.5s</style> after releasing."); SkillDef skillDef = Utils.NewSkillDef<SkillDef>(typeof(Block), "Weapon", 1, 8f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("loaderspecial"), "AEROSLOADER_SPEC_DESCRIPTION", "AEROSLOADER_SPEC", Array.Empty<string>()); Utils.AddAlt(skillLocator.special._skillFamily, skillDef); } private void LoaderUtilitySetupOld(SkillLocator skillLocator) { LanguageAPI.Add("AEROSLOADER_UTIL", "Charged Barrage"); LanguageAPI.Add("AEROSLOADER_UTIL_DESCRIPTION", "Charge up to perform a series of punches for <style=cIsDamage>" + punchDamageCoefficient.Value * 100f + "% damage</style> each, increasing in count with charge time."); SkillDef skillDef = Utils.NewSkillDef<SkillDef>(typeof(ChargePunchesOld), "Weapon", 1, 8f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("loaderutility"), "AEROSLOADER_UTIL_DESCRIPTION", "AEROSLOADER_UTIL", Array.Empty<string>()); Utils.AddAlt(skillLocator.utility._skillFamily, skillDef); } private void LoaderSpecialSetupOld(SkillLocator skillLocator) { LanguageAPI.Add("AEROSLOADER_SPEC", "Block"); LanguageAPI.Add("AEROSLOADER_SPEC_DESCRIPTION", "Enter a block stance for up to <style=cIsDamage>" + blockDuration.Value + "s</style>, blocking " + blockAmountOld.Value * 100f + "% damage</style> of all incoming damage and turning it into <style=cIsHealing>barrier</style>. Finishes by consuming all barrier and releasing a lightning wave for " + blockWaveDamage.Value * 100f + "% damage</style>, increasing in damage and size based on the amount of barrier consumed."); SkillDef skillDef = Utils.NewSkillDef<SkillDef>(typeof(BlockOld), "Weapon", 1, 8f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("loaderspecial"), "AEROSLOADER_SPEC_DESCRIPTION", "AEROSLOADER_SPEC", Array.Empty<string>()); Utils.AddAlt(skillLocator.special._skillFamily, skillDef); } private void ViendSecondarySetup(SkillLocator skillLocator) { LanguageAPI.Add("AEROSVIEND_SECONDARY", "『 P??luck 」"); LanguageAPI.Add("AEROSVIEND_SECONDARY_DESCRIPTION", "Fire a long-range beam for <style=cIsDamage>" + beamDMG.Value * 100f * (1f / beamFireFrequency.Value) + "% damage</style> per second, <style=cIsUtility>pulling</style> enemies hit."); SkillDef skillDef = Utils.NewSkillDef<SkillDef>(typeof(Beam), "Weapon", 1, 5f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 1, 1, 1, Prefabs.viendSecondary, "AEROSVIEND_SECONDARY_DESCRIPTION", "AEROSVIEND_SECONDARY", Array.Empty<string>()); Utils.AddAlt(skillLocator.secondary._skillFamily, skillDef); viendSecondary = skillDef; LanguageAPI.Add("AEROSVIEND_SECONDARY_CORRUPT", "『 P??luck 」 Corrupted"); LanguageAPI.Add("AEROSVIEND_SECONDARY_DESCRIPTION_CORRUPT", "Fire an instant long-range beam for <style=cIsDamage>" + beamDMGCorrupted.Value * 100f + "% damage</style>. Enemies hit are <style=cIsUtility>teleported</style> to you."); skillDef = Utils.NewSkillDef<SkillDef>(typeof(BeamCorrupted), "Weapon", 1, 5f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 1, 1, 1, Prefabs.viendSecondaryCorrupted, "AEROSVIEND_SECONDARY_DESCRIPTION_CORRUPT", "AEROSVIEND_SECONDARY_CORRUPT", Array.Empty<string>()); viendSecondaryCorrupted = skillDef; } private void ViendUtilitySetup(SkillLocator skillLocator) { LanguageAPI.Add("AEROSVIEND_UTIL", "「 Sub?merge?? 】"); LanguageAPI.Add("AEROSVIEND_UTIL_DESCRIPTION", "Enter a 「 Sub?merge?? 】, being unable to damage or be damaged by enemies, and receive <style=cIsHealth>" + viendSelfDMG.Value * 5f * 100f + "% damage</style> per second, that increases over time."); SkillDef skillDef = Utils.NewSkillDef<SkillDef>(typeof(Dimension), "Weapon", 1, 5f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Prefabs.viendUtility, "AEROSVIEND_UTIL_DESCRIPTION", "AEROSVIEND_UTIL", Array.Empty<string>()); Utils.AddAlt(skillLocator.utility._skillFamily, skillDef); viendUtil = skillDef; LanguageAPI.Add("AEROSVIEND_UTIL_CORRUPT", "「 Sub?merge?? 】 Corrupted"); LanguageAPI.Add("AEROSVIEND_UTIL_DESCRIPTION_CORRUPT", "Gain <style=cIsUtility>" + viendSpeedBuff.Value * 100f + "% movement speed</style>. Enter a 「 Sub?merge?? 】, being unable to damage or be damaged by enemies, and receive <style=cIsHealth> " + viendSelfDMG.Value * 5f * 100f + "% damage</style> per second, that increases over time."); skillDef = Utils.NewSkillDef<SkillDef>(typeof(DimensionCorrupted), "Weapon", 1, 5f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Prefabs.viendUtilityCorrupted, "AEROSVIEND_UTIL_DESCRIPTION_CORRUPT", "AEROSVIEND_UTIL_CORRUPT", Array.Empty<string>()); viendUtilCorrupted = skillDef; } private void SeekerPassiveSetup(SkillLocator skillLocator) { LanguageAPI.Add("AEROSSEEKER_PASSIVE0", "No passive."); LanguageAPI.Add("AEROSSEEKER_PASSIVE", "Soul Stack"); LanguageAPI.Add("AEROSSEEKER_PASSIVE_DESCRIPTION", "Apply a stack of <style=cIsDamage>Soul Stack</style> on hit. Reaching <style=cIsUtility>" + passiveMaxStacks.Value + " stacks</style> will cause the enemy to detonate for <style=cIsDamage>" + passiveBaseDamage.Value * 100f + "% damage</style>."); LanguageAPI.Add("AEROSSEEKER_LOADOUT", "Passive"); SkillDef skill = Utils.NewSkillDef<SkillDef>(typeof(Idle), "Weapon", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 0, 0, 0, Prefabs.Load<Sprite>("RoR2/Base/UI/texUIHighlightBoxOutlineThickIcon.png"), "", "AEROSSEEKER_PASSIVE0", Array.Empty<string>()); GenericSkill val = Utils.NewGenericSkill(((Component)skillLocator).gameObject, skill); SkillsAPI.SetOrderPriority(val, -1); SkillsAPI.SetLoadoutTitleTokenOverride(val, "AEROSSEEKER_LOADOUT"); skill = Utils.NewSkillDef<GroundedSkillDef>(typeof(Idle), "Weapon", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 0, 0, 0, Assets.MainAssetBundle.LoadAsset<Sprite>("seekerpassive"), "AEROSSEEKER_PASSIVE_DESCRIPTION", "AEROSSEEKER_PASSIVE", Array.Empty<string>()); Utils.AddAlt(val.skillFamily, skill); seekerPassive = skill; } private void SeekerSpecialSetup(SkillLocator skillLocator) { LanguageAPI.Add("AEROSSEEKER_SPEC", "Soul Detonation"); LanguageAPI.Add("AEROSSEEKER_SPEC_DESCRIPTION", "Charge up a <style=cIsDamage>exploding</style> soul orb by <style=cIsUtility>executing</style> timed sequences, gaining <style=cIsUtility>size</style> and <style=cIsUtility>Tranquility</style>, that deals <style=cIsDamage>" + genkidamaBaseDamage.Value * 100f + "%-" + genkidamaAddDamage.Value * 7f * 100f + "% damage</style>."); Utils.AddAlt(SkillDef: seekerGenkidama = Utils.NewSkillDef<SkillDef>(typeof(Genkidama), "Weapon", 1, 12f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: true, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("seekerspecial"), "AEROSSEEKER_SPEC_DESCRIPTION", "AEROSSEEKER_SPEC", Array.Empty<string>()), skillFamily: skillLocator.special._skillFamily); } private void EngiSpecialSetup(SkillLocator skillLocator) { LanguageAPI.Add("AEROSENGI_SPEC2", "TR90 Railgun Turret"); LanguageAPI.Add("AEROSENGI_SPEC", "TR90 Railgun Turret"); LanguageAPI.Add("AEROSENGI_SPEC_DESCRIPTION", "Drop a turret that charges up over <style=cIsUtility>8s</style> and fires for <style=cIsDamage>" + turretDamageCoefficient.Value * 100f + "% damage</style>, inheriting all of your items."); SkillDef skillDef = Utils.NewSkillDef<SkillDef>(typeof(EngiSpecial), "Weapon", 1, 25f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: true, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("engispecial"), "AEROSENGI_SPEC_DESCRIPTION", "AEROSENGI_SPEC", Array.Empty<string>()); Utils.AddAlt(skillLocator.special._skillFamily, skillDef); skillDef = Utils.NewSkillDef<SkillDef>(typeof(EngiSpecial), "Weapon", 1, 25f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: true, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("engispecial2"), "AEROSENGI_SPEC_DESCRIPTION", "AEROSENGI_SPEC2", Array.Empty<string>()); engiScepter = skillDef; } private void EngiPrimarySetup(SkillLocator skillLocator) { LanguageAPI.Add("AEROSENGI_M1", "Seekers"); LanguageAPI.Add("AEROSENGI_M1_DESCRIPTION", "Charge up to <style=cIsDamage>8</style> missiles that deal <style=cIsDamage>" + missileDamageCoefficient.Value * 100f + "% damage</style> each."); SkillDef skillDef = Utils.NewSkillDef<SkillDef>(typeof(EngiPrimaryCharge), "Weapon", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: true, 0, 0, 0, Assets.MainAssetBundle.LoadAsset<Sprite>("engiprimary"), "AEROSENGI_M1_DESCRIPTION", "AEROSENGI_M1", Array.Empty<string>()); Utils.AddAlt(skillLocator.primary._skillFamily, skillDef); } private void CaptainPrimarySetup(SkillLocator skillLocator) { LanguageAPI.Add("AEROSCAP_M1", "Vulcan Repeater"); LanguageAPI.Add("AEROSCAP_M1_DESCRIPTION", "Fire a quick burst of <style=cIsDamage>3</style> pellets that deal <style=cIsDamage>3x" + burstDMG.Value * 100f + "% damage</style>."); SkillDef skillDef = Utils.NewSkillDef<SkillDef>(typeof(CaptainPrimary), "Weapon", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: true, 0, 0, 0, Assets.MainAssetBundle.LoadAsset<Sprite>("capprimary"), "AEROSCAP_M1_DESCRIPTION", "AEROSCAP_M1", Array.Empty<string>()); Utils.AddAlt(skillLocator.primary._skillFamily, skillDef); } private void CaptainSecondarySetup(SkillLocator skillLocator) { LanguageAPI.Add("AEROSCAP_M2", "Overclock"); LanguageAPI.Add("AEROSCAP_M2_DESCRIPTION", "Fire a <style=cIsHealth>non damaging</style> projectile that <style=cIsDamage>buffs</style> nearby allies on impact with <style=cIsHealing>+" + regen.Value + " hp/s health regen</style>, <style=cIsDamage>+" + atkspd.Value + " attack speed</style>, <style=cIsUtility>+" + movspd.Value + " movement speed</style> and <style=cIsUtility>" + cooldown.Value * 100f + "% cooldown reduction</style> for <style=cIsUtility>" + duration.Value + "s</style>."); SkillDef skillDef = Utils.NewSkillDef<SkillDef>(typeof(CaptainSecondary), "Weapon", 1, CD.Value, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("capsecondary"), "AEROSCAP_M2_DESCRIPTION", "AEROSCAP_M2", Array.Empty<string>()); Utils.AddAlt(skillLocator.secondary.skillFamily, skillDef); } private void RegisterStates() { //IL_0003: 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_0013: 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_0023: 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_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_0043: 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_0053: 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_0063: 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_0073: 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_0083: 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_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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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) bool flag = default(bool); ContentAddition.AddEntityState<CaptainPrimary>(ref flag); ContentAddition.AddEntityState<CaptainSecondary>(ref flag); ContentAddition.AddEntityState<EngiPrimaryCharge>(ref flag); ContentAddition.AddEntityState<EngiPrimaryFire>(ref flag); ContentAddition.AddEntityState<EngiSpecial>(ref flag); ContentAddition.AddEntityState<EngiTurretPrimary>(ref flag); ContentAddition.AddEntityState<TurretSpawn>(ref flag); ContentAddition.AddEntityState<ChargePunchesOld>(ref flag); ContentAddition.AddEntityState<PunchesOld>(ref flag); ContentAddition.AddEntityState<BlockOld>(ref flag); ContentAddition.AddEntityState<SlamOld>(ref flag); ContentAddition.AddEntityState<Block>(ref flag); ContentAddition.AddEntityState<Detonate>(ref flag); ContentAddition.AddEntityState<ChargeFist>(ref flag); ContentAddition.AddEntityState<FireFist>(ref flag); ContentAddition.AddEntityState<PunchCombo>(ref flag); ContentAddition.AddEntityState<Genkidama>(ref flag); ContentAddition.AddEntityState<Dimension>(ref flag); ContentAddition.AddEntityState<DimensionCorrupted>(ref flag); ContentAddition.AddEntityState<Beam>(ref flag); ContentAddition.AddEntityState<BeamCorrupted>(ref flag); ContentAddition.AddEntityState<MageSpecial>(ref flag); ContentAddition.AddEntityState<FireSword>(ref flag); ContentAddition.AddEntityState<FireSwordCharge>(ref flag); } } public static class ModCompat { private static bool? ancientEnabled; public static bool AncientScepterEnabled { get { if (!ancientEnabled.HasValue) { ancientEnabled = Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); } return ancientEnabled.Value; } } public static void AddScepterSupport() { ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(MainPlugin.engiScepter, "EngiBody", (SkillSlot)3, 3); } } internal class Prefabs { internal static GameObject buffProjectileGhost; internal static GameObject buffProjectile; internal static GameObject buffProjectileExplosion; internal static GameObject tracer; internal static GameObject missileProjectile; internal static GameObject shieldEffect; internal static GameObject loaderImpact; internal static GameObject slamProjectile; internal static GameObject turret; internal static GameObject turretMaster; internal static GameObject turretBlueprint; internal static GameObject turretMuzzleFlash; internal static GameObject turretTracer; internal static GameObject turretBigTracer; internal static GameObject seekerGenkidamaProjectileGhost; internal static GameObject seekerGenkidamaProjectile; internal static GameObject viendPP; internal static GameObject viendPPCorrupted; internal static GameObject viendContinuousBeam; internal static GameObject viendBeamTracer; internal static GameObject viendBeamCharge; internal static GameObject mageMuzzleTrail; internal static GameObject fireSwordProjectile; internal static GameObject fireSwordProjectileDotZone; internal static GameObject fireSwordChargeEffect; internal static ModdedDamageType flameSwordHit; internal static Sprite viendSecondary; internal static Sprite viendSecondaryCorrupted; internal static Sprite viendUtility; internal static Sprite viendUtilityCorrupted; internal static DeployableSlot bigTurret; internal static Material overlay; internal static BuffDef seekerPassiveBuff; internal static BuffDef overclock; internal static BuffDef block; internal static BuffDef viendSpeedBuff; internal static AnimationCurve spreadBloomCurve; internal static AnimationClip clip; internal static T Load<T>(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<T>((object)path).WaitForCompletion(); } internal static GameObject Instantiate(string path, string name, bool registerNetwork = false) { return PrefabAPI.InstantiateClone(Load<GameObject>(path), name, registerNetwork); } internal static GameObject Instantiate(GameObject obj, string name, bool registerNetwork = false) { return PrefabAPI.InstantiateClone(obj, name, registerNetwork); } internal static int BigTurretDeployableCount(CharacterMaster master, int count) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) int num = 1; if (Object.op_Implicit((Object)(object)master.inventory)) { if (master.inventory.GetItemCount(ItemCatalog.FindItemIndex("ITEM_ANCIENT_SCEPTER")) > 0) { num++; } num += master.inventory.GetItemCount(Items.EquipmentMagazineVoid); } return num; } internal static void CreatePrefabs() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_1086: Unknown result type (might be due to invalid IL or missing references) //IL_1090: Unknown result type (might be due to invalid IL or missing references) //IL_1095: Unknown result type (might be due to invalid IL or missing references) //IL_10b7: Unknown result type (might be due to invalid IL or missing references) //IL_10bc: Unknown result type (might be due to invalid IL or missing references) //IL_10f7: Unknown result type (might be due to invalid IL or missing references) //IL_10fc: Unknown result type (might be due to invalid IL or missing references) //IL_1118: Unknown result type (might be due to invalid IL or missing references) //IL_1122: Expected O, but got Unknown //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_05db: Unknown result type (might be due to invalid IL or missing references) //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Expected O, but got Unknown //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_062a: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_0673: Expected O, but got Unknown //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_0704: Unknown result type (might be due to invalid IL or missing references) //IL_070e: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) //IL_0736: Unknown result type (might be due to invalid IL or missing references) //IL_0757: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Expected O, but got Unknown //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_0408: 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_016e: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_15ba: Unknown result type (might be due to invalid IL or missing references) //IL_15da: Unknown result type (might be due to invalid IL or missing references) //IL_15ea: Expected O, but got Unknown //IL_1657: Unknown result type (might be due to invalid IL or missing references) //IL_165e: Expected O, but got Unknown //IL_168a: Unknown result type (might be due to invalid IL or missing references) //IL_168f: Unknown result type (might be due to invalid IL or missing references) //IL_1694: Unknown result type (might be due to invalid IL or missing references) //IL_170e: Unknown result type (might be due to invalid IL or missing references) //IL_1715: Expected O, but got Unknown //IL_172b: Unknown result type (might be due to invalid IL or missing references) //IL_173b: Expected O, but got Unknown //IL_17a8: Unknown result type (might be due to invalid IL or missing references) //IL_17af: Expected O, but got Unknown //IL_17db: Unknown result type (might be due to invalid IL or missing references) //IL_17e0: Unknown result type (might be due to invalid IL or missing references) //IL_17e5: Unknown result type (might be due to invalid IL or missing references) //IL_185f: Unknown result type (might be due to invalid IL or missing references) //IL_1866: Expected O, but got Unknown //IL_1896: Unknown result type (might be due to invalid IL or missing references) //IL_18a0: Unknown result type (might be due to invalid IL or missing references) //IL_18f5: Unknown result type (might be due to invalid IL or missing references) //IL_12b0: Unknown result type (might be due to invalid IL or missing references) //IL_12b5: Unknown result type (might be due to invalid IL or missing references) //IL_12ec: Unknown result type (might be due to invalid IL or missing references) //IL_12f6: Unknown result type (might be due to invalid IL or missing references) //IL_1e2c: Unknown result type (might be due to invalid IL or missing references) //IL_1e33: Expected O, but got Unknown //IL_139b: Unknown result type (might be due to invalid IL or missing references) //IL_13a0: Unknown result type (might be due to invalid IL or missing references) //IL_150a: Unknown result type (might be due to invalid IL or missing references) //IL_151f: Unknown result type (might be due to invalid IL or missing references) //IL_07d7: Unknown result type (might be due to invalid IL or missing references) //IL_1951: Unknown result type (might be due to invalid IL or missing references) //IL_1956: Unknown result type (might be due to invalid IL or missing references) //IL_081c: Unknown result type (might be due to invalid IL or missing references) //IL_0826: Unknown result type (might be due to invalid IL or missing references) //IL_0857: Unknown result type (might be due to invalid IL or missing references) //IL_087d: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Expected O, but got Unknown //IL_08da: Unknown result type (might be due to invalid IL or missing references) //IL_0910: Unknown result type (might be due to invalid IL or missing references) //IL_0932: Unknown result type (might be due to invalid IL or missing references) //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_0a28: Unknown result type (might be due to invalid IL or missing references) //IL_0a3d: Unknown result type (might be due to invalid IL or missing references) //IL_0a3f: Unknown result type (might be due to invalid IL or missing references) //IL_0a90: Unknown result type (might be due to invalid IL or missing references) //IL_0ab2: Unknown result type (might be due to invalid IL or missing references) //IL_0ad4: Unknown result type (might be due to invalid IL or missing references) //IL_0b84: Unknown result type (might be due to invalid IL or missing references) //IL_0b89: Unknown result type (might be due to invalid IL or missing references) //IL_0bcd: Unknown result type (might be due to invalid IL or missing references) //IL_0bee: Unknown result type (might be due to invalid IL or missing references) //IL_0c00: Unknown result type (might be due to invalid IL or missing references) //IL_0c0a: Unknown result type (might be due to invalid IL or missing references) //IL_0c32: Unknown result type (might be due to invalid IL or missing references) //IL_0c37: Unknown result type (might be due to invalid IL or missing references) //IL_0c55: Unknown result type (might be due to invalid IL or missing references) //IL_0ce1: Unknown result type (might be due to invalid IL or missing references) //IL_0cf8: Unknown result type (might be due to invalid IL or missing references) //IL_0d02: Expected O, but got Unknown //IL_0cfd: Unknown result type (might be due to invalid IL or missing references) //IL_0d02: Unknown result type (might be due to invalid IL or missing references) //IL_1fd2: Unknown result type (might be due to invalid IL or missing references) //IL_200c: Unknown result type (might be due to invalid IL or missing references) //IL_202d: Unknown result type (might be due to invalid IL or missing references) //IL_2074: Unknown result type (might be due to invalid IL or missing references) //IL_2086: Unknown result type (might be due to invalid IL or missing references) //IL_2090: Unknown result type (might be due to invalid IL or missing references) //IL_2095: Unknown result type (might be due to invalid IL or missing references) //IL_20b6: Unknown result type (might be due to invalid IL or missing references) //IL_20f3: Unknown result type (might be due to invalid IL or missing references) //IL_20f8: Unknown result type (might be due to invalid IL or missing references) //IL_2107: Unknown result type (might be due to invalid IL or missing references) //IL_21f6: Unknown result type (might be due to invalid IL or missing references) //IL_2208: Unknown result type (might be due to invalid IL or missing references) //IL_2212: Unknown result type (might be due to invalid IL or missing references) //IL_2217: Unknown result type (might be due to invalid IL or missing references) //IL_225d: Unknown result type (might be due to invalid IL or missing references) //IL_226f: Unknown result type (might be due to invalid IL or missing references) //IL_2279: Unknown result type (might be due to invalid IL or missing references) //IL_227e: Unknown result type (might be due to invalid IL or missing references) //IL_229f: Unknown result type (might be due to invalid IL or missing references) //IL_22fd: Unknown result type (might be due to invalid IL or missing references) //IL_2302: Unknown result type (might be due to invalid IL or missing references) //IL_2311: Unknown result type (might be due to invalid IL or missing references) //IL_1980: Unknown result type (might be due to invalid IL or missing references) //IL_198a: Expected O, but got Unknown //IL_09a9: Unknown result type (might be due to invalid IL or missing references) //IL_09b3: Unknown result type (might be due to invalid IL or missing references) //IL_1ec8: Unknown result type (might be due to invalid IL or missing references) //IL_1ed2: Expected O, but got Unknown //IL_19c2: Unknown result type (might be due to invalid IL or missing references) //IL_19cc: Expected O, but got Unknown //IL_19e6: Unknown result type (might be due to invalid IL or missing references) //IL_19eb: Unknown result type (might be due to invalid IL or missing references) //IL_0d4b: Unknown result type (might be due to invalid IL or missing references) //IL_0d55: Expected O, but got Unknown //IL_0dc1: Unknown result type (might be due to invalid IL or missing references) //IL_0dd5: Unknown result type (might be due to invalid IL or missing references) //IL_1a11: Unknown result type (might be due to invalid IL or missing references) //IL_1a1b: Unknown result type (might be due to invalid IL or missing references) //IL_1a5c: Unknown result type (might be due to invalid IL or missing references) //IL_1a66: Unknown result type (might be due to invalid IL or missing references) //IL_1a7d: Unknown result type (might be due to invalid IL or missing references) //IL_1a87: Expected O, but got Unknown //IL_1aa1: Unknown result type (might be due to invalid IL or missing references) //IL_1aa6: Unknown result type (might be due to invalid IL or missing references) //IL_1bdb: Unknown result type (might be due to invalid IL or missing references) //IL_1be5: Expected O, but got Unknown //IL_1bff: Unknown result type (might be due to invalid IL or missing references) //IL_1c04: Unknown result type (might be due to invalid IL or missing references) //IL_1d35: Unknown result type (might be due to invalid IL or missing references) //IL_1d3b: Expected O, but got Unknown //IL_1d73: Unknown result type (might be due to invalid IL or missing references) //IL_0e3c: Unknown result type (might be due to invalid IL or missing references) //IL_0e46: Expected O, but got Unknown //IL_0ecd: Unknown result type (might be due to invalid IL or missing references) //IL_0ed7: Expected O, but got Unknown //IL_1c4c: Unknown result type (might be due to invalid IL or missing references) //IL_1c60: Unknown result type (might be due to invalid IL or missing references) //IL_1c6a: Expected O, but got Unknown //IL_0e8c: Unknown result type (might be due to invalid IL or missing references) //IL_0e91: Unknown result type (might be due to invalid IL or missing references) //IL_0e95: Unknown result type (might be due to invalid IL or missing references) //IL_0e9a: Unknown result type (might be due to invalid IL or missing references) //IL_2409: Unknown result type (might be due to invalid IL or missing references) //IL_240e: Unknown result type (might be due to invalid IL or missing references) //IL_1daa: Unknown result type (might be due to invalid IL or missing references) //IL_1db4: Expected O, but got Unknown //IL_1de7: Unknown result type (might be due to invalid IL or missing references) //IL_0f7d: Unknown result type (might be due to invalid IL or missing references) //IL_0f87: Expected O, but got Unknown //IL_1029: Unknown result type (might be due to invalid IL or missing references) //IL_0fcc: Unknown result type (might be due to invalid IL or missing references) //IL_0fd1: Unknown result type (might be due to invalid IL or missing references) //IL_0ff2: Unknown result type (might be due to invalid IL or missing references) flameSwordHit = DamageAPI.ReserveDamageType(); seekerPassiveBuff = Utils.NewBuffDef("Orb", stack: true, hidden: false, Assets.Load<Sprite>("seekerPassiveBuff"), new Color(0.855f, 0.698f, 0.314f)); overclock = Utils.NewBuffDef("Overclock", stack: false, hidden: false, Load<Sprite>("RoR2/Base/Croco/texBuffRegenBoostIcon.tif"), Color32.op_Implicit(new Color32((byte)226, (byte)81, (byte)65, byte.MaxValue))); block = Utils.NewBuffDef("Block", stack: false, hidden: false, Load<Sprite>("RoR2/Junk/Common/texBuffBodyArmorIcon.tif"), Color32.op_Implicit(new Color32((byte)239, (byte)245, (byte)140, byte.MaxValue))); if (MainPlugin.enableCap.Value) { overlay = new Material(Load<Material>("RoR2/Base/Common/matEnergyShield.mat")); overlay.SetColor("_TintColor", Color.red); overlay.SetFloat("_OffsetAmount", 0.025f); buffProjectileExplosion = Instantiate("RoR2/Base/FusionCellDestructible/FusionCellExplosion.prefab", "BuffExplosion"); buffProjectileExplosion.GetComponent<EffectComponent>().soundName = "Play_roboBall_attack1_explode"; ParticleSystemRenderer[] componentsInChildren = buffProjectileExplosion.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val in componentsInChildren) { string name = ((Object)val).name; if (name == "Ring") { ((Renderer)val).material = new Material(Load<Material>("RoR2/Base/RoboBallBoss/matRoboBallParticleRing.mat")); ((Renderer)val).material.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampHuntressSoftCrit.png")); Object.Instantiate<GameObject>(((Component)val).gameObject, ((Component)val).transform.position, ((Component)val).transform.rotation, ((Component)val).transform.parent); } if (name == "") { } if (name == "") { } if (name == "") { } if (name == "") { } } ContentAddition.AddEffect(buffProjectileExplosion); buffProjectileGhost = Instantiate("RoR2/Base/Captain/CaptainTazerGhost.prefab", "BuffProjectileGhost"); Transform child = buffProjectileGhost.transform.GetChild(1); ((Component)child.GetChild(1)).gameObject.SetActive(false); Transform child2 = child.GetChild(0); ((Component)child2).transform.localPosition = Vector3.zero; TrailRenderer component = ((Component)child2).GetComponent<TrailRenderer>(); component.textureMode = (LineTextureMode)0; ((Renderer)component).material = new Material(Load<Material>("RoR2/Base/Bandit2/matBandit2SplatterOpaqueTrailAlt.mat")); ((Renderer)component).material.SetColor("_TintColor", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)44, (byte)44, byte.MaxValue))); ((Renderer)component).material.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampParentEyes.png")); ParticleSystemRenderer componentInChildren = ((Component)child2).GetComponentInChildren<ParticleSystemRenderer>(); ((Renderer)componentInChildren).material = new Material(Load<Material>("RoR2/Base/Common/VFX/matArcaneCircleProvi.mat")); ((Renderer)componentInChildren).material.SetColor("_TintColor", Color.red); ((Renderer)componentInChildren).material.SetFloat("_Boost", 6f); buffProjectile = Instantiate("RoR2/Base/Captain/CaptainTazer.prefab", "BuffProjectile", registerNetwork: true); buffProjectile.GetComponent<Rigidbody>().collisionDetectionMode = (CollisionDetectionMode)2; buffProjectile.GetComponent<ProjectileController>().ghostPrefab = buffProjectileGhost; buffProjectile.GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)0); buffProjectile.GetComponent<ProjectileSimple>().desiredForwardSpeed = 110f; Object.Destroy((Object)(object)buffProjectile.GetComponent<ProjectileImpactExplosion>()); ProjectileSingleTargetImpact val2 = buffProjectile.AddComponent<ProjectileSingleTargetImpact>(); val2.destroyOnWorld = true; val2.destroyWhenNotAlive = true; buffProjectile.AddComponent<RadialBuff>(); ContentAddition.AddProjectile(buffProjectile); tracer = Instantiate("RoR2/Base/Bandit2/TracerBanditPistol.prefab", "Tracer"); tracer.GetComponent<LineRenderer>().endColor = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)31, (byte)0, byte.MaxValue)); ContentAddition.AddEffect(tracer); } if (MainPlugin.enableEngi.Value) { missileProjectile = Instantiate("RoR2/Base/Engi/EngiHarpoon.prefab", "AerosMissileProjectile", registerNetwork: true); Object.Destroy((Object)(object)missileProjectile.GetComponent<MissileController>()); Object.Destroy((Object)(object)missileProjectile.GetComponent<QuaternionPID>()); Rigidbody component2 = missileProjectile.GetComponent<Rigidbody>(); component2.useGravity = false; component2.collisionDetectionMode = (CollisionDetectionMode)2; ProjectileSimple val3 = missileProjectile.AddComponent<ProjectileSimple>(); val3.desiredForwardSpeed = 60f; val3.lifetime = 8f; ProjectileDirectionalTargetFinder val4 = missileProjectile.AddComponent<ProjectileDirectionalTargetFinder>(); val4.lookRange = 45f; val4.lookCone = 35f; val4.allowTargetLoss = false; val4.onlySearchIfNoTarget = true; val4.testLoS = false; val4.targetSearchInterval = 0.1f; val4.ignoreAir = false; ((Behaviour)val4).enabled = MainPlugin.missileTracking.Value; ProjectileSteerTowardTarget val5 = missileProjectile.AddComponent<ProjectileSteerTowardTarget>(); val5.rotationSpeed = 220f; ProjectileController component3 = missileProjectile.GetComponent<ProjectileController>(); ProjectileSingleTargetImpact component4 = missileProjectile.GetComponent<ProjectileSingleTargetImpact>(); GameObject val6 = Instantiate(component4.impactEffect, "AerosMissileImpact"); val6.GetComponent<EffectComponent>().soundName = "Play_engi_M1_explo"; ContentAddition.AddEffect(val6); component4.impactEffect = val6; if (MainPlugin.missileTracking.Value) { missileProjectile.AddComponent<SimpleUpdate>(); } GameObject val7 = Instantiate(component3.ghostPrefab, "AerosMissileGhost"); ((Component)val7.GetComponentsInChildren<ParticleSystem>()[^1]).gameObject.SetActive(false); TrailRenderer componentInChildren2 = val7.GetComponentInChildren<TrailRenderer>(); ((Component)componentInChildren2).transform.localPosition = Vector3.forward * 0.1f; ((Renderer)componentInChildren2).material = new Material(Load<Material>("RoR2/DLC1/EliteEarth/matAffixEarthTrailBloblets.mat")); ((Renderer)componentInChildren2).material.SetTextureScale("_Cloud2Tex", new Vector2(0.7f, 1f)); ((Renderer)componentInChildren2).material.SetVector("_CutoffScroll", Vector4.zero); component3.ghostPrefab = val7; ContentAddition.AddProjectile(missileProjectile); GameObject val8 = Assets.Load<GameObject>("turretMdl"); GameObject val9 = val8; MeshRenderer[] componentsInChildren2 = val9.GetComponentsInChildren<MeshRenderer>(); Material val10 = new Material(Load<Material>("RoR2/Base/Engi/matEngiTurret.mat")); val10.SetFloat("_PrintOn", 0f); val10.SetFloat("_EmPower", 5f); turret = Instantiate("RoR2/Base/Engi/EngiTurretBody.prefab", "AerosBigTurretBody", registerNetwork: true); ((Component)turret.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject.SetActive(false); ChildLocator component5 = ((Component)turret.GetComponent<ModelLocator>().modelTransform).GetComponent<ChildLocator>(); Transform val11 = component5.FindChild("Muzzle"); val11.localPosition = new Vector3(0f, 3.5f, 9.6f); val11.localScale = Vector3.one * 2f; HurtBox componentInChildren3 = turret.GetComponentInChildren<HurtBox>(); ((Component)componentInChildren3).transform.localPosition = Vector3.up * 2f; ((Component)componentInChildren3).transform.localScale = new Vector3(3f, 7f, 3f); List<Renderer> list = new List<Renderer>(); Transform[] componentsInChildren3 = turret.GetComponentsInChildren<Transform>(); foreach (Transform val12 in componentsInChildren3) { string name2 = ((Object)val12).name; if (name2 == "Base") { GameObject val13 = Object.Instantiate<GameObject>(((Component)componentsInChildren2[0]).gameObject); val13.transform.parent = val12; ((Renderer)val13.GetComponent<MeshRenderer>()).material = val10; val13.transform.localPosition = Vector3.zero; list.Add((Renderer)(object)val13.GetComponent<MeshRenderer>()); } if (name2 == "Head") { ((Component)val12).gameObject.AddComponent<ForcePos>(); ((Component)val12).transform.localPosition = Vector3.up * 4f; GameObject val14 = Object.Instantiate<GameObject>(((Component)componentsInChildren2[1]).gameObject); val14.transform.parent = val12; val14.transform.localPosition = Vector3.zero; MeshRenderer[] componentsInChildren4 = val14.GetComponentsInChildren<MeshRenderer>(); ((Renderer)componentsInChildren4[0]).material = val10; ((Renderer)componentsInChildren4[1]).material = new Material(val10); Texture2D val15 = Assets.Load<Texture2D>("chargeindicator"); Texture2D val16 = Assets.Load<Texture2D>("chargeindicator_e"); ((Renderer)componentsInChildren4[1]).material.SetTexture("_MainTex", (Texture)(object)val15); ((Renderer)componentsInChildren4[1]).material.SetTexture("_EmTex", (Texture)(object)val16); ((Renderer)componentsInChildren4[1]).material.SetTextureScale("_MainTex", Vector2.zero); ((Renderer)componentsInChildren4[1]).material.SetFloat("_EmPower", 10f); List<NameTransformPair> list2 = component5.transformPairs.ToList(); list2.Add(new NameTransformPair { name = "Charge", transform = ((Component)componentsInChildren4[1]).transform }); component5.transformPairs = list2.ToArray(); list.Add((Renderer)(object)componentsInChildren4[0]); list.Add((Renderer)(object)componentsInChildren4[1]); } if (name2 == "Neck") { GameObject val17 = Object.Instantiate<GameObject>(((Component)componentsInChildren2[3]).gameObject); val17.transform.parent = val12; ((Renderer)val17.GetComponent<MeshRenderer>()).material = val10; val17.transform.localPosition = Vector3.up * -1.4f; list.Add((Renderer)(object)val17.GetComponent<MeshRenderer>()); } } RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[list.Count]; for (int k = 0; k < array.Length; k++) { array[k] = new RendererInfo { renderer = list[k], defaultMaterial = list[k].material, defaultShadowCastingMode = (ShadowCastingMode)0, hideOnDeath = false, ignoreOverlays = false }; } CharacterModel component6 = ((Component)component5).GetComponent<CharacterModel>(); component6.baseRendererInfos = array.ToArray(); ModelSkinController component7 = ((Component)component5).GetComponent<ModelSkinController>(); component7.skins = (SkinDef[])(object)new SkinDef[3] { Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list, ((Component)component5).gameObject, array, val10)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list, ((Component)component5).gameObject, array, Load<Material>("RoR2/Base/Engi/matEngiAlt.mat"))), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list, ((Component)component5).gameObject, array, Load<Material>("RoR2/Base/Engi/matEngiAltColossusTool.mat"))) }; component7.currentSkinIndex = 0; Utils.AddMinionSkin(Load<SkinDef>("RoR2/Base/Engi/skinEngiDefault.asset"), turret, component7.skins[0]); Utils.AddMinionSkin(Load<SkinDef>("RoR2/Base/Engi/skinEngiAlt.asset"), turret, component7.skins[1]); Utils.AddMinionSkin(Load<SkinDef>("RoR2/Base/Engi/skinEngiAltColossus.asset"), turret, component7.skins[2]); ((Behaviour)component6).enabled = false; ((Component)component5).gameObject.AddComponent<TurretChargeBehaviour>(); ((Component)component5).gameObject.AddComponent<TurretSkinBehaviour>(); GameObject val18 = Load<GameObject>("RoR2/Base/Engi/EngiDisplay.prefab"); GameObject val19 = Object.Instantiate<GameObject>(((Component)component5).gameObject, val18.transform.position, Quaternion.identity); ((Behaviour)val19.GetComponent<Animator>()).enabled = false; val19.transform.parent = val18.transform; val19.transform.localPosition = new Vector3(0.3f, 0f, -3.5f); val19.transform.localRotation = Quaternion.Euler(0f, 20f, 0f); val19.transform.localScale = Vector3.one * 0.36f; ((Behaviour)component6).enabled = true; turret.GetComponent<EntityStateMachine>().initialStateType = new SerializableEntityStateType(typeof(TurretSpawn)); turret.GetComponent<SkillLocator>().primary = Utils.NewGenericSkill(turret, Utils.NewSkillDef<SkillDef>(new SerializableEntityStateType(typeof(EngiTurretPrimary)), "Weapon", 1, 8f, beginSkillCooldownOnSkillEnd: false, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: true, 1, 1, 1, (Sprite)null, "AEROSENGI_SPEC_DESCRIPTION", "AEROSENGI_SPEC", Array.Empty<string>())); ContentAddition.AddBody(turret); turretMaster = Instantiate("RoR2/Base/Engi/EngiTurretMaster.prefab", "AerosBigTurretMaster", registerNetwork: true); turretMaster.GetComponent<CharacterMaster>().bodyPrefab = turret; AISkillDriver[] components = turretMaster.GetComponents<AISkillDriver>(); components[0].maxDistance = 250f; components[1].moveTargetType = (TargetType)0; ContentAddition.AddMaster(turretMaster); bigTurret = DeployableAPI.RegisterDeployableSlot(new GetDeployableSameSlotLimit(BigTurretDeployableCount)); Texture2D val20 = Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampEngi.png"); turretMuzzleFlash = Instantiate("RoR2/Base/Engi/MuzzleflashEngiTurret.prefab", "AerosTurretMuzzleFlash"); ParticleSystemRenderer[] componentsInChildren5 = turretMuzzleFlash.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val21 in componentsInChildren5) { ((Renderer)val21).material = new Material(((Renderer)val21).material); ((Renderer)val21).material.SetTexture("_RemapTex", (Texture)(object)val20); } ContentAddition.AddEffect(turretMuzzleFlash); turretBlueprint = Instantiate("RoR2/Base/Engi/EngiTurretBlueprints.prefab", "AerosBigTurretBlueprint"); ((Component)turretBlueprint.transform.GetChild(1)).gameObject.SetActive(false); GameObject val22 = Object.Instantiate<GameObject>(val8, t