using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; 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.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using BloonItemRebalance.Changes; using BloonItemRebalance.Modules; using BubbetsItems; using BubbetsItems.Items.BarrierItems; using BubbetsItems.Items.VoidLunar; using EntityStates; using EntityStates.Drone.DroneJunk; using EntityStates.VagrantNovaItem; using HG; using HarmonyLib; using IL.EntityStates.Drone.Command; using IL.EntityStates.Drone.DroneWeapon; using IL.RoR2; using IL.RoR2.Items; using Meltdown; using Meltdown.Items; using Meltdown.Items.Green; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using Nautilus.Items; using On.EntityStates.VagrantNovaItem; using On.RoR2; using On.RoR2.Items; using On.RoR2.UI; using R2API; using RigsArsenal; using RigsArsenal.Items; using RigsArsenal.Items.VoidItems; using RoR2; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.Items; using RoR2.Projectile; using RoR2.UI; using RoR2BepInExPack.GameAssetPaths.Version_1_39_0; using SS2; using SS2.Components; using SS2.Items; using SeekingTheVoid; using TooManyItems.Items.Lunar; using TooManyItems.Items.Tier1; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; using vanillaVoid; using vanillaVoid.Items; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("BubbetsItems")] [assembly: IgnoresAccessChecksTo("EclipseRevamped")] [assembly: IgnoresAccessChecksTo("EnemyAbilities")] [assembly: IgnoresAccessChecksTo("FlatItemBuff")] [assembly: IgnoresAccessChecksTo("GrooveSaladSpikestripContent")] [assembly: IgnoresAccessChecksTo("Meltdown")] [assembly: IgnoresAccessChecksTo("Nautilus")] [assembly: IgnoresAccessChecksTo("RigsArsenal")] [assembly: IgnoresAccessChecksTo("SeekingTheVoid")] [assembly: IgnoresAccessChecksTo("Starstorm2")] [assembly: IgnoresAccessChecksTo("SuperCyanTweaks")] [assembly: IgnoresAccessChecksTo("TooManyItems")] [assembly: IgnoresAccessChecksTo("VanillaVoid")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BloonItemRebalance")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("BloonItemRebalance")] [assembly: AssemblyTitle("BloonItemRebalance")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.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 BloonItemRebalance { [BepInPlugin("com.Bloonjitsu7.BloonItemRebalance", "BloonItemRebalance", "1.3.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class BaseMain : BaseUnityPlugin { public const string PluginGUID = "Bloonjitsu7.BloonItemRebalance"; public const string PluginAuthor = "Bloonjitsu7"; public const string PluginName = "BloonItemRebalance"; public const string PluginVersion = "1.3.0"; public void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); new ContentPacks().Initialize(); Main main = new Main(); main.SetupConfig(((BaseUnityPlugin)this).Config); main.Initialize(); } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } } namespace BloonItemRebalance.Modules { public static class Buffs { internal static List buffDefs = new List(); internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown, bool isHidden) { //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) 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; buffDefs.Add(val); return val; } } public static class Effects { private static GameObject finder = Addressables.LoadAssetAsync((object)RoR2_Base_IgniteOnKill.IgniteExplosionVFX_prefab).WaitForCompletion(); public static List effectDefs = new List(); internal static void RegisterEffects() { Main.transmitterPrefab = CreateTransmitterEffect(); } private static GameObject CreateTransmitterEffect() { //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/DLC3/Items/ShieldBooster/ShieldEMPPulseEffectVoid.prefab", "BloonUnstableTransmitterPulse", new Color(1f, 0.2f, 0f, 1f), new Color(1f, 0.3f, 0f, 1f), 1f, 50f, colorMesh: false); } private static GameObject CreateBurdenWaveEffect() { //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/IgniteOnKill/IgniteExplosionVFX.prefab", "BloonBurdenWave", new Color(1f, 0f, 1f, 1f), new Color(1f, 0f, 1f, 1f), 1f, 0f, colorMesh: false); } 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) { //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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: 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; } Component[] componentsInChildren = val.GetComponentsInChildren(typeof(Component)); foreach (Component data in componentsInChildren) { Log.Message(data); } 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; val2.Recolor(color1, color2, scaleMult, colorTemp, colorMesh); CreateEffectFromObject(val2, soundName, parentToTransform); 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_00fe: 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) 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; } private static void Recolor(this GameObject thingToColor, Color color1, Color color2, float widthMult = 1f, float colorTemp = 0f, bool colorMesh = true) { //IL_001a: 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_0072: 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_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) //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_009b: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown //IL_00d7: 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_00f7: 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_011f: 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_0171: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: 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_01ed: 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) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_024f: 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_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) bool flag = true; LineRenderer[] componentsInChildren = thingToColor.GetComponentsInChildren(); foreach (LineRenderer val in componentsInChildren) { bool flag2 = true; val.startColor = color1; val.endColor = color2; if (widthMult != 1f) { val.widthMultiplier *= widthMult; } } ParticleSystem[] componentsInChildren2 = thingToColor.GetComponentsInChildren(); foreach (ParticleSystem val2 in componentsInChildren2) { MainModule main = val2.main; MinMaxCurve startSize = ((MainModule)(ref main)).startSize; ((MainModule)(ref main)).startSize = new MinMaxCurve(((MinMaxCurve)(ref startSize)).constant * widthMult); ((MainModule)(ref main)).startColor = new MinMaxGradient(color1); TrailModule trails = val2.trails; if (((TrailModule)(ref trails)).enabled) { Gradient val3 = 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; val3.SetKeys(array, array2); ((TrailModule)(ref trails)).colorOverLifetime = new MinMaxGradient(val3); } } Light[] componentsInChildren3 = thingToColor.GetComponentsInChildren(); foreach (Light val4 in componentsInChildren3) { if (colorTemp > 0f) { val4.colorTemperature = colorTemp; val4.useColorTemperature = true; } else { val4.useColorTemperature = false; } val4.color = color1; Transform transform = ((Component)val4).transform; transform.localScale *= widthMult; } ParticleSystemRenderer[] componentsInChildren4 = thingToColor.GetComponentsInChildren(); foreach (ParticleSystemRenderer val5 in componentsInChildren4) { ((Renderer)val5).material.SetColor("_MainColor", color1); ((Renderer)val5).material.SetColor("_Color", color1); ((Renderer)val5).material.SetColor("_TintColor", color2); } if (colorMesh) { MeshRenderer[] componentsInChildren5 = thingToColor.GetComponentsInChildren(); foreach (MeshRenderer val6 in componentsInChildren5) { ((Renderer)val6).material.SetColor("_MainColor", color1); ((Renderer)val6).material.SetColor("_Color", color1); ((Renderer)val6).material.SetColor("_TintColor", color2); } } } 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) { //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) 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; } CreateAndAddEffectDef(newEffect); } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public string identifier => "com.Bloonjitsu7.BloonModpackBaseMod"; public void Initialize() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown Effects.RegisterEffects(); 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()); 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 BloonItemRebalance.Changes { public class MeatBuffVFX : MonoBehaviour { public TemporaryVisualEffect effect; } public class Main { public class NewTransmitterBehaviour : ItemBehavior { private bool regenerating = false; private SphereSearch sphereSearch; private void Start() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown sphereSearch = new SphereSearch(); } public bool TryProc() { if (base.stack > 0) { HandleActivateTransmitter(); return true; } return false; } public void HandleActivateTransmitter() { //IL_0014: 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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_0174: 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_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: 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_01b0: 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_01d5: Unknown result type (might be due to invalid IL or missing references) if (base.stack <= 0) { return; } ItemTransformation val = default(ItemTransformation); ((ItemTransformation)(ref val)).originalItemIndex = Items.TeleportOnLowHealth.itemIndex; ((ItemTransformation)(ref val)).newItemIndex = Items.TeleportOnLowHealthConsumed.itemIndex; ((ItemTransformation)(ref val)).minToTransform = 1; ((ItemTransformation)(ref val)).maxToTransform = 1; val.transformationType = (ItemTransformationTypeIndex)7; TryTransformResult val2 = default(TryTransformResult); ((ItemTransformation)(ref val)).TryTransform(base.body.inventory, ref val2); if (!base.body.HasBuff(TransmitterCooldown)) { ((MonoBehaviour)base.body).StartCoroutine(StartCooldown()); } float num = base.body.maxHealth * transmitterBarrier.Value; base.body.healthComponent.AddBarrier(num); base.body.AddTimedBuff(Buffs.HiddenInvincibility, 0.2f); Util.PlaySound("Play_item_proc_teleportOnLowHealth", ((Component)base.body).gameObject); if ((Object)(object)transmitterPrefab != (Object)null) { EffectManager.SpawnEffect(transmitterPrefab, new EffectData { origin = base.body.transform.position, scale = base.body.radius }, true); } List list = CollectionPool>.RentCollection(); if (sphereSearch != null) { sphereSearch.radius = transmitterPulseRadius.Value; sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; sphereSearch.origin = ((Component)this).transform.position; sphereSearch.RefreshCandidates(); TeamMask enemyTeams = TeamMask.GetEnemyTeams(base.body.teamComponent.teamIndex); sphereSearch.FilterCandidatesByDistinctHurtBoxEntities(); sphereSearch.OrderCandidatesByDistance(); sphereSearch.FilterCandidatesByHurtBoxTeam(enemyTeams); sphereSearch.GetHurtBoxes(list); sphereSearch.ClearCandidates(); } foreach (HurtBox item in list) { if (Object.op_Implicit((Object)(object)item.healthComponent)) { if (NetworkServer.active) { item.healthComponent.DoWarp(((Component)base.body).gameObject, base.body); } base.body.healthComponent.AddBarrier(base.body.maxHealth * transmitterPulseBarrier.Value); } } CollectionPool>.ReturnCollection(list); } public IEnumerator StartCooldown() { base.body.AddBuff(TransmitterCooldown); yield return (object)new WaitForSeconds(transmitterCooldown.Value); base.body.RemoveBuff(TransmitterCooldown); ItemTransformation val = default(ItemTransformation); ((ItemTransformation)(ref val)).originalItemIndex = Items.TeleportOnLowHealthConsumed.itemIndex; ((ItemTransformation)(ref val)).newItemIndex = Items.TeleportOnLowHealth.itemIndex; ((ItemTransformation)(ref val)).maxToTransform = int.MaxValue; val.transformationType = (ItemTransformationTypeIndex)7; TryTransformResult tryTransformResult = default(TryTransformResult); ((ItemTransformation)(ref val)).TryTransform(base.body.inventory, ref tryTransformResult); } } public class NewICBMBehaviour : ItemBehavior { public GameObject projectilePrefab = LegacyResourcesAPI.Load("Prefabs/Projectiles/MissileProjectile"); public float interval; public float stopwatch; private void Start() { stopwatch = 0f; interval = icbmCooldown.Value / ConvertReductionIntoStackingDivision(icbmCooldownStack.Value, base.stack); } private void FixedUpdate() { //IL_00c5: 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_00d8: Unknown result type (might be due to invalid IL or missing references) if (!base.body.outOfCombat || !base.body.outOfDanger) { stopwatch += Time.fixedDeltaTime; if (stopwatch >= interval) { stopwatch = 0f; interval = icbmCooldown.Value / ConvertReductionIntoStackingDivision(icbmCooldownStack.Value, base.stack); float stackedStats = GetStackedStats(icbmDamage.Value, icbmDamageStack.Value, base.stack); bool flag = Util.CheckRoll(base.body.crit, base.body.master); MissileUtils.FireMissile(base.body.corePosition, base.body, default(ProcChainMask), (GameObject)null, base.body.damage * stackedStats, flag, projectilePrefab, (DamageColorIndex)3, false); } } } } public class NewBarrageOnBossBehaviour : ItemBehavior { private int maxBuffCount = 50; public uint prevMoney = 0u; private float totalMoney; public float gainedMoney; public int missileBarrageCount = 0; public float fireDelay = 1f; public float cooldownDelay = 0f; public static float MissileOriginHeight = 80f; private static GameObject missilePrefab; private static GameObject missileStartPrefab; private float timer; public float searchRange = 200f; private BullseyeSearch bullseyeSearch = new BullseyeSearch(); private static Vector3 heightOffset = new Vector3(0f, BarrageOnBossBehaviour.MissileOriginHeight, 0f); private static Vector3 traceDirection = new Vector3(0f, -1f, 0f); private static readonly LayerMask missileCollisionMask = ((LayerIndex)(ref LayerIndex.noCollision)).mask; private static RaycastHit[] hits = (RaycastHit[])(object)new RaycastHit[8]; [SystemInitializer(new Type[] { typeof(ItemCatalog) })] private static void Init() { //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_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) AsyncOperationHandle val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/BarrageOnBoss/BossMissileProjectile.prefab"); val.Completed += delegate(AsyncOperationHandle x) { missilePrefab = x.Result; }; val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/BarrageOnBoss/BossMissileStart.prefab"); val.Completed += delegate(AsyncOperationHandle x) { missileStartPrefab = x.Result; }; } private void Awake() { Init(); } private void OnEnable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) CharacterBody.Start += new hook_Start(CheckBarrageEnemy); totalMoney = 0f; bullseyeSearch.teamMaskFilter = TeamMask.allButNeutral; ((TeamMask)(ref bullseyeSearch.teamMaskFilter)).RemoveTeam((TeamIndex)1); bullseyeSearch.maxDistanceFilter = searchRange; bullseyeSearch.sortMode = (SortMode)1; bullseyeSearch.filterByLoS = false; } private void OnDisable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterBody.Start -= new hook_Start(CheckBarrageEnemy); } private void Start() { CharacterMaster master = base.body.master; prevMoney = master.money; master.OnGoldCollected += CollectedMoney; } private void CollectedMoney(float amount) { gainedMoney += amount; } private void Update() { uint num = (uint)((float)base.body.master.money - gainedMoney); if (num < prevMoney) { UpdateExtraMissileMoneyCount(prevMoney - num); } prevMoney = base.body.master.money; gainedMoney = 0f; } private void CheckBarrageEnemy(orig_Start orig, CharacterBody self) { //IL_0031: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if ((self.isElite || self.isBoss) && base.body.HasBuff(Buffs.ExtraBossMissile) && self.teamComponent.teamIndex != (TeamIndex)(base.body.teamComponent.teamIndex | 0)) { base.body.SetBuffCount(Buffs.ExtraBossMissile.buffIndex, base.body.GetBuffCount(Buffs.ExtraBossMissile) - 1); ((MonoBehaviour)this).StartCoroutine(BarrageEnemy(self)); } } public IEnumerator BarrageEnemy(CharacterBody characterBody) { yield return (object)new WaitForSeconds(fireDelay); FireMissile(characterBody); } private void UpdateExtraMissileMoneyCount(float amount) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) totalMoney += amount; uint difficultyScaledCost = (uint)Run.instance.GetDifficultyScaledCost(warbondsGoldCost.Value); while (totalMoney >= (float)difficultyScaledCost && base.body.GetBuffCount(Buffs.ExtraBossMissile) < maxBuffCount) { for (int i = 0; i < base.stack; i++) { base.body.AddBuff(Buffs.ExtraBossMissile.buffIndex); } totalMoney -= difficultyScaledCost; } } private Vector3 MoveTargetToGround(Vector3 target) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: 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_008b: 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_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_0090: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) int num = Physics.RaycastNonAlloc(target, traceDirection, hits, 350f, LayerMask.op_Implicit(missileCollisionMask), (QueryTriggerInteraction)1); if (num > 0) { Vector3 point = ((RaycastHit)(ref hits[0])).point; for (int i = 1; i < num; i++) { if (point.y < ((RaycastHit)(ref hits[i])).point.y) { point = ((RaycastHit)(ref hits[i])).point; } } return point; } return target; } private void FireMissile(CharacterBody characterBody) { //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_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_010e: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: 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 (!Object.op_Implicit((Object)(object)characterBody)) { characterBody = base.body; } int num = (Object.op_Implicit((Object)(object)base.body.inventory) ? base.body.inventory.GetItemCountEffective(Items.MoreMissile) : 0); float damage = base.body.damage * GetStackedStats(warbondsDamage.Value, warbondsDamageStack.Value, base.stack); float maxDistance = MissileOriginHeight - 4f; Component[] componentsInChildren = missilePrefab.GetComponentsInChildren(typeof(Component)); foreach (Component data in componentsInChildren) { Log.Message(data); } FireProjectileInfo val = default(FireProjectileInfo); val.crit = base.body.RollCrit(); val.owner = ((Component)this).gameObject; val.position = ((Component)characterBody).gameObject.transform.position + heightOffset; val.projectilePrefab = missilePrefab; val.rotation = Util.QuaternionSafeLookRotation(Vector3.down); val.damage = damage; val.maxDistance = maxDistance; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); if (num > 0) { val2.damage *= 0.5f; val2.position = ((Component)characterBody).gameObject.transform.position + heightOffset; ProjectileManager.instance.FireProjectile(val2); } } private Vector3 CalculateHitPosition(GameObject target) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: 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_0021: 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) //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_003d: 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) Vector3 val = MoveTargetToGround(target.transform.position); Vector2 insideUnitCircle = Random.insideUnitCircle; Vector2 normalized = ((Vector2)(ref insideUnitCircle)).normalized; return val + new Vector3(normalized.x, 0f, normalized.y); } } [CompilerGenerated] private static class <>O { public static Func, int, float> <0>__OnMissileDamage; public static hook_ProcessHitEnemy <1>__OnProcessSingularityBand; } private static Hook missileHook; public static GameObject MeatBuffVFX = Addressables.LoadAssetAsync((object)RoR2_Junk_RegenOnKill.RegenBoostEffect_prefab).WaitForCompletion(); public static GameObject transmitterPrefab; public static BuffDef MeatBuff = Buffs.MeatRegenBoost; public static BuffDef IgnitionCooldown; public static BuffDef ScytheCooldown; public static BuffDef OpticsBuff; public static BuffDef TransmitterCooldown; public static BuffDef GenesisBuff; public static BuffDef GenesisBuffPrecise; private static Sprite opticsIcon = Addressables.LoadAssetAsync((object)RoR2_Base_Merc.texBuffMercExposeIcon_tif).WaitForCompletion(); private static Sprite transmitterIcon = Addressables.LoadAssetAsync((object)RoR2_DLC2_Items_TeleportOnLowHealth.texBuffTeleportOnLowHealthIcon_png).WaitForCompletion(); private static Sprite genesisIcon = Addressables.LoadAssetAsync((object)RoR2_Base_ShockNearby.texBuffTeslaIcon_tif).WaitForCompletion(); private Xoroshiro128Plus rng; internal static bool HasFlatItemBuff => Chainloader.PluginInfos.ContainsKey("com.kking117.FlatItemBuff"); internal static bool HasBubbetsItems => Chainloader.PluginInfos.ContainsKey("bubbet.bubbetsitems"); internal static bool HasStarstorm => Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm"); internal static bool HasSeekingTheVoid => Chainloader.PluginInfos.ContainsKey("acanthi.SeekingTheVoid"); internal static bool HasTooManyItems => Chainloader.PluginInfos.ContainsKey("shirograhm.TooManyItems"); internal static bool HasVanillaVoid => Chainloader.PluginInfos.ContainsKey("com.Zenithrium.vanillaVoid"); internal static bool HasMeltdown => Chainloader.PluginInfos.ContainsKey("com.pittabread.Meltdown"); internal static bool HasNautilus => Chainloader.PluginInfos.ContainsKey("com.Hex3.Nautilus"); internal static bool HasRigsArsenal => Chainloader.PluginInfos.ContainsKey("RigsInRags.RigsArsenal"); internal static bool HasSpikestrip => Chainloader.PluginInfos.ContainsKey("com.groovesalad.GrooveSaladSpikestripContent"); internal static bool HasSuperCyan => Chainloader.PluginInfos.ContainsKey("Samuel17.SuperCyanTweaks"); public static ConfigEntry stunGrenadeEnable { get; set; } public static ConfigEntry stunGrenadeDamage { get; set; } public static ConfigEntry apRoundsEnable { get; set; } public static ConfigEntry apRoundsEliteDamage { get; set; } public static ConfigEntry lanternEnable { get; set; } public static ConfigEntry lanternSpeed { get; set; } public static ConfigEntry lanternSpeedStack { get; set; } public static ConfigEntry lanternRegen { get; set; } public static ConfigEntry lanternRegenStack { get; set; } public static ConfigEntry lanternAlly { get; set; } public static ConfigEntry lanternAllyStack { get; set; } public static ConfigEntry lanternRadius { get; set; } public static ConfigEntry lanternRadiusStack { get; set; } public static ConfigEntry warpedEchoEnable { get; set; } public static ConfigEntry warpedEchoDuration { get; set; } public static ConfigEntry warpedEchoDurationStack { get; set; } public static ConfigEntry warpedEchoStats { get; set; } public static ConfigEntry warpedEchoCap { get; set; } public static ConfigEntry bungusEnable { get; set; } public static ConfigEntry bungusTimer { get; set; } public static ConfigEntry meatEnable { get; set; } public static ConfigEntry meatHealth { get; set; } public static ConfigEntry meatDuration { get; set; } public static ConfigEntry meatDurationStack { get; set; } public static ConfigEntry meatRegen { get; set; } public static ConfigEntry meatMax { get; set; } public static ConfigEntry meatMaxStack { get; set; } public static ConfigEntry chronicEnable { get; set; } public static ConfigEntry multikillDuration { get; set; } public static ConfigEntry multikillDamage { get; set; } public static ConfigEntry multikillDamageStack { get; set; } public static ConfigEntry milkEnable { get; set; } public static ConfigEntry milkHealth { get; set; } public static ConfigEntry milkRetaliate { get; set; } public static ConfigEntry loafEnable { get; set; } public static ConfigEntry loafRegenChance { get; set; } public static ConfigEntry coffeeEnable { get; set; } public static ConfigEntry coffeeBuffDuration { get; set; } public static ConfigEntry coffeeMoveSpeed { get; set; } public static ConfigEntry coffeeAttackSpeed { get; set; } public static ConfigEntry horseshoeEnable { get; set; } public static ConfigEntry uraniumHorseshoeDamage { get; set; } public static ConfigEntry boneVisorEnable { get; set; } public static ConfigEntry boneDuration { get; set; } public static ConfigEntry boneDurationStack { get; set; } public static ConfigEntry boneProcChance { get; set; } public static ConfigEntry boneProcStack { get; set; } public static ConfigEntry chanceDollEnable { get; set; } public static ConfigEntry chanceDollScrap { get; set; } public static ConfigEntry chanceDollUpgrade { get; set; } public static ConfigEntry ignitionEnable { get; set; } public static ConfigEntry ignitionBurnBonus { get; set; } public static ConfigEntry ignitionCooldownTime { get; set; } public static ConfigEntry ignitionCooldownStack { get; set; } public static ConfigEntry ignitionBurnDamage { get; set; } public static ConfigEntry scytheEnable { get; set; } public static ConfigEntry scytheHeal { get; set; } public static ConfigEntry scytheHealStack { get; set; } public static ConfigEntry scytheCooldownTime { get; set; } public static ConfigEntry infusionEnable { get; set; } public static ConfigEntry infusionSpeed { get; set; } public static ConfigEntry faradayEnable { get; set; } public static ConfigEntry faradaySpeedJumpCap { get; set; } public static ConfigEntry faradayCharge { get; set; } public static ConfigEntry faradayChargeStack { get; set; } public static ConfigEntry faradayDamage { get; set; } public static ConfigEntry faradayDamageStack { get; set; } public static ConfigEntry faradayRadius { get; set; } public static ConfigEntry faradayRadiusStack { get; set; } public static ConfigEntry transmitterEnable { get; set; } public static ConfigEntry transmitterCooldown { get; set; } public static ConfigEntry transmitterBarrier { get; set; } public static ConfigEntry transmitterPulseBarrier { get; set; } public static ConfigEntry transmitterPulseRadius { get; set; } public static ConfigEntry jetBootsEnable { get; set; } public static ConfigEntry jetBootsDamage { get; set; } public static ConfigEntry jetBootsDamageStack { get; set; } public static ConfigEntry batteryEnable { get; set; } public static ConfigEntry batteryDamage { get; set; } public static ConfigEntry batteryDamageStack { get; set; } public static ConfigEntry batteryDamageChance { get; set; } public static ConfigEntry duplicatorEnable { get; set; } public static ConfigEntry duplicatorCompat { get; set; } public static ConfigEntry duplicatorDropChance { get; set; } public static ConfigEntry duplicatorDuration { get; set; } public static ConfigEntry vultureEnable { get; set; } public static ConfigEntry vultureEliteDamage { get; set; } public static ConfigEntry vultureDropChance { get; set; } public static ConfigEntry vultureHealPercent { get; set; } public static ConfigEntry raincoatEnable { get; set; } public static ConfigEntry raincoatCooldownTime { get; set; } public static ConfigEntry raincoatCooldownStack { get; set; } public static ConfigEntry raincoatBarrier { get; set; } public static ConfigEntry raincoatDuration { get; set; } public static ConfigEntry warbondsEnable { get; set; } public static ConfigEntry warbondsGoldCost { get; set; } public static ConfigEntry warbondsDamage { get; set; } public static ConfigEntry warbondsDamageStack { get; set; } public static ConfigEntry icbmEnable { get; set; } public static ConfigEntry icbmDamage { get; set; } public static ConfigEntry icbmDamageStack { get; set; } public static ConfigEntry icbmCooldown { get; set; } public static ConfigEntry icbmCooldownStack { get; set; } public static ConfigEntry genesisEnable { get; set; } public static ConfigEntry genesisEnemyEnable { get; set; } public static ConfigEntry genesisDamage { get; set; } public static ConfigEntry genesisDamageStack { get; set; } public static ConfigEntry genesisCharge { get; set; } public static ConfigEntry genesisChargeStack { get; set; } public static ConfigEntry knurlEnable { get; set; } public static ConfigEntry knurlHP { get; set; } public static ConfigEntry knurlRegen { get; set; } public static ConfigEntry lampEnable { get; set; } public static ConfigEntry lampDamage { get; set; } public static ConfigEntry lampDamageStack { get; set; } public static ConfigEntry pyreEnable { get; set; } public static ConfigEntry welliesEnable { get; set; } public static ConfigEntry welliesChance { get; set; } public static ConfigEntry welliesDamage { get; set; } public static ConfigEntry welliesDuration { get; set; } public static ConfigEntry welliesDurationStack { get; set; } public static ConfigEntry welliesForce { get; set; } public static ConfigEntry coolantEnable { get; set; } public static ConfigEntry coolantDamage { get; set; } public static ConfigEntry coolantDamageStack { get; set; } public static ConfigEntry coolantRadius { get; set; } public static ConfigEntry coolantRadiusStack { get; set; } public static ConfigEntry coolantDuration { get; set; } public static ConfigEntry coolantDurationStack { get; set; } public static ConfigEntry coolantFrostCount { get; set; } public static ConfigEntry singularityEnable { get; set; } public static ConfigEntry singularityDamage { get; set; } public static ConfigEntry singularityDamageStack { get; set; } public static ConfigEntry singularityRadius { get; set; } public static ConfigEntry singularityRadiusStack { get; set; } public static ConfigEntry singularityThreshold { get; set; } public static ConfigEntry singularityProc { get; set; } public static ConfigEntry toxicoEnable { get; set; } public static ConfigEntry toxicoStack { get; set; } public static ConfigEntry coreEnable { get; set; } public static ConfigEntry coreDuration { get; set; } public static ConfigEntry coreDurationStack { get; set; } public static ConfigEntry coreSlowChance { get; set; } public static ConfigEntry burdenEnable { get; set; } public static ConfigEntry burdenDamage { get; set; } public static ConfigEntry burdenDamageStack { get; set; } public static ConfigEntry burdenRadius { get; set; } public static ConfigEntry burdenRadiusStack { get; set; } public static ConfigEntry burdenDuration { get; set; } public static ConfigEntry burdenThreshold { get; set; } public static ConfigEntry opticsEnable { get; set; } public static ConfigEntry opticsSlots { get; set; } public static ConfigEntry opticsDuration { get; set; } public static ConfigEntry opticsDurationStack { get; set; } public static ConfigEntry opticsChance { get; set; } public static ConfigEntry opticsDamage { get; set; } public static ConfigEntry solitudeEnable { get; set; } public static ConfigEntry solitudeCost { get; set; } public static ConfigEntry solitudeExp { get; set; } public static ConfigEntry crucifixEnable { get; set; } public static ConfigEntry crucifixBurnPercent { get; set; } public static ConfigEntry crucifixBurnStack { get; set; } public static ConfigEntry crucifixResist { get; set; } public static ConfigEntry crucifixHealReduction { get; set; } public static ConfigEntry seepingEnable { get; set; } public static ConfigEntry seepingChance { get; set; } public static ConfigEntry seepingChanceStack { get; set; } public void SetupConfig(ConfigFile cfg) { stunGrenadeEnable = cfg.Bind("Stun Grenade Buff", "Enable Changes", true, "Enables the changes to stun grenade."); stunGrenadeDamage = cfg.Bind("Stun Grenade Buff", "Damage", 2f, "The damage coefficient of the proc. (1 = 100% damage)"); apRoundsEnable = cfg.Bind("AP Rounds Buff", "Enable Changes", true, "Enables the changes to armor piercing rounds."); apRoundsEliteDamage = cfg.Bind("AP Rounds Buff", "Elite Damage Bonus", 0.05f, "Damage bonus granted against elites for each stack of the item. (1 = 100% bonus damage)"); lanternEnable = cfg.Bind("Bolstering Lantern Rework", "Enable Changes", true, "Enables the changes to bolstering lantern."); lanternSpeed = cfg.Bind("Bolstering Lantern Rework", "Attack Speed", 0.07f, "Base attack speed bonus granted per buff stack. (1 = 100% attack speed)"); lanternSpeedStack = cfg.Bind("Bolstering Lantern Rework", "Attack Speed Stacking", 0f, "Attack speed bonus granted for each additional stack of the item, per buff stack."); lanternRegen = cfg.Bind("Bolstering Lantern Rework", "Health Regen", 0.7f, "Base health regen bonus granted per buff stack. (1 = 1 hp/s)"); lanternRegenStack = cfg.Bind("Bolstering Lantern Rework", "Health Regen Stacking", 0f, "Health regen bonus granted for each additional stack of the item, per buff stack."); lanternAlly = cfg.Bind("Bolstering Lantern Rework", "Max Buffs", 4, "Maximum number of buffs you can have with one stack of the item."); lanternAllyStack = cfg.Bind("Bolstering Lantern Rework", "Max Buff Stacking", 2, "Maximum number of buffs you can have with each additional stack of the item."); lanternRadius = cfg.Bind("Bolstering Lantern Rework", "Radius", 40f, "Base area of effect size of the item. (1 = 0.5m)"); lanternRadiusStack = cfg.Bind("Bolstering Lantern Rework", "Radius Stacking", 4f, "Bonus area of effect size for each additional stack of the item."); warpedEchoEnable = cfg.Bind("Warped Echo Rework", "Enable Changes", true, "Enables the changes to stun grenade. Requires FlatItemBuff."); warpedEchoDuration = cfg.Bind("Warped Echo Rework", "Delayed Damage Duration", 2.5f, "Base duration of the delayed damage (in seconds) before it hits."); warpedEchoDurationStack = cfg.Bind("Warped Echo Rework", "Duration Stacking", 0.25f, "Bonus duration of the delayed damage (in seconds) for each additional stack of the item."); warpedEchoStats = cfg.Bind("Warped Echo Rework", "Stat Bonuses", 0.15f, "Base increase to attack, movement, and cooldown speed per delayed hit. (1 = 100% increase)"); warpedEchoCap = cfg.Bind("Warped Echo Rework", "Max Buffs", 1, "Maximum amount of hits that can be delayed for each stack of the item."); bungusEnable = cfg.Bind("Bungus Buff", "Enable Changes", true, "Enables the changes to bustling fungus."); bungusTimer = cfg.Bind("Bungus Buff", "Timer", 0.25f, "Amount of time (in seconds) while standing still that it takes for bustling fungus to activate."); meatEnable = cfg.Bind("Bison Steak Buff", "Enable Changes", true, "Enables the changes to bison steak."); meatHealth = cfg.Bind("Bison Steak Buff", "Health Increase", 30f, "Amount of HP gained for each stack of the item."); meatRegen = cfg.Bind("Bison Steak Buff", "Health Regen", 1.5f, "Amount of health regeneration gained per buff stack. (1 = 1 hp/s)"); meatDuration = cfg.Bind("Bison Steak Buff", "Regen Duration", 3f, "Base duration (in seconds) of the regeneration buff on kill."); meatDurationStack = cfg.Bind("Bison Steak Buff", "Regen Duration Stacking", 1f, "Duration of the regeneration buff on kill for each additional stack of the item."); meatMax = cfg.Bind("Bison Steak Buff", "Max Buffs", 2, "Maximum number of buffs you can have with one stack of the item."); meatMaxStack = cfg.Bind("Bison Steak Buff", "Max Buff Stacking", 1, "Maximum number of buffs you can have with each additional stack of the item."); chronicEnable = cfg.Bind("Chronic Expansion Rebalance", "Enable Changes", true, "Enables the changes to chronic expansion."); multikillDamage = cfg.Bind("Chronic Expansion Rebalance", "Damage", 0.03f, "Base damage bonus granted per buff stack. (1 = 100% bonus damage)"); multikillDamageStack = cfg.Bind("Chronic Expansion Rebalance", "Damage Stacking", 0.005f, "Damage bonus granted for each additional stack of the item, per buff stack."); multikillDuration = cfg.Bind("Chronic Expansion Rebalance", "Buff Duration", 9f, "Duration of the buff (in seconds)."); milkEnable = cfg.Bind("Milk Carton Buff", "Enable Changes", true, "Enables the changes to milk carton. Requires TooManyItems."); milkHealth = cfg.Bind("Milk Carton Buff", "Health Increase", 20f, "Amount of HP gained for each stack of the item."); milkRetaliate = cfg.Bind("Milk Carton Buff", "Elite Retaliation", 2f, "Amount of damage retaliated from elites for each stack of the item. (1 = 100%)"); loafEnable = cfg.Bind("Loaf of Bread Buff", "Enable Changes", true, "Enables the changes to loaf of bread. Requires TooManyItems."); loafRegenChance = cfg.Bind("Loaf of Bread Buff", "Regen Chance", 20f, "Percent chance to regain a loaf of bread after it scraps itself. (100 = 100% chance)"); coffeeEnable = cfg.Bind("Coffee Bag Rework", "Enable Changes", true, "Enables the changes to coffee bag. Requires Starstorm2."); coffeeBuffDuration = cfg.Bind("Coffee Bag Rework", "Duration", 5f, "Base duration (in seconds) of the coffee buff."); coffeeMoveSpeed = cfg.Bind("Coffee Bag Rework", "Move Speed", 0.07f, "Move speed bonus granted for each stack of the item, per buff stack. (1 = 100% move speed)"); coffeeAttackSpeed = cfg.Bind("Coffee Bag Rework", "Attack Speed", 0.075f, "Attack speed bonus granted for each stack of the item, per buff stack. (1 = 100% attack speed)"); horseshoeEnable = cfg.Bind("Uranium Horseshoe Buff", "Enable Changes", true, "Enables the changes to uranium horseshoe. Requires Starstorm2 and Meltdown."); uraniumHorseshoeDamage = cfg.Bind("Uranium Horseshoe Buff", "Radiation Damage", 0.05f, "Radiation damage bonus granted for each stack of the item. (1 = 100% bonus damage)"); boneVisorEnable = cfg.Bind("Bone Visor Rework", "Enable Changes", true, "Enables the changes to bone visor. Requires BubbetsItems."); boneDuration = cfg.Bind("Bone Visor Rework", "Duration", 5f, "Base duration (in seconds) of the barrier regeneration buff."); boneDurationStack = cfg.Bind("Bone Visor Rework", "Duration Stacking", 1f, "Duration of the barrier regeneration buff for each additional stack of the item."); boneProcChance = cfg.Bind("Bone Visor Rework", "Proc Chance", 6f, "Base percent chance to drop a bone shard on hit. (100 = 100% chance)"); boneProcStack = cfg.Bind("Bone Visor Rework", "Proc Chance Stacking", 1.5f, "Percent chance to drop a bone shard for each additional stack of the item."); chanceDollEnable = cfg.Bind("Chance Doll Rework", "Enable Changes", true, "Enables the changes to chance doll."); chanceDollScrap = cfg.Bind("Chance Doll Rework", "Scrap Chance", 10f, "Percent chance to gain white scrap when a chance shrine fails, for each stack of the item. (100 = 100% chance)"); chanceDollUpgrade = cfg.Bind("Chance Doll Rework", "Upgrade Chance", 50f, "Percent chance to upgrade a chance shrine reward."); ignitionEnable = cfg.Bind("Ignition Tank Rework", "Enable Changes", true, "Enables the changes to ignition tank."); ignitionBurnBonus = cfg.Bind("Ignition Tank Rework", "Ignite Multiplier", 2, "Ignite damage multiplier for each stack of the item. (1 = 100% more damage)"); ignitionCooldownTime = cfg.Bind("Ignition Tank Rework", "Cooldown", 5f, "Cooldown time (in seconds) for the ignite on hit effect."); ignitionCooldownStack = cfg.Bind("Ignition Tank Rework", "Cooldown Stacking", 0.15f, "Cooldown reduction for each additional stack of the item. (1 = 100% reduction)"); ignitionBurnDamage = cfg.Bind("Ignition Tank Rework", "Ignite Damage", 0.5f, "Total damage of the ignite on hit effect. (1 = 100% damage)"); scytheEnable = cfg.Bind("Harvesters Scythe Rework", "Enable Changes", true, "Enables the changes to harvesters scythe."); scytheHeal = cfg.Bind("Harvesters Scythe Rework", "Heal Amount", 20f, "Base healing recieved from the item."); scytheHealStack = cfg.Bind("Harvesters Scythe Rework", "Heal Amount Stacking", 20f, "Healing recieved from each additional stack of the item."); scytheCooldownTime = cfg.Bind("Harvesters Scythe Rework", "Cooldown", 2f, "Cooldown time (in seconds) between uses of the item."); infusionEnable = cfg.Bind("Infusion Buff", "Enable Changes", true, "Enables the changes to infusion."); infusionSpeed = cfg.Bind("Infusion Buff", "Speed Boost", 0.1f, "Maximum speed boost to recieve from each stack of the item. (1 = 100% bonus speed)"); faradayEnable = cfg.Bind("Faraday Spur Rebalance", "Enable Changes", true, "Enables the changes to faraday spur."); faradaySpeedJumpCap = cfg.Bind("Faraday Spur Rebalance", "Speed & Jump Height Cap", 1f, "Speed/jump bonus granted by this item at max charge. (1 = 100% bonus speed)"); faradayCharge = cfg.Bind("Faraday Spur Rebalance", "Charge Rate", 1.25f, "Base charge rate multiplier for faraday spur. Flat buff to the vanilla charge rate. (1 = no changes)"); faradayChargeStack = cfg.Bind("Faraday Spur Rebalance", "Charge Rate Stacking", 0.5f, "Bonus charge speed granted for each additional stack of the item. (1 = 100% faster charge rate)"); faradayDamage = cfg.Bind("Faraday Spur Rebalance", "Max Damage", 8f, "Damage coeffecient of the blast at max charge. (1 = 100% base damage)"); faradayDamageStack = cfg.Bind("Faraday Spur Rebalance", "Max Damage Stacking", 4f, "Max damage coeffecient of the blast for each additional stack of the item."); faradayRadius = cfg.Bind("Faraday Spur Rebalance", "Max Radius Base", 40f, "Radius of the blast at max charge. (1 = 1m radius)"); faradayRadiusStack = cfg.Bind("Faraday Spur Rebalance", "Max Radius Stacking", 0f, "Max radius of the blast for each additional stack of the item."); transmitterEnable = cfg.Bind("Unstable Transmitter Rework", "Enable Changes", true, "Enables the changes to unstable transmitter."); transmitterBarrier = cfg.Bind("Unstable Transmitter Rework", "Barrier Amount", 0.3f, "Barrier amount to recieve on activation, proportional to max HP. (1 = 100% barrier)"); transmitterPulseBarrier = cfg.Bind("Unstable Transmitter Rework", "Barrier Per Hit", 0.05f, "Additional barrier to recieve for each enemy within the radius, proportional to max HP."); transmitterPulseRadius = cfg.Bind("Unstable Transmitter Rework", "Pulse Radius", 30f, "Radius of the unstable transmitter pulse. (1 = 1m radius)"); transmitterCooldown = cfg.Bind("Unstable Transmitter Rework", "Cooldown", 200f, "Cooldown time (in seconds) before this item regenerates."); jetBootsEnable = cfg.Bind("Prototype Jet Boots Rebalance", "Enable Changes", true, "Enables the changes to prototype jet boots. Requires Starstorm2."); jetBootsDamage = cfg.Bind("Prototype Jet Boots Rebalance", "Damage", 4.5f, "Base damage coefficient of the item. (1 = 100% damage)"); jetBootsDamageStack = cfg.Bind("Prototype Jet Boots Rebalance", "Damage Stacking", 1.5f, "Bonus damage coefficient for each additional stack of the item."); batteryEnable = cfg.Bind("Volatile Thorium Battery Rebalance", "Enable Changes", true, "Enables the changes to volatile thorium battery. Requires Meltdown."); batteryDamage = cfg.Bind("Volatile Thorium Battery Rebalance", "Damage", 2f, "Base damage coefficient of the radiation wave. (1 = 100% damage)"); batteryDamageStack = cfg.Bind("Volatile Thorium Battery Rebalance", "Damage Stacking", 0.8f, "Bonus damage coefficient granted for each additional stack of the item."); batteryDamageChance = cfg.Bind("Volatile Thorium Battery Rebalance", "Radiation Wave Proc Chance", 20f, "Percent chance per radiation damage tick for the item to proc. (100 = 100% chance)"); duplicatorEnable = cfg.Bind("Substandard Duplicator Rework", "Enable Changes", true, "Enables the changes to substandard duplicator."); duplicatorCompat = cfg.Bind("Substandard Duplicator Rework", "TempItemsTooShort Compat", false, "Enable this if TempItemsTooShort is installed or else the game will blow itself up."); duplicatorDropChance = cfg.Bind("Substandard Duplicator Rework", "Proc Chance", 8f, "Percent chance to drop a temporary item on kill. (100 = 100% chance)"); duplicatorDuration = cfg.Bind("Substandard Duplicator Rework", "Duration", 30, "Duration increase (in seconds) for temporary items per stack of the item."); vultureEnable = cfg.Bind("Wake Of Vultures Rework", "Enable Changes", true, "Enables the changes to wake of vultures."); vultureEliteDamage = cfg.Bind("Wake Of Vultures Rework", "Elite Damage Bonus", 0.5f, "Damage bonus granted against elites above half health for each stack of the item. (1 = 100% bonus damage)"); vultureDropChance = cfg.Bind("Wake Of Vultures Rework", "Elite Aspect Drop Chance", 5f, "Flat percent chance for an elite aspect to drop on kill for each stack of the item. (100 = 100% chance)"); vultureHealPercent = cfg.Bind("Wake Of Vultures Rework", "Heal Percent", 0.2f, "Max HP fraction to heal upon killing an elite. (1 = 100% heal)"); raincoatEnable = cfg.Bind("Bens Raincoat Rework", "Enable Changes", true, "Enables the changes to bens raincoat."); raincoatCooldownTime = cfg.Bind("Bens Raincoat Rework", "Cooldown", 15f, "Cooldown time (in seconds) between uses of the item."); raincoatCooldownStack = cfg.Bind("Bens Raincoat Rework", "Cooldown Stacking", 0.2f, "Cooldown reduction for each additional stack of the item. (1 = 100% reduction)"); raincoatBarrier = cfg.Bind("Bens Raincoat Rework", "Barrier Amount", 0.25f, "Barrier amount to recieve on activation, proportional to max HP. (1 = 100% barrier)"); raincoatDuration = cfg.Bind("Bens Raincoat Rework", "Invulnerability Time", 3f, "Duration of the invulnerability (in seconds) to recieve on activation."); warbondsEnable = cfg.Bind("War Bonds Rework", "Enable Changes", true, "Enables the changes to war bonds."); warbondsGoldCost = cfg.Bind("War Bonds Rework", "Gold Rewuirement", 15, "Required amount of gold to spend per barrage stack (scales over time)."); warbondsDamage = cfg.Bind("War Bonds Rework", "Barrage Damage", 15f, "Base damage coefficient of the barrage. (1 = 100% damage)"); warbondsDamageStack = cfg.Bind("War Bonds Rework", "Barrage Damage Stacking", 3f, "Bonus damage coefficient of the barrage for each additional stack of the item."); icbmEnable = cfg.Bind("Pocket ICBM Rework", "Enable Changes", true, "Enables the changes to pocket icbm."); icbmDamage = cfg.Bind("Pocket ICBM Rework", "Auto-Missile Damage", 5f, "Base damage coefficient of the auto-missiles. (1 = 100% damage)"); icbmDamageStack = cfg.Bind("Pocket ICBM Rework", "Auto-Missile Damage Stacking", 0.5f, "Bonus damage coefficient of the auto-missiles for each additional stack of the item."); icbmCooldown = cfg.Bind("Pocket ICBM Rework", "Auto-Missile Interval", 10f, "Base time (in seconds) between auto-missiles."); icbmCooldownStack = cfg.Bind("Pocket ICBM Rework", "Auto-Missile Interval Stacking", 0.25f, "Time reduction for each additional stack of the item."); knurlEnable = cfg.Bind("Titanic Knurl Rework", "Enable Changes", true, "Enables the changes to titanic knurl."); knurlHP = cfg.Bind("Titanic Knurl Rework", "Level Health", 10f, "HP gained per level for each stack of the item."); knurlRegen = cfg.Bind("Titanic Knurl Rework", "Level Regen", 0.5f, "Health regeneration gained per level for each stack of the item. (1 = 1 hp/s per level)"); genesisEnable = cfg.Bind("Genesis Loop Rework", "Enable Changes", true, "Enables the changes to genesis loop."); genesisEnemyEnable = cfg.Bind("Genesis Loop Rework", "Enable Changes On Enemies", false, "Enables the changes to genesis loop on all enemies with the item. Off by default for compatibility with SimulacrumAdditions."); genesisCharge = cfg.Bind("Genesis Loop Rework", "Charge Rate", 1f, "Amount of charge to gain per 1% health lost when damaged. (100 = 100% charge)"); genesisChargeStack = cfg.Bind("Genesis Loop Rework", "Charge Rate Stacking", 0.5f, "Bonus charge to gain per 1% health lost for each additional stack of the item."); lampEnable = cfg.Bind("Shackled Lamp Buff", "Enable Changes", true, "Enables the changes to shackled lamp. Requires Starstorm2."); lampDamage = cfg.Bind("Shackled Lamp Buff", "Damage", 3.5f, "Base damage coeffecient of the item. (1 = 100% damage)"); lampDamageStack = cfg.Bind("Shackled Lamp Buff", "Damage Stacking", 1.5f, "Bonus damage coeffecient for each additional stack of the item."); pyreEnable = cfg.Bind("Umbral Pyre Corruption", "Change Corruption", true, "Changes this item's corruption to bolstering lantern. For further configuration, use the config file from the original mod. Requires RigsArsenal."); welliesEnable = cfg.Bind("Waterlogged Wellies Rework", "Enable Changes", true, "Enables the changes to waterlogged wellies. Requires Nautilus."); welliesDamage = cfg.Bind("Waterlogged Wellies Rework", "Grounded Crit Damage", 0.15f, "Crit damage bonus to gain for each stack of the item while grounded. (1 = 100% bonus damage)"); welliesChance = cfg.Bind("Waterlogged Wellies Rework", "Airborne Crit Chance", 15f, "Crit chance to gain for each stack of the item while airborne. (100 = 100% chance)"); welliesDuration = cfg.Bind("Waterlogged Wellies Rework", "Weak Duration", 2f, "Base duration of the weak debuff (in seconds) applied to airborne enemies whenever you land a critical hit."); welliesDurationStack = cfg.Bind("Waterlogged Wellies Rework", "Weak Duration Stacking", 0.5f, "Bonus duration of the weak debuff (in seconds) for each additional stack of the item."); welliesForce = cfg.Bind("Waterlogged Wellies Rework", "Downward Pull Force", 175f, "Amount of pull force to apply to airborne enemies whenever you land a critical hit."); coolantEnable = cfg.Bind("Supercritical Coolant Rebalance", "Enable Changes", true, "Enables the changes to supercritical coolant. Requires VanillaVoid."); coolantDamage = cfg.Bind("Supercritical Coolant Rebalance", "Damage", 2f, "Base damage of the item. (1 = 100% damage)"); coolantDamageStack = cfg.Bind("Supercritical Coolant Rebalance", "Damage Stacking", 0.5f, "Bonus damage for each additional stack of the item."); coolantRadius = cfg.Bind("Supercritical Coolant Rebalance", "Radius", 15f, "Base area of effect size of the item. (1 = 1m)."); coolantRadiusStack = cfg.Bind("Supercritical Coolant Rebalance", "Radius Stacking", 5f, "Bonus area of effect size for each additional stack of the item."); coolantDuration = cfg.Bind("Supercritical Coolant Rebalance", "Frost Duration", 4f, "Base duration of the Frost debuff (in seconds) applied by the item."); coolantDurationStack = cfg.Bind("Supercritical Coolant Rebalance", "Frost Duration Stacking", 1f, "Bonus duration of the Frost debuff (in seconds) for each additional stack of the item."); coolantFrostCount = cfg.Bind("Supercritical Coolant Rebalance", "Frost Count", 2, "Amount of Frost debuff stacks that the item applies on hit (enemies freeze after 6 stacks)."); singularityEnable = cfg.Bind("Singularity Band Rebalance", "Enable Changes", true, "Enables the changes to singularity band."); singularityDamage = cfg.Bind("Singularity Band Rebalance", "Damage Coefficient", 3f, "Base damage coefficient of the black hole. (1 = 100% TOTAL damage)"); singularityDamageStack = cfg.Bind("Singularity Band Rebalance", "Damage Coefficient Stacking", 1.5f, "Bonus damage coefficient of the black hole for each additional stack of the item."); singularityRadius = cfg.Bind("Singularity Band Rebalance", "Radius", 15f, "Base area of effect size of the black hole. (1 = 1m)."); singularityRadiusStack = cfg.Bind("Singularity Band Rebalance", "Radius Stacking", 1.5f, "Bonus area of effect size for each additional stack of the item."); singularityThreshold = cfg.Bind("Singularity Band Rebalance", "Damage Threshold", 6f, "Damage coefficient required to proc the item. (1 = 100% damage)"); singularityProc = cfg.Bind("Singularity Band Rebalance", "Proc Coefficient", 2f, "Proc coefficient of the black hole."); toxicoEnable = cfg.Bind("Toxicodendron Brine Buff", "Enable Changes", true, "Enables the changes to toxicodendronbrine. Requires SeekingTheVoid."); toxicoStack = cfg.Bind("Toxicodendron Brine Buff", "Cooldown Stacking", 0.1f, "Bonus ability cooldown reduction for each additional stack of the item. (1 = 100% recharge)"); coreEnable = cfg.Bind("Corrosive Core Buff", "Enable Changes", true, "Enables the changes to corrosive core. Requires VanillaVoid."); coreDuration = cfg.Bind("Corrosive Core Buff", "Tar Duration", 2f, "Base duration of the tar debuff (in seconds) from the item."); coreDurationStack = cfg.Bind("Corrosive Core Buff", "Tar Duration Stacking", 0.5f, "Bonus duration of the tar debuff (in seconds) for each additional stack of the item."); coreSlowChance = cfg.Bind("Corrosive Core Buff", "Tar Chance", 6f, "Percent chance to apply Tar on hit. (100 = 100% chance)"); burdenEnable = cfg.Bind("Executioners Burden Rework", "Enable Changes", true, "Enables the changes to exectioners burden. Requires VanillaVoid."); burdenDamage = cfg.Bind("Executioners Burden Rework", "Damage", 5f, "Base damage coefficient of the item. (1 = 100% damage)"); burdenDamageStack = cfg.Bind("Executioners Burden Rework", "Damage Stacking", 3.5f, "Bonus damage coefficient for each additional stack of the item."); burdenRadius = cfg.Bind("Executioners Burden Rework", "Radius", 30f, "Base area of effect size of the item. (1 = 1m)"); burdenRadiusStack = cfg.Bind("Executioners Burden Rework", "Radius Stacking", 5f, "Bonus area of effect size for each additional stack of the item."); burdenDuration = cfg.Bind("Executioners Burden Rework", "Dread Duration", 8f, "Duration of the dread debuff (in seconds) applied by this item."); burdenThreshold = cfg.Bind("Executioners Burden Rework", "Dread Execute Threshold", 0.25f, "Percentage of max hp for enemies to be executed at while afflicted by dread. (1 = 100%)"); opticsEnable = cfg.Bind("Obervers Optics Rework", "Enable Changes", true, "Enables the changes to observers optics. Requires Nautilus."); opticsDuration = cfg.Bind("Obervers Optics Rework", "Voidtouched Duration", 30f, "Base duration of the voidtouched buff (in seconds) upon activating an equipment."); opticsDurationStack = cfg.Bind("Obervers Optics Rework", "Voidtouched Duration Stacking", 30f, "Bonus duration of the voidtouched buff (in seconds) for each additional stack of the item."); opticsChance = cfg.Bind("Obervers Optics Rework", "Collapse Chance", 5f, "Percent chance to collapse on hit per buff stack. (100 = 100% chance)"); opticsDamage = cfg.Bind("Obervers Optics Rework", "Collapse Damage", 0.25f, "Bonus collapse damage granted per puff stack. (1 = 100% bonus damage)"); solitudeEnable = cfg.Bind("Longstanding Solitude Rebalance", "Enable Changes", true, "Enables the changes to longstanding solitude."); solitudeCost = cfg.Bind("Longstanding Solitude Rebalance", "Cost Increase", 0.25f, "Percent increase in interactable prices for each stack of the item. (1 = 100%)"); solitudeExp = cfg.Bind("Longstanding Solitude Rebalance", "Exp Decrease", 0.25f, "Percent decrease in exp gains for each stack of the item. (1 = 100%)"); crucifixEnable = cfg.Bind("Crucifix Rework", "Enable Changes", true, "Enables the changes to crucifix. Requires TooManyItems."); crucifixHealReduction = cfg.Bind("Crucifix Rework", "Healing Reduction", 0.5f, "Healing reduction while on fire for each stack of the item. (1 = 100% reduction)"); crucifixResist = cfg.Bind("Crucifix Rework", "Damage Resistance", 0.95f, "Damage resistance granted by the item. (1 = 100% resistance)"); crucifixBurnPercent = cfg.Bind("Crucifix Rework", "Burn Damage", 0.2f, "Percentage of max hp to take as burn damage. (1 = 100% hp)"); crucifixBurnStack = cfg.Bind("Crucifix Rework", "Burn Damage Stacking", 0.1f, "Burn damage reduction per additional stack of the item. (1 = 100% reduction)"); seepingEnable = cfg.Bind("Seeping Ocean Rework", "Enable Changes", true, "Enables the changes to seeping ocean. Requires BubbetsItems."); seepingChance = cfg.Bind("Seeping Ocean Rework", "Conversion Chance", 0.04f, "Base percent chance to convert items into random void items. (1 = 100% chance)"); seepingChanceStack = cfg.Bind("Seeping Ocean Rework", "Conversion Chance Stacking", 0.02f, "Bonus percent chance to convert items for each additional stack of the item. (1 = 100% chance)"); } public void Initialize() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Expected O, but got Unknown //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Expected O, but got Unknown //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Expected O, but got Unknown //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: 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_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Expected O, but got Unknown //IL_0609: Unknown result type (might be due to invalid IL or missing references) //IL_0613: Expected O, but got Unknown //IL_068b: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Expected O, but got Unknown //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07b3: Expected O, but got Unknown //IL_07bb: Unknown result type (might be due to invalid IL or missing references) //IL_07c5: Expected O, but got Unknown //IL_07cd: Unknown result type (might be due to invalid IL or missing references) //IL_07d7: Expected O, but got Unknown //IL_089d: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Expected O, but got Unknown //IL_0966: Unknown result type (might be due to invalid IL or missing references) //IL_0970: Expected O, but got Unknown //IL_0a47: Unknown result type (might be due to invalid IL or missing references) //IL_0a51: Expected O, but got Unknown //IL_0a59: Unknown result type (might be due to invalid IL or missing references) //IL_0a63: Expected O, but got Unknown //IL_0a6b: Unknown result type (might be due to invalid IL or missing references) //IL_0a75: Expected O, but got Unknown //IL_0b7a: Unknown result type (might be due to invalid IL or missing references) //IL_0b84: Expected O, but got Unknown //IL_0b8c: Unknown result type (might be due to invalid IL or missing references) //IL_0b96: Expected O, but got Unknown //IL_0b9e: Unknown result type (might be due to invalid IL or missing references) //IL_0ba8: Expected O, but got Unknown //IL_0bb0: Unknown result type (might be due to invalid IL or missing references) //IL_0bba: Expected O, but got Unknown //IL_0bc2: Unknown result type (might be due to invalid IL or missing references) //IL_0bcc: Expected O, but got Unknown //IL_0bd4: Unknown result type (might be due to invalid IL or missing references) //IL_0bde: Expected O, but got Unknown //IL_0be6: Unknown result type (might be due to invalid IL or missing references) //IL_0bf0: Expected O, but got Unknown //IL_0bf8: Unknown result type (might be due to invalid IL or missing references) //IL_0c02: Expected O, but got Unknown //IL_0cfc: Unknown result type (might be due to invalid IL or missing references) //IL_0d06: Expected O, but got Unknown //IL_0d0e: Unknown result type (might be due to invalid IL or missing references) //IL_0d18: Expected O, but got Unknown //IL_0dde: Unknown result type (might be due to invalid IL or missing references) //IL_0de8: Expected O, but got Unknown //IL_0db6: Unknown result type (might be due to invalid IL or missing references) //IL_0dc0: Expected O, but got Unknown //IL_0e74: Unknown result type (might be due to invalid IL or missing references) //IL_0e7e: Expected O, but got Unknown //IL_0e86: Unknown result type (might be due to invalid IL or missing references) //IL_0e90: Expected O, but got Unknown //IL_0e98: Unknown result type (might be due to invalid IL or missing references) //IL_0ea2: Expected O, but got Unknown //IL_0eaa: Unknown result type (might be due to invalid IL or missing references) //IL_0eb4: Expected O, but got Unknown //IL_0ebc: Unknown result type (might be due to invalid IL or missing references) //IL_0ec6: Expected O, but got Unknown //IL_0fbe: Unknown result type (might be due to invalid IL or missing references) //IL_0fc8: Expected O, but got Unknown //IL_0efc: Unknown result type (might be due to invalid IL or missing references) //IL_0f06: Expected O, but got Unknown //IL_102d: Unknown result type (might be due to invalid IL or missing references) //IL_1037: Expected O, but got Unknown //IL_103f: Unknown result type (might be due to invalid IL or missing references) //IL_1049: Expected O, but got Unknown //IL_10d2: Unknown result type (might be due to invalid IL or missing references) //IL_10dc: Expected O, but got Unknown //IL_10ba: Unknown result type (might be due to invalid IL or missing references) //IL_10bf: Unknown result type (might be due to invalid IL or missing references) //IL_10c5: Expected O, but got Unknown CreateBuffs(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnRecalcStats); HealthComponent.TakeDamage += new hook_TakeDamage(OnTakeDamage); if (!HasVanillaVoid || !coreEnable.Value) { GlobalEventManager.ProcessHitEnemy += new Manipulator(IL_ProcessHit); } HealthComponent.TakeDamageProcess += new Manipulator(IL_EliteDamage); GenericSkill.RunRecharge += new hook_RunRecharge(OnSkillRecharge); if (solitudeEnable.Value) { TeamManager.GetLongstandingSolitudeItemCostScale += new hook_GetLongstandingSolitudeItemCostScale(OnItemCostScale); ExperienceManager.AwardExperience += new hook_AwardExperience(OnAwardExperience); string text = string.Format("On level up gain 1 (+1 per stack) free unlock for the next purchase, but all gold is converted to experience. All gold prices are increased by {0}% (+{0}% per stack), and all experience gained is reduced by {1}% (+{1}% per stack).", solitudeCost.Value * 100f, solitudeExp.Value * 100f); LanguageAPI.Add("ITEM_ONLEVELUPFREEUNLOCK_DESC", text); } if (lanternEnable.Value) { AttackSpeedPerNearbyCollider.UpdateValues += new hook_UpdateValues(OnLanternUpdate); AttackSpeedPerNearbyCollider.Start += new hook_Start(OnLanternStart); CharacterBody.RecalculateStats += new Manipulator(IL_Lantern); string stackDesc = GetStackDesc(lanternSpeedStack.Value * 100f, "%"); string stackDesc2 = GetStackDesc(lanternRegenStack.Value, " hp/s"); string stackDesc3 = GetStackDesc(lanternRadiusStack.Value / 2f, "m"); string stackDesc4 = GetStackDesc(lanternAllyStack.Value, ""); if (lanternRegen.Value > 0f) { string text2 = $"Increases attack speed by {lanternSpeed.Value * 100f}%{stackDesc} and health regeneration by {lanternRegen.Value} hp/s{stackDesc2} for each enemy and ally within {lanternRadius.Value / 2f}m{stackDesc3}, up to {lanternAlly.Value}{stackDesc4} times."; LanguageAPI.Add("ITEM_ATTACKSPEEDPERNEARBYALLYORENEMY_DESC", text2); string text3 = "Increases your attack speed and health regen for every nearby enemy and ally."; LanguageAPI.Add("ITEM_ATTACKSPEEDPERNEARBYALLYORENEMY_DESC", text3); } else { string text4 = string.Format("Increases attack speed by {0}%{1} for each enemy and ally within {4}m{5}, up to {6}{7} times.", lanternSpeed.Value * 100f, stackDesc, lanternRadius.Value / 2f, stackDesc3, lanternAlly.Value, stackDesc4); LanguageAPI.Add("ITEM_ATTACKSPEEDPERNEARBYALLYORENEMY_DESC", text4); } } if (stunGrenadeEnable.Value) { SetStateOnHurt.OnTakeDamageServer += new Manipulator(IL_StunDamage); string text5 = $"5% (+5% per stack) chance on hit to deal {stunGrenadeDamage.Value * 100f}% damage and stun enemies for 2s."; LanguageAPI.Add("ITEM_STUNCHANCEONHIT_DESC", text5); string text6 = $"Chance to damage and stun on hit."; LanguageAPI.Add("ITEM_STUNCHANCEONHIT_PICKUP", text6); } if (bungusEnable.Value) { CharacterBody.GetNotMoving += new Manipulator(IL_NotMoving); string text7 = $"After standing still for {bungusTimer.Value}s, create a zone that heals for 4.5% (+2.25% per stack) of your health every second to all allies within 3m (+1.5m per stack)."; LanguageAPI.Add("ITEM_MUSHROOM_DESC", text7); string text8 = $"Heal all nearby allies while standing still."; LanguageAPI.Add("ITEM_MUSHROOM_PICKUP", text8); } if (chanceDollEnable.Value) { ShrineChanceBehavior.AddShrineStack += new Manipulator(IL_ChanceShrine); string text9 = string.Format("Whenever a Shrine of Chance succeeds, gain a {0}% chance to increase the rarity of the item. Whenever a Shrine of Chance fails, gain a {1}% (+{1}% per stack) chance for free White Scrap to drop.", chanceDollUpgrade.Value, chanceDollScrap.Value); LanguageAPI.Add("ITEM_EXTRASHRINEITEM_DESC", text9); string text10 = $"50% of items dropped from Shrines of Chance have boosted rarity. Gain a small chance for free scrap when a Shrine of Chance fails."; LanguageAPI.Add("ITEM_EXTRASHRINEITEM_PICKUP", text10); } if (duplicatorEnable.Value) { GlobalEventManager.onCharacterDeathGlobal += OnDuplicatorDeath; ItemDef.AttemptGrant += new Manipulator(IL_GrantTempItem); if (!duplicatorCompat.Value) { DuplicatorBehavior.CalculateNewItemDecayDuration += new Manipulator(IL_Duplicator); } string text11 = string.Format("{0}% chance on kill for a random temporary item to drop. You get an extra copy of any temporary items you pick up, and your temporary items last an additional {1}s (+{1}s per stack).", duplicatorDropChance.Value, duplicatorDuration.Value); LanguageAPI.Add("ITEM_DUPLICATOR_DESC", text11); string text12 = $"Duplicate all temporary items you pick up. Monsters drop temporary items on death."; LanguageAPI.Add("ITEM_DUPLICATOR_PICKUP", text12); } if (vultureEnable.Value) { GlobalEventManager.OnCharacterDeath += new Manipulator(IL_EliteDeath); GlobalEventManager.onCharacterDeathGlobal += OnEliteDeath; string text13 = string.Format("You deal {0}% (+{0}% per stack) more damage to elites above 50% health. Upon killing an elite monster, heal for {1}% of your total health and gain a {2}% (+{2}% per stack) chance for the monster's elite aspect to drop.", vultureEliteDamage.Value * 100f, vultureHealPercent.Value * 100f, vultureDropChance.Value); LanguageAPI.Add("ITEM_HEADHUNTER_DESC", text13); string text14 = $"Deal more damage to elites above half health. Chance for elites to drop their powers on death."; LanguageAPI.Add("ITEM_HEADHUNTER_PICKUP", text14); } if (apRoundsEnable.Value) { string text15 = string.Format("Deal 20% (+20% per stack) more damage to bosses, and {0}% (+{0}% per stack) more damage to elites.", apRoundsEliteDamage.Value * 100f); LanguageAPI.Add("ITEM_BOSSDAMAGEBONUS_DESC", text15); string text16 = $"Deal extra damage to bosses and elites."; LanguageAPI.Add("ITEM_BOSSDAMAGEBONUS_PICKUP", text16); } if (chronicEnable.Value) { CharacterBody.AddIncreasedDamageMultiKillTime += new Manipulator(IL_MultikillTimer); CharacterBody.RecalculateStats += new Manipulator(IL_MultikillStats); string stackDesc5 = GetStackDesc(multikillDamageStack.Value * 100f, "%"); string text17 = $"Killing an enemy increases your damage by {multikillDamage.Value * 100f}%{stackDesc5} for {multikillDuration.Value}s, up to 10 (+5 per stack) times. Dealing damage refreshes the timer."; LanguageAPI.Add("ITEM_INCREASEDAMAGEONMULTIKILL_DESC", text17); } if (meatEnable.Value) { CharacterBody.UpdateAllTemporaryVisualEffects += new Manipulator(IL_MeatEffect); GlobalEventManager.onCharacterDeathGlobal += OnMeatDeath; string stackDesc6 = GetStackDesc(meatDurationStack.Value, "s"); float num = meatRegen.Value * (float)meatMax.Value; float num2 = meatRegen.Value * (float)meatMaxStack.Value; string stackDesc7 = GetStackDesc(num2, " hp/s"); string text18 = string.Format("Increases max health by {0} (+{0} per stack). Increases health regeneration by {1} hp/s for {2}s{3} after killing an enemy, up to a maximum of {4} hp/s{5}.", meatHealth.Value, meatRegen.Value, meatDuration.Value, stackDesc6, num, stackDesc7); LanguageAPI.Add("ITEM_FLATHEALTH_DESC", text18); string text19 = $"Gain {meatHealth.Value} max health. Gain health regeneration on kill."; LanguageAPI.Add("ITEM_FLATHEALTH_PICKUP", text19); } if (warpedEchoEnable.Value) { CharacterBody.UpdateDelayedDamage += new hook_UpdateDelayedDamage(OnUpdateDelayedDamage); CharacterBody.SecondHalfOfDelayedDamage += new hook_SecondHalfOfDelayedDamage(OnSecondHalfOfDelayedDamage); HealthComponent.TakeDamageProcess += new Manipulator(IL_WarpedEchoProcess); float num3 = warpedEchoDurationStack.Value / warpedEchoDuration.Value * 100f; string stackDesc8 = GetStackDesc(num3, "%"); string text20 = string.Format("When hit, 50% of the damage you take is delayed for {0}s{3}, up to a maximum of {1} (+{1} per stack) hit(s) at a time. For each hit being delayed, gain +{2}% movement speed, attack speed, and cooldown speed.", warpedEchoDuration.Value, warpedEchoCap.Value, warpedEchoStats.Value * 100f, stackDesc8); LanguageAPI.Add("ITEM_DELAYEDDAMAGE_DESC", text20); string text21 = $"Delay half of incoming damage. While damage is being delayed, increase attack speed, move speed, and cooldown speed."; LanguageAPI.Add("ITEM_DELAYEDDAMAGE_PICKUP", text21); } if (ignitionEnable.Value) { StrengthenBurnUtils.CheckDotForUpgrade += new Manipulator(IL_StrengthenBurn); string stackDesc9 = GetStackDesc(0f - ignitionCooldownStack.Value, "%"); string text22 = string.Format("Hitting an enemy ignites them for {0}% TOTAL damage, once every {1}s{2}. Ignite effects deal {3}% (+{3}% per stack) more damage over time.", ignitionBurnDamage.Value * 100f, ignitionCooldownTime.Value, stackDesc9, ignitionBurnBonus.Value * 100); LanguageAPI.Add("ITEM_STRENGTHENBURN_DESC", text22); string text23 = $"Ignite enemies on hit. Your ignite effects deal {ignitionBurnBonus.Value * 100}% more damage."; LanguageAPI.Add("ITEM_STRENGTHENBURN_PICKUP", text23); } if (scytheEnable.Value) { GlobalEventManager.OnCrit += new Manipulator(IL_OnCritHeal); string text24 = $"Gain +5% crit chance. Critical strikes heal you for {scytheHeal.Value} (+{scytheHealStack.Value} per stack) health, with a {scytheCooldownTime.Value}s cooldown between uses."; LanguageAPI.Add("ITEM_HEALONCRIT_DESC", text24); } if (infusionEnable.Value) { string text25 = string.Format("Killing an enemy permanently increases your health by 1 (+1 per stack) and movement speed by {0}% (+{0}% per stack), up to a maximum of 100 (+100 per stack) health and {1}% (+{1}% per stack) movement speed.", infusionSpeed.Value, infusionSpeed.Value * 100f); LanguageAPI.Add("ITEM_INFUSION_DESC", text25); string text26 = $"Killing an enemy permanently increases your maximum health and movement speed."; LanguageAPI.Add("ITEM_INFUSION_PICKUP", text26); } if (faradayEnable.Value) { UpdateFaradayStats(); JumpDamageStrikeBodyBehavior.UpdateCharge += new Manipulator(IL_FaradayCharge); JumpDamageStrikeBodyBehavior.DischargeEffects += new Manipulator(IL_FaradayDischarge); JumpDamageStrikeBodyBehavior.GetRadius += new hook_GetRadius(OnFaradayGetRadius); string stackDesc10 = GetStackDesc(faradayChargeStack.Value * 100f, "%"); string stackDesc11 = GetStackDesc(faradayDamageStack.Value * 100f, "%"); string stackDesc12 = GetStackDesc(faradayRadiusStack.Value, "m"); string text27 = $"For every {4f / faradayCharge.Value}m traveled, gain +{faradaySpeedJumpCap.Value}%{stackDesc10} movement speed and jump height, up to a maximum of {faradaySpeedJumpCap.Value * 100f}%. Jumping at 25% charge or higher creates an explosive discharge for up to {faradayDamage.Value * 100f}%{stackDesc11} damage in up to a {faradayRadius.Value}m{stackDesc12} radius, based on the amount of charge consumed."; LanguageAPI.Add("ITEM_JUMPDAMAGESTRIKE_DESC", text27); } if (transmitterEnable.Value) { CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddNewTransmitterBehaviour); TeleportOnLowHealthBehavior.Start += new hook_Start(RemoveOldTransmitterBehaviour1); TeleportOnLowHealthBehavior.TryAdd += new hook_TryAdd(RemoveOldTransmitterBehaviour2); TeleportOnLowHealthBehavior.Update += new hook_Update(RemoveOldTransmitterBehaviour3); TeleportOnLowHealthBehavior.TryProc += new hook_TryProc(RemoveOldTransmitterBehaviour4); TeleportOnLowHealthBehavior.OnDisable += new hook_OnDisable(RemoveOldTransmitterBehaviour5); HealthComponent.TakeDamageProcess += new Manipulator(IL_TransmitterProcess); HealthComponent.DoWarp += new Manipulator(IL_TransmitterWarp); string text28 = ""; if (transmitterPulseBarrier.Value > 0f) { text28 = $" Gain an additional {transmitterPulseBarrier.Value * 100f}% barrier for each enemy hit by the pulse."; } string text29 = $"Upon dropping below 25% health, release a pulse within {transmitterPulseRadius.Value}m that grants you {transmitterBarrier.Value * 100f}% barrier and teleports enemies away.{text28} Can be used 1 (+1 per stack) times every {transmitterCooldown.Value}s."; LanguageAPI.Add("ITEM_TELEPORTONLOWHEALTH_DESC", text29); string text30 = "On low health, release a pulse that teleports enemies and grants you a barrier. "; LanguageAPI.Add("ITEM_TELEPORTONLOWHEALTH_PICKUP", text30); string text31 = $"After {transmitterCooldown.Value}s, transforms into an Unstable Transmitter."; LanguageAPI.Add("ITEM_TELEPORTONLOWHEALTHCONSUMED_PICKUP", text31); } if (raincoatEnable.Value) { ImmuneToDebuffBehavior.TryApplyOverride += new hook_TryApplyOverride(OnRaincoatOverride); ImmuneToDebuffBehavior.FixedUpdate += new hook_FixedUpdate(OnRaincoatUpdate); string text32 = $"After getting inflicted with a debuff, gain {raincoatBarrier.Value * 100f}% barrier and {raincoatDuration.Value}s of invulnerability. Repeatable once every {raincoatCooldownTime.Value}s (-{raincoatCooldownStack.Value * 100f}% per stack)."; LanguageAPI.Add("ITEM_IMMUNETODEBUFF_DESC", text32); string text33 = "Whenever you get debuffed, gain temporary barrier and invulnerability."; LanguageAPI.Add("ITEM_IMMUNETODEBUFF_PICKUP", text33); if (!HasBubbetsItems) { HealthComponent.GetBarrierDecayRate += new hook_GetBarrierDecayRate(OnGetBarrierDecayRate); } } if (warbondsEnable.Value) { CharacterBody.OnInventoryChanged += new Manipulator(IL_AddNewWarbondBehaviour); string stackDesc13 = GetStackDesc(warbondsDamageStack.Value * 100f, "%"); string text34 = $"For every {warbondsGoldCost.Value} gold that you spend, load 1 (+1 per stack) barrage. Whenever an elite or boss monster spawns, one of your barrages automatically fires at them for {warbondsDamage.Value * 100f}%{stackDesc13} base damage. Gold requirement scales over time."; LanguageAPI.Add("ITEM_BARRAGEONBOSS_DESC", text34); string text35 = "Spending gold loads barrages that launch at powerful targets."; LanguageAPI.Add("ITEM_BARRAGEONBOSS_PICKUP", text35); } if (icbmEnable.Value) { FireMissileBarrage.FireMissile += new Manipulator(IL_DroneWeaponFireMissile); CommandFireMissiles.FireMissile += new Manipulator(IL_DroneCommandFireMissile); GlobalEventManager.ProcessHitEnemy += new Manipulator(IL_VoidFireMissile); MissileUtils.FireMissile_Vector3_CharacterBody_ProcChainMask_GameObject_float_bool_GameObject_DamageColorIndex_Vector3_float_bool += new Manipulator(IL_FireMissile); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddNewICBMBehaviour); MethodInfo methodInfo = AccessTools.Method(typeof(MissileUtils), "GetMoreMissileDamageMultiplier", (Type[])null, (Type[])null); missileHook = new Hook((MethodBase)methodInfo, (Delegate)new Func, int, float>(OnMissileDamage)); string stackDesc14 = GetStackDesc(icbmCooldownStack.Value * -100f, "%"); string stackDesc15 = GetStackDesc(icbmDamageStack.Value * 100f, "%"); string text36 = $"Any missiles that you fire are doubled. Every {icbmCooldown.Value}s{stackDesc14} while in combat, automatically fire a seeking missile that deals {icbmDamage.Value * 100f}%{stackDesc15} base damage."; LanguageAPI.Add("ITEM_MOREMISSILE_DESC", text36); string text37 = "Missiles are doubled. Automatically fire missiles while in combat."; LanguageAPI.Add("ITEM_MOREMISSILE_PICKUP", text37); } if (knurlEnable.Value) { CharacterBody.RecalculateStats += new Manipulator(IL_RemoveKnurlStats); string text38 = string.Format("Gain {0} (+{0} per stack) maximum health and {1} hp/s (+{1} hp/s per stack) health regeneration per level.", knurlHP.Value, knurlRegen.Value); LanguageAPI.Add("ITEM_KNURL_DESC", text38); string text39 = "Increases health and regeneration per level."; LanguageAPI.Add("ITEM_KNURL_PICKUP", text39); } if (genesisEnable.Value) { RechargeState.FixedUpdate += new hook_FixedUpdate(OnGenesisRechargeUpdate); ReadyState.OnDamaged += new hook_OnDamaged(OnGenesisReadyDamaged); string text40 = $"Whenever you take damage, gain {genesisCharge.Value}% (+{genesisChargeStack.Value}% per stack) charge for every 1% total health lost. Once fully charged, release a massive nova that deals 6000% base damage."; LanguageAPI.Add("ITEM_NOVAONLOWHEALTH_DESC", text40); string text41 = "Fire an electric nova after taking enough damage."; LanguageAPI.Add("ITEM_NOVAONLOWHEALTH_PICKUP", text41); } if (singularityEnable.Value) { object obj = <>O.<1>__OnProcessSingularityBand; if (obj == null) { hook_ProcessHitEnemy val = OnProcessSingularityBand; <>O.<1>__OnProcessSingularityBand = val; obj = (object)val; } GlobalEventManager.ProcessHitEnemy += (hook_ProcessHitEnemy)obj; GlobalEventManager.ProcessHitEnemy += new Manipulator(IL_ProcessSingularityBand); string stackDesc16 = GetStackDesc(singularityRadiusStack.Value, "m"); string text42 = $"Hits that deal more than {singularityThreshold.Value * 100f}% damage also fire a black hole that draws in enemies within {singularityRadius.Value}m{stackDesc16}. Lasts for 5s before collapsing, dealing {singularityDamage.Value * 100f}% (+{singularityDamageStack.Value * 100f}% per stack) TOTAL damage. Recharges every 20 seconds. Corrupts all Runald's and Kjaro's Bands."; LanguageAPI.Add("ITEM_ELEMENTALRINGVOID_DESC", text42); } if (!HasStarstorm) { Log.Warning("Starstorm2 Content Disabled"); } if (!HasBubbetsItems) { Log.Warning("BubbetsItems Content Disabled"); } if (!HasFlatItemBuff) { Log.Warning("FlatItemBuff Content Disabled"); } if (!HasSeekingTheVoid) { Log.Warning("SeekingTheVoid Content Disabled"); } if (!HasTooManyItems) { Log.Warning("TooManyItems Content Disabled"); } if (!HasVanillaVoid) { Log.Warning("VanillaVoid Content Disabled"); } if (!HasMeltdown) { Log.Warning("Meltdown Content Disabled"); } if (!HasNautilus) { Log.Warning("Nautilus Content Disabled"); } if (!HasRigsArsenal) { Log.Warning("RigsArsenal Content Disabled"); } if (HasStarstorm) { StarstormChanges.Initialize(); } if (HasBubbetsItems) { BubbetsItemsChanges.Initialize(); } if (HasSeekingTheVoid) { SeekingTheVoidChanges.Initialize(); } if (HasTooManyItems) { TooManyItemsChanges.Initialize(); } if (HasVanillaVoid) { VanillaVoidChanges.Initialize(); } if (HasMeltdown) { MeltdownChanges.Initialize(); } if (HasNautilus) { NautilusChanges.Initialize(); } if (HasRigsArsenal) { RigsArsenalChanges.Initialize(); } } 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(); } private void CreateBuffs() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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) //IL_003a: 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_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_006c: 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_00a6: 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_0108: Unknown result type (might be due to invalid IL or missing references) MeatBuff = Buffs.AddNewBuff("BloonMeatBuff", Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/texBuffRegenBoostIcon.tif").WaitForCompletion(), Color.green, canStack: true, isDebuff: false, isCooldown: false, isHidden: false); IgnitionCooldown = Buffs.AddNewBuff("BloonIgnitionCooldown", Addressables.LoadAssetAsync((object)"RoR2/DLC1/StrengthenBurn/texBuffStrongerBurnIcon.tif").WaitForCompletion(), Color.grey, canStack: false, isDebuff: true, isCooldown: true, isHidden: false); ScytheCooldown = Buffs.AddNewBuff("BloonScytheCooldown", Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/texBuffRegenBoostIcon.tif").WaitForCompletion(), Color.grey, canStack: false, isDebuff: true, isCooldown: true, isHidden: false); OpticsBuff = Buffs.AddNewBuff("BloonOpticsBuff", opticsIcon, Color.magenta, canStack: true, isDebuff: false, isCooldown: false, isHidden: false); TransmitterCooldown = Buffs.AddNewBuff("BloonTransmitterCooldown", transmitterIcon, Color.gray, canStack: false, isDebuff: false, isCooldown: true, isHidden: false); GenesisBuff = Buffs.AddNewBuff("BloonGenesisBuff", genesisIcon, new Color(0f, 0.75f, 1f, 0.8f), canStack: true, isDebuff: false, isCooldown: false, isHidden: false); GenesisBuffPrecise = Buffs.AddNewBuff("BloonGenesisBuffPrecise", genesisIcon, new Color(0f, 0.75f, 1f, 0.8f), canStack: true, isDebuff: false, isCooldown: false, isHidden: true); } 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 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; } private void OnRecalcStats(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender) && Object.op_Implicit((Object)(object)sender.inventory)) { int itemCountEffective = sender.inventory.GetItemCountEffective(Items.FlatHealth); if (itemCountEffective > 0 && meatEnable.Value) { float num = (float)itemCountEffective * (meatHealth.Value - 25f); args.baseHealthAdd += num; float num2 = sender.GetBuffCount(MeatBuff); args.baseRegenAdd += num2 * meatRegen.Value; } int itemCountEffective2 = sender.inventory.GetItemCountEffective(Items.Knurl); if (itemCountEffective2 > 0 && knurlEnable.Value) { float num3 = (float)itemCountEffective2 * knurlHP.Value; args.levelHealthAdd += num3; args.baseHealthAdd += num3; float num4 = (float)itemCountEffective2 * knurlRegen.Value; args.levelRegenAdd += num4; args.baseRegenAdd += num4; } int itemCountEffective3 = sender.inventory.GetItemCountEffective(Items.AttackSpeedPerNearbyAllyOrEnemy); int buffCount = sender.GetBuffCount(Buffs.AttackSpeedPerNearbyAllyOrEnemyBuff); if (itemCountEffective3 > 0 && buffCount > 0 && lanternEnable.Value) { float num5 = (float)buffCount * GetStackedStats(lanternRegen.Value, lanternRegenStack.Value, itemCountEffective3); args.baseRegenAdd += num5; } int infusionBonus = (int)sender.inventory.infusionBonus; if (infusionBonus > 0 && infusionEnable.Value) { float num6 = (float)infusionBonus * (infusionSpeed.Value / 100f); args.moveSpeedMultAdd += num6; } int buffCount2 = sender.GetBuffCount(Buffs.DelayedDamageDebuff); if (buffCount2 > 0 && warpedEchoEnable.Value) { args.attackSpeedMultAdd += warpedEchoStats.Value * (float)buffCount2; args.moveSpeedMultAdd += warpedEchoStats.Value * (float)buffCount2; } } } private void OnTakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo info) { orig.Invoke(self, info); } private void OnSkillRecharge(orig_RunRecharge orig, GenericSkill self, float dt) { float num = dt; if (warpedEchoEnable.Value && Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.characterBody)) { int buffCount = self.characterBody.GetBuffCount(Buffs.DelayedDamageDebuff); if (buffCount > 0) { dt += num * (float)buffCount * warpedEchoStats.Value; } } orig.Invoke(self, dt); } private static void OnProcessSingularityBand(orig_ProcessHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_01da: 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_026c: 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_0280: 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_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) if (damageInfo.procCoefficient != 0f && !damageInfo.rejected && NetworkServer.active && (Object)(object)damageInfo.attacker != (Object)null && damageInfo.procCoefficient > 0f) { CharacterBody component = damageInfo.attacker.GetComponent(); if ((Object)(object)component != (Object)null) { CharacterMaster master = component.master; if ((Object)(object)master != (Object)null) { Inventory inventory = master.inventory; if ((Object)(object)inventory != (Object)null && !((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)12) && damageInfo.damage / component.damage >= singularityThreshold.Value && component.HasBuff(Buffs.ElementalRingVoidReady)) { int itemCount = inventory.GetItemCount(Items.ElementalRingVoid); component.RemoveBuff(Buffs.ElementalRingVoidReady); for (int i = 1; (float)i <= 20f; i++) { component.AddTimedBuff(Buffs.ElementalRingVoidCooldown, (float)i); } ProcChainMask procChainMask = damageInfo.procChainMask; ((ProcChainMask)(ref procChainMask)).AddProc((ProcType)12); if (itemCount > 0) { GameObject val = LegacyResourcesAPI.Load("Prefabs/Projectiles/ElementalRingVoidBlackHole"); if ((Object)(object)val != (Object)null) { RadialForce component2 = val.GetComponent(); ProjectileExplosion component3 = val.GetComponent(); if ((Object)(object)component3 != (Object)null && (Object)(object)component2 != (Object)null) { float stackedStats = GetStackedStats(singularityRadius.Value, singularityRadiusStack.Value, itemCount); float stackedStats2 = GetStackedStats(singularityDamage.Value, singularityDamageStack.Value, itemCount); val.transform.localScale = new Vector3(stackedStats / 15f, stackedStats / 15f, stackedStats / 15f); component2.radius = stackedStats; Log.Message(component2.forceMagnitude); component2.forceMagnitude *= stackedStats / 15f; component3.blastRadius = stackedStats; component3.blastProcCoefficient = singularityProc.Value; float damage = Util.OnHitProcDamage(damageInfo.damage, component.damage, stackedStats2); ProjectileManager.instance.FireProjectile(new FireProjectileInfo { damage = damage, crit = damageInfo.crit, damageColorIndex = (DamageColorIndex)9, position = damageInfo.position, procChainMask = procChainMask, force = 6000f, owner = damageInfo.attacker, projectilePrefab = val, rotation = Quaternion.identity, target = null }); } } } } } } } orig.Invoke(self, damageInfo, victim); } public void IL_ProcessSingularityBand(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_001d: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)2; ILLabel nextInstr = il.DefineLabel(); if (val.TryGotoNext(val2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "ElementalRingVoidReady"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(CharacterBody), "HasBuff"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref nextInstr) })) { val.Emit(OpCodes.Br, (object)nextInstr); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_RemoveKnurlStats(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_000b: 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_006f: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)2; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "Knurl") })) { int loc1 = -1; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc1) })) { val.Emit(OpCodes.Ldc_I4_0); val.Emit(OpCodes.Stloc, loc1); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private void OnGenesisRechargeUpdate(orig_FixedUpdate orig, RechargeState self) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if ((int)((BaseBodyAttachmentState)self).attachedBody.teamComponent.teamIndex == 1 || genesisEnemyEnable.Value) { ((EntityState)self).outer.SetNextState((EntityState)new ReadyState()); } else { orig.Invoke(self); } } private void OnGenesisReadyDamaged(orig_OnDamaged orig, ReadyState self, DamageReport report) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_00d2: 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_011b: 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_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown if ((int)((BaseBodyAttachmentState)self).attachedBody.teamComponent.teamIndex == 1 || genesisEnemyEnable.Value) { CharacterBody val; if (report == null) { val = null; } else { HealthComponent victim = report.victim; val = (((Object)(object)victim != (Object)null) ? victim.body : null); } if ((Object)(object)val == (Object)(object)((BaseBodyAttachmentState)self).attachedBody && report.damageInfo.damage > 0f) { int num = (int)Math.Round(report.damageInfo.damage / val.healthComponent.fullCombinedHealth * GetStackedStats(genesisCharge.Value * 10000f, genesisChargeStack.Value * 10000f, ((BaseVagrantNovaItemState)self).GetItemStack())); int buffCount = val.GetBuffCount(GenesisBuffPrecise.buffIndex); for (buffCount += num; buffCount >= 100; buffCount -= 100) { val.AddTimedBuff(GenesisBuff.buffIndex, 9999f); } val.SetBuffCount(GenesisBuffPrecise.buffIndex, buffCount); int buffCount2 = val.GetBuffCount(GenesisBuff.buffIndex); if (buffCount2 >= 100) { val.SetBuffCount(GenesisBuff.buffIndex, buffCount2 - 100); ((EntityState)self).outer.SetNextState((EntityState)new ChargeState()); } } } else { orig.Invoke(self, report); } } private void RemoveOldTransmitterBehaviour1(orig_Start orig, TeleportOnLowHealthBehavior self) { } private void RemoveOldTransmitterBehaviour2(orig_TryAdd orig, TeleportOnLowHealthBehavior self) { } private void RemoveOldTransmitterBehaviour3(orig_Update orig, TeleportOnLowHealthBehavior self) { } private bool RemoveOldTransmitterBehaviour4(orig_TryProc orig, HealthComponent healthComponent) { return false; } private void RemoveOldTransmitterBehaviour5(orig_OnDisable orig, TeleportOnLowHealthBehavior self) { } private void AddNewTransmitterBehaviour(orig_OnInventoryChanged orig, CharacterBody self) { if (NetworkServer.active) { self.AddItemBehavior(self.inventory.GetItemCountEffective(Items.TeleportOnLowHealth)); } orig.Invoke(self); } public void IL_TransmitterWarp(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_000b: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 35f) })) { val.Next.Operand = 50f; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 4) })) { val.Emit(OpCodes.Ldc_I4_0); val.Emit(OpCodes.Stloc, 4); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } public void IL_TransmitterProcess(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_000b: 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_00b6: 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_0121: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "TeleportOnLowHealth") })) { int num = default(int); Func[] array = new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), null, null }; int loc1 = -1; array[1] = (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc1); array[2] = (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 0); if (val.TryGotoNext(val3, array)) { val.Index -= 1; val.MoveAfterLabels(); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc, loc1); val.EmitDelegate>((Func)delegate(HealthComponent self, float damage) { NewTransmitterBehaviour newTransmitterBehaviour = default(NewTransmitterBehaviour); if (self.itemCounts.unstableTransmitter > 0 && self.IsHealthBelowThreshold(self.health - damage, 0.25f) && self.barrier <= 0f && (Object)(object)((Component)self).gameObject != (Object)null && ((Component)self).TryGetComponent(ref newTransmitterBehaviour) && newTransmitterBehaviour.TryProc() && self.health <= damage) { self.Networkhealth = 1f; return 0f; } return damage; }); val.Emit(OpCodes.Stloc, loc1); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private void AddNewICBMBehaviour(orig_OnInventoryChanged orig, CharacterBody self) { if (NetworkServer.active) { self.AddItemBehavior(self.inventory.GetItemCountEffective(Items.MoreMissile)); } orig.Invoke(self); } public static float OnMissileDamage(Func orig, int moreMissileCount) { return 1f; } public void IL_FireMissile(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_000b: 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_005c: 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_009a: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(ProjectileManager), "FireProjectile") })) { Instruction next = val.Next; val.Index -= 3; val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)((CharacterBody attackerBody) => Object.op_Implicit((Object)(object)attackerBody.inventory) ? attackerBody.inventory.GetItemCountEffective(Items.MoreMissile) : 0)); val.Emit(OpCodes.Ldc_I4_0); val.Emit(OpCodes.Bgt, next); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_VoidFireMissile(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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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_00c3: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(MissileUtils), "GetMoreMissileDamageMultiplier") })) { if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 3) })) { int loc = -1; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc) })) { int index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Ldloc_0); val.EmitDelegate>((Func)((CharacterBody attackerBody) => (!((Object)(object)attackerBody.inventory != (Object)null) || attackerBody.inventory.GetItemCountEffective(Items.MoreMissile) <= 0) ? 1 : 2)); val.Emit(OpCodes.Stloc, loc); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_DroneWeaponFireMissile(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_000b: 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_0045: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; Func[] array = new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(ProjectileManager), "FireProjectileWithoutDamageType") }; if (val.TryGotoNext(val3, array)) { if (val.TryGotoNext(val3, array)) { val.Emit(OpCodes.Ret); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_DroneCommandFireMissile(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_000b: 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_0045: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; Func[] array = new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(ProjectileManager), "FireProjectile") }; if (val.TryGotoNext(val3, array)) { if (val.TryGotoNext(val3, array)) { val.Emit(OpCodes.Ret); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_AddNewWarbondBehaviour(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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[7] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCall(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "BarrageOnBoss"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(Inventory), "GetItemCountEffective"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "AddItemBehavior"), (Instruction x) => ILPatternMatchingExt.MatchPop(x) })) { Instruction next = val.Next; val.Index -= 7; val.Emit(OpCodes.Br, next); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Action)delegate(CharacterBody self) { self.AddItemBehavior(self.inventory.GetItemCountEffective(Items.BarrageOnBoss)); }); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_OnCritHeal(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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 2), (Instruction x) => ILPatternMatchingExt.MatchLdarga(x, 5) })) { val.Index -= 1; Instruction next = val.Next; val.Emit(OpCodes.Ldloc_2); val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldarg, 5); val.EmitDelegate>((Action)delegate(Inventory inventory, CharacterBody body, ProcChainMask procChainMask) { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if (!((ProcChainMask)(ref procChainMask)).HasProc((ProcType)8) && !body.HasBuff(ScytheCooldown)) { ((ProcChainMask)(ref procChainMask)).AddProc((ProcType)8); int itemCountEffective = inventory.GetItemCountEffective(Items.HealOnCrit); if (itemCountEffective > 0 && Object.op_Implicit((Object)(object)body.healthComponent)) { Util.PlaySound("Play_item_proc_crit_heal", ((Component)body).gameObject); float stackedStats = GetStackedStats(scytheHeal.Value, scytheHealStack.Value, itemCountEffective); if (NetworkServer.active) { body.AddTimedBuff(ScytheCooldown, scytheCooldownTime.Value); body.healthComponent.Heal(stackedStats, procChainMask, true); } } } }); val.Emit(OpCodes.Br, next); Func[] array = new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 4f) }; if (val.TryGotoNext(val2, array)) { val.Next.Operand = 0f; if (val.TryGotoNext(val2, array)) { val.Next.Operand = 0f; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_ProcessHit(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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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_0107: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_aimOrigin"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 13), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 10) })) { val.Index -= 1; Instruction next = val.Next; val.Emit(OpCodes.Ldloc_0); val.Emit(OpCodes.Ldloc_1); val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldloc, 10); val.Emit(OpCodes.Ldarg_2); val.EmitDelegate>((Action)delegate(CharacterBody characterBody, CharacterBody victimBody, DamageInfo damageInfo, Inventory inventory, GameObject victim) { //IL_0004: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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) bool flag = true; if (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)128)) != 0 || characterBody.HasBuff(Buffs.AffixRed)) { flag = false; } if (flag) { int itemCountEffective = inventory.GetItemCountEffective(Items.StrengthenBurn); if (itemCountEffective > 0 && !characterBody.HasBuff(IgnitionCooldown)) { float value = ignitionBurnDamage.Value; InflictDotInfo val4 = default(InflictDotInfo); val4.attackerObject = damageInfo.attacker; val4.victimObject = victim; val4.totalDamage = damageInfo.damage * value; val4.damageMultiplier = 1f; val4.dotIndex = (DotIndex)1; val4.maxStacksFromAttacker = uint.MaxValue; val4.hitHurtBox = damageInfo.inflictedHurtbox; InflictDotInfo val5 = val4; if (Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent())) { ProjectileController component = damageInfo.attacker.GetComponent(); CharacterMaster component2 = component.owner.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2)) { StrengthenBurnUtils.CheckDotForUpgrade(component2.inventory, ref val5); } } else { StrengthenBurnUtils.CheckDotForUpgrade(inventory, ref val5); } DotController.InflictDot(ref val5); float num = ignitionCooldownTime.Value / ConvertReductionIntoStackingDivision(ignitionCooldownStack.Value, itemCountEffective); characterBody.AddTimedBuff(IgnitionCooldown, num); } } }); val.Emit(OpCodes.Br, next); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_WarpedEchoProcess(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_000b: 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_0045: 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) //IL_00aa: 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_01fa: 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_022f: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 69) })) { val.Emit(OpCodes.Ldc_I4_2); val.Emit(OpCodes.Stloc, 69); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.9f) })) { val.Next.Operand = 1f; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.75f) })) { val.Next.Operand = warpedEchoDuration.Value; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } if (val.TryGotoNext(val3, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(HealthComponent), "body"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "DelayedDamageBuff"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(CharacterBody), "RemoveBuff") })) { Instruction next = val.Next; val.Index -= 4; val.Emit(OpCodes.Br, next); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Action)delegate(HealthComponent self) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) int buffCount = self.body.GetBuffCount(Buffs.DelayedDamageBuff); if (buffCount > 0) { buffCount--; self.body.SetBuffCount(Buffs.DelayedDamageBuff.buffIndex, buffCount); } }); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 4 failed!"); } } public void OnSecondHalfOfDelayedDamage(orig_SecondHalfOfDelayedDamage orig, CharacterBody self, DamageInfo halfDamage, float timeUntilDamage) { if (timeUntilDamage > 0f) { int itemCountEffective = self.inventory.GetItemCountEffective(Items.DelayedDamage); timeUntilDamage = GetStackedStats(warpedEchoDuration.Value, warpedEchoDurationStack.Value, itemCountEffective); } orig.Invoke(self, halfDamage, timeUntilDamage); } public void OnUpdateDelayedDamage(orig_UpdateDelayedDamage orig, CharacterBody self, float deltaTime) { //IL_008a: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void RoR2.CharacterBody::UpdateDelayedDamage(System.Single)' called on client"); return; } int num = (Object.op_Implicit((Object)(object)self.inventory) ? self.inventory.GetItemCountEffective(Items.DelayedDamage) : 0); num *= warpedEchoCap.Value; BuffDef delayedDamageBuff = Buffs.DelayedDamageBuff; delayedDamageBuff.canStack = true; if (num > 0) { int buffCount = self.GetBuffCount(delayedDamageBuff); if (buffCount != num && !self.HasBuff(Buffs.DelayedDamageDebuff)) { self.SetBuffCount(delayedDamageBuff.buffIndex, num); } } else { self.RemoveBuff(delayedDamageBuff); self.RemoveBuff(Buffs.DelayedDamageDebuff); self.RemoveOldestTimedBuff(Buffs.DelayedDamageDebuff); } } public void UpdateFaradayStats() { JumpDamageStrikeBodyBehavior.maxDistancePerCharge = 12f * (2f / faradaySpeedJumpCap.Value); JumpDamageStrikeBodyBehavior.MoveSpeedVelocityPerCharge = faradaySpeedJumpCap.Value / 100f; JumpDamageStrikeBodyBehavior.JumpVelocityPerCharge = faradaySpeedJumpCap.Value / 100f; } public float OnFaradayGetRadius(orig_GetRadius orig, JumpDamageStrikeBodyBehavior self, int charge, int stacks) { if (charge < 25) { return 0f; } float num = GetStackedStats(faradayRadius.Value, faradayRadiusStack.Value, stacks) * 0.01f; return num * (float)charge; } public void IL_FaradayDischarge(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_000b: 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_0045: 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) //IL_0083: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 2) })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc_0); val.EmitDelegate>((Func)delegate(JumpDamageStrikeBodyBehavior self, int buffCount) { Log.Message(buffCount); float num = GetStackedStats(faradayDamage.Value, faradayDamageStack.Value, ((BaseItemBodyBehavior)self).stack) * 0.01f; return num * (float)buffCount; }); val.Emit(OpCodes.Stloc_2); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_FaradayCharge(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_000b: 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_00e0: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (!HasSuperCyan) { if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Time", "get_deltaTime") })) { val.Remove(); val.EmitDelegate>((Func)(() => Time.fixedDeltaTime)); } else { Log.Error(((MemberReference)il.Method).Name + " Faraday Spur fix failed!"); } } else { Log.Message("SuperCyanTweaks is installed, faraday spur fix cancelled."); } if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(JumpDamageStrikeBodyBehavior), "distanceTraveled") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Action)delegate(JumpDamageStrikeBodyBehavior self) { UpdateFaradayStats(); float num = ((BaseItemBodyBehavior)self).body.moveSpeed * Time.fixedDeltaTime * (faradayCharge.Value - 1f); float num2 = (((BaseItemBodyBehavior)self).body.moveSpeed * Time.fixedDeltaTime + num) * GetStackedStats(0f, faradayChargeStack.Value, ((BaseItemBodyBehavior)self).stack); self.distanceTraveled += num; self.distanceTraveled += num2; }); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } public float OnGetBarrierDecayRate(orig_GetBarrierDecayRate orig, HealthComponent self) { float result = orig.Invoke(self); CharacterBody body = self.body; if (!Object.op_Implicit((Object)(object)body)) { return result; } Inventory inventory = body.inventory; if (!Object.op_Implicit((Object)(object)inventory)) { return result; } if (inventory.GetItemCountEffective(Items.ImmuneToDebuff) > 0 && body.HasBuff(Buffs.Immune) && body.HasBuff(Buffs.ImmuneToDebuffCooldown) && raincoatEnable.Value) { return 0f; } return result; } public void OnRaincoatUpdate(orig_FixedUpdate orig, ImmuneToDebuffBehavior self) { if (NetworkServer.active) { self.isProtected = false; bool flag = ((BaseItemBodyBehavior)self).body.HasBuff(Buffs.ImmuneToDebuffCooldown); bool flag2 = ((BaseItemBodyBehavior)self).body.HasBuff(Buffs.ImmuneToDebuffReady); if (!flag && !flag2) { ((BaseItemBodyBehavior)self).body.AddBuff(Buffs.ImmuneToDebuffReady); } if (flag2 && flag) { ((BaseItemBodyBehavior)self).body.RemoveBuff(Buffs.ImmuneToDebuffReady); } } } public bool OnRaincoatOverride(orig_TryApplyOverride orig, CharacterBody body) { //IL_007f: 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_008e: 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) CharacterBody val = UnityObjectExtensions.AsValidOrNull(body); ImmuneToDebuffBehavior val2 = (((Object)(object)val != (Object)null) ? ((Component)val).GetComponent() : null); if (Object.op_Implicit((Object)(object)val2) && body.HasBuff(Buffs.ImmuneToDebuffReady) && Object.op_Implicit((Object)(object)val2.healthComponent)) { val2.healthComponent.AddBarrier(raincoatBarrier.Value * val2.healthComponent.fullCombinedHealth); body.RemoveBuff(Buffs.ImmuneToDebuffReady); EffectManager.SimpleImpactEffect(Addressables.LoadAssetAsync((object)"RoR2/DLC1/ImmuneToDebuff/ImmuneToDebuffEffect.prefab").WaitForCompletion(), body.corePosition, Vector3.up, true); if (!body.HasBuff(Buffs.ImmuneToDebuffReady) && Object.op_Implicit((Object)(object)body.inventory)) { int itemCountEffective = body.inventory.GetItemCountEffective(Items.ImmuneToDebuff); float num = raincoatCooldownTime.Value / ConvertReductionIntoStackingDivision(raincoatCooldownStack.Value, itemCountEffective); body.AddTimedBuff(Buffs.ImmuneToDebuffCooldown, num + raincoatDuration.Value); body.AddTimedBuff(Buffs.Immune, raincoatDuration.Value); } } return false; } public void IL_MultikillStats(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_0034: 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_00c8: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "IncreaseDamageBuff") })) { if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.01f) })) { val.Next.Operand = multikillDamageStack.Value; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.035f) })) { val.Next.Operand = multikillDamage.Value; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_MultikillTimer(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_0034: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 7f) })) { val.Next.Operand = multikillDuration.Value; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private void OnEliteDeath(DamageReport report) { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_013f: 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_014f: 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) if (!NetworkServer.active) { return; } CharacterBody victimBody = report.victimBody; if (!victimBody.isElite) { return; } CharacterBody attackerBody = report.attackerBody; CharacterMaster attackerMaster = report.attackerMaster; Inventory val = (Object.op_Implicit((Object)(object)attackerMaster) ? attackerMaster.inventory : null); if (!Object.op_Implicit((Object)(object)val)) { return; } int itemCountEffective = val.GetItemCountEffective(Items.HeadHunter); if (itemCountEffective <= 0) { return; } float num = (attackerBody.maxHealth + attackerBody.maxShield) * vultureHealPercent.Value; attackerBody.healthComponent.Heal(num, report.damageInfo.procChainMask, true); EquipmentIndex val2 = (EquipmentIndex)(-1); EquipmentDef val3 = null; if (!Object.op_Implicit((Object)(object)victimBody.equipmentSlot)) { return; } val2 = victimBody.equipmentSlot.equipmentIndex; val3 = EquipmentCatalog.GetEquipmentDef(val2); if (Object.op_Implicit((Object)(object)val3) && !((object)(EquipmentIndex)(ref val2)).Equals((object?)EquipmentCatalog.FindEquipmentIndex("EliteVoidEquipment"))) { float num2 = (float)itemCountEffective * vultureDropChance.Value; if (Util.CheckRoll(num2, attackerMaster)) { PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(val2), report.victimBody.corePosition, Vector3.up * 20f); } } } public void IL_EliteDeath(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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_0062: 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_00a9: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)1; MoveType val4 = (MoveType)2; if (val.TryGotoNext(val4, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 77) })) { Instruction next = val.Next; val.Emit(OpCodes.Ldc_I4, 0); val.Emit(OpCodes.Stloc, 77); val.Emit(OpCodes.Br, next); if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 3f) })) { val.Next.Operand = 0f; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f) })) { val.Next.Operand = 0f; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_EliteDamage(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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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_010d: 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_0127: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)2; ILLabel val3 = default(ILLabel); if (val.TryGotoNext(val2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val3), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 4) })) { val.Index -= 1; Instruction next = val.Next; val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc_1); val.EmitDelegate>((Func)delegate(HealthComponent self, CharacterMaster characterMaster) { float num = 1f; int itemCountEffective = characterMaster.inventory.GetItemCountEffective(Items.BossDamageBonus); int itemCountEffective2 = characterMaster.inventory.GetItemCountEffective(Items.HeadHunter); if (self.body.isElite) { if (apRoundsEnable.Value && itemCountEffective > 0 && !self.body.isBoss) { num *= 1f + apRoundsEliteDamage.Value * (float)itemCountEffective; } if (vultureEnable.Value && itemCountEffective2 > 0 && (double)self.combinedHealth > (double)self.fullCombinedHealth * 0.5) { num *= 1f + vultureEliteDamage.Value * (float)itemCountEffective2; } } return num; }); val.Emit(OpCodes.Ldloc, 10); val.Emit(OpCodes.Mul); val.Emit(OpCodes.Stloc, 10); val.Emit(OpCodes.Br, next); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_MeatEffect(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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "MeatRegenBoost"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "HasBuff") })) { val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((CharacterBody self) => self.HasBuff(MeatBuff))); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private void OnMeatDeath(DamageReport report) { if (!NetworkServer.active) { return; } CharacterBody attackerBody = report.attackerBody; if (!Object.op_Implicit((Object)(object)attackerBody)) { return; } Inventory inventory = attackerBody.inventory; if (Object.op_Implicit((Object)(object)inventory)) { int itemCountEffective = inventory.GetItemCountEffective(Items.FlatHealth); if (itemCountEffective > 0) { float stackedStats = GetStackedStats(meatDuration.Value, meatDurationStack.Value, itemCountEffective); int stackedStatsInt = GetStackedStatsInt(meatMax.Value, meatMaxStack.Value, itemCountEffective); attackerBody.AddTimedBuff(MeatBuff, stackedStats, stackedStatsInt); } } } public void IL_StrengthenBurn(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_0034: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 3) })) { val.Next.Operand = ignitionBurnBonus.Value; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private void OnDuplicatorDeath(DamageReport report) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_00ea: 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_0105: 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_0114: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } rng = new Xoroshiro128Plus(Run.instance.treasureRng.nextUlong); CharacterBody attackerBody = report.attackerBody; if (!Object.op_Implicit((Object)(object)attackerBody)) { return; } Inventory inventory = attackerBody.inventory; if (!Object.op_Implicit((Object)(object)inventory)) { return; } int itemCountEffective = inventory.GetItemCountEffective(Items.Duplicator); if (itemCountEffective > 0 && Object.op_Implicit((Object)(object)report.victimMaster) && Object.op_Implicit((Object)(object)report.victimBody)) { PickupDropTable dropTable = Surprise.dropTable; if (Util.CheckRoll(duplicatorDropChance.Value, report.attackerMaster) && Object.op_Implicit((Object)(object)dropTable)) { PickupIndex pickupIndex = dropTable.GeneratePickup(rng).pickupIndex; UniquePickup val = default(UniquePickup); ((UniquePickup)(ref val))..ctor(pickupIndex); val.decayValue = 1f; PickupDropletController.CreatePickupDroplet(val, report.victimBody.corePosition, Vector3.up * 20f); } } } public void IL_Duplicator(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_000b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 10) })) { val.Next.Operand = duplicatorDuration.Value; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_GrantTempItem(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_0034: 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_0095: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(Inventory), "GiveItemPermanent") })) { Func[] array = new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f) }; if (val.TryGotoNext(val2, array)) { val.Next.Operand = 0f; if (val.TryGotoNext(val2, array)) { val.Next.Operand = 0f; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_ChanceShrine(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_000b: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_008f: 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_00ab: 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_01b2: 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_01ca: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 30) })) { val.Next.Operand = (int)chanceDollUpgrade.Value; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 5) })) { val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4, 0); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } val = new ILCursor(il); ILLabel val5 = default(ILLabel); if (val.TryGotoNext(val3, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val5), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(ShrineChanceBehavior), "chanceDollWin") })) { ILCursor obj = val; obj.Index -= 2; val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc_1); val.Emit(OpCodes.Ldloc_2); val.EmitDelegate>((Action)delegate(ShrineChanceBehavior self, CharacterBody component, Inventory inventory) { //IL_0044: 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) //IL_0056: 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_0068: 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_007d: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown if (inventory.GetItemCountEffective(Items.ExtraShrineItem) > 0 && Util.CheckRoll((float)inventory.GetItemCountEffective(Items.ExtraShrineItem) * chanceDollScrap.Value, component.master)) { CreatePickupInfo val4 = default(CreatePickupInfo); ((CreatePickupInfo)(ref val4)).pickupIndex = PickupCatalog.FindPickupIndex(Items.ScrapWhite.itemIndex); PickupDropletController.CreatePickupDroplet(val4, self.dropletOrigin.position, self.dropletOrigin.forward * 20f); Util.PlaySound("Play_ui_artifact_delusion_success", ((Component)component).gameObject); EffectManager.SpawnEffect(self.effectPrefabShrineRewardJackpotVFX, new EffectData { origin = ((Component)self).transform.position, rotation = Quaternion.identity, scale = 1f, color = Color32.op_Implicit(Color.white) }, true); } }); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } public void IL_NotMoving(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_0034: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f) })) { val.Next.Operand = bungusTimer.Value; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void OnLanternUpdate(orig_UpdateValues orig, AttackSpeedPerNearbyCollider self, int itemCount, out float diameter) { orig.Invoke(self, itemCount, ref diameter); self.maxCharacterCount = lanternAlly.Value + (itemCount - 1) * lanternAllyStack.Value; diameter = lanternRadius.Value + ((float)itemCount - 1f) * lanternRadiusStack.Value; } public void OnLanternStart(orig_Start orig, AttackSpeedPerNearbyCollider self) { self.syncInterval = 0.5f; orig.Invoke(self); } public void IL_Lantern(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_0034: 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_00c8: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs).GetField("AttackSpeedPerNearbyAllyOrEnemyBuff")) })) { if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.035f) })) { val.Next.Operand = lanternSpeedStack.Value; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.065f) })) { val.Next.Operand = lanternSpeed.Value - lanternSpeedStack.Value; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_StunDamage(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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)2; bool flag; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(EffectManager), "SimpleImpactEffect") })) { MoveType val3 = (MoveType)2; flag = val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "SetStun") }); } else { flag = false; } if (!flag) { return; } val.Emit(OpCodes.Ldarg, 1); val.Emit(OpCodes.Ldloc, 3); val.EmitDelegate>((Action)delegate(DamageReport damageReport, int stunGrenadeCount) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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_005c: 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_006f: 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_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_008c: Expected O, but got Unknown if (NetworkServer.active && Object.op_Implicit((Object)(object)damageReport.attackerBody)) { DamageInfo val4 = new DamageInfo { attacker = damageReport.attacker, crit = damageReport.damageInfo.crit, damage = stunGrenadeDamage.Value * damageReport.attackerBody.damage, damageColorIndex = (DamageColorIndex)3, inflictor = damageReport.attacker, position = damageReport.damageInfo.position, procCoefficient = 0f }; damageReport.victim.TakeDamage(val4); GlobalEventManager.instance.OnHitEnemy(val4, ((Component)damageReport.victim).gameObject); GlobalEventManager.instance.OnHitAll(val4, ((Component)damageReport.victim).gameObject); } }); } public void OnAwardExperience(orig_AwardExperience orig, ExperienceManager self, Vector3 origin, CharacterBody body, ulong amount) { //IL_0038: 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) if ((Object)(object)body == (Object)null || (Object)(object)body.inventory == (Object)null || body.inventory.GetItemCountEffective(Items.OnLevelUpFreeUnlock) < 1) { orig.Invoke(self, origin, body, amount); return; } ulong num = amount; int num2 = TeamManager.LongstandingSolitudesInParty(); for (int i = 0; i < num2; i++) { num = ((num > amount / 2) ? (num - (ulong)Math.Ceiling((float)num * solitudeExp.Value)) : (num - (ulong)Math.Ceiling((float)amount * solitudeExp.Value))); } orig.Invoke(self, origin, body, num); } public float OnItemCostScale(orig_GetLongstandingSolitudeItemCostScale orig) { return 1f + (float)TeamManager.LongstandingSolitudesInParty() * solitudeCost.Value; } } public static class TooManyItemsChanges { [CompilerGenerated] private static class <>O { public static StatHookEventHandler <0>__OnMilkStats; public static Action, MilkCartonOrb> <1>__OnMilkArrival; public static Action, CharacterMaster, ItemIndex, ItemIndex, TransformationType> <2>__OnLoafTransform; public static hook_OverrideDebuff_BuffDef_CharacterBody <3>__OnRaincoatDebuff; public static hook_OverrideDot <4>__OnRaincoatDoT; public static hook_Heal <5>__OnCrucifixHeal; public static Manipulator <6>__IL_DotBypassArmor; } private static Hook loafHook; private static Hook milkHook; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static 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_002e: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0178: 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_0199: Expected O, but got Unknown //IL_01dc: 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_01e7: Expected O, but got Unknown //IL_01fd: 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: Expected O, but got Unknown if (Main.milkEnable.Value) { object obj = <>O.<0>__OnMilkStats; if (obj == null) { StatHookEventHandler val = OnMilkStats; <>O.<0>__OnMilkStats = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; MethodInfo methodInfo = AccessTools.Method(typeof(MilkCartonOrb), "OnArrival", (Type[])null, (Type[])null); milkHook = new Hook((MethodBase)methodInfo, (Delegate)new Action, MilkCartonOrb>(OnMilkArrival)); string pickupToken = $"Gain {Main.milkHealth.Value} max health. Retaliate damage from elites."; string descriptionToken = string.Format("Increases max health by {0} (+{0} per stack). Retaliate {1}% (+{1}% per stack) of the damage taken from elite enemies.", Main.milkHealth.Value, Main.milkRetaliate.Value * 100f); MilkCarton.itemDef.pickupToken = pickupToken; MilkCarton.itemDef.descriptionToken = descriptionToken; } if (Main.loafEnable.Value) { MethodInfo methodInfo2 = AccessTools.Method(typeof(CharacterMasterNotificationQueue), "PushItemTransformNotification", (Type[])null, (Type[])null); loafHook = new Hook((MethodBase)methodInfo2, (Delegate)new Action, CharacterMaster, ItemIndex, ItemIndex, TransformationType>(OnLoafTransform)); string descriptionToken2 = $"Gain 1 (+1 per stack) gold on-kill. After 25 kills, scrap a stack of this item and gain an extra 25 gold, with a {Main.loafRegenChance.Value}% chance to regain a stack of this item. Gold amount scales over time."; BreadLoaf.itemDef.descriptionToken = descriptionToken2; } if (Main.crucifixEnable.Value) { object obj2 = <>O.<3>__OnRaincoatDebuff; if (obj2 == null) { hook_OverrideDebuff_BuffDef_CharacterBody val2 = OnRaincoatDebuff; <>O.<3>__OnRaincoatDebuff = val2; obj2 = (object)val2; } ImmuneToDebuffBehavior.OverrideDebuff_BuffDef_CharacterBody += (hook_OverrideDebuff_BuffDef_CharacterBody)obj2; object obj3 = <>O.<4>__OnRaincoatDoT; if (obj3 == null) { hook_OverrideDot val3 = OnRaincoatDoT; <>O.<4>__OnRaincoatDoT = val3; obj3 = (object)val3; } ImmuneToDebuffBehavior.OverrideDot += (hook_OverrideDot)obj3; Crucifix.percentDamageReduction = Main.crucifixResist.Value; Crucifix.percentMaxHealthBurnAmount = Main.crucifixBurnPercent.Value; Crucifix.percentMaxHealthBurnAmountReduction = Main.crucifixBurnStack.Value; object obj4 = <>O.<5>__OnCrucifixHeal; if (obj4 == null) { hook_Heal val4 = OnCrucifixHeal; <>O.<5>__OnCrucifixHeal = val4; obj4 = (object)val4; } HealthComponent.Heal += (hook_Heal)obj4; object obj5 = <>O.<6>__IL_DotBypassArmor; if (obj5 == null) { Manipulator val5 = IL_DotBypassArmor; <>O.<6>__IL_DotBypassArmor = val5; obj5 = (object)val5; } DotController.AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1 += (Manipulator)obj5; string descriptionToken3 = string.Format("Reduce damage taken by {0}%, but taking damage burns you for {1}% (-{2}% per stack) max health. While burning, all healing recieved is reduced by {3}% (+{3}% per stack).", Main.crucifixResist.Value * 100f, Main.crucifixBurnPercent.Value * 100f, Main.crucifixBurnStack.Value * 100f, Main.crucifixHealReduction.Value * 100f); Crucifix.itemDef.descriptionToken = descriptionToken3; } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool OnRaincoatDebuff(orig_OverrideDebuff_BuffDef_CharacterBody orig, BuffDef buffDef, CharacterBody body) { if (buffDef.isCooldown) { return false; } if (Main.HasTooManyItems) { ItemDef itemDef = Crucifix.itemDef; if (((object)buffDef).Equals((object?)Buffs.OnFire) && Object.op_Implicit((Object)(object)body.inventory) && body.inventory.GetItemCountEffective(itemDef) > 0) { return false; } } return orig.Invoke(buffDef, body); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool OnRaincoatDoT(orig_OverrideDot orig, InflictDotInfo inflictDotInfo) { //IL_0080: 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) if (Main.HasTooManyItems) { GameObject victimObject = inflictDotInfo.victimObject; CharacterBody val = (((Object)(object)victimObject != (Object)null) ? victimObject.GetComponent() : null); if ((Object)(object)val != (Object)null) { ItemDef itemDef = Crucifix.itemDef; if (((object)(DotIndex)(ref inflictDotInfo.dotIndex)).Equals((object)(DotIndex)1) && Object.op_Implicit((Object)(object)val.inventory) && val.inventory.GetItemCountEffective(itemDef) > 0) { return false; } } } return orig.Invoke(inflictDotInfo); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_DotBypassArmor(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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_0096: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Mathf), "Min"), (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(DotStack), "damage") })) { val.Emit(OpCodes.Ldloc, 5); val.Emit(OpCodes.Ldc_I4, 2); val.EmitDelegate>((Action)delegate(DotStack dotStack, DamageType type) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) dotStack.damageType = DamageTypeCombo.op_Implicit(type); }); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static float OnCrucifixHeal(orig_Heal orig, HealthComponent self, float amount, ProcChainMask procChainMask, bool nonRegen = true) { //IL_0016: 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_0055: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)self.body)) { return orig.Invoke(self, amount, procChainMask, nonRegen); } if (self.body.HasBuff(Buffs.OnFire)) { if (!Object.op_Implicit((Object)(object)self.body.inventory)) { return orig.Invoke(self, amount, procChainMask, nonRegen); } ItemDef itemDef = Crucifix.itemDef; int itemCountEffective = self.body.inventory.GetItemCountEffective(itemDef); if (itemCountEffective > 0) { for (int i = 0; i < itemCountEffective; i++) { amount *= Main.crucifixHealReduction.Value; } } } return orig.Invoke(self, amount, procChainMask, nonRegen); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void OnLoafTransform(Action orig, CharacterMaster characterMaster, ItemIndex oldIndex, ItemIndex newIndex, TransformationType transformationType) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_002b: Unknown result type (might be due to invalid IL or missing references) if (((object)(ItemIndex)(ref oldIndex)).Equals((object?)BreadLoaf.itemDef.itemIndex) && ((object)(ItemIndex)(ref newIndex)).Equals((object?)Items.ScrapWhite.itemIndex) && ((object)(TransformationType)(ref transformationType)).Equals((object)(TransformationType)0) && Util.CheckRoll(Main.loafRegenChance.Value, characterMaster)) { Util.PlaySound("Play_ui_artifact_delusion_success", ((Component)characterMaster).gameObject); characterMaster.inventory.GiveItemPermanent(BreadLoaf.itemDef, 1); } orig(characterMaster, oldIndex, newIndex, transformationType); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnMilkStats(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender) && Object.op_Implicit((Object)(object)sender.inventory)) { int itemCountEffective = sender.inventory.GetItemCountEffective(MilkCarton.itemDef); if (itemCountEffective > 0) { float num = (float)itemCountEffective * Main.milkHealth.Value; args.baseHealthAdd += num; } } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnMilkArrival(Action orig, MilkCartonOrb self) { MilkCarton.percentEliteDamageRetaliation = Main.milkRetaliate.Value; MilkCarton.percentEliteDamageRetaliationExtraStacks = Main.milkRetaliate.Value; orig(self); } } public static class SeekingTheVoidChanges { private static Hook toxicHook; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Initialize() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown if (Main.toxicoEnable.Value) { MethodInfo methodInfo = AccessTools.Method(typeof(ToxicodendronBrineBehavior), "TriggerPoisonSpread", (Type[])null, (Type[])null); toxicHook = new Hook((MethodBase)methodInfo, (Delegate)new Action, ToxicodendronBrineBehavior, CharacterBody, DamageReport>(OnToxicKill)); string text = $"Hits that deal more than 400% damage also inflict poison for 10s. Whenever you kill a poisoned enemy, the poison spreads on up to 1 (+1 per stack) enemy within 25m (+5m per stack), and reduces all your skill cooldowns by 20% (+{Main.toxicoStack.Value * 100f}% per stack). Corrupts all Noxious Thorns."; LanguageAPI.Add("SEEKINTHEVOID_TOXICODENDRONBRINE_DESC", text); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnToxicKill(Action orig, ToxicodendronBrineBehavior self, CharacterBody body, DamageReport report) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) float num = ((float)report.attackerBody.inventory.GetItemCountEffective(ToxicodendronBrine.ToxicodendronBrineDef.itemIndex) - 1f) * Main.toxicoStack.Value; float num2 = report.attackerBody.skillLocator.GetSkill((SkillSlot)0).rechargeStopwatch * num; float num3 = report.attackerBody.skillLocator.GetSkill((SkillSlot)1).rechargeStopwatch * num; float num4 = report.attackerBody.skillLocator.GetSkill((SkillSlot)2).rechargeStopwatch * num; float num5 = report.attackerBody.skillLocator.GetSkill((SkillSlot)3).rechargeStopwatch * num; GenericSkill skill = report.attackerBody.skillLocator.GetSkill((SkillSlot)0); skill.rechargeStopwatch += num2; GenericSkill skill2 = report.attackerBody.skillLocator.GetSkill((SkillSlot)1); skill2.rechargeStopwatch += num3; GenericSkill skill3 = report.attackerBody.skillLocator.GetSkill((SkillSlot)2); skill3.rechargeStopwatch += num4; GenericSkill skill4 = report.attackerBody.skillLocator.GetSkill((SkillSlot)3); skill4.rechargeStopwatch += num5; orig(self, body, report); } } public static class HorseshoeChanges { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_SS2ThoriumBattery(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_000b: 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(VolatileThoriumBattery), "Damage") })) { int index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc, 4); val.EmitDelegate>((Func)delegate(VolatileThoriumBattery self, VolatileThoriumBatteryController controller) { int stacks = controller.stacks; float num = Main.GetStackedStats(Main.batteryDamage.Value, Main.batteryDamageStack.Value, stacks); if (Main.HasStarstorm && Object.op_Implicit((Object)(object)controller.attackerBody.inventory) && Main.horseshoeEnable.Value) { ItemDef uraniumHorseshoe = Items.UraniumHorseshoe; int itemCountEffective = controller.attackerBody.inventory.GetItemCountEffective(uraniumHorseshoe); num *= 1f + (float)itemCountEffective * Main.uraniumHorseshoeDamage.Value; } return num * 100f; }); if (val.TryGotoPrev(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(VolatileThoriumBattery), "ChanceToProc") })) { index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((VolatileThoriumBattery self) => Main.batteryDamageChance.Value)); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void OnInflictRad(orig_InflictDot_refInflictDotInfo orig, ref InflictDotInfo inflictDotInfo) { //IL_0053: 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_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) if (Object.op_Implicit((Object)(object)inflictDotInfo.attackerObject) && Main.HasStarstorm && Main.HasMeltdown && Main.horseshoeEnable.Value) { CharacterBody component = inflictDotInfo.attackerObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && (inflictDotInfo.dotIndex == Meltdown.irradiated.index || inflictDotInfo.dotIndex == Meltdown.empoweredIrradiated.index)) { ItemDef uraniumHorseshoe = Items.UraniumHorseshoe; int itemCountEffective = component.inventory.GetItemCountEffective(uraniumHorseshoe); inflictDotInfo.damageMultiplier *= 1f + (float)itemCountEffective * Main.uraniumHorseshoeDamage.Value; } } orig.Invoke(ref inflictDotInfo); } } public static class MeltdownChanges { [CompilerGenerated] private static class <>O { public static Manipulator <0>__IL_SS2ThoriumBattery; public static Manipulator <1>__IL_ThoriumBattery; } private static ILHook batteryHook; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Initialize() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //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_007c: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown if (!Main.batteryEnable.Value) { return; } MethodInfo methodInfo = AccessTools.Method(typeof(VolatileThoriumBattery), "GlobalEventManager_onServerDamageDealt", (Type[])null, (Type[])null); if (Main.HasStarstorm) { object obj = <>O.<0>__IL_SS2ThoriumBattery; if (obj == null) { Manipulator val = HorseshoeChanges.IL_SS2ThoriumBattery; <>O.<0>__IL_SS2ThoriumBattery = val; obj = (object)val; } batteryHook = new ILHook((MethodBase)methodInfo, (Manipulator)obj); } else { object obj2 = <>O.<1>__IL_ThoriumBattery; if (obj2 == null) { Manipulator val2 = IL_ThoriumBattery; <>O.<1>__IL_ThoriumBattery = val2; obj2 = (object)val2; } batteryHook = new ILHook((MethodBase)methodInfo, (Manipulator)obj2); } string stackDesc = Main.GetStackDesc(Main.batteryDamageStack.Value * 100f, "%"); string text = $"Gain 5% chance on hit to Irradiate enemies. Irradiated enemies have a {Main.batteryDamageChance.Value}% chance per tick to deal {Main.batteryDamage.Value * 100f}%{stackDesc} damage in a 12m (+4m per stack) radius, applying Irradiated."; LanguageAPI.Add("ITEM_MELTDOWN_VOLATILETHORIUMBATTERY_NEW_DESCRIPTION", text); ((ItemBase)Meltdown.items.volatileThoriumBattery).itemDef.descriptionToken = "ITEM_MELTDOWN_VOLATILETHORIUMBATTERY_NEW_DESCRIPTION"; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_ThoriumBattery(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_000b: 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(VolatileThoriumBattery), "Damage") })) { int index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc, 4); val.EmitDelegate>((Func)delegate(VolatileThoriumBattery self, VolatileThoriumBatteryController controller) { int stacks = controller.stacks; float num = Main.GetStackedStats(Main.batteryDamage.Value, Main.batteryDamageStack.Value, stacks); if (Main.HasStarstorm && Object.op_Implicit((Object)(object)controller.attackerBody.inventory) && Main.horseshoeEnable.Value) { ItemDef uraniumHorseshoe = Items.UraniumHorseshoe; int itemCountEffective = controller.attackerBody.inventory.GetItemCountEffective(uraniumHorseshoe); num *= 1f + (float)itemCountEffective * Main.uraniumHorseshoeDamage.Value; } return num * 100f; }); if (val.TryGotoPrev(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(VolatileThoriumBattery), "ChanceToProc") })) { index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((VolatileThoriumBattery self) => Main.batteryDamageChance.Value)); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } } public static class NautilusChanges { [CompilerGenerated] private static class <>O { public static Manipulator <0>__IL_RemoveOpticsMethod1; public static Manipulator <1>__IL_RemoveOpticsMethod2; public static Manipulator <2>__IL_RemoveOpticsMethod3; public static hook_InflictDot_refInflictDotInfo <3>__OnInflictCollapse; public static hook_OnHitEnemy <4>__OnGlobalHitEnemy; public static Manipulator <5>__IL_RemoveWelliesMethod; public static StatHookEventHandler <6>__OnWelliesStats; public static hook_ProcessHitEnemy <7>__OnCritWeaken; public static hook_OnInventoryChanged <8>__AddWelliesBehaviour; } private static ILHook opticsHook1; private static ILHook opticsHook2; private static ILHook opticsHook3; private static ILHook welliesHook; private static ItemDef welliesDef = ((ItemBase)ItemInit.Wellies).ItemDef; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Initialize() { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //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_00a3: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Expected O, but got Unknown //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Expected O, but got Unknown //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_014b: 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_0156: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //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_0125: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //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_0177: Expected O, but got Unknown if (Main.opticsEnable.Value) { List anonymousMethods = Main.GetAnonymousMethods(typeof(ObserversEye), "RegisterHooks"); foreach (MethodInfo item in anonymousMethods) { Log.Message(item); } MethodInfo methodInfo = anonymousMethods[1]; MethodInfo methodInfo2 = anonymousMethods[2]; MethodInfo methodInfo3 = anonymousMethods[3]; if (methodInfo != null) { object obj = <>O.<0>__IL_RemoveOpticsMethod1; if (obj == null) { Manipulator val = IL_RemoveOpticsMethod1; <>O.<0>__IL_RemoveOpticsMethod1 = val; obj = (object)val; } opticsHook1 = new ILHook((MethodBase)methodInfo, (Manipulator)obj); Log.Message("Success!"); } if (methodInfo2 != null) { object obj2 = <>O.<1>__IL_RemoveOpticsMethod2; if (obj2 == null) { Manipulator val2 = IL_RemoveOpticsMethod2; <>O.<1>__IL_RemoveOpticsMethod2 = val2; obj2 = (object)val2; } opticsHook2 = new ILHook((MethodBase)methodInfo2, (Manipulator)obj2); Log.Message("Success!!"); } if (methodInfo3 != null) { object obj3 = <>O.<2>__IL_RemoveOpticsMethod3; if (obj3 == null) { Manipulator val3 = IL_RemoveOpticsMethod3; <>O.<2>__IL_RemoveOpticsMethod3 = val3; obj3 = (object)val3; } opticsHook3 = new ILHook((MethodBase)methodInfo3, (Manipulator)obj3); Log.Message("Success!!!"); } object obj4 = <>O.<3>__OnInflictCollapse; if (obj4 == null) { hook_InflictDot_refInflictDotInfo val4 = OnInflictCollapse; <>O.<3>__OnInflictCollapse = val4; obj4 = (object)val4; } DotController.InflictDot_refInflictDotInfo += (hook_InflictDot_refInflictDotInfo)obj4; object obj5 = <>O.<4>__OnGlobalHitEnemy; if (obj5 == null) { hook_OnHitEnemy val5 = OnGlobalHitEnemy; <>O.<4>__OnGlobalHitEnemy = val5; obj5 = (object)val5; } GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)obj5; string text = $"Your equipment is consumed on use, granting voidtouched power for {Main.opticsDuration.Value}s (+{Main.opticsDurationStack.Value}s per stack). Additionally grants a stacking {Main.opticsDamage.Value * 100f}% collapse damage bonus and {Main.opticsChance.Value}% chance to collapse on hit for the rest of the stage. Corrupts all Functional Couplers."; LanguageAPI.AddOverlay("NT_ITEM_OBSERVERSEYE_DESC", text); string text2 = $"Your equipment is consumed on use, granting you power from the void."; LanguageAPI.AddOverlay("NT_ITEM_OBSERVERSEYE_PICKUP", text2); } if (!Main.welliesEnable.Value) { return; } List anonymousMethods2 = Main.GetAnonymousMethods(typeof(Wellies), "RegisterHooks"); foreach (MethodInfo item2 in anonymousMethods2) { Log.Message(item2); } MethodInfo methodInfo4 = anonymousMethods2[0]; if (methodInfo4 != null) { object obj6 = <>O.<5>__IL_RemoveWelliesMethod; if (obj6 == null) { Manipulator val6 = IL_RemoveWelliesMethod; <>O.<5>__IL_RemoveWelliesMethod = val6; obj6 = (object)val6; } welliesHook = new ILHook((MethodBase)methodInfo4, (Manipulator)obj6); Log.Message("Success!"); } object obj7 = <>O.<6>__OnWelliesStats; if (obj7 == null) { StatHookEventHandler val7 = OnWelliesStats; <>O.<6>__OnWelliesStats = val7; obj7 = (object)val7; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj7; object obj8 = <>O.<7>__OnCritWeaken; if (obj8 == null) { hook_ProcessHitEnemy val8 = OnCritWeaken; <>O.<7>__OnCritWeaken = val8; obj8 = (object)val8; } GlobalEventManager.ProcessHitEnemy += (hook_ProcessHitEnemy)obj8; object obj9 = <>O.<8>__AddWelliesBehaviour; if (obj9 == null) { hook_OnInventoryChanged val9 = AddWelliesBehaviour; <>O.<8>__AddWelliesBehaviour = val9; obj9 = (object)val9; } CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)obj9; string stackDesc = Main.GetStackDesc(Main.welliesDurationStack.Value, "s"); string text3 = string.Format("You have +{0}% (+{0}% per stack) crit chance while airborne, and +{1}% (+{1}% per stack) crit damage while grounded. Your critical strikes can weaken airborne foes for {2}s{3} and pull them to the ground. Corrupts all Hiker's Boots.", Main.welliesChance.Value, Main.welliesDamage.Value * 100f, Main.welliesDuration.Value, stackDesc); LanguageAPI.AddOverlay("NT_ITEM_WELLIES_DESC", text3); string text4 = $"Increases crit chance while airborne, and crit damage while grounded. Critical strikes drag foes downwards."; LanguageAPI.AddOverlay("NT_ITEM_WELLIES_PICKUP", text4); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void AddWelliesBehaviour(orig_OnInventoryChanged orig, CharacterBody self) { if (NetworkServer.active && (Object)(object)welliesDef != (Object)null) { self.AddItemBehavior(self.inventory.GetItemCountEffective(welliesDef)); } orig.Invoke(self); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnBodyUpdate(orig_FixedUpdate orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.inventory) && Object.op_Implicit((Object)(object)welliesDef) && self.inventory.GetItemCountEffective(welliesDef) > 0) { self.RecalculateStats(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnWelliesStats(CharacterBody sender, StatHookEventArgs args) { CharacterMotor val = default(CharacterMotor); if (!Object.op_Implicit((Object)(object)sender) || !Object.op_Implicit((Object)(object)sender.inventory) || !((Component)sender).TryGetComponent(ref val) || !Object.op_Implicit((Object)(object)welliesDef)) { return; } int itemCountEffective = sender.inventory.GetItemCountEffective(welliesDef); if (itemCountEffective > 0) { if (val.isGrounded) { float num = (float)itemCountEffective * Main.welliesDamage.Value; args.critDamageMultAdd += num; } else { float num2 = (float)itemCountEffective * Main.welliesChance.Value; args.critAdd += num2; } } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnCritWeaken(orig_ProcessHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0151: 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) orig.Invoke(self, damageInfo, victim); CharacterBody val = (Object.op_Implicit((Object)(object)damageInfo.attacker) ? damageInfo.attacker.GetComponent() : null); CharacterBody val2 = (Object.op_Implicit((Object)(object)victim) ? victim.GetComponent() : null); if (!damageInfo.crit || !Object.op_Implicit((Object)(object)welliesDef) || !Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)val2) || !Object.op_Implicit((Object)(object)val.inventory) || !(damageInfo.procCoefficient > 0f)) { return; } int itemCountEffective = val.inventory.GetItemCountEffective(welliesDef); float value = Main.welliesForce.Value; if (itemCountEffective > 0 && value > 0f && !((Object)val2).name.ToLower().Contains("grandparent") && !((Object)val2).name.ToLower().Contains("voidraid")) { float stackedStats = Main.GetStackedStats(Main.welliesDuration.Value, Main.welliesDurationStack.Value, itemCountEffective); PhysForceInfo val3 = default(PhysForceInfo); val3.force = Vector3.down * value; PhysForceInfo val4 = val3; val3 = default(PhysForceInfo); val3.force = Vector3.down * value / 100f; ((PhysForceInfo)(ref val3)).massIsOne = true; PhysForceInfo val5 = val3; CharacterMotor val6 = default(CharacterMotor); RigidbodyMotor val7 = default(RigidbodyMotor); if (((Component)val2).TryGetComponent(ref val6) && !val6.isGrounded) { val6.ApplyForceImpulse(ref val4); val6.ApplyForceImpulse(ref val5); val2.AddTimedBuff(Buffs.Weak, (float)itemCountEffective); Util.PlaySound("Play_voidBarnacle_m1_chargeUp", ((Component)val2).gameObject); } else if (((Component)val2).TryGetComponent(ref val7)) { val7.ApplyForceImpulse(ref val4); val7.ApplyForceImpulse(ref val5); val2.AddTimedBuff(Buffs.Weak, (float)itemCountEffective); Util.PlaySound("Play_voidBarnacle_m1_chargeUp", ((Component)val2).gameObject); } } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnGlobalHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victimObject) { CharacterBody val = default(CharacterBody); CharacterBody val2 = default(CharacterBody); if (!damageInfo.rejected && damageInfo.damage > 0f && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent(ref val) && Object.op_Implicit((Object)(object)val.master) && victimObject.TryGetComponent(ref val2) && Object.op_Implicit((Object)(object)val2.healthComponent) && !((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)19)) { int buffCount = val.GetBuffCount(Main.OpticsBuff); if (buffCount > 0) { float num = Main.opticsChance.Value * (float)buffCount * damageInfo.procCoefficient; if (Util.CheckRoll(num, val.master.luck, val.master)) { DotDef dotDef = DotController.GetDotDef((DotIndex)8); DotController.InflictDot(victimObject, damageInfo.attacker, damageInfo.inflictedHurtbox, (DotIndex)8, dotDef.interval, 1f, (uint?)null); ((ProcChainMask)(ref damageInfo.procChainMask)).AddProc((ProcType)19); } } } orig.Invoke(self, damageInfo, victimObject); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnInflictCollapse(orig_InflictDot_refInflictDotInfo orig, ref InflictDotInfo inflictDotInfo) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)inflictDotInfo.attackerObject)) { CharacterBody component = inflictDotInfo.attackerObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && (int)inflictDotInfo.dotIndex == 8) { int buffCount = component.GetBuffCount(Main.OpticsBuff); inflictDotInfo.damageMultiplier *= 1f + (float)buffCount * Main.opticsDamage.Value; } } orig.Invoke(ref inflictDotInfo); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static DisplayData OnGenerateDisplay(orig_GenerateDisplayData orig, EquipmentIcon self) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) DisplayData val = default(DisplayData); val = orig.Invoke(self); ItemDef itemDef = ((ItemBase)ItemInit.ObserversEye).ItemDef; if (Object.op_Implicit((Object)(object)self.targetInventory) && self.targetInventory.GetItemCountEffective(itemDef) > 0 && self.displayAlternateEquipment) { val.hideEntireDisplay = false; } return val; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnUpdateEquipmentSet(orig_UpdateEquipmentSetCount orig, Inventory self) { ItemDef itemDef = ((ItemBase)ItemInit.ObserversEye).ItemDef; if (self.GetItemCountEffective(itemDef) > 0) { int i = Main.opticsSlots.Value - self._lastExtraEquipmentCount; self._lastExtraEquipmentCount = Main.opticsSlots.Value; while (i > 0) { self.AddEquipmentSet(); i--; } for (; i < 0; i++) { self.RemoveEquipmentSet(); } } else { orig.Invoke(self); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnFixExtraEquipment(orig_FixExtraEquipmentCounts orig, Inventory self) { ItemDef itemDef = ((ItemBase)ItemInit.ObserversEye).ItemDef; if (self.GetItemCountEffective(itemDef) > 0) { self._lastExtraEquipmentCount = Main.opticsSlots.Value; if (self._equipmentStateSlots.Length != 0) { int i; for (i = self._lastExtraEquipmentCount + 1 - self._equipmentStateSlots[0].Length; i > 0; i--) { self.AddEquipmentSet(); } for (; i < 0; i++) { self.RemoveEquipmentSet(); } } } else { orig.Invoke(self); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_EquipmentSlotUpdate(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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: 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_00f3: 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_0126: 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_0157: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchRet(x), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 7) })) { int index = val.Index; val.Index = index - 1; Instruction next = val.Next; ILLabel val4 = default(ILLabel); if (val.TryGotoPrev(val3, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(CharacterBody), "requestEquipmentFire"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val4) })) { val.Emit(OpCodes.Ldloc, 6); val.Emit(OpCodes.Ldsfld, (object)((ItemBase)ItemInit.ObserversEye).ItemIndex); MethodInfo methodInfo = AccessTools.Method(typeof(Inventory), "GetItemCountEffective", (Type[])null, (Type[])null); val.Emit(OpCodes.Call, (object)(typeof(Inventory), "GetItemCountEffective")); val.Emit(OpCodes.Ldc_I4_0); val.Emit(OpCodes.Ble, next); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_RemoveWelliesMethod(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_0015: 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_0053: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldarg_2); val.Emit(OpCodes.Ldarg_3); val.EmitDelegate>((Action)delegate(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { orig.Invoke(self, damageInfo); }); val.Emit(OpCodes.Ret); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_RemoveOpticsMethod1(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_0015: 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_002d: 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_0046: 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) ILCursor val = new ILCursor(il); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldarg_2); val.Emit(OpCodes.Ldarg_3); val.Emit(OpCodes.Ldarg, 4); val.Emit(OpCodes.Ldarg, 5); val.EmitDelegate>((Action)delegate(ObserversEye item, orig_OnEquipmentExecuted_byte_byte_EquipmentIndex orig, EquipmentSlot self, byte slot, byte set, EquipmentIndex index) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, slot, set, index); if (Object.op_Implicit((Object)(object)self.characterBody) && Object.op_Implicit((Object)(object)self.inventory)) { ItemDef itemDef = ((ItemBase)ItemInit.ObserversEye).ItemDef; int itemCountEffective = self.inventory.GetItemCountEffective(itemDef); if (itemCountEffective > 0) { CharacterMasterNotificationQueue.SendTransformNotification(self.characterBody.master, self.characterBody.inventory.currentEquipmentIndex, (EquipmentIndex)(-1), (TransformationType)0); self.characterBody.inventory.SetEquipmentIndex((EquipmentIndex)(-1), true); float stackedStats = Main.GetStackedStats(Main.opticsDuration.Value, Main.opticsDurationStack.Value, itemCountEffective); self.characterBody.AddTimedBuff(Buffs.EliteVoid, stackedStats); self.characterBody.AddTimedBuff(Main.OpticsBuff, 9999f); } } }); val.Emit(OpCodes.Ret); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_RemoveOpticsMethod2(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_000b: 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_0045: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 0) })) { val.Emit(OpCodes.Ldloc_0); val.Emit(OpCodes.Ret); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_RemoveOpticsMethod3(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_0015: 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_0053: 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_006b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldarg_2); val.Emit(OpCodes.Ldarg_3); val.EmitDelegate>((Func)((orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot) => orig.Invoke(self, slot))); val.Emit(OpCodes.Stloc_2); val.Emit(OpCodes.Ldloc_2); val.Emit(OpCodes.Ret); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static float RemoveOpticsMethod2(Func orig, ObserversEye self, Inventory inv) { return orig(self, inv); } } public class WelliesBehaviour : ItemBehavior { public CharacterMotor motor; public bool wasGrounded; public void FixedUpdate() { if (base.stack > 0 && (Object)(object)base.body != (Object)null && ((Component)base.body).TryGetComponent(ref motor) && motor.isGrounded != wasGrounded) { wasGrounded = motor.isGrounded; base.body.RecalculateStats(); } } } public static class RigsArsenalChanges { [CompilerGenerated] private static class <>O { public static Manipulator <0>__IL_RigsSetupVoidItem; } private static ILHook rigsVoidHook; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Initialize() { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //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_00bb: Expected O, but got Unknown if (!Main.pyreEnable.Value) { return; } List anonymousMethods = Main.GetAnonymousMethods(typeof(RigsArsenal), "SetupVoidItem"); foreach (MethodInfo item in anonymousMethods) { Log.Message(item?.ToString() + " " + item.GetParameters()); } MethodInfo methodInfo = anonymousMethods[0]; if (methodInfo != null) { object obj = <>O.<0>__IL_RigsSetupVoidItem; if (obj == null) { Manipulator val = IL_RigsSetupVoidItem; <>O.<0>__IL_RigsSetupVoidItem = val; obj = (object)val; } rigsVoidHook = new ILHook((MethodBase)methodInfo, (Manipulator)obj); Log.Message("Success!"); } string stackDesc = Main.GetStackDesc(Main.coreDurationStack.Value, "s"); string text = $"Burn all enemies within {UmbralPyre.baseRange.Value + UmbralPyre.rangePerStack.Value}m (+{UmbralPyre.rangePerStack.Value}m per stack) for {UmbralPyre.explosionDamage.Value * 100f}% base damage, and ignite them for {UmbralPyre.burnDamage.Value * 100f}% (+{UmbralPyre.burnDamage.Value * 100f}% per stack) base damage. Triggers {UmbralPyre.explosionsPerSecond.Value} " + ((UmbralPyre.explosionsPerSecond.Value == 1) ? "time" : "times") + " per second. Corrupts all Bolstering Lanterns."; LanguageAPI.AddOverlay("ITEM_UMBRALPYRE_DESCRIPTION", text); string text2 = $"Periodically damage and burn all nearby enemies. Corrupts all Bolstering Lanterns."; LanguageAPI.AddOverlay("ITEM_UMBRALPYRE_PICKUP", text2); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_RigsSetupVoidItem(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_003b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Action)delegate(orig_Init orig) { //IL_0038: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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) foreach (Item item in RigsArsenal.ItemList) { if (!((Object)(object)item.pureItemDef == (Object)null)) { item.itemDef.requiredExpansion = ((IEnumerable)(object)ExpansionCatalog.expansionDefs).FirstOrDefault((Func)((ExpansionDef x) => x.nameToken == "DLC1_NAME")); ItemDef itemDef; if (item.pureItemDef.nameToken.Contains("IGNITEONKILL")) { itemDef = Items.AttackSpeedPerNearbyAllyOrEnemy; Log.Message("Success!"); } else { itemDef = item.pureItemDef; } Pair val2 = default(Pair); val2.itemDef1 = itemDef; val2.itemDef2 = item.itemDef; Pair val3 = val2; ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem] = CollectionExtensions.AddToArray(ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem], val3); } } orig.Invoke(); }); val.Emit(OpCodes.Ret); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnRigsSetupVoidItem(Action> orig, List items) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00da: Unknown result type (might be due to invalid IL or missing references) foreach (Item item in items) { if (!((Object)(object)item.pureItemDef == (Object)null)) { item.itemDef.requiredExpansion = ((IEnumerable)(object)ExpansionCatalog.expansionDefs).FirstOrDefault((Func)((ExpansionDef x) => x.nameToken == "DLC1_NAME")); ItemDef itemDef; if (item.pureItemDef.nameToken.Contains("IGNITEONKILL")) { itemDef = Items.AttackSpeedPerNearbyAllyOrEnemy; Log.Message("Success!"); } else { itemDef = item.pureItemDef; } Pair val = default(Pair); val.itemDef1 = itemDef; val.itemDef2 = item.itemDef; Pair val2 = val; ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem] = CollectionExtensions.AddToArray(ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem], val2); } } } } public static class VanillaVoidChanges { [CompilerGenerated] private static class <>O { public static Manipulator <0>__IL_CryoAoe; public static Action, ExeBlade, DamageReport> <1>__OnBurdenDeath; public static Action, int, DamageReport>, SwordToken, SphereSearch, List, int, DamageReport> <2>__OnBurdenPrepExecution; public static CalculateAdditiveExecuteThresholdEventHandler <3>__DreadExecuteThreshold; } private static ILHook cryoHook; private static Hook cryoConfigHook; private static Hook burdenDeathHook; private static Hook burdenExecuteHook; public static GameObject burdenWavePrefab = Addressables.LoadAssetAsync((object)RoR2_Base_DeathProjectile.DeathProjectileTickEffect_prefab).WaitForCompletion(); public static BuffDef DreadBuff; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Initialize() { //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //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_0046: Expected O, but got Unknown //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Expected O, but got Unknown //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Expected O, but got Unknown //IL_0270: 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_027b: Expected O, but got Unknown if (Main.coolantEnable.Value) { MethodInfo methodInfo = AccessTools.Method(typeof(CryoCanister), "CryoAoe2", (Type[])null, (Type[])null); object obj = <>O.<0>__IL_CryoAoe; if (obj == null) { Manipulator val = IL_CryoAoe; <>O.<0>__IL_CryoAoe = val; obj = (object)val; } cryoHook = new ILHook((MethodBase)methodInfo, (Manipulator)obj); string stackDesc = Main.GetStackDesc(Main.coolantRadiusStack.Value, "m"); string stackDesc2 = Main.GetStackDesc(Main.coolantDurationStack.Value, "s"); string stackDesc3 = Main.GetStackDesc(Main.coolantDamageStack.Value * 100f, "%"); string text = $"Killing an enemy inflicts {Main.coolantFrostCount.Value} stacks of Frost on all enemies within {Main.coolantRadius.Value}m{stackDesc} for {Main.coolantDuration.Value}s{stackDesc2}, dealing {Main.coolantDamage.Value * 100f}%{stackDesc3} base damage. Frost causes enemies to Freeze after 6 stacks. Corrupts all Gasoline."; LanguageAPI.AddOverlay("VV_ITEM_CRYOCANISTER_ITEM_DESCRIPTION", text); string text2 = $"Killing enemies damages surrounding enemies and inflicts frost. Corrupts all Gasoline."; LanguageAPI.AddOverlay("VV_ITEM_CRYOCANISTER_ITEM_PICKUP", text2); } if (Main.coreEnable.Value) { GlobalEventManager.ProcessHitEnemy += new Manipulator(IL_VVProcessHit); string stackDesc4 = Main.GetStackDesc(Main.coreDurationStack.Value, "s"); string text3 = $"{Main.coreSlowChance.Value}% chance on hit to apply slowing tar for {Main.coreDuration.Value}s{stackDesc4}. Slow effects also drown enemies, dealing 30% (+20% per stack) base damage per 10% slow. Corrupts all Ignition Tanks."; LanguageAPI.AddOverlay("VV_ITEM_CORE_ITEM_DESCRIPTION", text3); string text4 = $"Slowed enemies take damage over time. Chance to apply slowing tar on hit. Corrupts all Ignition Tanks."; LanguageAPI.AddOverlay("VV_ITEM_CORE_ITEM_PICKUP", text4); } if (Main.burdenEnable.Value) { CreateDreadBuff(); MethodInfo methodInfo2 = AccessTools.Method(typeof(ExeBlade), "ExeBladeExtraDeath", (Type[])null, (Type[])null); burdenDeathHook = new Hook((MethodBase)methodInfo2, (Delegate)new Action, ExeBlade, DamageReport>(OnBurdenDeath)); MethodInfo methodInfo3 = AccessTools.Method(typeof(SwordToken), "PrepExecutions", (Type[])null, (Type[])null); burdenExecuteHook = new Hook((MethodBase)methodInfo3, (Delegate)new Action, int, DamageReport>, SwordToken, SphereSearch, List, int, DamageReport>(OnBurdenPrepExecution)); CalculateAdditiveExecuteThresholdEventHandler calculateAdditiveExecuteThreshold = ExecuteAPI.CalculateAdditiveExecuteThreshold; object obj2 = <>O.<3>__DreadExecuteThreshold; if (obj2 == null) { CalculateAdditiveExecuteThresholdEventHandler val2 = DreadExecuteThreshold; <>O.<3>__DreadExecuteThreshold = val2; obj2 = (object)val2; } ExecuteAPI.CalculateAdditiveExecuteThreshold = (CalculateAdditiveExecuteThresholdEventHandler)Delegate.Combine((Delegate?)(object)calculateAdditiveExecuteThreshold, (Delegate?)obj2); string stackDesc5 = Main.GetStackDesc(Main.burdenDamageStack.Value * 100f, "%"); string stackDesc6 = Main.GetStackDesc(Main.burdenRadiusStack.Value, "m"); string text5 = $"Slaying an elite monster releases a wave in a {Main.burdenRadius.Value}m{stackDesc6} area around you, dealing {Main.burdenDamage.Value * 100f}%{stackDesc5} base damage and inflicting dread for {Main.burdenDuration.Value}s. Foes afflicted with dread are instantly killed below {Main.burdenThreshold.Value * 100f}% max hp. Corrupts all Old Guillotines."; LanguageAPI.AddOverlay("VV_ITEM_EXEBLADE_ITEM_DESCRIPTION", text5); string text6 = $"Killing elite monsters damages nearby enemies and executes them at low health. Corrupts all Old Guillotines."; LanguageAPI.AddOverlay("VV_ITEM_EXEBLADE_ITEM_PICKUP", text6); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void CreateDreadBuff() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) DreadBuff = Buffs.AddNewBuff("BloonDreadBuff", vanillaVoidPlugin.MainAssets.LoadAsset("bladeIcon512.png"), Color.magenta, canStack: false, isDebuff: true, isCooldown: false, isHidden: false); } private static void OnCryoAoe(Action orig, CryoCanister self, DamageReport obj) { self.baseDamageAOE.Value = Main.coolantDamage.Value; self.stackingDamageAOE.Value = Main.coolantDamageStack.Value; self.aoeRangeBase.Value = Main.coolantRadius.Value; self.aoeRangeStacking.Value = Main.coolantRadiusStack.Value; orig(self, obj); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_CryoAoe(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_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_010d: 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_0082: 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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0200: 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_0175: 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_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_049b: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; int loc1 = -1; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(CryoCanister), "aoeRangeStacking") })) { if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc1) })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)((CryoCanister self, DamageReport obj) => Main.GetStackedStats(Main.coolantRadius.Value, Main.coolantRadiusStack.Value, obj.attackerBody.inventory.GetItemCountEffective(((ItemBase)self).ItemDef)))); val.Emit(OpCodes.Stloc, loc1); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } int loc2 = -1; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(CryoCanister), "stackingDamageAOE") })) { if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc2) })) { val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)((CryoCanister self, DamageReport obj) => Main.GetStackedStats(Main.coolantDamage.Value, Main.coolantDamageStack.Value, obj.attackerBody.inventory.GetItemCountEffective(((ItemBase)self).ItemDef)))); val.Emit(OpCodes.Stloc, loc2); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 4 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } int loc3 = -1; int num4 = default(int); ILLabel val9 = default(ILLabel); int num3 = default(int); int num2 = default(int); MethodReference val8 = default(MethodReference); if (val.TryGotoNext(val3, new Func[8] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num4), (Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val9), (Instruction x) => ILPatternMatchingExt.MatchNop(x), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, ref val8), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc3) })) { FieldReference val7 = default(FieldReference); FieldReference val6 = default(FieldReference); MethodReference val5 = default(MethodReference); MethodReference val4 = default(MethodReference); int num = default(int); if (val.TryGotoNext(val3, new Func[10] { (Instruction x) => ILPatternMatchingExt.MatchNop(x), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, loc3), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, ref val7), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, ref val6), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCall(x, ref val5), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, ref val4), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(CharacterBody), "AddTimedBuffAuthority"), (Instruction x) => ILPatternMatchingExt.MatchNop(x) })) { Instruction next = val.Next; val.Index -= 10; val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldloc, loc3); val.EmitDelegate>((Action)delegate(CryoCanister self, DamageReport obj, HurtBox hurtBox) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) float stackedStats = Main.GetStackedStats(Main.coolantDuration.Value, Main.coolantDurationStack.Value, obj.attackerBody.inventory.GetItemCountEffective(((ItemBase)self).ItemDef)); for (int i = 0; i < Main.coolantFrostCount.Value; i++) { hurtBox.healthComponent.body.AddTimedBuffAuthority(Buffs.Frost.buffIndex, stackedStats); } }); val.Emit(OpCodes.Br, next); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 6 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 5 failed!"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void DreadExecuteThreshold(CharacterBody victimBody, ref float executeFraction) { if (victimBody.HasBuff(DreadBuff) && executeFraction <= Main.burdenThreshold.Value) { executeFraction = Main.burdenThreshold.Value; } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnBurdenDeath(Action orig, ExeBlade self, DamageReport dmgReport) { //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //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) //IL_0161: 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_017c: Expected O, but got Unknown //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: 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_01bf: 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_027d: 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_028f: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)dmgReport.attacker) || !Object.op_Implicit((Object)(object)dmgReport.attackerBody) || !Object.op_Implicit((Object)(object)dmgReport.victim) || !Object.op_Implicit((Object)(object)dmgReport.victimBody) || !dmgReport.victimIsElite) { return; } ExeToken component = ((Component)dmgReport.victimBody).GetComponent(); if (Object.op_Implicit((Object)(object)component) || !NetworkServer.active) { return; } CharacterBody victimBody = dmgReport.victimBody; ((Component)dmgReport.victimBody).gameObject.AddComponent(); CharacterBody attackerBody = dmgReport.attackerBody; if (!Object.op_Implicit((Object)(object)attackerBody.inventory)) { return; } int itemCountEffective = attackerBody.inventory.GetItemCountEffective(((ItemBase)ItemBase.instance).ItemDef); if (itemCountEffective <= 0) { return; } float stackedStats = Main.GetStackedStats(Main.burdenRadius.Value, Main.burdenRadiusStack.Value, itemCountEffective); float stackedStats2 = Main.GetStackedStats(Main.burdenDamage.Value, Main.burdenDamageStack.Value, itemCountEffective); SphereSearch exeBladeSphereSearch = ExeBlade.exeBladeSphereSearch; List exeBladeHurtBoxBuffer = ExeBlade.exeBladeHurtBoxBuffer; EffectData val = new EffectData { origin = dmgReport.attacker.transform.position }; val.SetNetworkedObjectReference(dmgReport.attacker); EffectManager.SpawnEffect(AssetReferences.executeEffectPrefab, val, true); EffectData val2 = new EffectData { origin = dmgReport.attacker.transform.position, scale = stackedStats / 10f }; val2.SetNetworkedObjectReference(dmgReport.attacker); EffectManager.SpawnEffect(burdenWavePrefab, val2, true); Vector3 position = (exeBladeSphereSearch.origin = dmgReport.attacker.transform.position); exeBladeSphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; exeBladeSphereSearch.radius = stackedStats; exeBladeSphereSearch.RefreshCandidates(); exeBladeSphereSearch.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(dmgReport.attackerBody.teamComponent.teamIndex)); exeBladeSphereSearch.FilterCandidatesByDistinctHurtBoxEntities(); exeBladeSphereSearch.OrderCandidatesByDistance(); exeBladeSphereSearch.GetHurtBoxes(exeBladeHurtBoxBuffer); exeBladeSphereSearch.ClearCandidates(); float damage = dmgReport.attackerBody.damage * stackedStats2; for (int i = 0; i < exeBladeHurtBoxBuffer.Count; i++) { HurtBox val3 = exeBladeHurtBoxBuffer[i]; if (Object.op_Implicit((Object)(object)val3.healthComponent) && Object.op_Implicit((Object)(object)val3.healthComponent.body) && (Object)(object)val3.healthComponent != (Object)(object)dmgReport.attackerBody.healthComponent) { DamageInfo val4 = new DamageInfo { attacker = ((Component)attackerBody).gameObject, crit = attackerBody.RollCrit(), damage = damage, position = position, procCoefficient = self.bladeCoefficient.Value, damageType = DamageTypeCombo.op_Implicit((DamageType)131072), damageColorIndex = (DamageColorIndex)9 }; val3.healthComponent.TakeDamage(val4); val3.healthComponent.body.AddTimedBuff(DreadBuff, Main.burdenDuration.Value); val4 = null; } val3 = null; } exeBladeHurtBoxBuffer.Clear(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnBurdenPrepExecution(Action, int, DamageReport> orig, SwordToken self, SphereSearch search, List buffer, int count, DamageReport dmgRep) { ((MonoBehaviour)self).StartCoroutine(NewBurdenExecution(search, buffer, count, ((Component)self).gameObject, dmgRep)); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static IEnumerator NewBurdenExecution(SphereSearch exeBladeSphereSearch, List exeBladeHurtBoxBuffer, int bladeCount, GameObject bladeObject, DamageReport dmgReport) { _ = dmgReport.damageInfo.damage; _ = dmgReport.victim.combinedHealth; HealthComponent bladeObjHPC = bladeObject.GetComponent(); CharacterBody attackerBody = dmgReport.attackerBody; float effectiveRadius = Main.GetStackedStats(Main.burdenRadius.Value, Main.burdenRadiusStack.Value, bladeCount); float AOEDamageMult = Main.GetStackedStats(Main.burdenDamage.Value, Main.burdenDamageStack.Value, bladeCount); if (Object.op_Implicit((Object)(object)attackerBody)) { EffectData effectDataPulse = new EffectData { origin = bladeObject.transform.position }; effectDataPulse.SetNetworkedObjectReference(bladeObject); EffectManager.SpawnEffect(AssetReferences.executeEffectPrefab, effectDataPulse, true); Vector3 corePosition = (exeBladeSphereSearch.origin = bladeObject.transform.position); exeBladeSphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask; exeBladeSphereSearch.radius = effectiveRadius; exeBladeSphereSearch.RefreshCandidates(); exeBladeSphereSearch.FilterCandidatesByHurtBoxTeam(TeamMask.GetUnprotectedTeams(dmgReport.attackerBody.teamComponent.teamIndex)); exeBladeSphereSearch.FilterCandidatesByDistinctHurtBoxEntities(); exeBladeSphereSearch.OrderCandidatesByDistance(); exeBladeSphereSearch.GetHurtBoxes(exeBladeHurtBoxBuffer); exeBladeSphereSearch.ClearCandidates(); float AOEDamage = dmgReport.attackerBody.damage * AOEDamageMult; for (int i = 0; i < exeBladeHurtBoxBuffer.Count; i++) { HurtBox hurtBox = exeBladeHurtBoxBuffer[i]; if (Object.op_Implicit((Object)(object)hurtBox.healthComponent) && Object.op_Implicit((Object)(object)hurtBox.healthComponent.body) && (Object)(object)hurtBox.healthComponent != (Object)(object)bladeObjHPC) { DamageInfo damageInfoAOE = new DamageInfo { attacker = ((Component)attackerBody).gameObject, crit = attackerBody.RollCrit(), damage = AOEDamage, position = corePosition, procCoefficient = ItemBase.instance.bladeCoefficient.Value, damageType = DamageTypeCombo.op_Implicit((DamageType)131072), damageColorIndex = (DamageColorIndex)9 }; hurtBox.healthComponent.TakeDamage(damageInfoAOE); hurtBox.healthComponent.body.AddTimedBuff(DreadBuff, Main.burdenDuration.Value); } } exeBladeHurtBoxBuffer.Clear(); } yield return (object)new WaitForSeconds(0.5f); EffectData effectData = new EffectData { origin = bladeObject.transform.position }; effectData.SetNetworkedObjectReference(bladeObject); EffectManager.SpawnEffect(AssetReferences.permanentDebuffEffectPrefab, effectData, true); Object.Destroy((Object)(object)bladeObject); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_VVProcessHit(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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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_0107: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_aimOrigin"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 13), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 10) })) { val.Index -= 1; Instruction next = val.Next; val.Emit(OpCodes.Ldloc_0); val.Emit(OpCodes.Ldloc_1); val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldloc, 10); val.Emit(OpCodes.Ldarg_2); val.EmitDelegate>((Action)delegate(CharacterBody characterBody, CharacterBody victimBody, DamageInfo damageInfo, Inventory inventory, GameObject victim) { //IL_0004: 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_019f: 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_00b8: 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_00d9: Unknown result type (might be due to invalid IL or missing references) bool flag = true; if (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)128)) != 0 || characterBody.HasBuff(Buffs.AffixRed)) { flag = false; } if (flag) { int itemCountEffective = inventory.GetItemCountEffective(Items.StrengthenBurn); if (itemCountEffective > 0 && !characterBody.HasBuff(Main.IgnitionCooldown)) { float value = Main.ignitionBurnDamage.Value; InflictDotInfo val4 = default(InflictDotInfo); val4.attackerObject = damageInfo.attacker; val4.victimObject = victim; val4.totalDamage = damageInfo.damage * value; val4.damageMultiplier = 1f; val4.dotIndex = (DotIndex)1; val4.maxStacksFromAttacker = uint.MaxValue; val4.hitHurtBox = damageInfo.inflictedHurtbox; InflictDotInfo val5 = val4; if (Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent())) { ProjectileController component = damageInfo.attacker.GetComponent(); CharacterMaster component2 = component.owner.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2)) { StrengthenBurnUtils.CheckDotForUpgrade(component2.inventory, ref val5); } } else { StrengthenBurnUtils.CheckDotForUpgrade(inventory, ref val5); } DotController.InflictDot(ref val5); float num = Main.ignitionCooldownTime.Value / Main.ConvertReductionIntoStackingDivision(Main.ignitionCooldownStack.Value, itemCountEffective); characterBody.AddTimedBuff(Main.IgnitionCooldown, num); } } if (Object.op_Implicit((Object)(object)victimBody) && Main.coreEnable.Value) { ItemDef itemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("VV_ITEM_CORE_ITEM")); if ((Object)(object)itemDef != (Object)null && inventory.GetItemCountEffective(itemDef) > 0 && Object.op_Implicit((Object)(object)characterBody.master) && Util.CheckRoll(Main.coreSlowChance.Value * damageInfo.procCoefficient, characterBody.master)) { float stackedStats = Main.GetStackedStats(Main.coreDuration.Value, Main.coreDurationStack.Value, inventory.GetItemCountEffective(itemDef)); victimBody.AddTimedBuff(Buffs.ClayGoo, stackedStats); } } }); val.Emit(OpCodes.Br, next); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } } public static class BubbetsItemsChanges { [CompilerGenerated] private static class <>O { public static Action <0>__OnBoneDamageDealt; public static Action, BoneVisor, DamageReport> <1>__OnBoneKill; public static Action, BonePickup, Collider> <2>__OnBonePickup; public static hook_GenerateDistinctPickups <3>__OnGenerateDistinctPickups; } private static Hook boneKillHook; private static Hook bonePickupHook; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Initialize() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown Harmony val = new Harmony("com.Bloonjitsu7.BloonItemRebalance"); if (Main.boneVisorEnable.Value) { GlobalEventManager.onServerDamageDealt += OnBoneDamageDealt; MethodInfo methodInfo = AccessTools.Method(typeof(BoneVisor), "OnDeath", (Type[])null, (Type[])null); boneKillHook = new Hook((MethodBase)methodInfo, (Delegate)new Action, BoneVisor, DamageReport>(OnBoneKill)); MethodInfo methodInfo2 = AccessTools.Method(typeof(BonePickup), "OnTriggerStay", (Type[])null, (Type[])null); bonePickupHook = new Hook((MethodBase)methodInfo2, (Delegate)new Action, BonePickup, Collider>(OnBonePickup)); string stackDesc = Main.GetStackDesc(Main.boneProcStack.Value, "%"); string stackDesc2 = Main.GetStackDesc(Main.boneDurationStack.Value, "s"); string text = $"{Main.boneProcChance.Value}%{stackDesc} chance on hit to drop a bone shard that grants barrier regeneration for {Main.boneDuration.Value}s{stackDesc2}.\r\n\r\nBarrier regeneration grants 1% barrier per second, and prevents barrier decay."; LanguageAPI.Add("BUB_BONEVISOR_DESC", text); LanguageAPI.Add("BUB_BONEVISOR_DESC_SIMPLE", text); string text2 = $"Chance on hit to drop a bone shard that grants barrier regeneration."; LanguageAPI.Add("BUB_BONEVISOR_PICKUP", text2); } if (Main.seepingEnable.Value) { MethodInfo methodInfo3 = AccessTools.Method(typeof(RandomlyLunarUtils), "CheckForLunarReplacement", new Type[2] { typeof(UniquePickup), typeof(Xoroshiro128Plus) }, (Type[])null); MethodInfo methodInfo4 = typeof(RandomlyLunarUtils).GetMethods().First((MethodInfo x) => x.IsGenericMethodDefinition && x.Name == "CheckForLunarReplacementUniqueArray").MakeGenericMethod(typeof(IList)); val.Unpatch((MethodBase)methodInfo3, (HarmonyPatchType)1, "bubbet.bubbetsitems"); val.Unpatch((MethodBase)methodInfo4, (HarmonyPatchType)1, "bubbet.bubbetsitems"); object obj = <>O.<3>__OnGenerateDistinctPickups; if (obj == null) { hook_GenerateDistinctPickups val2 = OnGenerateDistinctPickups; <>O.<3>__OnGenerateDistinctPickups = val2; obj = (object)val2; } PickupDropTable.GenerateDistinctPickups += (hook_GenerateDistinctPickups)obj; string text3 = $"Item drops have a {Main.seepingChance.Value * 100f}% (+{Main.seepingChanceStack.Value * 100f}% per stack) chance to become a random Void item of an equivalent rarity. "; LanguageAPI.Add("BUB_SEEPINGOCEAN_DESC", text3); LanguageAPI.Add("BUB_SEEPINGOCEAN_DESC_SIMPLE", text3); string text4 = $"Items have a small chance to transform into a random Void item instead."; LanguageAPI.Add("BUB_SEEPINGOCEAN_PICKUP", text4); } MethodInfo methodInfo5 = AccessTools.Method(typeof(HealthComponent), "GetBarrierDecayRate", (Type[])null, (Type[])null); val.PatchAll(); IEnumerable allPatchedMethods = Harmony.GetAllPatchedMethods(); foreach (MethodBase item in allPatchedMethods) { Log.Message(item); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static UniquePickup OnGeneratePickup(orig_GeneratePickup orig, PickupDropTable self, Xoroshiro128Plus rng) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_0022: Unknown result type (might be due to invalid IL or missing references) UniquePickup val = orig.Invoke(self, rng); if (self.canDropBeReplaced) { val = CheckForVoidReplacement(val, rng); } return val; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnGenerateDistinctPickups(orig_GenerateDistinctPickups orig, PickupDropTable self, List dest, int desiredCount, Xoroshiro128Plus rng, bool allowLoop) { orig.Invoke(self, dest, desiredCount, rng, allowLoop); if (self.canDropBeReplaced) { CheckForVoidReplacementUniqueArray(dest, rng); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static UniquePickup CheckForVoidReplacement(UniquePickup uniquePickup, Xoroshiro128Plus rng) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: 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_0029: 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_0098: 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_00a5: Invalid comparison between Unknown and I4 //IL_005d: 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_022b: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Invalid comparison between Unknown and I4 //IL_0226: 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_01ec: 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_0218: 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) PickupDef pickupDef = PickupCatalog.GetPickupDef(uniquePickup.pickupIndex); SeepingOcean val = default(SeepingOcean); if (!SharedBase.TryGetInstance(ref val)) { Log.Message("OOPS!!!"); return uniquePickup; } int itemCountGlobal = Util.GetItemCountGlobal(((ItemBase)val).ItemDef.itemIndex, false, false); if (itemCountGlobal <= 0) { Log.Message("OOPS!!! 2!!!!"); return uniquePickup; } Log.Message("HI!!!"); List list = null; List list2 = null; List list3 = null; List list4 = null; float stackedStats = Main.GetStackedStats(Main.seepingChance.Value, Main.seepingChanceStack.Value, itemCountGlobal); _ = pickupDef.equipmentIndex; if ((int)pickupDef.equipmentIndex == -1) { _ = pickupDef.itemIndex; if ((int)pickupDef.itemIndex != -1 && rng.nextNormalizedFloat < stackedStats) { List list5 = null; bool flag = false; if (CanReplaceTier1(pickupDef)) { if (list == null) { list = new List(Run.instance.availableVoidTier1DropList); Util.ShuffleList(list, rng); } flag = true; list5 = list; } else if (CanReplaceTier2(pickupDef)) { if (list2 == null) { list2 = new List(Run.instance.availableVoidTier2DropList); Util.ShuffleList(list2, rng); } flag = true; list5 = list2; } else if (CanReplaceTier3(pickupDef)) { if (list2 == null) { list2 = new List(Run.instance.availableVoidTier3DropList); Util.ShuffleList(list3, rng); } flag = true; list5 = list3; } else if (CanReplaceBossTier(pickupDef)) { if (list4 == null) { list2 = new List(Run.instance.availableVoidBossDropList); Util.ShuffleList(list4, rng); } flag = true; list5 = list4; } if (list5 != null && list5.Count > 0 && flag) { PickupIndex val2 = list5[0]; Log.Message("HI!!!!" + ((object)(PickupIndex)(ref val2)).ToString()); uniquePickup = ((UniquePickup)(ref uniquePickup)).WithPickupIndex(list5[0 % list5.Count]); } } } return uniquePickup; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void CheckForVoidReplacementUniqueArray(TList pickups, Xoroshiro128Plus rng) where TList : IList { //IL_001d: 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_007b: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Invalid comparison between Unknown and I4 //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Invalid comparison between Unknown and I4 //IL_01dd: 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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) SeepingOcean val = default(SeepingOcean); if (!SharedBase.TryGetInstance(ref val)) { return; } int itemCountGlobal = Util.GetItemCountGlobal(((ItemBase)val).ItemDef.itemIndex, false, false); if (itemCountGlobal <= 0) { return; } List list = null; List list2 = null; List list3 = null; List list4 = null; float stackedStats = Main.GetStackedStats(Main.seepingChance.Value, Main.seepingChanceStack.Value, itemCountGlobal); for (int i = 0; i < pickups.Count; i++) { PickupDef pickupDef = PickupCatalog.GetPickupDef(pickups[i].pickupIndex); _ = pickupDef.equipmentIndex; if ((int)pickupDef.equipmentIndex != -1) { continue; } _ = pickupDef.itemIndex; if ((int)pickupDef.itemIndex == -1 || !(rng.nextNormalizedFloat < stackedStats)) { continue; } List list5 = null; bool flag = false; if (CanReplaceTier1(pickupDef)) { if (list == null) { list = new List(Run.instance.availableVoidTier1DropList); Util.ShuffleList(list, rng); } flag = true; list5 = list; } else if (CanReplaceTier2(pickupDef)) { if (list2 == null) { list2 = new List(Run.instance.availableVoidTier2DropList); Util.ShuffleList(list2, rng); } flag = true; list5 = list2; } else if (CanReplaceTier3(pickupDef)) { if (list2 == null) { list2 = new List(Run.instance.availableVoidTier3DropList); Util.ShuffleList(list3, rng); } flag = true; list5 = list3; } else if (CanReplaceBossTier(pickupDef)) { if (list4 == null) { list2 = new List(Run.instance.availableVoidBossDropList); Util.ShuffleList(list4, rng); } flag = true; list5 = list4; } if (list5 != null && list5.Count > 0 && flag) { int index = i; UniquePickup val2 = pickups[i]; pickups[index] = ((UniquePickup)(ref val2)).WithPickupIndex(list5[i % list5.Count]); } } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool CanReplaceTier1(PickupDef pickupDef) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 return pickupDef != null && (int)pickupDef.itemTier == 0; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool CanReplaceTier2(PickupDef pickupDef) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 return pickupDef != null && (int)pickupDef.itemTier == 1; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool CanReplaceTier3(PickupDef pickupDef) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 return pickupDef != null && (int)pickupDef.itemTier == 2; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool CanReplaceBossTier(PickupDef pickupDef) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 return pickupDef != null && (int)pickupDef.itemTier == 4; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool CanReplaceLunarTier(PickupDef pickupDef) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 return pickupDef != null && (int)pickupDef.itemTier == 3; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnBoneDamageDealt(DamageReport report) { //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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) BoneVisor val = default(BoneVisor); if (!NetworkServer.active || !SharedBase.TryGetInstance(ref val)) { return; } int num = ((Object.op_Implicit((Object)(object)report.attackerBody) && Object.op_Implicit((Object)(object)report.attackerBody.inventory)) ? report.attackerBody.inventory.GetItemCountEffective(((ItemBase)val).ItemDef) : 0); if (num <= 0 || !Util.CheckRoll(Main.boneProcChance.Value + Util.ConvertAmplificationPercentageIntoReductionPercentage(Main.boneProcStack.Value * (float)num - 1f) * report.damageInfo.procCoefficient, report.attackerMaster)) { return; } float num2 = Random.Range(-2f, 2f); float num3 = Random.Range(-2f, 2f); Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(num2, 0f, num3); GameObject val3 = Object.Instantiate(BoneVisor.ShardPrefab, ((Component)report.victim).transform.position + val2, Random.rotation); if (Object.op_Implicit((Object)(object)val3)) { TeamFilter component = val3.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.teamIndex = report.attackerTeamIndex; } NetworkServer.Spawn(val3); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnBonePickup(Action orig, BonePickup self, Collider other) { //IL_0016: 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) BoneVisor val = default(BoneVisor); if (!NetworkServer.active || !self.alive || TeamComponent.GetObjectTeam(((Component)other).gameObject) != self.teamFilter.teamIndex || !SharedBase.TryGetInstance(ref val)) { return; } CharacterBody component = ((Component)other).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } Inventory inventory = component.inventory; if (Object.op_Implicit((Object)(object)inventory)) { int num = inventory.GetItemCountEffective(((ItemBase)val).ItemDef); if (num <= 0) { num = 1; } self.alive = false; component.OnPickup((PickupClass)1); component.healthComponent.AddBarrier(5f); float stackedStats = Main.GetStackedStats(Main.boneDuration.Value, Main.boneDurationStack.Value, num); component.AddTimedBuff(BoneVisor.BuffDef, stackedStats, 5); Object.Destroy((Object)(object)self.baseObject); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnBoneKill(Action orig, BoneVisor self, DamageReport report) { } } public static class StarstormChanges { [CompilerGenerated] private static class <>O { public static Manipulator <0>__IL_JetBoots; public static Manipulator <1>__IL_LampFire; public static Action, CoffeeBag, CharacterBody, StatHookEventArgs> <2>__OnCoffeeStat; public static Action, CoffeeBag, DamageReport> <3>__OnCoffeeDamage; public static Action, CoffeeBeanPickup, Collider> <4>__OnCoffeePickup; public static Action <5>__OnCoffeeDeath; public static hook_InflictDot_refInflictDotInfo <6>__OnInflictRad; } private static ILHook jetBootsHook; private static ILHook lampFireHook; private static Hook coffeeStatHook; private static Hook coffeeDamageHook; private static Hook coffeePickupHook; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Initialize() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //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_0046: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //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_02c0: Expected O, but got Unknown if (Main.jetBootsEnable.Value) { MethodInfo methodInfo = AccessTools.Method(typeof(JetBoots), "DoJumpAuthority", (Type[])null, (Type[])null); object obj = <>O.<0>__IL_JetBoots; if (obj == null) { Manipulator val = IL_JetBoots; <>O.<0>__IL_JetBoots = val; obj = (object)val; } jetBootsHook = new ILHook((MethodBase)methodInfo, (Manipulator)obj); string text = $"Gain +1 extra jump that ignites enemies for {Main.jetBootsDamage.Value * 100f}% (+{Main.jetBootsDamageStack.Value * 100f}% per stack) base damage in a 7.5m (+5m per stack) radius. Recharges 5s after landing."; LanguageAPI.Add("SS2_ITEM_JETBOOTS_DESC", text); } if (Main.lampEnable.Value) { MethodInfo methodInfo2 = AccessTools.Method(typeof(LampBehavior), "IncrementFire", (Type[])null, (Type[])null); object obj2 = <>O.<1>__IL_LampFire; if (obj2 == null) { Manipulator val2 = IL_LampFire; <>O.<1>__IL_LampFire = val2; obj2 = (object)val2; } lampFireHook = new ILHook((MethodBase)methodInfo2, (Manipulator)obj2); string text2 = $"Every 5 primary skill uses, fire a haunted projectile for {Main.lampDamage.Value * 100f}% (+{Main.lampDamageStack.Value * 100f}% per stack) base damage."; LanguageAPI.Add("SS2_ITEM_SHACKLEDLAMP_DESC", text2); } if (Main.coffeeEnable.Value) { MethodInfo methodInfo3 = AccessTools.Method(typeof(CoffeeBag), "CalculateStatsCoffeeBag", (Type[])null, (Type[])null); coffeeStatHook = new Hook((MethodBase)methodInfo3, (Delegate)new Action, CoffeeBag, CharacterBody, StatHookEventArgs>(OnCoffeeStat)); MethodInfo methodInfo4 = AccessTools.Method(typeof(CoffeeBag), "OnServerDamageDealt", (Type[])null, (Type[])null); coffeeDamageHook = new Hook((MethodBase)methodInfo4, (Delegate)new Action, CoffeeBag, DamageReport>(OnCoffeeDamage)); MethodInfo methodInfo5 = AccessTools.Method(typeof(CoffeeBeanPickup), "OnTriggerStay", (Type[])null, (Type[])null); coffeePickupHook = new Hook((MethodBase)methodInfo5, (Delegate)new Action, CoffeeBeanPickup, Collider>(OnCoffeePickup)); GlobalEventManager.onCharacterDeathGlobal += OnCoffeeDeath; string text3 = string.Format("Killing an enemy randomly spills up to 4 coffee beans that increase attack speed by {1}% (+{1}% per stack) and movement speed by {2}% (+{2}% per stack) for {0}s each.", Main.coffeeBuffDuration.Value, Main.coffeeAttackSpeed.Value * 100f, Main.coffeeMoveSpeed.Value * 100f); LanguageAPI.Add("SS2_ITEM_COFFEEBAG_DESC", text3); string text4 = $"Drop coffee beans on kill that boost your attack and move speed."; LanguageAPI.Add("SS2_ITEM_COFFEEBAG_PICKUP", text4); } if (Main.horseshoeEnable.Value && Main.HasMeltdown) { object obj3 = <>O.<6>__OnInflictRad; if (obj3 == null) { hook_InflictDot_refInflictDotInfo val3 = HorseshoeChanges.OnInflictRad; <>O.<6>__OnInflictRad = val3; obj3 = (object)val3; } DotController.InflictDot_refInflictDotInfo += (hook_InflictDot_refInflictDotInfo)obj3; string text5 = string.Format("Increases movement speed and jump height by {0}% (+{0}% per stack). Your irradiated effects deal {1}% (+{1}% per stack) more damage.", UraniumHoreshoe.movespeed * 100f, Main.uraniumHorseshoeDamage.Value * 100f); LanguageAPI.Add("SS2_ITEM_URANIUMHORSESHOE_DESC", text5); string text6 = "Increases move speed and jump height. Boosts radiation damage."; LanguageAPI.Add("SS2_ITEM_URANIUMHORSESHOE_PICKUP", text6); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_JetBoots(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_000b: 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_0045: 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) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)0; MoveType val3 = (MoveType)2; if (val.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(JetBoots), "baseDamage") })) { val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldloc_3); val.EmitDelegate>((Func)((int num) => Main.GetStackedStats(Main.jetBootsDamage.Value, Main.jetBootsDamageStack.Value, num))); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void IL_LampFire(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_0034: 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_0073: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); MoveType val2 = (MoveType)2; if (val.TryGotoNext(val2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 0) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(LampBehavior self) { float stackedStats = Main.GetStackedStats(Main.lampDamage.Value, Main.lampDamageStack.Value, ((BaseItemBodyBehavior)self).stack); return stackedStats * ((BaseItemBodyBehavior)self).body.damage; }); val.Emit(OpCodes.Stloc_0); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnCoffeeDeath(DamageReport report) { //IL_003f: 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_0097: 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_00b2: 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_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_00ed: 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_0102: Unknown result type (might be due to invalid IL or missing references) CharacterBody attackerBody = report.attackerBody; if (!Object.op_Implicit((Object)(object)attackerBody)) { return; } Inventory inventory = attackerBody.inventory; if (!Object.op_Implicit((Object)(object)inventory)) { return; } int itemCountEffective = inventory.GetItemCountEffective(Items.CoffeeBag.itemIndex); if (itemCountEffective > 0) { int num = Random.RandomRangeInt(0, 5); Vector3[] array = (Vector3[])(object)new Vector3[4] { new Vector3(1.5f, 0f, -1.5f), new Vector3(-1.5f, 0f, 1.5f), new Vector3(1.5f, 0f, 1.5f), new Vector3(-1.5f, 0f, -1.5f) }; Util.ShuffleArray(array); for (int i = 0; i < num; i++) { CoffeeBeanPooler.SpawnBean(report.damageInfo.position + array[i], itemCountEffective, report.attackerTeamIndex); } } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnCoffeePickup(Action orig, CoffeeBeanPickup self, Collider other) { //IL_001e: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && self.initialized && self.alive && TeamComponent.GetObjectTeam(((Component)other).gameObject) == self.teamFilter.teamIndex) { CharacterBody component = ((Component)other).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.AddTimedBuff(Buffs.BuffCoffeeBag, Main.coffeeBuffDuration.Value); EffectManager.SimpleEffect(self.pickupEffect, ((Component)self).transform.position, Quaternion.identity, true); self.alive = false; component.OnPickup((PickupClass)1); self.pooler.Cleanup(); } } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnCoffeeDamage(Action orig, CoffeeBag self, DamageReport report) { } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void OnCoffeeStat(Action orig, CoffeeBag self, CharacterBody sender, StatHookEventArgs args) { int val = (Object.op_Implicit((Object)(object)sender.inventory) ? sender.inventory.GetItemCountEffective(((SS2Item)self).ItemDef) : 0); val = Math.Max(val, 1); int buffCount = sender.GetBuffCount(Buffs.BuffCoffeeBag); if (buffCount > 0) { args.attackSpeedMultAdd += Main.coffeeAttackSpeed.Value * (float)buffCount * (float)val; args.moveSpeedMultAdd += Main.coffeeMoveSpeed.Value * (float)buffCount * (float)val; } } } [HarmonyPatch(typeof(HealthComponent), "GetBarrierDecayRate")] internal class BubbetBarrierPatch { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] [HarmonyPostfix] public static void Postfix(HealthComponent __instance, ref float __result) { CharacterBody body = __instance.body; if (!Object.op_Implicit((Object)(object)body)) { return; } Inventory inventory = body.inventory; if (!Object.op_Implicit((Object)(object)inventory)) { return; } if (inventory.GetItemCountEffective(Items.ImmuneToDebuff) > 0 && body.HasBuff(Buffs.Immune) && body.HasBuff(Buffs.ImmuneToDebuffCooldown) && Main.raincoatEnable.Value) { __result = 0f; } BoneVisor val = default(BoneVisor); if (!Main.HasBubbetsItems || !Main.boneVisorEnable.Value || !SharedBase.TryGetInstance(ref val)) { return; } int itemCountEffective = inventory.GetItemCountEffective(((ItemBase)val).ItemDef); if (itemCountEffective <= 0) { itemCountEffective = 1; } int buffCount = body.GetBuffCount(BoneVisor.BuffDef); if (buffCount > 0) { float num = buffCount; float maxBarrier = body.maxBarrier; if (__instance.barrier >= maxBarrier) { __result = __instance.barrier - maxBarrier; } else { __result = -0.01f * maxBarrier * num; } } } } [HarmonyPatch(typeof(RandomlyLunarUtils), "CheckForLunarReplacement", new Type[] { typeof(UniquePickup), typeof(Xoroshiro128Plus) })] internal class SeepingOceanPatch { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] [HarmonyPrefix] public static bool Prefix(UniquePickup uniquePickup, Xoroshiro128Plus rng, ref UniquePickup __result) { //IL_0027: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Invalid comparison between Unknown and I4 //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_00bd: Invalid comparison between Unknown and I4 //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) if (!Main.HasBubbetsItems || !Main.seepingEnable.Value) { return true; } PickupDef pickupDef = PickupCatalog.GetPickupDef(uniquePickup.pickupIndex); SeepingOcean val = default(SeepingOcean); if (!SharedBase.TryGetInstance(ref val)) { return true; } int itemCountGlobal = Util.GetItemCountGlobal(((ItemBase)val).ItemDef.itemIndex, false, false); if (itemCountGlobal <= 0) { return true; } List list = null; List list2 = null; List list3 = null; List list4 = null; bool flag = false; float stackedStats = Main.GetStackedStats(Main.seepingChance.Value, Main.seepingChanceStack.Value, itemCountGlobal); _ = pickupDef.equipmentIndex; if ((int)pickupDef.equipmentIndex == -1) { _ = pickupDef.itemIndex; if ((int)pickupDef.itemIndex != -1 && rng.nextNormalizedFloat < stackedStats) { List list5 = null; if (BubbetsItemsChanges.CanReplaceTier1(pickupDef)) { if (list == null) { list = new List(Run.instance.availableVoidTier1DropList); Util.ShuffleList(list, rng); } flag = true; list5 = list; } else if (BubbetsItemsChanges.CanReplaceTier2(pickupDef)) { if (list2 == null) { list2 = new List(Run.instance.availableVoidTier2DropList); Util.ShuffleList(list2, rng); } flag = true; list5 = list2; } else if (BubbetsItemsChanges.CanReplaceTier3(pickupDef)) { if (list2 == null) { list2 = new List(Run.instance.availableVoidTier3DropList); Util.ShuffleList(list3, rng); } flag = true; list5 = list3; } else if (BubbetsItemsChanges.CanReplaceBossTier(pickupDef)) { if (list4 == null) { list2 = new List(Run.instance.availableVoidBossDropList); Util.ShuffleList(list4, rng); } flag = true; list5 = list4; } if (list5 != null && list5.Count > 0 && flag) { __result = ((UniquePickup)(ref uniquePickup)).WithPickupIndex(list5[0 % list5.Count]); } } } return !flag; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }