Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of BloonItemRebalance v1.0.2
BaseItems.dll
Decompiled 21 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BaseItems.Changes; using BaseItems.Modules; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using BubbetsItems; using BubbetsItems.Items.BarrierItems; using EntityStates.Drone.DroneJunk; using FlatItemBuff.Items; using HG; using HarmonyLib; 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 On.RoR2; using On.RoR2.Items; using R2API; using RoR2; using RoR2.Audio; using RoR2.ContentManagement; using RoR2.Items; using RoR2.Projectile; 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; [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("RigsArsenal")] [assembly: IgnoresAccessChecksTo("SeekingTheVoid")] [assembly: IgnoresAccessChecksTo("Starstorm2")] [assembly: IgnoresAccessChecksTo("TooManyItems")] [assembly: IgnoresAccessChecksTo("VanillaVoid")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BaseItems")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("BaseItems")] [assembly: AssemblyTitle("BaseItems")] [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 BaseItems { [BepInPlugin("com.Bloonjitsu7.BloonItemRebalance", "BloonItemRebalance", "1.0.2")] [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.0.2"; public void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); new ContentPacks().Initialize(); ItemChanges itemChanges = new ItemChanges(); itemChanges.SetupConfig(((BaseUnityPlugin)this).Config); itemChanges.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 BaseItems.Modules { public static class Buffs { internal static List<BuffDef> buffDefs = new List<BuffDef>(); 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<BuffDef>(); ((Object)val).name = buffName; val.buffColor = buffColor; val.canStack = canStack; val.isDebuff = isDebuff; val.eliteDef = null; val.iconSprite = buffIcon; val.isCooldown = isCooldown; val.isHidden = isHidden; buffDefs.Add(val); return val; } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public string identifier => "com.Bloonjitsu7.BloonModpackBaseMod"; public void Initialize() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown 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.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 BaseItems.Changes { public class MeatBuffVFX : MonoBehaviour { public TemporaryVisualEffect effect; } public class ItemChanges { private float faradaySpeedCap = 1f; private float faradayJumpCap = 1f; private float faradayChargeMult = 0.25f; private float faradayChargeStack = 0.5f; private float faradayDamageMin = 2f; private float faradayDamageMax = 8f; private float faradayDamageStack = 4f; private float milkHealth = 20f; private static float loafRegenChance = 20f; private float uraniumHorseshoeDamage = 0.05f; private float jetBootsDamage = 4.5f; private float jetBootsDamageStack = 1.5f; private float batteryDamage = 2f; private float batteryDamageStack = 0.8f; private float batteryDamageChance = 20f; private float coreDuration = 2f; private float coreDurationStack = 0.5f; private float coreSlowChance = 6f; private float crucifixBurnPercent = 0.2f; private float crucifixBurnStack = 0.1f; private float crucifixResist = 0.95f; private float crucifixHealReduction = 0.5f; private Hook toxicHook; private Hook coffeeDamageHook; private Hook coffeeStatHook; private Hook coffeePickupHook; private Hook boneKillHook; private Hook bonePickupHook; private ILHook lampFireHook; private ILHook jetBootsHook; private Hook echoStatHook; private Hook milkHook; private Hook loafHook; private Hook crucifixHook; private ILHook batteryHook; public static BuffDef MeatBuff = Buffs.MeatRegenBoost; public static BuffDef IgnitionCooldown; public static BuffDef ScytheCooldown; public static GameObject MeatBuffVFX = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/JunkContent/RegenBoostEffect.prefab").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 HasSpikestrip => Chainloader.PluginInfos.ContainsKey("com.groovesalad.GrooveSaladSpikestripContent"); public static ConfigEntry<bool> stunGrenadeEnable { get; set; } public static ConfigEntry<float> stunGrenadeDamage { get; set; } public static ConfigEntry<bool> apRoundsEnable { get; set; } public static ConfigEntry<float> apRoundsEliteDamage { get; set; } public static ConfigEntry<bool> lanternEnable { get; set; } public static ConfigEntry<float> lanternSpeed { get; set; } public static ConfigEntry<float> lanternSpeedStack { get; set; } public static ConfigEntry<float> lanternRegen { get; set; } public static ConfigEntry<float> lanternRegenStack { get; set; } public static ConfigEntry<int> lanternAlly { get; set; } public static ConfigEntry<int> lanternAllyStack { get; set; } public static ConfigEntry<float> lanternRadius { get; set; } public static ConfigEntry<float> lanternRadiusStack { get; set; } public static ConfigEntry<bool> warpedEchoEnable { get; set; } public static ConfigEntry<bool> bungusEnable { get; set; } public static ConfigEntry<float> bungusTimer { get; set; } public static ConfigEntry<bool> meatEnable { get; set; } public static ConfigEntry<float> meatHealth { get; set; } public static ConfigEntry<float> meatDuration { get; set; } public static ConfigEntry<float> meatDurationStack { get; set; } public static ConfigEntry<float> meatRegen { get; set; } public static ConfigEntry<int> meatMax { get; set; } public static ConfigEntry<int> meatMaxStack { get; set; } public static ConfigEntry<bool> chronicEnable { get; set; } public static ConfigEntry<float> multikillDuration { get; set; } public static ConfigEntry<float> multikillDamage { get; set; } public static ConfigEntry<float> multikillDamageStack { get; set; } public static ConfigEntry<bool> milkEnable { get; set; } public static ConfigEntry<bool> loafEnable { get; set; } public static ConfigEntry<bool> coffeeEnable { get; set; } public static ConfigEntry<float> coffeeBuffDuration { get; set; } public static ConfigEntry<bool> horseshoeEnable { get; set; } public static ConfigEntry<bool> boneVisorEnable { get; set; } public static ConfigEntry<float> boneDuration { get; set; } public static ConfigEntry<float> boneDurationStack { get; set; } public static ConfigEntry<float> boneProcChance { get; set; } public static ConfigEntry<float> boneProcStack { get; set; } public static ConfigEntry<bool> chanceDollEnable { get; set; } public static ConfigEntry<bool> ignitionEnable { get; set; } public static ConfigEntry<int> ignitionBurnBonus { get; set; } public static ConfigEntry<float> ignitionCooldownTime { get; set; } public static ConfigEntry<float> ignitionCooldownStack { get; set; } public static ConfigEntry<float> ignitionBurnDamage { get; set; } public static ConfigEntry<bool> scytheEnable { get; set; } public static ConfigEntry<float> scytheHeal { get; set; } public static ConfigEntry<float> scytheHealStack { get; set; } public static ConfigEntry<float> scytheCooldownTime { get; set; } public static ConfigEntry<bool> infusionEnable { get; set; } public static ConfigEntry<float> infusionSpeed { get; set; } public static ConfigEntry<bool> jetBootsEnable { get; set; } public static ConfigEntry<bool> batteryEnable { get; set; } public static ConfigEntry<bool> duplicatorEnable { get; set; } public static ConfigEntry<float> duplicatorDropChance { get; set; } public static ConfigEntry<int> duplicatorDuration { get; set; } public static ConfigEntry<bool> vultureEnable { get; set; } public static ConfigEntry<float> vultureEliteDamage { get; set; } public static ConfigEntry<float> vultureDropChance { get; set; } public static ConfigEntry<float> vultureHealPercent { get; set; } public static ConfigEntry<bool> raincoatEnable { get; set; } public static ConfigEntry<float> raincoatCooldownTime { get; set; } public static ConfigEntry<float> raincoatCooldownStack { get; set; } public static ConfigEntry<float> raincoatBarrier { get; set; } public static ConfigEntry<float> raincoatDuration { get; set; } public static ConfigEntry<bool> lampEnable { get; set; } public static ConfigEntry<bool> toxicoEnable { get; set; } public static ConfigEntry<bool> coreEnable { get; set; } public static ConfigEntry<bool> solitudeEnable { get; set; } public static ConfigEntry<bool> crucifixEnable { get; set; } public void SetupConfig(ConfigFile cfg) { stunGrenadeEnable = cfg.Bind<bool>("Stun Grenade Buff", "Enable Changes", true, "Enables the changes to stun grenade."); stunGrenadeDamage = cfg.Bind<float>("Stun Grenade Buff", "Damage", 2f, "The damage coefficient of the proc. (1 = 100% damage)"); apRoundsEnable = cfg.Bind<bool>("AP Rounds Buff", "Enable Changes", true, "Enables the changes to armor piercing rounds."); apRoundsEliteDamage = cfg.Bind<float>("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<bool>("Bolstering Lantern Rework", "Enable Changes", true, "Enables the changes to bolstering lantern."); lanternSpeed = cfg.Bind<float>("Bolstering Lantern Rework", "Attack Speed", 0.07f, "Base attack speed bonus granted per buff stack. (1 = 100% attack speed)"); lanternSpeedStack = cfg.Bind<float>("Bolstering Lantern Rework", "Attack Speed Stacking", 0f, "Attack speed bonus granted for each additional stack of the item, per buff stack."); lanternRegen = cfg.Bind<float>("Bolstering Lantern Rework", "Health Regen", 0.7f, "Base health regen bonus granted per buff stack. (1 = 1 hp/s)"); lanternRegenStack = cfg.Bind<float>("Bolstering Lantern Rework", "Health Regen Stacking", 0f, "Health regen bonus granted for each additional stack of the item, per buff stack."); lanternAlly = cfg.Bind<int>("Bolstering Lantern Rework", "Max Buffs", 4, "Maximum number of buffs you can have with one stack of the item."); lanternAllyStack = cfg.Bind<int>("Bolstering Lantern Rework", "Max Buff Stacking", 2, "Maximum number of buffs you can have with each additional stack of the item."); lanternRadius = cfg.Bind<float>("Bolstering Lantern Rework", "Radius", 40f, "Base area of effect size of the item. (1 = 0.5m)"); lanternRadiusStack = cfg.Bind<float>("Bolstering Lantern Rework", "Radius Stacking", 4f, "The area of effect size for each additional stack of the item."); warpedEchoEnable = cfg.Bind<bool>("Warped Echo Rework", "Enable Changes", true, "Enables the changes to stun grenade. Requires FlatItemBuff."); bungusEnable = cfg.Bind<bool>("Bungus Buff", "Enable Changes", true, "Enables the changes to bustling fungus."); bungusTimer = cfg.Bind<float>("Bungus Buff", "Timer", 0.25f, "Amount of time (in seconds) while standing still that it takes for bustling fungus to activate."); meatEnable = cfg.Bind<bool>("Bison Steak Buff", "Enable Changes", true, "Enables the changes to bison steak."); meatHealth = cfg.Bind<float>("Bison Steak Buff", "Health Increase", 30f, "Amount of HP gained for each stack of the item."); meatRegen = cfg.Bind<float>("Bison Steak Buff", "Health Regen", 1.5f, "Amount of health regeneration gained per buff stack. (1 = 1 hp/s)"); meatDuration = cfg.Bind<float>("Bison Steak Buff", "Regen Duration", 3f, "Base duration (in seconds) of the regeneration buff on kill."); meatDurationStack = cfg.Bind<float>("Bison Steak Buff", "Regen Duration Stacking", 1f, "Duration of the regeneration buff on kill for each additional stack of the item."); meatMax = cfg.Bind<int>("Bison Steak Buff", "Max Buffs", 2, "Maximum number of buffs you can have with one stack of the item."); meatMaxStack = cfg.Bind<int>("Bison Steak Buff", "Max Buff Stacking", 1, "Maximum number of buffs you can have with each additional stack of the item."); chronicEnable = cfg.Bind<bool>("Chronic Expansion Rebalance", "Enable Changes", true, "Enables the changes to chronic expansion."); multikillDamage = cfg.Bind<float>("Chronic Expansion Rebalance", "Damage", 0.03f, "Base damage bonus granted per buff stack. (1 = 100% bonus damage)"); multikillDamageStack = cfg.Bind<float>("Chronic Expansion Rebalance", "Damage Stacking", 0.005f, "Damage bonus granted for each additional stack of the item, per buff stack."); multikillDuration = cfg.Bind<float>("Chronic Expansion Rebalance", "Buff Duration", 9f, "Duration of the buff (in seconds)."); milkEnable = cfg.Bind<bool>("Milk Carton Buff", "Enable Changes", true, "Enables the changes to milk carton. Requires TooManyItems."); loafEnable = cfg.Bind<bool>("Loaf of Bread Buff", "Enable Changes", true, "Enables the changes to loaf of bread. Requires TooManyItems."); coffeeEnable = cfg.Bind<bool>("Coffee Bag Rework", "Enable Changes", true, "Enables the changes to coffee bag. Requires Starstorm2."); coffeeBuffDuration = cfg.Bind<float>("Coffee Bag Rework", "Duration", 5f, "Base duration (in seconds) of the coffee buff."); horseshoeEnable = cfg.Bind<bool>("Uranium Horseshoe Buff", "Enable Changes", true, "Enables the changes to uranium horseshoe. Requires Starstorm2 and Meltdown."); boneVisorEnable = cfg.Bind<bool>("Bone Visor Rework", "Enable Changes", true, "Enables the changes to bone visor. Requires BubbetsItems."); boneDuration = cfg.Bind<float>("Bone Visor Rework", "Duration", 5f, "Base duration (in seconds) of the barrier regeneration buff."); boneDurationStack = cfg.Bind<float>("Bone Visor Rework", "Duration Stacking", 1f, "Duration of the barrier regeneration buff for each additional stack of the item."); boneProcChance = cfg.Bind<float>("Bone Visor Rework", "Proc Chance", 6f, "Base percent chance to drop a bone shard on hit. (100 = 100% chance)"); boneProcStack = cfg.Bind<float>("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<bool>("Chance Doll Rework", "Enable Changes", true, "Enables the changes to chance doll."); ignitionEnable = cfg.Bind<bool>("Ignition Tank Rework", "Enable Changes", true, "Enables the changes to ignition tank."); ignitionBurnBonus = cfg.Bind<int>("Ignition Tank Rework", "Ignite Multiplier", 2, "Ignite damage multiplier for each stack of the item. (1 = 100% more damage)"); ignitionCooldownTime = cfg.Bind<float>("Ignition Tank Rework", "Cooldown", 8f, "Cooldown time (in seconds) for the ignite on hit effect."); ignitionCooldownStack = cfg.Bind<float>("Ignition Tank Rework", "Cooldown Stacking", 0.15f, "Cooldown reduction for each additional stack of the item. (1 = 100% reduction)"); ignitionBurnDamage = cfg.Bind<float>("Ignition Tank Rework", "Ignite Damage", 0.5f, "Total damage of the ignite on hit effect. (1 = 100% damage)"); scytheEnable = cfg.Bind<bool>("Harvesters Scythe Rework", "Enable Changes", true, "Enables the changes to harvesters scythe."); scytheHeal = cfg.Bind<float>("Harvesters Scythe Rework", "Heal Amount", 20f, "Base healing recieved from the item."); scytheHealStack = cfg.Bind<float>("Harvesters Scythe Rework", "Heal Amount Stacking", 20f, "Healing recieved from each additional stack of the item."); scytheCooldownTime = cfg.Bind<float>("Harvesters Scythe Rework", "Cooldown", 2f, "Cooldown time (in seconds) between uses of the item."); infusionEnable = cfg.Bind<bool>("Infusion Buff", "Enable Changes", true, "Enables the changes to infusion."); infusionSpeed = cfg.Bind<float>("Infusion Buff", "Speed Boost", 0.1f, "Maximum speed boost to recieve from each stack of the item. (1 = 100% bonus speed)"); jetBootsEnable = cfg.Bind<bool>("Prototype Jet Boots Rebalance", "Enable Changes", true, "Enables the changes to prototype jet boots. Requires Starstorm2."); batteryEnable = cfg.Bind<bool>("Volatile Thorium Battery Rebalance", "Enable Changes", true, "Enables the changes to volatile thorium battery. Requires Meltdown."); duplicatorEnable = cfg.Bind<bool>("Substandard Duplicator Rework", "Enable Changes", true, "Enables the changes to substandard duplicator."); duplicatorDropChance = cfg.Bind<float>("Substandard Duplicator Rework", "Proc Chance", 8f, "Percent chance to drop a temporary item on kill. (100 = 100% chance)"); duplicatorDuration = cfg.Bind<int>("Substandard Duplicator Rework", "Duration", 30, "Duration increase (in seconds) for temporary items per stack of the item."); vultureEnable = cfg.Bind<bool>("Wake Of Vultures Rework", "Enable Changes", true, "Enables the changes to wake of vultures."); vultureEliteDamage = cfg.Bind<float>("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<float>("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<float>("Wake Of Vultures Rework", "Heal Percent", 0.2f, "Max HP fraction to heal upon killing an elite. (1 = 100% heal)"); raincoatEnable = cfg.Bind<bool>("Bens Raincoat Rework", "Enable Changes", true, "Enables the changes to bens raincoat."); raincoatCooldownTime = cfg.Bind<float>("Bens Raincoat Rework", "Cooldown", 15f, "Cooldown time (in seconds) between uses of the item."); raincoatCooldownStack = cfg.Bind<float>("Bens Raincoat Rework", "Cooldown Stacking", 0.2f, "Cooldown reduction for each additional stack of the item. (1 = 100% reduction)"); raincoatBarrier = cfg.Bind<float>("Bens Raincoat Rework", "Barrier Amount", 0.25f, "Barrier amount to recieve on activation, proportional to max HP. (1 = 100% barrier)"); raincoatDuration = cfg.Bind<float>("Bens Raincoat Rework", "Invulnerability Time", 3f, "Duration of the invulnerability (in seconds) to recieve on activation."); lampEnable = cfg.Bind<bool>("Shackled Lamp Buff", "Enable Changes", true, "Enables the changes to shackled lamp. Requires Starstorm2."); toxicoEnable = cfg.Bind<bool>("Toxicodendron Brine Buff", "Enable Changes", true, "Enables the changes to toxicodendronbrine. Requires SeekingTheVoid."); coreEnable = cfg.Bind<bool>("Corrosive Core Buff", "Enable Changes", true, "Enables the changes to corrosive core. Requires VanillaVoid."); solitudeEnable = cfg.Bind<bool>("Longstanding Solitude Rebalance", "Enable Changes", true, "Enables the changes to longstanding solitude."); crucifixEnable = cfg.Bind<bool>("Crucifix Rework", "Enable Changes", true, "Enables the changes to crucifix. Requires TooManyItems."); } public void Initialize() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Expected O, but got Unknown //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Expected O, but got Unknown //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Expected O, but got Unknown //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Expected O, but got Unknown //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Expected O, but got Unknown //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Expected O, but got Unknown //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05a7: Expected O, but got Unknown //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_05b9: Expected O, but got Unknown //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Expected O, but got Unknown //IL_0734: Unknown result type (might be due to invalid IL or missing references) //IL_073e: Expected O, but got Unknown //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_080b: Expected O, but got Unknown //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_081d: Expected O, but got Unknown //IL_0825: Unknown result type (might be due to invalid IL or missing references) //IL_082f: Expected O, but got Unknown //IL_0837: Unknown result type (might be due to invalid IL or missing references) //IL_0841: Expected O, but got Unknown //IL_08e2: Unknown result type (might be due to invalid IL or missing references) //IL_08ec: Expected O, but got Unknown //IL_0a92: Unknown result type (might be due to invalid IL or missing references) //IL_0a9c: Expected O, but got Unknown //IL_0a97: Unknown result type (might be due to invalid IL or missing references) //IL_0aa1: Expected O, but got Unknown //IL_0ce8: Unknown result type (might be due to invalid IL or missing references) //IL_0cf2: Expected O, but got Unknown //IL_0d19: Unknown result type (might be due to invalid IL or missing references) //IL_0d23: Expected O, but got Unknown //IL_0af3: Unknown result type (might be due to invalid IL or missing references) //IL_0afd: Expected O, but got Unknown //IL_0af8: Unknown result type (might be due to invalid IL or missing references) //IL_0b02: Expected O, but got Unknown //IL_0e0b: Unknown result type (might be due to invalid IL or missing references) //IL_0e15: Expected O, but got Unknown //IL_0b5c: Unknown result type (might be due to invalid IL or missing references) //IL_0b66: Expected O, but got Unknown //IL_0b8d: Unknown result type (might be due to invalid IL or missing references) //IL_0b97: Expected O, but got Unknown //IL_0bbe: Unknown result type (might be due to invalid IL or missing references) //IL_0bc8: Expected O, but got Unknown //IL_0e97: Unknown result type (might be due to invalid IL or missing references) //IL_0ea1: Expected O, but got Unknown //IL_0ee8: Unknown result type (might be due to invalid IL or missing references) //IL_0ef2: Expected O, but got Unknown //IL_0f1a: Unknown result type (might be due to invalid IL or missing references) //IL_0f24: Expected O, but got Unknown //IL_10bb: Unknown result type (might be due to invalid IL or missing references) //IL_10c5: Expected O, but got Unknown //IL_10c0: Unknown result type (might be due to invalid IL or missing references) //IL_10ca: Expected O, but got Unknown //IL_0fe9: Unknown result type (might be due to invalid IL or missing references) //IL_0ff3: Expected O, but got Unknown //IL_0ffb: Unknown result type (might be due to invalid IL or missing references) //IL_1005: Expected O, but got Unknown //IL_0f92: Unknown result type (might be due to invalid IL or missing references) //IL_0f9c: Expected O, but got Unknown CreateBuffs(); Harmony val = new Harmony("com.Bloonjitsu7.BloonItemRebalance"); val.PatchAll(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnRecalcStats); HealthComponent.TakeDamage += new hook_TakeDamage(OnTakeDamage); DotController.InflictDot_refInflictDotInfo += new hook_InflictDot_refInflictDotInfo(OnInflictDot); GlobalEventManager.ProcessHitEnemy += new Manipulator(IL_ProcessHit); HealthComponent.TakeDamageProcess += new Manipulator(IL_EliteDamage); if (solitudeEnable.Value) { TeamManager.GetLongstandingSolitudeItemCostScale += new hook_GetLongstandingSolitudeItemCostScale(OnItemCostScale); ExperienceManager.AwardExperience += new hook_AwardExperience(OnAwardExperience); string text = $"<style=cIsUtility>On level up</style> gain <style=cIsDamage>1</style> <style=cStack>(+1 per stack)</style> <style=cIsDamage>free unlock</style> for the next purchase, but all gold is converted to experience. All gold prices are <style=cIsHealth>increased by 25%</style> <style=cStack>(+25% per stack)</style>, and all experience gained is <style=cIsHealth>reduced by 25%</style> <style=cStack>(+25% per stack)</style>."; 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 <style=cIsDamage>attack speed</style> by <style=cIsDamage>{lanternSpeed.Value * 100f}%</style>{stackDesc} and <style=cIsHealing>health regeneration</style> by <style=cIsHealing>{lanternRegen.Value} hp/s</style>{stackDesc2} for each enemy and ally within <style=cIsUtility>{lanternRadius.Value / 2f}m</style>{stackDesc3}, up to <style=cIsUtility>{lanternAlly.Value}</style>{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 <style=cIsDamage>attack speed</style> by <style=cIsDamage>{0}%</style>{1} for each enemy and ally within <style=cIsUtility>{4}m</style>{5}, up to <style=cIsUtility>{6}</style>{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 = $"<style=cIsUtility>5%</style> <style=cStack>(+5% per stack)</style> chance on hit to deal <style=cIsDamage>{stunGrenadeDamage.Value * 100f}% damage</style> and <style=cIsUtility>stun</style> enemies for <style=cIsUtility>2s</style>."; 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 <style=cIsHealing>{bungusTimer.Value}s</style>, create a zone that <style=cIsHealing>heals</style> for <style=cIsHealing>4.5%</style> <style=cStack>(+2.25% per stack)</style> of your <style=cIsHealing>health</style> every second to all allies within <style=cIsHealing>3m</style> <style=cStack>(+1.5m per stack)</style>."; 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 = $"Whenever a Shrine of Chance succeeds, gain a <style=cIsUtility>50%</style> chance to increase the <style=cIsDamage>rarity</style> of the item. Whenever a Shrine of Chance fails, gain a <style=cIsUtility>10%</style> <style=cStack>(+10% per stack)</style> chance for free <style=cIsUtility>White Scrap</style> to drop."; 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); DuplicatorBehavior.CalculateNewItemDecayDuration += new Manipulator(IL_Duplicator); string text11 = string.Format("<style=cIsDamage>{0}% chance</style> on kill for a random <style=cIsUtility>temporary item</style> to drop. You get an <style=cIsHealing>extra copy</style> of any <style=cIsTemporary>temporary items</style> you pick up, and your <style=cIsUtility>temporary items</style> last an additional <style=cIsDamage>{1}s</style> <style=cStack>(+{1}s per stack)</style>.", 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 <style=cIsDamage>{0}%</style> <style=cStack>(+{0}% per stack)</style> more damage to <style=cIsDamage>elites</style> above <style=cIsDamage>50% health</style>. Upon killing an <style=cIsDamage>elite monster</style>, heal for <style=cIsHealing>{1}% of your total health</style> and gain a <style=cIsUtility>{2}%</style> <style=cStack>(+{2}% per stack)</style> chance for the monster's <style=cIsDamage>elite aspect</style> 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 <style=cIsDamage>20%</style> <style=cStack>(+20% per stack)</style> more damage to bosses, and <style=cIsDamage>{0}%</style> <style=cStack>(+{0}% per stack)</style> 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 <style=cIsDamage>{multikillDamage.Value * 100f}%</style>{stackDesc5} for <style=cIsUtility>{multikillDuration.Value}s</style>, up to <style=cIsUtility>10</style> <style=cStack>(+5 per stack)</style> 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 <style=cIsHealing>max health</style> by <style=cIsHealing>{0}</style> <style=cStack>(+{0} per stack)</style>. Increases <style=cIsHealing>health regeneration</style> by <style=cIsHealing>{1} hp/s</style> for <style=cIsUtility>{2}s</style>{3} after killing an enemy, up to a maximum of <style=cIsHealing>{4} hp/s</style>{5}.", meatHealth, meatRegen, meatDuration, 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 (ignitionEnable.Value) { StrengthenBurnUtils.CheckDotForUpgrade += new Manipulator(IL_StrengthenBurn); string stackDesc8 = GetStackDesc(0f - ignitionCooldownStack.Value, "%"); string text20 = string.Format("Hitting an enemy ignites them for <style=cIsDamage>{0}% TOTAL damage</style>, once every <style=cIsUtility>{1}s</style>{2}. Ignite effects deal <style=cIsDamage>{3}%</style> <style=cStack>(+{3}% per stack)</style> more damage over time.", ignitionBurnDamage.Value * 100f, ignitionCooldownTime.Value, stackDesc8, ignitionBurnBonus.Value * 100); LanguageAPI.Add("ITEM_STRENGTHENBURN_DESC", text20); string text21 = $"Ignite enemies on hit. Your ignite effects deal {ignitionBurnBonus.Value * 100}% more damage."; LanguageAPI.Add("ITEM_STRENGTHENBURN_PICKUP", text21); } if (raincoatEnable.Value) { ImmuneToDebuffBehavior.TryApplyOverride += new hook_TryApplyOverride(OnRaincoatOverride); ImmuneToDebuffBehavior.FixedUpdate += new hook_FixedUpdate(OnRaincoatUpdate); ImmuneToDebuffBehavior.OverrideDebuff_BuffDef_CharacterBody += new hook_OverrideDebuff_BuffDef_CharacterBody(OnRaincoatDebuff); ImmuneToDebuffBehavior.OverrideDot += new hook_OverrideDot(OnRaincoatDoT); string text22 = $"After getting inflicted with a <style=cIsDamage>debuff</style>, gain <style=cIsHealing>{raincoatBarrier.Value * 100f}% barrier</style> and <style=cIsUtility>{raincoatDuration.Value}s</style> of <style=cIsUtility>invulnerability</style>. Repeatable once every <style=cIsUtility>{raincoatCooldownTime.Value}s</style> <style=cStack>(-{raincoatCooldownStack.Value * 100f}% per stack)</style>."; LanguageAPI.Add("ITEM_IMMUNETODEBUFF_DESC", text22); string text23 = "Whenever you get debuffed, gain temporary barrier and invulnerability."; LanguageAPI.Add("ITEM_IMMUNETODEBUFF_PICKUP", text23); } if (scytheEnable.Value) { GlobalEventManager.OnCrit += new Manipulator(IL_OnCritHeal); string text24 = $"Gain <style=cIsDamage>+5% crit chance</style>. <style=cIsDamage>Critical strikes</style> <style=cIsHealing>heal</style> you for <style=cIsHealing>{scytheHeal.Value}</style> <style=cStack>(+{scytheHealStack.Value} per stack)</style> <style=cIsHealing>health</style>, with a <style=cIsUtility>{scytheCooldownTime.Value}s</style> cooldown between uses."; LanguageAPI.Add("ITEM_HEALONCRIT_DESC", text24); } if (infusionEnable.Value) { string text25 = string.Format("Killing an enemy permanently increases your <style=cIsHealing>health</style> by <style=cIsHealing>1</style> <style=cStack>(+1 per stack)</style> and <style=cIsUtility>movement speed</style> by <style=cIsUtility>{0}%</style> <style=cStack>(+{0}% per stack)</style>, up to a <style=cIsHealing>maximum</style> of <style=cIsHealing>100 <style=cStack>(+100 per stack)</style> health</style> and <style=cIsUtility>{1}% <style=cStack>(+{1}% per stack)</style> movement speed</style>.", 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 (!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 (HasStarstorm) { if (jetBootsEnable.Value) { MethodInfo methodInfo = AccessTools.Method(typeof(JetBoots), "DoJumpAuthority", (Type[])null, (Type[])null); jetBootsHook = new ILHook((MethodBase)methodInfo, new Manipulator(IL_JetBoots)); string text27 = $"Gain <style=cIsUtility>+1 extra jump</style> that <style=cIsDamage>ignites</style> enemies for <style=cIsDamage>450%</style> <style=cStack>(+150% per stack)</style> base damage in a <style=cIsDamage>7.5m</style> <style=cStack>(+5m per stack)</style> radius. Recharges <style=cIsUtility>5s</style> after landing."; LanguageAPI.Add("SS2_ITEM_JETBOOTS_DESC", text27); } if (lampEnable.Value) { MethodInfo methodInfo2 = AccessTools.Method(typeof(LampBehavior), "IncrementFire", (Type[])null, (Type[])null); lampFireHook = new ILHook((MethodBase)methodInfo2, new Manipulator(IL_LampFire)); string text28 = $"Every <style=cIsDamage>5 primary skill uses</style>, fire a haunted projectile for <style=cIsDamage>300%</style> <style=cStack>(+300% per stack)</style> <style=cIsDamage>base damage</style>."; LanguageAPI.Add("SS2_ITEM_SHACKLEDLAMP_DESC", text28); } if (coffeeEnable.Value) { MethodInfo methodInfo3 = AccessTools.Method(typeof(CoffeeBag), "CalculateStatsCoffeeBag", (Type[])null, (Type[])null); coffeeStatHook = new Hook((MethodBase)methodInfo3, (Delegate)new Action<Action<CoffeeBag, CharacterBody, StatHookEventArgs>, CoffeeBag, CharacterBody, StatHookEventArgs>(OnCoffeeStat)); MethodInfo methodInfo4 = AccessTools.Method(typeof(CoffeeBag), "OnServerDamageDealt", (Type[])null, (Type[])null); coffeeDamageHook = new Hook((MethodBase)methodInfo4, (Delegate)new Action<Action<CoffeeBag, DamageReport>, CoffeeBag, DamageReport>(OnCoffeeDamage)); MethodInfo methodInfo5 = AccessTools.Method(typeof(CoffeeBeanPickup), "OnTriggerStay", (Type[])null, (Type[])null); coffeePickupHook = new Hook((MethodBase)methodInfo5, (Delegate)new Action<Action<CoffeeBeanPickup, Collider>, CoffeeBeanPickup, Collider>(OnCoffeePickup)); GlobalEventManager.onCharacterDeathGlobal += OnCoffeeDeath; string text29 = $"Killing an enemy randomly spills <style=cIsHealing>up to 4 coffee beans</style> that increase <style=cIsDamage>attack speed</style> by <style=cIsDamage>7.5%</style> <style=cStack>(+7.5% per stack)</style> and <style=cIsUtility>movement speed</style> by <style=cIsUtility>7%</style> <style=cStack>(+7% per stack)</style> for <style=cIsUtility>{coffeeBuffDuration.Value}s</style> each."; LanguageAPI.Add("SS2_ITEM_COFFEEBAG_DESC", text29); string text30 = $"Drop coffee beans on kill that boost your attack and move speed."; LanguageAPI.Add("SS2_ITEM_COFFEEBAG_PICKUP", text30); } if (horseshoeEnable.Value && HasMeltdown) { string text31 = string.Format("Increases <style=cIsUtility>movement speed</style> and <style=cIsUtility>jump height</style> by <style=cIsUtility>{0}%</style> <style=cStack>(+{0}% per stack)</style>. Your <color=#7fff00>irradiated</color> effects deal <style=cIsDamage>{1}%</style> <style=cStack>(+{1}% per stack)</style> more damage.", UraniumHoreshoe.movespeed * 100f, uraniumHorseshoeDamage * 100f); LanguageAPI.Add("SS2_ITEM_URANIUMHORSESHOE_DESC", text31); string text32 = "Increases move speed and jump height. Boosts radiation damage."; LanguageAPI.Add("SS2_ITEM_URANIUMHORSESHOE_PICKUP", text32); } } if (HasBubbetsItems && boneVisorEnable.Value) { GlobalEventManager.onServerDamageDealt += OnBoneDamageDealt; MethodInfo methodInfo6 = AccessTools.Method(typeof(BoneVisor), "OnDeath", (Type[])null, (Type[])null); boneKillHook = new Hook((MethodBase)methodInfo6, (Delegate)new Action<Action<BoneVisor, DamageReport>, BoneVisor, DamageReport>(OnBoneKill)); MethodInfo methodInfo7 = AccessTools.Method(typeof(BonePickup), "OnTriggerStay", (Type[])null, (Type[])null); bonePickupHook = new Hook((MethodBase)methodInfo7, (Delegate)new Action<Action<BonePickup, Collider>, BonePickup, Collider>(OnBonePickup)); string stackDesc9 = GetStackDesc(boneProcStack.Value * 100f, "%"); string stackDesc10 = GetStackDesc(boneDurationStack.Value, "s"); string text33 = $"<style=cIsUtility>{boneProcChance.Value}%</style>{stackDesc9} chance on hit to drop a <style=cIsDamage>bone shard</style> that grants <style=cIsHealing>barrier regeneration</style> for <style=cIsUtility>{boneDuration.Value}s</style>{stackDesc10}.\r\n\r\n<style=cIsHealing>Barrier regeneration</style> grants <style=cIsHealing>1% barrier</style> per second, and <style=cIsUtility>prevents barrier decay</style>."; LanguageAPI.Add("BUB_BONEVISOR_DESC", text33); string text34 = $"Chance on hit to drop a bone shard that grants barrier regeneration."; LanguageAPI.Add("BUB_BONEVISOR_PICKUP", text34); } if (HasFlatItemBuff && warpedEchoEnable.Value) { MethodInfo methodInfo8 = AccessTools.Method(typeof(WarpedEcho), "GetStatCoefficients", (Type[])null, (Type[])null); echoStatHook = new Hook((MethodBase)methodInfo8, (Delegate)new Action<Action<WarpedEcho, CharacterBody, StatHookEventArgs, Inventory>, WarpedEcho, CharacterBody, StatHookEventArgs, Inventory>(OnEchoStat)); string text35 = $"<style=cIsHealth>50%</style> of all damage you take is delayed by <style=cIsUtility>3s</style>. While delayed damage is processing, your <style=cIsUtility>skills</style> recharge <style=cIsUtility>10%</style> <style=cStack>(+10% per stack)</style> faster, and you have <style=cIsUtility>15%</style> <style=cStack>(+15% per stack)</style> increased <style=cIsDamage>attack speed</style> and <style=cIsUtility>movement speed</style>."; LanguageAPI.Add("ITEM_DELAYEDDAMAGE_DESC", text35); string text36 = $"Delay half of incoming damage. While damage is being delayed, increase attack speed, move speed, and cooldown rates."; LanguageAPI.Add("ITEM_DELAYEDDAMAGE_PICKUP", text36); } if (HasSeekingTheVoid && toxicoEnable.Value) { MethodInfo methodInfo9 = AccessTools.Method(typeof(ToxicodendronBrineBehavior), "TriggerPoisonSpread", (Type[])null, (Type[])null); toxicHook = new Hook((MethodBase)methodInfo9, (Delegate)new Action<Action<ToxicodendronBrineBehavior, CharacterBody, DamageReport>, ToxicodendronBrineBehavior, CharacterBody, DamageReport>(OnToxicKill)); string text37 = $"Hits that deal <style=cIsUtility>more than 400% damage</style> also inflict <style=cIsDamage>poison</style> for <style=cIsUtility>10s</style>. Whenever you kill a <style=cIsDamage>poisoned enemy</style>, the poison spreads on up to <style=cIsUtility>1</style> <style=cStack>(+1 per stack)</style> enemy within <style=cIsUtility>25m</style> <style=cStack>(+5m per stack)</style>, and reduces all your skill cooldowns by <style=cIsUtility>20%</style> <style=cStack>(+10% per stack)</style>. <style=cIsVoid>Corrupts all Noxious Thorns</style>."; LanguageAPI.Add("SEEKINTHEVOID_TOXICODENDRONBRINE_DESC", text37); } if (HasTooManyItems) { if (milkEnable.Value) { RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnMilkStats); MethodInfo methodInfo10 = AccessTools.Method(typeof(MilkCartonOrb), "OnArrival", (Type[])null, (Type[])null); milkHook = new Hook((MethodBase)methodInfo10, (Delegate)new Action<Action<MilkCartonOrb>, MilkCartonOrb>(OnMilkArrival)); string pickupToken = "Gain 20 max health. Retaliate damage from elites."; string descriptionToken = "Increases <style=cIsHealing>max health</style> by <style=cIsHealing>20</style> <style=cStack>(+20 per stack)</style>. Retaliate <style=cIsDamage>200%</style> <style=cStack>(+200% per stack)</style> of the damage taken from <style=cIsDamage>elite enemies</style>."; MilkCarton.itemDef.pickupToken = pickupToken; MilkCarton.itemDef.descriptionToken = descriptionToken; } if (loafEnable.Value) { MethodInfo methodInfo11 = AccessTools.Method(typeof(CharacterMasterNotificationQueue), "PushItemTransformNotification", (Type[])null, (Type[])null); loafHook = new Hook((MethodBase)methodInfo11, (Delegate)new Action<Action<CharacterMaster, ItemIndex, ItemIndex, TransformationType>, CharacterMaster, ItemIndex, ItemIndex, TransformationType>(OnLoafTransform)); string descriptionToken2 = "Gain <style=cIsDamage>1 <style=cStack>(+1 per stack)</style> gold</style> on-kill. After <style=cIsUtility>25 kills</style>, scrap a stack of this item and gain an extra <style=cHumanObjective>25 gold</style>, with a <style=cIsUtility>20% chance</style> to regain a stack of this item. <style=cIsDamage>Gold amount scales over time</style>."; BreadLoaf.itemDef.descriptionToken = descriptionToken2; } if (crucifixEnable.Value) { Crucifix.percentDamageReduction = crucifixResist; Crucifix.percentMaxHealthBurnAmount = crucifixBurnPercent; Crucifix.percentMaxHealthBurnAmountReduction = crucifixBurnStack; HealthComponent.Heal += new hook_Heal(OnCrucifixHeal); DotController.AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1 += new Manipulator(IL_DotBypassArmor); string descriptionToken3 = "Reduce damage taken by <style=cIsHealing>95%</style>, but taking damage <style=cDeath>burns you</style> for <style=cIsHealth>20% <style=cStack>(-10% per stack)</style> max health</style>. While burning, <style=cDeath>all healing recieved is reduced by 50%</style> <style=cStack>(+50% per stack)</style>."; Crucifix.itemDef.descriptionToken = descriptionToken3; } } if (HasVanillaVoid && coreEnable.Value) { string text38 = $"<style=cIsUtility>6%</style> chance on hit to apply <style=cIsDamage>slowing tar</style> for <style=cIsUtility>2s</style> <style=cStack>(+0.5s per stack)</style>. <style=cIsUtility>Slow</style> effects also <style=cIsDamage>drown</style> enemies, dealing <style=cIsDamage>30%</style> <style=cStack>(+20% per stack)</style> base damage per <style=cIsUtility>10% slow</style>. <style=cIsVoid>Corrupts all Ignition Tanks</style>."; LanguageAPI.AddOverlay("VV_ITEM_CORE_ITEM_DESCRIPTION", text38); string text39 = $"Slowed enemies take damage over time. Chance to apply slowing tar on hit. <style=cIsVoid>Corrupts all Ignition Tanks</style>."; LanguageAPI.AddOverlay("VV_ITEM_CORE_ITEM_PICKUP", text39); } if (HasMeltdown && batteryEnable.Value) { MethodInfo methodInfo12 = AccessTools.Method(typeof(VolatileThoriumBattery), "GlobalEventManager_onServerDamageDealt", (Type[])null, (Type[])null); batteryHook = new ILHook((MethodBase)methodInfo12, new Manipulator(IL_ThoriumBattery)); string stackDesc11 = GetStackDesc(batteryDamageStack * 100f, "%"); string text40 = $"Gain <style=cIsDamage>5%</style> chance on hit to <color=#7fff00>Irradiate</color> enemies. <color=#7fff00>Irradiated</color> enemies have a <style=cIsDamage>{batteryDamageChance}%</style> chance per tick to deal <style=cIsDamage>{batteryDamage * 100f}%</style>{stackDesc11} damage in a <style=cIsDamage>12m</style> <style=cStack>(+4m per stack)</style> radius, applying <color=#7fff00>Irradiated</style>."; LanguageAPI.Add("ITEM_MELTDOWN_VOLATILETHORIUMBATTERY_NEW_DESCRIPTION", text40); ((ItemBase)Meltdown.items.volatileThoriumBattery).itemDef.descriptionToken = "ITEM_MELTDOWN_VOLATILETHORIUMBATTERY_NEW_DESCRIPTION"; } } 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) MeatBuff = Buffs.AddNewBuff("BloonMeatBuff", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Croco/texBuffRegenBoostIcon.tif").WaitForCompletion(), Color.green, canStack: true, isDebuff: false, isCooldown: false, isHidden: false); IgnitionCooldown = Buffs.AddNewBuff("BloonIgnitionCooldown", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/DLC1/StrengthenBurn/texBuffStrongerBurnIcon.tif").WaitForCompletion(), Color.grey, canStack: false, isDebuff: true, isCooldown: true, isHidden: false); ScytheCooldown = Buffs.AddNewBuff("BloonScytheCooldown", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Croco/texBuffRegenBoostIcon.tif").WaitForCompletion(), Color.grey, canStack: false, isDebuff: true, isCooldown: true, isHidden: false); } private string GetStackDesc(float num, string type) { if (num > 0f) { return $" <style=cStack>(+{num}{type} per stack)</style>"; } return ""; } private float GetStackedStats(float baseStat, float stackStat, int itemCount) { return baseStat - stackStat + stackStat * (float)itemCount; } private int GetStackedStatsInt(int baseStat, int stackStat, int itemCount) { return baseStat - stackStat + stackStat * itemCount; } private 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.AttackSpeedPerNearbyAllyOrEnemy); int buffCount = sender.GetBuffCount(Buffs.AttackSpeedPerNearbyAllyOrEnemyBuff); if (itemCountEffective2 > 0 && buffCount > 0 && lanternEnable.Value) { float num3 = (float)buffCount * GetStackedStats(lanternRegen.Value, lanternRegenStack.Value, itemCountEffective2); args.baseRegenAdd += num3; } int infusionBonus = (int)sender.inventory.infusionBonus; if (infusionBonus > 0 && infusionEnable.Value) { float num4 = (float)infusionBonus * (infusionSpeed.Value / 100f); args.moveSpeedMultAdd += num4; } } } private void OnTakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo info) { orig.Invoke(self, info); } private void OnInflictDot(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) && HasStarstorm && HasMeltdown && horseshoeEnable.Value) { CharacterBody component = inflictDotInfo.attackerObject.GetComponent<CharacterBody>(); 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 * uraniumHorseshoeDamage; } } orig.Invoke(ref inflictDotInfo); } 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_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_0080: 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_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) //IL_00e2: 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_0149: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; MoveType val4 = (MoveType)2; if (val2.TryGotoNext(val4, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterMaster>(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<Inventory, CharacterBody, ProcChainMask>>((Action<Inventory, CharacterBody, ProcChainMask>)delegate(Inventory inventory, CharacterBody body, ProcChainMask procChainMask) { //IL_00a6: 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); ILCursor val5 = val; Func<Instruction, bool>[] array = new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 4f) }; if (val5.TryGotoNext(val3, array)) { val.Next.Operand = 0f; ILCursor val6 = val; if (val6.TryGotoNext(val3, 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_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_0080: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; MoveType val4 = (MoveType)2; if (val2.TryGotoNext(val4, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterBody>(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<CharacterBody, CharacterBody, DamageInfo, Inventory, GameObject>>((Action<CharacterBody, CharacterBody, DamageInfo, Inventory, GameObject>)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_01a7: 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 val5 = default(InflictDotInfo); val5.attackerObject = damageInfo.attacker; val5.victimObject = victim; val5.totalDamage = damageInfo.damage * value; val5.damageMultiplier = 1f; val5.dotIndex = (DotIndex)1; val5.maxStacksFromAttacker = uint.MaxValue; val5.hitHurtBox = damageInfo.inflictedHurtbox; InflictDotInfo val6 = val5; if (Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<OilController>())) { ProjectileController component = damageInfo.attacker.GetComponent<ProjectileController>(); CharacterMaster component2 = component.owner.GetComponent<CharacterMaster>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2)) { StrengthenBurnUtils.CheckDotForUpgrade(component2.inventory, ref val6); } } else { StrengthenBurnUtils.CheckDotForUpgrade(inventory, ref val6); } DotController.InflictDot(ref val6); float num = ignitionCooldownTime.Value / ConvertReductionIntoStackingDivision(ignitionCooldownStack.Value, itemCountEffective); characterBody.AddTimedBuff(IgnitionCooldown, num); } } if (HasVanillaVoid && Object.op_Implicit((Object)(object)victimBody) && 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(coreSlowChance * damageInfo.procCoefficient, characterBody.master)) { float stackedStats = GetStackedStats(coreDuration, coreDurationStack, inventory.GetItemCountEffective(itemDef)); victimBody.AddTimedBuff(Buffs.ClayGoo, stackedStats); } } }); val.Emit(OpCodes.Br, next); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public 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_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_0060: 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_0078: 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_00ea: 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) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; MoveType val4 = (MoveType)2; if (val2.TryGotoNext(val4, new Func<Instruction, bool>[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<VolatileThoriumBattery, VolatileThoriumBatteryController, float>>((Func<VolatileThoriumBattery, VolatileThoriumBatteryController, float>)delegate(VolatileThoriumBattery self, VolatileThoriumBatteryController controller) { int stacks = controller.stacks; float num = GetStackedStats(batteryDamage, batteryDamageStack, stacks); if (HasStarstorm && Object.op_Implicit((Object)(object)controller.attackerBody.inventory) && horseshoeEnable.Value) { ItemDef uraniumHorseshoe = Items.UraniumHorseshoe; int itemCountEffective = controller.attackerBody.inventory.GetItemCountEffective(uraniumHorseshoe); num *= 1f + (float)itemCountEffective * uraniumHorseshoeDamage; } return num * 100f; }); ILCursor val5 = val; if (val5.TryGotoPrev(val4, new Func<Instruction, bool>[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, float>>((Func<VolatileThoriumBattery, float>)((VolatileThoriumBattery self) => batteryDamageChance)); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public 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_00af: 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) 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 *= crucifixHealReduction; } } } return orig.Invoke(self, amount, procChainMask, nonRegen); } public static void OnLoafTransform(Action<CharacterMaster, ItemIndex, ItemIndex, TransformationType> orig, CharacterMaster characterMaster, ItemIndex oldIndex, ItemIndex newIndex, TransformationType transformationType) { //IL_0008: 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_009e: 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_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(loafRegenChance, characterMaster)) { Util.PlaySound("Play_ui_artifact_delusion_success", ((Component)characterMaster).gameObject); characterMaster.inventory.GiveItemPermanent(BreadLoaf.itemDef, 1); } orig(characterMaster, oldIndex, newIndex, transformationType); } private 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 * milkHealth; args.baseHealthAdd += num; } } } private void OnMilkArrival(Action<MilkCartonOrb> orig, MilkCartonOrb self) { MilkCarton.percentEliteDamageRetaliation = 2f; MilkCarton.percentEliteDamageRetaliationExtraStacks = 2f; orig(self); } public 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_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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; MoveType val4 = (MoveType)2; if (val2.TryGotoNext(val4, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(JetBoots), "baseDamage") })) { val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldloc_3); val.EmitDelegate<Func<int, float>>((Func<int, float>)((int num) => GetStackedStats(jetBootsDamage, jetBootsDamageStack, num))); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public 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_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) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 2f) })) { val.Next.Operand = 3f; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private 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<BoneVisor>(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(boneProcChance.Value + Util.ConvertAmplificationPercentageIntoReductionPercentage(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<GameObject>(BoneVisor.ShardPrefab, ((Component)report.victim).transform.position + val2, Random.rotation); if (Object.op_Implicit((Object)(object)val3)) { TeamFilter component = val3.GetComponent<TeamFilter>(); if (Object.op_Implicit((Object)(object)component)) { component.teamIndex = report.attackerTeamIndex; } NetworkServer.Spawn(val3); } } private void OnBonePickup(Action<BonePickup, Collider> 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<BoneVisor>(ref val)) { return; } CharacterBody component = ((Component)other).GetComponent<CharacterBody>(); 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 = GetStackedStats(boneDuration.Value, boneDurationStack.Value, num); component.AddTimedBuff(BoneVisor.BuffDef, stackedStats, 5); Object.Destroy((Object)(object)self.baseObject); } } private void OnBoneKill(Action<BoneVisor, DamageReport> orig, BoneVisor self, DamageReport report) { } private 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<Vector3>(array); for (int i = 0; i < num; i++) { CoffeeBeanPooler.SpawnBean(report.damageInfo.position + array[i], itemCountEffective, report.attackerTeamIndex); } } } private void OnCoffeePickup(Action<CoffeeBeanPickup, Collider> 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<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { component.AddTimedBuff(Buffs.BuffCoffeeBag, coffeeBuffDuration.Value); EffectManager.SimpleEffect(self.pickupEffect, ((Component)self).transform.position, Quaternion.identity, true); self.alive = false; component.OnPickup((PickupClass)1); self.pooler.Cleanup(); } } } private void OnCoffeeDamage(Action<CoffeeBag, DamageReport> orig, CoffeeBag self, DamageReport report) { } private void OnCoffeeStat(Action<CoffeeBag, CharacterBody, StatHookEventArgs> 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 += 0.075f * (float)buffCount * (float)val; args.moveSpeedMultAdd += 0.07f * (float)buffCount * (float)val; } } private void OnEchoStat(Action<WarpedEcho, CharacterBody, StatHookEventArgs, Inventory> orig, WarpedEcho self, CharacterBody sender, StatHookEventArgs args, Inventory inventory) { if (sender.HasBuff(Buffs.DelayedDamageBuff)) { int num = 0; if (Object.op_Implicit((Object)(object)sender.inventory)) { num = sender.inventory.GetItemCountEffective(Items.DelayedDamage); } args.attackSpeedMultAdd += 0.15f * (float)num; args.moveSpeedMultAdd += 0.15f * (float)num; args.cooldownMultAdd -= 1f - Mathf.Pow(0.9f, (float)num); } } private void OnToxicKill(Action<ToxicodendronBrineBehavior, CharacterBody, DamageReport> orig, ToxicodendronBrineBehavior self, CharacterBody body, DamageReport report) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) float num = ((float)report.attackerBody.inventory.GetItemCountEffective(ToxicodendronBrine.ToxicodendronBrineDef.itemIndex) - 1f) * 0.1f; 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 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 OnRaincoatDebuff(orig_OverrideDebuff_BuffDef_CharacterBody orig, BuffDef buffDef, CharacterBody body) { if (buffDef.isCooldown) { return false; } if (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); } public 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 (HasTooManyItems) { GameObject victimObject = inflictDotInfo.victimObject; CharacterBody val = (((Object)(object)victimObject != (Object)null) ? victimObject.GetComponent<CharacterBody>() : 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); } 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<CharacterBody>(body); ImmuneToDebuffBehavior val2 = (((Object)(object)val != (Object)null) ? ((Component)val).GetComponent<ImmuneToDebuffBehavior>() : 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<GameObject>((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_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_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_0080: 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_009d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; MoveType val4 = (MoveType)2; if (val2.TryGotoNext(val4, new Func<Instruction, bool>[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<DotStack, DamageType>>((Action<DotStack, DamageType>)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!"); } } public void IL_TakeDamageArmor(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_016b: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; MoveType val4 = (MoveType)2; if (val2.TryGotoNext(val4, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "NetworkSoundEventDefs/nseArmorPlateBlock") })) { ILCursor val5 = val; Func<Instruction, bool>[] array = new Func<Instruction, bool>[1]; array[0] = (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(EntitySoundManager), "EmitSoundServer"); array[1] = (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0); if (val5.TryGotoNext(val4, array)) { Instruction next = val.Next; ILCursor val6 = val; ILLabel val8 = default(ILLabel); if (val6.TryGotoPrev(val4, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val8) })) { val.Emit(OpCodes.Ldloc_0); val.EmitDelegate<Func<DamageInfo, bool>>((Func<DamageInfo, bool>)((DamageInfo damageInfo) => (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) == 0) ? true : false)); val.Emit(OpCodes.Brfalse, next); ILCursor val7 = val; if (val7.TryGotoNext(val3, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f) })) { val.Emit(OpCodes.Ldloc_0); val.EmitDelegate<Func<DamageInfo, bool>>((Func<DamageInfo, bool>)((DamageInfo damageInfo) => (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) == 0) ? true : false)); val.Emit(OpCodes.Brfalse, next); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } 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_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_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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "IncreaseDamageBuff") })) { ILCursor val4 = val; if (val4.TryGotoNext(val3, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.01f) })) { val.Next.Operand = multikillDamageStack.Value; ILCursor val5 = val; if (val5.TryGotoNext(val3, new Func<Instruction, bool>[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_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) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; if (val2.TryGotoNext(val3, new Func<Instruction, bool>[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_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_000f: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_0109: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; MoveType val4 = (MoveType)1; MoveType val5 = (MoveType)2; if (val2.TryGotoNext(val5, new Func<Instruction, bool>[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); ILCursor val6 = val; if (val6.TryGotoNext(val3, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 3f) })) { val.Next.Operand = 0f; ILCursor val7 = val; if (val7.TryGotoNext(val3, new Func<Instruction, bool>[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_000b: 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_00c5: 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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)2; ILLabel val4 = default(ILLabel); if (val2.TryGotoNext(val3, new Func<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterMaster>(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchCall<Object>(x, "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val4), (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<HealthComponent, CharacterMaster, float>>((Func<HealthComponent, CharacterMaster, float>)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_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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)0; MoveType val4 = (MoveType)2; if (val2.TryGotoNext(val4, new Func<Instruction, bool>[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, bool>>((Func<CharacterBody, bool>)((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)) { r