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 BetterMithrix v0.1.1
BetterMithrix.dll
Decompiled 3 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 BetterMithrix.Changes; using BetterMithrix.Modules; using EntityStates; using EntityStates.BrotherMonster; using EntityStates.BrotherMonster.Weapon; 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 R2API; using Rewired.ComponentControls.Effects; using RoR2; 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("BetterMithrix")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("BetterMithrix")] [assembly: AssemblyTitle("BetterMithrix")] [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 BetterMithrix { [BepInPlugin("com.Bloonjitsu7.BetterMithrix", "BetterMithrix", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class BetterMithrixPlugin : BaseUnityPlugin { public static PluginInfo PInfo { get; private set; } public void Awake() { //IL_0084: 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) PInfo = ((BaseUnityPlugin)this).Info; Log.Init(((BaseUnityPlugin)this).Logger); new ContentPacks().Initialize(); Material[] array = Assets.mainBundle.LoadAllAssets<Material>(); foreach (Material val in array) { if (((Object)val.shader).name.StartsWith("StubbedRoR2")) { string text = ((Object)val.shader).name.Replace("StubbedRoR2", "RoR2") + ".shader"; Shader val2 = Addressables.LoadAssetAsync<Shader>((object)text).WaitForCompletion(); if (Object.op_Implicit((Object)(object)val2)) { int renderQueue = val.renderQueue; val.shader = val2; val.renderQueue = renderQueue; } } } Main main = new Main(); Config.SetupConfig(((BaseUnityPlugin)this).Config); main.Initialize(); } } 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); } } } namespace BetterMithrix.Modules { public static class Assets { public static AssetBundle mainBundle; public const string bundleName = "BetterMithrixAssets.bundle"; public const string assetBundleFolder = "assetbundles"; public static string AssetBundlePath => Path.Combine(Path.GetDirectoryName(BetterMithrixPlugin.PInfo.Location), "BetterMithrixAssets.bundle"); public static string AssetString => "Assets/BetterMithrixAssets/"; 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 { internal static List<BuffDef> buffDefs = new List<BuffDef>(); 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 { 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 fireWaveEffect; public static GameObject fireWaveEffect2; public static GameObject crawlerGhostPrefab; public static GameObject shockwaveEffect; public static List<EffectDef> effectDefs = new List<EffectDef>(); internal static void RegisterEffects() { hammerBlastPrefab = CreateHammerBlastEffect(); pillarWarningEffect = CreatePillarWarningEffect(); gravityImpactEffect = CreateGravityImpactEffect(); gravityCleanseEffect = CreateGravityCleanseEffect(); gravityOrbEffect = CreateGravityOrbEffect(); gravityOrbArrivalEffect = CreateGravityOrbArrivalEffect(); fireWaveEffect = CreateFireWaveEffect(); fireWaveEffect2 = CreateFireWaveEffect2(); crawlerGhostPrefab = CreateCrawlerGhost(); shockwaveEffect = CreateShockwaveEffect(); } 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) GameObject val = 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; 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; ((MainModule)(ref main)).startSizeMultiplier = 0.5f; ((MainModule)(ref main)).startSize = new MinMaxCurve(0.5f); ((MainModule)(ref main)).startSpeed = new MinMaxCurve(0.75f); ((MainModule)(ref main)).emitterVelocity = ((MainModule)(ref main)).emitterVelocity * 0.5f; val3.startSize *= 0.5f; } 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00af: 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_00b9: 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) 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_0074: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) 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) { //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.BetterMithrix"; 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 BetterMithrix.Changes { public class Main { public static class ConstructManager { public static CharacterMaster construct1; public static CharacterMaster construct2; public static CharacterMaster construct3; public static CharacterMaster construct4; public static List<CharacterMaster> constructs = new List<CharacterMaster> { construct1, construct2, construct3, construct4 }; public static void SpawnConstructs() { //IL_002d: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 4; i++) { if (!((Object)(object)constructs[i] == (Object)null)) { continue; } GameObject spawnedInstance = ((SpawnCard)exploderSpawnCard).DoSpawn(exploderPositions[i], Quaternion.identity, new DirectorSpawnRequest((SpawnCard)(object)exploderSpawnCard, new DirectorPlacementRule { placementMode = (PlacementMode)0 }, Run.instance.runRNG) { teamIndexOverride = (TeamIndex)2 }).spawnedInstance; NetworkServer.Spawn(spawnedInstance); constructs[i] = spawnedInstance.gameObject.GetComponent<CharacterMaster>(); if (Object.op_Implicit((Object)(object)constructs[i])) { Inventory inventory = constructs[i].inventory; if (Object.op_Implicit((Object)(object)inventory)) { inventory.GiveItemPermanent(Items.BoostHp, 5); inventory.GiveItemPermanent(Items.BoostDamage, 5); inventory.GiveItemPermanent(Items.BoostCharacterScale, 10); inventory.SetEquipmentIndex(Equipment.AffixLunar.equipmentIndex); } } } } } 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; 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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 * 5f, Vector3.down); LayerIndex world = LayerIndex.world; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(val2, ref val3, 30f, 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 void FixedUpdate() { //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_00a5: 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_00bd: Expected O, but got Unknown //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: 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_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Expected O, but got Unknown //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Expected O, but got Unknown //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || !Object.op_Implicit((Object)(object)body) || !body.HasBuff(BuffDefs.GravityDebuff)) { return; } if (!Object.op_Implicit((Object)(object)body.characterMotor)) { body.RemoveBuff(BuffDefs.GravityDebuff); 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 (body.characterMotor.isGrounded) { body.RemoveBuff(BuffDefs.GravityDebuff); if (stopwatch >= 4f && (Object)(object)attackerBody != (Object)null && Object.op_Implicit((Object)(object)body.healthComponent) && body.healthComponent.alive) { float num = (stopwatch - 4f) * 8f; Log.Message(num); DamageInfo val2 = new DamageInfo { damage = (4f + num) * attackerBody.damage, position = body.transform.position, attacker = ((Component)attackerBody).gameObject, crit = false, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)4194304), (DamageTypeExtended)0, (DamageSource)0), damageColorIndex = (DamageColorIndex)16, inflictor = ((Component)attackerBody).gameObject, procCoefficient = 0f, procChainMask = default(ProcChainMask) }; EffectData val3 = new EffectData { origin = body.transform.position }; EffectManager.SpawnEffect(Effects.gravityImpactEffect, val3, true); body.healthComponent.TakeDamage(val2); } else if ((Object)(object)body.modelLocator != (Object)null && (Object)(object)body.modelLocator.modelTransform != (Object)null) { GameObject val4 = Object.Instantiate<GameObject>(Effects.gravityCleanseEffect, body.transform.position, Quaternion.identity); val4.GetComponent<GravityCleanseEffectManager>().body = body; NetworkServer.Spawn(val4); } stopwatch = 0f; } else if (stopwatch >= 4f) { body.characterMotor.ApplyForce(Vector3.down * 30000f * 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)targetBody != (Object)null) { if (Object.op_Implicit((Object)(object)targetBody.characterMotor) && !targetBody.characterMotor.isGrounded) { targetBody.AddBuff(BuffDefs.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(); public static GameObject constructBody; public static GameObject constructMaster; public static SpawnCard constructCard; 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 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 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_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022b: 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_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: 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_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_0804: Unknown result type (might be due to invalid IL or missing references) //IL_080e: 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 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(); BuffDefs.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(GenericSkill), "RunRecharge", new Type[2] { typeof(float), typeof(bool) }, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo3, (Delegate)new Action<Action<GenericSkill, float, bool>, GenericSkill, float, bool>(OnSkillRecharge))); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); MethodInfo methodInfo4 = AccessTools.Method(typeof(BrotherEncounterPhaseBaseState), "OnMemberAddedServer", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo4, (Delegate)new Action<Action<BrotherEncounterPhaseBaseState, CharacterMaster>, BrotherEncounterPhaseBaseState, CharacterMaster>(OnMithrixSpawn))); MethodInfo methodInfo5 = AccessTools.Method(typeof(Phase2), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo5, (Delegate)new Action<Action<Phase2>, Phase2>(OnPhase2Enter))); MethodInfo methodInfo6 = AccessTools.Method(typeof(Phase3), "OnSpawnedServer", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo6, (Delegate)new Action<Action<Phase3, GameObject>, Phase3, GameObject>(OnPhase3Spawned))); MethodInfo methodInfo7 = AccessTools.Method(typeof(Phase4), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo7, (Delegate)new Action<Action<Phase4>, Phase4>(OnPhase4Enter))); MethodInfo methodInfo8 = AccessTools.Method(typeof(Phase4), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo8, (Delegate)new Action<Action<Phase4>, Phase4>(OnPhase4Update))); MethodInfo methodInfo9 = AccessTools.Method(typeof(BossDeath), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo9, (Delegate)new Action<Action<BossDeath>, BossDeath>(OnBossDeathEnter))); MethodInfo methodInfo10 = AccessTools.Method(typeof(SkySpawnState), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo10, (Delegate)new Action<Action<SkySpawnState>, SkySpawnState>(OnSpawnEnter))); MethodInfo methodInfo11 = AccessTools.Method(typeof(WeaponSlam), "FixedUpdate", (Type[])null, (Type[])null); ILhooks.Add(new ILHook((MethodBase)methodInfo11, new Manipulator(IL_HammerSlamUpdate))); MethodInfo methodInfo12 = AccessTools.Method(typeof(WeaponSlam), "FireWave", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo12, (Delegate)new Action<Action<WeaponSlam>, WeaponSlam>(OnHammerSlamWave))); MethodInfo methodInfo13 = AccessTools.Method(typeof(SprintBash), "AuthorityFireAttack", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo13, (Delegate)new Action<Action<SprintBash>, SprintBash>(OnBashFire))); MethodInfo methodInfo14 = AccessTools.Method(typeof(BaseSlideState), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo14, (Delegate)new Action<Action<BaseSlideState>, BaseSlideState>(OnDashUpdate))); MethodInfo methodInfo15 = AccessTools.Method(typeof(FireLunarShards), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo15, (Delegate)new Action<Action<FireLunarShards>, FireLunarShards>(OnFireShardsEnter))); MethodInfo methodInfo16 = AccessTools.Method(typeof(ExitSkyLeap), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo16, (Delegate)new Action<Action<ExitSkyLeap>, ExitSkyLeap>(OnSkyLeapEnter))); MethodInfo methodInfo17 = AccessTools.Method(typeof(ExitSkyLeap), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo17, (Delegate)new Action<Action<ExitSkyLeap>, ExitSkyLeap>(OnSkyLeapUpdate))); MethodInfo methodInfo18 = AccessTools.Method(typeof(ExitSkyLeap), "FireRingAuthority", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo18, (Delegate)new Action<Action<ExitSkyLeap>, ExitSkyLeap>(OnSkyLeapFire))); MethodInfo methodInfo19 = AccessTools.Method(typeof(ExitSkyLeap), "FireCrawlersAuthority", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo19, (Delegate)new Action<Action<ExitSkyLeap>, ExitSkyLeap>(OnSkyLeapCrawlers))); MethodInfo methodInfo20 = AccessTools.Method(typeof(SkyLeapBomb), "FireRingAuthority", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo20, (Delegate)new Action<Action<SkyLeapBomb>, SkyLeapBomb>(OnBombFire))); MethodInfo methodInfo21 = AccessTools.Method(typeof(UltChannelState), "FireWave", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo21, (Delegate)new Action<Action<UltChannelState, Vector3, bool, bool>, UltChannelState, Vector3, bool, bool>(OnUltFireWave))); MethodInfo methodInfo22 = AccessTools.Method(typeof(UltExitState), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo22, (Delegate)new Action<Action<UltExitState>, UltExitState>(OnUltExit))); MethodInfo methodInfo23 = AccessTools.Method(typeof(SpellChannelState), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo23, (Delegate)new Action<Action<SpellChannelState>, SpellChannelState>(OnSpellEnter))); MethodInfo methodInfo24 = AccessTools.Method(typeof(StaggerEnter), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo24, (Delegate)new Action<Action<StaggerEnter>, StaggerEnter>(OnStaggerEnter))); MethodInfo methodInfo25 = AccessTools.Method(typeof(FistSlam), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo25, (Delegate)new Action<Action<FistSlam>, FistSlam>(OnFistSlamEnter))); MethodInfo methodInfo26 = AccessTools.Method(typeof(FistSlam), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo26, (Delegate)new Action<Action<FistSlam>, FistSlam>(OnFistSlamUpdate))); MethodInfo methodInfo27 = AccessTools.Method(typeof(LunarWispAttack), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo27, (Delegate)new Action<Action<LunarWispAttack>, LunarWispAttack>(OnFireRingSkillEnter))); MethodInfo methodInfo28 = AccessTools.Method(typeof(LunarWispAttack), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo28, (Delegate)new Action<Action<LunarWispAttack>, LunarWispAttack>(OnFireRingSkillUpdate))); MethodInfo methodInfo29 = AccessTools.Method(typeof(LunarExploderMortarStorm), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo29, (Delegate)new Action<Action<LunarExploderMortarStorm>, LunarExploderMortarStorm>(OnMortarEnter))); MethodInfo methodInfo30 = AccessTools.Method(typeof(LunarExploderMortarStorm), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo30, (Delegate)new Action<Action<LunarExploderMortarStorm>, LunarExploderMortarStorm>(OnMortarUpdate))); MethodInfo methodInfo31 = AccessTools.Method(typeof(GiftItem), "SendItemServer", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo31, (Delegate)new Action<Action<GiftItem>, GiftItem>(OnGiftItem))); MethodInfo methodInfo32 = AccessTools.Method(typeof(CharacterBody), "UpdateAllTemporaryVisualEffects", (Type[])null, (Type[])null); ILhooks.Add(new ILHook((MethodBase)methodInfo32, new Manipulator(IL_UpdateVisualEffect))); MethodInfo methodInfo33 = AccessTools.Method(typeof(CharacterBody), "HandleDisableAllSkillsDebuff", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo33, (Delegate)new Action<Action<CharacterBody>, CharacterBody>(OnHandleScreen))); MethodInfo methodInfo34 = AccessTools.Method(typeof(GlobalEventManager), "IsImmuneToFallDamage", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo34, (Delegate)new Func<Func<GlobalEventManager, CharacterBody, bool>, GlobalEventManager, CharacterBody, bool>(OnCheckFallDamage))); MethodInfo methodInfo35 = AccessTools.Method(typeof(BrotherSuperArmorController), "OnDamageDealtServer", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo35, (Delegate)new Action<Action<BrotherSuperArmorController, DamageReport>, BrotherSuperArmorController, DamageReport>(RemoveArmor))); MethodInfo methodInfo36 = AccessTools.Method(typeof(EnterSkyLeap), "AttemptFireGravZoneAuthority", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo36, (Delegate)new Action<Action<EnterSkyLeap>, EnterSkyLeap>(RemoveGravZone))); MethodInfo methodInfo37 = AccessTools.Method(typeof(ExitSkyLeap), "AttemptFireMeteorStormServer", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo37, (Delegate)new Action<Action<ExitSkyLeap>, ExitSkyLeap>(RemoveMeteors))); ModifyProjectiles(); ModifyAI(); } public void OnLoad() { bashSkill.baseRechargeInterval = 8f; giftSkill.baseRechargeInterval = 10f; fistSkill.baseRechargeInterval = 5.5f; fistSkill.baseMaxStock = 3; fistSkill.rechargeStock = 3; fistSkill.fullRestockOnAssign = true; spikeSkill2.baseRechargeInterval = 8f; spikeSkill2.baseMaxStock = 5; spikeSkill2.rechargeStock = 5; wispSkill.baseRechargeInterval = 40f; mortarSkill.baseRechargeInterval = 20f; EnterSkyLeap.extraFusePerSkyLeapBomb = 5f; UltExitState.requiredKarmaForSpires = 8; } public void ModifyProjectiles() { //IL_002d: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) flamePillarPrefab.GetComponent<ProjectileDotZone>().lifetime = float.PositiveInfinity; ParticleSystem[] componentsInChildren = shockwaveGhost.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val in componentsInChildren) { MainModule main = val.main; ((MainModule)(ref main)).duration = 6f; ((MainModule)(ref main)).maxParticles = ((MainModule)(ref main)).maxParticles * 2; } ParticleSystemRenderer[] componentsInChildren2 = shockwaveGhost.GetComponentsInChildren<ParticleSystemRenderer>(); Color val3 = default(Color); Color val4 = default(Color); foreach (ParticleSystemRenderer val2 in componentsInChildren2) { ((Color)(ref val3))..ctor(0.4f, 0.6f, 1f, 1f); ((Color)(ref val4))..ctor(0.3f, 0.4f, 1f, 1f); Material[] materials = ((Renderer)val2).materials; foreach (Material val5 in materials) { val5.color = val3; val5.SetColor("_MainColor", val3); val5.SetColor("_Color", val3); val5.SetColor("_TintColor", val4); } val2.maxParticleSize *= 2f; val2.minParticleSize *= 2f; } ConvertToShockwave(shockwavePrefab); shockwavePrefab.GetComponent<ProjectileShockwaveController>().lifetime = 6f; ShockwaveScale(shockwavePrefab); shockwaveGhost.GetComponent<ProjectileGhostController>().inheritScaleFromProjectile = true; ModifyShard(shardPrefab); ModifyShard(shardPrefab2); ModifyShard(Projectiles.hurtSpikePrefab); Object.DestroyImmediate((Object)(object)Projectiles.hurtSpikePrefab.GetComponent<ProjectileIncreaseSpeedOverTime>()); Transform val6 = ultLineGhost.transform.Find("Size"); if ((Object)(object)val6 != (Object)null) { Log.Message("Success!"); Transform val7 = val6.Find("IndicatorFX"); if ((Object)(object)val7 != (Object)null) { Log.Message("Success!"); Transform val8 = val7.Find("Decal"); if ((Object)(object)val8 != (Object)null) { Log.Message("Success!"); Object.DestroyImmediate((Object)(object)((Component)val8).gameObject); } } } ShakeEmitter component = crystalBlastPrefab.GetComponent<ShakeEmitter>(); component.wave.amplitude *= 0.5f; } public void ConvertToShockwave(GameObject wavePrefab) { ProjectileShockwaveController projectileShockwaveController = wavePrefab.AddComponent<ProjectileShockwaveController>(); projectileShockwaveController.velocity = 60f; projectileShockwaveController.lifetime = wavePrefab.GetComponent<ProjectileCharacterController>().lifetime; Object.DestroyImmediate((Object)(object)wavePrefab.GetComponent<ProjectileCharacterController>()); Object.DestroyImmediate((Object)(object)wavePrefab.GetComponent<CharacterController>()); } public void ShockwaveScale(GameObject wavePrefab) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) wavePrefab.transform.localScale = new Vector3(0.1f, 1f, 0.1f); ProjectileScaleOverLifetime val = wavePrefab.AddComponent<ProjectileScaleOverLifetime>(); val.expandX = true; val.expandY = false; val.expandZ = true; val.scaleRate = 1f; val.maxXScale = 5f; val.maxYScale = 1f; val.maxZScale = 5f; } public void ModifyShard(GameObject prefab) { //IL_0018: Unknown result type (might be due to invalid IL or missing