Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of ZoeaRework v1.2.0
plugins/ZoeaRework.dll
Decompiled 5 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using EntityStates; using EntityStates.NullifierMonster; using EntityStates.VoidJailer; using On.RoR2; using R2API; using R2API.Utils; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Navigation; using RoR2.Skills; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using ZoeaRework.Changes; using ZoeaRework.Modules; using ZoeaRework.States.Nullifier; using ZoeaRework.States.VoidJailer; using ZoeaRework.States.VoidMegaCrab; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("ZoeaRework")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ZoeaRework")] [assembly: AssemblyTitle("ZoeaRework")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] namespace ZoeaRework { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.kking117.ZoeaRework", "ZoeaRework", "1.2.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.kking117.ZoeaRework"; public const string MODNAME = "ZoeaRework"; public const string MODVERSION = "1.2.0"; public const string MODTOKEN = "KKING117_ZOEAREWORK_"; internal static ManualLogSource ModLogger; public static bool Config_Rework_Enable; public static string Config_Rework_CorruptList; public static string Config_Rework_CorruptText; public static int Config_Rework_DamageStack; public static int Config_Rework_DamageBase; public static int Config_Rework_HealthStack; public static int Config_Rework_HealthBase; public static float Config_Rework_SpawnTime; public static bool Config_ReworkInherit_Enable; public static string Config_ReworkInherit_ItemBlackList; public static string Config_ReworkInherit_TierBlackList; public static string Config_Buff_CorruptList; public static string Config_Buff_CorruptText; public static int Config_Buff_DamageStack; public static int Config_Buff_DamageBase; public static int Config_Buff_HealthStack; public static int Config_Buff_HealthBase; public static float Config_Buff_SpawnTime; public static float Config_VoidMegaCrab_Rework_BaseHealth; public static float Config_VoidMegaCrab_Rework_LevelHealth; public static float Config_VoidMegaCrab_Rework_BaseDamage; public static float Config_VoidMegaCrab_Rework_LevelDamage; public static float Config_VoidMegaCrab_BaseSpeed; public static float Config_VoidMegaCrab_RecallCooldown; public static bool Config_VoidMegaCrab_EnableDisplays; public static float Config_VoidJailer_BaseSpeed; public static float Config_VoidJailer_RecallCooldown; public static float Config_Nullifier_BaseSpeed; public static float Config_Nullifier_RecallCooldown; public static float Config_AIShared_MinRecallDist; public static float Config_AIShared_MaxRecallDist; public static float Config_AIShared_RecallDistDiff; internal static List<SceneDef> NoSpawnScene = new List<SceneDef>(); internal static string Section_ZoeaBuff = "Zoea Buff"; internal static string Section_ZoeaRework = "Zoea Rework"; internal static string Section_ReworkInherit = "Rework Inheritance"; internal static string Section_VoidMegaCrabRework = "Rework Void Devastator"; internal static string Section_VoidMegaCrab = "Void Devastator"; internal static string Section_VoidJailer = "Void Jailer"; internal static string Section_VoidNullifier = "Void Reaver"; internal static string Section_AIShared = "AI Shared"; private void Awake() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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) ModLogger = ((BaseUnityPlugin)this).Logger; ReadConfig(); if (Config_Rework_Enable) { VoidMegaCrabItem_Rework.Begin(); } else { VoidMegaCrabItem_Buff.Begin(); } ((ResourceAvailability)(ref ItemCatalog.availability)).CallWhenAvailable((Action)PostLoad_Items); SceneDef val = Addressables.LoadAssetAsync<SceneDef>((object)"4116724a9bd3d05499bac80e6297a949").WaitForCompletion(); if ((Object)(object)val != (Object)null) { NoSpawnScene.Add(val); } val = Addressables.LoadAssetAsync<SceneDef>((object)"55dcf3dbd137f99458af33ad467bb574").WaitForCompletion(); if ((Object)(object)val != (Object)null) { NoSpawnScene.Add(val); } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Initializing ContentPack."); new ContentPacks().Initialize(); } private void PostLoad_Items() { VoidMegaCrabAlly.PostLoad(); } private void ReadConfig() { Config_Rework_Enable = ((BaseUnityPlugin)this).Config.Bind<bool>(Section_ZoeaRework, "Enable", false, "Enables this rework instead of buffing the item.").Value; Config_Rework_CorruptList = ((BaseUnityPlugin)this).Config.Bind<string>(Section_ZoeaRework, "Corrupt List", "BeetleGland NovaOnLowHealth Knurl SiphonOnLowHealth BleedOnHitAndExplode SprintWisp RoboBallBuddy FireballsOnHit LightningStrikeOnHit ParentEgg TitanGoldDuringTP MinorConstructOnKill ExtraEquipment ShockDamageAura", "List of items that will be corrupted by this item.").Value; Config_Rework_CorruptText = ((BaseUnityPlugin)this).Config.Bind<string>(Section_ZoeaRework, "Corrupt Text", "<style=cIsVoid>Corrupts all </style><style=cIsTierBoss>boss items</style>.", "Controls the \"Corrupts all Xs\" text").Value; Config_Rework_SpawnTime = ((BaseUnityPlugin)this).Config.Bind<float>(Section_ZoeaRework, "Respawn Time", 30f, "Cooldown time between summons in seconds.").Value; Config_Rework_DamageBase = ((BaseUnityPlugin)this).Config.Bind<int>(Section_ZoeaRework, "Base Damage Bonus", 0, "How many extra BoostDamage items the summons get at a single stack. (1 = +10%)").Value; Config_Rework_DamageStack = ((BaseUnityPlugin)this).Config.Bind<int>(Section_ZoeaRework, "Stack Damage Bonus", 2, "How many extra BoostDamage items the summons get for each additional stack. (1 = +10%)").Value; Config_Rework_HealthBase = ((BaseUnityPlugin)this).Config.Bind<int>(Section_ZoeaRework, "Base Health Bonus", 0, "How many extra BoostHP items the summons get at a single stack. (1 = +10%)").Value; Config_Rework_HealthStack = ((BaseUnityPlugin)this).Config.Bind<int>(Section_ZoeaRework, "Stack Health Bonus", 1, "How many extra BoostHP items the summons get for each additional stack. (1 = +10%)").Value; Config_ReworkInherit_Enable = ((BaseUnityPlugin)this).Config.Bind<bool>(Section_ReworkInherit, "Allow Item Inhertiance", true, "Should the Rework's Void Devastator inherit the user's items?").Value; Config_ReworkInherit_ItemBlackList = ((BaseUnityPlugin)this).Config.Bind<string>(Section_ReworkInherit, "Item Blacklist", "LunarPrimaryReplacement LunarSecondaryReplacement LunarUtilityReplacement LunarSpecialReplacement", "Blacklist these item from the Void Devastator. (Note: It cannot use Heresy Skills.)").Value; Config_ReworkInherit_TierBlackList = ((BaseUnityPlugin)this).Config.Bind<string>(Section_ReworkInherit, "Tier Blacklist", "", "Blacklist all items in this tier from the Void Devastator. (Tier1Def, Tier2Def, Tier3Def, BossTierDef, LunarTierDef, VoidTier1Def, VoidTier2Def, VoidTier3Def, VoidBossDef, FoodTier)").Value; Config_Buff_CorruptList = ((BaseUnityPlugin)this).Config.Bind<string>(Section_ZoeaBuff, "Corrupt List", "BeetleGland", "List of items that will be corrupted by this item.").Value; Config_Buff_CorruptText = ((BaseUnityPlugin)this).Config.Bind<string>(Section_ZoeaBuff, "Corrupt Text", "<style=cIsVoid>Corrupts all </style><style=cIsTierBoss>Queen's Glands</style>.", "Controls the \"Corrupts all Xs\" text").Value; Config_Buff_SpawnTime = ((BaseUnityPlugin)this).Config.Bind<float>(Section_ZoeaBuff, "Respawn Time", 30f, "Cooldown time between summons in seconds.").Value; Config_Buff_DamageBase = ((BaseUnityPlugin)this).Config.Bind<int>(Section_ZoeaBuff, "Base Damage Bonus", 0, "How many extra BoostDamage items the summons get at a single stack. (1 = +10%)").Value; Config_Buff_DamageStack = ((BaseUnityPlugin)this).Config.Bind<int>(Section_ZoeaBuff, "Stack Damage Bonus", 5, "How many extra BoostDamage items the summons get for each additional stack. (1 = +10%)").Value; Config_Buff_HealthBase = ((BaseUnityPlugin)this).Config.Bind<int>(Section_ZoeaBuff, "Base Health Bonus", 0, "How many extra BoostHP items the summons get at a single stack. (1 = +10%)").Value; Config_Buff_HealthStack = ((BaseUnityPlugin)this).Config.Bind<int>(Section_ZoeaBuff, "Stack Health Bonus", 2, "How many extra BoostHP items the summons get for each additional stack. (1 = +10%)").Value; Config_VoidMegaCrab_Rework_BaseDamage = ((BaseUnityPlugin)this).Config.Bind<float>(Section_VoidMegaCrabRework, "Base Damage", 12f, "Base Damage of the Void Devastator.").Value; Config_VoidMegaCrab_Rework_LevelDamage = ((BaseUnityPlugin)this).Config.Bind<float>(Section_VoidMegaCrabRework, "Stack Damage", 2.4f, "Level Damage of the Void Devastator.").Value; Config_VoidMegaCrab_Rework_BaseHealth = ((BaseUnityPlugin)this).Config.Bind<float>(Section_VoidMegaCrabRework, "Base Health", 1400f, "Base Health of the Void Devastator.").Value; Config_VoidMegaCrab_Rework_LevelHealth = ((BaseUnityPlugin)this).Config.Bind<float>(Section_VoidMegaCrabRework, "Stack Damage", 420f, "Level Health of the Void Devastator.").Value; Config_VoidMegaCrab_BaseSpeed = ((BaseUnityPlugin)this).Config.Bind<float>(Section_VoidMegaCrab, "Base Movement Speed", 8f, "Base movement speed of the Void Devastator. (8 = Vanilla)").Value; Config_VoidMegaCrab_RecallCooldown = ((BaseUnityPlugin)this).Config.Bind<float>(Section_VoidMegaCrab, "Recall Cooldown", 25f, "Cooldown time of its recall ability.").Value; Config_VoidMegaCrab_EnableDisplays = ((BaseUnityPlugin)this).Config.Bind<bool>(Section_VoidMegaCrab, "Enable Item Displays", true, "Should the Void Devastator have extra custom item displays?").Value; Config_VoidJailer_BaseSpeed = ((BaseUnityPlugin)this).Config.Bind<float>(Section_VoidJailer, "Base Movement Speed", 8f, "Base movement speed of the Void Jailer. (7 = Vanilla)").Value; Config_VoidJailer_RecallCooldown = ((BaseUnityPlugin)this).Config.Bind<float>(Section_VoidJailer, "Recall Cooldown", 25f, "Cooldown time of its recall ability.").Value; Config_Nullifier_BaseSpeed = ((BaseUnityPlugin)this).Config.Bind<float>(Section_VoidNullifier, "Base Movement Speed", 8f, "Base movement speed of the Void Reaver. (6 = Vanilla)").Value; Config_Nullifier_RecallCooldown = ((BaseUnityPlugin)this).Config.Bind<float>(Section_VoidNullifier, "Recall Cooldown", 25f, "Cooldown time of its recall ability.").Value; Config_AIShared_MinRecallDist = ((BaseUnityPlugin)this).Config.Bind<float>(Section_AIShared, "Base Recall Distance", 130f, "Minimum distance in metres before the AI will recall itself.").Value; Config_AIShared_MaxRecallDist = ((BaseUnityPlugin)this).Config.Bind<float>(Section_AIShared, "Max Recall Distance", 300f, "Max distance cap for recalling.").Value; Config_AIShared_RecallDistDiff = ((BaseUnityPlugin)this).Config.Bind<float>(Section_AIShared, "Recall Distance Scaler", 4f, "Scales the minimum recall distance with the current run difficulty by this much.").Value; } } } namespace ZoeaRework.States.VoidMegaCrab { public class Recall : BaseSkillState { public static float baseDuration = 2.05f; private float duration; private bool TeleportAnim = false; private Vector3 TeleLoc; private bool CanTeleport = false; private string soundString = "Play_voidDevastator_spawn_open"; private string animationLayerName = "Body"; private string animationStateName = "Spawn"; private string animationPlaybackRateParam = "Spawn.playbackRate"; private string spawnMuzzleName = "Portal"; private GameObject effectPrefab = VoidMegaCrabAlly.PortalEffectPrefab; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration; GetTelportLocation(); if (CanTeleport) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, spawnMuzzleName, false); Teleport(); } else { ((EntityState)this).outer.SetNextStateToMain(); } } public override void FixedUpdate() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!TeleportAnim && ((EntityState)this).fixedAge >= 0.1f) { TeleportAnim = true; Util.PlaySound(soundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, spawnMuzzleName, false); if (((EntityState)this).isAuthority && (Object)(object)((EntityState)this).characterMotor != (Object)null) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0f; } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: 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) return (InterruptPriority)9; } private void Teleport() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { TeleportHelper.TeleportBody(((EntityState)this).characterBody, TeleLoc); } GameObject teleportEffectPrefab = Run.instance.GetTeleportEffectPrefab(((Component)((EntityState)this).characterBody).gameObject); if (Object.op_Implicit((Object)(object)teleportEffectPrefab)) { EffectManager.SimpleEffect(teleportEffectPrefab, TeleLoc, Quaternion.identity, true); } VoidMegaCrabItem_Shared.UpdateAILeash(((EntityState)this).characterBody.master); ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration - ((EntityState)this).fixedAge, 0f); } private void GetTelportLocation() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master) || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.minionOwnership) || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.minionOwnership.ownerMaster)) { return; } CharacterMaster ownerMaster = ((EntityState)this).characterBody.master.minionOwnership.ownerMaster; if (((EntityState)this).characterBody.teamComponent.teamIndex != ownerMaster.teamIndex) { return; } CharacterBody body = ownerMaster.GetBody(); if (Object.op_Implicit((Object)(object)body) && body.healthComponent.alive) { Vector3 corePosition = ownerMaster.GetBody().corePosition; SpawnCard val = ScriptableObject.CreateInstance<SpawnCard>(); val.hullSize = ((EntityState)this).characterBody.hullClassification; val.nodeGraphType = (GraphType)(((EntityState)this).characterBody.isFlying ? 1 : 0); val.prefab = LegacyResourcesAPI.Load<GameObject>("SpawnCards/HelperPrefab"); GameObject val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 20f, maxDistance = 45f, position = corePosition }, RoR2Application.rng)); if (Object.op_Implicit((Object)(object)val2)) { TeleLoc = val2.transform.position; CanTeleport = true; Object.Destroy((Object)(object)val2); } Object.Destroy((Object)(object)val); } } } public class Recall_Rework : BaseSkillState { public static float baseDuration = 4.05f; private float duration; private bool TeleportAnim = false; private Vector3 TeleLoc; private bool CanTeleport = false; private string soundString = "Play_voidDevastator_spawn_open"; private string animationLayerName = "Body"; private string animationStateName = "Spawn"; private string animationPlaybackRateParam = "Spawn.playbackRate"; private string spawnMuzzleName = "Portal"; private GameObject effectPrefab = VoidMegaCrabAlly.PortalEffectPrefab; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration; GetTelportLocation(); if (CanTeleport) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, spawnMuzzleName, false); Teleport(); } else { ((EntityState)this).outer.SetNextStateToMain(); } } public override void FixedUpdate() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!TeleportAnim && ((EntityState)this).fixedAge >= 0.1f) { TeleportAnim = true; Util.PlaySound(soundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, spawnMuzzleName, false); if (((EntityState)this).isAuthority && (Object)(object)((EntityState)this).characterMotor != (Object)null) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0f; } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: 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) return (InterruptPriority)9; } private void Teleport() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { TeleportHelper.TeleportBody(((EntityState)this).characterBody, TeleLoc); Deployable component = ((Component)((EntityState)this).characterBody.master).GetComponent<Deployable>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.ownerMaster)) { VoidMegaCrabItem_Rework.UpdateInventory(component.ownerMaster, ((EntityState)this).characterBody.master); } } GameObject teleportEffectPrefab = Run.instance.GetTeleportEffectPrefab(((Component)((EntityState)this).characterBody).gameObject); if (Object.op_Implicit((Object)(object)teleportEffectPrefab)) { EffectManager.SimpleEffect(teleportEffectPrefab, TeleLoc, Quaternion.identity, true); } VoidMegaCrabItem_Shared.UpdateAILeash(((EntityState)this).characterBody.master); ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration - ((EntityState)this).fixedAge, 0f); } private void GetTelportLocation() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master) || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.minionOwnership) || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.minionOwnership.ownerMaster)) { return; } CharacterMaster ownerMaster = ((EntityState)this).characterBody.master.minionOwnership.ownerMaster; if (((EntityState)this).characterBody.teamComponent.teamIndex != ownerMaster.teamIndex) { return; } CharacterBody body = ownerMaster.GetBody(); if (Object.op_Implicit((Object)(object)body) && body.healthComponent.alive) { Vector3 corePosition = ownerMaster.GetBody().corePosition; SpawnCard val = ScriptableObject.CreateInstance<SpawnCard>(); val.hullSize = ((EntityState)this).characterBody.hullClassification; val.nodeGraphType = (GraphType)(((EntityState)this).characterBody.isFlying ? 1 : 0); val.prefab = LegacyResourcesAPI.Load<GameObject>("SpawnCards/HelperPrefab"); GameObject val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 20f, maxDistance = 45f, position = corePosition }, RoR2Application.rng)); if (Object.op_Implicit((Object)(object)val2)) { TeleLoc = val2.transform.position; CanTeleport = true; Object.Destroy((Object)(object)val2); } Object.Destroy((Object)(object)val); } } } } namespace ZoeaRework.States.VoidJailer { public class Recall : BaseSkillState { public static float baseDuration = 2.05f; private float duration; private bool TeleportAnim = false; private Vector3 TeleLoc; private bool CanTeleport = false; private string soundString = "Play_voidDevastator_spawn_open"; private string animationLayerName = "Body"; private string animationStateName = "Spawn1"; private string animationPlaybackRateParam = "Spawn1.playbackRate"; private string spawnMuzzleName = SpawnState.spawnFXTransformName; private GameObject effectPrefab = SpawnState.spawnFXPrefab; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration; GetTelportLocation(); if (CanTeleport) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, spawnMuzzleName, false); Teleport(); } else { ((EntityState)this).outer.SetNextStateToMain(); } } public override void FixedUpdate() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!TeleportAnim && ((EntityState)this).fixedAge >= 0.1f) { TeleportAnim = true; Util.PlaySound(soundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, spawnMuzzleName, false); if (((EntityState)this).isAuthority && (Object)(object)((EntityState)this).characterMotor != (Object)null) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0f; } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: 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) return (InterruptPriority)9; } private void Teleport() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { TeleportHelper.TeleportBody(((EntityState)this).characterBody, TeleLoc); } GameObject teleportEffectPrefab = Run.instance.GetTeleportEffectPrefab(((Component)((EntityState)this).characterBody).gameObject); if (Object.op_Implicit((Object)(object)teleportEffectPrefab)) { EffectManager.SimpleEffect(teleportEffectPrefab, TeleLoc, Quaternion.identity, true); } VoidMegaCrabItem_Shared.UpdateAILeash(((EntityState)this).characterBody.master); ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration - ((EntityState)this).fixedAge, 0f); } private void GetTelportLocation() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master) || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.minionOwnership) || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.minionOwnership.ownerMaster)) { return; } CharacterMaster ownerMaster = ((EntityState)this).characterBody.master.minionOwnership.ownerMaster; if (((EntityState)this).characterBody.teamComponent.teamIndex != ownerMaster.teamIndex) { return; } CharacterBody body = ownerMaster.GetBody(); if (Object.op_Implicit((Object)(object)body) && body.healthComponent.alive) { Vector3 corePosition = ownerMaster.GetBody().corePosition; SpawnCard val = ScriptableObject.CreateInstance<SpawnCard>(); val.hullSize = ((EntityState)this).characterBody.hullClassification; val.nodeGraphType = (GraphType)(((EntityState)this).characterBody.isFlying ? 1 : 0); val.prefab = LegacyResourcesAPI.Load<GameObject>("SpawnCards/HelperPrefab"); GameObject val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 20f, maxDistance = 45f, position = corePosition }, RoR2Application.rng)); if (Object.op_Implicit((Object)(object)val2)) { TeleLoc = val2.transform.position; CanTeleport = true; Object.Destroy((Object)(object)val2); } Object.Destroy((Object)(object)val); } } } } namespace ZoeaRework.States.Nullifier { public class Recall : BaseSkillState { public static float baseDuration = 2.05f; private float duration; private bool TeleportAnim = false; private Vector3 TeleLoc; private bool CanTeleport = false; private string soundString = SpawnState.spawnSoundString; private string animationLayerName = "Body"; private string animationStateName = "Spawn"; private string animationPlaybackRateParam = "Spawn.playbackRate"; private string spawnMuzzleName = "PortalEffect"; private GameObject effectPrefab = SpawnState.spawnEffectPrefab; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration; GetTelportLocation(); if (CanTeleport) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, spawnMuzzleName, false); Teleport(); } else { ((EntityState)this).outer.SetNextStateToMain(); } } public override void FixedUpdate() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!TeleportAnim && ((EntityState)this).fixedAge >= 0.1f) { TeleportAnim = true; Util.PlaySound(soundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, spawnMuzzleName, false); if (((EntityState)this).isAuthority && (Object)(object)((EntityState)this).characterMotor != (Object)null) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0f; } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: 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) return (InterruptPriority)9; } private void Teleport() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { TeleportHelper.TeleportBody(((EntityState)this).characterBody, TeleLoc); } GameObject teleportEffectPrefab = Run.instance.GetTeleportEffectPrefab(((Component)((EntityState)this).characterBody).gameObject); if (Object.op_Implicit((Object)(object)teleportEffectPrefab)) { EffectManager.SimpleEffect(teleportEffectPrefab, TeleLoc, Quaternion.identity, true); } VoidMegaCrabItem_Shared.UpdateAILeash(((EntityState)this).characterBody.master); ((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration - ((EntityState)this).fixedAge, 0f); } private void GetTelportLocation() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master) || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.minionOwnership) || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.minionOwnership.ownerMaster)) { return; } CharacterMaster ownerMaster = ((EntityState)this).characterBody.master.minionOwnership.ownerMaster; if (((EntityState)this).characterBody.teamComponent.teamIndex != ownerMaster.teamIndex) { return; } CharacterBody body = ownerMaster.GetBody(); if (Object.op_Implicit((Object)(object)body) && body.healthComponent.alive) { Vector3 corePosition = ownerMaster.GetBody().corePosition; SpawnCard val = ScriptableObject.CreateInstance<SpawnCard>(); val.hullSize = ((EntityState)this).characterBody.hullClassification; val.nodeGraphType = (GraphType)(((EntityState)this).characterBody.isFlying ? 1 : 0); val.prefab = LegacyResourcesAPI.Load<GameObject>("SpawnCards/HelperPrefab"); GameObject val2 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 20f, maxDistance = 45f, position = corePosition }, RoR2Application.rng)); if (Object.op_Implicit((Object)(object)val2)) { TeleLoc = val2.transform.position; CanTeleport = true; Object.Destroy((Object)(object)val2); } Object.Destroy((Object)(object)val); } } } public class SelfDetonate : BaseSkillState { public override void OnEnter() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).healthComponent)) { DamageInfo val = new DamageInfo(); val.damage = ((EntityState)this).healthComponent.fullCombinedHealth * 3f; val.position = ((EntityState)this).characterBody.corePosition; val.force = Vector3.zero; val.crit = false; val.attacker = null; val.inflictor = null; val.damageType = DamageTypeCombo.op_Implicit((DamageType)264258); ((EntityState)this).characterBody.healthComponent.TakeDamage(val); } ((EntityState)this).outer.SetNextStateToMain(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: 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) return (InterruptPriority)9; } } } namespace ZoeaRework.Modules { public static class Buffs { internal static List<BuffDef> buffDefs = new List<BuffDef>(); internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance<BuffDef>(); ((Object)val).name = buffName; val.buffColor = buffColor; val.canStack = canStack; val.isDebuff = isDebuff; val.isCooldown = isCooldown; val.eliteDef = null; val.iconSprite = buffIcon; ((Object)val).name = ((Object)val).name; buffDefs.Add(val); return val; } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public string identifier => "com.kking117.ZoeaRework"; public void Initialize() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; contentPack.bodyPrefabs.Add(Prefabs.bodyPrefabs.ToArray()); contentPack.entityStateTypes.Add(States.entityStates.ToArray()); contentPack.skillDefs.Add(Skills.skillDefs.ToArray()); contentPack.skillFamilies.Add(Skills.skillFamilies.ToArray()); args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } internal static class Prefabs { internal static List<GameObject> bodyPrefabs = new List<GameObject>(); } internal static class Skills { internal static List<SkillFamily> skillFamilies = new List<SkillFamily>(); internal static List<SkillDef> skillDefs = new List<SkillDef>(); internal static void RegisterSkill(SkillDef skill) { skillDefs.Add(skill); } internal static void AddSkillToSlot(GameObject prefab, SkillDef skill, SkillSlot slot) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Invalid comparison between Unknown and I4 //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Invalid comparison between Unknown and I4 //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Invalid comparison between Unknown and I4 //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Expected O, but got Unknown //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = prefab.GetComponent<SkillLocator>(); SkillFamily val = null; if ((int)slot == 0) { if (!Object.op_Implicit((Object)(object)component.primary)) { AddSkillFamilyToSlot(prefab, component, slot); } val = component.primary.skillFamily; } else if ((int)slot == 1) { if (!Object.op_Implicit((Object)(object)component.secondary)) { AddSkillFamilyToSlot(prefab, component, slot); } val = component.secondary.skillFamily; } else if ((int)slot == 2) { if (!Object.op_Implicit((Object)(object)component.utility)) { AddSkillFamilyToSlot(prefab, component, slot); } val = component.utility.skillFamily; } else if ((int)slot == 3) { if (!Object.op_Implicit((Object)(object)component.special)) { AddSkillFamilyToSlot(prefab, component, slot); } val = component.special.skillFamily; } if (Object.op_Implicit((Object)(object)val)) { Array.Resize(ref val.variants, val.variants.Length + 1); Variant[] variants = val.variants; int num = val.variants.Length - 1; Variant val2 = new Variant { skillDef = skill }; ((Variant)(ref val2)).viewableNode = new Node(skill.skillNameToken, false, (Node)null); variants[num] = val2; } } internal static void AddSkillFamilyToSlot(GameObject prefab, SkillLocator skillLocator, SkillSlot slot) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Invalid comparison between Unknown and I4 //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Invalid comparison between Unknown and I4 //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Invalid comparison between Unknown and I4 if ((int)slot == 0) { skillLocator.primary = prefab.AddComponent<GenericSkill>(); SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>(); ((Object)val).name = ((Object)prefab).name + "PrimaryFamily"; val.variants = (Variant[])(object)new Variant[0]; skillLocator.primary._skillFamily = val; skillFamilies.Add(val); } else if ((int)slot == 1) { skillLocator.secondary = prefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); ((Object)val2).name = ((Object)prefab).name + "SecondaryFamily"; val2.variants = (Variant[])(object)new Variant[0]; skillLocator.secondary._skillFamily = val2; skillFamilies.Add(val2); } else if ((int)slot == 2) { skillLocator.utility = prefab.AddComponent<GenericSkill>(); SkillFamily val3 = ScriptableObject.CreateInstance<SkillFamily>(); ((Object)val3).name = ((Object)prefab).name + "UtilityFamily"; val3.variants = (Variant[])(object)new Variant[0]; skillLocator.utility._skillFamily = val3; skillFamilies.Add(val3); } else if ((int)slot == 3) { skillLocator.special = prefab.AddComponent<GenericSkill>(); SkillFamily val4 = ScriptableObject.CreateInstance<SkillFamily>(); ((Object)val4).name = ((Object)prefab).name + "SpecialFamily"; val4.variants = (Variant[])(object)new Variant[0]; skillLocator.special._skillFamily = val4; skillFamilies.Add(val4); } } internal static void WipeLoadout(GameObject prefab) { GenericSkill[] componentsInChildren = prefab.GetComponentsInChildren<GenericSkill>(); foreach (GenericSkill val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } SkillLocator component = prefab.GetComponent<SkillLocator>(); } internal static void LogSkillDriver(AISkillDriver copyme) { MonoBehaviour.print((object)("============" + copyme.customName + "============")); MonoBehaviour.print((object)("activationRequiresAimConfirmation = " + copyme.activationRequiresAimConfirmation)); MonoBehaviour.print((object)("activationRequiresAimTargetLoS = " + copyme.activationRequiresAimTargetLoS)); MonoBehaviour.print((object)("activationRequiresTargetLoS = " + copyme.activationRequiresTargetLoS)); MonoBehaviour.print((object)("aimType = " + ((object)(AimType)(ref copyme.aimType)).ToString())); MonoBehaviour.print((object)("buttonPressType = " + ((object)(ButtonPressType)(ref copyme.buttonPressType)).ToString())); MonoBehaviour.print((object)("driverUpdateTimerOverride = " + copyme.driverUpdateTimerOverride)); MonoBehaviour.print((object)("ignoreNodeGraph = " + copyme.ignoreNodeGraph)); MonoBehaviour.print((object)("maxDistance = " + copyme.maxDistance)); MonoBehaviour.print((object)("maxTargetHealthFraction = " + copyme.maxTargetHealthFraction)); MonoBehaviour.print((object)("maxUserHealthFractio = " + copyme.maxUserHealthFraction)); MonoBehaviour.print((object)("minDistance = " + copyme.minDistance)); MonoBehaviour.print((object)("minTargetHealthFraction = " + copyme.minTargetHealthFraction)); MonoBehaviour.print((object)("minUserHealthFraction = " + copyme.minUserHealthFraction)); MonoBehaviour.print((object)("moveInputScale = " + copyme.moveInputScale)); MonoBehaviour.print((object)("movementType = " + ((object)(MovementType)(ref copyme.movementType)).ToString())); MonoBehaviour.print((object)("moveTargetType = " + ((object)(TargetType)(ref copyme.moveTargetType)).ToString())); MonoBehaviour.print((object)("nextHighPriorityOverride = " + (object)copyme.nextHighPriorityOverride)); MonoBehaviour.print((object)("noRepeat = " + copyme.noRepeat)); MonoBehaviour.print((object)("requiredSkill = " + (object)copyme.requiredSkill)); MonoBehaviour.print((object)("requireEquipmentReady = " + copyme.requireEquipmentReady)); MonoBehaviour.print((object)("requireSkillReady = " + copyme.requireSkillReady)); MonoBehaviour.print((object)("resetCurrentEnemyOnNextDriverSelection = " + copyme.resetCurrentEnemyOnNextDriverSelection)); MonoBehaviour.print((object)("selectionRequiresAimTarget = " + copyme.selectionRequiresAimTarget)); MonoBehaviour.print((object)("selectionRequiresOnGround = " + copyme.selectionRequiresOnGround)); MonoBehaviour.print((object)("selectionRequiresTargetLoS = " + copyme.selectionRequiresTargetLoS)); MonoBehaviour.print((object)("shouldFireEquipment = " + copyme.shouldFireEquipment)); MonoBehaviour.print((object)("shouldSprint = " + copyme.shouldSprint)); MonoBehaviour.print((object)("skillSlot = " + ((object)(SkillSlot)(ref copyme.skillSlot)).ToString())); MonoBehaviour.print((object)"===================================="); } } public static class States { internal static List<Type> entityStates = new List<Type>(); public static void RegisterState(Type thistype) { entityStates.Add(thistype); } } } namespace ZoeaRework.Changes { public class NullifierAlly { public static GameObject AllyBodyObject; public static GameObject AllyMasterObject; public static SkillDef UtilitySkill; public static SkillDef SpecialSkill; public static CharacterSpawnCard AllySpawnCard; public static void Begin() { CreateUtilitySkill(); CreateSpecialSkill(); GatherEditAssets(); UpdateAI(); } private static void GatherEditAssets() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_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) AllyMasterObject = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Nullifier/NullifierAllyMaster.prefab").WaitForCompletion(); AllySpawnCard = Object.Instantiate<CharacterSpawnCard>(Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Nullifier/cscNullifierAlly.asset").WaitForCompletion()); CharacterMaster component = AllyMasterObject.GetComponent<CharacterMaster>(); if (Object.op_Implicit((Object)(object)component.bodyPrefab)) { AllyBodyObject = component.bodyPrefab; Skills.AddSkillToSlot(AllyBodyObject, UtilitySkill, (SkillSlot)2); Skills.AddSkillToSlot(AllyBodyObject, SpecialSkill, (SkillSlot)3); CharacterBody component2 = component.bodyPrefab.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component2)) { component2.baseMoveSpeed = MainPlugin.Config_Nullifier_BaseSpeed; component2.baseMaxHealth *= 0.5f; component2.levelMaxHealth *= 0.5f; } } } private static void UpdateAI() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_0560: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_05d8: Unknown result type (might be due to invalid IL or missing references) //IL_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_0628: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0670: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06e8: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Unknown result type (might be due to invalid IL or missing references) //IL_0770: Unknown result type (might be due to invalid IL or missing references) //IL_0778: Unknown result type (might be due to invalid IL or missing references) //IL_07e8: Unknown result type (might be due to invalid IL or missing references) //IL_07f0: Unknown result type (might be due to invalid IL or missing references) //IL_0840: Unknown result type (might be due to invalid IL or missing references) //IL_0878: Unknown result type (might be due to invalid IL or missing references) //IL_0880: Unknown result type (might be due to invalid IL or missing references) //IL_08f0: Unknown result type (might be due to invalid IL or missing references) //IL_08f8: Unknown result type (might be due to invalid IL or missing references) //IL_0948: Unknown result type (might be due to invalid IL or missing references) //IL_0980: Unknown result type (might be due to invalid IL or missing references) //IL_0988: Unknown result type (might be due to invalid IL or missing references) //IL_09f8: Unknown result type (might be due to invalid IL or missing references) //IL_0a00: Unknown result type (might be due to invalid IL or missing references) //IL_0a50: Unknown result type (might be due to invalid IL or missing references) BaseAI component = AllyMasterObject.GetComponent<BaseAI>(); if (Object.op_Implicit((Object)(object)component)) { component.neverRetaliateFriendlies = true; component.fullVision = true; } AISkillDriver[] componentsInChildren = AllyMasterObject.GetComponentsInChildren<AISkillDriver>(); foreach (AISkillDriver val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } AISkillDriver val2 = AllyMasterObject.AddComponent<AISkillDriver>(); val2.customName = "SuicideDetonate"; val2.activationRequiresAimConfirmation = false; val2.activationRequiresAimTargetLoS = false; val2.activationRequiresTargetLoS = false; val2.aimType = (AimType)1; val2.buttonPressType = (ButtonPressType)2; val2.driverUpdateTimerOverride = -1f; val2.ignoreNodeGraph = true; val2.maxDistance = 9f; val2.minDistance = 0f; val2.maxTargetHealthFraction = float.PositiveInfinity; val2.maxUserHealthFraction = 0.5f; val2.minTargetHealthFraction = float.NegativeInfinity; val2.minUserHealthFraction = float.NegativeInfinity; val2.moveInputScale = 1f; val2.movementType = (MovementType)1; val2.moveTargetType = (TargetType)0; val2.noRepeat = false; val2.requireEquipmentReady = false; val2.requireSkillReady = false; val2.resetCurrentEnemyOnNextDriverSelection = false; val2.selectionRequiresAimTarget = false; val2.selectionRequiresOnGround = false; val2.selectionRequiresTargetLoS = false; val2.shouldFireEquipment = false; val2.shouldSprint = true; val2.skillSlot = (SkillSlot)3; AISkillDriver val3 = AllyMasterObject.AddComponent<AISkillDriver>(); val3.customName = "SuicideChaseClose"; val3.activationRequiresAimConfirmation = false; val3.activationRequiresAimTargetLoS = false; val3.activationRequiresTargetLoS = false; val3.aimType = (AimType)1; val3.buttonPressType = (ButtonPressType)2; val3.driverUpdateTimerOverride = -1f; val3.ignoreNodeGraph = true; val3.maxDistance = 14f; val3.minDistance = 0f; val3.maxTargetHealthFraction = float.PositiveInfinity; val3.maxUserHealthFraction = 0.5f; val3.minTargetHealthFraction = float.NegativeInfinity; val3.minUserHealthFraction = float.NegativeInfinity; val3.moveInputScale = 1f; val3.movementType = (MovementType)1; val3.moveTargetType = (TargetType)0; val3.noRepeat = false; val3.requireEquipmentReady = false; val3.requireSkillReady = false; val3.resetCurrentEnemyOnNextDriverSelection = false; val3.selectionRequiresAimTarget = false; val3.selectionRequiresOnGround = false; val3.selectionRequiresTargetLoS = true; val3.shouldFireEquipment = false; val3.shouldSprint = true; val3.skillSlot = (SkillSlot)0; AISkillDriver val4 = AllyMasterObject.AddComponent<AISkillDriver>(); val4.customName = "SuicideChaseNodeGraph"; val4.activationRequiresAimConfirmation = false; val4.activationRequiresAimTargetLoS = false; val4.activationRequiresTargetLoS = false; val4.aimType = (AimType)1; val4.buttonPressType = (ButtonPressType)2; val4.driverUpdateTimerOverride = -1f; val4.ignoreNodeGraph = false; val4.maxDistance = 150f; val4.minDistance = 0f; val4.maxTargetHealthFraction = float.PositiveInfinity; val4.maxUserHealthFraction = 0.5f; val4.minTargetHealthFraction = float.NegativeInfinity; val4.minUserHealthFraction = float.NegativeInfinity; val4.moveInputScale = 1f; val4.movementType = (MovementType)1; val4.moveTargetType = (TargetType)0; val4.noRepeat = false; val4.requireEquipmentReady = false; val4.requireSkillReady = false; val4.resetCurrentEnemyOnNextDriverSelection = false; val4.selectionRequiresAimTarget = false; val4.selectionRequiresOnGround = false; val4.selectionRequiresTargetLoS = true; val4.shouldFireEquipment = false; val4.shouldSprint = true; val4.skillSlot = (SkillSlot)0; AISkillDriver val5 = AllyMasterObject.AddComponent<AISkillDriver>(); val5.customName = "PanicFireWhenClose"; val5.activationRequiresAimConfirmation = false; val5.activationRequiresAimTargetLoS = false; val5.activationRequiresTargetLoS = false; val5.aimType = (AimType)1; val5.buttonPressType = (ButtonPressType)2; val5.driverUpdateTimerOverride = 3f; val5.ignoreNodeGraph = true; val5.maxDistance = 11f; val5.minDistance = 0f; val5.maxTargetHealthFraction = float.PositiveInfinity; val5.maxUserHealthFraction = float.PositiveInfinity; val5.minTargetHealthFraction = float.NegativeInfinity; val5.minUserHealthFraction = float.NegativeInfinity; val5.moveInputScale = 1f; val5.movementType = (MovementType)3; val5.moveTargetType = (TargetType)0; val5.noRepeat = false; val5.requireEquipmentReady = false; val5.requireSkillReady = false; val5.resetCurrentEnemyOnNextDriverSelection = false; val5.selectionRequiresAimTarget = false; val5.selectionRequiresOnGround = false; val5.selectionRequiresTargetLoS = false; val5.shouldFireEquipment = false; val5.shouldSprint = false; val5.skillSlot = (SkillSlot)0; AISkillDriver val6 = AllyMasterObject.AddComponent<AISkillDriver>(); val6.customName = "FireAndStrafe"; val6.activationRequiresAimConfirmation = false; val6.activationRequiresAimTargetLoS = false; val6.activationRequiresTargetLoS = true; val6.aimType = (AimType)1; val6.buttonPressType = (ButtonPressType)2; val6.driverUpdateTimerOverride = -1f; val6.ignoreNodeGraph = false; val6.maxDistance = 75f; val6.minDistance = 11f; val6.maxTargetHealthFraction = float.PositiveInfinity; val6.maxUserHealthFraction = float.PositiveInfinity; val6.minTargetHealthFraction = float.NegativeInfinity; val6.minUserHealthFraction = float.NegativeInfinity; val6.moveInputScale = 1f; val6.movementType = (MovementType)2; val6.moveTargetType = (TargetType)0; val6.noRepeat = false; val6.requireEquipmentReady = false; val6.requireSkillReady = true; val6.resetCurrentEnemyOnNextDriverSelection = false; val6.selectionRequiresAimTarget = false; val6.selectionRequiresOnGround = false; val6.selectionRequiresTargetLoS = false; val6.shouldFireEquipment = false; val6.shouldSprint = false; val6.skillSlot = (SkillSlot)0; AISkillDriver val7 = AllyMasterObject.AddComponent<AISkillDriver>(); val7.customName = "ReturnToOwnerLeash"; val7.activationRequiresAimConfirmation = false; val7.activationRequiresAimTargetLoS = false; val7.activationRequiresTargetLoS = false; val7.aimType = (AimType)3; val7.buttonPressType = (ButtonPressType)0; val7.driverUpdateTimerOverride = 3f; val7.ignoreNodeGraph = false; val7.maxDistance = float.PositiveInfinity; val7.minDistance = MainPlugin.Config_AIShared_MinRecallDist; val7.maxTargetHealthFraction = float.PositiveInfinity; val7.maxUserHealthFraction = float.PositiveInfinity; val7.minTargetHealthFraction = float.NegativeInfinity; val7.minUserHealthFraction = float.NegativeInfinity; val7.moveInputScale = 1f; val7.movementType = (MovementType)1; val7.moveTargetType = (TargetType)2; val7.noRepeat = false; val7.requireEquipmentReady = false; val7.selectionRequiresAimTarget = false; val7.selectionRequiresOnGround = false; val7.selectionRequiresTargetLoS = false; val7.shouldFireEquipment = false; val7.shouldSprint = false; val7.requireSkillReady = false; val7.skillSlot = (SkillSlot)2; val7.resetCurrentEnemyOnNextDriverSelection = false; AISkillDriver val8 = AllyMasterObject.AddComponent<AISkillDriver>(); val8.customName = "FireAndChase"; val8.activationRequiresAimConfirmation = false; val8.activationRequiresAimTargetLoS = false; val8.activationRequiresTargetLoS = true; val8.aimType = (AimType)1; val8.buttonPressType = (ButtonPressType)2; val8.driverUpdateTimerOverride = -1f; val8.ignoreNodeGraph = false; val8.maxDistance = 200f; val8.minDistance = 75f; val8.maxTargetHealthFraction = float.PositiveInfinity; val8.maxUserHealthFraction = float.PositiveInfinity; val8.minTargetHealthFraction = float.NegativeInfinity; val8.minUserHealthFraction = float.NegativeInfinity; val8.moveInputScale = 1f; val8.movementType = (MovementType)2; val8.moveTargetType = (TargetType)0; val8.noRepeat = false; val8.requireEquipmentReady = false; val8.requireSkillReady = true; val8.resetCurrentEnemyOnNextDriverSelection = false; val8.selectionRequiresAimTarget = false; val8.selectionRequiresOnGround = false; val8.selectionRequiresTargetLoS = true; val8.shouldFireEquipment = false; val8.shouldSprint = false; val8.skillSlot = (SkillSlot)0; AISkillDriver val9 = AllyMasterObject.AddComponent<AISkillDriver>(); val9.customName = "FollowNodeGraphToTarget"; val9.activationRequiresAimConfirmation = false; val9.activationRequiresAimTargetLoS = false; val9.activationRequiresTargetLoS = false; val9.aimType = (AimType)1; val9.buttonPressType = (ButtonPressType)0; val9.driverUpdateTimerOverride = -1f; val9.ignoreNodeGraph = false; val9.maxDistance = float.PositiveInfinity; val9.minDistance = 0f; val9.maxTargetHealthFraction = float.PositiveInfinity; val9.maxUserHealthFraction = float.PositiveInfinity; val9.minTargetHealthFraction = float.NegativeInfinity; val9.minUserHealthFraction = float.NegativeInfinity; val9.moveInputScale = 1f; val9.movementType = (MovementType)1; val9.moveTargetType = (TargetType)0; val9.noRepeat = false; val9.requireEquipmentReady = false; val9.requireSkillReady = false; val9.resetCurrentEnemyOnNextDriverSelection = false; val9.selectionRequiresAimTarget = false; val9.selectionRequiresOnGround = false; val9.selectionRequiresTargetLoS = true; val9.shouldFireEquipment = false; val9.shouldSprint = false; val9.skillSlot = (SkillSlot)(-1); AISkillDriver val10 = AllyMasterObject.AddComponent<AISkillDriver>(); val10.customName = "ReturnToLeaderDefault"; val10.activationRequiresAimConfirmation = false; val10.activationRequiresAimTargetLoS = false; val10.activationRequiresTargetLoS = false; val10.aimType = (AimType)4; val10.buttonPressType = (ButtonPressType)0; val10.driverUpdateTimerOverride = -1f; val10.ignoreNodeGraph = false; val10.maxDistance = float.PositiveInfinity; val10.minDistance = 20f; val10.maxTargetHealthFraction = float.PositiveInfinity; val10.maxUserHealthFraction = float.PositiveInfinity; val10.minTargetHealthFraction = float.NegativeInfinity; val10.minUserHealthFraction = float.NegativeInfinity; val10.moveInputScale = 1f; val10.movementType = (MovementType)1; val10.moveTargetType = (TargetType)2; val10.noRepeat = false; val10.requireEquipmentReady = false; val10.requireSkillReady = false; val10.resetCurrentEnemyOnNextDriverSelection = true; val10.selectionRequiresAimTarget = false; val10.selectionRequiresOnGround = false; val10.selectionRequiresTargetLoS = false; val10.shouldFireEquipment = false; val10.shouldSprint = false; val10.skillSlot = (SkillSlot)(-1); AISkillDriver val11 = AllyMasterObject.AddComponent<AISkillDriver>(); val11.customName = "WaitNearLeaderDefault"; val11.activationRequiresAimConfirmation = false; val11.activationRequiresAimTargetLoS = false; val11.activationRequiresTargetLoS = false; val11.aimType = (AimType)4; val11.buttonPressType = (ButtonPressType)0; val11.driverUpdateTimerOverride = -1f; val11.ignoreNodeGraph = false; val11.maxDistance = float.PositiveInfinity; val11.minDistance = 0f; val11.maxTargetHealthFraction = float.PositiveInfinity; val11.maxUserHealthFraction = float.PositiveInfinity; val11.minTargetHealthFraction = float.NegativeInfinity; val11.minUserHealthFraction = float.NegativeInfinity; val11.moveInputScale = 1f; val11.movementType = (MovementType)0; val11.moveTargetType = (TargetType)2; val11.noRepeat = false; val11.requireEquipmentReady = false; val11.requireSkillReady = false; val11.resetCurrentEnemyOnNextDriverSelection = true; val11.selectionRequiresAimTarget = false; val11.selectionRequiresOnGround = false; val11.selectionRequiresTargetLoS = false; val11.shouldFireEquipment = false; val11.shouldSprint = false; val11.skillSlot = (SkillSlot)(-1); } private static void CreateUtilitySkill() { //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_00dc: Unknown result type (might be due to invalid IL or missing references) UtilitySkill = ScriptableObject.CreateInstance<SkillDef>(); UtilitySkill.activationState = new SerializableEntityStateType(typeof(ZoeaRework.States.Nullifier.Recall)); ZoeaRework.Modules.States.RegisterState(typeof(ZoeaRework.States.Nullifier.Recall)); UtilitySkill.activationStateMachineName = "Body"; UtilitySkill.dontAllowPastMaxStocks = false; UtilitySkill.resetCooldownTimerOnUse = false; UtilitySkill.keywordTokens = null; UtilitySkill.baseMaxStock = 1; UtilitySkill.rechargeStock = 1; UtilitySkill.requiredStock = 1; UtilitySkill.stockToConsume = 1; UtilitySkill.fullRestockOnAssign = true; UtilitySkill.baseRechargeInterval = MainPlugin.Config_Nullifier_RecallCooldown; UtilitySkill.beginSkillCooldownOnSkillEnd = false; UtilitySkill.canceledFromSprinting = false; UtilitySkill.cancelSprintingOnActivation = true; UtilitySkill.forceSprintDuringState = false; UtilitySkill.interruptPriority = (InterruptPriority)0; UtilitySkill.isCombatSkill = false; UtilitySkill.mustKeyPress = false; UtilitySkill.icon = null; UtilitySkill.skillDescriptionToken = "KKING117_ZOEAREWORK_UTILITY_TELEPORT_DESC"; UtilitySkill.skillNameToken = "KKING117_ZOEAREWORK_UTILITY_TELEPORT_NAME"; UtilitySkill.skillName = UtilitySkill.skillNameToken; Skills.RegisterSkill(UtilitySkill); } private static void CreateSpecialSkill() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) LanguageAPI.Add("KKING117_ZOEAREWORK_SPECIAL_DETONATE_NAME", "Detonate"); LanguageAPI.Add("KKING117_ZOEAREWORK_SPECIAL_DETONATE_DESC", "Kill yourself."); SpecialSkill = ScriptableObject.CreateInstance<SkillDef>(); SpecialSkill.activationState = new SerializableEntityStateType(typeof(SelfDetonate)); ZoeaRework.Modules.States.RegisterState(typeof(SelfDetonate)); SpecialSkill.activationStateMachineName = "Body"; SpecialSkill.dontAllowPastMaxStocks = false; SpecialSkill.resetCooldownTimerOnUse = false; SpecialSkill.keywordTokens = null; SpecialSkill.baseMaxStock = 1; SpecialSkill.rechargeStock = 1; SpecialSkill.requiredStock = 1; SpecialSkill.stockToConsume = 1; SpecialSkill.fullRestockOnAssign = true; SpecialSkill.baseRechargeInterval = 3f; SpecialSkill.beginSkillCooldownOnSkillEnd = false; SpecialSkill.canceledFromSprinting = false; SpecialSkill.cancelSprintingOnActivation = true; SpecialSkill.forceSprintDuringState = false; SpecialSkill.interruptPriority = (InterruptPriority)0; SpecialSkill.isCombatSkill = true; SpecialSkill.mustKeyPress = false; SpecialSkill.icon = null; SpecialSkill.skillDescriptionToken = "KKING117_ZOEAREWORK_SPECIAL_DETONATE_DESC"; SpecialSkill.skillNameToken = "KKING117_ZOEAREWORK_SPECIAL_DETONATE_NAME"; SpecialSkill.skillName = SpecialSkill.skillNameToken; Skills.RegisterSkill(SpecialSkill); } } public class VoidJailerAlly { public static GameObject AllyBodyObject; public static GameObject AllyMasterObject; public static SkillDef UtilitySkill; public static CharacterSpawnCard AllySpawnCard; public static void Begin() { CreateUtilitySkill(); GatherEditAssets(); UpdateAI(); } private static void GatherEditAssets() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_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) AllyMasterObject = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidJailer/VoidJailerAllyMaster.prefab").WaitForCompletion(); AllySpawnCard = Object.Instantiate<CharacterSpawnCard>(Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/VoidJailer/cscVoidJailerAlly.asset").WaitForCompletion()); CharacterMaster component = AllyMasterObject.GetComponent<CharacterMaster>(); if (Object.op_Implicit((Object)(object)component.bodyPrefab)) { AllyBodyObject = component.bodyPrefab; Skills.AddSkillToSlot(AllyBodyObject, UtilitySkill, (SkillSlot)2); CharacterBody component2 = component.bodyPrefab.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component2)) { component2.baseMoveSpeed = MainPlugin.Config_VoidJailer_BaseSpeed; component2.baseMaxHealth *= 0.5f; component2.levelMaxHealth *= 0.5f; } } } private static void UpdateAI() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_0560: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_05d8: Unknown result type (might be due to invalid IL or missing references) //IL_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0670: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06e8: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Unknown result type (might be due to invalid IL or missing references) BaseAI component = AllyMasterObject.GetComponent<BaseAI>(); if (Object.op_Implicit((Object)(object)component)) { component.neverRetaliateFriendlies = true; component.fullVision = true; } AISkillDriver[] componentsInChildren = AllyMasterObject.GetComponentsInChildren<AISkillDriver>(); foreach (AISkillDriver val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } AISkillDriver val2 = AllyMasterObject.AddComponent<AISkillDriver>(); val2.customName = "Capture"; val2.activationRequiresAimConfirmation = false; val2.activationRequiresAimTargetLoS = false; val2.activationRequiresTargetLoS = true; val2.aimType = (AimType)1; val2.buttonPressType = (ButtonPressType)0; val2.driverUpdateTimerOverride = -1f; val2.ignoreNodeGraph = false; val2.maxDistance = 80f; val2.minDistance = 0f; val2.maxTargetHealthFraction = float.PositiveInfinity; val2.maxUserHealthFraction = float.PositiveInfinity; val2.minTargetHealthFraction = float.NegativeInfinity; val2.minUserHealthFraction = float.NegativeInfinity; val2.moveInputScale = 1f; val2.movementType = (MovementType)2; val2.moveTargetType = (TargetType)0; val2.noRepeat = false; val2.requireEquipmentReady = false; val2.requireSkillReady = true; val2.resetCurrentEnemyOnNextDriverSelection = false; val2.selectionRequiresAimTarget = false; val2.selectionRequiresOnGround = false; val2.selectionRequiresTargetLoS = true; val2.shouldFireEquipment = false; val2.shouldSprint = false; val2.skillSlot = (SkillSlot)1; AISkillDriver val3 = AllyMasterObject.AddComponent<AISkillDriver>(); val3.customName = "PrimaryCharge"; val3.activationRequiresAimConfirmation = true; val3.activationRequiresAimTargetLoS = false; val3.activationRequiresTargetLoS = false; val3.aimType = (AimType)1; val3.buttonPressType = (ButtonPressType)0; val3.driverUpdateTimerOverride = 1f; val3.ignoreNodeGraph = false; val3.maxDistance = 80f; val3.minDistance = 45f; val3.maxTargetHealthFraction = float.PositiveInfinity; val3.maxUserHealthFraction = float.PositiveInfinity; val3.minTargetHealthFraction = float.NegativeInfinity; val3.minUserHealthFraction = float.NegativeInfinity; val3.moveInputScale = 1f; val3.movementType = (MovementType)1; val3.moveTargetType = (TargetType)0; val3.noRepeat = false; val3.requireEquipmentReady = false; val3.requireSkillReady = true; val3.resetCurrentEnemyOnNextDriverSelection = false; val3.selectionRequiresAimTarget = false; val3.selectionRequiresOnGround = false; val3.selectionRequiresTargetLoS = true; val3.shouldFireEquipment = false; val3.shouldSprint = false; val3.skillSlot = (SkillSlot)0; AISkillDriver val4 = AllyMasterObject.AddComponent<AISkillDriver>(); val4.customName = "PrimaryStrafe"; val4.activationRequiresAimConfirmation = true; val4.activationRequiresAimTargetLoS = false; val4.activationRequiresTargetLoS = false; val4.aimType = (AimType)1; val4.buttonPressType = (ButtonPressType)0; val4.driverUpdateTimerOverride = 1f; val4.ignoreNodeGraph = false; val4.maxDistance = 45f; val4.minDistance = 1f; val4.maxTargetHealthFraction = float.PositiveInfinity; val4.maxUserHealthFraction = float.PositiveInfinity; val4.minTargetHealthFraction = float.NegativeInfinity; val4.minUserHealthFraction = float.NegativeInfinity; val4.moveInputScale = 1f; val4.movementType = (MovementType)2; val4.moveTargetType = (TargetType)0; val4.noRepeat = false; val4.requireEquipmentReady = false; val4.requireSkillReady = true; val4.resetCurrentEnemyOnNextDriverSelection = false; val4.selectionRequiresAimTarget = false; val4.selectionRequiresOnGround = false; val4.selectionRequiresTargetLoS = true; val4.shouldFireEquipment = false; val4.shouldSprint = false; val4.skillSlot = (SkillSlot)0; AISkillDriver val5 = AllyMasterObject.AddComponent<AISkillDriver>(); val5.customName = "ReturnToOwnerLeash"; val5.activationRequiresAimConfirmation = false; val5.activationRequiresAimTargetLoS = false; val5.activationRequiresTargetLoS = false; val5.aimType = (AimType)3; val5.buttonPressType = (ButtonPressType)0; val5.driverUpdateTimerOverride = 3f; val5.ignoreNodeGraph = false; val5.maxDistance = float.PositiveInfinity; val5.minDistance = MainPlugin.Config_AIShared_MinRecallDist; val5.maxTargetHealthFraction = float.PositiveInfinity; val5.maxUserHealthFraction = float.PositiveInfinity; val5.minTargetHealthFraction = float.NegativeInfinity; val5.minUserHealthFraction = float.NegativeInfinity; val5.moveInputScale = 1f; val5.movementType = (MovementType)1; val5.moveTargetType = (TargetType)2; val5.noRepeat = false; val5.requireEquipmentReady = false; val5.selectionRequiresAimTarget = false; val5.selectionRequiresOnGround = false; val5.selectionRequiresTargetLoS = false; val5.shouldFireEquipment = false; val5.shouldSprint = false; val5.requireSkillReady = true; val5.skillSlot = (SkillSlot)2; val5.resetCurrentEnemyOnNextDriverSelection = false; AISkillDriver val6 = AllyMasterObject.AddComponent<AISkillDriver>(); val6.customName = "PathFromAfar"; val6.activationRequiresAimConfirmation = false; val6.activationRequiresAimTargetLoS = false; val6.activationRequiresTargetLoS = false; val6.aimType = (AimType)1; val6.buttonPressType = (ButtonPressType)0; val6.driverUpdateTimerOverride = -1f; val6.ignoreNodeGraph = false; val6.maxDistance = float.PositiveInfinity; val6.minDistance = 0f; val6.maxTargetHealthFraction = float.PositiveInfinity; val6.maxUserHealthFraction = float.PositiveInfinity; val6.minTargetHealthFraction = float.NegativeInfinity; val6.minUserHealthFraction = float.NegativeInfinity; val6.moveInputScale = 1f; val6.movementType = (MovementType)1; val6.moveTargetType = (TargetType)0; val6.noRepeat = false; val6.requireEquipmentReady = false; val6.requireSkillReady = false; val6.resetCurrentEnemyOnNextDriverSelection = false; val6.selectionRequiresAimTarget = false; val6.selectionRequiresOnGround = false; val6.selectionRequiresTargetLoS = true; val6.shouldFireEquipment = false; val6.shouldSprint = false; val6.skillSlot = (SkillSlot)(-1); AISkillDriver val7 = AllyMasterObject.AddComponent<AISkillDriver>(); val7.customName = "ReturnToLeaderDefault"; val7.activationRequiresAimConfirmation = false; val7.activationRequiresAimTargetLoS = false; val7.activationRequiresTargetLoS = false; val7.aimType = (AimType)4; val7.buttonPressType = (ButtonPressType)0; val7.driverUpdateTimerOverride = -1f; val7.ignoreNodeGraph = false; val7.maxDistance = float.PositiveInfinity; val7.minDistance = 20f; val7.maxTargetHealthFraction = float.PositiveInfinity; val7.maxUserHealthFraction = float.PositiveInfinity; val7.minTargetHealthFraction = float.NegativeInfinity; val7.minUserHealthFraction = float.NegativeInfinity; val7.moveInputScale = 1f; val7.movementType = (MovementType)1; val7.moveTargetType = (TargetType)2; val7.noRepeat = false; val7.requireEquipmentReady = false; val7.requireSkillReady = false; val7.resetCurrentEnemyOnNextDriverSelection = true; val7.selectionRequiresAimTarget = false; val7.selectionRequiresOnGround = false; val7.selectionRequiresTargetLoS = false; val7.shouldFireEquipment = false; val7.shouldSprint = true; val7.skillSlot = (SkillSlot)(-1); AISkillDriver val8 = AllyMasterObject.AddComponent<AISkillDriver>(); val8.customName = "WaitNearLeaderDefault"; val8.activationRequiresAimConfirmation = false; val8.activationRequiresAimTargetLoS = false; val8.activationRequiresTargetLoS = false; val8.aimType = (AimType)4; val8.buttonPressType = (ButtonPressType)0; val8.driverUpdateTimerOverride = -1f; val8.ignoreNodeGraph = false; val8.maxDistance = float.PositiveInfinity; val8.minDistance = 0f; val8.maxTargetHealthFraction = float.PositiveInfinity; val8.maxUserHealthFraction = float.PositiveInfinity; val8.minTargetHealthFraction = float.NegativeInfinity; val8.minUserHealthFraction = float.NegativeInfinity; val8.moveInputScale = 1f; val8.movementType = (MovementType)0; val8.moveTargetType = (TargetType)2; val8.noRepeat = false; val8.requireEquipmentReady = false; val8.requireSkillReady = false; val8.resetCurrentEnemyOnNextDriverSelection = true; val8.selectionRequiresAimTarget = false; val8.selectionRequiresOnGround = false; val8.selectionRequiresTargetLoS = false; val8.shouldFireEquipment = false; val8.shouldSprint = false; val8.skillSlot = (SkillSlot)(-1); } private static void CreateUtilitySkill() { //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_00dc: Unknown result type (might be due to invalid IL or missing references) UtilitySkill = ScriptableObject.CreateInstance<SkillDef>(); UtilitySkill.activationState = new SerializableEntityStateType(typeof(ZoeaRework.States.VoidJailer.Recall)); ZoeaRework.Modules.States.RegisterState(typeof(ZoeaRework.States.VoidJailer.Recall)); UtilitySkill.activationStateMachineName = "Body"; UtilitySkill.dontAllowPastMaxStocks = false; UtilitySkill.resetCooldownTimerOnUse = false; UtilitySkill.keywordTokens = null; UtilitySkill.baseMaxStock = 1; UtilitySkill.rechargeStock = 1; UtilitySkill.requiredStock = 1; UtilitySkill.stockToConsume = 1; UtilitySkill.fullRestockOnAssign = true; UtilitySkill.baseRechargeInterval = MainPlugin.Config_VoidJailer_RecallCooldown; UtilitySkill.beginSkillCooldownOnSkillEnd = false; UtilitySkill.canceledFromSprinting = false; UtilitySkill.cancelSprintingOnActivation = true; UtilitySkill.forceSprintDuringState = false; UtilitySkill.interruptPriority = (InterruptPriority)0; UtilitySkill.isCombatSkill = false; UtilitySkill.mustKeyPress = false; UtilitySkill.icon = null; UtilitySkill.skillDescriptionToken = "KKING117_ZOEAREWORK_UTILITY_TELEPORT_DESC"; UtilitySkill.skillNameToken = "KKING117_ZOEAREWORK_UTILITY_TELEPORT_NAME"; UtilitySkill.skillName = UtilitySkill.skillNameToken; Skills.RegisterSkill(UtilitySkill); } } public class VoidMegaCrabAlly { public static GameObject AllyBodyObject; public static GameObject AllyMasterObject; public static SkillDef UtilitySkill; public static CharacterSpawnCard AllySpawnCard; internal static GameObject PortalEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabSpawnEffect.prefab").WaitForCompletion(); public static void Begin() { CreateUtilitySkill(); GatherEditAssets(); UpdateAI(); } internal static void PostLoad() { if (MainPlugin.Config_VoidMegaCrab_EnableDisplays) { CharacterMaster component = AllyMasterObject.GetComponent<CharacterMaster>(); if (Object.op_Implicit((Object)(object)component.bodyPrefab)) { VoidMegaCrabAllyDisplays.Create(component.bodyPrefab); } } } private static void GatherEditAssets() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_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) AllyMasterObject = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabAllyMaster.prefab").WaitForCompletion(); AllySpawnCard = Object.Instantiate<CharacterSpawnCard>(Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/VoidMegaCrab/cscVoidMegaCrabAlly.asset").WaitForCompletion()); CharacterMaster component = AllyMasterObject.GetComponent<CharacterMaster>(); if (!Object.op_Implicit((Object)(object)component.bodyPrefab)) { return; } AllyBodyObject = component.bodyPrefab; Skills.AddSkillToSlot(AllyBodyObject, UtilitySkill, (SkillSlot)2); CharacterBody component2 = component.bodyPrefab.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component2)) { component2.baseMoveSpeed = MainPlugin.Config_VoidMegaCrab_BaseSpeed; if (MainPlugin.Config_Rework_Enable) { component2.baseMaxHealth = MainPlugin.Config_VoidMegaCrab_Rework_BaseHealth; component2.levelMaxHealth = MainPlugin.Config_VoidMegaCrab_Rework_LevelHealth; component2.baseDamage = MainPlugin.Config_VoidMegaCrab_Rework_BaseDamage; component2.levelDamage = MainPlugin.Config_VoidMegaCrab_Rework_LevelDamage; } else { component2.baseMaxHealth *= 0.5f; component2.levelMaxHealth *= 0.5f; } } } private static void UpdateAI() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_0560: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_05d8: Unknown result type (might be due to invalid IL or missing references) //IL_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0670: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06e8: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Unknown result type (might be due to invalid IL or missing references) //IL_0770: Unknown result type (might be due to invalid IL or missing references) //IL_0778: Unknown result type (might be due to invalid IL or missing references) //IL_07e8: Unknown result type (might be due to invalid IL or missing references) //IL_07f0: Unknown result type (might be due to invalid IL or missing references) //IL_0840: Unknown result type (might be due to invalid IL or missing references) //IL_0878: Unknown result type (might be due to invalid IL or missing references) //IL_0880: Unknown result type (might be due to invalid IL or missing references) //IL_08f0: Unknown result type (might be due to invalid IL or missing references) //IL_08f8: Unknown result type (might be due to invalid IL or missing references) //IL_0948: Unknown result type (might be due to invalid IL or missing references) BaseAI component = AllyMasterObject.GetComponent<BaseAI>(); if (Object.op_Implicit((Object)(object)component)) { component.neverRetaliateFriendlies = true; component.fullVision = true; } AISkillDriver[] componentsInChildren = AllyMasterObject.GetComponentsInChildren<AISkillDriver>(); foreach (AISkillDriver val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } AISkillDriver val2 = AllyMasterObject.AddComponent<AISkillDriver>(); val2.customName = "FireBackMissiles"; val2.activationRequiresAimConfirmation = false; val2.activationRequiresAimTargetLoS = false; val2.activationRequiresTargetLoS = false; val2.aimType = (AimType)1; val2.buttonPressType = (ButtonPressType)0; val2.driverUpdateTimerOverride = -1f; val2.ignoreNodeGraph = false; val2.maxDistance = 300f; val2.minDistance = 0f; val2.maxTargetHealthFraction = float.PositiveInfinity; val2.maxUserHealthFraction = float.PositiveInfinity; val2.minTargetHealthFraction = float.NegativeInfinity; val2.minUserHealthFraction = float.NegativeInfinity; val2.moveInputScale = 1f; val2.movementType = (MovementType)1; val2.moveTargetType = (TargetType)0; val2.noRepeat = false; val2.requireEquipmentReady = false; val2.requireSkillReady = true; val2.resetCurrentEnemyOnNextDriverSelection = false; val2.selectionRequiresAimTarget = true; val2.selectionRequiresOnGround = false; val2.selectionRequiresTargetLoS = false; val2.shouldFireEquipment = false; val2.shouldSprint = false; val2.skillSlot = (SkillSlot)3; AISkillDriver val3 = AllyMasterObject.AddComponent<AISkillDriver>(); val3.customName = "FireSecondaryStrafe"; val3.activationRequiresAimConfirmation = false; val3.activationRequiresAimTargetLoS = false; val3.activationRequiresTargetLoS = false; val3.aimType = (AimType)1; val3.buttonPressType = (ButtonPressType)0; val3.driverUpdateTimerOverride = 0.5f; val3.ignoreNodeGraph = false; val3.maxDistance = 50f; val3.minDistance = 0f; val3.maxTargetHealthFraction = float.PositiveInfinity; val3.maxUserHealthFraction = float.PositiveInfinity; val3.minTargetHealthFraction = float.NegativeInfinity; val3.minUserHealthFraction = float.NegativeInfinity; val3.moveInputScale = 1f; val3.movementType = (MovementType)2; val3.moveTargetType = (TargetType)0; val3.noRepeat = false; val3.requireEquipmentReady = false; val3.requireSkillReady = true; val3.resetCurrentEnemyOnNextDriverSelection = false; val3.selectionRequiresAimTarget = false; val3.selectionRequiresOnGround = false; val3.selectionRequiresTargetLoS = false; val3.shouldFireEquipment = false; val3.shouldSprint = false; val3.skillSlot = (SkillSlot)1; AISkillDriver val4 = AllyMasterObject.AddComponent<AISkillDriver>(); val4.customName = "FirePrimaryStrafe"; val4.activationRequiresAimConfirmation = false; val4.activationRequiresAimTargetLoS = false; val4.activationRequiresTargetLoS = true; val4.aimType = (AimType)1; val4.buttonPressType = (ButtonPressType)0; val4.driverUpdateTimerOverride = 1f; val4.ignoreNodeGraph = false; val4.maxDistance = 50f; val4.minDistance = 0f; val4.maxTargetHealthFraction = float.PositiveInfinity; val4.maxUserHealthFraction = float.PositiveInfinity; val4.minTargetHealthFraction = float.NegativeInfinity; val4.minUserHealthFraction = float.NegativeInfinity; val4.moveInputScale = 1f; val4.movementType = (MovementType)2; val4.moveTargetType = (TargetType)0; val4.noRepeat = false; val4.requireEquipmentReady = false; val4.requireSkillReady = true; val4.resetCurrentEnemyOnNextDriverSelection = false; val4.selectionRequiresAimTarget = false; val4.selectionRequiresOnGround = false; val4.selectionRequiresTargetLoS = true; val4.shouldFireEquipment = false; val4.shouldSprint = false; val4.skillSlot = (SkillSlot)0; AISkillDriver val5 = AllyMasterObject.AddComponent<AISkillDriver>(); val5.customName = "ReturnToOwnerLeash"; val5.activationRequiresAimConfirmation = false; val5.activationRequiresAimTargetLoS = false; val5.activationRequiresTargetLoS = false; val5.aimType = (AimType)3; val5.buttonPressType = (ButtonPressType)0; val5.driverUpdateTimerOverride = 3f; val5.ignoreNodeGraph = false; val5.maxDistance = float.PositiveInfinity; val5.minDistance = MainPlugin.Config_AIShared_MinRecallDist; val5.maxTargetHealthFraction = float.PositiveInfinity; val5.maxUserHealthFraction = float.PositiveInfinity; val5.minTargetHealthFraction = float.NegativeInfinity; val5.minUserHealthFraction = float.NegativeInfinity; val5.moveInputScale = 1f; val5.movementType = (MovementType)1; val5.moveTargetType = (TargetType)2; val5.noRepeat = false; val5.requireEquipmentReady = false; val5.selectionRequiresAimTarget = false; val5.selectionRequiresOnGround = false; val5.selectionRequiresTargetLoS = false; val5.shouldFireEquipment = false; val5.shouldSprint = false; val5.requireSkillReady = true; val5.skillSlot = (SkillSlot)2; val5.resetCurrentEnemyOnNextDriverSelection = false; AISkillDriver val6 = AllyMasterObject.AddComponent<AISkillDriver>(); val6.customName = "FireSecondaryChase"; val6.activationRequiresAimConfirmation = false; val6.activationRequiresAimTargetLoS = false; val6.activationRequiresTargetLoS = false; val6.aimType = (AimType)1; val6.buttonPressType = (ButtonPressType)0; val6.driverUpdateTimerOverride = 0.5f; val6.ignoreNodeGraph = false; val6.maxDistance = 100f; val6.minDistance = 50f; val6.maxTargetHealthFraction = float.PositiveInfinity; val6.maxUserHealthFraction = float.PositiveInfinity; val6.minTargetHealthFraction = float.NegativeInfinity; val6.minUserHealthFraction = float.NegativeInfinity; val6.moveInputScale = 1f; val6.movementType = (MovementType)2; val6.moveTargetType = (TargetType)0; val6.noRepeat = false; val6.requireEquipmentReady = false; val6.requireSkillReady = true; val6.resetCurrentEnemyOnNextDriverSelection = false; val6.selectionRequiresAimTarget = false; val6.selectionRequiresOnGround = false; val6.selectionRequiresTargetLoS = true; val6.shouldFireEquipment = false; val6.shouldSprint = false; val6.skillSlot = (SkillSlot)1; AISkillDriver val7 = AllyMasterObject.AddComponent<AISkillDriver>(); val7.customName = "FirePrimaryChase"; val7.activationRequiresAimConfirmation = false; val7.activationRequiresAimTargetLoS = false; val7.activationRequiresTargetLoS = true; val7.aimType = (AimType)1; val7.buttonPressType = (ButtonPressType)0; val7.driverUpdateTimerOverride = 1f; val7.ignoreNodeGraph = false; val7.maxDistance = 100f; val7.minDistance = 50f; val7.maxTargetHealthFraction = float.PositiveInfinity; val7.maxUserHealthFraction = float.PositiveInfinity; val7.minTargetHealthFraction = float.NegativeInfinity; val7.minUserHealthFraction = float.NegativeInfinity; val7.moveInputScale = 1f; val7.movementType = (MovementType)2; val7.moveTargetType = (TargetType)0; val7.noRepeat = false; val7.requireEquipmentReady = false; val7.requireSkillReady = true; val7.resetCurrentEnemyOnNextDriverSelection = false; val7.selectionRequiresAimTarget = false; val7.selectionRequiresOnGround = false; val7.selectionRequiresTargetLoS = true; val7.shouldFireEquipment = false; val7.shouldSprint = false; val7.skillSlot = (SkillSlot)0; AISkillDriver val8 = AllyMasterObject.AddComponent<AISkillDriver>(); val8.customName = "Chase"; val8.activationRequiresAimConfirmation = false; val8.activationRequiresAimTargetLoS = false; val8.activationRequiresTargetLoS = false; val8.aimType = (AimType)1; val8.buttonPressType = (ButtonPressType)0; val8.driverUpdateTimerOverride = -1f; val8.ignoreNodeGraph = false; val8.maxDistance = float.PositiveInfinity; val8.minDistance = 0f; val8.maxTargetHealthFraction = float.PositiveInfinity; val8.maxUserHealthFraction = float.PositiveInfinity; val8.minTargetHealthFraction = float.NegativeInfinity; val8.minUserHealthFraction = float.NegativeInfinity; val8.moveInputScale = 1f; val8.movementType = (MovementType)1; val8.moveTargetType = (TargetType)0; val8.noRepeat = false; val8.requireEquipmentReady = false; val8.requireSkillReady = f