using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.BrotherMonster; using EntityStates.BrotherMonster.Weapon; using EntityStates.BrotherMonster.Weapon.LunarGolem; using EntityStates.GolemMonster; using EntityStates.LunarExploderMonster; using EntityStates.Missions.BrotherEncounter; using EntityStates.NewtMonster; using HG; using HarmonyLib; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using On.RoR2; using PrimordialMithrix.Changes; using PrimordialMithrix.Modules; using R2API; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.AsyncManagement; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.EntityLogic; using RoR2.ExpansionManagement; using RoR2.Karma; using RoR2.Orbs; using RoR2.PostProcessing; using RoR2.Projectile; using RoR2.Skills; using RoR2BepInExPack.GameAssetPathsBetter; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("RoR2")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("PrimordialMithrix")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("PrimordialMithrix")] [assembly: AssemblyTitle("PrimordialMithrix")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace PrimordialMithrix { internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [BepInPlugin("com.Bloonjitsu7.PrimordialMithrix", "PrimordialMithrix", "0.2.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class PrimordialMithrixPlugin : BaseUnityPlugin { public static PluginInfo PInfo { get; private set; } public void Awake() { PInfo = ((BaseUnityPlugin)this).Info; Log.Init(((BaseUnityPlugin)this).Logger); new ContentPacks().Initialize(); Config.cfg = ((BaseUnityPlugin)this).Config; Config.SetupConfig(); new Main().Initialize(); } } public static class Config { public static ConfigFile cfg; public static void SetupConfig() { } } } namespace PrimordialMithrix.Modules { public static class DamageTypes { public static ModdedDamageType damagePrimordialMithrix = DamageAPI.ReserveDamageType(); } public static class Utils { public static List GetAnonymousMethods(Type t, string methodName) { List list = new List(); Type[] nestedTypes = t.GetNestedTypes((BindingFlags)(-1)); Type[] array = nestedTypes; foreach (Type type in array) { if (!type.Name.Contains("<>")) { continue; } MethodInfo[] methods = type.GetMethods((BindingFlags)(-1)); foreach (MethodInfo methodInfo in methods) { if (methodInfo.Name.Contains(methodName)) { list.Add(methodInfo); } } } MethodInfo[] methods2 = t.GetMethods((BindingFlags)(-1)); foreach (MethodInfo methodInfo2 in methods2) { if (methodInfo2.Name.Contains("<") && methodInfo2.Name.Contains(methodName)) { list.Add(methodInfo2); } } return list.OrderBy((MethodInfo m) => m.Name).ToList(); } public static void DumpComponents(GameObject gameObject) { Component[] componentsInChildren = gameObject.GetComponentsInChildren(typeof(Component)); foreach (Component data in componentsInChildren) { Log.Message(data); } } public static string GetStackDesc(float num, string type) { if (num > 0f) { return $" (+{num}{type} per stack)"; } if (num < 0f) { return $" ({num}{type} per stack)"; } return ""; } public static void OrigOnEnter(BaseState self) { if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { self.attackSpeedStat = ((EntityState)self).characterBody.attackSpeed; self.damageStat = ((EntityState)self).characterBody.damage; self.critStat = ((EntityState)self).characterBody.crit; self.moveSpeedStat = ((EntityState)self).characterBody.moveSpeed; } } public static float GetStackedStats(float baseStat, float stackStat, int itemCount) { return baseStat - stackStat + stackStat * (float)itemCount; } public static int GetStackedStatsInt(int baseStat, int stackStat, int itemCount) { return baseStat - stackStat + stackStat * itemCount; } public static float ConvertReductionIntoStackingDivision(float baseFraction, int itemCount) { float num = 1f - baseFraction; float num2 = (1f + num) / num - 2f; num2 *= (float)(itemCount - 1); return num2 + 1f; } public static void AddDecayingBuff(CharacterBody body, BuffIndex buffIndex, float duration, float decayRate, int maxStacks = int.MaxValue) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)body != (Object)null)) { return; } if (body.GetBuffCount(buffIndex) < maxStacks) { body.AddTimedBuff(buffIndex, duration); } int num = 0; foreach (TimedBuff timedBuff in body.timedBuffs) { if (timedBuff.buffIndex == buffIndex) { timedBuff.totalDuration = duration + decayRate * (float)num; timedBuff.timer = duration + decayRate * (float)num; num++; } } } public static T GetOrAddComponent(this GameObject gameObject) where T : Component { T val = gameObject.GetComponent(); if ((Object)(object)val == (Object)null) { val = gameObject.AddComponent(); } return val; } } public static class Assets { public static AssetBundle mainBundle; public const string bundleName = "PrimordialMithrixAssets.bundle"; public const string assetBundleFolder = "assetbundles"; public static string AssetBundlePath => Path.Combine(Path.GetDirectoryName(PrimordialMithrixPlugin.PInfo.Location), "PrimordialMithrixAssets.bundle"); public static string AssetString => "Assets/PrimordialMithrixAssets/"; public static void Init() { mainBundle = AssetBundle.LoadFromFile(AssetBundlePath); } } public static class Projectiles { public static GameObject flamePillarMovingPrefab; public static GameObject hammerFirePrefab; public static GameObject hurtSpikePrefab; public static GameObject shockwaveCrawlerLeft; public static GameObject shockwaveCrawlerRight; public static GameObject fistCrystalWavePrefab; public static GameObject fireRingCrystalPrefab; internal static List projectilePrefabs = new List(); 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((object)RoR2_Base_Brother_Karma.KarmaSpikeCrawler__XXSmall__Spiraling_prefab).WaitForCompletion(), "BloonMithrixFireRingCrystalPrefab", true); ProjectileFireChildren component = val.GetComponent(); component.count -= 3; component.duration += 0.5f; RotateAroundAxis component2 = val.GetComponent(); 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((object)RoR2_Base_Brother.BrotherSunderWave__Energized_prefab).WaitForCompletion(), "BloonMithrixFistCrystalWave", true); ProjectileFireChildren component = Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.KarmaSpikeCrawler__XXSmall__Spiraling_prefab).WaitForCompletion().GetComponent(); ProjectileFireChildren val2 = val.AddComponent(); 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((object)RoR2_Base_Brother_Karma.LunarCrawlerLeft_prefab).WaitForCompletion(), "BloonMithrixShockwaveCrawlerLeft", true); Object.DestroyImmediate((Object)(object)val.GetComponent()); Object.DestroyImmediate((Object)(object)val.GetComponent()); Object.DestroyImmediate((Object)(object)val.GetComponent()); ProjectileController component = val.GetComponent(); component.ghostPrefab = Effects.crawlerGhostPrefab; component.ghostPrefabAddress = null; ProjectileDotZone component2 = val.GetComponent(); component2.damageCoefficient = 1f; component2.fireFrequency = 20f; component2.resetFrequency = 2f; component2.overlapProcCoefficient = 0.5f; component2.lifetime = 5f; component2.impactEffect = null; Main.ProjectileShockwaveRotationController projectileShockwaveRotationController = val.AddComponent(); projectileShockwaveRotationController.rotationSpeed = -20f; projectileShockwaveRotationController.velocity = 60f; projectileShockwaveRotationController.lifetime = 5f; shockwaveCrawlerLeft = val; GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.LunarCrawlerRight_prefab).WaitForCompletion(), "BloonMithrixShockwaveCrawlerRight", true); Object.DestroyImmediate((Object)(object)val2.GetComponent()); Object.DestroyImmediate((Object)(object)val2.GetComponent()); Object.DestroyImmediate((Object)(object)val2.GetComponent()); ProjectileController component3 = val2.GetComponent(); component3.ghostPrefab = Effects.crawlerGhostPrefab; component3.ghostPrefabAddress = null; ProjectileDotZone component4 = val2.GetComponent(); component4.damageCoefficient = 1f; component4.fireFrequency = 20f; component4.resetFrequency = 2f; component4.overlapProcCoefficient = 0.5f; component4.lifetime = 5f; component4.impactEffect = null; Main.ProjectileShockwaveRotationController projectileShockwaveRotationController2 = val2.AddComponent(); 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((object)"RoR2/DLC2/FalseSonBoss/FalseSonFissurePillar.prefab").WaitForCompletion(), "BloonMithrixFlamePillarMoving", true); ProjectileController component = val.GetComponent(); component.ghostPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Brother/BrotherFirePillarGhost.prefab").WaitForCompletion(); component.ghostPrefabAddress = null; ProjectileDotZone component2 = val.GetComponent(); 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((object)RoR2_Base_LunarExploder.LunarExploderProjectileDotZone_prefab).WaitForCompletion(), "BloonMithrixHammerFirePool", true); Transform transform = val.transform; transform.localScale *= 1.25f; ProjectileDotZone component = val.GetComponent(); 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((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().damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1); } } public static class Buffs { public static BuffDef GravityDebuff; public static BuffDef GravityIntenseDebuff; public static BuffDef CrippleFogDebuff; public static BuffDef FireWaveBuff; private static Sprite gravityIcon = Addressables.LoadAssetAsync((object)RoR2_Base_Treebot.texBuffWeakIcon_tif).WaitForCompletion(); private static Sprite crippleIcon = Addressables.LoadAssetAsync((object)RoR2_Base_Common.texBuffCrippleIcon_tif).WaitForCompletion(); internal static List buffDefs = new List(); public static void CreateBuffs() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) GravityDebuff = AddNewBuff("BloonMithrixGravityDebuff", gravityIcon, new Color(0.3f, 0.2f, 1f, 1f), canStack: false, isDebuff: true, isCooldown: false, isHidden: false, ignoreNectar: false, isPercent: false, isDOT: false, (Flags)0); GravityIntenseDebuff = AddNewBuff("BloonMithrixGravityIntenseDebuff", gravityIcon, new Color(0.3f, 0.2f, 1f, 1f), canStack: false, isDebuff: true, isCooldown: false, isHidden: false, ignoreNectar: false, isPercent: false, isDOT: false, (Flags)0); CrippleFogDebuff = AddNewBuff("BloonCrippleFogDebuff", crippleIcon, new Color(0.3f, 0.3f, 1f, 1f), canStack: false, isDebuff: true, isCooldown: false, isHidden: false, ignoreNectar: false, isPercent: false, isDOT: false, (Flags)0); FireWaveBuff = AddNewBuff("BloonFireWaveBuff", crippleIcon, new Color(0.3f, 0.3f, 1f, 1f), canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreNectar: false, isPercent: false, isDOT: false, (Flags)0); } internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack = false, bool isDebuff = false, bool isCooldown = false, bool isHidden = false, bool ignoreNectar = false, bool isPercent = false, bool isDOT = false, Flags buffFlag = (Flags)0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); ((Object)val).name = buffName; val.buffColor = buffColor; val.canStack = canStack; val.isDebuff = isDebuff; val.eliteDef = null; val.iconSprite = buffIcon; val.isCooldown = isCooldown; val.isHidden = isHidden; val.ignoreGrowthNectar = ignoreNectar; val.flags = buffFlag; val.stackingDisplayMethod = (StackingDisplayMethod)(isPercent ? 1 : 0); val.isDOT = isDOT; buffDefs.Add(val); return val; } } public static class Effects { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static EffectCondition <>9__13_0; internal bool b__13_0(CharacterBody body) { return body.HasBuff(Buffs.GravityIntenseDebuff); } } public static GameObject hammerBlastPrefab; public static GameObject pillarWarningEffect; public static GameObject gravityImpactEffect; public static GameObject gravityCleanseEffect; public static GameObject gravityOrbEffect; public static GameObject gravityOrbArrivalEffect; public static GameObject gravityIntenseEffect; public static GameObject fireWaveEffect; public static GameObject fireWaveEffect2; public static GameObject crawlerGhostPrefab; public static GameObject shockwaveEffect; public static GameObject golemLaserEffect = Addressables.LoadAssetAsync((object)RoR2_DLC3_VultureHunter.VultureHunterAimLaser_prefab).WaitForCompletion(); public static List effectDefs = new List(); internal static void RegisterEffects() { hammerBlastPrefab = CreateHammerBlastEffect(); pillarWarningEffect = CreatePillarWarningEffect(); gravityImpactEffect = CreateGravityImpactEffect(); gravityCleanseEffect = CreateGravityCleanseEffect(); gravityOrbEffect = CreateGravityOrbEffect(); gravityOrbArrivalEffect = CreateGravityOrbArrivalEffect(); gravityIntenseEffect = CreateGravityIntenseEffect(); fireWaveEffect = CreateFireWaveEffect(); fireWaveEffect2 = CreateFireWaveEffect2(); crawlerGhostPrefab = CreateCrawlerGhost(); shockwaveEffect = CreateShockwaveEffect(); Utils.DumpComponents(golemLaserEffect); } private static GameObject CreateGravityIntenseEffect() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneObject(RoR2_DLC3_Items_TransferDebuffOnHit.TransferDebuffPassiveEffect_prefab, "BloonMithrixGravityIntenseEffect", new Color(0.6f, 0.7f, 1f, 1f), new Color(0.55f, 0.6f, 1f, 1f)); Transform val2 = val.transform.Find("Visuals"); if ((Object)(object)val2 != (Object)null) { Transform val3 = val2.Find("Gravity Bits"); if ((Object)(object)val3 != (Object)null) { Log.Message("Gravity Success!!"); ParticleSystem component = ((Component)val3).GetComponent(); MainModule main = component.main; ((MainModule)(ref main)).simulationSpeed = ((MainModule)(ref main)).simulationSpeed * 1.35f; } } Utils.DumpComponents(val); val.GetOrAddComponent(); object obj = <>c.<>9__13_0; if (obj == null) { EffectCondition val4 = (CharacterBody body) => body.HasBuff(Buffs.GravityIntenseDebuff); <>c.<>9__13_0 = val4; obj = (object)val4; } TempVisualEffectAPI.AddTemporaryVisualEffect(val, (EffectCondition)obj, false, ""); return val; } private static GameObject CreateShockwaveEffect() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) return CloneObject(RoR2_Base_Common_VFX.OmniExplosionVFXSoft_prefab, "BloonMithrixShockwaveEffect", new Color(0.5f, 0.7f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 1f, 0f, colorMesh: true, "", parentToTransform: false, recolor: true, overrideEffect: true); } private static GameObject CreateCrawlerGhost() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneObject(RoR2_Base_Brother_Karma.LunarCrawlerGhost_prefab, "BloonMithrixCrawlerGhostPrefab", new Color(0.3f, 0.5f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 1f, 0f, colorMesh: true, "", parentToTransform: false, recolor: false); Transform val2 = val.transform.Find("Container"); if ((Object)(object)val2 != (Object)null) { Transform val3 = val2.Find("Dust"); if ((Object)(object)val3 != (Object)null) { Object.DestroyImmediate((Object)(object)((Component)val3).gameObject); } Transform val4 = ((Component)val2).transform.Find("Debris"); if ((Object)(object)val4 != (Object)null) { Object.DestroyImmediate((Object)(object)((Component)val4).gameObject); } } return val; } private static GameObject CreateFireWaveEffect2() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) return CloneObject(RoR2_DLC2_Items_ExtraStatsOnLevelUp.ExtraStatsOnLevelUpEffect_prefab, "BloonMithrixFireWaveEffect2", new Color(0.5f, 0.7f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 1.25f, 0f, colorMesh: true, "Play_voidJailer_death", parentToTransform: false, recolor: true, overrideEffect: true); } private static GameObject CreateFireWaveEffect() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) return CloneObject(RoR2_DLC2_Seeker.Meditate7thGateVFX_prefab, "BloonMithrixFireWaveEffect", new Color(0.5f, 0.7f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 0.75f, 0f, colorMesh: true, "Play_voidDevastator_spawn_close", parentToTransform: false, recolor: true, overrideEffect: true); } private static GameObject CreateGravityOrbArrivalEffect() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) return CloneObject(RoR2_Base_Common_VFX.OmniImpactVFXLightning_prefab, "BloonMithrixGravityOrbArrivalEffect", new Color(0.5f, 0.7f, 1f, 1f), new Color(0.2f, 0.3f, 1f, 1f)); } private static GameObject CreateGravityOrbEffect() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) return CloneObject(RoR2_Base_LunarSkillReplacements.LunarDetonatorOrbEffect_prefab, "BloonMithrixGravityOrbEffect", new Color(0.4f, 0.6f, 1f, 1f), new Color(0.4f, 0.6f, 1f, 1f), 2f); } private static GameObject CreateGravityCleanseEffect() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneObject(RoR2_Base_Brother_Karma.LunarGolemDisappearFX_prefab, "BloonMithrixGravityCleanseEffect", new Color(0.3f, 0.5f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 0.5f, 0f, colorMesh: true, "Play_env_meridian_geode_cleanse_debuff", parentToTransform: false, recolor: true, overrideEffect: true); Transform transform = val.transform; transform.localScale *= 0.6f; Utils.DumpComponents(val); Object.DestroyImmediate((Object)(object)((Component)val.transform.Find("Motes, After Image")).gameObject); ParticleSystemRenderer[] componentsInChildren = val.GetComponentsInChildren(); foreach (ParticleSystemRenderer val2 in componentsInChildren) { val2.minParticleSize *= 0.5f; val2.maxParticleSize *= 0.5f; } ParticleSystem[] componentsInChildren2 = val.GetComponentsInChildren(); foreach (ParticleSystem val3 in componentsInChildren2) { MainModule main = val3.main; } val.AddComponent(); return val; } private static GameObject CreateGravityCleanseEffectOld3() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) return CloneObject(RoR2_Base_Medkit.MedkitHealEffect_prefab, "BloonMithrixGravityCleanseEffect", new Color(0.3f, 0.5f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 1f, 0f, colorMesh: true, "Play_env_meridian_geode_cleanse_debuff", parentToTransform: false, recolor: true, overrideEffect: true); } private static GameObject CreateGravityCleanseEffectOld2() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneObject(RoR2_Base_Common_VFX.LightningFlash_prefab, "BloonMithrixGravityCleanseEffect", new Color(0.3f, 0.5f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 1f, 0f, colorMesh: true, "Play_env_meridian_geode_cleanse_debuff", parentToTransform: false, recolor: true, overrideEffect: true); val.AddComponent(); Transform transform = val.transform; transform.localScale *= 2f; DestroyOnTimer[] componentsInChildren = val.GetComponentsInChildren(); foreach (DestroyOnTimer val2 in componentsInChildren) { val2.duration = 1.5f; } ParticleSystem component = val.GetComponent(); MainModule main = component.main; MinMaxCurve startLifetime = default(MinMaxCurve); ((MinMaxCurve)(ref startLifetime)).mode = (ParticleSystemCurveMode)0; ((MinMaxCurve)(ref startLifetime)).constant = 0.6f; ((MainModule)(ref main)).startLifetime = startLifetime; return val; } private static GameObject CreateGravityCleanseEffectOld() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneObject(RoR2_Base_moon2.MoonBatteryDesignPulse_prefab, "BloonMithrixGravityCleanseEffect", new Color(0.3f, 0.5f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f), 0.5f, 0f, colorMesh: true, "Play_env_meridian_geode_cleanse_debuff", parentToTransform: false, recolor: true, overrideEffect: true); GameObject val2 = CloneObject(RoR2_Base_moon2.MoonBatteryDesignPulse_prefab, "BloonMithrixGravityCleanseChildEffect", new Color(0.3f, 0.5f, 1f, 1f), new Color(0.3f, 0.5f, 1f, 1f)); PulseController component = val.GetComponent(); 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(); 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()); DestroyOnTimer component = val.GetComponent(); Log.Message(component.duration); component.duration = 1f; DelayedEvent component2 = val.GetComponent(); 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()); ProjectileScaleOverLifetime val2 = val.AddComponent(); val2.maxXScale = 5f; val2.maxZScale = 5f; val2.expandX = true; val2.expandZ = true; val2.scaleRate = 7.5f; DestroyOnTimer val3 = val.AddComponent(); val3.duration = 0.75f; return val; } private static GameObject CreateTracer() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) GameObject val = CloneTracer("RoR2/Base/Huntress/TracerHuntressSnipe.prefab", "TracerStormboundAurelioniteLaser", Color.red, new Color(1f, 0.04f, 0.04f, 1f), 2f); Object.Destroy((Object)(object)((Component)val.transform.Find("TracerHead")).gameObject); return val; } private static GameObject CloneObject(string originalObjectName, string newObjectName, Color color1, Color color2, float scaleMult = 1f, float colorTemp = 0f, bool colorMesh = true, string soundName = "", bool parentToTransform = false, bool recolor = true, bool overrideEffect = false, bool isTempVFX = false) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((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() == (Object)null) { val2.AddComponent(); } if ((Object)(object)val2.GetComponent() == (Object)null) { val2.AddComponent(); } val2.GetComponent().vfxPriority = (VFXPriority)2; val2.GetComponent().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((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())) { val2.AddComponent(); } if (!Object.op_Implicit((Object)(object)val2.GetComponent())) { val2.AddComponent(); } val2.GetComponent().vfxPriority = (VFXPriority)2; val2.GetComponent().DoNotPool = true; if (!Object.op_Implicit((Object)(object)val2.GetComponent())) { val2.AddComponent(); } val2.GetComponent().speed = (speed.HasValue ? speed.Value : val2.GetComponent().speed); val2.GetComponent().length = (length.HasValue ? length.Value : val2.GetComponent().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(); 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(); 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(); 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(); 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(); 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(); 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(); 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(); foreach (Light val2 in componentsInChildren2) { val2.range *= widthMult; } ParticleSystemRenderer[] componentsInChildren3 = thingToColor.GetComponentsInChildren(); foreach (ParticleSystemRenderer val3 in componentsInChildren3) { val3.maxParticleSize *= widthMult; val3.minParticleSize *= widthMult; } LineRenderer[] componentsInChildren4 = thingToColor.GetComponentsInChildren(); foreach (LineRenderer val4 in componentsInChildren4) { val4.widthMultiplier *= widthMult; } TrailRenderer[] componentsInChildren5 = thingToColor.GetComponentsInChildren(); 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(); if ((Object)(object)val == (Object)null) { val = effectPrefab.AddComponent(); } 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().duration = 6f; newEffect.AddComponent(); if (!Object.op_Implicit((Object)(object)newEffect.GetComponent())) { newEffect.AddComponent().vfxPriority = (VFXPriority)2; } EffectComponent component = newEffect.GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { component = newEffect.AddComponent(); component.applyScale = true; component.effectIndex = (EffectIndex)(-1); component.parentToReferencedTransform = parentToTransform; component.positionAtReferencedTransform = true; component.soundName = soundName; } else if (overrideEffect) { component.applyScale = true; component.effectIndex = (EffectIndex)(-1); component.parentToReferencedTransform = parentToTransform; component.positionAtReferencedTransform = true; component.soundName = soundName; } CreateAndAddEffectDef(newEffect); } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public string identifier => "com.Bloonjitsu7.PrimordialMithrix"; public void Initialize() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown Assets.Init(); Effects.RegisterEffects(); Projectiles.RegisterProjectiles(); ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; contentPack.effectDefs.Add(Effects.effectDefs.ToArray()); contentPack.buffDefs.Add(Buffs.buffDefs.ToArray()); contentPack.projectilePrefabs.Add(Projectiles.projectilePrefabs.ToArray()); args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } } namespace PrimordialMithrix.Changes { public class Main { public class GolemLaserManager : MonoBehaviour { public GameObject[] laserEffects = (GameObject[])(object)new GameObject[4]; public LineRenderer[] laserLines = (LineRenderer[])(object)new LineRenderer[4]; public Vector3[] laserDirections = (Vector3[])(object)new Vector3[4]; public Vector3[] laserPoints = (Vector3[])(object)new Vector3[4]; public float[] flashTimers = new float[4]; public bool[] laserStates = new bool[4]; public CharacterBody targetBody; public float flashTimer; public bool laserOn; } public static class ConstructManager { public static CharacterMaster construct1; public static CharacterMaster construct2; public static CharacterMaster construct3; public static CharacterMaster construct4; public static int[] constructIndexes = new int[4] { 0, 1, 2, 3 }; public static List constructs = new List { construct1, construct2, construct3, construct4 }; public static void SpawnConstructs(int count = 4) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) Util.ShuffleArray(constructIndexes); int num = 0; for (int i = 0; i < 4; i++) { int num2 = constructIndexes[i]; if ((Object)(object)constructs[num2] == (Object)null) { num++; GameObject spawnedInstance = ((SpawnCard)exploderSpawnCard).DoSpawn(exploderPositions[num2], Quaternion.identity, new DirectorSpawnRequest((SpawnCard)(object)exploderSpawnCard, new DirectorPlacementRule { placementMode = (PlacementMode)0 }, Run.instance.runRNG) { teamIndexOverride = (TeamIndex)2 }).spawnedInstance; NetworkServer.Spawn(spawnedInstance); constructs[num2] = spawnedInstance.gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)constructs[num2])) { Inventory inventory = constructs[num2].inventory; if (Object.op_Implicit((Object)(object)inventory)) { inventory.GiveItemPermanent(Items.BoostHp, 5); inventory.GiveItemPermanent(Items.BoostDamage, 5); inventory.GiveItemPermanent(Items.BoostCharacterScale, 25); inventory.SetEquipmentIndex(Equipment.AffixLunar.equipmentIndex); if (KarmaManager.instance.GetEffectiveKarma() >= 7) { inventory.GiveItemPermanent(Items.OutOfCombatArmor, 3); } } } } if (num >= count) { break; } } } } public class ProjectileShockwaveRotationController : MonoBehaviour { public float velocity; public float rotationSpeed; public float lifetime = 6f; public float currentAngle; public float currentRadius = 0f; private float timer; private ProjectileController projectileController; private Vector3 orbitPoint; private void Awake() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) projectileController = ((Component)this).GetComponent(); orbitPoint = ((Component)this).transform.position; currentAngle = Mathf.Atan2(((Component)this).transform.forward.x, ((Component)this).transform.forward.z) * 57.29578f; } public Vector3 GetPointOnCircle(Vector3 center, float radius, float angle) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) float num = angle * (MathF.PI / 180f); float num2 = center.x + radius * Mathf.Cos(num); float num3 = center.z + radius * Mathf.Sin(num); return new Vector3(num2, center.y, num3); } private void FixedUpdate() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { currentAngle += rotationSpeed * Time.fixedDeltaTime; currentRadius += velocity * Time.fixedDeltaTime; ((Component)this).transform.position = GetPointOnCircle(orbitPoint, currentRadius, currentAngle); Ray val = new Ray(((Component)this).transform.position + Vector3.up * 5f, Vector3.down); LayerIndex world = LayerIndex.world; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(val, ref val2, 30f, LayerMask.op_Implicit(((LayerIndex)(ref world)).mask), (QueryTriggerInteraction)1)) { ((Component)this).transform.position = ((RaycastHit)(ref val2)).point; } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } if (NetworkServer.active) { timer += Time.fixedDeltaTime; if (timer > lifetime) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } } public class ProjectileShockwaveController : MonoBehaviour { public float velocity; public float lifetime = 6f; public float distanceStopwatch; public float heightLeniancy = 5f; private float timer; private ProjectileController projectileController; public GameObject projectileCloneUp; public GameObject projectileCloneDown; private void Awake() { projectileController = ((Component)this).GetComponent(); } private void FixedUpdate() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { Vector3 val = ((Component)this).transform.forward * (velocity * Time.fixedDeltaTime); Transform transform = ((Component)this).transform; transform.position += val; Ray val2 = new Ray(((Component)this).transform.position + Vector3.up * heightLeniancy, Vector3.down); float num = 25f + heightLeniancy; LayerIndex world = LayerIndex.world; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(val2, ref val3, num, LayerMask.op_Implicit(((LayerIndex)(ref world)).mask), (QueryTriggerInteraction)1)) { ((Component)this).transform.position = ((RaycastHit)(ref val3)).point; } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } if (NetworkServer.active) { timer += Time.fixedDeltaTime; if (timer > lifetime) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } private FireProjectileInfo CloneProjectile() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) ProjectileDamage component = ((Component)this).gameObject.GetComponent(); FireProjectileInfo result = new FireProjectileInfo { force = component.force, crit = component.crit, damage = component.damage }; ((FireProjectileInfo)(ref result)).speedOverride = velocity; result.owner = projectileController.owner; result.damageTypeOverride = component.damageType; result.damageColorIndex = component.damageColorIndex; result.rotation = Util.QuaternionSafeLookRotation(((Component)this).transform.forward); result.procChainMask = projectileController.procChainMask; result.projectilePrefab = ((Component)this).gameObject; return result; } } public class PillarManager : MonoBehaviour { public float stopwatch; public float delay; public bool active; public void FixedUpdate() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) if (active) { stopwatch += Time.fixedDeltaTime; if (stopwatch > 4f + delay) { ((Component)this).gameObject.SetActive(false); } else if (stopwatch > delay) { Vector3 position = ((Component)this).transform.position; position.y -= (20f + (stopwatch - delay) * 10f) * Time.fixedDeltaTime; ((Component)this).transform.position = position; } } } } public class GravityCleanseEffectManager : MonoBehaviour { public CharacterBody body; public void Start() { Util.PlaySound("Play_env_meridian_geode_cleanse_debuff", ((Component)this).gameObject); } public void FixedUpdate() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)body == (Object)null)) { ((Component)this).gameObject.transform.position = body.footPosition; } } } public class GravityManager : MonoBehaviour { public CharacterBody body; public CharacterBody attackerBody; public float stopwatch; public static float duration = 3f; public void FixedUpdate() { //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Expected O, but got Unknown //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Expected O, but got Unknown //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || !Object.op_Implicit((Object)(object)body) || (!body.HasBuff(Buffs.GravityDebuff) && !body.HasBuff(Buffs.GravityIntenseDebuff))) { return; } if (!Object.op_Implicit((Object)(object)body.characterMotor)) { body.RemoveBuff(Buffs.GravityDebuff); body.RemoveBuff(Buffs.GravityIntenseDebuff); stopwatch = 0f; return; } if (stopwatch == 0f) { EffectData val = new EffectData { origin = body.transform.position, scale = 6f }; val.SetNetworkedObjectReference(((Component)body).gameObject); EffectManager.SpawnEffect(Effects.gravityOrbArrivalEffect, val, true); } stopwatch += Time.fixedDeltaTime; if (stopwatch >= duration && !body.HasBuff(Buffs.GravityIntenseDebuff)) { body.RemoveBuff(Buffs.GravityDebuff); body.AddBuff(Buffs.GravityIntenseDebuff); } if (body.characterMotor.isGrounded) { body.RemoveBuff(Buffs.GravityDebuff); body.RemoveBuff(Buffs.GravityIntenseDebuff); if (stopwatch >= duration && (Object)(object)attackerBody != (Object)null && Object.op_Implicit((Object)(object)body.healthComponent) && body.healthComponent.alive) { float num = (stopwatch - duration) * 0.3f + 0.1f; float damage = body.healthComponent.fullCombinedHealth * num; DamageType val2 = (DamageType)4194306; DamageInfo val3 = new DamageInfo { damage = damage, position = body.transform.position, attacker = ((Component)attackerBody).gameObject, crit = false, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit(val2), (DamageTypeExtended)0, (DamageSource)0), damageColorIndex = (DamageColorIndex)16, inflictor = ((Component)attackerBody).gameObject, procCoefficient = 0f, procChainMask = default(ProcChainMask) }; EffectData val4 = new EffectData { origin = body.transform.position }; EffectManager.SpawnEffect(Effects.gravityImpactEffect, val4, true); body.healthComponent.TakeDamage(val3); } else if ((Object)(object)body.modelLocator != (Object)null && (Object)(object)body.modelLocator.modelTransform != (Object)null) { GameObject val5 = Object.Instantiate(Effects.gravityCleanseEffect, body.transform.position, Quaternion.identity); val5.GetComponent().body = body; NetworkServer.Spawn(val5); } stopwatch = 0f; } else if (stopwatch >= duration) { body.characterMotor.ApplyForce(Vector3.down * stopwatch * 6000f * Time.fixedDeltaTime, false, false); } else { body.characterMotor.ApplyForce(Vector3.down * stopwatch * 3000f * Time.fixedDeltaTime, false, false); } } } public class GravityOrb : Orb { public CharacterBody targetBody; public CharacterBody attackerBody; private static GameObject orbEffect = Addressables.LoadAssetAsync((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(); if ((Object)(object)gravityManager == (Object)null) { gravityManager = ((Component)targetBody).gameObject.AddComponent(); } gravityManager.body = targetBody; gravityManager.attackerBody = attackerBody; ((Orb)this).duration = Mathf.Max(0.02f * ((Orb)this).distanceToTarget, ((Orb)this).duration); EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(Effects.gravityOrbEffect, val, true); } } public override void OnArrival() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)targetBody != (Object)null && !targetBody.HasBuff(Buffs.GravityIntenseDebuff)) { if (Object.op_Implicit((Object)(object)targetBody.characterMotor) && !targetBody.characterMotor.isGrounded) { targetBody.AddBuff(Buffs.GravityDebuff); return; } GameObject val = Object.Instantiate(Effects.gravityCleanseEffect, targetBody.transform.position, Quaternion.identity); val.GetComponent().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((object)RoR2_Base_Brother.BrotherSunderWave_prefab).WaitForCompletion(); private static GameObject shockwaveGhost = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.BrotherSunderWaveGhost_prefab).WaitForCompletion(); private static GameObject shockwavePrefab2 = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.BrotherSunderWave__Energized_prefab).WaitForCompletion(); private static GameObject shockwaveGhost2 = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.BrotherSunderWave__Energized_Ghost_prefab).WaitForCompletion(); private static GameObject shardPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.LunarShardProjectile_prefab).WaitForCompletion(); private static GameObject shardPrefab2 = Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.LunarShardProjectileKarma_prefab).WaitForCompletion(); private static GameObject ultLineGhost = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.BrotherUltLineGhost_prefab).WaitForCompletion(); private static GameObject ultTubePrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.BrotherUltTubeProjectile_prefab).WaitForCompletion(); private static GameObject flamePillarPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.BrotherFirePillar_prefab).WaitForCompletion(); private static GameObject crawlerPrefab1 = Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.LunarCrawlerLeft_prefab).WaitForCompletion(); private static GameObject crawlerPrefab2 = Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.LunarCrawlerRight_prefab).WaitForCompletion(); private static GameObject crawlerPrefab3 = Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.LunarCrawlerWeaponSlam_prefab).WaitForCompletion(); private static GameObject crawlerGhost = Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.LunarCrawlerGhost_prefab).WaitForCompletion(); private static GameObject crystalTrailPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.KarmaSpikeCrawler__XXSmall__Spiraling_prefab).WaitForCompletion(); private static GameObject crystalBlastPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.KarmaSpikeBreakEffect_prefab).WaitForCompletion(); private static GameObject crystalPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.KarmaSpikeXSmall_prefab).WaitForCompletion(); private static GameObject mithrixMaster = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.BrotherMaster_prefab).WaitForCompletion(); private static GameObject mithrixHurtMaster = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.BrotherHurtMaster_prefab).WaitForCompletion(); private static GameObject mithrixThroneMaster = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.BrotherThroneMaster_prefab).WaitForCompletion(); private static GameObject mithrixBody = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.BrotherBody_prefab).WaitForCompletion(); private static GameObject mithrixHurtBody = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.BrotherHurtBody_prefab).WaitForCompletion(); private static SkillDef bashSkill = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.SprintBash_asset).WaitForCompletion(); private static SkillDef giftSkill = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.ItemGift_asset).WaitForCompletion(); private static SkillDef fistSkill = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.FistSlam_asset).WaitForCompletion(); private static SkillDef spikeSkill2 = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.FireLunarShardsHurt_asset).WaitForCompletion(); private static SkillDef mortarSkill = Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.LunarExploderMortarStorm_asset).WaitForCompletion(); private static SkillDef wispSkill = Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.LunarWispAttack_asset).WaitForCompletion(); private static SkillDef laserSkill = Addressables.LoadAssetAsync((object)RoR2_Base_LunarGolem.LunarGolemBarrage_asset).WaitForCompletion(); private static BrotherUltPattern staticPattern = Addressables.LoadAssetAsync((object)RoR2_Base_Brother.Ult_default_asset).WaitForCompletion(); private static CharacterSpawnCard exploderSpawnCard = Addressables.LoadAssetAsync((object)RoR2_Base_LunarExploder.cscLunarExploder_asset).WaitForCompletion(); private static CharacterSpawnCard golemSpawnCard = Addressables.LoadAssetAsync((object)RoR2_Base_LunarGolem.cscLunarGolem_asset).WaitForCompletion(); private static CharacterSpawnCard wispSpawnCard = Addressables.LoadAssetAsync((object)RoR2_Base_LunarWisp.cscLunarWisp_asset).WaitForCompletion(); public static GameObject spawnPosPrefab = PrefabAPI.CreateEmptyPrefab("BloonMithrixSpawnPosPrefab"); public static GameObject fogPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_Base_arena.ArenaFogDamager_prefab).WaitForCompletion(), "BloonMithrixFogDamagePrefab"); public static GameObject zonePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC4.DreadFogSafeZone_prefab).WaitForCompletion(), "BloonMithrixFogSafeZonePrefab"); public static GameObject zonePrefab2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)RoR2_DLC4.DreadFogSafeZone_prefab).WaitForCompletion(), "BloonMithrixFogSafeZonePrefab2"); public static Material zoneMat = Addressables.LoadAssetAsync((object)RoR2_Base_moon.matMoonArenaWall_mat).WaitForCompletion(); public static Material zoneMat2 = Addressables.LoadAssetAsync((object)RoR2_Base_Brother_Karma.matLunarTornado_mat).WaitForCompletion(); public static List hooks = new List(); public static List ILhooks = new List(); public static Vector3[] exploderPositions = (Vector3[])(object)new Vector3[4] { new Vector3(65f, 524.3f, 155f), new Vector3(65f, 524.3f, -145f), new Vector3(-240f, 524.3f, 155f), new Vector3(-240f, 524.3f, -145f) }; public static Vector3[] bombPositions = (Vector3[])(object)new Vector3[18] { new Vector3(60f, 0f, 0f), new Vector3(-60f, 0f, 0f), new Vector3(30f, 0f, 54f), new Vector3(-30f, 0f, 54f), new Vector3(-30f, 0f, -54f), new Vector3(30f, 0f, -54f), new Vector3(0f, 0f, 90f), new Vector3(0f, 0f, -90f), new Vector3(81f, 0f, 45f), new Vector3(-81f, 0f, 45f), new Vector3(-81f, 0f, -45f), new Vector3(81f, 0f, -45f), new Vector3(120f, 0f, 0f), new Vector3(-120f, 0f, 0f), new Vector3(60f, 0f, 108f), new Vector3(-60f, 0f, 108f), new Vector3(-60f, 0f, -108f), new Vector3(60f, 0f, -108f) }; public static int waveCounter = 0; public static int pillarRingCount = 50; public static Vector3[] pizzaLocations = (Vector3[])(object)new Vector3[3] { new Vector3(10f, 0f, 30f), new Vector3(20f, 0f, -20f), new Vector3(-30f, 0f, -10f) }; public static int spawnCounter = 0; public FogDamageController fogDamageController; public GameObject safeZoneInstance; public GameObject safeZoneInstance2; public GameObject fogInstance; public float p4Stopwatch; public void Initialize() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Expected O, but got Unknown //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Expected O, but got Unknown //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Expected O, but got Unknown //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Expected O, but got Unknown //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Expected O, but got Unknown //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Expected O, but got Unknown //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Expected O, but got Unknown //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Expected O, but got Unknown //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Expected O, but got Unknown //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Expected O, but got Unknown //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Expected O, but got Unknown //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Expected O, but got Unknown //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Expected O, but got Unknown //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Expected O, but got Unknown //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Expected O, but got Unknown //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Expected O, but got Unknown //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Expected O, but got Unknown //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Expected O, but got Unknown //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Expected O, but got Unknown //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Expected O, but got Unknown //IL_05b7: Unknown result type (might be due to invalid IL or missing references) //IL_05c1: Expected O, but got Unknown //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Expected O, but got Unknown //IL_0623: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Expected O, but got Unknown //IL_0659: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Expected O, but got Unknown //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_0699: Expected O, but got Unknown //IL_06c5: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Expected O, but got Unknown //IL_06fb: Unknown result type (might be due to invalid IL or missing references) //IL_0705: Expected O, but got Unknown //IL_0731: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Expected O, but got Unknown //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_0771: Expected O, but got Unknown //IL_079d: Unknown result type (might be due to invalid IL or missing references) //IL_07a7: Expected O, but got Unknown //IL_07d3: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Expected O, but got Unknown //IL_0809: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Expected O, but got Unknown //IL_083f: Unknown result type (might be due to invalid IL or missing references) //IL_0849: Expected O, but got Unknown //IL_0875: Unknown result type (might be due to invalid IL or missing references) //IL_087f: Expected O, but got Unknown //IL_08ab: Unknown result type (might be due to invalid IL or missing references) //IL_08b5: Expected O, but got Unknown //IL_08e1: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Expected O, but got Unknown //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_0921: Expected O, but got Unknown //IL_094d: Unknown result type (might be due to invalid IL or missing references) //IL_0957: Expected O, but got Unknown //IL_0983: Unknown result type (might be due to invalid IL or missing references) //IL_098d: Expected O, but got Unknown //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_09c3: Expected O, but got Unknown //IL_09ef: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Expected O, but got Unknown //IL_0a25: Unknown result type (might be due to invalid IL or missing references) //IL_0a2f: Expected O, but got Unknown //IL_0a56: Unknown result type (might be due to invalid IL or missing references) //IL_0a60: Expected O, but got Unknown //IL_0a5b: Unknown result type (might be due to invalid IL or missing references) //IL_0a65: Expected O, but got Unknown //IL_0a91: Unknown result type (might be due to invalid IL or missing references) //IL_0a9b: Expected O, but got Unknown //IL_0ac7: Unknown result type (might be due to invalid IL or missing references) //IL_0ad1: Expected O, but got Unknown //IL_0afd: Unknown result type (might be due to invalid IL or missing references) //IL_0b07: Expected O, but got Unknown //IL_0b33: Unknown result type (might be due to invalid IL or missing references) //IL_0b3d: Expected O, but got Unknown //IL_0b69: Unknown result type (might be due to invalid IL or missing references) //IL_0b73: Expected O, but got Unknown LanguageAPI.Add("BLOON_MITHRIX_MAXKARMASUBTITLE", "God of Design"); for (int i = 0; i < staticPattern.projectileData.Length; i++) { ProjectileData val = staticPattern.projectileData[i]; Log.Message(val.projectileCount); staticPattern.projectileData[i].projectileCount = 4; staticPattern.projectileData[i].angleOffset = 90f; } Log.Message(mithrixHurtBody.GetComponent().baseMoveSpeed); mithrixHurtBody.GetComponent().baseMoveSpeed = 2f; mithrixBody.GetComponent().baseMaxHealth = 1200f; mithrixBody.GetComponent().levelMaxHealth = 360f; new KarmaTriggerChanges().Initialize(); Buffs.CreateBuffs(); CreateFogPrefab(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnRecalcStats); MethodInfo methodInfo = AccessTools.Method(typeof(HealthComponent), "TakeDamageProcess", (Type[])null, (Type[])null); ILhooks.Add(new ILHook((MethodBase)methodInfo, new Manipulator(IL_TakeDamageProcess))); SetStateOnHurt.SetFrozen += new hook_SetFrozen(OnSetFrozen); MethodInfo methodInfo2 = AccessTools.Method(typeof(CharacterBody), "RecalculateStats", (Type[])null, (Type[])null); ILhooks.Add(new ILHook((MethodBase)methodInfo2, new Manipulator(IL_RecalcStats))); MethodInfo methodInfo3 = AccessTools.Method(typeof(HealthComponent), "ServerFixedUpdate", (Type[])null, (Type[])null); ILhooks.Add(new ILHook((MethodBase)methodInfo3, new Manipulator(IL_HealthUpdate))); MethodInfo methodInfo4 = AccessTools.Method(typeof(GenericSkill), "RunRecharge", new Type[2] { typeof(float), typeof(bool) }, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo4, (Delegate)new Action, GenericSkill, float, bool>(OnSkillRecharge))); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); MethodInfo methodInfo5 = AccessTools.Method(typeof(BrotherEncounterPhaseBaseState), "OnMemberAddedServer", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo5, (Delegate)new Action, BrotherEncounterPhaseBaseState, CharacterMaster>(OnMithrixSpawn))); MethodInfo methodInfo6 = AccessTools.Method(typeof(Phase2), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo6, (Delegate)new Action, Phase2>(OnPhase2Enter))); MethodInfo methodInfo7 = AccessTools.Method(typeof(Phase3), "OnSpawnedServer", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo7, (Delegate)new Action, Phase3, GameObject>(OnPhase3Spawned))); MethodInfo methodInfo8 = AccessTools.Method(typeof(Phase4), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo8, (Delegate)new Action, Phase4>(OnPhase4Enter))); MethodInfo methodInfo9 = AccessTools.Method(typeof(Phase4), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo9, (Delegate)new Action, Phase4>(OnPhase4Update))); MethodInfo methodInfo10 = AccessTools.Method(typeof(BossDeath), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo10, (Delegate)new Action, BossDeath>(OnBossDeathEnter))); MethodInfo methodInfo11 = AccessTools.Method(typeof(SkySpawnState), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo11, (Delegate)new Action, SkySpawnState>(OnSpawnEnter))); MethodInfo methodInfo12 = AccessTools.Method(typeof(WeaponSlam), "FixedUpdate", (Type[])null, (Type[])null); ILhooks.Add(new ILHook((MethodBase)methodInfo12, new Manipulator(IL_HammerSlamUpdate))); MethodInfo methodInfo13 = AccessTools.Method(typeof(WeaponSlam), "FireWave", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo13, (Delegate)new Action, WeaponSlam>(OnHammerSlamWave))); MethodInfo methodInfo14 = AccessTools.Method(typeof(SprintBash), "AuthorityFireAttack", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo14, (Delegate)new Action, SprintBash>(OnBashFire))); MethodInfo methodInfo15 = AccessTools.Method(typeof(BaseSlideState), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo15, (Delegate)new Action, BaseSlideState>(OnDashUpdate))); MethodInfo methodInfo16 = AccessTools.Method(typeof(FireHomingBombs), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo16, (Delegate)new Action, FireHomingBombs>(OnDashBombEnter))); MethodInfo methodInfo17 = AccessTools.Method(typeof(FireLunarShards), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo17, (Delegate)new Action, FireLunarShards>(OnFireShardsEnter))); MethodInfo methodInfo18 = AccessTools.Method(typeof(ExitSkyLeap), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo18, (Delegate)new Action, ExitSkyLeap>(OnSkyLeapEnter))); MethodInfo methodInfo19 = AccessTools.Method(typeof(ExitSkyLeap), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo19, (Delegate)new Action, ExitSkyLeap>(OnSkyLeapUpdate))); MethodInfo methodInfo20 = AccessTools.Method(typeof(ExitSkyLeap), "FireRingAuthority", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo20, (Delegate)new Action, ExitSkyLeap>(OnSkyLeapFire))); MethodInfo methodInfo21 = AccessTools.Method(typeof(ExitSkyLeap), "FireCrawlersAuthority", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo21, (Delegate)new Action, ExitSkyLeap>(OnSkyLeapCrawlers))); MethodInfo methodInfo22 = AccessTools.Method(typeof(EnterSkyLeap), "AttemptFireSkyLeapBombsAuthority", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo22, (Delegate)new Action, EnterSkyLeap>(OnSkyLeapBomb))); MethodInfo methodInfo23 = AccessTools.Method(typeof(SkyLeapBomb), "FireRingAuthority", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo23, (Delegate)new Action, SkyLeapBomb>(OnBombFire))); MethodInfo methodInfo24 = AccessTools.Method(typeof(UltChannelState), "FireWave", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo24, (Delegate)new Action, UltChannelState, Vector3, bool, bool>(OnUltFireWave))); MethodInfo methodInfo25 = AccessTools.Method(typeof(UltExitState), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo25, (Delegate)new Action, UltExitState>(OnUltExit))); MethodInfo methodInfo26 = AccessTools.Method(typeof(SpellChannelState), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo26, (Delegate)new Action, SpellChannelState>(OnSpellEnter))); MethodInfo methodInfo27 = AccessTools.Method(typeof(StaggerEnter), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo27, (Delegate)new Action, StaggerEnter>(OnStaggerEnter))); MethodInfo methodInfo28 = AccessTools.Method(typeof(FistSlam), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo28, (Delegate)new Action, FistSlam>(OnFistSlamEnter))); MethodInfo methodInfo29 = AccessTools.Method(typeof(FistSlam), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo29, (Delegate)new Action, FistSlam>(OnFistSlamUpdate))); MethodInfo methodInfo30 = AccessTools.Method(typeof(LunarWispAttack), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo30, (Delegate)new Action, LunarWispAttack>(OnFireRingSkillEnter))); MethodInfo methodInfo31 = AccessTools.Method(typeof(LunarWispAttack), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo31, (Delegate)new Action, LunarWispAttack>(OnFireRingSkillUpdate))); MethodInfo methodInfo32 = AccessTools.Method(typeof(LunarExploderMortarStorm), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo32, (Delegate)new Action, LunarExploderMortarStorm>(OnMortarEnter))); MethodInfo methodInfo33 = AccessTools.Method(typeof(LunarExploderMortarStorm), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo33, (Delegate)new Action, LunarExploderMortarStorm>(OnMortarUpdate))); MethodInfo methodInfo34 = AccessTools.Method(typeof(GiftItem), "SendItemServer", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo34, (Delegate)new Action, GiftItem>(OnGiftItem))); MethodInfo methodInfo35 = AccessTools.Method(typeof(Destroy), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo35, (Delegate)new Action, Destroy>(OnGolemDestroyEnter))); MethodInfo methodInfo36 = AccessTools.Method(typeof(Destroy), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo36, (Delegate)new Action, Destroy>(OnGolemDestroyUpdate))); MethodInfo methodInfo37 = AccessTools.Method(typeof(ChargeBarrage), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo37, (Delegate)new Action, ChargeBarrage>(OnGolemChargeEnter))); MethodInfo methodInfo38 = AccessTools.Method(typeof(ChargeBarrage), "UpdateTarget", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo38, (Delegate)new Action, ChargeBarrage>(OnGolemChargeTarget))); MethodInfo methodInfo39 = AccessTools.Method(typeof(FireBarrage), "OnEnter", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo39, (Delegate)new Action, FireBarrage>(OnGolemBarrageEnter))); MethodInfo methodInfo40 = AccessTools.Method(typeof(FireBarrage), "FixedUpdate", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo40, (Delegate)new Action, FireBarrage>(OnGolemBarrageUpdate))); MethodInfo methodInfo41 = AccessTools.Method(typeof(FireBarrage), "Fire", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo41, (Delegate)new Action, FireBarrage>(OnGolemBarrageFire))); MethodInfo methodInfo42 = AccessTools.Method(typeof(FireBarrage), "FireSingle", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo42, (Delegate)new Action, FireBarrage, string, Vector3, bool>(OnGolemBarrageFireSingle))); MethodInfo methodInfo43 = AccessTools.Method(typeof(CharacterBody), "UpdateAllTemporaryVisualEffects", (Type[])null, (Type[])null); ILhooks.Add(new ILHook((MethodBase)methodInfo43, new Manipulator(IL_UpdateVisualEffect))); MethodInfo methodInfo44 = AccessTools.Method(typeof(CharacterBody), "HandleDisableAllSkillsDebuff", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo44, (Delegate)new Action, CharacterBody>(OnHandleScreen))); MethodInfo methodInfo45 = AccessTools.Method(typeof(GlobalEventManager), "IsImmuneToFallDamage", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo45, (Delegate)new Func, GlobalEventManager, CharacterBody, bool>(OnCheckFallDamage))); MethodInfo methodInfo46 = AccessTools.Method(typeof(BrotherSuperArmorController), "OnDamageDealtServer", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo46, (Delegate)new Action, BrotherSuperArmorController, DamageReport>(RemoveArmor))); MethodInfo methodInfo47 = AccessTools.Method(typeof(EnterSkyLeap), "AttemptFireGravZoneAuthority", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo47, (Delegate)new Action, EnterSkyLeap>(RemoveGravZone))); MethodInfo methodInfo48 = AccessTools.Method(typeof(ExitSkyLeap), "AttemptFireMeteorStormServer", (Type[])null, (Type[])null); hooks.Add(new Hook((MethodBase)methodInfo48, (Delegate)new Action, 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().lifetime = float.PositiveInfinity; ParticleSystem[] componentsInChildren = shockwaveGhost.GetComponentsInChildren(); 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(); 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); ConvertToShockwave(shockwavePrefab2); shockwavePrefab.GetComponent().lifetime = 6f; shockwavePrefab.GetComponent().velocity = 60f; shockwavePrefab2.GetComponent().heightLeniancy = 15f; ShockwaveScale(shockwavePrefab); shockwaveGhost.GetComponent().inheritScaleFromProjectile = true; ModifyShard(shardPrefab); ModifyShard(shardPrefab2); ModifyShard(Projectiles.hurtSpikePrefab); Object.DestroyImmediate((Object)(object)Projectiles.hurtSpikePrefab.GetComponent()); 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(); component.wave.amplitude *= 0.5f; } public void ConvertToShockwave(GameObject wavePrefab) { ProjectileShockwaveController projectileShockwaveController = wavePrefab.AddComponent(); projectileShockwaveController.velocity = wavePrefab.GetComponent().velocity; projectileShockwaveController.lifetime = wavePrefab.GetComponent().lifetime; Object.DestroyImmediate((Object)(object)wavePrefab.GetComponent()); Object.DestroyImmediate((Object)(object)wavePrefab.GetComponent()); } 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(); 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 references) Light val = prefab.AddComponent(); val.color = new Color(0.4f, 0.7f, 1f); val.range = 7f; val.intensity = 10f; ProjectileIncreaseSpeedOverTime val2 = prefab.AddComponent(); val2.baseSpeed = 50f; val2.maxSpeed = 150f; val2.acceleration = 200f; ProjectileSteerTowardTarget component = prefab.GetComponent(); component.modifySpeedOverTime = true; component.minRotationSpeed = 0f; component.maxRotationSpeed = 200f; component.rotationSpeed = 200f; component.rotationChangePerSecond = -450f; } public void ModifyAI() { mithrixMaster.GetComponent().prioritizePlayers = true; mithrixHurtMaster.GetComponent().prioritizePlayers = true; AISkillDriver[] components = mithrixMaster.GetComponents(); AISkillDriver[] array = components; foreach (AISkillDriver val in array) { string customName = val.customName; Log.Debug("Mithrix " + customName); if (customName == "Leap to Center") { val.maxUserHealthFraction = 0.85f; } if (customName == "CastUlt") { val.maxUserHealthFraction = 0.9f; } if (customName == "SprintBash") { val.maxDistance = 70f; } } AISkillDriver[] components2 = mithrixHurtMaster.GetComponents(); AISkillDriver[] array2 = components2; foreach (AISkillDriver val2 in array2) { string customName2 = val2.customName; Log.Debug("MithrixHurt " + customName2); if (customName2 == "SlamGround") { val2.maxUserHealthFraction = float.PositiveInfinity; } if (customName2 == "HealBeam") { val2.maxUserHealthFraction = 0.65f; } if (customName2 == "MortarStorm") { val2.maxUserHealthFraction = 0.65f; } if (customName2 == "LaserStorm") { val2.maxUserHealthFraction = 0.65f; } } AISkillDriver[] components3 = mithrixThroneMaster.GetComponents(); AISkillDriver[] array3 = components3; foreach (AISkillDriver val3 in array3) { string customName3 = val3.customName; Log.Debug("MithrixThrone " + customName3); } } public void CreateFogPrefab() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) FogDamageController component = fogPrefab.GetComponent(); component.healthFractionPerSecond = 0.05f; component.tickPeriodSeconds = 0.25f; component.healthFractionRampCoefficientPerSecond = 0.025f; component.tickDamageColorIndex = (DamageColorIndex)16; component.dangerBuffDef = Buffs.CrippleFogDebuff; component.dangerBuffDuration = 0.5f; MeshRenderer[] componentsInChildren = zonePrefab.GetComponentsInChildren(); foreach (MeshRenderer val in componentsInChildren) { Log.Message(((Object)((Renderer)val).material).name); ((Renderer)val).material = zoneMat; } SphereZone component2 = zonePrefab.GetComponent(); component2.rangeIndicator.localScale = Vector3.one * 10f; component2.radius = 10f; component2.indicatorSmoothTime = 2f; MeshRenderer[] componentsInChildren2 = zonePrefab2.GetComponentsInChildren(); foreach (MeshRenderer val2 in componentsInChildren2) { ((Renderer)val2).material = zoneMat2; ((Renderer)val2).material.color = new Color(0f, 0f, 1f); } SphereZone component3 = zonePrefab2.GetComponent(); component3.rangeIndicator.localScale = Vector3.one * 300f; component3.radius = 300f; component3.indicatorSmoothTime = 2f; } private void OnRecalcStats(CharacterBody sender, StatHookEventArgs args) { if (!((Object)(object)sender != (Object)null)) { return; } if (sender.HasBuff(Buffs.CrippleFogDebuff) && !sender.HasBuff(Buffs.Cripple)) { args.moveSpeedTotalMult *= 0.5f; args.armorAdd -= 20f; } if (BrotherKarmaUtils.IsBrotherHurt(sender) && KarmaManager.instance.GetEffectiveKarma() >= 8 && Object.op_Implicit((Object)(object)sender.healthComponent)) { if (sender.healthComponent.fullCombinedHealth * 0.3f >= sender.healthComponent.combinedHealth) { args.damageTotalMult *= 2f; } else if (sender.healthComponent.fullCombinedHealth * 0.65f >= sender.healthComponent.combinedHealth) { args.damageTotalMult *= 1.25f; } } } public void IL_RecalcStats(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)2; ILLabel val3 = il.DefineLabel(); ILLabel val4 = default(ILLabel); int num = default(int); if (val.TryGotoNext(val2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(BrotherKarmaUtils), "IsBrother"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val4), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 6) })) { if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f) })) { val.Next.Operand = 0.75f; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1.2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1.1 failed!"); } if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(BrotherKarmaUtils), "IsBrother") })) { if (val.TryGotoNext(new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 2) })) { val.Next.Operand = 1; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2.2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2.1 failed!"); } } public void IL_TakeDamageProcess(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_000f: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)2; ILLabel val3 = il.DefineLabel(); float num = default(float); if (val.TryGotoNext(val2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(HealthComponent), "adaptiveArmorValue"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 400f) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((HealthComponent self) => (Object.op_Implicit((Object)(object)self.body) && BrotherKarmaUtils.IsBrother(self.body)) ? ((KarmaManager.instance.GetEffectiveKarma() > 0) ? 1.5f : 1.25f) : 1f)); val.Emit(OpCodes.Mul); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } int loc1 = -1; if (val.TryGotoNext(val2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc1) })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc, loc1); val.EmitDelegate>((Func)delegate(HealthComponent self, float damage) { if (!Object.op_Implicit((Object)(object)self.body) || !BrotherKarmaUtils.IsBrother(self.body) || KarmaManager.instance.GetEffectiveKarma() <= 0) { return damage; } if (BrotherKarmaUtils.IsBrotherHurt(self.body) && KarmaManager.instance.GetEffectiveKarma() >= 8) { if (self.fullCombinedHealth * 0.3f >= self.combinedHealth) { damage *= 0.25f; } else if (self.fullCombinedHealth * 0.65f >= self.combinedHealth) { damage *= 0.5f; } } num = ((KarmaManager.instance.GetEffectiveKarma() >= 8) ? 1.5f : 1f); float num2 = self.fullCombinedHealth * 0.08f / num; if (damage >= num2) { float num3 = damage - num2; num3 *= 0.25f; if (num3 > num2) { float num4 = num3 - num2; num4 *= 0.25f; num3 = num4 + num2; } damage = num2 + num3; } return damage; }); val.Emit(OpCodes.Stloc, loc1); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } public void IL_HealthUpdate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)2; ILLabel val3 = il.DefineLabel(); if (val.TryGotoNext(val2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_maxShield"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f) })) { val.Emit(OpCodes.Mul); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((HealthComponent self) => (Object.op_Implicit((Object)(object)self.body) && ((Object)self.body).name.Contains("LunarGolem") && Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 2) ? 0.2f : 1f)); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private void OnSkillRecharge(Action orig, GenericSkill self, float dt, bool continuous) { float num = dt; if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.characterBody) && Object.op_Implicit((Object)(object)self.characterBody.inventory) && ((Object)self.characterBody).name.Contains("LunarGolem")) { int itemCountEffective = self.characterBody.inventory.GetItemCountEffective(Items.BoostAttackSpeed); if (itemCountEffective > 0 && self.characterBody.inventory.GetItemCountEffective(Items.AdaptiveArmor) > 0) { dt *= 1f + (float)itemCountEffective * 0.1f; } } orig(self, dt, continuous); } private void OnSetFrozen(orig_SetFrozen orig, SetStateOnHurt self, float duration) { if (NetworkServer.active && Object.op_Implicit((Object)(object)((Component)self).gameObject)) { CharacterBody component = ((Component)self).gameObject.GetComponent(); if ((Object)(object)component != (Object)null && BrotherKarmaUtils.IsBrother(component)) { return; } } orig.Invoke(self, duration); } public void IL_HammerSlamUpdate(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel label = val.DefineLabel(); if (val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(WeaponSlam), "hasDoneBlastAttack") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Action)delegate(WeaponSlam self) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: 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_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: 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_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0379: 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_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) WeaponSlam.crystalRadiusFromImpactPoint = 13f; WeaponSlam.crystalProjectileCount = 10; Transform val2 = ((BaseState)self).FindModelChild(WeaponSlam.muzzleString); if ((Object)(object)val2 != (Object)null) { GameObject val3 = Object.Instantiate(Effects.hammerBlastPrefab, val2.position, Quaternion.identity); DelayedEvent[] componentsInChildren = val3.GetComponentsInChildren(); foreach (DelayedEvent val4 in componentsInChildren) { val4.Call(); } ReadOnlyCollection readOnlyInstancesList = CharacterMaster.readOnlyInstancesList; float radius = WeaponSlam.radius; float num = WeaponSlam.radius * 1.3f; num *= num; Vector3 position = val2.position; List positions = new List(); foreach (CharacterMaster item in readOnlyInstancesList) { if (!((Object)(object)item == (Object)null) && !((Object)(object)item.GetBody() == (Object)null)) { Vector3 corePosition = item.GetBody().corePosition; float num2 = Mathf.Abs(corePosition.y - val2.position.y); if (num2 <= 100f && num2 >= radius) { position.y = corePosition.y; Vector3 val5 = corePosition - position; if (((Vector3)(ref val5)).sqrMagnitude <= num && !DidWeAlreadyFireNearThisPosition(corePosition, num, ref positions)) { BlastAttack val6 = new BlastAttack(); val6.attacker = self.attackerObject; val6.inflictor = self.attackerObject; val6.teamIndex = TeamComponent.GetObjectTeam(self.attackerObject); val6.baseDamage = self.attackerBody.damage * WeaponSlam.damageCoefficient; val6.baseForce = WeaponSlam.forceMagnitude; val6.position = position; val6.radius = WeaponSlam.radius; val6.bonusForce = new Vector3(0f, WeaponSlam.upwardForce, 0f); val6.Fire(); EffectData val7 = new EffectData { origin = corePosition, networkSoundEventIndex = WeaponSlam.weaponImpactSound.index }; val7.SetHurtBoxReference(item.GetBody().mainHurtBox); EffectManager.SpawnEffect(WeaponSlam.weaponHitEffectPrefab, val7, true); } } } } bool flag = Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 3; if (((EntityState)self).isAuthority) { if (flag) { FireProjectileInfo val8 = new FireProjectileInfo { projectilePrefab = Projectiles.hammerFirePrefab, position = val2.position + Vector3.up * DeathState.projectileVerticalSpawnOffset, rotation = Quaternion.identity, owner = ((EntityState)self).gameObject, damage = 3f * ((BaseState)self).damageStat, crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master), damageTypeOverride = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)128), (DamageTypeExtended)0, (DamageSource)1) }; ProjectileManager.instance.FireProjectile(val8); } int num3 = (flag ? ExitSkyLeap.waveProjectileCount : WeaponSlam.waveProjectileCount); float num4 = (flag ? (360f / (float)num3) : (WeaponSlam.waveProjectileArc / (float)num3)); Vector3 val9 = Vector3.ProjectOnPlane(((EntityState)self).characterDirection.forward, Vector3.up); Vector3 val10 = ((EntityState)self).characterBody.footPosition; if (Object.op_Implicit((Object)(object)val2)) { val10 = val2.position; } for (int j = 0; j < num3; j++) { Vector3 val11 = Quaternion.AngleAxis(num4 * ((float)j - (float)WeaponSlam.waveProjectileCount / 2f), Vector3.up) * val9; ProjectileManager.instance.FireProjectileWithoutDamageType(WeaponSlam.waveProjectilePrefab, val10, Util.QuaternionSafeLookRotation(val11), self.attackerObject, self.attackerBody.damage * WeaponSlam.waveProjectileDamageCoefficient, WeaponSlam.waveProjectileForce, Util.CheckRoll(self.attackerBody.crit, self.attackerBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } } } }); if (val.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 3), (Instruction x) => ILPatternMatchingExt.MatchBneUn(x, ref label) })) { val.Emit(OpCodes.Br, (object)label); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1.2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1.1 failed!"); } } internal static bool DidWeAlreadyFireNearThisPosition(Vector3 newPos, float rangeSquared, ref List positions) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) foreach (Vector3 position in positions) { Vector3 val = newPos - position; if (((Vector3)(ref val)).sqrMagnitude <= rangeSquared) { return true; } } positions.Add(newPos); return false; } public void OnHammerSlamUpdate(Action orig, WeaponSlam self) { orig(self); } public void OnHammerSlamWave(Action orig, WeaponSlam self) { if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 3) { orig(self); } } public void OnBashFire(Action orig, SprintBash self) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: 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_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)self).pushAwayForce = 5000f; SprintBash.waveProjectileArc = 90f; SprintBash.waveProjectileOffset = 13f; if (!self.hasFiredWaves) { Transform val = ((BaseState)self).FindModelChild(SprintBash.muzzleString); Vector3 val2 = ((EntityState)self).characterBody.footPosition; if (Object.op_Implicit((Object)(object)val)) { val2 = val.position; } foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (!((Object)(object)instance != (Object)null)) { continue; } CharacterBody body = instance.master.GetBody(); if ((Object)(object)body != (Object)null && Object.op_Implicit((Object)(object)body.healthComponent) && body.healthComponent.alive) { GravityManager gravityManager = ((Component)body).gameObject.GetComponent(); if ((Object)(object)gravityManager == (Object)null) { gravityManager = ((Component)body).gameObject.AddComponent(); } gravityManager.body = body; gravityManager.attackerBody = ((EntityState)self).characterBody; GravityOrb gravityOrb = new GravityOrb(); ((Orb)gravityOrb).origin = val2; ((Orb)gravityOrb).target = body.mainHurtBox; gravityOrb.targetBody = body; gravityOrb.attackerBody = ((EntityState)self).characterBody; OrbManager.instance.AddOrb((Orb)(object)gravityOrb); } } if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 3 && ((EntityState)self).isAuthority) { int num = ((KarmaManager.instance.GetEffectiveKarma() >= 3) ? 5 : 3); float num2 = 18f; Vector3 val3 = Vector3.ProjectOnPlane(((EntityState)self).characterDirection.forward, Vector3.up); Vector3 val4 = val2; val4.y = ((EntityState)self).characterBody.footPosition.y; for (int i = 0; i < num; i++) { Vector3 val5 = Quaternion.AngleAxis(num2 * ((float)i - (float)num / 2f), Vector3.up) * val3; ProjectileManager.instance.FireProjectileWithoutDamageType(Projectiles.flamePillarMovingPrefab, val4 + val5 * 10f, Util.QuaternionSafeLookRotation(val5), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * 5f, 0f, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, 30f); } } } orig(self); self.hasFiredWaves = true; } public void OnDashUpdate(Action orig, BaseSlideState self) { //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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime(); if (((EntityState)self).isAuthority) { Vector3 val = Vector3.zero; if (Object.op_Implicit((Object)(object)((EntityState)self).inputBank) && Object.op_Implicit((Object)(object)((EntityState)self).characterDirection)) { val = ((EntityState)self).characterDirection.forward; } val.y = 0f; if (Object.op_Implicit((Object)(object)((EntityState)self).characterMotor)) { float num = BaseSlideState.speedCoefficientCurve.Evaluate(((EntityState)self).fixedAge / BaseSlideState.duration); CharacterMotor characterMotor = ((EntityState)self).characterMotor; characterMotor.rootMotion += self.slideRotation * (num * 15f * val * ((EntityState)self).GetDeltaTime()); } if (((EntityState)self).fixedAge >= BaseSlideState.duration) { ((EntityState)self).outer.SetNextStateToMain(); } } } public void OnDashBombEnter(Action orig, FireHomingBombs self) { self.damageCoefficient = 3f; orig(self); } public void OnFireShardsEnter(Action orig, FireLunarShards self) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) if (self is FireLunarShardsHurt) { Utils.OrigOnEnter((BaseState)(object)self); self.duration = 0.75f / Mathf.Min(((BaseState)self).attackSpeedStat / 4f + 0.75f, 1.5f); if (((EntityState)self).isAuthority) { Ray aimRay = ((BaseState)self).GetAimRay(); Transform val = ((BaseState)self).FindModelChild(FireLunarShards.muzzleString); if (Object.op_Implicit((Object)(object)val)) { ((Ray)(ref aimRay)).origin = val.position; } float num = 0f; float num2 = 0f; for (int num3 = 3; num3 > 0; num3--) { switch (num3) { case 1: num = -5f; num2 = 20f; break; case 2: num = 25f; num2 = 0f; break; case 3: num = -5f; num2 = -20f; break; } Vector3 val2 = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f, 0f, 1f, 1f, num, num2); CharacterBody bodyResponsibleForDamage = BrotherKarmaUtils.GetBodyResponsibleForDamage(((EntityState)self).characterBody); GameObject gameObject = ((Component)bodyResponsibleForDamage).gameObject; FireProjectileInfo val3 = new FireProjectileInfo { position = ((Ray)(ref aimRay)).origin, rotation = Quaternion.LookRotation(val2), crit = bodyResponsibleForDamage.RollCrit(), damage = bodyResponsibleForDamage.damage * 0.25f, damageColorIndex = (DamageColorIndex)0, owner = gameObject, procChainMask = default(ProcChainMask), force = 0f, useFuseOverride = false, useSpeedOverride = true }; ((FireProjectileInfo)(ref val3)).speedOverride = 80f; val3.target = null; val3.projectilePrefab = Projectiles.hurtSpikePrefab; ProjectileManager.instance.FireProjectile(val3); } } ((EntityState)self).PlayAnimation("Gesture, Additive", FireLunarShards.FireLunarShardsStateHash); ((EntityState)self).PlayAnimation("Gesture, Override", FireLunarShards.FireLunarShardsStateHash); ((BaseState)self).AddRecoil(-0.4f * FireLunarShards.recoilAmplitude, -0.8f * FireLunarShards.recoilAmplitude, -0.3f * FireLunarShards.recoilAmplitude, 0.3f * FireLunarShards.recoilAmplitude); ((EntityState)self).characterBody.AddSpreadBloom(FireLunarShards.spreadBloomValue); EffectManager.SimpleMuzzleFlash(FireLunarShards.muzzleFlashEffectPrefab, ((EntityState)self).gameObject, FireLunarShards.muzzleString, false); Util.PlaySound(FireLunarShards.fireSound, ((EntityState)self).gameObject); } else { self.damageCoefficient = 0.8f; orig(self); } } public void OnFireShardsEnter2(Action orig, FireLunarShardsHurt self) { } private void OnSpawnEnter(Action orig, SkySpawnState self) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0077: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014b: 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_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) orig(self); ConstructManager.SpawnConstructs(); if (!Object.op_Implicit((Object)(object)PhaseCounter.instance) || PhaseCounter.instance.phase != 3 || !((EntityState)self).isAuthority) { return; } float num = 360f / (float)ExitSkyLeap.waveProjectileCount; Vector3 val = Vector3.ProjectOnPlane(((EntityState)self).inputBank.aimDirection, Vector3.up); Vector3 footPosition = ((EntityState)self).characterBody.footPosition; for (int i = 0; i < ExitSkyLeap.waveProjectileCount; i++) { Vector3 val2 = Quaternion.AngleAxis(num * (float)i, Vector3.up) * val; if (((EntityState)self).isAuthority) { CharacterBody bodyResponsibleForDamage = BrotherKarmaUtils.GetBodyResponsibleForDamage(((EntityState)self).characterBody); ProjectileManager.instance.FireProjectileWithoutDamageType(ExitSkyLeap.waveProjectilePrefab, footPosition, Util.QuaternionSafeLookRotation(val2), ((Component)bodyResponsibleForDamage).gameObject, bodyResponsibleForDamage.damage * ExitSkyLeap.waveProjectileDamageCoefficient, ExitSkyLeap.waveProjectileForce, Util.CheckRoll(bodyResponsibleForDamage.crit, bodyResponsibleForDamage.master), (DamageColorIndex)0, (GameObject)null, -1f); } } float num2 = 30f; float num3 = Random.Range(0f, num2); for (int j = 0; j < 12; j++) { Vector3 val3 = Quaternion.AngleAxis(num2 * (float)j + num3, Vector3.up) * val; ProjectileManager.instance.FireProjectileWithoutDamageType(Projectiles.flamePillarMovingPrefab, footPosition, Util.QuaternionSafeLookRotation(val3), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * 5f, 0f, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, 60f); } if (KarmaManager.instance.GetEffectiveKarma() < 6) { return; } for (int k = 0; k < 12; k++) { Vector3 val4 = Quaternion.AngleAxis(num2 * (float)k + num3, Vector3.up) * val; if (((EntityState)self).isAuthority) { CharacterBody bodyResponsibleForDamage2 = BrotherKarmaUtils.GetBodyResponsibleForDamage(((EntityState)self).characterBody); ProjectileManager.instance.FireProjectileWithoutDamageType(Projectiles.shockwaveCrawlerLeft, footPosition, Util.QuaternionSafeLookRotation(val4), ((Component)bodyResponsibleForDamage2).gameObject, bodyResponsibleForDamage2.damage * ExitSkyLeap.waveProjectileDamageCoefficient, 0f, Util.CheckRoll(bodyResponsibleForDamage2.crit, bodyResponsibleForDamage2.master), (DamageColorIndex)0, (GameObject)null, 0f); ProjectileManager.instance.FireProjectileWithoutDamageType(Projectiles.shockwaveCrawlerRight, footPosition, Util.QuaternionSafeLookRotation(val4), ((Component)bodyResponsibleForDamage2).gameObject, bodyResponsibleForDamage2.damage * ExitSkyLeap.waveProjectileDamageCoefficient, 0f, Util.CheckRoll(bodyResponsibleForDamage2.crit, bodyResponsibleForDamage2.master), (DamageColorIndex)0, (GameObject)null, 0f); } } } private void OnSkyLeapEnter(Action orig, ExitSkyLeap self) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) Utils.OrigOnEnter((BaseState)(object)self); Vector3 val = Vector3.ProjectOnPlane(Random.onUnitSphere, Vector3.up); self.spireForward = ((Vector3)(ref val)).normalized; if (KarmaManager.instance.GetEffectiveKarma() >= 4) { self.duration = 3.5f; } else { self.duration = 2.9f; } self.spiresToSpawn = 0; CharacterMaster master = ((EntityState)self).characterBody.master; ExitSkyLeap.requiredKarmaForSpires = 8; if (Object.op_Implicit((Object)(object)master) && master.GetDeployableCount((DeployableSlot)44) < master.GetDeployableSameSlotLimit((DeployableSlot)44)) { int val2 = master.GetDeployableSameSlotLimit((DeployableSlot)44) - master.GetDeployableCount((DeployableSlot)44); self.spiresToSpawn = Math.Min(val2, 2); } Util.PlaySound(ExitSkyLeap.soundString, ((EntityState)self).gameObject); ((EntityState)self).PlayAnimation("Body", ExitSkyLeap.ExitSkyLeapStateHash, ExitSkyLeap.SkyLeapParamHash, self.duration); ((EntityState)self).PlayAnimation("FullBody Override", ExitSkyLeap.BufferEmptyStateHash); if (NetworkServer.active) { ((EntityState)self).characterBody.AddTimedBuff(Buffs.ArmorBoost, ExitSkyLeap.baseDuration); } AimAnimator aimAnimator = ((EntityState)self).GetAimAnimator(); if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = true; } if (((EntityState)self).isAuthority) { self.FireRingAuthority(); if (BrotherKarmaUtils.IsBrotherPhantom(((EntityState)self).characterBody)) { BrotherKarmaUtils.SuicideAndMakeOwnerKiller(((EntityState)self).healthComponent); return; } } if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 3) { GenericSkill val3 = (Object.op_Implicit((Object)(object)((EntityState)self).skillLocator) ? ((EntityState)self).skillLocator.special : null); if (Object.op_Implicit((Object)(object)val3)) { val3.SetSkillOverride((object)((EntityState)self).outer, UltChannelState.replacementSkillDef, (SkillOverridePriority)4); } } self.durationUntilRecastInterrupt = 0f; ConstructManager.SpawnConstructs(2); } private void OnSkyLeapUpdate(Action orig, ExitSkyLeap self) { orig(self); if (((EntityState)self).isAuthority) { self.durationUntilRecastInterrupt += Time.fixedDeltaTime; if (self.durationUntilRecastInterrupt > ((KarmaManager.instance.GetEffectiveKarma() >= 4) ? 1.2f : 1.5f)) { self.durationUntilRecastInterrupt = 0f; self.FireRingAuthority(); } } } private void OnSkyLeapFire(Action orig, ExitSkyLeap self) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0175: 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_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) bool flag = Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 3; orig(self); if (!flag && KarmaManager.instance.GetEffectiveKarma() < 6) { return; } float num = 30f; Vector3 val = Vector3.ProjectOnPlane(((EntityState)self).inputBank.aimDirection, Vector3.up); Vector3 footPosition = ((EntityState)self).characterBody.footPosition; float num2 = Random.Range(0f, num); for (int i = 0; i < 12; i++) { Vector3 val2 = Quaternion.AngleAxis(num * (float)i + num2, Vector3.up) * val; ProjectileManager.instance.FireProjectileWithoutDamageType(Projectiles.flamePillarMovingPrefab, footPosition, Util.QuaternionSafeLookRotation(val2), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * 5f, 0f, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, 60f); } if (!flag || KarmaManager.instance.GetEffectiveKarma() < 6) { return; } for (int j = 0; j < 12; j++) { Vector3 val3 = Quaternion.AngleAxis(num * (float)j + num2, Vector3.up) * val; if (((EntityState)self).isAuthority) { CharacterBody bodyResponsibleForDamage = BrotherKarmaUtils.GetBodyResponsibleForDamage(((EntityState)self).characterBody); ProjectileManager.instance.FireProjectileWithoutDamageType(Projectiles.shockwaveCrawlerLeft, footPosition, Util.QuaternionSafeLookRotation(val3), ((Component)bodyResponsibleForDamage).gameObject, bodyResponsibleForDamage.damage * ExitSkyLeap.waveProjectileDamageCoefficient, 0f, Util.CheckRoll(bodyResponsibleForDamage.crit, bodyResponsibleForDamage.master), (DamageColorIndex)0, (GameObject)null, 0f); ProjectileManager.instance.FireProjectileWithoutDamageType(Projectiles.shockwaveCrawlerRight, footPosition, Util.QuaternionSafeLookRotation(val3), ((Component)bodyResponsibleForDamage).gameObject, bodyResponsibleForDamage.damage * ExitSkyLeap.waveProjectileDamageCoefficient, 0f, Util.CheckRoll(bodyResponsibleForDamage.crit, bodyResponsibleForDamage.master), (DamageColorIndex)0, (GameObject)null, 0f); } } } private void OnSkyLeapCrawlers(Action orig, ExitSkyLeap self) { } private void OnSkyLeapBomb(Action orig, EnterSkyLeap self) { //IL_001f: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) if (KarmaManager.instance.GetEffectiveKarma() < EnterSkyLeap.requiredKarmaForSkyLeapBombs) { return; } FireProjectileInfo val = new FireProjectileInfo { procChainMask = default(ProcChainMask), projectilePrefab = EntityStateGameObject.op_Implicit(EnterSkyLeap.skyLeapBombPrefab), damage = ((EntityState)self).characterBody.damage, damageTypeOverride = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)4194304), (DamageTypeExtended)0, (DamageSource)8), crit = ((EntityState)self).characterBody.RollCrit(), owner = ((Component)((EntityState)self).characterBody).gameObject, rotation = Quaternion.identity, useFuseOverride = true }; Transform val2 = ((EntityState)self).GetModelChildLocator().FindChild("CenterOfArena"); if (Object.op_Implicit((Object)(object)SceneInfo.instance)) { ChildLocator component = ((Component)SceneInfo.instance).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { val2 = component.FindChild("CenterOfArena"); } } Util.ShuffleArray(bombPositions); for (int i = 0; i < 8; i++) { if (Object.op_Implicit((Object)(object)val2)) { FireProjectileInfo val3 = val; val3.position = val2.position + bombPositions[i] + EnterSkyLeap.skyLeapBombHeightOffset * Vector3.up; ((FireProjectileInfo)(ref val3)).fuseOverride = self.duration + HoldSkyLeap.duration + 1f * ((float)i * 0.15f) - 0.2f; ProjectileManager.instance.FireProjectile(val3); } } } private void OnBombFire(Action orig, SkyLeapBomb self) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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_0027: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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) Vector3 point = Vector3.ProjectOnPlane(((EntityState)self).transform.forward, Vector3.up); Vector3 position = ((Component)((EntityState)self).outer).transform.position; if (EntityStateGameObject.op_Implicit(SkyLeapBomb.explosionEffectPrefab)) { EffectManager.SimpleEffect(EntityStateGameObject.op_Implicit(SkyLeapBomb.explosionEffectPrefab), position, Quaternion.identity, true); } for (int i = 1; i < 4; i++) { ((MonoBehaviour)self.ownerBody).StartCoroutine(FireBombCrystals(self.ownerBody, position, point, i)); } } public IEnumerator FireBombCrystals(CharacterBody owner, Vector3 position, Vector3 point, int j) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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) yield return (object)new WaitForSeconds((float)j * 0.25f); if (!((Object)(object)owner != (Object)null)) { yield break; } float num = 36f; float offset = ((j == 2) ? 18f : 0f); for (int i = 0; i < 10; i++) { Vector3 a = Quaternion.AngleAxis(num * (float)i + offset, Vector3.up) * point; Vector3 pos = position + a * (4f + 6f * (float)j); Quaternion rotation = Util.QuaternionSafeLookRotation(Vector3.RotateTowards(Vector3.up, -a, WeaponSlam.crystalRotationForward * (MathF.PI / 180f), float.PositiveInfinity)); RaycastHit raycastHit = default(RaycastHit); Ray val = new Ray(pos + Vector3.up * 5f, Vector3.down); LayerIndex world = LayerIndex.world; if (Physics.Raycast(val, ref raycastHit, 150f, LayerMask.op_Implicit(((LayerIndex)(ref world)).mask), (QueryTriggerInteraction)1)) { pos = ((RaycastHit)(ref raycastHit)).point; } FireProjectileInfo fireProjectileInfo = new FireProjectileInfo { owner = ((Component)owner).gameObject, damage = owner.damage * WeaponSlam.crystalProjectileDamage, projectilePrefab = WeaponSlam.crystalProjectilePrefab, position = pos, rotation = rotation, procChainMask = default(ProcChainMask), crit = false, damageTypeOverride = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)1073741824), (DamageTypeExtended)0, (DamageSource)8) }; ProjectileManager.instance.FireProjectile(fireProjectileInfo); raycastHit = default(RaycastHit); } } public void OnUltFireWave(Action orig, UltChannelState self, Vector3 position, bool useStationary, bool incrementCount) { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown if (incrementCount) { self.wavesFired++; } BrotherUltPattern patternLeft = UltChannelState.patternLeft; BrotherUltPattern patternRight = UltChannelState.patternRight; patternLeft.projectileData[0].projectileCount = ((KarmaManager.instance.GetEffectiveKarma() >= 7) ? 12 : 9); patternLeft.projectileData[0].angleOffset = ((KarmaManager.instance.GetEffectiveKarma() >= 7) ? 30f : 40f); patternRight.projectileData[0].projectileCount = ((KarmaManager.instance.GetEffectiveKarma() >= 7) ? 12 : 9); patternRight.projectileData[0].angleOffset = ((KarmaManager.instance.GetEffectiveKarma() >= 7) ? 30f : 40f); if (useStationary) { patternLeft = UltChannelState.patternStatic; BrotherUltUtils.EvaluatePattern(patternLeft, new BrotherUltContext { owner = ((Component)((EntityState)self).outer).gameObject, useOriginOverride = true, originOverride = position }); } else { BrotherUltUtils.EvaluatePattern(patternLeft, new BrotherUltContext { owner = ((Component)((EntityState)self).outer).gameObject, useOriginOverride = true, originOverride = position }); BrotherUltUtils.EvaluatePattern(patternRight, new BrotherUltContext { owner = ((Component)((EntityState)self).outer).gameObject, useOriginOverride = true, originOverride = position }); } } public void OnUltExit(Action orig, UltExitState self) { UltExitState.requiredKarmaForSpires = 8; orig(self); self.spiresToSpawn = Math.Min(self.spiresToSpawn, 3); } public void OnStaggerEnter(Action orig, StaggerEnter self) { orig(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddTimedBuff(Buffs.ArmorBoost, 4f); } } public void OnFistSlamEnter(Action orig, FistSlam self) { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) FistSlam.baseDuration = 2f; FistSlam.waveProjectileCount = 10; FistSlam.healthCostFraction = 0.02f; FistSlam.damageCoefficient = 10f; FistSlam.waveProjectileDamageCoefficient = 5f; FistSlam.waveProjectileForce = 0.5f; FistSlam.forceMagnitude = 10f; Utils.OrigOnEnter((BaseState)(object)self); bool flag = ((EntityState)self).characterBody.HasBuff(Buffs.FireWaveBuff); self.modelAnimator = ((EntityState)self).GetModelAnimator(); self.modelTransform = ((EntityState)self).GetModelTransform(); self.duration = (flag ? 6f : 2f); Util.PlaySound(FistSlam.attackSoundString, ((EntityState)self).gameObject); ((EntityState)self).PlayCrossfade("FullBody Override", "FistSlam", "FistSlam.playbackRate", self.duration, 0.1f); if (Object.op_Implicit((Object)(object)((EntityState)self).characterDirection)) { ((EntityState)self).characterDirection.moveVector = ((EntityState)self).characterDirection.forward; } if (Object.op_Implicit((Object)(object)self.modelTransform)) { AimAnimator component = ((Component)self.modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = true; } } if (flag && NetworkServer.active) { EffectData val = new EffectData { origin = ((EntityState)self).transform.position }; EffectManager.SpawnEffect(Effects.fireWaveEffect, val, true); ((EntityState)self).characterBody.AddTimedBuff(Buffs.ArmorBoost, 3f); } Transform val2 = ((BaseState)self).FindModelChild("MuzzleRight"); if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)FistSlam.chargeEffectPrefab)) { self.chargeInstance = Object.Instantiate(FistSlam.chargeEffectPrefab, val2.position, val2.rotation); self.chargeInstance.transform.parent = val2; ScaleParticleSystemDuration component2 = self.chargeInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.newDuration = self.duration / 2.8f; } } } public void OnFistSlamUpdate(Action orig, FistSlam self) { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Expected O, but got Unknown //IL_02e7: 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_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) bool flag = ((EntityState)self).characterBody.HasBuff(Buffs.FireWaveBuff); ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime(); if (Object.op_Implicit((Object)(object)self.modelAnimator) && self.modelAnimator.GetFloat("fist.hitBoxActive") > 0.5f && !self.hasAttacked) { if (flag) { ((EntityState)self).characterBody.RemoveBuff(Buffs.FireWaveBuff); ((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(FirePillarWaves(self)); int num = 12; float num2 = 360f / (float)num; Vector3 val = Vector3.ProjectOnPlane(((EntityState)self).inputBank.aimDirection, Vector3.up); Vector3 footPosition = ((EntityState)self).characterBody.footPosition; for (int i = 0; i < num; i++) { Vector3 val2 = Quaternion.AngleAxis(num2 * (float)i, Vector3.up) * val; ProjectileManager.instance.FireProjectileWithoutDamageType(Projectiles.fireRingCrystalPrefab, footPosition + val2 * 20f, Util.QuaternionSafeLookRotation(val2), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * FistSlam.crystalDamageCoefficient, FistSlam.crystalForce, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } ((EntityState)self).skillLocator.secondary.AddOneStock(); } else { if (Object.op_Implicit((Object)(object)self.chargeInstance)) { EntityState.Destroy((Object)(object)self.chargeInstance); } EffectManager.SimpleMuzzleFlash(FistSlam.slamImpactEffect, ((EntityState)self).gameObject, FistSlam.muzzleString, false); if (NetworkServer.active && KarmaManager.instance.GetEffectiveKarma() < FistSlam.requiredKarmaForNoSelfDamage && Object.op_Implicit((Object)(object)((EntityState)self).healthComponent)) { DamageInfo val3 = new DamageInfo(); val3.damage = ((EntityState)self).healthComponent.combinedHealth * FistSlam.healthCostFraction; val3.position = ((EntityState)self).characterBody.corePosition; val3.force = Vector3.zero; val3.damageColorIndex = (DamageColorIndex)0; val3.crit = false; val3.attacker = null; val3.inflictor = null; val3.damageType = DamageTypeCombo.op_Implicit((DamageType)3); val3.procCoefficient = 0f; val3.procChainMask = default(ProcChainMask); ((EntityState)self).healthComponent.TakeDamage(val3); } if (((EntityState)self).isAuthority) { if (Object.op_Implicit((Object)(object)self.modelTransform)) { Transform val4 = ((BaseState)self).FindModelChild(FistSlam.muzzleString); if (Object.op_Implicit((Object)(object)val4)) { self.attack = new BlastAttack(); self.attack.attacker = ((EntityState)self).gameObject; self.attack.inflictor = ((EntityState)self).gameObject; self.attack.teamIndex = TeamComponent.GetObjectTeam(((EntityState)self).gameObject); self.attack.baseDamage = ((BaseState)self).damageStat * FistSlam.damageCoefficient; self.attack.baseForce = FistSlam.forceMagnitude; self.attack.position = val4.position; self.attack.radius = FistSlam.radius; self.attack.bonusForce = new Vector3(0f, FistSlam.upwardForce, 0f); self.attack.Fire(); } } if (KarmaManager.instance.GetEffectiveKarma() >= FistSlam.requiredKarmaForCrawlers) { FireFistCrystalWavesAuthority(self); } else { FireFistWavesAuthority(self); } FireFistShockwaveAuthority(self); } } self.hasAttacked = true; } if (((EntityState)self).fixedAge >= self.duration && ((EntityState)self).isAuthority) { ((EntityState)self).outer.SetNextStateToMain(); } } private void FireFistWavesAuthority(FistSlam self) { //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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_0059: Unknown result type (might be due to invalid IL or missing references) int num = 10; float num2 = 360f / (float)num; Vector3 val = Vector3.ProjectOnPlane(((EntityState)self).inputBank.aimDirection, Vector3.up); Vector3 footPosition = ((EntityState)self).characterBody.footPosition; for (int i = 0; i < num; i++) { Vector3 val2 = Quaternion.AngleAxis(num2 * (float)i, Vector3.up) * val; ProjectileManager.instance.FireProjectileWithoutDamageType(FistSlam.waveProjectilePrefab, footPosition, Util.QuaternionSafeLookRotation(val2), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * FistSlam.waveProjectileDamageCoefficient, FistSlam.waveProjectileForce, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } } private void FireFistCrystalWavesAuthority(FistSlam self) { //IL_002a: 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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) if (waveCounter >= 3) { waveCounter = 0; } int num = 12; float num2 = 360f / (float)num; Vector3 val = Vector3.ProjectOnPlane(((EntityState)self).inputBank.aimDirection, Vector3.up); Vector3 footPosition = ((EntityState)self).characterBody.footPosition; int num3 = waveCounter; for (int i = 0; i < num; i++) { num3++; GameObject val2 = FistSlam.waveProjectilePrefab; if (num3 >= 3) { num3 = 0; val2 = Projectiles.fistCrystalWavePrefab; } Vector3 val3 = Quaternion.AngleAxis(num2 * (float)i, Vector3.up) * val; ProjectileManager.instance.FireProjectileWithoutDamageType(val2, footPosition, Util.QuaternionSafeLookRotation(val3), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * FistSlam.waveProjectileDamageCoefficient, FistSlam.waveProjectileForce, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } waveCounter++; } private void FireFistShockwaveAuthority(FistSlam self) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) int waveProjectileCount = ExitSkyLeap.waveProjectileCount; Transform val = ((BaseState)self).FindModelChild(FistSlam.muzzleString); float num = 360f / (float)waveProjectileCount; Vector3 val2 = Vector3.ProjectOnPlane(((EntityState)self).characterDirection.forward, Vector3.up); Vector3 val3 = ((EntityState)self).characterBody.footPosition; if (Object.op_Implicit((Object)(object)val)) { val3 = val.position; } for (int i = 0; i < waveProjectileCount; i++) { Vector3 val4 = Quaternion.AngleAxis(num * (float)i, Vector3.up) * val2; ProjectileManager.instance.FireProjectile(ExitSkyLeap.waveProjectilePrefab, val3, Util.QuaternionSafeLookRotation(val4), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * 2.5f, 0.5f, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } } public void OnFireRingSkillEnter(Action orig, LunarWispAttack self) { ((EntityState)self).characterBody.AddBuff(Buffs.FireWaveBuff); } public void OnFireRingSkillUpdate(Action orig, LunarWispAttack self) { if (((EntityState)self).isAuthority) { ((EntityState)self).outer.SetNextStateToMain(); } } public IEnumerator FirePillarWaves(FistSlam self) { float num = 360f / (float)pillarRingCount; float randomOffset = Random.Range(0f, num); FirePillarRingAuthority(self, 0, randomOffset); yield return (object)new WaitForSeconds(0.6f); FirePillarRingAuthority(self, 1, randomOffset); } public void FirePillarRingAuthority(FistSlam self, int waveCount, float randomOffset) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_0077: 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) if (((EntityState)self).isAuthority) { float num = 360f / (float)pillarRingCount; Vector3 val = Vector3.ProjectOnPlane(((EntityState)self).inputBank.aimDirection, Vector3.up); Vector3 footPosition = ((EntityState)self).characterBody.footPosition; float num2 = randomOffset + (float)waveCount * (num / 2f); for (int i = 0; i < pillarRingCount; i++) { Vector3 val2 = Quaternion.AngleAxis(num * (float)i + num2, Vector3.up) * val; ProjectileManager.instance.FireProjectileWithoutDamageType(Projectiles.flamePillarMovingPrefab, footPosition, Util.QuaternionSafeLookRotation(val2), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * 14f, 0f, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, 50f); } } } public void OnMortarEnter(Action orig, LunarExploderMortarStorm self) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) Utils.OrigOnEnter((BaseState)(object)self); self.projectilesFired = 0; self.initialRay = ((BaseState)self).GetAimRay(); ((EntityState)self).PlayCrossfade("Gesture, Override", LunarExploderMortarStorm.AnimationHash, LunarExploderMortarStorm.PlaybackHash, ((BrotherChimeraAttackBaseState)self).animationLength, 0.1f); if (((EntityState)self).isAuthority) { Util.PlaySound(((BrotherChimeraAttackBaseState)self).warningSound, ((Component)((EntityState)self).outer).gameObject); } self.muzzleTransform = ((EntityState)self).characterBody.coreTransform; ChildLocator modelChildLocator = ((EntityState)self).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator)) { self.muzzleTransform = modelChildLocator.FindChild(LunarExploderMortarStorm.projectileMuzzle); } foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (!((Object)(object)instance != (Object)null)) { continue; } CharacterBody body = instance.master.GetBody(); if ((Object)(object)body != (Object)null && Object.op_Implicit((Object)(object)body.healthComponent) && body.healthComponent.alive) { GravityManager gravityManager = ((Component)body).gameObject.GetComponent(); if ((Object)(object)gravityManager == (Object)null) { gravityManager = ((Component)body).gameObject.AddComponent(); } gravityManager.body = body; gravityManager.attackerBody = ((EntityState)self).characterBody; GravityOrb gravityOrb = new GravityOrb(); ((Orb)gravityOrb).origin = self.muzzleTransform.position; ((Orb)gravityOrb).target = body.mainHurtBox; gravityOrb.targetBody = body; gravityOrb.attackerBody = ((EntityState)self).characterBody; OrbManager.instance.AddOrb((Orb)(object)gravityOrb); } } Util.ShuffleArray(pizzaLocations); } public void OnMortarUpdate(Action orig, LunarExploderMortarStorm self) { ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime(); self.firingStopwatch += ((EntityState)self).GetDeltaTime(); if (self.firingStopwatch >= 0.75f && self.projectilesFired < 3) { self.firingStopwatch -= 0.75f; MortarFireWave(self); } if (((EntityState)self).fixedAge >= 2.75f && ((EntityState)self).isAuthority) { ((EntityState)self).outer.SetNextStateToMain(); } } public void MortarFireWave(LunarExploderMortarStorm self) { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: 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) //IL_00dc: 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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown if (!((EntityState)self).isAuthority) { return; } CharacterBody val = null; if ((Object)(object)((EntityState)self).GetComponent() != (Object)null && ((EntityState)self).GetComponent().currentEnemy != null) { val = ((EntityState)self).GetComponent().currentEnemy.characterBody; } if ((Object)(object)val == (Object)null && PlayerCharacterMasterController.instances.Count > 0) { val = PlayerCharacterMasterController.instances[0].master.GetBody(); } if ((Object)(object)val != (Object)null) { float num = Random.Range(-180f, 180f); Vector3 val2 = pizzaLocations[self.projectilesFired]; self.projectilesFired++; val2 += val.transform.position; RaycastHit val3 = default(RaycastHit); Ray val4 = new Ray(val2 + Vector3.up * 10f, Vector3.down); LayerIndex world = LayerIndex.world; if (Physics.Raycast(val4, ref val3, 150f, LayerMask.op_Implicit(((LayerIndex)(ref world)).mask), (QueryTriggerInteraction)1)) { val2 = ((RaycastHit)(ref val3)).point; } BrotherUltPattern val5 = UltChannelState.patternLeft; if (Random.value <= 0.5f) { val5 = UltChannelState.patternRight; } val5.projectileData[0].projectileCount = 6; val5.projectileData[0].angleOffset = 60f; BrotherUltUtils.EvaluatePattern(val5, new BrotherUltContext { owner = ((Component)((EntityState)self).outer).gameObject, useOriginOverride = true, originOverride = val2 }); } } public void OnGiftItem(Action orig, GiftItem self) { //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (!((Object)(object)instance != (Object)null)) { continue; } CharacterBody body = instance.master.GetBody(); if ((Object)(object)body != (Object)null && Object.op_Implicit((Object)(object)body.healthComponent) && body.healthComponent.alive) { GravityManager gravityManager = ((Component)body).gameObject.GetComponent(); if ((Object)(object)gravityManager == (Object)null) { gravityManager = ((Component)body).gameObject.AddComponent(); } gravityManager.body = body; gravityManager.attackerBody = ((EntityState)self).characterBody; GravityOrb gravityOrb = new GravityOrb(); ((Orb)gravityOrb).origin = ((EntityState)self).characterBody.corePosition; ((Orb)gravityOrb).duration = 1f; ((Orb)gravityOrb).target = body.mainHurtBox; gravityOrb.targetBody = body; gravityOrb.attackerBody = ((EntityState)self).characterBody; OrbManager.instance.AddOrb((Orb)(object)gravityOrb); } } } public void OnGolemDestroyEnter(Action orig, Destroy self) { if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 2) { Utils.OrigOnEnter((BaseState)(object)self); } else { orig(self); } } public void OnGolemDestroyUpdate(Action orig, Destroy self) { if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 2 && ((EntityState)self).isAuthority) { ((EntityState)self).outer.SetNextStateToMain(); } else { orig(self); } } public void OnGolemChargeEnter(Action orig, ChargeBarrage self) { //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) orig(self); FireBarrage.aimTime = 1f; FireBarrage.baseDuration = 0.3f; FireBarrage.baseAimDelay = 0.2f; self.DestroyEffect(); GolemLaserManager golemLaserManager = ((Component)((EntityState)self).characterBody).gameObject.GetComponent(); if ((Object)(object)golemLaserManager == (Object)null) { golemLaserManager = ((Component)((EntityState)self).characterBody).gameObject.AddComponent(); } golemLaserManager.flashTimer = 1.5f; golemLaserManager.laserOn = true; Transform modelTransform = ((EntityState)self).GetModelTransform(); if (!Object.op_Implicit((Object)(object)modelTransform)) { return; } ChildLocator component = ((Component)modelTransform).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } List list = new List(); list.Add(component.FindChild("MuzzleLT")); list.Add(component.FindChild("MuzzleRT")); list.Add(component.FindChild("MuzzleLB")); list.Add(component.FindChild("MuzzleRB")); for (int i = 0; i < list.Count; i++) { if (Object.op_Implicit((Object)(object)list[i])) { if ((Object)(object)golemLaserManager.laserEffects[i] == (Object)null) { golemLaserManager.laserEffects[i] = Object.Instantiate(Effects.golemLaserEffect, list[i].position, list[i].rotation); } golemLaserManager.laserEffects[i].transform.parent = list[i]; golemLaserManager.laserEffects[i].SetActive(true); golemLaserManager.laserLines[i] = golemLaserManager.laserEffects[i].GetComponent(); } } } public void OnGolemChargeTarget(Action orig, ChargeBarrage self) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: 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_01e9: 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_020b: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: 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_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) GolemLaserManager component = ((Component)((EntityState)self).characterBody).gameObject.GetComponent(); if (!((Object)(object)component != (Object)null)) { return; } Vector3 val = Vector3.zero; BaseAI component2 = ((Component)((EntityState)self).characterBody.master).GetComponent(); if ((Object)(object)component2 != (Object)null && component2.currentEnemy != null && (Object)(object)component.targetBody == (Object)null) { component.targetBody = component2.currentEnemy.characterBody; } if ((Object)(object)component.targetBody != (Object)null) { Vector3 corePosition = component.targetBody.corePosition; Ray aimRay = ((BaseState)self).GetAimRay(); Vector3 val2 = corePosition - ((Ray)(ref aimRay)).origin; val = component.targetBody.corePosition; ((EntityState)self).characterDirection.forward = val2; ((EntityState)self).inputBank.aimDirection = val2; } float num = ((EntityState)self).age / self.duration * 0.1f + 0.1f; num *= ChargeLaser.laserMaxWidth; Ray val5 = default(Ray); RaycastHit val8 = default(RaycastHit); for (int i = 0; i < 4; i++) { if (Object.op_Implicit((Object)(object)component.laserEffects[i]) && Object.op_Implicit((Object)(object)component.laserLines[i])) { float num2 = 1000f; Vector3 val3 = ((val == Vector3.zero) ? component.laserPoints[i] : val); Vector3 position = component.laserEffects[i].transform.parent.position; Vector3[] laserDirections = component.laserDirections; int num3 = i; Vector3 val4 = val3 - position; laserDirections[num3] = ((Vector3)(ref val4)).normalized; ((Ray)(ref val5))..ctor(position, component.laserDirections[i]); Ray val6 = val5; LayerIndex val7 = LayerIndex.world; int num4 = LayerMask.op_Implicit(((LayerIndex)(ref val7)).mask); val7 = LayerIndex.entityPrecise; if (Physics.Raycast(val6, ref val8, num2, num4 | LayerMask.op_Implicit(((LayerIndex)(ref val7)).mask))) { val3 = ((RaycastHit)(ref val8)).point; } component.laserLines[i].SetPosition(0, position); component.laserLines[i].SetPosition(1, val3); component.laserPoints[i] = ((val == Vector3.zero) ? component.laserPoints[i] : val); component.laserLines[i].startWidth = num; component.laserLines[i].endWidth = num; } } } public void OnGolemBarrageEnter(Action orig, FireBarrage self) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) FireBarrage.refireCount = 3; Log.Message(self.refireIndex); if (self.refireIndex >= 4) { ((EntityState)self).outer.SetNextState((EntityState)new Destroy()); return; } orig(self); GolemLaserManager component = ((Component)((EntityState)self).characterBody).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { ((Ray)(ref self.initialAimRay)).direction = component.laserDirections[self.refireIndex]; } } public void OnGolemBarrageUpdate(Action orig, FireBarrage self) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0184: 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_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: 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_01b3: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_0301: 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_0312: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) GolemLaserManager component = ((Component)((EntityState)self).characterBody).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Vector3 val = Vector3.zero; BaseAI component2 = ((Component)((EntityState)self).characterBody.master).GetComponent(); if ((Object)(object)component2 != (Object)null && component2.currentEnemy != null && (Object)(object)component.targetBody == (Object)null) { component.targetBody = component2.currentEnemy.characterBody; } if ((Object)(object)component.targetBody != (Object)null) { Vector3 corePosition = component.targetBody.corePosition; Ray aimRay = ((BaseState)self).GetAimRay(); Vector3 val2 = corePosition - ((Ray)(ref aimRay)).origin; val = component.targetBody.corePosition; ((EntityState)self).characterDirection.forward = val2; ((EntityState)self).inputBank.aimDirection = val2; } Ray val5 = default(Ray); RaycastHit val8 = default(RaycastHit); Ray val10 = default(Ray); RaycastHit val12 = default(RaycastHit); for (int i = 0; i < 4; i++) { bool flag = self.refireIndex == i; if (!Object.op_Implicit((Object)(object)component.laserEffects[i]) || !Object.op_Implicit((Object)(object)component.laserLines[i])) { continue; } float num = 1000f; Vector3 val4; LayerIndex val7; if (flag) { float num2 = ((EntityState)self).fixedAge / self.aimDelay * 1.5f + 0.2f; num2 *= ChargeLaser.laserMaxWidth; Vector3 val3 = component.laserPoints[i]; Vector3 position = component.laserEffects[i].transform.parent.position; Vector3[] laserDirections = component.laserDirections; int num3 = i; val4 = val3 - position; laserDirections[num3] = ((Vector3)(ref val4)).normalized; ((Ray)(ref val5))..ctor(position, component.laserDirections[i]); Ray val6 = val5; val7 = LayerIndex.world; int num4 = LayerMask.op_Implicit(((LayerIndex)(ref val7)).mask); val7 = LayerIndex.entityPrecise; if (Physics.Raycast(val6, ref val8, num, num4 | LayerMask.op_Implicit(((LayerIndex)(ref val7)).mask))) { val3 = ((RaycastHit)(ref val8)).point; } component.laserLines[i].SetPosition(0, position); component.laserLines[i].SetPosition(1, val3); component.laserLines[i].startWidth = num2; component.laserLines[i].endWidth = num2; } else { Vector3 val9 = ((val == Vector3.zero) ? component.laserPoints[i] : val); Vector3 position2 = component.laserEffects[i].transform.parent.position; Vector3[] laserDirections2 = component.laserDirections; int num5 = i; val4 = val9 - position2; laserDirections2[num5] = ((Vector3)(ref val4)).normalized; ((Ray)(ref val10))..ctor(position2, component.laserDirections[i]); Ray val11 = val10; val7 = LayerIndex.world; int num6 = LayerMask.op_Implicit(((LayerIndex)(ref val7)).mask); val7 = LayerIndex.entityPrecise; if (Physics.Raycast(val11, ref val12, num, num6 | LayerMask.op_Implicit(((LayerIndex)(ref val7)).mask))) { val9 = ((RaycastHit)(ref val12)).point; } component.laserLines[i].SetPosition(0, position2); component.laserLines[i].SetPosition(1, val9); component.laserPoints[i] = ((val == Vector3.zero) ? component.laserPoints[i] : val); } } } orig(self); } public void OnGolemBarrageFire(Action orig, FireBarrage self) { //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_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_006b: 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_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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)self).GetAimRay(); Quaternion val = Quaternion.LookRotation(((Ray)(ref self.initialAimRay)).direction); Quaternion val2 = Quaternion.LookRotation(((Ray)(ref aimRay)).direction); float num = Util.Remap(Util.Remap((float)self.refireIndex, 0f, (float)(FireBarrage.refireCount - 1), 0f, 1f), 0f, 1f, FireBarrage.minLeadTime, FireBarrage.maxLeadTime) / self.aimDelay; Quaternion val3 = Quaternion.SlerpUnclamped(val, val2, 1f + num); Ray val4 = default(Ray); ((Ray)(ref val4))..ctor(((Ray)(ref aimRay)).origin, val3 * Vector3.forward); if (self.refireIndex == 0 && Object.op_Implicit((Object)(object)FireBarrage.dustEffectPrefab)) { EffectManager.SimpleMuzzleFlash(FireBarrage.dustEffectPrefab, ((EntityState)self).gameObject, "Root", true); } string text = ""; bool flag = false; switch (self.refireIndex) { case 0: text = FireBarrage.leftMuzzleTop; ((EntityState)self).PlayAnimation("Gesture, Left Additive", FireBarrage.FireLeftShotStateHash); break; case 1: text = FireBarrage.rightMuzzleTop; ((EntityState)self).PlayAnimation("Gesture, Right Additive", FireBarrage.FireRightShotStateHash); flag = true; break; case 2: text = FireBarrage.leftMuzzleBot; ((EntityState)self).PlayAnimation("Gesture, Left Additive", FireBarrage.FireLeftShotStateHash); break; case 3: text = FireBarrage.rightMuzzleBot; ((EntityState)self).PlayAnimation("Gesture, Right Additive", FireBarrage.FireRightShotStateHash); flag = true; break; } if (text != "") { self.FireSingle(text, ((Ray)(ref val4)).direction, flag); } } public void OnGolemBarrageFireSingle(Action orig, FireBarrage self, string muzzleName, Vector3 aimDirection, bool flipProjectile) { //IL_00c6: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017d: 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_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: 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_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Expected O, but got Unknown GolemLaserManager component = ((Component)((EntityState)self).characterBody).gameObject.GetComponent(); if (!((Object)(object)component != (Object)null)) { return; } if (Object.op_Implicit((Object)(object)component.laserEffects[self.refireIndex])) { component.laserEffects[self.refireIndex].SetActive(false); } ChildLocator modelChildLocator = ((EntityState)self).GetModelChildLocator(); if (!Object.op_Implicit((Object)(object)modelChildLocator)) { return; } Transform val = modelChildLocator.FindChild(muzzleName); if (!Object.op_Implicit((Object)(object)val)) { return; } if (Object.op_Implicit((Object)(object)FireBarrage.effectPrefab)) { EffectManager.SimpleMuzzleFlash(FireBarrage.effectPrefab, ((EntityState)self).gameObject, muzzleName, false); } if (!((EntityState)self).isAuthority) { return; } float num = 1000f; Vector3 position = component.laserLines[self.refireIndex].GetPosition(0); Vector3 val2 = component.laserPoints[self.refireIndex] - position; Vector3 normalized = ((Vector3)(ref val2)).normalized; position += normalized; Ray val3 = default(Ray); ((Ray)(ref val3))..ctor(position, normalized); ((Ray)(ref val3)).origin = ((Ray)(ref val3)).origin + ((Ray)(ref val3)).direction * 1.5f; Vector3 val4 = ((Ray)(ref val3)).origin + ((Ray)(ref val3)).direction * num; RaycastHit val5 = default(RaycastHit); if (Physics.Raycast(val3, ref val5, num, LayerMask.op_Implicit(CommonMasks.laser))) { val4 = ((RaycastHit)(ref val5)).point; } new BlastAttack { attacker = ((EntityState)self).gameObject, inflictor = ((EntityState)self).gameObject, teamIndex = TeamComponent.GetObjectTeam(((EntityState)self).gameObject), baseDamage = ((BaseState)self).damageStat * FireBarrage.damageCoefficient, baseForce = FireBarrage.force * 0.2f, position = val4, radius = FireBarrage.blastRadius, falloffModel = (FalloffModel)0, bonusForce = FireBarrage.force * ((Ray)(ref val3)).direction }.Fire(); ChildLocator modelChildLocator2 = ((EntityState)self).GetModelChildLocator(); if (Object.op_Implicit((Object)(object)modelChildLocator2)) { int num2 = modelChildLocator2.FindChildIndex(muzzleName); if (Object.op_Implicit((Object)(object)FireBarrage.tracerEffectPrefab)) { EffectData val6 = new EffectData { origin = val4, start = ((Ray)(ref val3)).origin }; val6.SetChildLocatorTransformReference(((EntityState)self).gameObject, num2); EffectManager.SpawnEffect(FireBarrage.tracerEffectPrefab, val6, true); EffectManager.SpawnEffect(FireBarrage.hitEffectPrefab, val6, true); } } } private void OnPhase2Enter(Action orig, Phase2 self) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) ChildLocator component = ((EntityState)self).GetComponent(); ScriptedCombatEncounter component2 = ((Component)component.FindChild(((BrotherEncounterPhaseBaseState)self).phaseControllerChildString)).gameObject.GetComponent(); GameObject val = Object.Instantiate(spawnPosPrefab, new Vector3(-88.5f, 491.9f, 0.8f), Quaternion.identity); SpawnInfo val2 = new SpawnInfo { spawnCard = (SpawnCard)(object)golemSpawnCard, explicitSpawnPosition = val.transform }; GameObject val3 = Object.Instantiate(spawnPosPrefab, new Vector3(-128.3f, 527f, -31.8f), Quaternion.identity); SpawnInfo val4 = new SpawnInfo { spawnCard = (SpawnCard)(object)wispSpawnCard, explicitSpawnPosition = val3.transform }; GameObject val5 = Object.Instantiate(spawnPosPrefab, new Vector3(-51.7f, 530.3f, 38.3f), Quaternion.identity); SpawnInfo val6 = new SpawnInfo { spawnCard = (SpawnCard)(object)wispSpawnCard, explicitSpawnPosition = val5.transform }; SpawnInfo[] spawns = (SpawnInfo[])(object)new SpawnInfo[3] { val2, val4, val6 }; component2.spawns = spawns; spawnCounter = 0; component2.combatSquad.onMemberAddedServer += OnPhase2MemberAdded; orig(self); } private void OnPhase2Exit(Action orig, Phase2 self) { ChildLocator component = ((EntityState)self).GetComponent(); ScriptedCombatEncounter component2 = ((Component)component.FindChild(((BrotherEncounterPhaseBaseState)self).phaseControllerChildString)).gameObject.GetComponent(); component2.combatSquad.onMemberAddedServer -= OnPhase2MemberAdded; orig(self); } protected virtual void OnPhase2MemberAdded(CharacterMaster master) { //IL_0046: 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_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) if (spawnCounter >= 3 && (Object)(object)master != (Object)null && Object.op_Implicit((Object)(object)master.GetBody()) && Object.op_Implicit((Object)(object)master.GetBody().healthComponent)) { master.GetBody().healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); } if (((Object)master).name.Contains("LunarGolem")) { spawnCounter++; if (Object.op_Implicit((Object)(object)master.inventory)) { if (Object.op_Implicit((Object)(object)KarmaManager.instance) && KarmaManager.instance.GetEffectiveKarma() >= 7) { master.inventory.GiveItemPermanent(Items.BoostHp, 8); master.inventory.GiveItemPermanent(Items.BoostAttackSpeed, 5); master.inventory.GiveItemPermanent(Items.BoostDamage, 35); master.inventory.GiveItemPermanent(Items.BoostCharacterScale, 40); master.inventory.GiveItemPermanent(Items.AdaptiveArmor, 1); } else { master.inventory.GiveItemPermanent(Items.BoostHp, 20); master.inventory.GiveItemPermanent(Items.BoostDamage, 20); master.inventory.GiveItemPermanent(Items.BoostCharacterScale, 35); } master.inventory.SetEquipmentIndex(Equipment.AffixLunar.equipmentIndex); } if (Object.op_Implicit((Object)(object)master.GetBody()) && Object.op_Implicit((Object)(object)master.GetBody().skillLocator)) { Log.Message("Yippeeee"); master.GetBody().skillLocator.primary.SetSkillOverride((object)((Component)master).gameObject, laserSkill, (SkillOverridePriority)3); } } else if (((Object)master).name.Contains("LunarWisp")) { spawnCounter++; if (Object.op_Implicit((Object)(object)master.inventory) && Object.op_Implicit((Object)(object)KarmaManager.instance) && KarmaManager.instance.GetEffectiveKarma() >= 7) { master.inventory.GiveItemPermanent(Items.BoostHp, 170); master.inventory.GiveItemPermanent(Items.BoostDamage, 50); master.inventory.GiveItemPermanent(Items.BoostCharacterScale, 10); master.inventory.SetEquipmentIndex(Equipment.EliteBeadEquipment.equipmentIndex); } } else if ((Object)(object)master != (Object)null && Object.op_Implicit((Object)(object)master.GetBody()) && Object.op_Implicit((Object)(object)master.GetBody().healthComponent)) { master.GetBody().healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo)); } } private void OnPhase3Spawned(Action orig, Phase3 self, GameObject master) { } public void OnSpellEnter(Action orig, SpellChannelState self) { if (NetworkServer.active) { fogInstance = Object.Instantiate(fogPrefab); fogDamageController = fogInstance.GetComponent(); fogDamageController.AddSafeZone((IZone)(object)safeZoneInstance.GetComponent()); NetworkServer.Spawn(fogInstance); } orig(self); } private void OnPhase4Enter(Action orig, Phase4 self) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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) waveCounter = 0; orig(self); if (!Object.op_Implicit((Object)(object)safeZoneInstance)) { safeZoneInstance = Object.Instantiate(zonePrefab, ((BrotherEncounterBaseState)self).childLocator.FindChild("CenterOfArena").position, ((BrotherEncounterBaseState)self).childLocator.FindChild("CenterOfArena").rotation); safeZoneInstance.GetComponent().radius = 145f; safeZoneInstance2 = Object.Instantiate(zonePrefab2, ((BrotherEncounterBaseState)self).childLocator.FindChild("CenterOfArena").position, ((BrotherEncounterBaseState)self).childLocator.FindChild("CenterOfArena").rotation); safeZoneInstance2.GetComponent().radius = 145f; NetworkServer.Spawn(safeZoneInstance); NetworkServer.Spawn(safeZoneInstance2); } GameObject gameObject = ((Component)((BrotherEncounterBaseState)self).childLocator.FindChild("BlockingPillars")).gameObject; if (Object.op_Implicit((Object)(object)gameObject)) { for (int i = 0; i < gameObject.transform.childCount; i++) { PillarManager pillarManager = ((Component)gameObject.transform.GetChild(i)).gameObject.AddComponent(); pillarManager.delay = (float)i * 0.2f; pillarManager.active = true; } } } private void OnPhase4Update(Action orig, Phase4 self) { orig(self); if (!((Object)(object)fogDamageController != (Object)null)) { return; } bool flag = false; List> list = new List>(); foreach (KeyValuePair characterBodyToStack in fogDamageController.characterBodyToStacks) { CharacterBody key = characterBodyToStack.Key; if (Object.op_Implicit((Object)(object)key) && Object.op_Implicit((Object)(object)key.transform) && Object.op_Implicit((Object)(object)key.healthComponent)) { flag = true; } } if (flag) { p4Stopwatch += ((EntityState)self).GetDeltaTime(); if (p4Stopwatch >= 1f) { p4Stopwatch -= 1f; fogDamageController.UpdateExtraDamageMultiplier(fogDamageController.extraVoidFieldsDamageMultiplier + 1); } } else { p4Stopwatch = 0f; fogDamageController.UpdateExtraDamageMultiplier(0); } } private void OnBossDeathEnter(Action orig, BossDeath self) { orig(self); if (Object.op_Implicit((Object)(object)fogInstance)) { Object.Destroy((Object)(object)fogInstance); fogInstance = null; } if (Object.op_Implicit((Object)(object)safeZoneInstance)) { ((Behaviour)safeZoneInstance.GetComponent()).enabled = false; } if (Object.op_Implicit((Object)(object)safeZoneInstance2)) { ((Behaviour)safeZoneInstance2.GetComponent()).enabled = false; } } private void OnMithrixSpawn(Action orig, BrotherEncounterPhaseBaseState self, CharacterMaster master) { orig(self, master); CharacterBody body = master.GetBody(); if (Object.op_Implicit((Object)(object)body) && BrotherKarmaUtils.IsBrother(body) && KarmaManager.instance.GetEffectiveKarma() >= 8) { body.subtitleNameToken = "BLOON_MITHRIX_MAXKARMASUBTITLE"; } } public void IL_UpdateVisualEffect(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "Cripple"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "HasBuff") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((CharacterBody self) => self.HasBuff(Buffs.CrippleFogDebuff))); val.Emit(OpCodes.Or); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } if (val.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "VoidFogStrong"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "HasBuff") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((CharacterBody self) => self.HasBuff(Buffs.CrippleFogDebuff))); val.Emit(OpCodes.Or); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } if (val.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "TransferDebuffOnHit"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "HasBuff") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((CharacterBody self) => self.HasBuff(Buffs.GravityDebuff))); val.Emit(OpCodes.Or); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } private void OnHandleScreen(Action orig, CharacterBody self) { if (self.HasBuff(Buffs.CrippleFogDebuff)) { if (!(self.healthComponent.screenDamageCalculator is ScreenCrippleFog)) { ScreenCrippleFog screenDamageCalculator = new ScreenCrippleFog(); self.healthComponent.screenDamageCalculator = (ScreenDamageCalculator)(object)screenDamageCalculator; } } else { if (self.healthComponent.screenDamageCalculator != null && self.healthComponent.screenDamageCalculator is ScreenCrippleFog) { self.healthComponent.screenDamageCalculator = null; } orig(self); } } private bool OnCheckFallDamage(Func orig, GlobalEventManager self, CharacterBody body) { if (body.HasBuff(Buffs.GravityDebuff) || body.HasBuff(Buffs.GravityIntenseDebuff)) { return true; } return orig(self, body); } private void RemoveArmor(Action orig, BrotherSuperArmorController self, DamageReport dmgReport) { } private void RemoveGravZone(Action orig, EnterSkyLeap self) { //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) if (KarmaManager.instance.GetEffectiveKarma() < EnterSkyLeap.requiredKarmaForGravZone) { return; } foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (!((Object)(object)instance != (Object)null)) { continue; } CharacterBody body = instance.master.GetBody(); if ((Object)(object)body != (Object)null && Object.op_Implicit((Object)(object)body.healthComponent) && body.healthComponent.alive && Object.op_Implicit((Object)(object)body.characterMotor) && !body.characterMotor.isGrounded) { GravityManager gravityManager = ((Component)body).gameObject.GetComponent(); if ((Object)(object)gravityManager == (Object)null) { gravityManager = ((Component)body).gameObject.AddComponent(); } gravityManager.body = body; gravityManager.attackerBody = ((EntityState)self).characterBody; GravityOrb gravityOrb = new GravityOrb(); ((Orb)gravityOrb).origin = ((EntityState)self).transform.position; ((Orb)gravityOrb).target = body.mainHurtBox; ((Orb)gravityOrb).duration = HoldSkyLeap.duration; gravityOrb.targetBody = body; gravityOrb.attackerBody = ((EntityState)self).characterBody; OrbManager.instance.AddOrb((Orb)(object)gravityOrb); } } } private void RemoveMeteors(Action orig, ExitSkyLeap self) { } } public class KarmaTriggerChanges { [RegisterKarmaTrigger("BloonPillarSkipTrigger", 2, null)] public class BloonPillarSkipTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonHereticTrigger", 3, null)] public class BloonHereticTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonKickFromBazaarTrigger", 2, null)] public class BloonKickFromBazaarTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonWormKillTrigger", 1, null)] public class BloonWormKillTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonProvidenceTrigger", 2, "DLC4")] public class BloonProvidenceTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonFalseSonTrigger", 2, "DLC2")] public class BloonFalseSonTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonAnimaHarvesterTrigger", 1, "DLC4")] public class BloonAnimaHarvesterTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonAurelioniteTrigger", 1, null)] public class BloonAurelioniteTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonSolusHeartTrigger", 1, "DLC3")] public class BloonSolusHeartTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonSolusWingTrigger", 1, "DLC3")] public class BloonSolusWingTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonBeadsRepeatableTrigger", 1, null)] public class BloonBeadsRepeatableTrigger : BaseKarmaTrigger { public override bool IsRepeatable() { return true; } } [RegisterKarmaTrigger("BloonBeadsTrigger", 1, null)] public class BloonBeadsTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonWormFoodTrigger", 2, "DLC3")] public class BloonWormFoodTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonCursedBookTrigger", 1, "DLC4")] public class BloonCursedBookTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonLunarCleanseTrigger", 1, null)] public class BloonLunarCleanseTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonLunarSeerTrigger", 1, null)] public class BloonLunarSeerTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonShrineOrderTrigger", 1, null)] public class BloonShrineOrderTrigger : BaseKarmaTrigger { public override bool IsRepeatable() { return true; } } [RegisterKarmaTrigger("BloonShrineShapingTrigger", 1, "DLC2")] public class BloonShrineShapingTrigger : BaseKarmaTrigger { public override bool IsRepeatable() { return true; } } [RegisterKarmaTrigger("BloonLoopingTrigger", 2, null)] public class BloonLoopingTrigger : BaseKarmaTrigger { public override bool IsRepeatable() { return true; } } [RegisterKarmaTrigger("BloonBulwarksAmbryTrigger", 1, null)] public class BloonBulwarksAmbryTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonCelestialPortalTrigger", 1, null)] public class BloonCelestialPortalTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonVoidLocusTrigger", 1, "DLC1")] public class BloonVoidLocusTrigger : BaseKarmaTrigger { } [RegisterKarmaTrigger("BloonVoidFieldsTrigger", 1, null)] public class BloonVoidFieldsTrigger : BaseKarmaTrigger { } public static SceneCollection stage1Collection = new SceneCollection(); public List baseKarmaTriggers = new List { typeof(BloonAnimaHarvesterTrigger), typeof(BloonAurelioniteTrigger), typeof(BloonKickFromBazaarTrigger), typeof(BloonBeadsRepeatableTrigger), typeof(BloonBeadsTrigger), typeof(BloonBulwarksAmbryTrigger), typeof(BloonCursedBookTrigger), typeof(BloonFalseSonTrigger), typeof(BloonHereticTrigger), typeof(BloonLoopingTrigger), typeof(BloonLunarCleanseTrigger), typeof(BloonLunarSeerTrigger), typeof(BloonCelestialPortalTrigger), typeof(BloonPillarSkipTrigger), typeof(BloonProvidenceTrigger), typeof(BloonShrineOrderTrigger), typeof(BloonShrineShapingTrigger), typeof(BloonSolusHeartTrigger), typeof(BloonSolusWingTrigger), typeof(BloonVoidFieldsTrigger), typeof(BloonVoidLocusTrigger), typeof(BloonWormFoodTrigger), typeof(BloonWormKillTrigger) }; public List karmaDefs = new List(); public void Initialize() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Expected O, but got Unknown //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Expected O, but got Unknown RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoadKarma)); MethodInfo methodInfo = AccessTools.Method(typeof(RuleCatalog), "AddRule", (Type[])null, (Type[])null); Main.hooks.Add(new Hook((MethodBase)methodInfo, (Delegate)new Action, RuleDef>(OnAddRule))); MethodInfo methodInfo2 = AccessTools.Method(typeof(GlobalEventManager), "OnCharacterHitGroundServer", (Type[])null, (Type[])null); Main.hooks.Add(new Hook((MethodBase)methodInfo2, (Delegate)new Action, GlobalEventManager, CharacterBody, HitGroundInfo>(OnHitGround))); MethodInfo methodInfo3 = AccessTools.Method(typeof(CharacterMaster), "TransformBody", new Type[2] { typeof(string), typeof(bool) }, (Type[])null); Main.hooks.Add(new Hook((MethodBase)methodInfo3, (Delegate)new Action, CharacterMaster, string, bool>(OnHereticTransform))); MethodInfo methodInfo4 = AccessTools.Method(typeof(KickFromShop), "OnExit", (Type[])null, (Type[])null); Main.hooks.Add(new Hook((MethodBase)methodInfo4, (Delegate)new Action, KickFromShop>(OnKickFromShop))); GenericPickupController.onPickupConsumed += CheckForBeads; GlobalEventManager.OnInteractionsGlobal += OnInteract; Stage.onStageStartGlobal += OnStageStart; GlobalEventManager.onCharacterDeathServer += DetermineDeath; Inventory.onInventoryChangedGlobal += OnInventoryChanged; MethodInfo methodInfo5 = AccessTools.Method(typeof(KarmaManager), "Start", (Type[])null, (Type[])null); Main.hooks.Add(new Hook((MethodBase)methodInfo5, (Delegate)new Action, KarmaManager>(OnKarmaStart))); foreach (Type baseKarmaTrigger in baseKarmaTriggers) { RegisterKarmaTriggerAttribute val = (RegisterKarmaTriggerAttribute)baseKarmaTrigger.GetCustomAttributes(inherit: false).FirstOrDefault((object v) => v is RegisterKarmaTriggerAttribute); if (val != null) { ConfigEntry val2 = KarmaTriggerConfig(val.identifier, val.karmaReward); Log.Message(((ConfigEntryBase)val2).Definition.Key + " " + val2.Value); if (val2.Value > 0) { ExpansionDef requiredExpansion = ((!string.IsNullOrEmpty(val.requiredExpansionName)) ? ExpansionCatalog.FindByName(val.requiredExpansionName) : null); KarmaTriggerDef item = new KarmaTriggerDef { identifier = val.identifier, baseKarmaReward = val2.Value, requiredExpansion = requiredExpansion, type = baseKarmaTrigger }; karmaDefs.Add(item); } } } } public ConfigEntry KarmaTriggerConfig(string identifier, int value) { string text = identifier.Remove(0, 5); return Config.cfg.Bind("Karma Triggers", text, value, "Sets the amount of Karma to recieve from this trigger. Set to 0 to disable the trigger."); } public void OnLoadKarma() { //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_007f: 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_008f: Unknown result type (might be due to invalid IL or missing references) stage1Collection = Addressables.LoadAssetAsync((object)RoR2_Base_SceneGroups.loopSgStage1_asset).WaitForCompletion(); KarmaManager.karmaTriggers.Clear(); foreach (KarmaTriggerDef karmaDef in karmaDefs) { KarmaManager.karmaTriggers.Add(karmaDef); } KarmaManager.triggerNamesToDefs.Clear(); for (int i = 0; i < KarmaManager.karmaTriggers.Count; i++) { KarmaManager.karmaTriggers[i].karmaTriggerIndex = new KarmaTriggerIndex { intValue = i }; KarmaManager.triggerNamesToDefs.Add(KarmaManager.karmaTriggers[i].identifier, KarmaManager.karmaTriggers[i]); } } private void OnAddRule(Action orig, RuleDef ruleDef) { if (ruleDef.globalName == "Karma.InitialLevel") { Log.Message("Wahoooooo!!!"); ruleDef.defaultChoiceIndex = 1; } orig(ruleDef); } private void OnKarmaStart(Action orig, KarmaManager self) { orig(self); if (NetworkServer.active && Object.op_Implicit((Object)(object)Run.instance)) { RuleDef val = RuleCatalog.FindRuleDef("Karma.InitialLevel"); if (val != null && (Object)(object)val.choices[1].unlockable != (Object)null && !AnyUserHasUnlockable(val.choices[1].unlockable)) { self.NetworkisKarmaEnabled = false; self.SetKarmaServer(0); } } } private static bool AnyUserHasUnlockable(UnlockableDef unlockableDef) { ReadOnlyCollection readOnlyInstancesList = NetworkUser.readOnlyInstancesList; for (int i = 0; i < readOnlyInstancesList.Count; i++) { if (readOnlyInstancesList[i].unlockables.Contains(unlockableDef)) { return true; } } return false; } private void OnHitGround(Action orig, GlobalEventManager self, CharacterBody characterBody, HitGroundInfo hitGroundInfo) { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Stage.instance) && Object.op_Implicit((Object)(object)Stage.instance.sceneDef) && Stage.instance.sceneDef.cachedName == "moon2" && Object.op_Implicit((Object)(object)MoonBatteryMissionController.instance) && MoonBatteryMissionController.instance._numChargedBatteries <= 0 && (Object)(object)characterBody != (Object)null && characterBody.isPlayerControlled && characterBody.footPosition.y > 450f) { Util.KarmaEventTrigger("BloonPillarSkipTrigger"); } orig(self, characterBody, hitGroundInfo); } private void OnHereticTransform(Action orig, CharacterMaster self, string bodyName, bool applyOriginal) { if (bodyName == "HereticBody") { Util.KarmaEventTrigger("BloonHereticTrigger"); } orig(self, bodyName, applyOriginal); } private void OnKickFromShop(Action orig, KickFromShop self) { Util.KarmaEventTrigger("BloonKickFromBazaarTrigger"); orig(self); } private void CheckForBeads(CharacterBody body, UniquePickup pickup) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Invalid comparison between Unknown and I4 //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body.teamComponent) && (int)body.teamComponent.teamIndex == 1) { PickupDef pickupDef = PickupCatalog.GetPickupDef(pickup.pickupIndex); if (pickupDef != null && pickupDef.itemIndex == Items.LunarTrinket.itemIndex && !pickup.isRental) { Util.KarmaEventTrigger("BloonBeadsRepeatableTrigger"); } } } private void OnInteract(Interactor interactor, IInteractable interactable, GameObject interactableObject) { if (Object.op_Implicit((Object)(object)interactableObject.GetComponent())) { Util.KarmaEventTrigger("BloonLunarCleanseTrigger"); } if (Object.op_Implicit((Object)(object)interactableObject.GetComponent())) { Util.KarmaEventTrigger("BloonLunarSeerTrigger"); } if (Object.op_Implicit((Object)(object)interactableObject.GetComponent())) { Util.KarmaEventTrigger("BloonShrineShapingTrigger"); } if (Object.op_Implicit((Object)(object)interactableObject.GetComponent())) { Util.KarmaEventTrigger("BloonShrineOrderTrigger"); } } private void OnStageStart(Stage stage) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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) if ((Object)(object)stage1Collection != (Object)null && Run.instance.stageClearCount > 0) { Enumerator enumerator = stage1Collection.sceneEntries.GetEnumerator(); try { while (enumerator.MoveNext()) { SceneEntry current = enumerator.Current; if ((Object)(object)current.sceneDef == (Object)(object)stage.sceneDef) { Util.KarmaEventTrigger("BloonLoopingTrigger"); break; } } } finally { ((IDisposable)enumerator/*cast due to .constrained prefix*/).Dispose(); } } string cachedName = stage.sceneDef.cachedName; if (cachedName.Contains("artifactworld")) { Util.KarmaEventTrigger("BloonBulwarksAmbryTrigger"); } if (cachedName == "mysteryspace") { Util.KarmaEventTrigger("BloonCelestialPortalTrigger"); } if (cachedName == "voidstage") { Util.KarmaEventTrigger("BloonVoidLocusTrigger"); } if (cachedName == "arena") { Util.KarmaEventTrigger("BloonVoidFieldsTrigger"); } } private void DetermineDeath(DamageReport damageReport) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: 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) if ((int)damageReport.attackerTeamIndex == 1 && (Object)(object)damageReport.victimBody != (Object)null) { if (((Object)damageReport.victimBody).name.Contains("ElectricWorm")) { Util.KarmaEventTrigger("BloonWormKillTrigger"); } if (damageReport.victimBodyIndex == BodyPrefabs.ReaperBossBody.bodyIndex) { Util.KarmaEventTrigger("BloonAnimaHarvesterTrigger"); } if (damageReport.victimBodyIndex == BodyPrefabs.ProvFinalBody.bodyIndex) { Util.KarmaEventTrigger("BloonProvidenceTrigger"); } if (damageReport.victimBodyIndex == BodyPrefabs.SolusWingBody.bodyIndex) { Util.KarmaEventTrigger("BloonSolusWingTrigger"); } if (damageReport.victimBodyIndex == BodyPrefabs.SolusHeartBody_Offering.bodyIndex) { Util.KarmaEventTrigger("BloonSolusHeartTrigger"); } if (damageReport.victimBodyIndex == BodyPrefabs.FalseSonBossBodyBrokenLunarShard.bodyIndex) { Util.KarmaEventTrigger("BloonFalseSonTrigger"); } if (damageReport.victimBodyIndex == BodyPrefabs.TitanGoldBody.bodyIndex) { Util.KarmaEventTrigger("BloonAurelioniteTrigger"); } } } private void OnInventoryChanged(Inventory inventory) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)inventory != (Object)null)) { return; } CharacterMaster component = ((Component)inventory).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.GetBody()) && component.GetBody().isPlayerControlled) { if (inventory.GetItemCountEffective(Items.LunarTrinket) > 0) { Util.KarmaEventTrigger("BloonBeadsTrigger"); } if (inventory.GetItemCountEffective(Items.WyrmOnHit) > 0) { Util.KarmaEventTrigger("BloonWormFoodTrigger"); } if (inventory.keyItemIndex == KeyItems.CursedBook.keyItemIndex) { Util.KarmaEventTrigger("BloonCursedBookTrigger"); } } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }