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 VariantPack TheOriginal30 v3.0.0
plugins/TheOriginal30.dll
Decompiled a week ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using EntityStates; using EntityStates.Commando.CommandoWeapon; using EntityStates.Croco; using EntityStates.GreaterWispMonster; using EntityStates.LemurianBruiserMonster; using EntityStates.LemurianMonster.Badass; using EntityStates.Mage.Weapon; using EntityStates.ParentMonster; using HG; using HG.Reflection; using KinematicCharacterController; using LoadingScreenFix; using MSU; using MSU.Config; using R2API; using R2API.Utils; using RoR2; using RoR2.ContentManagement; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using TO30; using TO30.Components; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using VAPI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: OptIn] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] namespace EntityStates.Vulture.Deagle { public class FireVulturePistol : BaseSkillState { public static GameObject muzzleEffectPrefab; public static GameObject hitEffectPrefab; public static GameObject tracerEffectPrefab; public static float damageCoefficient; public static float force; public static float baseDuration = 2f; public static string firePistolSoundString; public static float recoilAmplitude = 1f; public static float spreadBloomValue = 0.3f; public static float commandoBoostBuffCoefficient = 0.4f; public static float trajectoryAimAssistMultiplier = 0.75f; private static bool init = false; private Ray aimRay; private float duration; public override void OnEnter() { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (!init) { muzzleEffectPrefab = FirePistol2.muzzleEffectPrefab; hitEffectPrefab = FirePistol2.hitEffectPrefab; tracerEffectPrefab = FirePistol2.tracerEffectPrefab; damageCoefficient = FirePistol2.damageCoefficient; force = FirePistol2.force; baseDuration = FirePistol2.baseDuration; firePistolSoundString = FirePistol2.firePistolSoundString; recoilAmplitude = FirePistol2.recoilAmplitude; spreadBloomValue = FirePistol2.spreadBloomValue; commandoBoostBuffCoefficient = FirePistol2.commandoBoostBuffCoefficient; trajectoryAimAssistMultiplier = FirePistol2.trajectoryAimAssistMultiplier; init = true; } duration = baseDuration / ((BaseState)this).attackSpeedStat; aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 3f, false); FireBullet("MouthMuzzle"); } private void FireBullet(string targetMuzzle) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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) Util.PlaySound(firePistolSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)muzzleEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleEffectPrefab, ((EntityState)this).gameObject, targetMuzzle, false); } ((BaseState)this).AddRecoil(-0.4f * recoilAmplitude, -0.8f * recoilAmplitude, -0.3f * recoilAmplitude, 0.3f * recoilAmplitude); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, damage = damageCoefficient * ((BaseState)this).damageStat, force = force, tracerEffectPrefab = tracerEffectPrefab, muzzleName = targetMuzzle, hitEffectPrefab = hitEffectPrefab, isCrit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), radius = 0.1f, smartCollision = true, trajectoryAimAssistMultiplier = trajectoryAimAssistMultiplier, damageType = DamageTypeCombo.GenericPrimary }.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.ScavMonster.Dream { public class DreamLuck : BaseState { private float duration; private PickupIndex dropPickup; private int itemsToGrant; private PickupDisplay pickupDisplay; public override void OnEnter() { //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected I4, but got Unknown ((BaseState)this).OnEnter(); duration = FindItem.baseDuration / base.attackSpeedStat; ((EntityState)this).PlayCrossfade("Body", "SitRummage", "Sit.playbackRate", duration, 0.1f); Util.PlaySound(FindItem.sound, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { WeightedSelection<List<PickupIndex>> obj = new WeightedSelection<List<PickupIndex>>(8); obj.AddChoice(Run.instance.availableTier3DropList.Where(PickupIsNonBlacklistedItem).ToList(), FindItem.tier3Chance); List<PickupIndex> list = obj.Evaluate(Random.value); dropPickup = list[Random.Range(0, list.Count)]; PickupDef pickupDef = PickupCatalog.GetPickupDef(dropPickup); if (pickupDef != null) { ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex); if ((Object)(object)itemDef != (Object)null) { itemsToGrant = 0; ItemTier tier = itemDef.tier; switch ((int)tier) { case 0: itemsToGrant = FindItem.tier1Count; break; case 1: itemsToGrant = FindItem.tier2Count; break; case 2: itemsToGrant = FindItem.tier3Count; break; default: itemsToGrant = 1; break; } } } } Transform val = ((BaseState)this).FindModelChild("PickupDisplay"); pickupDisplay = ((Component)val).GetComponent<PickupDisplay>(); PickupDisplay obj2 = pickupDisplay; UniquePickup val2 = new UniquePickup(dropPickup); obj2.SetPickup(ref val2, false); } public override void OnExit() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) PickupDisplay obj = pickupDisplay; UniquePickup val = new UniquePickup(PickupIndex.none); obj.SetPickup(ref val, false); ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)new GrantItem { dropPickup = dropPickup, itemsToGrant = itemsToGrant }); } } public override void OnSerialize(NetworkWriter writer) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); NetworkExtensions.Write(writer, dropPickup); } public override void OnDeserialize(NetworkReader reader) { //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) ((EntityState)this).OnDeserialize(reader); dropPickup = NetworkExtensions.ReadPickupIndex(reader); } private bool PickupIsNonBlacklistedItem(PickupIndex pickupIndex) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) PickupDef pickupDef = PickupCatalog.GetPickupDef(pickupIndex); if (pickupDef == null) { return false; } ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex); if ((Object)(object)itemDef != (Object)null) { return itemDef.DoesNotContainTag((ItemTag)4); } return false; } } public class EnterLuckySit : BaseSitState { private float duration; public override void OnEnter() { ((BaseSitState)this).OnEnter(); duration = EnterSit.baseDuration / ((BaseState)this).attackSpeedStat; Util.PlaySound(EnterSit.soundString, ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Body", "EnterSit", "Sit.playbackRate", duration, 0.1f); ((EntityState)this).modelLocator.normalizeToFloor = true; ((Behaviour)((Component)((EntityState)this).modelLocator.modelTransform).GetComponent<AimAnimator>()).enabled = true; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new DreamLuck()); } } } } namespace EntityStates.Wisp1Monster.AlmostGreat { public class ChargeGreaterCannon : BaseState { public static float baseDuration = 3f; protected float duration; private GameObject chargeEffect; private const float soundDuration = 2f; private string attackString; private GameObject effectPrefab; private ChargeCannons goodState; public override void OnEnter() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) if (goodState == null) { goodState = new ChargeCannons(); } attackString = goodState.attackString; effectPrefab = goodState.effectPrefab; ((BaseState)this).OnEnter(); Util.PlayAttackSpeedSound(attackString, ((EntityState)this).gameObject, base.attackSpeedStat * (2f / baseDuration)); duration = baseDuration / base.attackSpeedStat; Transform modelTransform = ((EntityState)this).GetModelTransform(); 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)component.FindChild("Muzzle"))) { chargeEffect = Object.Instantiate<GameObject>(effectPrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation); chargeEffect.transform.parent = ((EntityState)this).transform; ScaleParticleSystemDuration component2 = chargeEffect.GetComponent<ScaleParticleSystemDuration>(); if (Object.op_Implicit((Object)(object)component2)) { component2.newDuration = duration; } } } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(duration); } ((EntityState)this).PlayAnimation("Body", "ChargeAttack1", "ChargeAttack1.playbackRate", duration, 0f); } public override void OnExit() { ((EntityState)this).OnExit(); EntityState.Destroy((Object)(object)chargeEffect); } public override void Update() { ((EntityState)this).Update(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { FireGreaterCannon nextState = new FireGreaterCannon(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class FireGreaterCannon : BaseState { public static float baseDuration = 2f; public static float damageCoefficient = 12f; private float duration; private GameObject effectPrefab; private FireCannons goodState; public override void OnEnter() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_010b: 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_0117: 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_00f8: Unknown result type (might be due to invalid IL or missing references) if (goodState == null) { goodState = new FireCannons(); } effectPrefab = goodState.effectPrefab; ((BaseState)this).OnEnter(); Ray aimRay = ((BaseState)this).GetAimRay(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation("Body", "FireAttack1", "FireAttack1.playbackRate", duration, 0f); if (!((EntityState)this).isAuthority || !Object.op_Implicit((Object)(object)((EntityState)this).modelLocator) || !Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform)) { return; } ChildLocator component = ((Component)((EntityState)this).modelLocator.modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.FindChild("Muzzle"))) { DamageTypeCombo? val = null; GameObject val2 = Resources.Load<GameObject>("Prefabs/Projectiles/WispCannon"); ProjectileDamage val3 = default(ProjectileDamage); if (val2.TryGetComponent<ProjectileDamage>(ref val3)) { DamageTypeCombo damageType = val3.damageType; ref DamageSource damageSource = ref damageType.damageSource; damageSource = (DamageSource)((uint)damageSource | 1u); val = damageType; } ProjectileManager.instance.FireProjectile(val2, ((EntityState)this).transform.position, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, 80f, Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, val); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.LemurianMonster.Flamethrower { public class FireFlamethrower : BaseState { private static bool _initializedFromMageFlamethrower; private static float baseFlamethrowerDuration; private static float tickFrequency; public static GameObject flameThrowerEffectPrefab; public static float maxDistance = 40f; private float tickDamageCoefficient; private float flamethrowerStopwatch; private float stopwatch; private float entryDuration; private float flamethrowerDuration; private bool hasBegunFlamethrower; private ChildLocator childLocator; private Transform flamethrowerTransform; private Transform mouthMuzzle; private bool isBadass; private const float flamethrowerEffectBaseDistance = 16f; [SystemInitializer(new Type[] { })] private static void Initialize() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0071: Unknown result type (might be due to invalid IL or missing references) flameThrowerEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Drones/DroneFlamethrowerEffect.prefab").WaitForCompletion(), "FlamethrowerLemurianEffect", false); EntityState.Destroy((Object)(object)flameThrowerEffectPrefab.GetComponent<DestroyOnTimer>()); ParticleSystem componentInChildren = flameThrowerEffectPrefab.GetComponentInChildren<ParticleSystem>(); MainModule main = componentInChildren.main; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(0.5f); ((MainModule)(ref main)).startSpeed = MinMaxCurve.op_Implicit(70f); EmissionModule emission = componentInChildren.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(80f); } private void InitFromMage() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (!_initializedFromMageFlamethrower) { _initializedFromMageFlamethrower = true; Flamethrower val = new Flamethrower(); baseFlamethrowerDuration = val.baseFlamethrowerDuration; tickFrequency = val.tickFrequency; } } public override void OnEnter() { //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) InitFromMage(); ((BaseState)this).OnEnter(); entryDuration = Flamethrower.baseEntryDuration / base.attackSpeedStat; flamethrowerDuration = baseFlamethrowerDuration; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(entryDuration + flamethrowerDuration + 1f); } if (Object.op_Implicit((Object)(object)modelTransform)) { childLocator = ((Component)modelTransform).GetComponent<ChildLocator>(); mouthMuzzle = childLocator.FindChild("MuzzleMouth"); } int num = Mathf.CeilToInt(flamethrowerDuration * tickFrequency); tickDamageCoefficient = 0.5f / (float)num; CharacterBodyVariantController val = default(CharacterBodyVariantController); if (!((Component)((EntityState)this).characterBody).TryGetComponent<CharacterBodyVariantController>(ref val)) { return; } ReadOnlyArray<CharacterVariantDef> characterVariantDefs = val.GetCharacterVariantDefs(); List<CharacterVariantDef> list = CharacterVariantCatalog.RetrieveDependantSpawnVariants(TO30Content.CharacterVariants.BadassLemurian); list.Add(TO30Content.CharacterVariants.BadassLemurian); foreach (CharacterVariantDef item in list) { if (((IEnumerable<CharacterVariantDef>)(object)characterVariantDefs).Contains(item)) { TO30Log.Message("Badass Flamethrower Lemurian Working as intended", 90, "OnEnter"); isBadass = true; } } CollectionPool<CharacterVariantDef, List<CharacterVariantDef>>.ReturnCollection(list); } public override void OnExit() { Util.PlaySound(Flamethrower.endAttackSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)flamethrowerTransform)) { EntityState.Destroy((Object)(object)((Component)flamethrowerTransform).gameObject); } ((EntityState)this).OnExit(); } private void FireGauntlet(string muzzleString) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_0072: 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: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: 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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { BulletAttack val = new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, damage = tickDamageCoefficient * base.damageStat, force = Flamethrower.force, muzzleName = muzzleString, hitEffectPrefab = Flamethrower.impactEffectPrefab, isCrit = ((BaseState)this).RollCrit(), radius = Flamethrower.radius, falloffModel = (FalloffModel)0, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, procCoefficient = Flamethrower.procCoefficientPerTick, maxDistance = maxDistance, smartCollision = true, damageType = DamageTypeCombo.op_Implicit((DamageType)(Util.CheckRoll(Flamethrower.ignitePercentChance, ((EntityState)this).characterBody.master) ? 128 : 0)) }; ref DamageSource damageSource = ref val.damageType.damageSource; damageSource = (DamageSource)((uint)damageSource | 1u); val.Fire(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.ApplyForce(((Ray)(ref aimRay)).direction * (0f - Flamethrower.recoilForce), false, false); } } } public override void FixedUpdate() { //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= entryDuration && !hasBegunFlamethrower) { hasBegunFlamethrower = true; Util.PlaySound(Flamethrower.startAttackSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)childLocator) && Object.op_Implicit((Object)(object)mouthMuzzle)) { flamethrowerTransform = Object.Instantiate<GameObject>(flameThrowerEffectPrefab, mouthMuzzle).transform; ((Component)flamethrowerTransform).GetComponent<ScaleParticleSystemDuration>().newDuration = flamethrowerDuration; } ((EntityState)this).PlayAnimation("Gesture", "FireFireball", "FireFireball.playbackRate", tickFrequency, 0f); FireGauntlet("MuzzleCenter"); } if (hasBegunFlamethrower) { flamethrowerStopwatch += Time.deltaTime; float num = 1f / tickFrequency / 2f; if (flamethrowerStopwatch > num) { flamethrowerStopwatch -= num; FireGauntlet("MuzzleMouth"); if (isBadass) { MissileUtils.FireMissile(((EntityState)this).characterBody.corePosition, ((EntityState)this).characterBody, default(ProcChainMask), (GameObject)null, base.damageStat * 0.1f, ((BaseState)this).RollCrit(), FireFireballAndMissile.missleProjectilePrefab, (DamageColorIndex)7, false); } } UpdateFlamethrowerEffect(); } if (stopwatch >= flamethrowerDuration + entryDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void UpdateFlamethrowerEffect() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; if (Object.op_Implicit((Object)(object)flamethrowerTransform)) { flamethrowerTransform.rotation = Util.QuaternionSafeLookRotation(direction); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } } namespace EntityStates.LemurianMonster.Badass { public class ChargeFireballAndMissile : BaseState { public static float baseDuration = ChargeFireball.baseDuration; public static GameObject chargeVfxPrefab = ChargeFireball.chargeVfxPrefab; public static string attackString = ChargeFireball.attackString; private float duration; private GameObject chargeVfxInstance; public override void OnEnter() { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) baseDuration = ChargeFireball.baseDuration; chargeVfxPrefab = ChargeFireball.chargeVfxPrefab; attackString = ChargeFireball.attackString; ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).GetModelAnimator(); Transform modelTransform = ((EntityState)this).GetModelTransform(); Util.PlayAttackSpeedSound(attackString, ((EntityState)this).gameObject, base.attackSpeedStat); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("MuzzleMouth"); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)chargeVfxPrefab)) { chargeVfxInstance = Object.Instantiate<GameObject>(chargeVfxPrefab, val.position, val.rotation); chargeVfxInstance.transform.parent = val; } } } ((EntityState)this).PlayAnimation("Gesture", "ChargeFireball", "ChargeFireball.playbackRate", duration, 0f); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)chargeVfxInstance)) { EntityState.Destroy((Object)(object)chargeVfxInstance); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { FireFireballAndMissile nextState = new FireFireballAndMissile(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class FireFireballAndMissile : BaseState { public static GameObject projectilePrefab = FireFireball.projectilePrefab; public static GameObject effectPrefab = FireFireball.effectPrefab; public static float baseDuration = FireFireball.baseDuration; public static float damageCoefficient = FireFireball.damageCoefficient; public static float force = FireFireball.force; public static string attackString = FireFireball.attackString; public static GameObject missleProjectilePrefab = Resources.Load<GameObject>("Prefabs/Projectiles/MissileProjectile"); public static float missileDamageCoef = 1.2f; private float duration; public override void OnEnter() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture", "FireFireball", "FireFireball.playbackRate", duration, 0f); Util.PlaySound(attackString, ((EntityState)this).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); string text = "MuzzleMouth"; string text2 = "Chest"; if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false); EffectManager.SimpleMuzzleFlash(FireMegaFireball.muzzleflashEffectPrefab, ((EntityState)this).gameObject, text2, false); } if (((EntityState)this).isAuthority) { ProjectileDamage val = default(ProjectileDamage); if (projectilePrefab.TryGetComponent<ProjectileDamage>(ref val)) { DamageTypeCombo damageType = val.damageType; ref DamageSource damageSource = ref damageType.damageSource; damageSource = (DamageSource)((uint)damageSource | 1u); } ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, force, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); MissileUtils.FireMissile(((EntityState)this).characterBody.corePosition, ((EntityState)this).characterBody, default(ProcChainMask), (GameObject)null, base.damageStat, ((BaseState)this).RollCrit(), missleProjectilePrefab, (DamageColorIndex)7, false); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace EntityStates.JellyfishMonster.Nuclear { public class NuclearNova : BaseState { public static float baseDuration = 1.5f; public static float novaRadius = 24f; public static float novaForce = 25000f; private bool hasExploded; private float duration; private float stopwatch; private GameObject chargeEffect; private PrintController printController; private uint soundID; public override void OnEnter() { //IL_0078: 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_00b3: 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) ((BaseState)this).OnEnter(); stopwatch = 0f; duration = baseDuration / base.attackSpeedStat; Transform modelTransform = ((EntityState)this).GetModelTransform(); ((EntityState)this).PlayCrossfade("Body", "Nova", "Nova.playbackRate", duration, 0.1f); soundID = Util.PlaySound(JellyNova.chargingSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)JellyNova.chargingEffectPrefab)) { chargeEffect = Object.Instantiate<GameObject>(JellyNova.chargingEffectPrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation); chargeEffect.transform.parent = ((EntityState)this).transform; chargeEffect.transform.localScale = Vector3.one * novaRadius; chargeEffect.GetComponent<ScaleParticleSystemDuration>().newDuration = duration; } if (Object.op_Implicit((Object)(object)modelTransform)) { printController = ((Component)modelTransform).GetComponent<PrintController>(); if (Object.op_Implicit((Object)(object)printController)) { ((Behaviour)printController).enabled = true; printController.printTime = duration; } } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)chargeEffect)) { EntityState.Destroy((Object)(object)chargeEffect); } if (Object.op_Implicit((Object)(object)printController)) { ((Behaviour)printController).enabled = false; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (stopwatch >= duration && ((EntityState)this).isAuthority && !hasExploded) { Detonate(); } } private void Detonate() { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: 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_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0137: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) hasExploded = true; Util.PlaySound(JellyNova.novaSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator)) { if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelBaseTransform)) { EntityState.Destroy((Object)(object)((Component)((EntityState)this).modelLocator.modelBaseTransform).gameObject); } if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform)) { EntityState.Destroy((Object)(object)((Component)((EntityState)this).modelLocator.modelTransform).gameObject); } } if (Object.op_Implicit((Object)(object)chargeEffect)) { EntityState.Destroy((Object)(object)chargeEffect); } if (Object.op_Implicit((Object)(object)JellyNova.novaEffectPrefab)) { EffectManager.SpawnEffect(JellyNova.novaEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position, scale = novaRadius }, true); } BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject), baseDamage = base.damageStat * JellyNova.novaDamageCoefficient, baseForce = novaForce, position = ((EntityState)this).transform.position, radius = novaRadius, procCoefficient = 2f, attackerFiltering = (AttackerFiltering)2, damageType = DamageTypeCombo.op_Implicit((DamageType)4194304) }; ref DamageSource damageSource = ref val.damageType.damageSource; damageSource = (DamageSource)((uint)damageSource | 1u); val.Fire(); if (Object.op_Implicit((Object)(object)((EntityState)this).healthComponent)) { ((EntityState)this).healthComponent.Suicide((GameObject)null, (GameObject)null, DamageTypeCombo.op_Implicit((DamageType)0)); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)3; } } } namespace EntityStates.GolemMonster.Rush { public class GolemBlink : BaseState { private Transform modelTransform; private float stopwatch; private Vector3 blinkDestination = Vector3.zero; private Vector3 blinkStart = Vector3.zero; private CharacterModel characterModel; private HurtBoxGroup hurtboxGroup; public override void OnEnter() { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0109: 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: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0133: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: 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_017b: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(LoomingPresence.beginSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { characterModel = ((Component)modelTransform).GetComponent<CharacterModel>(); hurtboxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>(); } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj = characterModel; int invisibilityCount = obj.invisibilityCount; obj.invisibilityCount = invisibilityCount + 1; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup obj2 = hurtboxGroup; int hurtBoxesDeactivatorCounter = obj2.hurtBoxesDeactivatorCounter + 1; obj2.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((Behaviour)((EntityState)this).characterMotor).enabled = false; } if (((EntityState)this).isAuthority) { Vector3 val = ((EntityState)this).inputBank.aimDirection * LoomingPresence.blinkDistance; blinkDestination = ((EntityState)this).transform.position; blinkStart = ((EntityState)this).transform.position; NodeGraph groundNodes = SceneInfo.instance.groundNodes; NodeIndex val2 = groundNodes.FindClosestNode(((EntityState)this).transform.position + val, ((EntityState)this).characterBody.hullClassification, float.PositiveInfinity); groundNodes.GetNodePosition(val2, ref blinkDestination); blinkDestination += ((EntityState)this).transform.position - ((EntityState)this).characterBody.footPosition; val = blinkDestination - blinkStart; CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject), val); } } private void CreateBlinkEffect(Vector3 origin, Vector3 direction) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(direction); val.origin = origin; EffectManager.SpawnEffect(LoomingPresence.blinkPrefab, val, true); } private void SetPosition(Vector3 newPosition) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(newPosition, Quaternion.identity, true); } } public override void FixedUpdate() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_003d: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } SetPosition(Vector3.Lerp(blinkStart, blinkDestination, stopwatch / LoomingPresence.duration)); if (stopwatch >= LoomingPresence.duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound(LoomingPresence.endSoundString, ((EntityState)this).gameObject); modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.forward = ((Ray)(ref aimRay)).direction; } if (Object.op_Implicit((Object)(object)modelTransform) && Object.op_Implicit((Object)(object)LoomingPresence.destealthMaterial)) { TemporaryOverlay obj = ((Component)modelTransform).gameObject.AddComponent<TemporaryOverlay>(); obj.duration = LoomingPresence.destealthDuration; obj.destroyComponentOnEnd = true; obj.originalMaterial = LoomingPresence.destealthMaterial; obj.inspectorCharacterModel = ((Component)modelTransform).gameObject.GetComponent<CharacterModel>(); obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.animateShaderAlpha = true; } if (Object.op_Implicit((Object)(object)characterModel)) { CharacterModel obj2 = characterModel; int invisibilityCount = obj2.invisibilityCount; obj2.invisibilityCount = invisibilityCount - 1; } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup obj3 = hurtboxGroup; int hurtBoxesDeactivatorCounter = obj3.hurtBoxesDeactivatorCounter - 1; obj3.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((Behaviour)((EntityState)this).characterMotor).enabled = true; } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace EntityStates.BeetleMonster.Toxic { public class ToxicHeadbutt : BaseState { public static float explosionRadius = 2f; public static float damageCoefficent = 0.8f; public static GameObject crocoEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Croco/CrocoLeapExplosion.prefab").WaitForCompletion(); private OverlapAttack attack; private Animator modelAnimator; private RootMotionAccumulator rootMotionAccumulator; private float duration; private bool hasExploded; public override void OnEnter() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); rootMotionAccumulator = ((EntityState)this).GetModelRootMotionAccumulator(); modelAnimator = ((EntityState)this).GetModelAnimator(); duration = HeadbuttState.baseDuration / base.attackSpeedStat; attack = new OverlapAttack(); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = TeamComponent.GetObjectTeam(attack.attacker); attack.damage = HeadbuttState.damageCoefficient * base.damageStat; attack.hitEffectPrefab = HeadbuttState.hitEffectPrefab; attack.damageType = DamageTypeCombo.GenericPrimary; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { attack.hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Headbutt"); } if (Object.op_Implicit((Object)(object)((EntityState)this).sfxLocator)) { Util.PlaySound(((EntityState)this).sfxLocator.deathSound, ((EntityState)this).gameObject); } ((EntityState)this).PlayCrossfade("Body", "Headbutt", "Headbutt.playbackRate", duration, 0.1f); } public override void FixedUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)rootMotionAccumulator)) { Vector3 val = rootMotionAccumulator.ExtractRootMotion(); if (val != Vector3.zero && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += val; } } if (((EntityState)this).isAuthority) { attack.forceVector = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? (((EntityState)this).characterDirection.forward * HeadbuttState.forceMagnitude) : Vector3.zero); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { ((EntityState)this).characterDirection.moveVector = ((EntityState)this).inputBank.aimDirection; } if (Object.op_Implicit((Object)(object)modelAnimator) && modelAnimator.GetFloat("Headbutt.hitBoxActive") > 0.5f) { Detonate(); } } } private void Detonate() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0108: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) if (hasExploded) { return; } hasExploded = true; if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator)) { if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelBaseTransform)) { EntityState.Destroy((Object)(object)((Component)((EntityState)this).modelLocator.modelBaseTransform).gameObject); } if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform)) { EntityState.Destroy((Object)(object)((Component)((EntityState)this).modelLocator.modelTransform).gameObject); } } new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject), baseDamage = base.damageStat * damageCoefficent, baseForce = 0f, position = ((EntityState)this).transform.position, radius = explosionRadius, procCoefficient = 2f, attackerFiltering = (AttackerFiltering)2, damageType = DamageTypeCombo.op_Implicit((DamageType)4096) }.Fire(); Vector3 footPosition = ((EntityState)this).characterBody.footPosition; FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = BaseLeap.projectilePrefab, crit = ((BaseState)this).RollCrit(), force = 0f, damage = base.damageStat, owner = ((EntityState)this).gameObject, rotation = Quaternion.identity, position = footPosition }; ProjectileManager.instance.FireProjectile(val); EffectManager.SpawnEffect(crocoEffect, new EffectData { origin = footPosition, scale = explosionRadius }, true); if (Object.op_Implicit((Object)(object)BaseLeap.landingSound)) { EffectManager.SimpleSoundEffect(BaseLeap.landingSound.index, ((EntityState)this).characterBody.corePosition, true); } if (Object.op_Implicit((Object)(object)((EntityState)this).healthComponent)) { ((EntityState)this).healthComponent.Suicide((GameObject)null, (GameObject)null, DamageTypeCombo.op_Implicit((DamageType)0)); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace EntityStates.BeetleMonster.Battle { public class HeavyHeadbutt : BaseState { public static float pushForce = 8000f; private OverlapAttack attack; private Animator modelAnimator; private RootMotionAccumulator rootMotionAccumulator; private float duration; public override void OnEnter() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); rootMotionAccumulator = ((EntityState)this).GetModelRootMotionAccumulator(); modelAnimator = ((EntityState)this).GetModelAnimator(); duration = HeadbuttState.baseDuration / base.attackSpeedStat; attack = new OverlapAttack(); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = TeamComponent.GetObjectTeam(attack.attacker); attack.damage = HeadbuttState.damageCoefficient * base.damageStat; attack.hitEffectPrefab = HeadbuttState.hitEffectPrefab; attack.damageType = DamageTypeCombo.GenericPrimary; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { attack.hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Headbutt"); } Util.PlaySound(HeadbuttState.attackSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Body", "Headbutt", "Headbutt.playbackRate", duration, 0.1f); } public override void FixedUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)rootMotionAccumulator)) { Vector3 val = rootMotionAccumulator.ExtractRootMotion(); if (val != Vector3.zero && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += val; } } if (((EntityState)this).isAuthority) { attack.forceVector = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? (((EntityState)this).characterDirection.forward * pushForce) : Vector3.zero); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { ((EntityState)this).characterDirection.moveVector = ((EntityState)this).inputBank.aimDirection; } if (Object.op_Implicit((Object)(object)modelAnimator) && modelAnimator.GetFloat("Headbutt.hitBoxActive") > 0.5f) { attack.Fire((List<HurtBox>)null); } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace TO30 { public static class TO30Assets { private const string ASSET_BUNDLE_NAME = "to30assets"; private const string LOADING_SCREEN_SPRITES = "to30loadingscreen"; private const string ASSET_BUNDLE_FOLDER_NAME = "assetbundles"; public static ResourceAvailability assetsAvailability; private static AssetBundle _assetBundle; private static string assetBundleFolderPath => Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)TO30Main.instance).Info.Location), "assetbundles"); public static TAsset LoadAsset<TAsset>(string name) where TAsset : Object { return _assetBundle.LoadAsset<TAsset>(name); } public static TO30AssetRequest<TAsset> LoadAssetAsync<TAsset>(string name) where TAsset : Object { return TO30AssetRequest<TAsset>.RequestFromPool(_assetBundle, name); } public static TAsset[] LoadAssets<TAsset>() where TAsset : Object { return _assetBundle.LoadAllAssets<TAsset>(); } public static TO30AssetRequest<TAsset> LoadAllAssetsAsync<TAsset>() where TAsset : Object { return TO30AssetRequest<TAsset>.RequestFromPool(_assetBundle); } internal static AssetBundle GetLoadingScreenBundle() { return AssetBundle.LoadFromFile(Path.Combine(assetBundleFolderPath, "to30loadingscreen")); } internal static IEnumerator Initialize() { if (!((ResourceAvailability)(ref assetsAvailability)).available) { TO30Log.Info("Initializing Assets...", 55, "Initialize"); IEnumerator loadRoutine = LoadAssetBundle(); while (!MSUtil.IsDone(loadRoutine)) { yield return null; } ParallelCoroutine coroutine = ParallelCoroutine.RequestFromPool(); coroutine.Add(SwapShaders()); coroutine.Add(SwapAddressableShaders()); coroutine.Add(FinishMaterialVariants()); while (!MSUtil.IsDone((IEnumerator)coroutine)) { yield return null; } ParallelCoroutine.ReturnToPool(coroutine); ((ResourceAvailability)(ref assetsAvailability)).MakeAvailable(); } } private static IEnumerator LoadAssetBundle() { AssetBundleCreateRequest request = AssetBundle.LoadFromFileAsync(Path.Combine(assetBundleFolderPath, "to30assets")); while (!((AsyncOperation)request).isDone) { yield return null; } _assetBundle = request.assetBundle; } private static IEnumerator FinishMaterialVariants() { using TO30AssetRequest<MaterialVariant> request = TO30Assets.LoadAllAssetsAsync<MaterialVariant>(); while (!request.isComplete) { yield return null; } ParallelCoroutine routine = ParallelCoroutine.RequestFromPool(); MaterialVariant[] assets = request.assets; foreach (MaterialVariant val in assets) { routine.Add(val.ApplyOverrides()); } while (!MSUtil.IsDone((IEnumerator)routine)) { yield return null; } ParallelCoroutine.ReturnToPool(routine); } private static IEnumerator SwapShaders() { return ShaderUtil.SwapStubbedShadersAsync(_assetBundle); } private static IEnumerator SwapAddressableShaders() { return ShaderUtil.LoadAddressableMaterialShadersAsync(_assetBundle); } } public abstract class TO30AssetRequest : IEnumerator { private IEnumerator internalCoroutine; public abstract Object boxedAsset { get; } public abstract Object[] boxedAssets { get; } public bool isComplete { get { if (internalCoroutine == null) { internalCoroutine = LoadAsset(); } return !internalCoroutine.MoveNext(); } } object IEnumerator.Current => internalCoroutine?.Current; protected abstract IEnumerator LoadAsset(); bool IEnumerator.MoveNext() { return !isComplete; } public virtual void Reset() { internalCoroutine = null; } } public sealed class TO30AssetRequest<TAsset> : TO30AssetRequest, IDisposable where TAsset : Object { private static Stack<TO30AssetRequest<TAsset>> _stack = new Stack<TO30AssetRequest<TAsset>>(); private TAsset _asset; private TAsset[] _assets; private string _assetName; private AssetBundle _assetBundle; public override Object boxedAsset => (Object)(object)asset; public TAsset asset => _asset; public override Object[] boxedAssets => (Object[])(object)assets; public TAsset[] assets => _assets; private bool isSingleAssetLoad => !string.IsNullOrWhiteSpace(_assetName); private Type assetType => typeof(TAsset); internal static TO30AssetRequest<TAsset> RequestFromPool(AssetBundle assetBundle) { TO30AssetRequest<TAsset> existingOrCreateRequest = GetExistingOrCreateRequest(); existingOrCreateRequest.Init(assetBundle); return existingOrCreateRequest; } internal static TO30AssetRequest<TAsset> RequestFromPool(AssetBundle assetBundle, string name) { TO30AssetRequest<TAsset> existingOrCreateRequest = GetExistingOrCreateRequest(); existingOrCreateRequest.Init(assetBundle, name); return existingOrCreateRequest; } internal static void ReturnToPool(TO30AssetRequest<TAsset> request) { _stack.Push(request); } private static TO30AssetRequest<TAsset> GetExistingOrCreateRequest() { if (_stack.TryPop(out var result)) { return result; } return new TO30AssetRequest<TAsset>(); } protected override IEnumerator LoadAsset() { ThrowIfUninitialized(); AssetBundleRequest request = ((!isSingleAssetLoad) ? _assetBundle.LoadAllAssetsAsync<TAsset>() : _assetBundle.LoadAssetAsync<TAsset>(_assetName)); while (!((AsyncOperation)request).isDone) { yield return null; } if (isSingleAssetLoad) { _asset = (TAsset)(object)request.asset; yield break; } _assets = new TAsset[request.allAssets.Length]; for (int i = 0; i < request.allAssets.Length; i++) { _assets[i] = (TAsset)(object)request.allAssets[i]; } } public void Dispose() { ThrowIfUninitialized(); Reset(); ReturnToPool(this); } public override void Reset() { ThrowIfUninitialized(); base.Reset(); _assetBundle = null; _assetName = null; _assets = null; _asset = default(TAsset); } private void ThrowIfUninitialized() { if ((Object)(object)_assetBundle == (Object)null || ((Object)(object)_assetBundle == (Object)null && _assetName == null)) { throw new InvalidOperationException("You should not use a VAPIAssetRequest that has been disposed of."); } } private void Init(AssetBundle assetBundle) { _assetBundle = assetBundle; } private void Init(AssetBundle assetBundle, string assetName) { _assetBundle = assetBundle; _assetName = assetName; } private TO30AssetRequest() { } } public class TO30Config { public const string PREFIX = "TO30."; internal static ConfigFactory configFactory { get; private set; } internal TO30Config(BaseUnityPlugin plugin) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown configFactory = new ConfigFactory(plugin); } } public class TO30Content : IContentPackProvider { public static class CharacterVariants { public static CharacterVariantDef AlbinoBison; public static CharacterVariantDef AlloyDeagle; public static CharacterVariantDef AlmostGreatWisp; public static CharacterVariantDef ArmoredBeetle; public static CharacterVariantDef ArtilleryVulture; public static CharacterVariantDef BadassLemurian; public static CharacterVariantDef BattleBeetle; public static CharacterVariantDef BeetleGuardBrute; public static CharacterVariantDef BeetleGuardSharpshooter; public static CharacterVariantDef ClottedImp; public static CharacterVariantDef CursedJellyfish; public static CharacterVariantDef DreamScavenger; public static CharacterVariantDef EnormousStoneTitan; public static CharacterVariantDef FlamethrowerLemurian; public static CharacterVariantDef FuckingTemplar; public static CharacterVariantDef FullAutoGolem; public static CharacterVariantDef GreatestWisp; public static CharacterVariantDef InfernalWisp; public static CharacterVariantDef MOAJ; public static CharacterVariantDef MoltenElderLemurian; public static CharacterVariantDef NuclearJellyfish; public static CharacterVariantDef OverchargedGolem; public static CharacterVariantDef PygmyStoneTitan; public static CharacterVariantDef RushGolem; public static CharacterVariantDef SpectralJellyfish; public static CharacterVariantDef SpeedyBeetle; public static CharacterVariantDef SpeedyBison; public static CharacterVariantDef TitanishGolem; public static CharacterVariantDef ToxicBeetle; public static CharacterVariantDef UnstableVagrant; public static CharacterVariantDef DevotedBadassLemurian; public static CharacterVariantDef DevotedFlamethrowerLemurian; public static CharacterVariantDef DevotedMoltenElderLemurian; public static CharacterVariantDef GlandBeetleGuardBrute; public static CharacterVariantDef GlandBeetleGuardSharpshooter; public static CharacterVariantDef PolymorphBadassLemurian; public static CharacterVariantDef PolymorphFlamethrowerLemurian; public static CharacterVariantDef SoulAlmostGreatWisp; public static CharacterVariantDef SoulInfernalWisp; public static CharacterVariantDef GuraguraDreamScavenger; public static CharacterVariantDef KipkipDreamScavenger; public static CharacterVariantDef TwiptwipDreamScavenger; public static CharacterVariantDef WipwipDreamScavenger; public static CharacterVariantDef Sanctum1DreamScavenger; public static CharacterVariantDef Sanctum2DreamScavenger; public static CharacterVariantDef Sanctum3DreamScavenger; } private static List<CharacterVariantDef> _dependantSpawnAllyDefs = new List<CharacterVariantDef>(); private static List<CharacterVariantDef> _dependantSpawnPolymorphDefs = new List<CharacterVariantDef>(); private static List<CharacterVariantDef> _dependantSpawnSoulDefs = new List<CharacterVariantDef>(); private static List<CharacterVariantDef> _dependantSpawnTwistedScavDefs = new List<CharacterVariantDef>(); private static List<CharacterVariantDef> _dependantSpawnSanctumScavDefs = new List<CharacterVariantDef>(); public string identifier => "com.Nebby.TO30"; public static ReadOnlyContentPack readOnlyContentPack => new ReadOnlyContentPack(_contentPack); public static ReadOnlyVariantPack readOnlyVariantPack { get { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (_variantPack == null) { return default(ReadOnlyVariantPack); } return new ReadOnlyVariantPack(_variantPack); } } private static ContentPack _contentPack { get; } = new ContentPack(); private static VariantPack _variantPack { get; set; } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { IEnumerator initialization = InitializeAssetsAndLang(); while (!MSUtil.IsDone(initialization)) { yield return null; } IEnumerator contentPackPopulation = PopulateContentPack(); while (contentPackPopulation.MoveNext()) { yield return null; } IEnumerator variantPackPopulation = PopulateVariantPack(); while (variantPackPopulation.MoveNext()) { yield return null; } VariantPackManager.AddVariantPack(_variantPack); ContentLoadHelper.PopulateTypeFields<CharacterVariantDef>(typeof(CharacterVariants), _variantPack.characterVariantDefs, (Func<string, string>)null); } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { args.ReportProgress(0f); yield return null; ContentPack.Copy(_contentPack, args.output); yield return null; args.ReportProgress(1f); } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(0f); yield return null; ParallelCoroutine asyncAssetLoadCoroutine = AsyncAssetLoadAttribute.CreateParallelCoroutineForMod((BaseUnityPlugin)(object)TO30Main.instance); while (!asyncAssetLoadCoroutine.isDone) { yield return null; } ParallelCoroutine.ReturnToPool(asyncAssetLoadCoroutine); yield return null; args.ReportProgress(1f); } private IEnumerator InitializeAssetsAndLang() { ParallelCoroutine parallelProgressCoroutine = ParallelCoroutine.RequestFromPool(); parallelProgressCoroutine.Add(TO30Assets.Initialize()); parallelProgressCoroutine.Add(LanguageFileLoader.AddLanguageFilesFromModAsync((BaseUnityPlugin)(object)TO30Main.instance, "languages")); while (!parallelProgressCoroutine.isDone) { yield return null; } ParallelCoroutine.ReturnToPool(parallelProgressCoroutine); } private IEnumerator PopulateContentPack() { ParallelCoroutine parallelLoadCoroutine = ParallelCoroutine.RequestFromPool(); using TO30AssetRequest<SkillDef> skillRequest = TO30Assets.LoadAllAssetsAsync<SkillDef>(); parallelLoadCoroutine.Add((IEnumerator)skillRequest); while (!parallelLoadCoroutine.isDone) { yield return null; } ParallelCoroutine.ReturnToPool(parallelLoadCoroutine); _contentPack.skillDefs.Add(skillRequest.assets); Type[] types = GetType().Assembly.GetTypes(); List<Type> list = new List<Type>(); Type[] array = types; foreach (Type type in array) { if (MSUtil.IsSameOrSubclassOf(type, typeof(EntityState)) && !type.IsAbstract) { list.Add(type); } } _contentPack.entityStateTypes.Add(list.ToArray()); } private IEnumerator PopulateVariantPack() { TO30Log.Info("Adding Variants", 188, "PopulateVariantPack"); using (TO30AssetRequest<CharacterVariantDef> variantDefsRequest = TO30Assets.LoadAllAssetsAsync<CharacterVariantDef>()) { using TO30AssetRequest<Sprite> spriteRequest = TO30Assets.LoadAssetAsync<Sprite>("texPackEnabledIcon"); ParallelCoroutine parallelCoroutine = ParallelCoroutine.RequestFromPool(); parallelCoroutine.Add((IEnumerator)variantDefsRequest); parallelCoroutine.Add((IEnumerator)spriteRequest); while (!parallelCoroutine.isDone) { yield return null; } ParallelCoroutine.ReturnToPool(parallelCoroutine); _variantPack = new VariantPack("com.Nebby.TO30", "TO30_VARIANTPACK_NAME", "TO30_VARIANPACK_TOOLTIP", "TO30_VARIANTPACK_DESC", spriteRequest.asset, (BaseUnityPlugin)(object)TO30Main.instance, ((BaseUnityPlugin)TO30Main.instance).Config, ((BaseUnityPlugin)TO30Main.instance).Config, false); _variantPack.characterVariantDefs.Add(variantDefsRequest.assets); ConfiguredBool val = CreateConfiguredBoolForPackOption("Enable Ally Variants", "Enables \"Ally\" Variants for the main allied enemy bodies in the game. Devoted Lemurians may spawn as Flamethrower Devoted Lemurians for example.", delegate(bool b) { //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_002b: Unknown result type (might be due to invalid IL or missing references) foreach (CharacterVariantDef dependantSpawnAllyDef in _dependantSpawnAllyDefs) { VariantDependantCondition val6 = (VariantDependantCondition)(object)dependantSpawnAllyDef.spawnCondition; val6.cannotSpawn = !b; dependantSpawnAllyDef.spawnCondition = (IVariantSpawnCondition)(object)val6; } }); ConfiguredBool val2 = CreateConfiguredBoolForPackOption("Enable Polymorph Lemurian Variants", "Enables \"Polymorph Lemurian\" Variants. Starting the Polymoprh Lemurian quest may spawn you as a Flamethrower Lemurian for example", delegate(bool b) { //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_002b: Unknown result type (might be due to invalid IL or missing references) foreach (CharacterVariantDef dependantSpawnPolymorphDef in _dependantSpawnPolymorphDefs) { VariantDependantCondition val6 = (VariantDependantCondition)(object)dependantSpawnPolymorphDef.spawnCondition; val6.cannotSpawn = !b; dependantSpawnPolymorphDef.spawnCondition = (IVariantSpawnCondition)(object)val6; } }); ConfiguredBool val3 = CreateConfiguredBoolForPackOption("Enable Artifact of Soul Wisp Variants", "Enables \"Lesser Wisp Soul\" Variants. Playing with the Artifact of Soul enabled may spawn an Infernal Lesser Wisp Soul for example", delegate(bool b) { //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_002b: Unknown result type (might be due to invalid IL or missing references) foreach (CharacterVariantDef dependantSpawnSoulDef in _dependantSpawnSoulDefs) { VariantDependantCondition val6 = (VariantDependantCondition)(object)dependantSpawnSoulDef.spawnCondition; val6.cannotSpawn = !b; dependantSpawnSoulDef.spawnCondition = (IVariantSpawnCondition)(object)val6; } }); ConfiguredBool val4 = CreateConfiguredBoolForPackOption("Enable Twisted Scavenger Variants", "Enables \"Twisted Scavenger\" Variants. Reaching \"A Moment, Whole\" may spawn a Dream Twisted Scavenger for example", delegate(bool b) { //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_002b: Unknown result type (might be due to invalid IL or missing references) foreach (CharacterVariantDef dependantSpawnTwistedScavDef in _dependantSpawnTwistedScavDefs) { VariantDependantCondition val6 = (VariantDependantCondition)(object)dependantSpawnTwistedScavDef.spawnCondition; val6.cannotSpawn = !b; dependantSpawnTwistedScavDef.spawnCondition = (IVariantSpawnCondition)(object)val6; } }); ConfiguredBool val5 = CreateConfiguredBoolForPackOption("Enable Sanctum Scavenger Variants", "Enables \"Sanctum Scavenger\" Variants. Hitting all Sconces in \"Lurid Basilica\" may spawn a Dream Sanctum Scavenger for example", delegate(bool b) { //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_002b: Unknown result type (might be due to invalid IL or missing references) foreach (CharacterVariantDef dependantSpawnSanctumScavDef in _dependantSpawnSanctumScavDefs) { VariantDependantCondition val6 = (VariantDependantCondition)(object)dependantSpawnSanctumScavDef.spawnCondition; val6.cannotSpawn = !b; dependantSpawnSanctumScavDef.spawnCondition = (IVariantSpawnCondition)(object)val6; } }); parallelCoroutine = ParallelCoroutine.RequestFromPool(); parallelCoroutine.Add(AddAllyVariants(ConfiguredVariable<bool>.op_Implicit((ConfiguredVariable<bool>)(object)val))); parallelCoroutine.Add(AddPolymorphLemurianVariants(ConfiguredVariable<bool>.op_Implicit((ConfiguredVariable<bool>)(object)val2))); parallelCoroutine.Add(AddArtifactOfSoulWispVariants(ConfiguredVariable<bool>.op_Implicit((ConfiguredVariable<bool>)(object)val3))); parallelCoroutine.Add(AddTwistedScavVariants(ConfiguredVariable<bool>.op_Implicit((ConfiguredVariable<bool>)(object)val4))); parallelCoroutine.Add(AddSanctumScavVariants(ConfiguredVariable<bool>.op_Implicit((ConfiguredVariable<bool>)(object)val5))); while (!parallelCoroutine.isDone) { yield return null; } ParallelCoroutine.ReturnToPool(parallelCoroutine); } static ConfiguredBool CreateConfiguredBoolForPackOption(string key, string desc, OnConfigChangedDelegate<bool> onConfigChanged) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return new ConfiguredBool(true).WithModGUID((BaseUnityPlugin)(object)TO30Main.instance).WithModName((BaseUnityPlugin)(object)TO30Main.instance).WithConfigFile(((BaseUnityPlugin)TO30Main.instance).Config) .WithSection("General") .WithKey(key) .WithDescription(desc) .WithConfigChange(onConfigChanged) .DoConfigure(); } } private static IEnumerator AddAllyVariants(bool canSpawn) { TO30Log.Info("Adding Ally Variants", 288, "AddAllyVariants"); using TO30AssetRequest<AssetCollection> beetleGuardCollection = TO30Assets.LoadAssetAsync<AssetCollection>("acBeetleGuardVariants"); using TO30AssetRequest<AssetCollection> elderLemurianCollection = TO30Assets.LoadAssetAsync<AssetCollection>("acElderLemurianVariants"); using TO30AssetRequest<AssetCollection> lemurianCollection = TO30Assets.LoadAssetAsync<AssetCollection>("acLemurianVariants"); ParallelCoroutine parallelCoroutine = ParallelCoroutine.RequestFromPool(); parallelCoroutine.Add((IEnumerator)beetleGuardCollection); parallelCoroutine.Add((IEnumerator)elderLemurianCollection); parallelCoroutine.Add((IEnumerator)lemurianCollection); while (!parallelCoroutine.isDone) { yield return null; } ParallelCoroutine.ReturnToPool(parallelCoroutine); CharacterVariantDef[] array = ContentUtil.FindAssets<CharacterVariantDef>(beetleGuardCollection.asset); foreach (CharacterVariantDef val in array) { CharacterVariantDef val2 = VariantCloning.CloneIntoBeetleGuardGland(val, true, true); if (!Object.op_Implicit((Object)(object)val2)) { TO30Log.Error($"Failed to clone {val} into a BeetleGuardAlly clone.", 310, "AddAllyVariants"); continue; } if (val2.spawnCondition is VariantDependantCondition val3) { val3.cannotSpawn = !canSpawn; val2.spawnCondition = (IVariantSpawnCondition)(object)val3; _dependantSpawnAllyDefs.Add(val2); } ContentUtil.AddSingle<CharacterVariantDef>(_variantPack.characterVariantDefs, val2); } array = ContentUtil.FindAssets<CharacterVariantDef>(elderLemurianCollection.asset); foreach (CharacterVariantDef val4 in array) { CharacterVariantDef val5 = VariantCloning.CloneIntoDevotedLemurianBruiser(val4, true, true); if (!Object.op_Implicit((Object)(object)val5)) { TO30Log.Error($"Failed to clone {val4} into a DevotedLemurianBruiser clone.", 329, "AddAllyVariants"); continue; } if (val5.spawnCondition is VariantDependantCondition val6) { val6.cannotSpawn = !canSpawn; val5.spawnCondition = (IVariantSpawnCondition)(object)val6; _dependantSpawnAllyDefs.Add(val5); } ContentUtil.AddSingle<CharacterVariantDef>(_variantPack.characterVariantDefs, val5); } array = ContentUtil.FindAssets<CharacterVariantDef>(lemurianCollection.asset); foreach (CharacterVariantDef val7 in array) { CharacterVariantDef val8 = VariantCloning.CloneIntoDevotedLemurian(val7, true, true); if (!Object.op_Implicit((Object)(object)val8)) { TO30Log.Error($"Failed to clone {val7} into a DevotedLemurian clone.", 347, "AddAllyVariants"); continue; } if (val8.spawnCondition is VariantDependantCondition val9) { val9.cannotSpawn = !canSpawn; val8.spawnCondition = (IVariantSpawnCondition)(object)val9; _dependantSpawnAllyDefs.Add(val8); } ContentUtil.AddSingle<CharacterVariantDef>(_variantPack.characterVariantDefs, val8); } } private static IEnumerator AddPolymorphLemurianVariants(bool canSpawn) { TO30Log.Info("Adding Polymorph Lemurian Variants", 364, "AddPolymorphLemurianVariants"); using TO30AssetRequest<AssetCollection> lemurianCollection = TO30Assets.LoadAssetAsync<AssetCollection>("acLemurianVariants"); while (!lemurianCollection.isComplete) { yield return null; } CharacterVariantDef[] array = ContentUtil.FindAssets<CharacterVariantDef>(lemurianCollection.asset); foreach (CharacterVariantDef val in array) { CharacterVariantDef val2 = VariantCloning.CloneIntoLemurianPolymorph(val, true, true); if (!Object.op_Implicit((Object)(object)val2)) { TO30Log.Error($"Failed to clone {val} into a LemurianPolymorph clone.", 378, "AddPolymorphLemurianVariants"); continue; } if (val2.spawnCondition is VariantDependantCondition val3) { val3.cannotSpawn = !canSpawn; val2.spawnCondition = (IVariantSpawnCondition)(object)val3; _dependantSpawnPolymorphDefs.Add(val2); } ContentUtil.AddSingle<CharacterVariantDef>(_variantPack.characterVariantDefs, val2); } } private static IEnumerator AddArtifactOfSoulWispVariants(bool canSpawn) { TO30Log.Info("Adding Artifact of Soul Wisp Variants", 395, "AddArtifactOfSoulWispVariants"); using TO30AssetRequest<AssetCollection> lesserWispCollection = TO30Assets.LoadAssetAsync<AssetCollection>("acLesserWispVariants"); while (!lesserWispCollection.isComplete) { yield return null; } CharacterVariantDef[] array = ContentUtil.FindAssets<CharacterVariantDef>(lesserWispCollection.asset); foreach (CharacterVariantDef val in array) { CharacterVariantDef val2 = VariantCloning.CloneIntoWispSoul(val, true, true); if (!Object.op_Implicit((Object)(object)val2)) { TO30Log.Error($"Failed to clone {val} into a Lesser Wisp Soul clone.", 409, "AddArtifactOfSoulWispVariants"); continue; } if (val2.spawnCondition is VariantDependantCondition val3) { val3.cannotSpawn = !canSpawn; val2.spawnCondition = (IVariantSpawnCondition)(object)val3; _dependantSpawnSoulDefs.Add(val2); } ContentUtil.AddSingle<CharacterVariantDef>(_variantPack.characterVariantDefs, val2); } } private static IEnumerator AddTwistedScavVariants(bool canSpawn) { TO30Log.Info("Adding Twisted Scavenger Variants", 426, "AddTwistedScavVariants"); using TO30AssetRequest<AssetCollection> scavengerCollection = TO30Assets.LoadAssetAsync<AssetCollection>("acScavengerVariants"); while (!scavengerCollection.isComplete) { yield return null; } CharacterVariantDef[] array = ContentUtil.FindAssets<CharacterVariantDef>(scavengerCollection.asset); foreach (CharacterVariantDef val in array) { CharacterVariantDef[] array2 = VariantCloning.CloneIntoLunarScavs(val, true, true); if (array2.Length == 0) { TO30Log.Error($"Failed to clone {val} into twisted scavenger clones.", 441, "AddTwistedScavVariants"); continue; } CharacterVariantDef[] array3 = array2; foreach (CharacterVariantDef val2 in array3) { if (val2.spawnCondition is VariantDependantCondition val3) { val3.cannotSpawn = !canSpawn; val2.spawnCondition = (IVariantSpawnCondition)(object)val3; _dependantSpawnTwistedScavDefs.Add(val2); } } _variantPack.characterVariantDefs.Add(array2); } } private static IEnumerator AddSanctumScavVariants(bool canSpawn) { TO30Log.Info("Adding Sanctum Scavenger Variants", 461, "AddSanctumScavVariants"); using TO30AssetRequest<AssetCollection> scavengerCollection = TO30Assets.LoadAssetAsync<AssetCollection>("acScavengerVariants"); while (!scavengerCollection.isComplete) { yield return null; } CharacterVariantDef[] array = ContentUtil.FindAssets<CharacterVariantDef>(scavengerCollection.asset); foreach (CharacterVariantDef val in array) { CharacterVariantDef[] array2 = VariantCloning.CloneIntoSanctumScavs(val, true, true); if (array2.Length == 0) { TO30Log.Error($"Failed to clone {val} into sanctum scavenger clones.", 476, "AddSanctumScavVariants"); continue; } CharacterVariantDef[] array3 = array2; foreach (CharacterVariantDef val2 in array3) { if (val2.spawnCondition is VariantDependantCondition val3) { val3.cannotSpawn = !canSpawn; val2.spawnCondition = (IVariantSpawnCondition)(object)val3; _dependantSpawnTwistedScavDefs.Add(val2); } } _variantPack.characterVariantDefs.Add(array2); } } private void AddSelf(AddContentPackProviderDelegate addContentPackProviderDelegate) { addContentPackProviderDelegate.Invoke((IContentPackProvider)(object)this); } internal TO30Content() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(AddSelf); } } internal class TO30Log { private static ManualLogSource logger; public static void Fatal(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { Log((LogLevel)1, data, i, member); } public static void Error(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { Log((LogLevel)2, data, i, member); } public static void Warning(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { Log((LogLevel)4, data, i, member); } public static void Message(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { Log((LogLevel)8, data, i, member); } public static void Info(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { Log((LogLevel)16, data, i, member); } public static void Debug(object data, [CallerLineNumber] int i = 0, [CallerMemberName] string member = "") { Log((LogLevel)32, data, i, member); } private static void Log(LogLevel level, object data, int i, string member) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) LogRuntime(level, data, i, member); } private static void LogEditor(LogLevel level, object data, int i, string member) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Invalid comparison between Unknown and I4 //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 if ((int)level <= 4) { if (level - 1 > 1) { if ((int)level == 4) { Debug.LogWarning((object)Format(data, i, member)); } } else { Debug.LogError((object)Format(data, i, member)); } } else if ((int)level == 8 || (int)level == 16 || (int)level == 32) { Debug.Log((object)Format(data, i, member)); } } private static void LogRuntime(LogLevel level, object data, int i, string member) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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) object obj = ((((Enum)level).HasFlag((Enum)(object)(LogLevel)4) || ((Enum)level).HasFlag((Enum)(object)(LogLevel)2) || ((Enum)level).HasFlag((Enum)(object)(LogLevel)1)) ? Format(data, i, member) : data); logger.Log(level, obj); } public static string Format(object data, int i, string member) { return $"{data} | Line={i} : Member={member}"; } internal TO30Log(ManualLogSource logger_) { logger = logger_; } } [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Nebby.TO30", "The Original 30", "2.2.1")] public class TO30Main : BaseUnityPlugin { public const string GUID = "com.Nebby.TO30"; public const string MODNAME = "The Original 30"; public const string VERSION = "2.2.1"; public static TO30Main instance { get; private set; } private void Awake() { instance = this; new TO30Log(((BaseUnityPlugin)this).Logger); new TO30Config((BaseUnityPlugin)(object)this); new TO30Content(); LoadingScreenFix.AddSpriteAnimations(TO30Assets.GetLoadingScreenBundle()); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(AddSpectralSummons)); } private void AddSpectralSummons() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) SpectralJellyfishSpawnRandomLesserEnemyVariantOnDeath.AddMaster(MasterCatalog.FindMasterIndex("BeetleMaster")); SpectralJellyfishSpawnRandomLesserEnemyVariantOnDeath.AddMaster(MasterCatalog.FindMasterIndex("ImpMaster")); SpectralJellyfishSpawnRandomLesserEnemyVariantOnDeath.AddMaster(MasterCatalog.FindMasterIndex("LemurianMaster")); SpectralJellyfishSpawnRandomLesserEnemyVariantOnDeath.AddMaster(MasterCatalog.FindMasterIndex("WispMaster")); } } } namespace TO30.Components { [AddComponentMenu("")] [TargetComponentObject(/*Could not decode attribute arguments.*/)] public class MOAJSpawnJelliesOnDeath : VariantComponent, IOnKilledServerReceiver { public int jellyCount = 5; public CharacterBody characterBody { get; private set; } public DeathRewards deathRewards { get; private set; } public CharacterBodyVariantController variantBodyController { get; private set; } private void Awake() { characterBody = ((Component)this).GetComponent<CharacterBody>(); deathRewards = ((Component)this).GetComponent<DeathRewards>(); variantBodyController = ((Component)this).GetComponent<CharacterBodyVariantController>(); } public void OnKilledServer(DamageReport damageReport) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_006a: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) GameObje