Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of SeekerEnemiesTweaks v1.0.1
SeekerEnemiesTweaks.dll
Decompiled 11 hours agousing System; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using EntityStates; using EntityStates.Scorchling; using HG.GeneralSerializer; using IL.RoR2; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On; using On.EntityStates.Scorchling; using On.RoR2; using R2API; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using RoR2BepInExPack.GameAssetPaths.Version_1_39_0; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; [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 = ".NET Standard 2.1")] [assembly: AssemblyCompany("SeekerEnemiesTweaks")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("SeekerEnemiesTweaks")] [assembly: AssemblyTitle("SeekerEnemiesTweaks")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SeekerEnemiesTweaks { internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [BepInPlugin("CrypticAuthor.SeekerEnemiesTweaks", "SeekerEnemiesTweaks", "1.0.1")] public class SeekerEnemiesTweaks : BaseUnityPlugin { public class LavaBombChange : BaseState { public float breachToSpitTime = 1f; public float spitToLaunchTime = 2f; public float spitToBurrowTime = 3.5f; public float burrowToEndOfTime = 2f; public float animDurationBreach; public float animDurationSpit = 1f; public float animDurationBurrow = 1f; public float animDurationPostSpit = 1f; public float percentageToFireProjectile = 0.33f; public float burrowRadius = 2f; public static int mortarCount; public static float mortarDamageCoefficient = 1f; public static float minimumDistance = 15f; public static float timeToTarget = 1.2f; public static float projectileVelocity = 45f; private bool spitStarted; private bool firedProjectile; private bool earlyExit; public string spitSoundString; public GameObject burrowEffectPrefab; private ScorchlingController sController; private CharacterBody target; public override void OnEnter() { ((BaseState)this).OnEnter(); sController = ((Component)((EntityState)this).characterBody).GetComponent<ScorchlingController>(); animDurationBreach = (sController.isBurrowed ? animDurationBreach : 0f); spitToBurrowTime += animDurationBreach + animDurationSpit; burrowToEndOfTime += spitToBurrowTime; Target currentEnemy = ((Component)((EntityState)this).characterBody.master).GetComponent<BaseAI>().currentEnemy; target = ((currentEnemy != null) ? currentEnemy.characterBody : null); if (sController.isBurrowed) { earlyExit = true; } else { ((EntityState)this).characterBody.SetAimTimer(burrowToEndOfTime); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (earlyExit) { return; } if (!spitStarted && ((EntityState)this).fixedAge > animDurationBreach) { spitStarted = true; ((EntityState)this).PlayAnimation("FullBody, Override", "Spit", "Spit.playbackRate", animDurationSpit, 0f); } if (spitStarted && !firedProjectile && ((EntityState)this).fixedAge > animDurationSpit * percentageToFireProjectile + animDurationBreach) { firedProjectile = true; Util.PlaySound(spitSoundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(ScorchlingLavaBomb.mortarMuzzleflashEffect, ((EntityState)this).gameObject, "MuzzleFire", false); if (((EntityState)this).isAuthority) { Spit(); } } if (firedProjectile && !(((EntityState)this).fixedAge <= animDurationBreach + animDurationSpit + animDurationPostSpit)) { ((EntityState)this).outer.SetNextStateToMain(); } } public void Spit() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) LayerIndex val = LayerIndex.world; int num = LayerMask.op_Implicit(((LayerIndex)(ref val)).mask); val = LayerIndex.entityPrecise; int num2 = num | LayerMask.op_Implicit(((LayerIndex)(ref val)).mask); Transform val2 = ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent<ChildLocator>().FindChild("MuzzleFire"); Ray val3 = default(Ray); ((Ray)(ref val3))..ctor(val2.position, val2.forward); Ray val4 = default(Ray); ((Ray)(ref val4))..ctor(((Ray)(ref val3)).origin, Vector3.up); bool flag = false; Vector3 val5 = Vector3.zero; Ray val7; if (Object.op_Implicit((Object)target)) { val5 = target.transform.position; flag = true; } else { BullseyeSearch val6 = new BullseyeSearch(); val7 = val3; val6.searchOrigin = ((Ray)(ref val7)).origin; val7 = val3; val6.searchDirection = ((Ray)(ref val7)).direction; val6.filterByLoS = false; val6.sortMode = (SortMode)2; val6.RefreshCandidates(); HurtBox val8 = val6.GetResults().FirstOrDefault(); RaycastHit val9 = default(RaycastHit); RaycastHit val10 = default(RaycastHit); if (Object.op_Implicit((Object)val8)) { val5 = ((Component)val8).transform.position; flag = true; } else if (Physics.Raycast(val3, ref val10, 1000f, num2, (QueryTriggerInteraction)1)) { RaycastHit val11 = val9; val5 = ((RaycastHit)(ref val11)).point; flag = true; } } float magnitude = projectileVelocity; if (flag) { Vector3 val12 = val5; val7 = val4; Vector3 val13 = val12 - ((Ray)(ref val7)).origin; Vector2 val14 = default(Vector2); ((Vector2)(ref val14))..ctor(val13.x, val13.z); Vector2 val15 = val14; float magnitude2 = ((Vector2)(ref val15)).magnitude; Vector2 val16 = val14 / magnitude2; if ((double)magnitude2 < (double)minimumDistance) { magnitude2 = minimumDistance; } float num3 = Trajectory.CalculateInitialYSpeed(timeToTarget, val13.y); float num4 = magnitude2 / timeToTarget; Vector3 val17 = default(Vector3); ((Vector3)(ref val17))..ctor(val16.x * num4, num3, val16.y * num4); Vector3 val18 = val17; magnitude = ((Vector3)(ref val18)).magnitude; ((Ray)(ref val4)).direction = val17; } val7 = val4; Quaternion val19 = Util.QuaternionSafeLookRotation(((Ray)(ref val7)).direction); ProjectileManager.instance.FireProjectileWithoutDamageType(ScorchlingLavaBomb.mortarProjectilePrefab, ((Ray)(ref val4)).origin, val19, ((EntityState)this).gameObject, base.damageStat * mortarDamageCoefficient, 0f, Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, magnitude); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class TimedBurrow : BaseState { public string burrowSoundString = "Play_scorchling_burrow"; public string burrowLoopSoundString = "Play_scorchling_burrow_loop"; public string burrowStopLoopSoundString = "Stop_scorchling_burrow_loop"; private bool waitingForBurrow; public float burrowRadius = 1f; public float animDurationBurrow = 1f; public float burrowAnimationDuration = 1f; public float teleportDelay = 2f; public float burrowDuration = 4f; public float timer = 0f; public GameObject burrowEffectPrefab; private ScorchlingController sController; public override void OnEnter() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); sController = ((Component)((EntityState)this).characterBody).GetComponent<ScorchlingController>(); if (!sController.isBurrowed) { Util.PlaySound(burrowSoundString, ((EntityState)this).gameObject); Util.PlaySound(burrowLoopSoundString, ((EntityState)this).gameObject); EffectManager.SpawnEffect(burrowEffectPrefab, new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = burrowRadius }, true); ((EntityState)this).PlayAnimation("FullBody, Override", "Burrow", "Burrow.playbackRate", animDurationBurrow, 0f); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.walkSpeedPenaltyCoefficient = 0f; } if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { ((EntityState)this).rigidbodyMotor.moveVector = Vector3.zero; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.isSprinting = false; } waitingForBurrow = true; } } public override void FixedUpdate() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown ((EntityState)this).FixedUpdate(); HandleWaitForBurrow(); if (((EntityState)this).fixedAge > burrowDuration) { ((EntityState)this).outer.SetState((EntityState)new ScorchlingBreach()); } } public override void OnExit() { ((EntityState)this).OnExit(); HandleWaitForBurrow(); } private void HandleWaitForBurrow() { if (waitingForBurrow && !((double)((EntityState)this).fixedAge <= (double)burrowAnimationDuration)) { sController.Burrow(); waitingForBurrow = false; } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (waitingForBurrow) { return (InterruptPriority)7; } return (InterruptPriority)3; } } [CompilerGenerated] private static class <>O { public static hook_RegisterTeleport <0>__DisableInvincibility; public static hook_Burrow <1>__Burrow; public static hook_OnEnter <2>__OnEnter; } public const string PluginGUID = "CrypticAuthor.SeekerEnemiesTweaks"; public const string PluginAuthor = "CrypticAuthor"; public const string PluginName = "SeekerEnemiesTweaks"; public const string PluginVersion = "1.0.1"; public GameObject scorchlingBody = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_Scorchling.ScorchlingBody_prefab).WaitForCompletion(); public GameObject childBody = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_Child.ChildBody_prefab).WaitForCompletion(); public GameObject halcyoniteBody = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_Halcyonite.HalcyoniteBody_prefab).WaitForCompletion(); private SpawnCard childCredit = Addressables.LoadAssetAsync<SpawnCard>((object)RoR2_DLC2_Child.cscChild_asset).WaitForCompletion(); public static bool TryModifyFieldValue<T>(EntityStateConfiguration entityStateConfiguration, string fieldName, T value) { ref SerializedField orCreateField = ref ((SerializedFieldCollection)(ref entityStateConfiguration.serializedFieldsCollection)).GetOrCreateField(fieldName); Type typeFromHandle = typeof(T); if (Object.op_Implicit(orCreateField.fieldValue.objectValue) && ((object)orCreateField.fieldValue.objectValue).GetType().IsAssignableFrom(typeFromHandle)) { ref Object objectValue = ref orCreateField.fieldValue.objectValue; object obj = value; objectValue = (Object)((obj is Object) ? obj : null); return true; } if (orCreateField.fieldValue.stringValue != null && StringSerializer.CanSerializeType(typeFromHandle)) { orCreateField.fieldValue.stringValue = StringSerializer.Serialize(typeFromHandle, (object)value); return true; } return false; } public void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) Log.Init(((BaseUnityPlugin)this).Logger); bool flag = false; ContentAddition.AddEntityState<TimedBurrow>(ref flag); ContentAddition.AddEntityState<LavaBombChange>(ref flag); LavaBombGhost(); LavaBombProj(); LavaBombSkill(); FrolicSkill(); SparkSkill(); BurrowSkill(); HalcyoniteAttacks(); ScorchlingMaster(); HalcyoniteMaster(); object obj = <>O.<0>__DisableInvincibility; if (obj == null) { hook_RegisterTeleport val = DisableInvincibility; <>O.<0>__DisableInvincibility = val; obj = (object)val; } ChildMonsterController.RegisterTeleport += (hook_RegisterTeleport)obj; object obj2 = <>O.<1>__Burrow; if (obj2 == null) { hook_Burrow val2 = Burrow; <>O.<1>__Burrow = val2; obj2 = (object)val2; } ScorchlingController.Burrow += (hook_Burrow)obj2; object obj3 = <>O.<2>__OnEnter; if (obj3 == null) { hook_OnEnter val3 = OnEnter; <>O.<2>__OnEnter = val3; obj3 = (object)val3; } ScorchlingBreach.OnEnter += (hook_OnEnter)obj3; HalcyoniteShrineInteractable.DrainConditionMet += new Manipulator(HalcyoniteShrineInteractable_DrainConditionMet); CharacterBody val4 = default(CharacterBody); if (Object.op_Implicit((Object)(object)scorchlingBody) && scorchlingBody.TryGetComponent<CharacterBody>(ref val4)) { val4.baseMoveSpeed = 35f; val4.baseMaxHealth = 400f; val4.levelMaxHealth = 100f; val4.levelDamage = 3f; val4.baseAcceleration = 180f; } EntityStateConfiguration entityStateConfiguration = Addressables.LoadAssetAsync<EntityStateConfiguration>((object)RoR2_DLC2_Scorchling.EntityStates_Scorchling_Breach_asset).WaitForCompletion(); EntityStateConfiguration entityStateConfiguration2 = Addressables.LoadAssetAsync<EntityStateConfiguration>((object)RoR2_DLC2_Scorchling.EntityStates_Scorchling_LavaBomb_asset).WaitForCompletion(); TryModifyFieldValue(entityStateConfiguration2, "mortarDamageCoefficient", 1.2f); TryModifyFieldValue(entityStateConfiguration, "blastDamageCoefficient", 2); TryModifyFieldValue(entityStateConfiguration, "blastRadius", 8f); TryModifyFieldValue(entityStateConfiguration, "blastForce", 50f); childCredit.directorCreditCost = 40; CharacterBody val5 = default(CharacterBody); if (Object.op_Implicit((Object)(object)childBody) && childBody.TryGetComponent<CharacterBody>(ref val5)) { val5.baseMoveSpeed = 13f; val5.baseAttackSpeed = 0.6f; } EntityStateConfiguration entityStateConfiguration3 = Addressables.LoadAssetAsync<EntityStateConfiguration>((object)RoR2_DLC2_Child.EntityStates_ChildMonster_FireTrackingSparkBall_asset).WaitForCompletion(); TryModifyFieldValue(entityStateConfiguration3, "bombDamageCoefficient", 4); CharacterBody val6 = default(CharacterBody); if (Object.op_Implicit((Object)(object)halcyoniteBody) && halcyoniteBody.TryGetComponent<CharacterBody>(ref val6)) { val6.attackSpeed = 0.85f; val6.acceleration = 22f; } EntityStateConfiguration entityStateConfiguration4 = Addressables.LoadAssetAsync<EntityStateConfiguration>((object)RoR2_DLC2_Halcyonite.EntityStates_HalcyoniteMonster_TriLaser_asset).WaitForCompletion(); EntityStateConfiguration entityStateConfiguration5 = Addressables.LoadAssetAsync<EntityStateConfiguration>((object)RoR2_DLC2_Halcyonite.EntityStates_HalcyoniteMonster_WhirlwindPersuitCycle_asset).WaitForCompletion(); EntityStateConfiguration entityStateConfiguration6 = Addressables.LoadAssetAsync<EntityStateConfiguration>((object)RoR2_DLC2_Halcyonite.EntityStates_HalcyoniteMonster_GoldenSwipe_asset).WaitForCompletion(); EntityStateConfiguration entityStateConfiguration7 = Addressables.LoadAssetAsync<EntityStateConfiguration>((object)RoR2_DLC2_Halcyonite.EntityStates_HalcyoniteMonster_GoldenSlash_asset).WaitForCompletion(); TryModifyFieldValue(entityStateConfiguration4, "blastRadius", 1.8f); TryModifyFieldValue(entityStateConfiguration5, "dashSpeedCoefficient", 33f); TryModifyFieldValue(entityStateConfiguration5, "attackRadius", 9.4f); TryModifyFieldValue(entityStateConfiguration6, "baseDuration", 1.4f); TryModifyFieldValue(entityStateConfiguration7, "baseDuration", 1.3f); AsyncOperationHandle<GameObject> val7 = AssetAsyncReferenceManager<GameObject>.LoadAsset(new AssetReferenceT<GameObject>(RoR2_DLC2_Halcyonite.HalcyoniteBody_prefab), (AsyncReferenceHandleUnloadType)2); val7.Completed += delegate(AsyncOperationHandle<GameObject> x) { //IL_0052: 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) ModelLocator val8 = default(ModelLocator); if (x.Result.TryGetComponent<ModelLocator>(ref val8) && Object.op_Implicit((Object)(object)val8.modelTransform)) { Transform val9 = val8.modelTransform.Find("HitboxGoldenSlash"); if (Object.op_Implicit((Object)(object)val9)) { val9.localScale = new Vector3(15f, 0.5f, 10f); } Transform val10 = val8.modelTransform.Find("HitboxGoldenSwipe"); if (Object.op_Implicit((Object)(object)val10)) { val10.localScale = new Vector3(2f, 6f, 12f); } } }; } private void HalcyoniteShrineInteractable_DrainConditionMet(ILContext iL) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(iL); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 100f) })) { val.Prev.Operand = 220f; } } private static void DisableInvincibility(orig_RegisterTeleport orig, ChildMonsterController self, bool addInvincibility) { orig.Invoke(self, false); } public static void Burrow(orig_Burrow orig, ScorchlingController self) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) self.isRecentlyBurrowed = true; self.isBurrowed = true; self.SetTeleportPermission(true); if (NetworkServer.active) { self.breachSkill.stock = 1; self.lavaBombSkill.stock = 0; self.ensureBurrowSkill.stock = 5; self.characterMotor.walkSpeedPenaltyCoefficient = 1f; } self.originalLayer = ((Component)self).gameObject.layer; ((Component)self).gameObject.layer = LayerIndex.GetAppropriateFakeLayerForTeam(self.characterBody.teamComponent.teamIndex).intVal; ((BaseCharacterController)self.characterMotor).Motor.RebuildCollidableLayers(); if (Object.op_Implicit((Object)(object)self.baseDirt) && Object.op_Implicit((Object)(object)self.dustTrail)) { self.baseDirt.SetActive(false); self.dustTrail.SetActive(true); self.dustTrailActive = true; self.armatureObject.SetActive(false); self.meshObject.SetActive(false); } self.enemyDetection.Enable(); } public static void OnEnter(orig_OnEnter orig, ScorchlingBreach self) { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown self.amServer = NetworkServer.active; self.scorchlingController = ((Component)((EntityState)self).characterBody).GetComponent<ScorchlingController>(); Util.PlaySound(self.preBreachSoundString, ((EntityState)self).gameObject); if (self.amServer) { Target currentEnemy = ((Component)((EntityState)self).characterBody.master).GetComponent<BaseAI>().currentEnemy; self.enemyCBody = ((currentEnemy != null) ? currentEnemy.characterBody : null); if (self.proceedImmediatelyToLavaBomb) { self.breachToBurrow = 1f; } self.breachToBurrow += self.crackToBreachTime; self.burrowToEndOfTime += self.breachToBurrow; self.breachPosition = ((EntityState)self).characterBody.footPosition; if (!self.proceedImmediatelyToLavaBomb && Object.op_Implicit((Object)(object)self.enemyCBody)) { self.breachPosition = self.enemyCBody.footPosition; } if (Object.op_Implicit((Object)(object)((EntityState)self).characterMotor)) { ((EntityState)self).characterMotor.walkSpeedPenaltyCoefficient = 0f; } ((EntityState)self).characterBody.SetAimTimer(self.breachToBurrow); self.breachPosition = ((EntityState)self).characterBody.footPosition; TeleportHelper.TeleportBody(((EntityState)self).characterBody, self.breachPosition, false); EffectManager.SpawnEffect(self.crackEffectPrefab, new EffectData { origin = self.breachPosition, scale = self.crackRadius }, true); self.scorchlingController.SetTeleportPermission(false); } } private void LavaBombGhost() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<GameObject> val = AssetAsyncReferenceManager<GameObject>.LoadAsset(new AssetReferenceT<GameObject>(RoR2_DLC2_Scorchling.LavaBombHeatOrbGhost_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<GameObject> x) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) GameObject result = x.Result; AnimationCurve val2 = new AnimationCurve(); val2.AddKey(0f, 0f); val2.AddKey(0.5f, 0.5f); val2.AddKey(1f, 1f); ObjectScaleCurve val3 = ((Component)result.transform.GetChild(0)).gameObject.AddComponent<ObjectScaleCurve>(); val3.overallCurve = val2; val3.useOverallCurveOnly = true; val3.timeMax = 0.6f; ((Component)val3).transform.localScale = new Vector3(13f, 13f, 13f); }; } private void LavaBombProj() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<GameObject> val = AssetAsyncReferenceManager<GameObject>.LoadAsset(new AssetReferenceT<GameObject>(RoR2_DLC2_Scorchling.LavaBombHeatOrbProjectile_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<GameObject> x) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) GameObject result = x.Result; result.transform.localScale = new Vector3(1.35f, 1.35f, 1.35f); }; } private void LavaBombSkill() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<SkillDef> val = AssetAsyncReferenceManager<SkillDef>.LoadAsset(new AssetReferenceT<SkillDef>(RoR2_DLC2_Scorchling.ScorchlingLavaBomb_asset), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<SkillDef> x) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) SkillDef result = x.Result; result.activationState = new SerializableEntityStateType(typeof(LavaBombChange)); result.baseRechargeInterval = 5f; }; } private void BurrowSkill() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<SkillDef> val = AssetAsyncReferenceManager<SkillDef>.LoadAsset(new AssetReferenceT<SkillDef>(RoR2_DLC2_Scorchling.ScorchlingEnsureBurrow_asset), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<SkillDef> x) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) SkillDef result = x.Result; result.activationState = new SerializableEntityStateType(typeof(TimedBurrow)); }; } private void FrolicSkill() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<SkillDef> val = AssetAsyncReferenceManager<SkillDef>.LoadAsset(new AssetReferenceT<SkillDef>(RoR2_DLC2_Child.ChildBodyFrolic_asset), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<SkillDef> x) { SkillDef result = x.Result; result.baseRechargeInterval = 12f; }; } private void SparkSkill() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<SkillDef> val = AssetAsyncReferenceManager<SkillDef>.LoadAsset(new AssetReferenceT<SkillDef>(RoR2_DLC2_Child.ChildBodySparkBall_asset), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<SkillDef> x) { SkillDef result = x.Result; result.beginSkillCooldownOnSkillEnd = true; result.baseRechargeInterval = 3f; }; } private void HalcyoniteAttacks() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<SkillDef> val = AssetAsyncReferenceManager<SkillDef>.LoadAsset(new AssetReferenceT<SkillDef>(RoR2_DLC2_Halcyonite.HalcyoniteMonsterGoldenSlash_asset), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<SkillDef> x) { SkillDef result = x.Result; result.baseRechargeInterval = 2f; }; AsyncOperationHandle<SkillDef> val2 = AssetAsyncReferenceManager<SkillDef>.LoadAsset(new AssetReferenceT<SkillDef>(RoR2_DLC2_Halcyonite.HalcyoniteMonsterGoldenSwipe_asset), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<SkillDef> x) { SkillDef result = x.Result; result.baseRechargeInterval = 4f; }; } private void ScorchlingMaster() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<GameObject> val = AssetAsyncReferenceManager<GameObject>.LoadAsset(new AssetReferenceT<GameObject>(RoR2_DLC2_Scorchling.ScorchlingMaster_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<GameObject> x) { AISkillDriver[] components = x.Result.GetComponents<AISkillDriver>(); AISkillDriver[] array = components; foreach (AISkillDriver val2 in array) { if (val2.customName == "LavaBomb") { val2.maxDistance = 70f; val2.minDistance = 10f; val2.noRepeat = false; val2.activationRequiresTargetLoS = true; val2.selectionRequiresTargetLoS = true; } if (val2.customName == "Breach") { val2.selectionRequiresOnGround = false; val2.activationRequiresAimConfirmation = false; val2.selectionRequiresOnGround = false; } } }; } private void HalcyoniteMaster() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<GameObject> val = AssetAsyncReferenceManager<GameObject>.LoadAsset(new AssetReferenceT<GameObject>(RoR2_DLC2_Halcyonite.HalcyoniteMaster_prefab), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<GameObject> x) { AISkillDriver[] components = x.Result.GetComponents<AISkillDriver>(); AISkillDriver[] array = components; foreach (AISkillDriver val2 in array) { if (val2.customName == "Golden Swipe") { val2.aimVectorMaxSpeedOverride = 0f; } if (val2.customName == "WhirlwindRush") { val2.minDistance = 25f; } } }; } } }