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 Ancient Wisp v1.6.12
plugins/Moffein-AncientWisp/AncientWisp.dll
Decompiled 6 months 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.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AccurateEnemies; using AncientWisp; using AncientWisp.Helpers; using ArchaicWisp; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.AncientWispMonster; using EntityStates.MoffeinAncientWispSkills; using EntityStates.VagrantMonster; using On.RoR2; using R2API; using R2API.Utils; using Risky_Artifacts.Artifacts; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using Zio.FileSystems; [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("AncientWisp")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+072d81b5d2b7709a9c0ffc21dacc1e27a1919461")] [assembly: AssemblyProduct("AncientWisp")] [assembly: AssemblyTitle("AncientWisp")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace EntityStates.MoffeinAncientWispSkills { public class ChannelRain : BaseState { private float lastUpdateTime; private float castTimer; public static float baseDuration = 7f; public static float explosionDelay = 1.3f; public static int explosionCount = 45; public static int maxExplosions = 120; public static float damageCoefficient = 2.1f; public static float randomRadius = 16f; public static float radius = 6f; public static GameObject projectilePrefab; private float duration; private float durationBetweenCast; private float totalExplosions; public override void OnEnter() { ((BaseState)this).OnEnter(); lastUpdateTime = Time.time; duration = baseDuration; durationBetweenCast = baseDuration / Mathf.Min((float)explosionCount * base.attackSpeedStat, (float)maxExplosions); ((EntityState)this).PlayCrossfade("Body", "ChannelRain", 0.3f); Util.PlaySound("Play_titanboss_shift_charge", ((EntityState)this).gameObject); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.Slow50); } } private void PlaceRain() { //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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Invalid comparison between Unknown and I4 //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_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_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).isAuthority) { return; } Vector3 val = Vector3.zero; Ray aimRay = ((BaseState)this).GetAimRay(); ((Ray)(ref aimRay)).origin = ((Ray)(ref aimRay)).origin + Random.insideUnitSphere * randomRadius; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(aimRay, ref val2, (float)LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { val = ((RaycastHit)(ref val2)).point; } if (val != Vector3.zero) { TeamIndex teamIndex = ((Component)((EntityState)this).characterBody).GetComponent<TeamComponent>().teamIndex; TeamIndex enemyTeam = (((int)teamIndex == 1) ? ((TeamIndex)2) : (((int)teamIndex != 2) ? ((TeamIndex)0) : ((TeamIndex)1))); Transform val3 = FindTargetClosest(val, enemyTeam); Vector3 val4 = val; if (Object.op_Implicit((Object)(object)val3)) { val4 = ((Component)val3).transform.position; } val4 += Random.insideUnitSphere * randomRadius; Ray val5 = default(Ray); ((Ray)(ref val5)).origin = val4 + Vector3.up * randomRadius; ((Ray)(ref val5)).direction = Vector3.down; if (Physics.Raycast(val5, ref val2, 500f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { Vector3 point = ((RaycastHit)(ref val2)).point; Vector3 val6 = default(Vector3); ((Vector3)(ref val6))..ctor(90f, 0f, 0f); Quaternion rotation = Quaternion.Euler(val6); FireProjectileInfo val7 = default(FireProjectileInfo); val7.projectilePrefab = projectilePrefab; val7.position = point; val7.rotation = rotation; val7.owner = ((EntityState)this).gameObject; val7.damage = base.damageStat * damageCoefficient; val7.force = 2000f; val7.crit = ((EntityState)this).characterBody.RollCrit(); ProjectileManager.instance.FireProjectile(val7); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); castTimer += Time.time - lastUpdateTime; lastUpdateTime = Time.time; if (castTimer >= durationBetweenCast) { PlaceRain(); castTimer -= durationBetweenCast; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new EndRain()); } } private Transform FindTargetClosest(Vector3 point, TeamIndex enemyTeam) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers(enemyTeam); float num = 99999f; Transform result = null; for (int i = 0; i < teamMembers.Count; i++) { float num2 = Vector3.SqrMagnitude(((Component)teamMembers[i]).transform.position - point); if (num2 < num) { num = num2; result = ((Component)teamMembers[i]).transform; } } return result; } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)7; } public override void OnExit() { if (NetworkServer.active && ((EntityState)this).characterBody.HasBuff(Buffs.Slow50)) { ((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50); } ((EntityState)this).OnExit(); } } public class ChargeBarrage : BaseState { public static float baseDuration = 2.5f; public static GameObject effectPrefab = ChargeRHCannon.effectPrefab; private float duration; private GameObject chargeEffectLeft; private GameObject chargeEffectRight; private Animator modelAnimator; private bool playedSwing2 = false; public override void OnEnter() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; Transform modelTransform = ((EntityState)this).GetModelTransform(); modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { int layerIndex = modelAnimator.GetLayerIndex("Gesture"); AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Throw1")) { ((EntityState)this).PlayCrossfade("Gesture", "Throw2", "Throw.playbackRate", duration / 0.3f, 0.2f); } else { ((EntityState)this).PlayCrossfade("Gesture", "Throw1", "Throw.playbackRate", duration / 0.3f, 0.2f); } } if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)effectPrefab)) { Transform val = component.FindChild("MuzzleRight"); if (Object.op_Implicit((Object)(object)val)) { chargeEffectRight = Object.Instantiate<GameObject>(effectPrefab, val.position, val.rotation); chargeEffectRight.transform.parent = val; } } } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(duration); } Util.PlayAttackSpeedSound("Play_greater_wisp_attack", ((EntityState)this).gameObject, base.attackSpeedStat * (2f / baseDuration)); } public override void OnExit() { ((EntityState)this).OnExit(); EntityState.Destroy((Object)(object)chargeEffectLeft); EntityState.Destroy((Object)(object)chargeEffectRight); } public override void Update() { ((EntityState)this).Update(); } public override void FixedUpdate() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!playedSwing2 && duration - ((EntityState)this).fixedAge < 0.6f && Object.op_Implicit((Object)(object)modelAnimator)) { playedSwing2 = true; int layerIndex = modelAnimator.GetLayerIndex("Gesture"); AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex); if (((AnimatorStateInfo)(ref currentAnimatorStateInfo)).IsName("Throw1")) { ((EntityState)this).PlayCrossfade("Gesture", "Throw2", "Throw.playbackRate", FireBarrage.baseDuration * 6f, 0.1f); } else { ((EntityState)this).PlayCrossfade("Gesture", "Throw1", "Throw.playbackRate", FireBarrage.baseDuration * 6f, 0.1f); } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { FireBarrage nextState = new FireBarrage(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class ChargeRain : BaseState { public static float baseDuration = 2f; public static GameObject effectPrefab = ChargeRain.effectPrefab; public static GameObject delayPrefab = ChargeRain.delayPrefab; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation("Body", "ChargeRain", "ChargeRain.playbackRate", duration, 0f); Util.PlayAttackSpeedSound("Play_greater_wisp_attack", ((EntityState)this).gameObject, base.attackSpeedStat * (2f / baseDuration)); Util.PlaySound("Play_MoffeinAW_spawn", ((EntityState)this).gameObject); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.Slow50); } } public override void OnExit() { if (NetworkServer.active && ((EntityState)this).characterBody.HasBuff(Buffs.Slow50)) { ((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new ChannelRain()); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)7; } } public class EndRain : BaseState { public static float baseDuration = 3f; public static GameObject effectPrefab = EndRain.effectPrefab; public static GameObject delayPrefab = EndRain.delayPrefab; private float duration; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation("Body", "EndRain", "EndRain.playbackRate", duration, 0f); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void Update() { ((EntityState)this).Update(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class Enrage : BaseState { public static float baseDuration = 2.5f; public static GameObject enragePrefab = Enrage.enragePrefab; private Animator modelAnimator; private float duration; private bool hasCastBuff; private uint soundID; private bool stoppedSound = false; public static BuffIndex enrageBuff; public static CharacterSpawnCard minionCard = LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscGreaterWisp"); public static CharacterSpawnCard archWispCard = null; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration; modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { ((EntityState)this).PlayCrossfade("Gesture", "Enrage", "Enrage.playbackRate", duration, 0.2f); } soundID = Util.PlayAttackSpeedSound(ChargeMegaNova.chargingSoundString, ((EntityState)this).gameObject, base.attackSpeedStat); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.Slow50); } } public override void OnExit() { if (!stoppedSound) { AkSoundEngine.StopPlayingID(soundID); } if (NetworkServer.active && ((EntityState)this).characterBody.HasBuff(Buffs.Slow50)) { ((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)modelAnimator) && modelAnimator.GetFloat("Enrage.activate") > 0.5f && !hasCastBuff) { AkSoundEngine.StopPlayingID(soundID); hasCastBuff = true; stoppedSound = true; Util.PlaySound(FireMegaNova.novaSoundString, ((EntityState)this).gameObject); Util.PlaySound("Play_MoffeinAW_lightning", ((EntityState)this).gameObject); if (NetworkServer.active) { EffectData val = new EffectData(); val.origin = ((EntityState)this).transform.position; val.SetNetworkedObjectReference(((EntityState)this).gameObject); EffectManager.SpawnEffect(enragePrefab, val, true); for (int i = 0; i < 2; i++) { SummonEnemy(); } if (!((EntityState)this).characterBody.HasBuff(AncientWispPlugin.enrageBuff)) { ((EntityState)this).characterBody.AddBuff(AncientWispPlugin.enrageBuff); } } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority && hasCastBuff) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } private void SummonEnemy() { //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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown DirectorSpawnRequest val = new DirectorSpawnRequest((SpawnCard)(object)(((Object)(object)archWispCard != (Object)null) ? archWispCard : minionCard), new DirectorPlacementRule { placementMode = (PlacementMode)1, minDistance = 3f, maxDistance = 20f, spawnOnTarget = ((EntityState)this).transform }, RoR2Application.rng); val.summonerBodyObject = ((EntityState)this).gameObject; DirectorSpawnRequest val2 = val; val2.onSpawnedServer = (Action<SpawnResult>)Delegate.Combine(val2.onSpawnedServer, (Action<SpawnResult>)delegate(SpawnResult spawnResult) { //IL_0001: 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 (Object.op_Implicit((Object)(object)spawnResult.spawnedInstance)) { Inventory component = spawnResult.spawnedInstance.GetComponent<Inventory>(); if (Object.op_Implicit((Object)(object)component)) { component.CopyEquipmentFrom(((EntityState)this).characterBody.inventory); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) && ((EntityState)this).characterBody.inventory.GetItemCount(Items.Ghost) > 0) { component.GiveItem(Items.Ghost, ((EntityState)this).characterBody.inventory.GetItemCount(Items.Ghost)); component.GiveItem(Items.HealthDecay, ((EntityState)this).characterBody.inventory.GetItemCount(Items.HealthDecay)); component.GiveItem(Items.BoostDamage, ((EntityState)this).characterBody.inventory.GetItemCount(Items.BoostDamage)); } } } }); DirectorCore.instance.TrySpawnObject(val); } } public class FireBarrage : BaseState { public static GameObject projectilePrefab; public static GameObject effectPrefab = FireRHCannon.effectPrefab; public static float baseDuration = 2f; public static float baseDurationBetweenShots = 0.12f; public static float damageCoefficient = 2.1f; public static float force = 20f; public static int maxBullets = 16; public static int bulletCount = 6; private float duration; private float durationBetweenShots; public int bulletCountCurrent = 1; public int bulletsToFire = 0; public override void OnEnter() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0135: 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_0146: 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_0164: 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_0174: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Ray val = ((BaseState)this).GetAimRay(); if (AncientWispPlugin.AccurateEnemiesLoaded && AncientWispPlugin.AccurateEnemiesCompat) { val = AccurateEnemiesAimray(val); } string text = "MuzzleRight"; duration = baseDuration / base.attackSpeedStat; durationBetweenShots = baseDurationBetweenShots / base.attackSpeedStat; if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false); } if (!((EntityState)this).isAuthority || !Object.op_Implicit((Object)(object)((EntityState)this).modelLocator) || !Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform)) { return; } bulletsToFire = Math.Min(maxBullets, Mathf.CeilToInt((float)bulletCount * base.attackSpeedStat)); ChildLocator component = ((Component)((EntityState)this).modelLocator.modelTransform).GetComponent<ChildLocator>(); if (!Object.op_Implicit((Object)(object)component)) { return; } Transform val2 = component.FindChild(text); if (Object.op_Implicit((Object)(object)val2)) { Vector3 val3 = ((Ray)(ref val)).direction; RaycastHit val4 = default(RaycastHit); if (Physics.Raycast(val, ref val4, (float)LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { val3 = ((RaycastHit)(ref val4)).point - val2.position; } ProjectileManager.instance.FireProjectile(projectilePrefab, (bulletCountCurrent < bulletCount / 2) ? val2.position : ((Ray)(ref val)).origin, Util.QuaternionSafeLookRotation(val3), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, force, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { if (bulletCountCurrent >= bulletsToFire && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } else if (bulletCountCurrent < bulletsToFire && ((EntityState)this).fixedAge >= durationBetweenShots) { FireBarrage fireBarrage = new FireBarrage(); fireBarrage.bulletCountCurrent = bulletCountCurrent + 1; fireBarrage.bulletsToFire = bulletsToFire; ((EntityState)this).outer.SetNextState((EntityState)(object)fireBarrage); } } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private Ray AccurateEnemiesAimray(Ray aimRay) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && !((EntityState)this).characterBody.isPlayerControlled && (AccurateEnemiesPlugin.alwaysAllowBosses || !AccurateEnemiesPlugin.eliteOnly || ((EntityState)this).characterBody.isElite)) { HurtBox masterAITargetHurtbox = Util.GetMasterAITargetHurtbox(((EntityState)this).characterBody.master); return Util.PredictAimrayPS(aimRay, ((BaseState)this).GetTeam(), AccurateEnemiesPlugin.basePredictionAngle, projectilePrefab, masterAITargetHurtbox); } return aimRay; } } public class SpawnState : BaseState { public static float baseDuration = 3f; public static GameObject enragePrefab = Enrage.enragePrefab; private Animator modelAnimator; private float duration; private bool hasCastBuff; public override void OnEnter() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration; modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { ((EntityState)this).PlayCrossfade("Gesture", "Enrage", "Enrage.playbackRate", duration, 0.2f); } if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { ((EntityState)this).rigidbodyMotor.moveVector = Vector3.zero; } hasCastBuff = false; Util.PlaySound("Play_MoffeinAW_lightning", ((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).rigidbodyMotor)) { ((EntityState)this).rigidbodyMotor.moveVector = Vector3.zero; } if (Object.op_Implicit((Object)(object)modelAnimator) && modelAnimator.GetFloat("Enrage.activate") > 0.5f && !hasCastBuff) { EffectData val = new EffectData { origin = ((EntityState)this).transform.position }; val.SetNetworkedObjectReference(((EntityState)this).gameObject); EffectManager.SpawnEffect(enragePrefab, val, false); hasCastBuff = true; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } 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; } } } namespace AncientWisp { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Moffein.AncientWisp", "AncientWisp", "1.6.12")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class AncientWispPlugin : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<char, bool> <>9__11_0; public static hook_OnDeathStart <>9__11_1; public static StatHookEventHandler <>9__11_2; internal bool <Awake>b__11_0(char c) { return !char.IsWhiteSpace(c); } internal void <Awake>b__11_1(orig_OnDeathStart orig, CharacterBody self) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (self.bodyIndex == bodyIndex) { ((Component)self).gameObject.AddComponent<DeathExplosions>(); } } internal void <Awake>b__11_2(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(enrageBuff)) { args.attackSpeedMultAdd += 0.5f; args.moveSpeedMultAdd += 0.3f; } } } public static List<StageSpawnInfo> StageList = new List<StageSpawnInfo>(); public static bool allowOrigin = true; public static bool archWispCompat = true; public static bool AccurateEnemiesLoaded = false; public static bool AccurateEnemiesCompat = true; public static PluginInfo pluginInfo; public static BuffDef enrageBuff; public static BodyIndex bodyIndex; public static GameObject AncientWispObject; public void LateSetup() { new ItemDisplays(); } private static Type GetTypeFromName(string name) { Type[] stateIndexToType = EntityStateCatalog.stateIndexToType; return Type.GetType(name); } public void Awake() { //IL_003d: 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_005c: Expected O, but got Unknown //IL_005c: Expected O, but got Unknown //IL_0076: 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_0091: Expected O, but got Unknown //IL_0091: Expected O, but got Unknown //IL_00ab: 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_00c6: Expected O, but got Unknown //IL_00c6: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown //IL_00ff: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_0130: Expected O, but got Unknown //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_046a: Expected O, but got Unknown //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Expected O, but got Unknown //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Expected O, but got Unknown //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Expected O, but got Unknown pluginInfo = ((BaseUnityPlugin)this).Info; new LanguageTokens(); AccurateEnemiesLoaded = Chainloader.PluginInfos.ContainsKey("com.Moffein.AccurateEnemies"); float flareSize = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("General", "Eye Flare Size"), 0.5f, new ConfigDescription("How big the flare effect on the eye should be. 0 disables.", (AcceptableValueBase)null, Array.Empty<object>())).Value; allowOrigin = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("General", "RiskyArtifacts - Add to Artifact of Origination Spawnpool"), true, new ConfigDescription("If RiskyArtifacts is installed, adds this boss to the Origination spawnpool.", (AcceptableValueBase)null, Array.Empty<object>())).Value; archWispCompat = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("General", "Archaic Wisps Compatibility"), true, new ConfigDescription("Enrage spawns Archaic Wisps instead of Greater Wisps if the Archaic Wisps plugin is installed.", (AcceptableValueBase)null, Array.Empty<object>())).Value; string value = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Spawns", "Stage List"), "dampcavesimple, rootjungle, skymeadow, sulfurpools - loop, itdampcave, itskymeadow, goldshores, artifactworld, helminthroost, lemuriantemple", new ConfigDescription("What stages the boss will show up on. Add a '- loop' after the stagename to make it only spawn after looping. List of stage names can be found at https://github.com/risk-of-thunder/R2Wiki/wiki/List-of-scene-names", (AcceptableValueBase)null, Array.Empty<object>())).Value; AccurateEnemiesCompat = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("General", "AccurateEnemies Compatibility"), true, new ConfigDescription("If AccurateEnemies is installed, adds projectile aim prediction to the Ancient Wisp fireball barrage.", (AcceptableValueBase)null, Array.Empty<object>())).Value; value = new string((from c in value.ToCharArray() where !char.IsWhiteSpace(c) select c).ToArray()); string[] array = value.Split(','); string[] array2 = array; foreach (string text in array2) { string[] array3 = text.Split('-'); string stageName = array3[0]; int minStages = 0; if (array3.Length > 1) { minStages = 5; } StageList.Add(new StageSpawnInfo(stageName, minStages)); } using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AncientWisp.moffeinancientwisp")) { AWContent.assets = AssetBundle.LoadFromStream(stream); } using (Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("AncientWisp.AncientWispBank.bnk")) { byte[] array4 = new byte[stream2.Length]; stream2.Read(array4, 0, array4.Length); SoundBanks.Add(array4); } RepairEffects.Repair(); AncientWispObject = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/AncientWispBody"), "MoffeinAncientWispBody", true); GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/charactermasters/AncientWispMaster"), "MoffeinAncientWispMaster", true); CharacterBody component = AncientWispObject.GetComponent<CharacterBody>(); SkillLocator component2 = AncientWispObject.GetComponent<SkillLocator>(); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(LateSetup)); AncientWispObject.GetComponent<CameraTargetParams>().cameraParams = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ImpBossBody").GetComponent<CameraTargetParams>().cameraParams; val.GetComponent<CharacterMaster>().bodyPrefab = AncientWispObject; GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Gravekeeper/GravekeeperBody.prefab").WaitForCompletion(); DeathRewards component3 = AncientWispObject.GetComponent<DeathRewards>(); component3.bossDropTable = val2.GetComponent<DeathRewards>().bossDropTable; UnlockableDef val3 = ScriptableObject.CreateInstance<UnlockableDef>(); val3.nameToken = "UNLOCKABLE_LOG_MOFFEIN_ANCIENTWISP"; val3.cachedName = "MOFFEIN_ANCIENTWISP_BODY_NAME"; AWContent.unlockableDefs.Add(val3); component3.logUnlockableDef = val3; SfxLocator val4 = AncientWispObject.AddComponent<SfxLocator>(); val4.barkSound = "Play_magmaWorm_idle_VO"; val4.deathSound = "Play_MoffeinAW_death"; SetBodyStats(component); new Director(val); ModifyArchWispProjectile(); BuildLightningProjectile(); FixHitbox(AncientWispObject); new CreateSkills(component2); new CreateAI(val); AWContent.masterPrefabs.Add(val); AWContent.bodyPrefabs.Add(AncientWispObject); Interactor component4 = AncientWispObject.GetComponent<Interactor>(); component4.maxInteractionDistance = 6f; enrageBuff = LegacyResourcesAPI.Load<BuffDef>("BuffDefs/EnrageAncientWisp"); enrageBuff.iconSprite = LegacyResourcesAPI.Load<BuffDef>("BuffDefs/WarCryBuff").iconSprite; enrageBuff.buffColor = new Color(41f / 51f, 41f / 85f, 43f / 51f); object obj = <>c.<>9__11_1; if (obj == null) { hook_OnDeathStart val5 = delegate(orig_OnDeathStart orig, CharacterBody self) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (self.bodyIndex == bodyIndex) { ((Component)self).gameObject.AddComponent<DeathExplosions>(); } }; <>c.<>9__11_1 = val5; obj = (object)val5; } CharacterBody.OnDeathStart += (hook_OnDeathStart)obj; object obj2 = <>c.<>9__11_2; if (obj2 == null) { StatHookEventHandler val6 = delegate(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(enrageBuff)) { args.attackSpeedMultAdd += 0.5f; args.moveSpeedMultAdd += 0.3f; } }; <>c.<>9__11_2 = val6; obj2 = (object)val6; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj2; EyeFlare.OnEnable += (hook_OnEnable)delegate(orig_OnEnable orig, EyeFlare self) { if (Object.op_Implicit((Object)(object)self.directionSource) && Object.op_Implicit((Object)(object)self.directionSource.parent) && ((Object)self.directionSource.parent).name == "AncientWispArmature") { self.localScale = flareSize; } orig.Invoke(self); }; ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); if (archWispCompat && Chainloader.PluginInfos.ContainsKey("com.Moffein.ArchaicWisp")) { GrabArchWispCard(); } } private void OnLoad() { //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) bodyIndex = BodyCatalog.FindBodyIndex("MoffeinAncientWispBody"); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void GrabArchWispCard() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown Enrage.archWispCard = (CharacterSpawnCard)ArchaicWispContent.ArchaicWispCard.Card.spawnCard; } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)new AWContent()); } private void FixHitbox(GameObject go) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_00bd: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) Object.Destroy((Object)(object)go.GetComponent<HurtBox>()); Component[] componentsInChildren = (Component[])(object)go.GetComponentsInChildren<Transform>(); Component[] array = componentsInChildren; Transform val = null; Transform val2 = null; Component[] array2 = array; for (int i = 0; i < array2.Length; i++) { Transform val3 = (Transform)array2[i]; if (((Object)val3).name == "chest") { val = val3; } else if (((Object)val3).name == "Head") { val2 = val3; } } ModelLocator component = go.GetComponent<ModelLocator>(); ((Component)component.modelTransform).gameObject.layer = LayerIndex.entityPrecise.intVal; component.noCorpse = true; HurtBoxGroup component2 = ((Component)component.modelTransform).gameObject.GetComponent<HurtBoxGroup>(); Transform modelTransform = component.modelTransform; modelTransform.localScale *= 1.8f; ((Component)val).gameObject.layer = LayerIndex.entityPrecise.intVal; CapsuleCollider val4 = ((Component)val).gameObject.AddComponent<CapsuleCollider>(); HurtBox val5 = ((Component)val).gameObject.AddComponent<HurtBox>(); val5.isBullseye = true; val5.healthComponent = go.GetComponent<HealthComponent>(); val5.damageModifier = (DamageModifier)0; val5.hurtBoxGroup = component2; val5.indexInGroup = 0; ((Component)val2).gameObject.layer = LayerIndex.entityPrecise.intVal; BoxCollider val6 = ((Component)val2).gameObject.AddComponent<BoxCollider>(); val6.center += 0.3f * Vector3.up; HurtBox val7 = ((Component)val2).gameObject.AddComponent<HurtBox>(); val7.isBullseye = false; val7.healthComponent = go.GetComponent<HealthComponent>(); val7.damageModifier = (DamageModifier)0; val7.isSniperTarget = true; val7.hurtBoxGroup = component2; val7.indexInGroup = 1; HurtBox[] hurtBoxes = (HurtBox[])(object)new HurtBox[2] { val5, val7 }; component2.bullseyeCount = 1; component2.hurtBoxes = hurtBoxes; component2.mainHurtBox = val5; } private void SetBodyStats(CharacterBody ancientWispBody) { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) ancientWispBody.baseNameToken = "MOFFEIN_ANCIENTWISP_BODY_NAME"; ancientWispBody.subtitleNameToken = "MOFFEIN_ANCIENTWISP_BODY_SUBTITLE"; ancientWispBody.baseMaxHealth = 2800f; ancientWispBody.levelMaxHealth = 840f; ancientWispBody.baseArmor = 20f; ancientWispBody.levelArmor = 0f; ancientWispBody.baseDamage = 20f; ancientWispBody.levelDamage = 4f; ancientWispBody.baseRegen = 0f; ancientWispBody.levelRegen = 0f; ancientWispBody.portraitIcon = AWContent.assets.LoadAsset<Texture>("aw_noflames.png"); ancientWispBody._defaultCrosshairPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/crosshair/simpledotcrosshair"); ancientWispBody.hideCrosshair = false; ancientWispBody.bodyFlags = (BodyFlags)(ancientWispBody.bodyFlags | 0x80000); AWContent.entityStates.Add(typeof(SpawnState)); SerializableEntityStateType val = default(SerializableEntityStateType); ((SerializableEntityStateType)(ref val))..ctor(typeof(SpawnState)); ancientWispBody.preferredInitialStateType = val; EntityStateMachine component = ((Component)ancientWispBody).GetComponent<EntityStateMachine>(); component.initialStateType = val; } private static void BuildLightningProjectile() { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/projectiles/nullifierprebombprojectile"), "MoffeinAWLightning", true); GameObject val2 = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/projectileghosts/nullifierprebombghost"), "MoffeinAWLightningGhost", false); AWContent.projectilePrefabs.Add(val); val.AddComponent<LightningVerticalHit>(); Object.Destroy((Object)(object)val.GetComponent<TeamAreaIndicator>()); ProjectileImpactExplosion component = val.GetComponent<ProjectileImpactExplosion>(); component.lifetime = ChannelRain.explosionDelay; component.lifetimeExpiredSoundString = ""; component.lifetimeExpiredSound = null; component.impactEffect = null; ((ProjectileExplosion)component).childrenProjectilePrefab = null; ((ProjectileExplosion)component).blastRadius = ChannelRain.radius; ((ProjectileExplosion)component).falloffModel = (FalloffModel)0; ((ProjectileExplosion)component).bonusBlastForce = Vector3.up * 1000f; ((ProjectileExplosion)component).blastProcCoefficient = 1f; ((ProjectileExplosion)component).childrenCount = 0; ProjectileDamage component2 = val.GetComponent<ProjectileDamage>(); component2.damageType = DamageTypeCombo.op_Implicit((DamageType)0); component2.damageType.damageSource = (DamageSource)2; Object.Destroy((Object)(object)val.GetComponent<AkEvent>()); Object.Destroy((Object)(object)val.GetComponent<AkGameObj>()); ChannelRain.projectilePrefab = val; ProjectileController component3 = val.GetComponent<ProjectileController>(); component3.ghostPrefab = val2; val2.AddComponent<LightningVisual>(); val2.transform.localScale = Vector3.zero; val2.GetComponent<VFXAttributes>().DoNotPool = true; Object.Destroy((Object)(object)val2.GetComponent<AkEvent>()); Object.Destroy((Object)(object)val2.GetComponent<AkGameObj>()); } private void ModifyArchWispProjectile() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/projectiles/ArchWispCannon"), "MoffeinAncientWispCannon", true); ProjectileSimple component = val.GetComponent<ProjectileSimple>(); component.lifetime = 7f; ProjectileDamage component2 = val.GetComponent<ProjectileDamage>(); component2.damageType.damageSource = (DamageSource)1; ProjectileImpactExplosion component3 = val.GetComponent<ProjectileImpactExplosion>(); component3.lifetime = 7f; ((ProjectileExplosion)component3).falloffModel = (FalloffModel)2; val.GetComponent<Rigidbody>().useGravity = false; GameObject val2 = (((ProjectileExplosion)component3).childrenProjectilePrefab = PrefabAPI.InstantiateClone(((ProjectileExplosion)component3).childrenProjectilePrefab, "MoffeinAncientWispCannonGround", true)); ProjectileImpactExplosion component4 = val2.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component4).falloffModel = (FalloffModel)2; ProjectileDamageTrail component5 = val2.GetComponent<ProjectileDamageTrail>(); component5.damageToTrailDpsFactor = 0.4f; component5.trailLifetimeAfterExpiration = 6f; FireBarrage.projectilePrefab = val; AWContent.projectilePrefabs.Add(val); AWContent.projectilePrefabs.Add(val2); } } public class StageSpawnInfo { private string stageName; private int minStages; public StageSpawnInfo(string stageName, int minStages) { this.stageName = stageName; this.minStages = minStages; } public string GetStageName() { return stageName; } public int GetMinStages() { return minStages; } } public class AWContent : IContentPackProvider { [CompilerGenerated] private sealed class <FinalizeAsync>d__16 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FinalizeAsyncArgs args; public AWContent <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <FinalizeAsync>d__16(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <GenerateContentPackAsync>d__15 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GetContentPackAsyncArgs args; public AWContent <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GenerateContentPackAsync>d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; ContentPack.Copy(contentPack, args.output); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <LoadStaticContentAsync>d__14 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LoadStaticContentAsyncArgs args; public AWContent <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <LoadStaticContentAsync>d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; contentPack.bodyPrefabs.Add(bodyPrefabs.ToArray()); contentPack.effectDefs.Add(effectDefs.ToArray()); contentPack.entityStateTypes.Add(entityStates.ToArray()); contentPack.masterPrefabs.Add(masterPrefabs.ToArray()); contentPack.projectilePrefabs.Add(projectilePrefabs.ToArray()); contentPack.skillDefs.Add(skillDefs.ToArray()); contentPack.skillFamilies.Add(skillFamilies.ToArray()); contentPack.unlockableDefs.Add(unlockableDefs.ToArray()); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static AssetBundle assets; internal static ContentPack contentPack = new ContentPack(); public static List<GameObject> bodyPrefabs = new List<GameObject>(); public static List<GameObject> masterPrefabs = new List<GameObject>(); public static List<UnlockableDef> unlockableDefs = new List<UnlockableDef>(); public static List<EffectDef> effectDefs = new List<EffectDef>(); public static List<SkillDef> skillDefs = new List<SkillDef>(); public static List<SkillFamily> skillFamilies = new List<SkillFamily>(); public static List<Type> entityStates = new List<Type>(); public static List<GameObject> projectilePrefabs = new List<GameObject>(); public static DirectorCardHolder AncientWispCard; public static DirectorCardHolder AncientWispLoopCard; public string identifier => "AncientWisp.AWContent"; [IteratorStateMachine(typeof(<LoadStaticContentAsync>d__14))] public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <LoadStaticContentAsync>d__14(0) { <>4__this = this, args = args }; } [IteratorStateMachine(typeof(<GenerateContentPackAsync>d__15))] public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GenerateContentPackAsync>d__15(0) { <>4__this = this, args = args }; } [IteratorStateMachine(typeof(<FinalizeAsync>d__16))] public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <FinalizeAsync>d__16(0) { <>4__this = this, args = args }; } } internal class CreateAI { public CreateAI(GameObject masterObject) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0130: 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_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) AISkillDriver val = masterObject.AddComponent<AISkillDriver>(); val.skillSlot = (SkillSlot)2; val.requireSkillReady = true; val.requireEquipmentReady = false; val.moveTargetType = (TargetType)0; val.minDistance = 0f; val.maxDistance = float.PositiveInfinity; val.selectionRequiresTargetLoS = false; val.activationRequiresTargetLoS = false; val.activationRequiresAimConfirmation = false; val.movementType = (MovementType)2; val.aimType = (AimType)2; val.ignoreNodeGraph = false; val.noRepeat = true; val.shouldSprint = false; val.shouldFireEquipment = false; val.shouldTapButton = false; val.maxUserHealthFraction = 0.5f; val.minUserHealthFraction = 0f; AISkillDriver val2 = masterObject.AddComponent<AISkillDriver>(); val2.skillSlot = (SkillSlot)0; val2.requireSkillReady = true; val2.requireEquipmentReady = false; val2.moveTargetType = (TargetType)0; val2.minDistance = 0f; val2.maxDistance = 150f; val2.selectionRequiresTargetLoS = true; val2.activationRequiresTargetLoS = false; val2.activationRequiresAimConfirmation = false; val2.movementType = (MovementType)2; val2.aimType = (AimType)2; val2.ignoreNodeGraph = false; val2.noRepeat = true; val2.shouldSprint = false; val2.shouldFireEquipment = false; val2.shouldTapButton = false; val2.maxUserHealthFraction = 1f; AISkillDriver val3 = masterObject.AddComponent<AISkillDriver>(); val3.skillSlot = (SkillSlot)(-1); val3.requireSkillReady = false; val3.requireEquipmentReady = false; val3.moveTargetType = (TargetType)0; val3.minDistance = 150f; val3.maxDistance = float.PositiveInfinity; val3.selectionRequiresTargetLoS = false; val3.activationRequiresTargetLoS = false; val3.activationRequiresAimConfirmation = false; val3.movementType = (MovementType)1; val3.aimType = (AimType)2; val3.ignoreNodeGraph = false; val3.noRepeat = false; val3.shouldSprint = false; val3.shouldFireEquipment = false; val3.shouldTapButton = false; AISkillDriver val4 = masterObject.AddComponent<AISkillDriver>(); val4.skillSlot = (SkillSlot)1; val4.requireSkillReady = true; val4.requireEquipmentReady = false; val4.moveTargetType = (TargetType)0; val4.minDistance = 50f; val4.maxDistance = 150f; val4.selectionRequiresTargetLoS = true; val4.activationRequiresTargetLoS = true; val4.activationRequiresAimConfirmation = true; val4.movementType = (MovementType)1; val4.aimType = (AimType)2; val4.driverUpdateTimerOverride = 1f; val4.ignoreNodeGraph = false; val4.noRepeat = false; val4.shouldSprint = false; val4.shouldFireEquipment = false; val4.shouldTapButton = false; AISkillDriver val5 = masterObject.AddComponent<AISkillDriver>(); val5.skillSlot = (SkillSlot)1; val5.requireSkillReady = true; val5.requireEquipmentReady = false; val5.moveTargetType = (TargetType)0; val5.minDistance = 0f; val5.maxDistance = 50f; val5.selectionRequiresTargetLoS = true; val5.activationRequiresTargetLoS = true; val5.activationRequiresAimConfirmation = true; val5.movementType = (MovementType)2; val5.aimType = (AimType)2; val5.driverUpdateTimerOverride = 1f; val5.ignoreNodeGraph = false; val5.noRepeat = false; val5.shouldSprint = false; val5.shouldFireEquipment = false; val5.shouldTapButton = false; AISkillDriver val6 = masterObject.AddComponent<AISkillDriver>(); val6.skillSlot = (SkillSlot)(-1); val6.requireSkillReady = false; val6.requireEquipmentReady = false; val6.moveTargetType = (TargetType)0; val6.minDistance = 0f; val6.maxDistance = float.PositiveInfinity; val6.selectionRequiresTargetLoS = false; val6.activationRequiresTargetLoS = false; val6.activationRequiresAimConfirmation = false; val6.movementType = (MovementType)1; val6.aimType = (AimType)2; val6.ignoreNodeGraph = false; val6.noRepeat = false; val6.shouldSprint = false; val6.shouldFireEquipment = false; val6.shouldTapButton = false; } } public class CreateSkills { public CreateSkills(SkillLocator skills) { AssignLightning(skills); AssignBarrage(skills); AssignUtility(skills); } private void AssignLightning(SkillLocator skills) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>(); val.defaultVariantIndex = 0u; val.variants = (Variant[])(object)new Variant[1]; skills.secondary._skillFamily = val; SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>(); val2.activationState = new SerializableEntityStateType(typeof(ChargeBarrage)); val2.activationStateMachineName = "Weapon"; val2.baseMaxStock = 2; val2.baseRechargeInterval = 7f; val2.beginSkillCooldownOnSkillEnd = true; val2.canceledFromSprinting = false; val2.dontAllowPastMaxStocks = false; val2.forceSprintDuringState = false; val2.fullRestockOnAssign = true; val2.icon = null; val2.interruptPriority = (InterruptPriority)0; val2.isCombatSkill = true; val2.keywordTokens = new string[0]; val2.mustKeyPress = false; val2.cancelSprintingOnActivation = false; val2.rechargeStock = 2; val2.requiredStock = 1; val2.skillName = "FireBarrage"; val2.skillNameToken = "FireBarrage"; val2.skillDescriptionToken = ""; val2.stockToConsume = 1; ((Object)val2).name = val2.name; AWContent.entityStates.Add(typeof(ChargeBarrage)); AWContent.entityStates.Add(typeof(FireBarrage)); AWContent.skillDefs.Add(val2); AWContent.skillFamilies.Add(val); Variant[] variants = val.variants; Variant val3 = new Variant { skillDef = val2 }; ((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, false, (Node)null); variants[0] = val3; } private void AssignBarrage(SkillLocator skills) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_011f: 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) SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>(); val.defaultVariantIndex = 0u; val.variants = (Variant[])(object)new Variant[1]; skills.primary._skillFamily = val; SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>(); val2.activationState = new SerializableEntityStateType(typeof(ChargeRain)); val2.activationStateMachineName = "Weapon"; val2.baseMaxStock = 1; val2.baseRechargeInterval = 22f; val2.beginSkillCooldownOnSkillEnd = false; val2.canceledFromSprinting = false; val2.dontAllowPastMaxStocks = false; val2.forceSprintDuringState = false; val2.fullRestockOnAssign = true; val2.icon = null; val2.interruptPriority = (InterruptPriority)0; val2.isCombatSkill = false; val2.keywordTokens = new string[0]; val2.mustKeyPress = false; val2.cancelSprintingOnActivation = false; val2.rechargeStock = 1; val2.requiredStock = 1; val2.skillName = "ChargeRain"; val2.skillNameToken = "Rain"; val2.skillDescriptionToken = ""; val2.stockToConsume = 1; ((Object)val2).name = val2.name; Variant[] variants = val.variants; Variant val3 = new Variant { skillDef = val2 }; ((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, false, (Node)null); variants[0] = val3; AWContent.entityStates.Add(typeof(ChargeRain)); AWContent.entityStates.Add(typeof(ChannelRain)); AWContent.entityStates.Add(typeof(EndRain)); AWContent.skillDefs.Add(val2); AWContent.skillFamilies.Add(val); } private void AssignUtility(SkillLocator skills) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_0112: 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) SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>(); val.defaultVariantIndex = 0u; val.variants = (Variant[])(object)new Variant[1]; skills.utility._skillFamily = val; SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>(); val2.activationState = new SerializableEntityStateType(typeof(Enrage)); val2.activationStateMachineName = "Weapon"; val2.baseMaxStock = 1; val2.baseRechargeInterval = 0f; val2.beginSkillCooldownOnSkillEnd = false; val2.canceledFromSprinting = false; val2.dontAllowPastMaxStocks = false; val2.forceSprintDuringState = false; val2.fullRestockOnAssign = true; val2.icon = null; val2.interruptPriority = (InterruptPriority)1; val2.isCombatSkill = false; val2.keywordTokens = new string[0]; val2.mustKeyPress = false; val2.cancelSprintingOnActivation = false; val2.rechargeStock = 0; val2.requiredStock = 1; val2.skillName = "Enrage"; val2.skillNameToken = "Enrage"; val2.skillDescriptionToken = ""; val2.stockToConsume = 1; Variant[] variants = val.variants; Variant val3 = new Variant { skillDef = val2 }; ((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, false, (Node)null); variants[0] = val3; ((Object)val2).name = val2.name; AWContent.entityStates.Add(typeof(Enrage)); AWContent.skillDefs.Add(val2); AWContent.skillFamilies.Add(val); } } public class Director { public Director(GameObject masterObject) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) CharacterSpawnCard val = ScriptableObject.CreateInstance<CharacterSpawnCard>(); ((Object)val).name = "cscAncientWisp"; ((SpawnCard)val).prefab = masterObject; ((SpawnCard)val).sendOverNetwork = true; ((SpawnCard)val).hullSize = (HullClassification)1; ((SpawnCard)val).nodeGraphType = (GraphType)0; ((SpawnCard)val).requiredFlags = (NodeFlags)0; ((SpawnCard)val).forbiddenFlags = (NodeFlags)4; ((SpawnCard)val).directorCreditCost = 1000; ((SpawnCard)val).occupyPosition = false; val.loadout = new SerializableLoadout(); val.noElites = false; val.forbiddenAsBoss = false; DirectorCard val2 = new DirectorCard { spawnCard = (SpawnCard)(object)val, selectionWeight = 1, preventOverhead = false, minimumStageCompletions = 0, spawnDistance = (MonsterSpawnDistance)0 }; AWContent.AncientWispCard = new DirectorCardHolder { Card = val2, MonsterCategory = (MonsterCategory)4 }; DirectorCard card = new DirectorCard { spawnCard = (SpawnCard)(object)val, selectionWeight = 1, preventOverhead = false, minimumStageCompletions = 5, spawnDistance = (MonsterSpawnDistance)0 }; AWContent.AncientWispLoopCard = new DirectorCardHolder { Card = card, MonsterCategory = (MonsterCategory)4 }; if (Chainloader.PluginInfos.ContainsKey("com.Moffein.RiskyArtifacts")) { SetupOrigin((SpawnCard)(object)val); } DirectorCardCategorySelection val3 = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/MixEnemy/dccsMixEnemy.asset").WaitForCompletion(); int num = FindCategoryIndexByName(val3, "Champions"); if (num >= 0) { val3.AddCard(num, val2); } DirectorCardCategorySelection val4 = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/Base/Common/DirectorCardCategorySelections/dccsWispFamily.asset").WaitForCompletion(); num = FindCategoryIndexByName(val4, "Champions"); if (num >= 0) { val4.AddCard(num, val2); } foreach (StageSpawnInfo stage in AncientWispPlugin.StageList) { DirectorCardHolder val5 = ((stage.GetMinStages() == 0) ? AWContent.AncientWispCard : AWContent.AncientWispLoopCard); SceneDef val6 = ScriptableObject.CreateInstance<SceneDef>(); val6.baseSceneNameOverride = stage.GetStageName(); Helpers.AddNewMonsterToStage(val5, false, DirectorAPI.GetStageEnumFromSceneDef(val6), stage.GetStageName()); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void SetupOrigin(SpawnCard spawncard) { if (AncientWispPlugin.allowOrigin) { Origin.AddSpawnCard(spawncard, (BossTier)2); } } public static int FindCategoryIndexByName(DirectorCardCategorySelection dcs, string categoryName) { for (int i = 0; i < dcs.categories.Length; i++) { if (string.CompareOrdinal(dcs.categories[i].name, categoryName) == 0) { return i; } } return -1; } } internal class LightningNoise : MonoBehaviour { private float timer = 0f; private bool playedSound = false; public void FixedUpdate() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown timer += Time.fixedDeltaTime; if (!playedSound && timer >= ChannelRain.explosionDelay - 0.02f) { playedSound = true; Util.PlaySound("Play_item_use_lighningArm", ((Component)this).gameObject); EffectManager.SpawnEffect(LightningVisual.lightningExplosionEffect, new EffectData { origin = ((Component)this).transform.position, rotation = ((Component)this).transform.rotation }, false); } } } internal class RepairEffects : MonoBehaviour { public static bool fixedLightning; public static void Repair() { RepairEnrageEffect(); BuildDeathEffect(); } private static void BuildDeathEffect() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/effects/archwispdeath"), "MoffeinAW_DeathEffect", false); EffectComponent component = val.GetComponent<EffectComponent>(); component.soundName = "Play_MoffeinAW_deathexplosion"; AWContent.effectDefs.Add(new EffectDef(val)); DeathExplosions.archWispExplosion = val; } private static void RepairEnrageEffect() { GameObject val = LegacyResourcesAPI.Load<GameObject>("prefabs/effects/AncientWispEnrage"); Transform val2 = val.transform.Find("SwingTrail"); Renderer component = ((Component)val2).GetComponent<Renderer>(); if (Object.op_Implicit((Object)(object)component)) { component.material = ((Component)LegacyResourcesAPI.Load<GameObject>("prefabs/effects/muzzleflashes/muzzleflashbanditshotgun").transform.Find("Fire")).GetComponent<Renderer>().material; } Enrage.enragePrefab = val; } public static void ModifyLightning(GameObject lightning) { Transform[] componentsInChildren = lightning.GetComponentsInChildren<Transform>(); Transform val = null; Transform[] array = componentsInChildren; foreach (Transform val2 in array) { if (((Object)val2).name == "Ring, Center") { val = val2; break; } } Renderer component = ((Component)val).GetComponent<Renderer>(); if (Object.op_Implicit((Object)(object)component)) { component.material = ((Component)LegacyResourcesAPI.Load<GameObject>("prefabs/effects/muzzleflashes/muzzleflashbanditshotgun").transform.Find("Fire")).GetComponent<Renderer>().material; } } public static void BuildLightningPrefab() { if (!fixedLightning) { fixedLightning = true; LightningVisual.lightningDelayPrefab = PrefabAPI.InstantiateClone(ChannelRain.delayPrefab, "MoffeinAWLightningVisual", false); LightningVisual.lightningDelayPrefab.AddComponent<LightningNoise>(); ModifyLightning(LightningVisual.lightningDelayPrefab); DestroyOnTimer val = LightningVisual.lightningDelayPrefab.AddComponent<DestroyOnTimer>(); val.duration = ChannelRain.explosionDelay; DelayBlast component = LightningVisual.lightningDelayPrefab.GetComponent<DelayBlast>(); LightningVisual.lightningExplosionEffect = component.explosionEffect; Object.Destroy((Object)(object)LightningVisual.lightningDelayPrefab.GetComponent<DelayBlast>()); } } } public class ItemDisplays { private Dictionary<string, GameObject> itemDisplayPrefabs = new Dictionary<string, GameObject>(); public ItemDisplays() { DisplaySetup(AncientWispPlugin.AncientWispObject); } private void DisplaySetup(GameObject go) { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_022a: 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_0231: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0414: 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_0425: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Unknown result type (might be due to invalid IL or missing references) //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_0593: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05a6: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Unknown result type (might be due to invalid IL or missing references) //IL_05d2: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Unknown result type (might be due to invalid IL or missing references) //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_0659: Unknown result type (might be due to invalid IL or missing references) //IL_065e: Unknown result type (might be due to invalid IL or missing references) //IL_066a: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_0697: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06d4: Unknown result type (might be due to invalid IL or missing references) //IL_06d9: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_0705: Unknown result type (might be due to invalid IL or missing references) //IL_070a: Unknown result type (might be due to invalid IL or missing references) //IL_0712: Unknown result type (might be due to invalid IL or missing references) //IL_0717: Unknown result type (might be due to invalid IL or missing references) //IL_0719: Unknown result type (might be due to invalid IL or missing references) //IL_0723: Unknown result type (might be due to invalid IL or missing references) //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_0736: Unknown result type (might be due to invalid IL or missing references) //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_0763: Unknown result type (might be due to invalid IL or missing references) //IL_076c: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_07bb: Unknown result type (might be due to invalid IL or missing references) //IL_07c0: Unknown result type (might be due to invalid IL or missing references) //IL_07d6: Unknown result type (might be due to invalid IL or missing references) //IL_07db: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: 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_07ea: Unknown result type (might be due to invalid IL or missing references) //IL_07f4: Unknown result type (might be due to invalid IL or missing references) //IL_07f6: Unknown result type (might be due to invalid IL or missing references) //IL_07fb: Unknown result type (might be due to invalid IL or missing references) //IL_0807: Unknown result type (might be due to invalid IL or missing references) //IL_0822: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_0891: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08b4: Unknown result type (might be due to invalid IL or missing references) //IL_08b9: Unknown result type (might be due to invalid IL or missing references) //IL_08bb: Unknown result type (might be due to invalid IL or missing references) //IL_08c5: Unknown result type (might be due to invalid IL or missing references) //IL_08c7: Unknown result type (might be due to invalid IL or missing references) //IL_08cc: Unknown result type (might be due to invalid IL or missing references) Transform transform = null; Transform[] componentsInChildren = go.GetComponentsInChildren<Transform>(); Transform[] array = componentsInChildren; foreach (Transform val in array) { if (((Object)val).name == "Head") { transform = val; break; } } ChildLocator componentInChildren = go.GetComponentInChildren<ChildLocator>(); Array.Resize(ref componentInChildren.transformPairs, componentInChildren.transformPairs.Length + 1); componentInChildren.transformPairs[componentInChildren.transformPairs.Length - 1] = new NameTransformPair { name = "Head", transform = transform }; PopulateDisplays(); ItemDisplayRuleSet val2 = ScriptableObject.CreateInstance<ItemDisplayRuleSet>(); List<KeyAssetRuleGroup> list = new List<KeyAssetRuleGroup>(); list.Add(new KeyAssetRuleGroup { keyAsset = (Object)(object)Equipment.AffixPoison, displayRuleGroup = new DisplayRuleGroup { rules = (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = LoadDisplay("DisplayEliteUrchinCrown"), childName = "Head", localPos = new Vector3(0f, 0.4f, 0f), localAngles = new Vector3(255f, 0f, 0f), localScale = 0.1f * Vector3.one, limbMask = (LimbFlags)0 } } } }); list.Add(new KeyAssetRuleGroup { keyAsset = (Object)(object)Equipment.AffixHaunted, displayRuleGroup = new DisplayRuleGroup { rules = (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = LoadDisplay("DisplayEliteStealthCrown"), childName = "Head", localPos = new Vector3(0f, 0.5f, 0f), localAngles = new Vector3(260f, 0f, 0f), localScale = 0.1f * Vector3.one, limbMask = (LimbFlags)0 } } } }); list.Add(new KeyAssetRuleGroup { keyAsset = (Object)(object)Equipment.AffixWhite, displayRuleGroup = new DisplayRuleGroup { rules = (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = LoadDisplay("DisplayEliteIceCrown"), childName = "Head", localPos = new Vector3(0f, 0.5f, 0f), localAngles = new Vector3(260f, 0f, 0f), localScale = 0.05f * Vector3.one, limbMask = (LimbFlags)0 } } } }); list.Add(new KeyAssetRuleGroup { keyAsset = (Object)(object)Equipment.AffixBlue, displayRuleGroup = new DisplayRuleGroup { rules = (ItemDisplayRule[])(object)new ItemDisplayRule[2] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = LoadDisplay("DisplayEliteRhinoHorn"), childName = "Head", localPos = new Vector3(0f, 0.38f, 0.06f), localAngles = new Vector3(-20f, 0f, 0f), localScale = 0.26f * Vector3.one, limbMask = (LimbFlags)0 }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = LoadDisplay("DisplayEliteRhinoHorn"), childName = "Head", localPos = new Vector3(0f, 0.28f, 0.1f), localAngles = new Vector3(-10f, 0f, 0f), localScale = 0.36f * Vector3.one, limbMask = (LimbFlags)0 } } } }); list.Add(new KeyAssetRuleGroup { keyAsset = (Object)(object)Equipment.AffixRed, displayRuleGroup = new DisplayRuleGroup { rules = (ItemDisplayRule[])(object)new ItemDisplayRule[2] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = LoadDisplay("DisplayEliteHorn"), childName = "Head", localPos = new Vector3(0.18f, 0.28f, 0f), localAngles = new Vector3(0f, 0f, 0f), localScale = 0.18f * Vector3.one, limbMask = (LimbFlags)0 }, new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = LoadDisplay("DisplayEliteHorn"), childName = "Head", localPos = new Vector3(-0.18f, 0.28f, 0f), localAngles = new Vector3(0f, 0f, 0f), localScale = 0.18f * new Vector3(-1f, 1f, 1f), limbMask = (LimbFlags)0 } } } }); list.Add(new KeyAssetRuleGroup { keyAsset = (Object)(object)Elites.Earth.eliteEquipmentDef, displayRuleGroup = new DisplayRuleGroup { rules = (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = LoadDisplay("DisplayEliteMendingAntlers"), childName = "Head",