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 buffDefs = new List(); internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown, bool isHidden) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance(); ((Object)val).name = buffName; val.buffColor = buffColor; val.canStack = canStack; val.isDebuff = isDebuff; val.eliteDef = null; val.iconSprite = buffIcon; val.isCooldown = isCooldown; val.isHidden = isHidden; buffDefs.Add(val); return val; } } 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((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 stunGrenadeEnable { get; set; } public static ConfigEntry stunGrenadeDamage { get; set; } public static ConfigEntry apRoundsEnable { get; set; } public static ConfigEntry apRoundsEliteDamage { get; set; } public static ConfigEntry lanternEnable { get; set; } public static ConfigEntry lanternSpeed { get; set; } public static ConfigEntry lanternSpeedStack { get; set; } public static ConfigEntry lanternRegen { get; set; } public static ConfigEntry lanternRegenStack { get; set; } public static ConfigEntry lanternAlly { get; set; } public static ConfigEntry lanternAllyStack { get; set; } public static ConfigEntry lanternRadius { get; set; } public static ConfigEntry lanternRadiusStack { get; set; } public static ConfigEntry warpedEchoEnable { get; set; } public static ConfigEntry bungusEnable { get; set; } public static ConfigEntry bungusTimer { get; set; } public static ConfigEntry meatEnable { get; set; } public static ConfigEntry meatHealth { get; set; } public static ConfigEntry meatDuration { get; set; } public static ConfigEntry meatDurationStack { get; set; } public static ConfigEntry meatRegen { get; set; } public static ConfigEntry meatMax { get; set; } public static ConfigEntry meatMaxStack { get; set; } public static ConfigEntry chronicEnable { get; set; } public static ConfigEntry multikillDuration { get; set; } public static ConfigEntry multikillDamage { get; set; } public static ConfigEntry multikillDamageStack { get; set; } public static ConfigEntry milkEnable { get; set; } public static ConfigEntry loafEnable { get; set; } public static ConfigEntry coffeeEnable { get; set; } public static ConfigEntry coffeeBuffDuration { get; set; } public static ConfigEntry horseshoeEnable { get; set; } public static ConfigEntry boneVisorEnable { get; set; } public static ConfigEntry boneDuration { get; set; } public static ConfigEntry boneDurationStack { get; set; } public static ConfigEntry boneProcChance { get; set; } public static ConfigEntry boneProcStack { get; set; } public static ConfigEntry chanceDollEnable { get; set; } public static ConfigEntry ignitionEnable { get; set; } public static ConfigEntry ignitionBurnBonus { get; set; } public static ConfigEntry ignitionCooldownTime { get; set; } public static ConfigEntry ignitionCooldownStack { get; set; } public static ConfigEntry ignitionBurnDamage { get; set; } public static ConfigEntry scytheEnable { get; set; } public static ConfigEntry scytheHeal { get; set; } public static ConfigEntry scytheHealStack { get; set; } public static ConfigEntry scytheCooldownTime { get; set; } public static ConfigEntry infusionEnable { get; set; } public static ConfigEntry infusionSpeed { get; set; } public static ConfigEntry jetBootsEnable { get; set; } public static ConfigEntry batteryEnable { get; set; } public static ConfigEntry duplicatorEnable { get; set; } public static ConfigEntry duplicatorDropChance { get; set; } public static ConfigEntry duplicatorDuration { get; set; } public static ConfigEntry vultureEnable { get; set; } public static ConfigEntry vultureEliteDamage { get; set; } public static ConfigEntry vultureDropChance { get; set; } public static ConfigEntry vultureHealPercent { get; set; } public static ConfigEntry raincoatEnable { get; set; } public static ConfigEntry raincoatCooldownTime { get; set; } public static ConfigEntry raincoatCooldownStack { get; set; } public static ConfigEntry raincoatBarrier { get; set; } public static ConfigEntry raincoatDuration { get; set; } public static ConfigEntry lampEnable { get; set; } public static ConfigEntry toxicoEnable { get; set; } public static ConfigEntry coreEnable { get; set; } public static ConfigEntry solitudeEnable { get; set; } public static ConfigEntry crucifixEnable { get; set; } public void SetupConfig(ConfigFile cfg) { stunGrenadeEnable = cfg.Bind("Stun Grenade Buff", "Enable Changes", true, "Enables the changes to stun grenade."); stunGrenadeDamage = cfg.Bind("Stun Grenade Buff", "Damage", 2f, "The damage coefficient of the proc. (1 = 100% damage)"); apRoundsEnable = cfg.Bind("AP Rounds Buff", "Enable Changes", true, "Enables the changes to armor piercing rounds."); apRoundsEliteDamage = cfg.Bind("AP Rounds Buff", "Elite Damage Bonus", 0.05f, "Damage bonus granted against elites for each stack of the item. (1 = 100% bonus damage)"); lanternEnable = cfg.Bind("Bolstering Lantern Rework", "Enable Changes", true, "Enables the changes to bolstering lantern."); lanternSpeed = cfg.Bind("Bolstering Lantern Rework", "Attack Speed", 0.07f, "Base attack speed bonus granted per buff stack. (1 = 100% attack speed)"); lanternSpeedStack = cfg.Bind("Bolstering Lantern Rework", "Attack Speed Stacking", 0f, "Attack speed bonus granted for each additional stack of the item, per buff stack."); lanternRegen = cfg.Bind("Bolstering Lantern Rework", "Health Regen", 0.7f, "Base health regen bonus granted per buff stack. (1 = 1 hp/s)"); lanternRegenStack = cfg.Bind("Bolstering Lantern Rework", "Health Regen Stacking", 0f, "Health regen bonus granted for each additional stack of the item, per buff stack."); lanternAlly = cfg.Bind("Bolstering Lantern Rework", "Max Buffs", 4, "Maximum number of buffs you can have with one stack of the item."); lanternAllyStack = cfg.Bind("Bolstering Lantern Rework", "Max Buff Stacking", 2, "Maximum number of buffs you can have with each additional stack of the item."); lanternRadius = cfg.Bind("Bolstering Lantern Rework", "Radius", 40f, "Base area of effect size of the item. (1 = 0.5m)"); lanternRadiusStack = cfg.Bind("Bolstering Lantern Rework", "Radius Stacking", 4f, "The area of effect size for each additional stack of the item."); warpedEchoEnable = cfg.Bind("Warped Echo Rework", "Enable Changes", true, "Enables the changes to stun grenade. Requires FlatItemBuff."); bungusEnable = cfg.Bind("Bungus Buff", "Enable Changes", true, "Enables the changes to bustling fungus."); bungusTimer = cfg.Bind("Bungus Buff", "Timer", 0.25f, "Amount of time (in seconds) while standing still that it takes for bustling fungus to activate."); meatEnable = cfg.Bind("Bison Steak Buff", "Enable Changes", true, "Enables the changes to bison steak."); meatHealth = cfg.Bind("Bison Steak Buff", "Health Increase", 30f, "Amount of HP gained for each stack of the item."); meatRegen = cfg.Bind("Bison Steak Buff", "Health Regen", 1.5f, "Amount of health regeneration gained per buff stack. (1 = 1 hp/s)"); meatDuration = cfg.Bind("Bison Steak Buff", "Regen Duration", 3f, "Base duration (in seconds) of the regeneration buff on kill."); meatDurationStack = cfg.Bind("Bison Steak Buff", "Regen Duration Stacking", 1f, "Duration of the regeneration buff on kill for each additional stack of the item."); meatMax = cfg.Bind("Bison Steak Buff", "Max Buffs", 2, "Maximum number of buffs you can have with one stack of the item."); meatMaxStack = cfg.Bind("Bison Steak Buff", "Max Buff Stacking", 1, "Maximum number of buffs you can have with each additional stack of the item."); chronicEnable = cfg.Bind("Chronic Expansion Rebalance", "Enable Changes", true, "Enables the changes to chronic expansion."); multikillDamage = cfg.Bind("Chronic Expansion Rebalance", "Damage", 0.03f, "Base damage bonus granted per buff stack. (1 = 100% bonus damage)"); multikillDamageStack = cfg.Bind("Chronic Expansion Rebalance", "Damage Stacking", 0.005f, "Damage bonus granted for each additional stack of the item, per buff stack."); multikillDuration = cfg.Bind("Chronic Expansion Rebalance", "Buff Duration", 9f, "Duration of the buff (in seconds)."); milkEnable = cfg.Bind("Milk Carton Buff", "Enable Changes", true, "Enables the changes to milk carton. Requires TooManyItems."); loafEnable = cfg.Bind("Loaf of Bread Buff", "Enable Changes", true, "Enables the changes to loaf of bread. Requires TooManyItems."); coffeeEnable = cfg.Bind("Coffee Bag Rework", "Enable Changes", true, "Enables the changes to coffee bag. Requires Starstorm2."); coffeeBuffDuration = cfg.Bind("Coffee Bag Rework", "Duration", 5f, "Base duration (in seconds) of the coffee buff."); horseshoeEnable = cfg.Bind("Uranium Horseshoe Buff", "Enable Changes", true, "Enables the changes to uranium horseshoe. Requires Starstorm2 and Meltdown."); boneVisorEnable = cfg.Bind("Bone Visor Rework", "Enable Changes", true, "Enables the changes to bone visor. Requires BubbetsItems."); boneDuration = cfg.Bind("Bone Visor Rework", "Duration", 5f, "Base duration (in seconds) of the barrier regeneration buff."); boneDurationStack = cfg.Bind("Bone Visor Rework", "Duration Stacking", 1f, "Duration of the barrier regeneration buff for each additional stack of the item."); boneProcChance = cfg.Bind("Bone Visor Rework", "Proc Chance", 6f, "Base percent chance to drop a bone shard on hit. (100 = 100% chance)"); boneProcStack = cfg.Bind("Bone Visor Rework", "Proc Chance Stacking", 1.5f, "Percent chance to drop a bone shard for each additional stack of the item."); chanceDollEnable = cfg.Bind("Chance Doll Rework", "Enable Changes", true, "Enables the changes to chance doll."); ignitionEnable = cfg.Bind("Ignition Tank Rework", "Enable Changes", true, "Enables the changes to ignition tank."); ignitionBurnBonus = cfg.Bind("Ignition Tank Rework", "Ignite Multiplier", 2, "Ignite damage multiplier for each stack of the item. (1 = 100% more damage)"); ignitionCooldownTime = cfg.Bind("Ignition Tank Rework", "Cooldown", 8f, "Cooldown time (in seconds) for the ignite on hit effect."); ignitionCooldownStack = cfg.Bind("Ignition Tank Rework", "Cooldown Stacking", 0.15f, "Cooldown reduction for each additional stack of the item. (1 = 100% reduction)"); ignitionBurnDamage = cfg.Bind("Ignition Tank Rework", "Ignite Damage", 0.5f, "Total damage of the ignite on hit effect. (1 = 100% damage)"); scytheEnable = cfg.Bind("Harvesters Scythe Rework", "Enable Changes", true, "Enables the changes to harvesters scythe."); scytheHeal = cfg.Bind("Harvesters Scythe Rework", "Heal Amount", 20f, "Base healing recieved from the item."); scytheHealStack = cfg.Bind("Harvesters Scythe Rework", "Heal Amount Stacking", 20f, "Healing recieved from each additional stack of the item."); scytheCooldownTime = cfg.Bind("Harvesters Scythe Rework", "Cooldown", 2f, "Cooldown time (in seconds) between uses of the item."); infusionEnable = cfg.Bind("Infusion Buff", "Enable Changes", true, "Enables the changes to infusion."); infusionSpeed = cfg.Bind("Infusion Buff", "Speed Boost", 0.1f, "Maximum speed boost to recieve from each stack of the item. (1 = 100% bonus speed)"); jetBootsEnable = cfg.Bind("Prototype Jet Boots Rebalance", "Enable Changes", true, "Enables the changes to prototype jet boots. Requires Starstorm2."); batteryEnable = cfg.Bind("Volatile Thorium Battery Rebalance", "Enable Changes", true, "Enables the changes to volatile thorium battery. Requires Meltdown."); duplicatorEnable = cfg.Bind("Substandard Duplicator Rework", "Enable Changes", true, "Enables the changes to substandard duplicator."); duplicatorDropChance = cfg.Bind("Substandard Duplicator Rework", "Proc Chance", 8f, "Percent chance to drop a temporary item on kill. (100 = 100% chance)"); duplicatorDuration = cfg.Bind("Substandard Duplicator Rework", "Duration", 30, "Duration increase (in seconds) for temporary items per stack of the item."); vultureEnable = cfg.Bind("Wake Of Vultures Rework", "Enable Changes", true, "Enables the changes to wake of vultures."); vultureEliteDamage = cfg.Bind("Wake Of Vultures Rework", "Elite Damage Bonus", 0.5f, "Damage bonus granted against elites above half health for each stack of the item. (1 = 100% bonus damage)"); vultureDropChance = cfg.Bind("Wake Of Vultures Rework", "Elite Aspect Drop Chance", 5f, "Flat percent chance for an elite aspect to drop on kill for each stack of the item. (100 = 100% chance)"); vultureHealPercent = cfg.Bind("Wake Of Vultures Rework", "Heal Percent", 0.2f, "Max HP fraction to heal upon killing an elite. (1 = 100% heal)"); raincoatEnable = cfg.Bind("Bens Raincoat Rework", "Enable Changes", true, "Enables the changes to bens raincoat."); raincoatCooldownTime = cfg.Bind("Bens Raincoat Rework", "Cooldown", 15f, "Cooldown time (in seconds) between uses of the item."); raincoatCooldownStack = cfg.Bind("Bens Raincoat Rework", "Cooldown Stacking", 0.2f, "Cooldown reduction for each additional stack of the item. (1 = 100% reduction)"); raincoatBarrier = cfg.Bind("Bens Raincoat Rework", "Barrier Amount", 0.25f, "Barrier amount to recieve on activation, proportional to max HP. (1 = 100% barrier)"); raincoatDuration = cfg.Bind("Bens Raincoat Rework", "Invulnerability Time", 3f, "Duration of the invulnerability (in seconds) to recieve on activation."); lampEnable = cfg.Bind("Shackled Lamp Buff", "Enable Changes", true, "Enables the changes to shackled lamp. Requires Starstorm2."); toxicoEnable = cfg.Bind("Toxicodendron Brine Buff", "Enable Changes", true, "Enables the changes to toxicodendronbrine. Requires SeekingTheVoid."); coreEnable = cfg.Bind("Corrosive Core Buff", "Enable Changes", true, "Enables the changes to corrosive core. Requires VanillaVoid."); solitudeEnable = cfg.Bind("Longstanding Solitude Rebalance", "Enable Changes", true, "Enables the changes to longstanding solitude."); crucifixEnable = cfg.Bind("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 = $"On level up gain 1 (+1 per stack) free unlock for the next purchase, but all gold is converted to experience. All gold prices are increased by 25% (+25% per stack), and all experience gained is reduced by 25% (+25% per stack)."; LanguageAPI.Add("ITEM_ONLEVELUPFREEUNLOCK_DESC", text); } if (lanternEnable.Value) { AttackSpeedPerNearbyCollider.UpdateValues += new hook_UpdateValues(OnLanternUpdate); AttackSpeedPerNearbyCollider.Start += new hook_Start(OnLanternStart); CharacterBody.RecalculateStats += new Manipulator(IL_Lantern); string stackDesc = GetStackDesc(lanternSpeedStack.Value * 100f, "%"); string stackDesc2 = GetStackDesc(lanternRegenStack.Value, " hp/s"); string stackDesc3 = GetStackDesc(lanternRadiusStack.Value / 2f, "m"); string stackDesc4 = GetStackDesc(lanternAllyStack.Value, ""); if (lanternRegen.Value > 0f) { string text2 = $"Increases attack speed by {lanternSpeed.Value * 100f}%{stackDesc} and health regeneration by {lanternRegen.Value} hp/s{stackDesc2} for each enemy and ally within {lanternRadius.Value / 2f}m{stackDesc3}, up to {lanternAlly.Value}{stackDesc4} times."; LanguageAPI.Add("ITEM_ATTACKSPEEDPERNEARBYALLYORENEMY_DESC", text2); string text3 = "Increases your attack speed and health regen for every nearby enemy and ally."; LanguageAPI.Add("ITEM_ATTACKSPEEDPERNEARBYALLYORENEMY_DESC", text3); } else { string text4 = string.Format("Increases attack speed by {0}%{1} for each enemy and ally within {4}m{5}, up to {6}{7} times.", lanternSpeed.Value * 100f, stackDesc, lanternRadius.Value / 2f, stackDesc3, lanternAlly.Value, stackDesc4); LanguageAPI.Add("ITEM_ATTACKSPEEDPERNEARBYALLYORENEMY_DESC", text4); } } if (stunGrenadeEnable.Value) { SetStateOnHurt.OnTakeDamageServer += new Manipulator(IL_StunDamage); string text5 = $"5% (+5% per stack) chance on hit to deal {stunGrenadeDamage.Value * 100f}% damage and stun enemies for 2s."; LanguageAPI.Add("ITEM_STUNCHANCEONHIT_DESC", text5); string text6 = $"Chance to damage and stun on hit."; LanguageAPI.Add("ITEM_STUNCHANCEONHIT_PICKUP", text6); } if (bungusEnable.Value) { CharacterBody.GetNotMoving += new Manipulator(IL_NotMoving); string text7 = $"After standing still for {bungusTimer.Value}s, create a zone that heals for 4.5% (+2.25% per stack) of your health every second to all allies within 3m (+1.5m per stack)."; LanguageAPI.Add("ITEM_MUSHROOM_DESC", text7); string text8 = $"Heal all nearby allies while standing still."; LanguageAPI.Add("ITEM_MUSHROOM_PICKUP", text8); } if (chanceDollEnable.Value) { ShrineChanceBehavior.AddShrineStack += new Manipulator(IL_ChanceShrine); string text9 = $"Whenever a Shrine of Chance succeeds, gain a 50% chance to increase the rarity of the item. Whenever a Shrine of Chance fails, gain a 10% (+10% per stack) chance for free White Scrap 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("{0}% chance on kill for a random temporary item to drop. You get an extra copy of any temporary items you pick up, and your temporary items last an additional {1}s (+{1}s per stack).", duplicatorDropChance.Value, duplicatorDuration.Value); LanguageAPI.Add("ITEM_DUPLICATOR_DESC", text11); string text12 = $"Duplicate all temporary items you pick up. Monsters drop temporary items on death."; LanguageAPI.Add("ITEM_DUPLICATOR_PICKUP", text12); } if (vultureEnable.Value) { GlobalEventManager.OnCharacterDeath += new Manipulator(IL_EliteDeath); GlobalEventManager.onCharacterDeathGlobal += OnEliteDeath; string text13 = string.Format("You deal {0}% (+{0}% per stack) more damage to elites above 50% health. Upon killing an elite monster, heal for {1}% of your total health and gain a {2}% (+{2}% per stack) chance for the monster's elite aspect to drop.", vultureEliteDamage.Value * 100f, vultureHealPercent.Value * 100f, vultureDropChance.Value); LanguageAPI.Add("ITEM_HEADHUNTER_DESC", text13); string text14 = $"Deal more damage to elites above half health. Chance for elites to drop their powers on death."; LanguageAPI.Add("ITEM_HEADHUNTER_PICKUP", text14); } if (apRoundsEnable.Value) { string text15 = string.Format("Deal 20% (+20% per stack) more damage to bosses, and {0}% (+{0}% per stack) more damage to elites.", apRoundsEliteDamage.Value * 100f); LanguageAPI.Add("ITEM_BOSSDAMAGEBONUS_DESC", text15); string text16 = $"Deal extra damage to bosses and elites."; LanguageAPI.Add("ITEM_BOSSDAMAGEBONUS_PICKUP", text16); } if (chronicEnable.Value) { CharacterBody.AddIncreasedDamageMultiKillTime += new Manipulator(IL_MultikillTimer); CharacterBody.RecalculateStats += new Manipulator(IL_MultikillStats); string stackDesc5 = GetStackDesc(multikillDamageStack.Value * 100f, "%"); string text17 = $"Killing an enemy increases your damage by {multikillDamage.Value * 100f}%{stackDesc5} for {multikillDuration.Value}s, up to 10 (+5 per stack) times. Dealing damage refreshes the timer."; LanguageAPI.Add("ITEM_INCREASEDAMAGEONMULTIKILL_DESC", text17); } if (meatEnable.Value) { CharacterBody.UpdateAllTemporaryVisualEffects += new Manipulator(IL_MeatEffect); GlobalEventManager.onCharacterDeathGlobal += OnMeatDeath; string stackDesc6 = GetStackDesc(meatDurationStack.Value, "s"); float num = meatRegen.Value * (float)meatMax.Value; float num2 = meatRegen.Value * (float)meatMaxStack.Value; string stackDesc7 = GetStackDesc(num2, " hp/s"); string text18 = string.Format("Increases max health by {0} (+{0} per stack). Increases health regeneration by {1} hp/s for {2}s{3} after killing an enemy, up to a maximum of {4} hp/s{5}.", meatHealth, 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 {0}% TOTAL damage, once every {1}s{2}. Ignite effects deal {3}% (+{3}% per stack) 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 debuff, gain {raincoatBarrier.Value * 100f}% barrier and {raincoatDuration.Value}s of invulnerability. Repeatable once every {raincoatCooldownTime.Value}s (-{raincoatCooldownStack.Value * 100f}% per stack)."; LanguageAPI.Add("ITEM_IMMUNETODEBUFF_DESC", 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 +5% crit chance. Critical strikes heal you for {scytheHeal.Value} (+{scytheHealStack.Value} per stack) health, with a {scytheCooldownTime.Value}s cooldown between uses."; LanguageAPI.Add("ITEM_HEALONCRIT_DESC", text24); } if (infusionEnable.Value) { string text25 = string.Format("Killing an enemy permanently increases your health by 1 (+1 per stack) and movement speed by {0}% (+{0}% per stack), up to a maximum of 100 (+100 per stack) health and {1}% (+{1}% per stack) movement speed.", infusionSpeed.Value, infusionSpeed.Value * 100f); LanguageAPI.Add("ITEM_INFUSION_DESC", text25); string text26 = $"Killing an enemy permanently increases your maximum health and movement speed."; LanguageAPI.Add("ITEM_INFUSION_PICKUP", text26); } if (!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 +1 extra jump that ignites enemies for 450% (+150% per stack) base damage in a 7.5m (+5m per stack) radius. Recharges 5s 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 5 primary skill uses, fire a haunted projectile for 300% (+300% per stack) base damage."; 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, CoffeeBag, CharacterBody, StatHookEventArgs>(OnCoffeeStat)); MethodInfo methodInfo4 = AccessTools.Method(typeof(CoffeeBag), "OnServerDamageDealt", (Type[])null, (Type[])null); coffeeDamageHook = new Hook((MethodBase)methodInfo4, (Delegate)new Action, CoffeeBag, DamageReport>(OnCoffeeDamage)); MethodInfo methodInfo5 = AccessTools.Method(typeof(CoffeeBeanPickup), "OnTriggerStay", (Type[])null, (Type[])null); coffeePickupHook = new Hook((MethodBase)methodInfo5, (Delegate)new Action, CoffeeBeanPickup, Collider>(OnCoffeePickup)); GlobalEventManager.onCharacterDeathGlobal += OnCoffeeDeath; string text29 = $"Killing an enemy randomly spills up to 4 coffee beans that increase attack speed by 7.5% (+7.5% per stack) and movement speed by 7% (+7% per stack) for {coffeeBuffDuration.Value}s 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 movement speed and jump height by {0}% (+{0}% per stack). Your irradiated effects deal {1}% (+{1}% per stack) 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, BoneVisor, DamageReport>(OnBoneKill)); MethodInfo methodInfo7 = AccessTools.Method(typeof(BonePickup), "OnTriggerStay", (Type[])null, (Type[])null); bonePickupHook = new Hook((MethodBase)methodInfo7, (Delegate)new Action, BonePickup, Collider>(OnBonePickup)); string stackDesc9 = GetStackDesc(boneProcStack.Value * 100f, "%"); string stackDesc10 = GetStackDesc(boneDurationStack.Value, "s"); string text33 = $"{boneProcChance.Value}%{stackDesc9} chance on hit to drop a bone shard that grants barrier regeneration for {boneDuration.Value}s{stackDesc10}.\r\n\r\nBarrier regeneration grants 1% barrier per second, and prevents barrier decay."; 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, WarpedEcho, CharacterBody, StatHookEventArgs, Inventory>(OnEchoStat)); string text35 = $"50% of all damage you take is delayed by 3s. While delayed damage is processing, your skills recharge 10% (+10% per stack) faster, and you have 15% (+15% per stack) increased attack speed and movement speed."; 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, ToxicodendronBrineBehavior, CharacterBody, DamageReport>(OnToxicKill)); string text37 = $"Hits that deal more than 400% damage also inflict poison for 10s. Whenever you kill a poisoned enemy, the poison spreads on up to 1 (+1 per stack) enemy within 25m (+5m per stack), and reduces all your skill cooldowns by 20% (+10% per stack). Corrupts all Noxious Thorns."; 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, MilkCartonOrb>(OnMilkArrival)); string pickupToken = "Gain 20 max health. Retaliate damage from elites."; string descriptionToken = "Increases max health by 20 (+20 per stack). Retaliate 200% (+200% per stack) of the damage taken from elite enemies."; 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, CharacterMaster, ItemIndex, ItemIndex, TransformationType>(OnLoafTransform)); string descriptionToken2 = "Gain 1 (+1 per stack) gold on-kill. After 25 kills, scrap a stack of this item and gain an extra 25 gold, with a 20% chance to regain a stack of this item. Gold amount scales over time."; 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 95%, but taking damage burns you for 20% (-10% per stack) max health. While burning, all healing recieved is reduced by 50% (+50% per stack)."; Crucifix.itemDef.descriptionToken = descriptionToken3; } } if (HasVanillaVoid && coreEnable.Value) { string text38 = $"6% chance on hit to apply slowing tar for 2s (+0.5s per stack). Slow effects also drown enemies, dealing 30% (+20% per stack) base damage per 10% slow. Corrupts all Ignition Tanks."; LanguageAPI.AddOverlay("VV_ITEM_CORE_ITEM_DESCRIPTION", text38); string text39 = $"Slowed enemies take damage over time. Chance to apply slowing tar on hit. Corrupts all Ignition Tanks."; 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 5% chance on hit to Irradiate enemies. Irradiated enemies have a {batteryDamageChance}% chance per tick to deal {batteryDamage * 100f}%{stackDesc11} damage in a 12m (+4m per stack) radius, applying Irradiated."; 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((object)"RoR2/Base/Croco/texBuffRegenBoostIcon.tif").WaitForCompletion(), Color.green, canStack: true, isDebuff: false, isCooldown: false, isHidden: false); IgnitionCooldown = Buffs.AddNewBuff("BloonIgnitionCooldown", Addressables.LoadAssetAsync((object)"RoR2/DLC1/StrengthenBurn/texBuffStrongerBurnIcon.tif").WaitForCompletion(), Color.grey, canStack: false, isDebuff: true, isCooldown: true, isHidden: false); ScytheCooldown = Buffs.AddNewBuff("BloonScytheCooldown", Addressables.LoadAssetAsync((object)"RoR2/Base/Croco/texBuffRegenBoostIcon.tif").WaitForCompletion(), Color.grey, canStack: false, isDebuff: true, isCooldown: true, isHidden: false); } private string GetStackDesc(float num, string type) { if (num > 0f) { return $" (+{num}{type} per stack)"; } 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(); 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[3] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 2), (Instruction x) => ILPatternMatchingExt.MatchLdarga(x, 5) })) { val.Index -= 1; Instruction next = val.Next; val.Emit(OpCodes.Ldloc_2); val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldarg, 5); val.EmitDelegate>((Action)delegate(Inventory inventory, CharacterBody body, ProcChainMask procChainMask) { //IL_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[] array = new Func[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[3] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_aimOrigin"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 13), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 10) })) { val.Index -= 1; Instruction next = val.Next; val.Emit(OpCodes.Ldloc_0); val.Emit(OpCodes.Ldloc_1); val.Emit(OpCodes.Ldarg_1); val.Emit(OpCodes.Ldloc, 10); val.Emit(OpCodes.Ldarg_2); val.EmitDelegate>((Action)delegate(CharacterBody characterBody, CharacterBody victimBody, DamageInfo damageInfo, Inventory inventory, GameObject victim) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_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())) { ProjectileController component = damageInfo.attacker.GetComponent(); CharacterMaster component2 = component.owner.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2)) { StrengthenBurnUtils.CheckDotForUpgrade(component2.inventory, ref 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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(VolatileThoriumBattery), "Damage") })) { int index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc, 4); val.EmitDelegate>((Func)delegate(VolatileThoriumBattery self, VolatileThoriumBatteryController controller) { int stacks = controller.stacks; float num = 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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(VolatileThoriumBattery), "ChanceToProc") })) { index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((VolatileThoriumBattery self) => 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 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 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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(JetBoots), "baseDamage") })) { val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldloc_3); val.EmitDelegate>((Func)((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[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(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(BoneVisor.ShardPrefab, ((Component)report.victim).transform.position + val2, Random.rotation); if (Object.op_Implicit((Object)(object)val3)) { TeamFilter component = val3.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.teamIndex = report.attackerTeamIndex; } NetworkServer.Spawn(val3); } } private void OnBonePickup(Action orig, BonePickup self, Collider other) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) BoneVisor val = default(BoneVisor); if (!NetworkServer.active || !self.alive || TeamComponent.GetObjectTeam(((Component)other).gameObject) != self.teamFilter.teamIndex || !SharedBase.TryGetInstance(ref val)) { return; } CharacterBody component = ((Component)other).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } Inventory inventory = component.inventory; if (Object.op_Implicit((Object)(object)inventory)) { int num = inventory.GetItemCountEffective(((ItemBase)val).ItemDef); if (num <= 0) { num = 1; } self.alive = false; component.OnPickup((PickupClass)1); component.healthComponent.AddBarrier(5f); float stackedStats = GetStackedStats(boneDuration.Value, boneDurationStack.Value, num); component.AddTimedBuff(BoneVisor.BuffDef, stackedStats, 5); Object.Destroy((Object)(object)self.baseObject); } } private void OnBoneKill(Action 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(array); for (int i = 0; i < num; i++) { CoffeeBeanPooler.SpawnBean(report.damageInfo.position + array[i], itemCountEffective, report.attackerTeamIndex); } } } private void OnCoffeePickup(Action orig, CoffeeBeanPickup self, Collider other) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && self.initialized && self.alive && TeamComponent.GetObjectTeam(((Component)other).gameObject) == self.teamFilter.teamIndex) { CharacterBody component = ((Component)other).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.AddTimedBuff(Buffs.BuffCoffeeBag, 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 orig, CoffeeBag self, DamageReport report) { } private void OnCoffeeStat(Action orig, CoffeeBag self, CharacterBody sender, StatHookEventArgs args) { int val = (Object.op_Implicit((Object)(object)sender.inventory) ? sender.inventory.GetItemCountEffective(((SS2Item)self).ItemDef) : 0); val = Math.Max(val, 1); int buffCount = sender.GetBuffCount(Buffs.BuffCoffeeBag); if (buffCount > 0) { args.attackSpeedMultAdd += 0.075f * (float)buffCount * (float)val; args.moveSpeedMultAdd += 0.07f * (float)buffCount * (float)val; } } private void OnEchoStat(Action 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 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() : 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(body); ImmuneToDebuffBehavior val2 = (((Object)(object)val != (Object)null) ? ((Component)val).GetComponent() : null); if (Object.op_Implicit((Object)(object)val2) && body.HasBuff(Buffs.ImmuneToDebuffReady) && Object.op_Implicit((Object)(object)val2.healthComponent)) { val2.healthComponent.AddBarrier(raincoatBarrier.Value * val2.healthComponent.fullCombinedHealth); body.RemoveBuff(Buffs.ImmuneToDebuffReady); EffectManager.SimpleImpactEffect(Addressables.LoadAssetAsync((object)"RoR2/DLC1/ImmuneToDebuff/ImmuneToDebuffEffect.prefab").WaitForCompletion(), body.corePosition, Vector3.up, true); if (!body.HasBuff(Buffs.ImmuneToDebuffReady) && Object.op_Implicit((Object)(object)body.inventory)) { int itemCountEffective = body.inventory.GetItemCountEffective(Items.ImmuneToDebuff); float num = raincoatCooldownTime.Value / ConvertReductionIntoStackingDivision(raincoatCooldownStack.Value, itemCountEffective); body.AddTimedBuff(Buffs.ImmuneToDebuffCooldown, num + raincoatDuration.Value); body.AddTimedBuff(Buffs.Immune, raincoatDuration.Value); } } return false; } public void IL_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[3] { (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Mathf), "Min"), (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(DotStack), "damage") })) { val.Emit(OpCodes.Ldloc, 5); val.Emit(OpCodes.Ldc_I4, 2); val.EmitDelegate>((Action)delegate(DotStack dotStack, DamageType type) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) dotStack.damageType = DamageTypeCombo.op_Implicit(type); }); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } 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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "NetworkSoundEventDefs/nseArmorPlateBlock") })) { ILCursor val5 = val; Func[] array = new Func[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[1] { (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val8) })) { val.Emit(OpCodes.Ldloc_0); val.EmitDelegate>((Func)((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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f) })) { val.Emit(OpCodes.Ldloc_0); val.EmitDelegate>((Func)((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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "IncreaseDamageBuff") })) { ILCursor val4 = val; if (val4.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.01f) })) { val.Next.Operand = multikillDamageStack.Value; ILCursor val5 = val; if (val5.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.035f) })) { val.Next.Operand = multikillDamage.Value; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_MultikillTimer(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_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[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[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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 3f) })) { val.Next.Operand = 0f; ILCursor val7 = val; if (val7.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f) })) { val.Next.Operand = 0f; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_EliteDamage(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_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[4] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchCall(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)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[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "MeatRegenBoost"), (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "HasBuff") })) { val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)((CharacterBody self) => self.HasBuff(MeatBuff))); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private void OnMeatDeath(DamageReport report) { if (!NetworkServer.active) { return; } CharacterBody attackerBody = report.attackerBody; if (!Object.op_Implicit((Object)(object)attackerBody)) { return; } Inventory inventory = attackerBody.inventory; if (Object.op_Implicit((Object)(object)inventory)) { int itemCountEffective = inventory.GetItemCountEffective(Items.FlatHealth); if (itemCountEffective > 0) { float stackedStats = GetStackedStats(meatDuration.Value, meatDurationStack.Value, itemCountEffective); int stackedStatsInt = GetStackedStatsInt(meatMax.Value, meatMaxStack.Value, itemCountEffective); attackerBody.AddTimedBuff(MeatBuff, stackedStats, stackedStatsInt); } } } public void IL_StrengthenBurn(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 3) })) { val.Next.Operand = ignitionBurnBonus.Value; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } private void OnDuplicatorDeath(DamageReport report) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } rng = new Xoroshiro128Plus(Run.instance.treasureRng.nextUlong); CharacterBody attackerBody = report.attackerBody; if (!Object.op_Implicit((Object)(object)attackerBody)) { return; } Inventory inventory = attackerBody.inventory; if (!Object.op_Implicit((Object)(object)inventory)) { return; } int itemCountEffective = inventory.GetItemCountEffective(Items.Duplicator); if (itemCountEffective > 0 && Object.op_Implicit((Object)(object)report.victimMaster) && Object.op_Implicit((Object)(object)report.victimBody)) { PickupDropTable dropTable = Surprise.dropTable; if (Util.CheckRoll(duplicatorDropChance.Value, report.attackerMaster) && Object.op_Implicit((Object)(object)dropTable)) { PickupIndex pickupIndex = dropTable.GeneratePickup(rng).pickupIndex; UniquePickup val = default(UniquePickup); ((UniquePickup)(ref val))..ctor(pickupIndex); val.decayValue = 1f; PickupDropletController.CreatePickupDroplet(val, report.victimBody.corePosition, Vector3.up * 20f); } } } public void IL_Duplicator(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 10) })) { val.Next.Operand = duplicatorDuration.Value; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_GrantTempItem(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_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_00a1: 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[1] { (Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(Inventory), "GiveItemPermanent") })) { ILCursor val4 = val; Func[] array = new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f) }; if (val4.TryGotoNext(val3, array)) { val.Next.Operand = 0f; ILCursor val5 = val; if (val5.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_ChanceShrine(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: 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(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 30) })) { val.Next.Operand = 50; ILCursor val5 = val; if (val5.TryGotoNext(val4, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 5) })) { val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4, 0); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } ILCursor val6 = new ILCursor(il); ILCursor val7 = val6; ILLabel val9 = default(ILLabel); if (val7.TryGotoNext(val4, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val9), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(ShrineChanceBehavior), "chanceDollWin") })) { val6.Index -= 2; val6.Emit(OpCodes.Ldarg_0); val6.Emit(OpCodes.Ldloc_1); val6.Emit(OpCodes.Ldloc_2); val6.EmitDelegate>((Action)delegate(ShrineChanceBehavior self, CharacterBody component, Inventory inventory) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown if (inventory.GetItemCountEffective(Items.ExtraShrineItem) > 0 && Util.CheckRoll((float)(inventory.GetItemCountEffective(Items.ExtraShrineItem) * 10), component.master)) { CreatePickupInfo val8 = default(CreatePickupInfo); ((CreatePickupInfo)(ref val8)).pickupIndex = PickupCatalog.FindPickupIndex(Items.ScrapWhite.itemIndex); PickupDropletController.CreatePickupDroplet(val8, self.dropletOrigin.position, self.dropletOrigin.forward * 20f); Util.PlaySound("Play_ui_artifact_delusion_success", ((Component)component).gameObject); EffectManager.SpawnEffect(self.effectPrefabShrineRewardJackpotVFX, new EffectData { origin = ((Component)self).transform.position, rotation = Quaternion.identity, scale = 1f, color = Color32.op_Implicit(Color.white) }, true); } }); } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } public void IL_NotMoving(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f) })) { val.Next.Operand = bungusTimer.Value; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void OnLanternUpdate(orig_UpdateValues orig, AttackSpeedPerNearbyCollider self, int itemCount, out float diameter) { orig.Invoke(self, itemCount, ref diameter); self.maxCharacterCount = lanternAlly.Value + (itemCount - 1) * lanternAllyStack.Value; diameter = lanternRadius.Value + ((float)itemCount - 1f) * lanternRadiusStack.Value; } public void OnLanternStart(orig_Start orig, AttackSpeedPerNearbyCollider self) { self.syncInterval = 0.5f; orig.Invoke(self); } public void IL_Lantern(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_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[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs).GetField("AttackSpeedPerNearbyAllyOrEnemyBuff")) })) { ILCursor val4 = val; if (val4.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.035f) })) { val.Next.Operand = lanternSpeedStack.Value; ILCursor val5 = val; if (val5.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.065f) })) { val.Next.Operand = lanternSpeed.Value - lanternSpeedStack.Value; } else { Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!"); } } else { Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!"); } } public void IL_StunDamage(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_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_0048: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILCursor val2 = val; MoveType val3 = (MoveType)2; bool flag; if (val2.TryGotoNext(val3, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(EffectManager), "SimpleImpactEffect") })) { ILCursor val4 = val; MoveType val5 = (MoveType)2; flag = val4.TryGotoNext(val5, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "SetStun") }); } else { flag = false; } if (!flag) { return; } val.Emit(OpCodes.Ldarg, 1); val.Emit(OpCodes.Ldloc, 3); val.EmitDelegate>((Action)delegate(DamageReport damageReport, int stunGrenadeCount) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown if (NetworkServer.active && Object.op_Implicit((Object)(object)damageReport.attackerBody)) { DamageInfo val6 = new DamageInfo { attacker = damageReport.attacker, crit = damageReport.damageInfo.crit, damage = stunGrenadeDamage.Value * damageReport.attackerBody.damage, damageColorIndex = (DamageColorIndex)3, inflictor = damageReport.attacker, position = damageReport.damageInfo.position, procCoefficient = 0f }; damageReport.victim.TakeDamage(val6); GlobalEventManager.instance.OnHitEnemy(val6, ((Component)damageReport.victim).gameObject); GlobalEventManager.instance.OnHitAll(val6, ((Component)damageReport.victim).gameObject); } }); } public void OnAwardExperience(orig_AwardExperience orig, ExperienceManager self, Vector3 origin, CharacterBody body, ulong amount) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) if (body.inventory.GetItemCountEffective(Items.OnLevelUpFreeUnlock) < 1) { orig.Invoke(self, origin, body, amount); return; } ulong num = amount; int num2 = TeamManager.LongstandingSolitudesInParty(); for (int i = 0; i < num2; i++) { num = ((i > 2) ? (num - num / 4) : (num - amount / 4)); } orig.Invoke(self, origin, body, num); } public float OnItemCostScale(orig_GetLongstandingSolitudeItemCostScale orig) { return 1f + (float)TeamManager.LongstandingSolitudesInParty() * 0.25f; } } [HarmonyPatch(typeof(HealthComponent), "GetBarrierDecayRate")] internal class BasePatch { private static void Postfix(HealthComponent __instance, ref float __result) { CharacterBody body = __instance.body; if (!Object.op_Implicit((Object)(object)body)) { return; } Inventory inventory = body.inventory; if (!Object.op_Implicit((Object)(object)inventory)) { return; } if (inventory.GetItemCountEffective(Items.ImmuneToDebuff) > 0 && body.HasBuff(Buffs.Immune) && body.HasBuff(Buffs.ImmuneToDebuffCooldown) && ItemChanges.raincoatEnable.Value) { __result = 0f; } BoneVisor val = default(BoneVisor); if (!ItemChanges.HasBubbetsItems || !ItemChanges.boneVisorEnable.Value || !SharedBase.TryGetInstance(ref val)) { return; } int itemCountEffective = inventory.GetItemCountEffective(((ItemBase)val).ItemDef); if (itemCountEffective <= 0) { itemCountEffective = 1; } int buffCount = body.GetBuffCount(BoneVisor.BuffDef); if (buffCount > 0) { float num = buffCount; float maxBarrier = body.maxBarrier; if (__instance.barrier >= maxBarrier) { __result = __instance.barrier - maxBarrier; } else { __result = -0.01f * maxBarrier * num; } } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }