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 PrimordialMithrix v0.2.0
PrimordialMithrix.dll
Decompiled 8 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.BrotherMonster; using EntityStates.BrotherMonster.Weapon; using EntityStates.BrotherMonster.Weapon.LunarGolem; using EntityStates.GolemMonster; using EntityStates.LunarExploderMonster; using EntityStates.Missions.BrotherEncounter; using EntityStates.NewtMonster; using HG; using HarmonyLib; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using On.RoR2; using PrimordialMithrix.Changes; using PrimordialMithrix.Modules; using R2API; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.AsyncManagement; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.EntityLogic; using RoR2.ExpansionManagement; using RoR2.Karma; using RoR2.Orbs; using RoR2.PostProcessing; using RoR2.Projectile; using RoR2.Skills; using RoR2BepInExPack.GameAssetPathsBetter; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("RoR2")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("PrimordialMithrix")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("PrimordialMithrix")] [assembly: AssemblyTitle("PrimordialMithrix")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace PrimordialMithrix { internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [BepInPlugin("com.Bloonjitsu7.PrimordialMithrix", "PrimordialMithrix", "0.2.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class PrimordialMithrixPlugin : BaseUnityPlugin { public static PluginInfo PInfo { get; private set; } public void Awake() { PInfo = ((BaseUnityPlugin)this).Info; Log.Init(((BaseUnityPlugin)this).Logger); new ContentPacks().Initialize(); Config.cfg = ((BaseUnityPlugin)this).Config; Config.SetupConfig(); new Main().Initialize(); } } public static class Config { public static ConfigFile cfg; public static void SetupConfig() { } } } namespace PrimordialMithrix.Modules { public static class DamageTypes { public static ModdedDamageType damagePrimordialMithrix = DamageAPI.ReserveDamageType(); } public static class Utils { public static List<MethodInfo> GetAnonymousMethods(Type t, string methodName) { List<MethodInfo> list = new List<MethodInfo>(); Type[] nestedTypes = t.GetNestedTypes((BindingFlags)(-1)); Type[] array = nestedTypes; foreach (Type type in array) { if (!type.Name.Contains("<>")) { continue; } MethodInfo[] methods = type.GetMethods((BindingFlags)(-1)); foreach (MethodInfo methodInfo in methods) { if (methodInfo.Name.Contains(methodName)) { list.Add(methodInfo); } } } MethodInfo[] methods2 = t.GetMethods((BindingFlags)(-1)); foreach (MethodInfo methodInfo2 in methods2) { if (methodInfo2.Name.Contains("<") && methodInfo2.Name.Contains(methodName)) { list.Add(methodInfo2); } } return list.OrderBy((MethodInfo m) => m.Name).ToList(); } public static void DumpComponents(GameObject gameObject) { Component[] componentsInChildren = gameObject.GetComponentsInChildren(typeof(Component)); foreach (Component data in componentsInChildren) { Log.Message(data); } } public static string GetStackDesc(float num, string type) { if (num > 0f) { return $" <style=cStack>(+{num}{type} per stack)</style>"; } if (num < 0f) { return $" <style=cStack>({num}{type} per stack)</style>"; } return ""; } public static void OrigOnEnter(BaseState self) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { self.attackSpeedStat = ((EntityState)self).characterBody.attackSpeed; self.damageStat = ((EntityState)self).characterBody.damage; self.critStat = ((EntityState)self).characterBody.crit; self.moveSpeedStat = ((EntityState)self).characterBody.moveSpeed; } } public static float GetStackedStats(float baseStat, float stackStat, int itemCount) { return baseStat - stackStat + stackStat * (float)itemCount; } public static int GetStackedStatsInt(int baseStat, int stackStat, int itemCount) { return baseStat - stackStat + stackStat * itemCount; } public static float ConvertReductionIntoStackingDivision(float baseFraction, int itemCount) { float num = 1f - baseFraction; float num2 = (1f + num) / num - 2f; num2 *= (float)(itemCount - 1); return num2 + 1f; } public static void AddDecayingBuff(CharacterBody body, BuffIndex buffIndex, float duration, float decayRate, int maxStacks = int.MaxValue) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (!((Object)(object)body != (Object)null)) { return; } if (body.GetBuffCount(buffIndex) < maxStacks) { body.AddTimedBuff(buffIndex, duration); } int num = 0; foreach (TimedBuff timedBuff in body.timedBuffs) { if (timedBuff.buffIndex == buffIndex) { timedBuff.totalDuration = duration + decayRate * (float)num; timedBuff.timer = duration + decayRate * (float)num; num++; } } } public static T GetOrAddComponent<T>(this GameObject gameObject) where T : Component { T val = gameObject.GetComponent<T>(); if ((Object)(object)val == (Object)null) { val = gameObject.AddComponent<T>(); } return val; } } public static class Assets { public static AssetBundle mainBundle; public const string bundleName = "PrimordialMithrixAssets.bundle"; public const string assetBundleFolder = "assetbundles"; public static string AssetBundlePath => Path.Combine(Path.GetDirectoryName(PrimordialMithrixPlugin.PInfo.Location), "PrimordialMithrixAssets.bundle"); public static string AssetString => "Assets/PrimordialMithrixAssets/"; public static void Init() { mainBundle = AssetBundle.LoadFromFile(AssetBundlePath); } } public static class Projectiles { public static GameObject flamePillarMovingPrefab; public static GameObject hammerFirePrefab; public static GameObject hurtSpikePrefab; public static GameObject shockwaveCrawlerLeft; public static GameObject shockwaveCrawlerRight; public static GameObject fistCrystalWavePrefab; public static GameObject fireRingCrystalPrefab; internal static List<GameObject> projectilePrefabs = new List<GameObject>(); public static void RegisterProjectiles() { SetupFlamePillarMoving(); projectilePrefabs.Add(flamePillarMovingPrefab); SetupHammerFire(); projectilePrefabs.Add(hammerFirePrefab); SetupHurtSpike(); projectilePrefabs.Add(hurtSpikePrefab); SetupShockwaveCrawlers(); projectilePrefabs.Add(shockwaveCrawlerLeft); projectilePrefabs.Add(shockwaveCrawlerRight); SetupFistCrystalWave(); projectilePrefabs.Add(fistCrystalWavePrefab); SetupFireRingCrystal(); projectilePrefabs.Add(fireRingCrystalPrefab); } private static void SetupFireRingCrystal() { //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) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother_Karma.KarmaSpikeCrawler__XXSmall__Spiraling_prefab).WaitForCompletion(), "BloonMithrixFireRingCrystalPrefab", true); ProjectileFireChildren component = val.GetComponent<ProjectileFireChildren>(); component.count -= 3; component.duration += 0.5f; RotateAroundAxis component2 = val.GetComponent<RotateAroundAxis>(); component2.reverse = true; component2.slowRotationSpeed *= 1.25f; fireRingCrystalPrefab = val; } private static void SetupFistCrystalWave() { //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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherSunderWave__Energized_prefab).WaitForCompletion(), "BloonMithrixFistCrystalWave", true); ProjectileFireChildren component = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother_Karma.KarmaSpikeCrawler__XXSmall__Spiraling_prefab).WaitForCompletion().GetComponent<ProjectileFireChildren>(); ProjectileFireChildren val2 = val.AddComponent<ProjectileFireChildren>(); val2.alignChildWithOverrideSpawn = component.alignChildWithOverrideSpawn; val2.childDamageCoefficient = 0.6f; val2.childProjectilePrefab = component.childProjectilePrefab; val2.childProcCoefficient = component.childProcCoefficient; val2.count = component.count + 3; val2.duration = component.duration * (float)(val2.count / component.count); val2.doNotDestroyOnDuration = true; val2.ignoreParentForChainController = component.ignoreParentForChainController; val2.spawnEffect = component.spawnEffect; val2.useSeparateDurationForFiring = false; val2.useIdentityRotationForSpawnEffect = component.useIdentityRotationForSpawnEffect; fistCrystalWavePrefab = val; } private static void SetupShockwaveCrawlers() { //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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother_Karma.LunarCrawlerLeft_prefab).WaitForCompletion(), "BloonMithrixShockwaveCrawlerLeft", true); Object.DestroyImmediate((Object)(object)val.GetComponent<ProjectileCharacterController>()); Object.DestroyImmediate((Object)(object)val.GetComponent<CharacterController>()); Object.DestroyImmediate((Object)(object)val.GetComponent<RotateAroundAxis>()); ProjectileController component = val.GetComponent<ProjectileController>(); component.ghostPrefab = Effects.crawlerGhostPrefab; component.ghostPrefabAddress = null; ProjectileDotZone component2 = val.GetComponent<ProjectileDotZone>(); component2.damageCoefficient = 1f; component2.fireFrequency = 20f; component2.resetFrequency = 2f; component2.overlapProcCoefficient = 0.5f; component2.lifetime = 5f; component2.impactEffect = null; Main.ProjectileShockwaveRotationController projectileShockwaveRotationController = val.AddComponent<Main.ProjectileShockwaveRotationController>(); projectileShockwaveRotationController.rotationSpeed = -20f; projectileShockwaveRotationController.velocity = 60f; projectileShockwaveRotationController.lifetime = 5f; shockwaveCrawlerLeft = val; GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother_Karma.LunarCrawlerRight_prefab).WaitForCompletion(), "BloonMithrixShockwaveCrawlerRight", true); Object.DestroyImmediate((Object)(object)val2.GetComponent<ProjectileCharacterController>()); Object.DestroyImmediate((Object)(object)val2.GetComponent<CharacterController>()); Object.DestroyImmediate((Object)(object)val2.GetComponent<RotateAroundAxis>()); ProjectileController component3 = val2.GetComponent<ProjectileController>(); component3.ghostPrefab = Effects.crawlerGhostPrefab; component3.ghostPrefabAddress = null; ProjectileDotZone component4 = val2.GetComponent<ProjectileDotZone>(); component4.damageCoefficient = 1f; component4.fireFrequency = 20f; component4.resetFrequency = 2f; component4.overlapProcCoefficient = 0.5f; component4.lifetime = 5f; component4.impactEffect = null; Main.ProjectileShockwaveRotationController projectileShockwaveRotationController2 = val2.AddComponent<Main.ProjectileShockwaveRotationController>(); projectileShockwaveRotationController2.rotationSpeed = 20f; projectileShockwaveRotationController2.velocity = 60f; projectileShockwaveRotationController2.lifetime = 5f; shockwaveCrawlerRight = val2; } private static void SetupFlamePillarMoving() { //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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSonBoss/FalseSonFissurePillar.prefab").WaitForCompletion(), "BloonMithrixFlamePillarMoving", true); ProjectileController component = val.GetComponent<ProjectileController>(); component.ghostPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Brother/BrotherFirePillarGhost.prefab").WaitForCompletion(); component.ghostPrefabAddress = null; ProjectileDotZone component2 = val.GetComponent<ProjectileDotZone>(); component2.damageCoefficient = 1f; component2.fireFrequency = 20f; component2.resetFrequency = 3f; component2.overlapProcCoefficient = 0.5f; flamePillarMovingPrefab = val; } private static void SetupHammerFire() { //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_0026: 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) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_LunarExploder.LunarExploderProjectileDotZone_prefab).WaitForCompletion(), "BloonMithrixHammerFirePool", true); Transform transform = val.transform; transform.localScale *= 1.25f; ProjectileDotZone component = val.GetComponent<ProjectileDotZone>(); component.damageCoefficient = 1f; component.fireFrequency = 10f; component.resetFrequency = 2f; component.overlapProcCoefficient = 0.5f; component.lifetime = 60f; hammerFirePrefab = val; } private static void SetupHurtSpike() { //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_0026: 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) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.LunarShardProjectile_prefab).WaitForCompletion(), "BloonMithrixHurtSpike", true); Transform transform = val.transform; transform.localScale *= 1.25f; hurtSpikePrefab = val; } private static void InitializeImpactExplosion(ProjectileImpactExplosion projectileImpactExplosion) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) ((ProjectileExplosion)projectileImpactExplosion).blastDamageCoefficient = 1f; ((ProjectileExplosion)projectileImpactExplosion).blastProcCoefficient = 1f; ((ProjectileExplosion)projectileImpactExplosion).blastRadius = 1f; ((ProjectileExplosion)projectileImpactExplosion).bonusBlastForce = Vector3.zero; ((ProjectileExplosion)projectileImpactExplosion).childrenCount = 0; ((ProjectileExplosion)projectileImpactExplosion).childrenDamageCoefficient = 0f; ((ProjectileExplosion)projectileImpactExplosion).childrenProjectilePrefab = null; projectileImpactExplosion.destroyOnEnemy = true; projectileImpactExplosion.destroyOnWorld = true; projectileImpactExplosion.detonateOnEnemy = true; projectileImpactExplosion.impactOnWorld = true; ((ProjectileExplosion)projectileImpactExplosion).falloffModel = (FalloffModel)0; ((ProjectileExplosion)projectileImpactExplosion).fireChildren = false; projectileImpactExplosion.lifetime = 0f; projectileImpactExplosion.lifetimeAfterImpact = 0f; projectileImpactExplosion.lifetimeRandomOffset = 0f; projectileImpactExplosion.offsetForLifetimeExpiredSound = 0f; projectileImpactExplosion.timerAfterImpact = false; ((Component)projectileImpactExplosion).GetComponent<ProjectileDamage>().damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1); } } public static class Buffs { public static BuffDef GravityDebuff; public static BuffDef GravityIntenseDebuff; public static BuffDef CrippleFogDebuff; public static BuffDef FireWaveBuff; private static Sprite gravityIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Treebot.texBuffWeakIcon_tif).WaitForCompletion(); private static Sprite crippleIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Common.texBuffCrippleIcon_tif).WaitForCompletion(); internal static List<BuffDef> buffDefs = new List<BuffDef>(); public static void CreateBuffs() { //IL_001f: 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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) GravityDebuff = AddNewBuff("BloonMithrixGravityDebuff", gravityIcon, new Color(0.3f, 0.2f, 1f, 1f), canStack: false, isDebuff: true, isCooldown: false, isHidden: false, ignoreNectar: false, isPercent: false, isDOT: false, (Flags)0); GravityIntenseDebuff = AddNewBuff("BloonMithrixGravityIntenseDebuff", gravityIcon, new Color(0.3f, 0.2f, 1f, 1f), canStack: false, isDebuff: true, isCooldown: false, isHidden: false, ignoreNectar: false, isPercent: false, isDOT: false, (Flags)0); CrippleFogDebuff = AddNewBuff("BloonCrippleFogDebuff", crippleIcon, new Color(0.3f, 0.3f, 1f, 1f), canStack: false, isDebuff: true, isCooldown: false, isHidden: false, ignoreNectar: false, isPercent: false, isDOT: false, (Flags)0); FireWaveBuff = AddNewBuff("BloonFireWaveBuff", crippleIcon, new Color(0.3f, 0.3f, 1f, 1f), canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreNectar: false, isPercent: false, isDOT: false, (Flags)0); } internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack = false, bool isDebuff = false, bool isCooldown = false, bool isHidden = false, bool ignoreNectar = false, bool isPercent = false, bool isDOT = false, Flags buffFlag = (Flags)0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_005c: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance<BuffDef>(); ((Object)val).name = buffName; val.buffColor = buffColor; val.canStack = canStack; val.isDebuff = isDebuff; val.eliteDef = null; val.iconSprite = buffIcon; val.isCooldown = isCooldown; val.isHidden = isHidden; val.ignoreGrowthNectar = ignoreNectar; val.flags = buffFlag; val.stackingDisplayMethod = (StackingDisplayMethod)(isPercent ? 1 : 0); val.isDOT = isDOT; buffDefs.Add(val); return val; } } public static class Effects { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static EffectCondition <>9__13_0; internal bool <CreateGravityIntenseEffect>b__13_0(CharacterBody body) { return body.HasBuff(Buffs.GravityIntenseDebuff); } } public static GameObject hammerBlastPrefab; public static GameObject pillarWarningEffect; public static GameObject gravityImpactEffect; public static GameObject gravityCleanseEffect; public static GameObject gravityOrbEffect; public static GameObject gravityOrbArrivalEffect; public static GameObject gravityIntenseEffect; public static GameObject fireWaveEffect; public static GameObject fireWaveEffect2; public static GameObject crawlerGhostPrefab; public static GameObject shockwaveEffect; public static GameObject golemLaserEffect = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC3_VultureHunter.VultureHunterAimLaser_prefab).WaitForCompletion(); public static List<EffectDef> effectDefs = new List<EffectDef>(); internal static void RegisterEffects() { hammerBlastPrefab = CreateHammerBlastEffect(); pillarWarningEffect = CreatePillarWarningEffect(); gravityImpactEffect = CreateGravityImpactEffect(); gravityCleanseEffect = CreateGravityCleanseEffect(); gravityOrbEffect = CreateGravityOrbEffect(); gravityOrbArrivalEffect = CreateGravityOrbArrivalEffect(); gravityIntenseEffect = CreateGravityIntenseEffect(); fireWaveEffect = CreateFireWaveEffect(); fireWaveEffect2 = CreateFireWaveEffect2(); crawlerGhostPrefab = CreateCrawlerGhost(); shockwaveEffect = CreateShockwaveEffect(); Utils.DumpComponents(golemLaserEffect); } private static GameObject CreateGravityIntenseEffect() { //IL_001f: 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_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_00ee: Expected O, but got Unknown //IL_00a3: 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) GameObject val = CloneObject(RoR2_DLC3_Items_TransferDebuffOnHit.TransferDebuffPassiveEffect_prefab, "BloonMithrixGravityIntenseEffect", new Color(0.6f, 0.7f, 1f, 1f), new Color(0.55f, 0.6f, 1f, 1f)); Transform val2 = val.transform.Find("Visuals"); if ((Object)(object)val2 != (Object)null) { Transform val3 = val2.Find("Gravity Bits"); if ((Object)(object)val3 != (Object)null) { Log.Message("Gravity Success!!"); ParticleSystem component = ((Component)val3).GetComponent<ParticleSystem>(); MainModule main = component.main; ((MainModule)(ref main)).simulationSpeed = ((MainModule)(ref main)).simulationSpeed * 1.35f; } } Utils.DumpComponents(val); val.GetOrAddComponent<TemporaryVisualEffect>(); object obj = <>c.<>9__13_0; if (obj == null) { EffectCondition val4 = (CharacterBody body) => body.HasBuff(Buffs.GravityIntenseDebuff); <>c.<>9__13_0 = val4; obj = (object)val4; } TempVisualEffectAPI.AddTemporaryVisualEffect(val, (EffectCondition)obj, false, ""); return val; } private static GameObject CreateShockwaveEffect() { //IL_001f: 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) return CloneObject(RoR2_Base_Common_VFX.OmniExplosionVFXSoft_prefab, "BloonMithrixShockwaveEffect", new Color(0.5f, 0.7f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 1f, 0f, colorMesh: true, "", parentToTransform: false, recolor: true, overrideEffect: true); } private static GameObject CreateCrawlerGhost() { //IL_001f: 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) GameObject val = CloneObject(RoR2_Base_Brother_Karma.LunarCrawlerGhost_prefab, "BloonMithrixCrawlerGhostPrefab", new Color(0.3f, 0.5f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 1f, 0f, colorMesh: true, "", parentToTransform: false, recolor: false); Transform val2 = val.transform.Find("Container"); if ((Object)(object)val2 != (Object)null) { Transform val3 = val2.Find("Dust"); if ((Object)(object)val3 != (Object)null) { Object.DestroyImmediate((Object)(object)((Component)val3).gameObject); } Transform val4 = ((Component)val2).transform.Find("Debris"); if ((Object)(object)val4 != (Object)null) { Object.DestroyImmediate((Object)(object)((Component)val4).gameObject); } } return val; } private static GameObject CreateFireWaveEffect2() { //IL_001f: 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) return CloneObject(RoR2_DLC2_Items_ExtraStatsOnLevelUp.ExtraStatsOnLevelUpEffect_prefab, "BloonMithrixFireWaveEffect2", new Color(0.5f, 0.7f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 1.25f, 0f, colorMesh: true, "Play_voidJailer_death", parentToTransform: false, recolor: true, overrideEffect: true); } private static GameObject CreateFireWaveEffect() { //IL_001f: 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) return CloneObject(RoR2_DLC2_Seeker.Meditate7thGateVFX_prefab, "BloonMithrixFireWaveEffect", new Color(0.5f, 0.7f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 0.75f, 0f, colorMesh: true, "Play_voidDevastator_spawn_close", parentToTransform: false, recolor: true, overrideEffect: true); } private static GameObject CreateGravityOrbArrivalEffect() { //IL_001f: 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) return CloneObject(RoR2_Base_Common_VFX.OmniImpactVFXLightning_prefab, "BloonMithrixGravityOrbArrivalEffect", new Color(0.5f, 0.7f, 1f, 1f), new Color(0.2f, 0.3f, 1f, 1f)); } private static GameObject CreateGravityOrbEffect() { //IL_001f: 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) return CloneObject(RoR2_Base_LunarSkillReplacements.LunarDetonatorOrbEffect_prefab, "BloonMithrixGravityOrbEffect", new Color(0.4f, 0.6f, 1f, 1f), new Color(0.4f, 0.6f, 1f, 1f), 2f); } private static GameObject CreateGravityCleanseEffect() { //IL_001f: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_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) GameObject val = CloneObject(RoR2_Base_Brother_Karma.LunarGolemDisappearFX_prefab, "BloonMithrixGravityCleanseEffect", new Color(0.3f, 0.5f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 0.5f, 0f, colorMesh: true, "Play_env_meridian_geode_cleanse_debuff", parentToTransform: false, recolor: true, overrideEffect: true); Transform transform = val.transform; transform.localScale *= 0.6f; Utils.DumpComponents(val); Object.DestroyImmediate((Object)(object)((Component)val.transform.Find("Motes, After Image")).gameObject); ParticleSystemRenderer[] componentsInChildren = val.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val2 in componentsInChildren) { val2.minParticleSize *= 0.5f; val2.maxParticleSize *= 0.5f; } ParticleSystem[] componentsInChildren2 = val.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val3 in componentsInChildren2) { MainModule main = val3.main; } val.AddComponent<Main.GravityCleanseEffectManager>(); return val; } private static GameObject CreateGravityCleanseEffectOld3() { //IL_001f: 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) return CloneObject(RoR2_Base_Medkit.MedkitHealEffect_prefab, "BloonMithrixGravityCleanseEffect", new Color(0.3f, 0.5f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 1f, 0f, colorMesh: true, "Play_env_meridian_geode_cleanse_debuff", parentToTransform: false, recolor: true, overrideEffect: true); } private static GameObject CreateGravityCleanseEffectOld2() { //IL_001f: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneObject(RoR2_Base_Common_VFX.LightningFlash_prefab, "BloonMithrixGravityCleanseEffect", new Color(0.3f, 0.5f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 1f, 0f, colorMesh: true, "Play_env_meridian_geode_cleanse_debuff", parentToTransform: false, recolor: true, overrideEffect: true); val.AddComponent<Main.GravityCleanseEffectManager>(); Transform transform = val.transform; transform.localScale *= 2f; DestroyOnTimer[] componentsInChildren = val.GetComponentsInChildren<DestroyOnTimer>(); foreach (DestroyOnTimer val2 in componentsInChildren) { val2.duration = 1.5f; } ParticleSystem component = val.GetComponent<ParticleSystem>(); MainModule main = component.main; MinMaxCurve startLifetime = default(MinMaxCurve); ((MinMaxCurve)(ref startLifetime)).mode = (ParticleSystemCurveMode)0; ((MinMaxCurve)(ref startLifetime)).constant = 0.6f; ((MainModule)(ref main)).startLifetime = startLifetime; return val; } private static GameObject CreateGravityCleanseEffectOld() { //IL_001f: 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_0075: 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_00d1: 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) GameObject val = CloneObject(RoR2_Base_moon2.MoonBatteryDesignPulse_prefab, "BloonMithrixGravityCleanseEffect", new Color(0.3f, 0.5f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 0.5f, 0f, colorMesh: true, "Play_env_meridian_geode_cleanse_debuff", parentToTransform: false, recolor: true, overrideEffect: true); GameObject val2 = CloneObject(RoR2_Base_moon2.MoonBatteryDesignPulse_prefab, "BloonMithrixGravityCleanseChildEffect", new Color(0.3f, 0.5f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f)); PulseController component = val.GetComponent<PulseController>(); component.finalRadius = 8f; component.duration = 1f; Transform transform = val.transform; transform.localScale *= 0.5f; return val; } private static GameObject CreateGravityImpactEffect() { //IL_001f: 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) return CloneObject(RoR2_Base_Bandit2.Bandit2ResetEffect_prefab, "BloonMithrixGravityImpactEffect", new Color(0f, 0f, 1f, 1f), new Color(0f, 0f, 1f, 1f), 1.5f); } private static GameObject CreatePillarWarningEffect() { //IL_001f: 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) GameObject val = CloneObject(RoR2_Base_Brother.BrotherRing_prefab, "BloonMithrixPillarWarningEffect", new Color(0f, 0.3f, 1f, 1f), new Color(0f, 0.3f, 1f, 1f), 1f, 0f, colorMesh: true, "", parentToTransform: false, recolor: false); DestroyOnTimer val2 = val.AddComponent<DestroyOnTimer>(); val2.duration = 0.5f; return val; } private static GameObject CreateHammerBlastEffect() { //IL_001f: 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) GameObject val = CloneObject(RoR2_Base_Brother.BrotherUltTubeGhost_prefab, "BloonMithrixHammerBlastEffect", new Color(0f, 0.3f, 1f, 1f), new Color(0f, 0.3f, 1f, 1f), 1f, 0f, colorMesh: true, "", parentToTransform: false, recolor: false); Object.DestroyImmediate((Object)(object)val.GetComponent<ProjectileGhostController>()); DestroyOnTimer component = val.GetComponent<DestroyOnTimer>(); Log.Message(component.duration); component.duration = 1f; DelayedEvent component2 = val.GetComponent<DelayedEvent>(); Log.Message(((object)component2.action).GetType()); Transform val2 = val.transform.Find("Size"); if ((Object)(object)val2 != (Object)null) { Transform val3 = val2.Find("IndicatorFX"); if ((Object)(object)val3 != (Object)null) { Object.DestroyImmediate((Object)(object)((Component)val3).gameObject); } Transform val4 = ((Component)val2).transform.Find("EarlySFX"); if ((Object)(object)val4 != (Object)null) { Log.Message("Success"); Object.DestroyImmediate((Object)(object)((Component)val4).gameObject); } } return val; } private static GameObject CreateHammerBlastEffectOld() { //IL_001f: 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) GameObject val = CloneObject(RoR2_Base_Brother.BrotherFirePillarGhost_prefab, "BloonMithrixHammerBlastEffect", new Color(0f, 0.3f, 1f, 1f), new Color(0f, 0.3f, 1f, 1f), 1f, 0f, colorMesh: true, "", parentToTransform: false, recolor: false); Object.DestroyImmediate((Object)(object)val.GetComponent<ProjectileGhostController>()); ProjectileScaleOverLifetime val2 = val.AddComponent<ProjectileScaleOverLifetime>(); val2.maxXScale = 5f; val2.maxZScale = 5f; val2.expandX = true; val2.expandZ = true; val2.scaleRate = 7.5f; DestroyOnTimer val3 = val.AddComponent<DestroyOnTimer>(); val3.duration = 0.75f; return val; } private static GameObject CreateTracer() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneTracer("RoR2/Base/Huntress/TracerHuntressSnipe.prefab", "TracerStormboundAurelioniteLaser", Color.red, new Color(1f, 0.04f, 0.04f, 1f), 2f); Object.Destroy((Object)(object)((Component)val.transform.Find("TracerHead")).gameObject); return val; } private static GameObject CloneObject(string originalObjectName, string newObjectName, Color color1, Color color2, float scaleMult = 1f, float colorTemp = 0f, bool colorMesh = true, string soundName = "", bool parentToTransform = false, bool recolor = true, bool overrideEffect = false, bool isTempVFX = false) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_0096: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)originalObjectName).WaitForCompletion(); if ((Object)(object)val == (Object)null) { Log.Warning(originalObjectName + " is null!"); return null; } GameObject val2 = PrefabAPI.InstantiateClone(val, newObjectName, false); if ((Object)(object)val2.GetComponent<EffectComponent>() == (Object)null) { val2.AddComponent<EffectComponent>(); } if ((Object)(object)val2.GetComponent<VFXAttributes>() == (Object)null) { val2.AddComponent<VFXAttributes>(); } val2.GetComponent<VFXAttributes>().vfxPriority = (VFXPriority)2; val2.GetComponent<VFXAttributes>().DoNotPool = true; if (recolor) { val2.Recolor(color1, color2, colorTemp, colorMesh); } if (scaleMult != 1f) { val2.Resize(scaleMult); } CreateEffectFromObject(val2, soundName, parentToTransform, overrideEffect); return val2; } private static GameObject CloneTracer(string originalTracerName, string newTracerName, Color color1, Color color2, float widthMult = 1f, float? speed = null, float? length = null) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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_0101: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)originalTracerName).WaitForCompletion(); if ((Object)(object)val == (Object)null) { Log.Warning(originalTracerName + " is null!"); return null; } GameObject val2 = PrefabAPI.InstantiateClone(val, newTracerName, false); if (!Object.op_Implicit((Object)(object)val2.GetComponent<EffectComponent>())) { val2.AddComponent<EffectComponent>(); } if (!Object.op_Implicit((Object)(object)val2.GetComponent<VFXAttributes>())) { val2.AddComponent<VFXAttributes>(); } val2.GetComponent<VFXAttributes>().vfxPriority = (VFXPriority)2; val2.GetComponent<VFXAttributes>().DoNotPool = true; if (!Object.op_Implicit((Object)(object)val2.GetComponent<NetworkIdentity>())) { val2.AddComponent<NetworkIdentity>(); } val2.GetComponent<Tracer>().speed = (speed.HasValue ? speed.Value : val2.GetComponent<Tracer>().speed); val2.GetComponent<Tracer>().length = (length.HasValue ? length.Value : val2.GetComponent<Tracer>().length); val2.Recolor(color1, color2, widthMult); CreateAndAddEffectDef(val2); return val2; } public static void Recolor(this GameObject thingToColor, Color color1, Color color2, float colorTemp = 0f, bool colorMesh = true) { //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_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) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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_004e: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Expected O, but got Unknown //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Expected O, but got Unknown //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_05da: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0634: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Unknown result type (might be due to invalid IL or missing references) bool flag = true; ParticleSystem[] componentsInChildren = thingToColor.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val in componentsInChildren) { MainModule main = val.main; ((MainModule)(ref main)).startColor = new MinMaxGradient(color1); TrailModule trails = val.trails; if (((TrailModule)(ref trails)).enabled) { Gradient val2 = new Gradient(); GradientColorKey[] array = (GradientColorKey[])(object)new GradientColorKey[2]; array[0].color = color1; array[0].time = 0f; array[1].color = color2; array[1].time = 1f; GradientAlphaKey[] array2 = (GradientAlphaKey[])(object)new GradientAlphaKey[2]; array2[0].alpha = color1.a; array2[0].time = 0f; array2[1].alpha = color2.a; array2[1].time = 1f; val2.SetKeys(array, array2); ((TrailModule)(ref trails)).colorOverLifetime = new MinMaxGradient(val2); } } Light[] componentsInChildren2 = thingToColor.GetComponentsInChildren<Light>(); foreach (Light val3 in componentsInChildren2) { if (colorTemp > 0f) { val3.colorTemperature = colorTemp; val3.useColorTemperature = true; } else { val3.useColorTemperature = false; } val3.color = color1; } ParticleSystemRenderer[] componentsInChildren3 = thingToColor.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val4 in componentsInChildren3) { Material[] materials = ((Renderer)val4).materials; foreach (Material val5 in materials) { val5.color = color1; val5.SetColor("_MainColor", color1); val5.SetColor("_Color", color1); val5.SetColor("_TintColor", color2); } ((Renderer)val4).material.color = color1; ((Renderer)val4).material.SetColor("_MainColor", color1); ((Renderer)val4).material.SetColor("_Color", color1); ((Renderer)val4).material.SetColor("_TintColor", color2); } LineRenderer[] componentsInChildren4 = thingToColor.GetComponentsInChildren<LineRenderer>(); foreach (LineRenderer val6 in componentsInChildren4) { Material[] materials2 = ((Renderer)val6).materials; foreach (Material val7 in materials2) { val7.color = color1; val7.SetColor("_MainColor", color1); val7.SetColor("_Color", color1); val7.SetColor("_TintColor", color2); } ((Renderer)val6).material.color = color1; ((Renderer)val6).material.SetColor("_MainColor", color1); ((Renderer)val6).material.SetColor("_Color", color1); ((Renderer)val6).material.SetColor("_TintColor", color2); Gradient val8 = new Gradient(); val8.colorKeys = (GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey { color = color1, time = 0f }, new GradientColorKey { color = color2, time = 1f } }; val8.alphaKeys = (GradientAlphaKey[])(object)new GradientAlphaKey[2] { new GradientAlphaKey { alpha = color1.a, time = 0f }, new GradientAlphaKey { alpha = color2.a, time = 1f } }; val8.mode = (GradientMode)0; val6.colorGradient = val8; val6.startColor = color1; val6.endColor = color2; } TrailRenderer[] componentsInChildren5 = thingToColor.GetComponentsInChildren<TrailRenderer>(); foreach (TrailRenderer val9 in componentsInChildren5) { Material[] materials3 = ((Renderer)val9).materials; foreach (Material val10 in materials3) { val10.color = color1; val10.SetColor("_MainColor", color1); val10.SetColor("_Color", color1); val10.SetColor("_TintColor", color2); } ((Renderer)val9).material.color = color1; ((Renderer)val9).material.SetColor("_MainColor", color1); ((Renderer)val9).material.SetColor("_Color", color1); ((Renderer)val9).material.SetColor("_TintColor", color2); Gradient val8 = new Gradient(); val8.colorKeys = (GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey { color = color1, time = 0f }, new GradientColorKey { color = color2, time = 1f } }; val8.alphaKeys = (GradientAlphaKey[])(object)new GradientAlphaKey[2] { new GradientAlphaKey { alpha = color1.a, time = 0f }, new GradientAlphaKey { alpha = color2.a, time = 1f } }; val8.mode = (GradientMode)0; val9.colorGradient = val8; val9.startColor = color1; val9.endColor = color2; } if (!colorMesh) { return; } MeshRenderer[] componentsInChildren6 = thingToColor.GetComponentsInChildren<MeshRenderer>(); foreach (MeshRenderer val11 in componentsInChildren6) { Material[] materials4 = ((Renderer)val11).materials; foreach (Material val12 in materials4) { val12.color = color1; val12.SetColor("_MainColor", color1); val12.SetColor("_Color", color1); val12.SetColor("_TintColor", color2); } ((Renderer)val11).material.color = color1; ((Renderer)val11).material.SetColor("_MainColor", color1); ((Renderer)val11).material.SetColor("_Color", color1); ((Renderer)val11).material.SetColor("_TintColor", color2); } } public static void Resize(this GameObject thingToColor, float widthMult) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) ParticleSystem[] componentsInChildren = thingToColor.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val in componentsInChildren) { MainModule main = val.main; MinMaxCurve startSize = ((MainModule)(ref main)).startSize; ((MainModule)(ref main)).startSize = new MinMaxCurve(((MinMaxCurve)(ref startSize)).constant * widthMult); } Light[] componentsInChildren2 = thingToColor.GetComponentsInChildren<Light>(); foreach (Light val2 in componentsInChildren2) { val2.range *= widthMult; } ParticleSystemRenderer[] componentsInChildren3 = thingToColor.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val3 in componentsInChildren3) { val3.maxParticleSize *= widthMult; val3.minParticleSize *= widthMult; } LineRenderer[] componentsInChildren4 = thingToColor.GetComponentsInChildren<LineRenderer>(); foreach (LineRenderer val4 in componentsInChildren4) { val4.widthMultiplier *= widthMult; } TrailRenderer[] componentsInChildren5 = thingToColor.GetComponentsInChildren<TrailRenderer>(); foreach (TrailRenderer val5 in componentsInChildren5) { val5.endWidth *= widthMult; val5.startWidth *= widthMult; } } internal static void AddEffectDef(EffectDef effectDef) { effectDefs.Add(effectDef); } internal static EffectDef CreateAndAddEffectDef(GameObject effectPrefab, bool donotPool = false) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown if (donotPool) { VFXAttributes val = effectPrefab.GetComponent<VFXAttributes>(); if ((Object)(object)val == (Object)null) { val = effectPrefab.AddComponent<VFXAttributes>(); } val.DoNotPool = true; } EffectDef val2 = new EffectDef(effectPrefab); AddEffectDef(val2); return val2; } internal static void CreateEffectFromObject(GameObject newEffect, string soundName, bool parentToTransform, bool overrideEffect) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) newEffect.AddComponent<DestroyOnTimer>().duration = 6f; newEffect.AddComponent<NetworkIdentity>(); if (!Object.op_Implicit((Object)(object)newEffect.GetComponent<VFXAttributes>())) { newEffect.AddComponent<VFXAttributes>().vfxPriority = (VFXPriority)2; } EffectComponent component = newEffect.GetComponent<EffectComponent>(); if (!Object.op_Implicit((Object)(object)component)) { component = newEffect.AddComponent<EffectComponent>(); component.applyScale = true; component.effectIndex = (EffectIndex)(-1); component.parentToReferencedTransform = parentToTransform; component.positionAtReferencedTransform = true; component.soundName = soundName; } else if (overrideEffect) { component.applyScale = true; component.effectIndex = (EffectIndex)(-1); component.parentToReferencedTransform = parentToTransform; component.positionAtReferencedTransform = true; component.soundName = soundName; } CreateAndAddEffectDef(newEffect); } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public string identifier => "com.Bloonjitsu7.PrimordialMithrix"; public void Initialize() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown Assets.Init(); Effects.RegisterEffects(); Projectiles.RegisterProjectiles(); ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; contentPack.effectDefs.Add(Effects.effectDefs.ToArray()); contentPack.buffDefs.Add(Buffs.buffDefs.ToArray()); contentPack.projectilePrefabs.Add(Projectiles.projectilePrefabs.ToArray()); args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } } namespace PrimordialMithrix.Changes { public class Main { public class GolemLaserManager : MonoBehaviour { public GameObject[] laserEffects = (GameObject[])(object)new GameObject[4]; public LineRenderer[] laserLines = (LineRenderer[])(object)new LineRenderer[4]; public Vector3[] laserDirections = (Vector3[])(object)new Vector3[4]; public Vector3[] laserPoints = (Vector3[])(object)new Vector3[4]; public float[] flashTimers = new float[4]; public bool[] laserStates = new bool[4]; public CharacterBody targetBody; public float flashTimer; public bool laserOn; } public static class ConstructManager { public static CharacterMaster construct1; public static CharacterMaster construct2; public static CharacterMaster construct3; public static CharacterMaster construct4; public static int[] constructIndexes = new int[4] { 0, 1, 2, 3 }; public static List<CharacterMaster> constructs = new List<CharacterMaster> { construct1, construct2, construct3, construct4 }; public static void SpawnConstructs(int count = 4) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //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_0081: Expected O, but got Unknown //IL_007c: 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) Util.ShuffleArray<int>(constructIndexes); int num = 0; for (int i = 0; i < 4; i++) { int num2 = constructIndexes[i]; if ((Object)(object)constructs[num2] == (Object)null) { num++; GameObject spawnedInstance = ((SpawnCard)exploderSpawnCard).DoSpawn(exploderPositions[num2], Quaternion.identity, new DirectorSpawnRequest((SpawnCard)(object)exploderSpawnCard, new DirectorPlacementRule { placementMode = (PlacementMode)0 }, Run.instance.runRNG) { teamIndexOverride = (TeamIndex)2 }).spawnedInstance; NetworkServer.Spawn(spawnedInstance); constructs[num2] = spawnedInstance.gameObject.GetComponent<CharacterMaster>(); if (Object.op_Implicit((Object)(object)constructs[num2])) { Inventory inventory = constructs[num2].inventory; if (Object.op_Implicit((Object)(object)inventory)) { inventory.GiveItemPermanent(Items.BoostHp, 5); inventory.GiveItemPermanent(Items.BoostDamage, 5); inventory.GiveItemPermanent(Items.BoostCharacterScale, 25); inventory.SetEquipmentIndex(Equipment.AffixLunar.equipmentIndex); if (KarmaManager.instance.GetEffectiveKarma() >= 7) { inventory.GiveItemPermanent(Items.OutOfCombatArmor, 3); } } } } if (num >= count) { break; } } } } public class ProjectileShockwaveRotationController : MonoBehaviour { public float velocity; public float rotationSpeed; public float lifetime = 6f; public float currentAngle; public float currentRadius = 0f; private float timer; private ProjectileController projectileController; private Vector3 orbitPoint; private void Awake() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) projectileController = ((Component)this).GetComponent<ProjectileController>(); orbitPoint = ((Component)this).transform.position; currentAngle = Mathf.Atan2(((Component)this).transform.forward.x, ((Component)this).transform.forward.z) * 57.29578f; } public Vector3 GetPointOnCircle(Vector3 center, float radius, float angle) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_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) float num = angle * (MathF.PI / 180f); float num2 = center.x + radius * Mathf.Cos(num); float num3 = center.z + radius * Mathf.Sin(num); return new Vector3(num2, center.y, num3); } private void FixedUpdate() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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_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_009c: 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 (NetworkServer.active) { currentAngle += rotationSpeed * Time.fixedDeltaTime; currentRadius += velocity * Time.fixedDeltaTime; ((Component)this).transform.position = GetPointOnCircle(orbitPoint, currentRadius, currentAngle); Ray val = new Ray(((Component)this).transform.position + Vector3.up * 5f, Vector3.down); LayerIndex world = LayerIndex.world; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(val, ref val2, 30f, LayerMask.op_Implicit(((LayerIndex)(ref world)).mask), (QueryTriggerInteraction)1)) { ((Component)this).transform.position = ((RaycastHit)(ref val2)).point; } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } if (NetworkServer.active) { timer += Time.fixedDeltaTime; if (timer > lifetime) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } } public class ProjectileShockwaveController : MonoBehaviour { public float velocity; public float lifetime = 6f; public float distanceStopwatch; public float heightLeniancy = 5f; private float timer; private ProjectileController projectileController; public GameObject projectileCloneUp; public GameObject projectileCloneDown; private void Awake() { projectileController = ((Component)this).GetComponent<ProjectileController>(); } private void FixedUpdate() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0038: 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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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) if (NetworkServer.active) { Vector3 val = ((Component)this).transform.forward * (velocity * Time.fixedDeltaTime); Transform transform = ((Component)this).transform; transform.position += val; Ray val2 = new Ray(((Component)this).transform.position + Vector3.up * heightLeniancy, Vector3.down); float num = 25f + heightLeniancy; LayerIndex world = LayerIndex.world; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(val2, ref val3, num, LayerMask.op_Implicit(((LayerIndex)(ref world)).mask), (QueryTriggerInteraction)1)) { ((Component)this).transform.position = ((RaycastHit)(ref val3)).point; } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } if (NetworkServer.active) { timer += Time.fixedDeltaTime; if (timer > lifetime) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } private FireProjectileInfo CloneProjectile() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_0083: 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_008d: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) ProjectileDamage component = ((Component)this).gameObject.GetComponent<ProjectileDamage>(); FireProjectileInfo result = new FireProjectileInfo { force = component.force, crit = component.crit, damage = component.damage }; ((FireProjectileInfo)(ref result)).speedOverride = velocity; result.owner = projectileController.owner; result.damageTypeOverride = component.damageType; result.damageColorIndex = component.damageColorIndex; result.rotation = Util.QuaternionSafeLookRotation(((Component)this).transform.forward); result.procChainMask = projectileController.procChainMask; result.projectilePrefab = ((Component)this).gameObject; return result; } } public class PillarManager : MonoBehaviour { public float stopwatch; public float delay; public bool active; public void FixedUpdate() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) if (active) { stopwatch += Time.fixedDeltaTime; if (stopwatch > 4f + delay) { ((Component)this).gameObject.SetActive(false); } else if (stopwatch > delay) { Vector3 position = ((Component)this).transform.position; position.y -= (20f + (stopwatch - delay) * 10f) * Time.fixedDeltaTime; ((Component)this).transform.position = position; } } } } public class GravityCleanseEffectManager : MonoBehaviour { public CharacterBody body; public void Start() { Util.PlaySound("Play_env_meridian_geode_cleanse_debuff", ((Component)this).gameObject); } public void FixedUpdate() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)body == (Object)null)) { ((Component)this).gameObject.transform.position = body.footPosition; } } } public class GravityManager : MonoBehaviour { public CharacterBody body; public CharacterBody attackerBody; public float stopwatch; public static float duration = 3f; public void FixedUpdate() { //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Expected O, but got Unknown //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Expected O, but got Unknown //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || !Object.op_Implicit((Object)(object)body) || (!body.HasBuff(Buffs.GravityDebuff) && !body.HasBuff(Buffs.GravityIntenseDebuff))) { return; } if (!Object.op_Implicit((Object)(object)body.characterMotor)) { body.RemoveBuff(Buffs.GravityDebuff); body.RemoveBuff(Buffs.GravityIntenseDebuff); stopwatch = 0f; return; } if (stopwatch == 0f) { EffectData val = new EffectData { origin = body.transform.position, scale = 6f }; val.SetNetworkedObjectReference(((Component)body).gameObject); EffectManager.SpawnEffect(Effects.gravityOrbArrivalEffect, val, true); } stopwatch += Time.fixedDeltaTime; if (stopwatch >= duration && !body.HasBuff(Buffs.GravityIntenseDebuff)) { body.RemoveBuff(Buffs.GravityDebuff); body.AddBuff(Buffs.GravityIntenseDebuff); } if (body.characterMotor.isGrounded) { body.RemoveBuff(Buffs.GravityDebuff); body.RemoveBuff(Buffs.GravityIntenseDebuff); if (stopwatch >= duration && (Object)(object)attackerBody != (Object)null && Object.op_Implicit((Object)(object)body.healthComponent) && body.healthComponent.alive) { float num = (stopwatch - duration) * 0.3f + 0.1f; float damage = body.healthComponent.fullCombinedHealth * num; DamageType val2 = (DamageType)4194306; DamageInfo val3 = new DamageInfo { damage = damage, position = body.transform.position, attacker = ((Component)attackerBody).gameObject, crit = false, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit(val2), (DamageTypeExtended)0, (DamageSource)0), damageColorIndex = (DamageColorIndex)16, inflictor = ((Component)attackerBody).gameObject, procCoefficient = 0f, procChainMask = default(ProcChainMask) }; EffectData val4 = new EffectData { origin = body.transform.position }; EffectManager.SpawnEffect(Effects.gravityImpactEffect, val4, true); body.healthComponent.TakeDamage(val3); } else if ((Object)(object)body.modelLocator != (Object)null && (Object)(object)body.modelLocator.modelTransform != (Object)null) { GameObject val5 = Object.Instantiate<GameObject>(Effects.gravityCleanseEffect, body.transform.position, Quaternion.identity); val5.GetComponent<GravityCleanseEffectManager>().body = body; NetworkServer.Spawn(val5); } stopwatch = 0f; } else if (stopwatch >= duration) { body.characterMotor.ApplyForce(Vector3.down * stopwatch * 6000f * Time.fixedDeltaTime, false, false); } else { body.characterMotor.ApplyForce(Vector3.down * stopwatch * 3000f * Time.fixedDeltaTime, false, false); } } } public class GravityOrb : Orb { public CharacterBody targetBody; public CharacterBody attackerBody; private static GameObject orbEffect = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_LunarSkillReplacements.LunarDetonatorOrbEffect_prefab).WaitForCompletion(); public override void Begin() { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown if (!((Object)(object)targetBody == (Object)null) && !((Object)(object)((Component)targetBody).gameObject == (Object)null) && !((Object)(object)attackerBody == (Object)null)) { GravityManager gravityManager = ((Component)targetBody).gameObject.GetComponent<GravityManager>(); if ((Object)(object)gravityManager == (Object)null) { gravityManager = ((Component)targetBody).gameObject.AddComponent<GravityManager>(); } gravityManager.body = targetBody; gravityManager.attackerBody = attackerBody; ((Orb)this).duration = Mathf.Max(0.02f * ((Orb)this).distanceToTarget, ((Orb)this).duration); EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(Effects.gravityOrbEffect, val, true); } } public override void OnArrival() { //IL_007d: 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) if ((Object)(object)targetBody != (Object)null && !targetBody.HasBuff(Buffs.GravityIntenseDebuff)) { if (Object.op_Implicit((Object)(object)targetBody.characterMotor) && !targetBody.characterMotor.isGrounded) { targetBody.AddBuff(Buffs.GravityDebuff); return; } GameObject val = Object.Instantiate<GameObject>(Effects.gravityCleanseEffect, targetBody.transform.position, Quaternion.identity); val.GetComponent<GravityCleanseEffectManager>().body = targetBody; NetworkServer.Spawn(val); } } } public class ScreenCrippleFog : ScreenDamageCalculator { private const float deathWeight = 0.5f; private const float hitTintDecayTime = 0.6f; private const float hitTintScale = 0.9f; private const float deSaturationBase = 0.7f; private const float tintBase = 0.2f; private const float tintMaximum = 0.6f; private float healthPercentage; private float totalStrength; private float hitTint; private ScreenDamageData _screenDamageData = new ScreenDamageData(Color.blue, 0.1f, 0.3f, 0.6f, false); public override ScreenDamageData screenDamageData => _screenDamageData; public bool combineAdditively => false; public override void CalculateScreenDamage(ScreenDamage screenDamage, HealthComponent targetHealthComponent) { totalStrength = 0.5f; hitTint = 0f; if (Object.op_Implicit((Object)(object)targetHealthComponent)) { healthPercentage = Mathf.Clamp(targetHealthComponent.health / targetHealthComponent.fullHealth, 0f, 1f); hitTint = Mathf.Clamp01(1f - targetHealthComponent.timeSinceLastHit / 0.6f) * 0.9f; if (targetHealthComponent.health <= 0f) { totalStrength = 0f; } } if (screenDamage.debugHealthPercentage != 0f) { healthPercentage = screenDamage.debugHealthPercentage; } float distortionStrength = totalStrength * screenDamage.DistortionScale * Mathf.Pow(1f - healthPercentage, screenDamage.DistortionPower); if (screenDamage.useDebugValues) { distortionStrength = screenDamage.debugDistortionValue; } _screenDamageData.distortionStrength = distortionStrength; distortionStrength = 0.8f; if (screenDamage.useDebugValues) { distortionStrength = screenDamage.debugDesatValue; } _screenDamageData.desaturationStrength = distortionStrength; distortionStrength = 0.5f; distortionStrength += (totalStrength * screenDamage.TintScale + 0.2f) * (Mathf.Pow(1f - healthPercentage, screenDamage.TintPower) + hitTint); distortionStrength = Mathf.Min(distortionStrength, 0.8f); if (screenDamage.useDebugValues) { distortionStrength = screenDamage.debugTintValue; } _screenDamageData.tintStrength = distortionStrength; ScreenDamagePPRenderer.ExtendTemporaryProps(); } public override void End() { ScreenDamagePPRenderer.ClearTemporaryProps((ScreenDamageCalculator)(object)this); } } private static GameObject shockwavePrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherSunderWave_prefab).WaitForCompletion(); private static GameObject shockwaveGhost = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherSunderWaveGhost_prefab).WaitForCompletion(); private static GameObject shockwavePrefab2 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherSunderWave__Energized_prefab).WaitForCompletion(); private static GameObject shockwaveGhost2 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherSunderWave__Energized_Ghost_prefab).WaitForCompletion(); private static GameObject shardPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.LunarShardProjectile_prefab).WaitForCompletion(); private static GameObject shardPrefab2 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother_Karma.LunarShardProjectileKarma_prefab).WaitForCompletion(); private static GameObject ultLineGhost = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherUltLineGhost_prefab).WaitForCompletion(); private static GameObject ultTubePrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherUltTubeProjectile_prefab).WaitForCompletion(); private static GameObject flamePillarPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherFirePillar_prefab).WaitForCompletion(); private static GameObject crawlerPrefab1 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother_Karma.LunarCrawlerLeft_prefab).WaitForCompletion(); private static GameObject crawlerPrefab2 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother_Karma.LunarCrawlerRight_prefab).WaitForCompletion(); private static GameObject crawlerPrefab3 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother_Karma.LunarCrawlerWeaponSlam_prefab).WaitForCompletion(); private static GameObject crawlerGhost = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother_Karma.LunarCrawlerGhost_prefab).WaitForCompletion(); private static GameObject crystalTrailPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother_Karma.KarmaSpikeCrawler__XXSmall__Spiraling_prefab).WaitForCompletion(); private static GameObject crystalBlastPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother_Karma.KarmaSpikeBreakEffect_prefab).WaitForCompletion(); private static GameObject crystalPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother_Karma.KarmaSpikeXSmall_prefab).WaitForCompletion(); private static GameObject mithrixMaster = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherMaster_prefab).WaitForCompletion(); private static GameObject mithrixHurtMaster = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherHurtMaster_prefab).WaitForCompletion(); private static GameObject mithrixThroneMaster = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherThroneMaster_prefab).WaitForCompletion(); private static GameObject mithrixBody = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherBody_prefab).WaitForCompletion(); private static GameObject mithrixHurtBody = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Brother.BrotherHurtBody_prefab).WaitForCompletion(); private static SkillDef bashSkill = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_Base_Brother.SprintBash_asset).WaitForCompletion(); private static SkillDef giftSkill = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_Base_Brother.ItemGift_asset).WaitForCompletion(); private static SkillDef fistSkill = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_Base_Brother.FistSlam_asset).WaitForCompletion(); private static SkillDef spikeSkill2 = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_Base_Brother.FireLunarShardsHurt_asset).WaitForCompletion(); private static SkillDef mortarSkill = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_Base_Brother_Karma.LunarExploderMortarStorm_asset).WaitForCompletion(); private static SkillDef wispSkill = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_Base_Brother_Karma.LunarWispAttack_asset).WaitForCompletion(); private static SkillDef laserSkill = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_Base_LunarGolem.LunarGolemBarrage_asset).WaitForCompletion(); private static BrotherUltPattern staticPattern = Addressables.LoadAssetAsync<BrotherUltPattern>((object)RoR2_Base_Brother.Ult_default_asset).WaitForCompletion(); private static CharacterSpawnCard exploderSpawnCard = Addressables.LoadAssetAsync<CharacterSpawnCard>((object)RoR2_Base_LunarExploder.cscLunarExploder_asset).WaitForCompletion(); private static CharacterSpawnCard golemSpawnCard = Addressables.LoadAssetAsync<CharacterSpawnCard>((object)RoR2_Base_LunarGolem.cscLunarGolem_asset).WaitForCompletion(); private static CharacterSpawnCard wispSpawnCard = Addressables.LoadAssetAsync<CharacterSpawnCard>((object)RoR2_Base_LunarWisp.cscLunarWisp_asset).WaitForCompletion(); public static GameObject spawnPosPrefab = PrefabAPI.CreateEmptyPrefab("BloonMithrixSpawnPosPrefab"); public static GameObject fogPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_arena.ArenaFogDamager_prefab).WaitForCompletion(), "BloonMithrixFogDamagePrefab"); public static GameObject zonePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC4.DreadFogSafeZone_prefab).WaitForCompletion(), "BloonMithrixFogSafeZonePrefab"); public static GameObject zonePrefab2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC4.DreadFogSafeZone_prefab).WaitForCompletion(), "BloonMithrixFogSafeZonePrefab2"); public static Material zoneMat = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_moon.matMoonArenaWall_mat).WaitForCompletion(); public static Material zoneMat2 = Addressables.LoadAssetAsync<Material>((object)RoR2_Base_Brother_Karma.matLunarTornado_mat).WaitForCompletion(); public static List<Hook> hooks = new List<Hook>(); public static List<ILHook> ILhooks = new List<ILHook>(); public static Vector3[] exploderPositions = (Vector3[])(object)new Vector3[4] { new Vector3(65f, 524.3f, 155f), new Vector3(65f, 524.3f, -145f), new Vector3(-240f, 524.3f, 155f), new Vector3(-240f, 524.3f, -145f) }; public static Vector3[] bombPositions = (Vector3[])(object)new Vector3[18] { new Vector3(60f, 0f, 0f), new Vector3(-60f, 0f, 0f), new Vector3(30f, 0f, 54f), new Vector3(-30f, 0f, 54f), new Vector3(-30f, 0f, -54f), new Vector3(30f, 0f, -54f), new Vector3(0f, 0f, 90f), new Vector3(0f, 0f, -90f), new Vector3(81f, 0f, 45f), new Vector3(-81f, 0f, 45f), new Vector3(-81f, 0f, -45f), new Vector3(81f, 0f, -45f), new Vector3(120f, 0f, 0f), new Vector3(-120f, 0f, 0f), new Vector3(60f, 0f, 108f), new Vector3(-60f, 0f, 108f), new Vector3(-60f, 0f, -108f), new Vector3(60f, 0f, -108f) }; public static int waveCounter = 0; public static int pillarRingCount = 50; public static Vector3[] pizzaLocations = (Vector3[])(object)new Vector3[3] { new Vector3(10f, 0f, 30f), new Vector3(20f, 0f, -20f), new Vector3(-30f, 0f, -10f) }; public static int spawnCounter = 0; public FogDamageController fogDamageController; public GameObject safeZoneInstance; public GameObject safeZoneInstance2; public GameObject fogInstance; public float p4Stopwatch; public void Initialize() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Expected O, but got Unknown //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Expected O, but got Unknown //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Expected O, but got Unknown //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Expected O, but got Unknown //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Expected O, but got Unknown //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Expected O, but got Unknown //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Expected O, but got Unknown //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Expected O, but got Unknown //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Expected O, but got Unknown //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Expected O, but got Unknown //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Expected O, but got Unknown //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Expected O, but got Unknown //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Expected O, but got Unknown //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Expected O, but got Unknown //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Expected O, but got Unknown //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Expected O, but got Unknown //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Expected O, but got Unknown //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Expected O, but got Unknown //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Expected O, but got Unknown //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Expected O, but got Unknown //IL_05b7: Unknown result type (might be due to invalid IL or missing references) //IL_05c1: Expected O, but got Unknown //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Expected O, but got Unknown //IL_0623: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Expected O, but got Unknown //IL_0659: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Expected O, but got Unknown //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_0699: Expected O, but got Unknown //IL_06c5: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Expected O, but got Unknown //IL_06fb: Unknown result type (might be due to invalid IL or missing references) //IL_0705: Expected O, but got Unknown //IL_0731: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Expected O, but got Unknown //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_0771: Expected O, but got Unknown //IL_079d: Unknown result type (might be due to invalid IL or missing references) //IL_07a7: Expected O, but got Unknown //IL_07d3: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Expected O, but got Unknown //IL_0809: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Expected O, but got Unknown //IL_083f: Unknown result type (might be due to invalid IL or missing references) //IL_0849: Expected O, but got Unknown //IL_0875: Unknown result type (might be due to invalid IL or missing references) //IL_087f: Expected O, but got Unknown //IL_08ab: Unknown result type (might be due to invalid IL or missing references) //IL_08b5: Expected O, but got Unknown //IL_08e1: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Expected O, but got Unknown //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_0921: Expected O, but got Unknown //IL_094d: Unknown result type (might be due to invalid IL or missing references) //IL_0957: Expected O, but got Unknown //IL_0983: Unknown result type (might be due to invalid IL or missing references) //IL_098d: Expected O, but got Unknown //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_09c3: Expected O, but got Unknown //IL_09ef: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Expected O, but got Unknown //IL_0a25: Unknown result type (might be due to invalid IL or missing references) //IL_0a2f: Expected O, but got Unknown //IL_0a56: Unknown result type (might be due to invalid IL or missing references) //IL_0a60: Expected O, but got Unknown //IL_0a5b: Unknown result type (might be due to invalid IL or missing references) //IL_0a65: Expected O, but got Unknown //IL_0a91: Unknown result type (might be due to invalid IL or missing references) //IL_0a9b: Expected O, but got Unknown //IL_0ac7: Unknown result type (might be due to invalid IL or missing references) //IL_0ad1: Expected O, but got Unknown //IL_0afd: Unknown result type (might be due to invalid IL or missing references) //IL_0b07: Expected O, but got Unknown //IL_0b33: Unknown result type (might be due to invalid IL or missing references) //IL_0b3d: Expected O, but got Unknown //IL_0b69: Unknown result type (might be due to invalid IL or missing references) //IL_0b73: Expected O, but got Unknown LanguageAPI.Add("BLOON_MITHRIX_MAXKARMASUBTITLE", "God of Design"); for (int i = 0; i < staticPattern.projectileData.Length; i++) { ProjectileData val = staticPattern.projectileData[i]; Log.Message(val.projectileCount); staticPattern.projectileData[i].projectileCount = 4; staticPattern.projectileData[i].angleOffset = 90f; } Log.Message(mithrixHurtBody.GetComponent<CharacterBody>().baseMoveSpeed); mithrixHurtBody.GetComponent<CharacterBody>().baseMoveSpeed = 2f; mithrixBody.GetComponent<CharacterBody>().baseMaxHealth = 1200f; mithrixBody.GetComponent<CharacterBody>().levelMaxHealth = 360f; new KarmaTriggerChanges().Initialize(); Buffs.CreateBuffs(); CreateFogPrefab(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnRecalcStats); MethodInfo methodInfo = AccessTools.Method(typeof(HealthComponent), "TakeDamageProcess", (Type[])null, (Type[])null); ILhooks.Add(new ILHook((MethodBase)methodInfo, new Manipulator(IL_TakeDamageProcess))); SetStateOnHurt.SetFrozen += new hook_SetFrozen(OnSetFrozen); MethodInfo methodInfo2 = AccessTools.Method(typeof(CharacterBody), "RecalculateStats", (Type[])null, (Type[])null); ILhooks.Add(new ILHook((MethodBase)methodInfo2, new Manipulator(IL_RecalcStats))); MethodInfo methodInfo3 = AccessTools.Method(typeof(HealthComponent), "ServerFixedUpdate", (Type[])null, (Type[])null); ILhooks.Add(new ILHook((MethodBase)methodInfo3, new Manipulator(IL_HealthUpdate))); MethodInfo methodInfo4 = AccessTools.Method(typeof(GenericSkill), "RunRecharge", new Type[2] { typeof(float), typeof(bool) }, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo4, (Delegate)new Action<Action<GenericSkill, float, bool>, GenericSkill, float, bool>(OnSkillRecharge))); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); MethodInfo methodInfo5 = AccessTools.Method(typeof(BrotherEncounterPhaseBaseState), "OnMemberAddedServer", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo5, (Delegate)new Action<Action<BrotherEncounterPhaseBaseState, CharacterMaster>, BrotherEncounterPhaseBaseState, CharacterMaster>(OnMithrixSpawn))); MethodInfo methodInfo6 = AccessTools.Method(typeof(Phase2), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo6, (Delegate)new Action<Action<Phase2>, Phase2>(OnPhase2Enter))); MethodInfo methodInfo7 = AccessTools.Method(typeof(Phase3), "OnSpawnedServer", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo7, (Delegate)new Action<Action<Phase3, GameObject>, Phase3, GameObject>(OnPhase3Spawned))); MethodInfo methodInfo8 = AccessTools.Method(typeof(Phase4), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo8, (Delegate)new Action<Action<Phase4>, Phase4>(OnPhase4Enter))); MethodInfo methodInfo9 = AccessTools.Method(typeof(Phase4), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo9, (Delegate)new Action<Action<Phase4>, Phase4>(OnPhase4Update))); MethodInfo methodInfo10 = AccessTools.Method(typeof(BossDeath), "OnEnter", (Type[])null,