Decompiled source of FlatItemBuff v1.23.4

plugins/FlatItemBuff.dll

Decompiled 2 months ago
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security.Permissions;
using AssistManager;
using AssistManager.VanillaTweaks;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.Bandit2;
using EntityStates.Croco;
using EntityStates.Squid.SquidWeapon;
using EntityStates.TeleporterHealNovaController;
using FlatItemBuff.Components;
using FlatItemBuff.Items;
using FlatItemBuff.Items.Behaviors;
using FlatItemBuff.Orbs;
using FlatItemBuff.Utils;
using IL.EntityStates;
using IL.EntityStates.Squid.SquidWeapon;
using IL.EntityStates.TeleporterHealNovaController;
using IL.RoR2;
using IL.RoR2.Items;
using KinematicCharacterController;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates.TeleporterHealNovaController;
using On.RoR2;
using On.RoR2.Items;
using On.RoR2.Projectile;
using On.RoR2.Stats;
using R2API;
using RoR2;
using RoR2.CharacterAI;
using RoR2.Items;
using RoR2.Navigation;
using RoR2.Orbs;
using RoR2.Projectile;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("FlatItemBuff")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FlatItemBuff")]
[assembly: AssemblyTitle("FlatItemBuff")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
namespace FlatItemBuff
{
	public static class Configs
	{
		public static ConfigFile GeneralConfig;

		public static ConfigFile Item_Common_Config;

		public static ConfigFile Item_Uncommon_Config;

		public static ConfigFile Item_Legendary_Config;

		public static ConfigFile Item_Yellow_Config;

		public static ConfigFile Item_Void_Config;

		private const string Section_AntlerShield_Rework = "Antler Shield Rework";

		private const string Section_BisonSteak_Buff = "Bison Steak";

		private const string Section_BisonSteak_Rework = "Bison Steak Rework";

		private const string Section_KnockbackFin_Buff = "Knockback Fin";

		private const string Section_TopazBrooch_Buff = "Topaz Brooch";

		private const string Section_RollOfPennies_Rework = "Roll of Pennies Rework";

		private const string Section_Chronobauble_Buff = "Chronobauble";

		private const string Section_DeathMark_Buff = "Death Mark";

		private const string Section_LeptonDaisy_Buff = "Lepton Daisy";

		private const string Section_LeechingSeed_Buff = "Leeching Seed";

		private const string Section_LeechingSeed_Rework = "Leeching Seed Rework";

		private const string Section_IgnitionTank_Rework = "Ignition Tank Rework";

		private const string Section_Infusion_Buff = "Infusion";

		private const string Section_WarHorn_Buff = "War Horn";

		private const string Section_HuntersHarpoon_Buff = "Hunters Harpoon";

		private const string Section_SquidPolyp_Buff = "Squid Polyp";

		private const string Section_Stealthkit_Buff = "Old War Stealthkit";

		private const string Section_UnstableTransmitter_Rework = "Unstable Transmitter";

		private const string Section_WaxQuail_Buff = "Wax Quail";

		private const string Section_Aegis_Buff = "Aegis";

		private const string Section_BensRaincoat_Buff = "Bens Raincoat";

		private const string Section_HappiestMask_Rework = "Happiest Mask Rework";

		private const string Section_LaserScope_Buff = "Laser Scope";

		private const string Section_SonorousWhispers_Rework = "Sonorous Whispers Rework";

		private const string Section_SymbioticScorpion_Rework = "Symbiotic Scorpion Rework";

		private const string Section_Planula_Buff = "Planula";

		private const string Section_Planula_Rework = "Planula Rework";

		private const string Section_TitanicKnurl_Buff = "Titanic Knurl";

		private const string Section_TitanicKnurl_Rework = "Titanic Knurl Rework";

		private const string Section_DefenseNucleus_Buff = "Defense Nucleus";

		private const string Section_DefenseNucleus_Rework = "Defense Nucleus Rework";

		private const string Section_DefenseNucleus_Shared = "Alpha Construct Ally";

		private const string Section_LigmaLenses_Buff = "Lost Seers Lenses";

		private const string Section_VoidsentFlame_Buff = "Voidsent Flame";

		private const string Section_NewlyHatchedZoea_Rework = "Newly Hatched Zoea Rework";

		private const string Label_EnableBuff = "Enable Changes";

		private const string Label_EnableRework = "Enable Rework";

		private const string Desc_EnableBuff = "Enables changes for this item.";

		private const string Desc_EnableRework = "Enables the rework for this item. Has priority over the the normal changes.";

		private const string Section_General_Mechanics = "Mechanics";

		private const string Label_AssistManager = "Enable Kill Assists";

		private const string Desc_AssistManager = "Allows on kill effects from this item to work with AssistManager.";

		public static string ConfigFolderPath => Path.Combine(Paths.ConfigPath, MainPlugin.pluginInfo.Metadata.GUID);

		public static void Setup()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Expected O, but got Unknown
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Expected O, but got Unknown
			GeneralConfig = new ConfigFile(Path.Combine(ConfigFolderPath, "General.cfg"), true);
			Item_Common_Config = new ConfigFile(Path.Combine(ConfigFolderPath, "Items_Common.cfg"), true);
			Item_Uncommon_Config = new ConfigFile(Path.Combine(ConfigFolderPath, "Items_Uncommon.cfg"), true);
			Item_Legendary_Config = new ConfigFile(Path.Combine(ConfigFolderPath, "Items_Legendary.cfg"), true);
			Item_Yellow_Config = new ConfigFile(Path.Combine(ConfigFolderPath, "Items_Yellow.cfg"), true);
			Item_Void_Config = new ConfigFile(Path.Combine(ConfigFolderPath, "Items_Void.cfg"), true);
			Read_AntlerShield();
			Read_BisonSteak();
			Read_KnockbackFin();
			Read_TopazBrooch();
			Read_RollOfPennies();
			Read_Chronobauble();
			Read_DeathMark();
			Read_HuntersHarpoon();
			Read_IgnitionTank();
			Read_Infusion();
			Read_LeechingSeed();
			Read_LeptonDaisy();
			Read_SquidPolyp();
			Read_Stealthkit();
			Read_UnstableTransmitter();
			Read_WarHorn();
			Read_WaxQuail();
			Read_Aegis();
			Read_BensRaincoat();
			Read_HappiestMask_Rework();
			Read_LaserScope();
			Read_SonorousWhispers();
			Read_SymbioticScorpion();
			Read_Planula();
			Read_TitanicKnurl();
			Read_DefenseNucleus();
			Read_LigmaLenses();
			Read_VoidsentFlame();
			Read_NewlyHatchedZoea();
			Read_General();
		}

		private static void Read_General()
		{
			GeneralChanges.TweakBarrierDecay = GeneralConfig.Bind<bool>("Mechanics", "Tweak Barrier Decay", false, "Changes barrier decay to scale from max health + shields instead of max barrier, recommended and specifically catered for Aegis changes.").Value;
		}

		private static void Read_AntlerShield()
		{
			AntlerShield_Rework.Enable = Item_Common_Config.Bind<bool>("Antler Shield Rework", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			AntlerShield_Rework.StackArmor = Item_Common_Config.Bind<float>("Antler Shield Rework", "Stack Armor", 5f, "Armor each stack gives.").Value;
			AntlerShield_Rework.StackSpeed = Item_Common_Config.Bind<float>("Antler Shield Rework", "Stack Movement Speed", 0.07f, "Movement speed each stack gives.").Value;
		}

		private static void Read_BisonSteak()
		{
			BisonSteak.Enable = Item_Common_Config.Bind<bool>("Bison Steak", "Enable Changes", false, "Enables changes for this item.").Value;
			BisonSteak.BaseHP = Item_Common_Config.Bind<float>("Bison Steak", "Base HP", 10f, "Health each stack gives.").Value;
			BisonSteak.LevelHP = Item_Common_Config.Bind<float>("Bison Steak", "Level HP", 3f, "Health each stack gives per level.").Value;
			BisonSteak_Rework.Enable = Item_Common_Config.Bind<bool>("Bison Steak Rework", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			BisonSteak_Rework.BaseRegen = Item_Common_Config.Bind<float>("Bison Steak Rework", "Base Regen", 1f, "Health regen at a single stack. (Scales with level)").Value;
			BisonSteak_Rework.StackRegen = Item_Common_Config.Bind<float>("Bison Steak Rework", "Stack Regen", 0f, "Health regen for each additional stack. (Scales with level)").Value;
			BisonSteak_Rework.BaseDuration = Item_Common_Config.Bind<float>("Bison Steak Rework", "Base Regen Duration", 3f, "Duration of the regen buff at a single stack.").Value;
			BisonSteak_Rework.StackDuration = Item_Common_Config.Bind<float>("Bison Steak Rework", "Stack Regen Duration", 3f, "Duration of the regen buff for each additional stack.").Value;
			BisonSteak_Rework.ExtendDuration = Item_Common_Config.Bind<float>("Bison Steak Rework", "Extend Duration", 1f, "How much to extend the effect duration on kill.").Value;
			BisonSteak_Rework.NerfFakeKill = Item_Common_Config.Bind<bool>("Bison Steak Rework", "Nerf Fake Kills", false, "Prevents fake kills from extending the duration.").Value;
			BisonSteak_Rework.Comp_AssistManager = Item_Common_Config.Bind<bool>("Bison Steak Rework", "Enable Kill Assists", true, "Allows on kill effects from this item to work with AssistManager.").Value;
		}

		private static void Read_KnockbackFin()
		{
			KnockbackFin.Enable = Item_Common_Config.Bind<bool>("Knockback Fin", "Enable Changes", false, "Enables changes for this item.").Value;
			KnockbackFin.BaseForce = Item_Common_Config.Bind<float>("Knockback Fin", "Base Force", 20f, "Vertical force at a single stack.").Value;
			KnockbackFin.StackForce = Item_Common_Config.Bind<float>("Knockback Fin", "Stack Force", 2f, "Vertical force for each additional stack.").Value;
			KnockbackFin.BackForce = Item_Common_Config.Bind<float>("Knockback Fin", "Push Force", 0.5f, "How much to push away, is multiplied by the vertical force.").Value;
			KnockbackFin.ChampionMult = Item_Common_Config.Bind<float>("Knockback Fin", "Champion Force Mult", 0.5f, "Force multiplier for champion targets.").Value;
			KnockbackFin.BossMult = Item_Common_Config.Bind<float>("Knockback Fin", "Boss Force Mult", 1f, "Force multiplier for boss targets.").Value;
			KnockbackFin.FlyingMult = Item_Common_Config.Bind<float>("Knockback Fin", "Flying Force Mult", 1f, "Force multiplier for flying targets.").Value;
			KnockbackFin.MaxForce = Item_Common_Config.Bind<float>("Knockback Fin", "Max Force", 200f, "The limit on how much force can be gained from stacking the item.").Value;
			KnockbackFin.BaseRadius = Item_Common_Config.Bind<float>("Knockback Fin", "Base Radius", 12f, "Radius in metres for the impact. (Set to 0 to completely disable the Impact and its damage.)").Value;
			KnockbackFin.BaseDamage = Item_Common_Config.Bind<float>("Knockback Fin", "Base Damage", 1f, "Impact damage at a single stack.").Value;
			KnockbackFin.StackDamage = Item_Common_Config.Bind<float>("Knockback Fin", "Stack Damage", 0.1f, "Impact damage for each additional stack.").Value;
			KnockbackFin.MaxDistDamage = Item_Common_Config.Bind<float>("Knockback Fin", "Velocity Damage", 10f, "Maximum damage multiplier that can be achieved through velocity.").Value;
			KnockbackFin.ProcRate = Item_Common_Config.Bind<float>("Knockback Fin", "Proc Coefficient", 0f, "Impact proc coefficient. (It can proc itself)").Value;
			KnockbackFin.DoStun = Item_Common_Config.Bind<bool>("Knockback Fin", "Stun", true, "Stuns launched targets when they impact the ground.").Value;
			KnockbackFin.CreditFall = Item_Common_Config.Bind<bool>("Knockback Fin", "Credit Fall Damage", false, "Credits any fall damage the target takes to the inflictor of the knockback.").Value;
			KnockbackFin.Cooldown = Item_Common_Config.Bind<int>("Knockback Fin", "Cooldown", 5, "The cooldown between knockbacks.").Value;
		}

		private static void Read_TopazBrooch()
		{
			TopazBrooch.Enable = Item_Common_Config.Bind<bool>("Topaz Brooch", "Enable Changes", false, "Enables changes for this item.").Value;
			TopazBrooch.BaseFlatBarrier = Item_Common_Config.Bind<float>("Topaz Brooch", "Base Flat Barrier", 8f, "Flat amount of barrier given at a single stack.").Value;
			TopazBrooch.StackFlatBarrier = Item_Common_Config.Bind<float>("Topaz Brooch", "Stack Flat Barrier", 0f, "Flat amount of barrier given for each additional stack.").Value;
			TopazBrooch.BaseCentBarrier = Item_Common_Config.Bind<float>("Topaz Brooch", "Base Percent Barrier", 0.02f, "Percent amount of barrier given at a single stack.").Value;
			TopazBrooch.StackCentBarrier = Item_Common_Config.Bind<float>("Topaz Brooch", "Stack Percent Barrier", 0.02f, "Percent amount of barrier given for each additional stack.").Value;
			TopazBrooch.Comp_AssistManager = Item_Common_Config.Bind<bool>("Topaz Brooch", "Enable Kill Assists", true, "Allows on kill effects from this item to work with AssistManager.").Value;
		}

		private static void Read_RollOfPennies()
		{
			RollOfPennies_Rework.Enable = Item_Common_Config.Bind<bool>("Roll of Pennies Rework", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			RollOfPennies_Rework.BaseGold = Item_Common_Config.Bind<float>("Roll of Pennies Rework", "Base Gold", 3f, "Gold amount given at a single stack.").Value;
			RollOfPennies_Rework.StackGold = Item_Common_Config.Bind<float>("Roll of Pennies Rework", "Stack Gold", 0f, "Gold amount given for each additional stack.").Value;
			RollOfPennies_Rework.BaseArmor = Item_Common_Config.Bind<float>("Roll of Pennies Rework", "Base Armor", 5f, "Armor given at a single stack.").Value;
			RollOfPennies_Rework.StackArmor = Item_Common_Config.Bind<float>("Roll of Pennies Rework", "Stack Armor", 0f, "Armor given for each additional stack.").Value;
			RollOfPennies_Rework.BaseDuration = Item_Common_Config.Bind<float>("Roll of Pennies Rework", "Base Armor Duration", 2f, "Duration given to the armor at a single stack.").Value;
			RollOfPennies_Rework.StackDuration = Item_Common_Config.Bind<float>("Roll of Pennies Rework", "Stack Armor Duration", 2f, "Duration given to the armor for each additional stack.").Value;
			RollOfPennies_Rework.GoldDuration = Item_Common_Config.Bind<float>("Roll of Pennies Rework", "Gold Armor Duration", 0.5f, "Multiplier for the gold's value when calculating the extra duration.").Value;
		}

		private static void Read_Chronobauble()
		{
			Chronobauble.Enable = Item_Uncommon_Config.Bind<bool>("Chronobauble", "Enable Changes", false, "Enables changes for this item.").Value;
			Chronobauble.SlowDown = Item_Uncommon_Config.Bind<float>("Chronobauble", "Move Speed Reduction", 0.6f, "Move Speed debuff amount.").Value;
			Chronobauble.AttackDown = Item_Uncommon_Config.Bind<float>("Chronobauble", "Attack Speed Reduction", 0.3f, "Attack Speed debuff amount.").Value;
			Chronobauble.BaseDuration = Item_Uncommon_Config.Bind<float>("Chronobauble", "Base Duration", 2f, "Debuff duration at a single stack.").Value;
			Chronobauble.StackDuration = Item_Uncommon_Config.Bind<float>("Chronobauble", "Stack Duration", 2f, "Debuff duration for each additional.").Value;
		}

		private static void Read_DeathMark()
		{
			DeathMark.Enable = Item_Uncommon_Config.Bind<bool>("Death Mark", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			DeathMark.BaseDuration = Item_Uncommon_Config.Bind<float>("Death Mark", "Base Duration", 6f, "Duration of the Death Mark at a single stack.").Value;
			DeathMark.StackDuration = Item_Uncommon_Config.Bind<float>("Death Mark", "Stack Duration", 4f, "Duration of the Death Mark for each additional stack.").Value;
			DeathMark.DamagePerDebuff = Item_Uncommon_Config.Bind<float>("Death Mark", "Damage Per Debuff", 0.1f, "Damage take per debuff.").Value;
			DeathMark.MaxDebuffs = Item_Uncommon_Config.Bind<int>("Death Mark", "Max Debuffs", 5, "The max amount of debuff that can increase damage.").Value;
		}

		private static void Read_LeptonDaisy()
		{
			LeptonDaisy.Enable = Item_Uncommon_Config.Bind<bool>("Lepton Daisy", "Enable Changes", false, "Enables changes for this item.").Value;
			LeptonDaisy.BaseHeal = Item_Uncommon_Config.Bind<float>("Lepton Daisy", "Base Healing", 0.1f, "Healing at a single stack.").Value;
			LeptonDaisy.StackHeal = Item_Uncommon_Config.Bind<float>("Lepton Daisy", "Stack Healing", 0.05f, "Healing for each additional stack.").Value;
			LeptonDaisy.Cooldown = Item_Uncommon_Config.Bind<float>("Lepton Daisy", "Cooldown", 10f, "Cooldown of the healing nova.").Value;
		}

		private static void Read_IgnitionTank()
		{
			IgnitionTank_Rework.Enable = Item_Uncommon_Config.Bind<bool>("Ignition Tank Rework", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			IgnitionTank_Rework.BurnChance = Item_Uncommon_Config.Bind<float>("Ignition Tank Rework", "Burn Chance", 10f, "Chance to Burn on hit.").Value;
			IgnitionTank_Rework.BurnBaseDamage = Item_Uncommon_Config.Bind<float>("Ignition Tank Rework", "Burn Damage", 0.8f, "How much damage Burn deals per second.").Value;
			IgnitionTank_Rework.BurnDuration = Item_Uncommon_Config.Bind<float>("Ignition Tank Rework", "Burn Duration", 3f, "How long in seconds Burn lasts for.").Value;
			IgnitionTank_Rework.BlastTicks = Item_Uncommon_Config.Bind<int>("Ignition Tank Rework", "Explode Ticks", 10, "Explodes after X instances of damage over time.").Value;
			IgnitionTank_Rework.BlastChance = Item_Uncommon_Config.Bind<float>("Ignition Tank Rework", "Explode Chance", 0f, "Chance of damage over time to cause explosions. (Overrides Explode Ticks)").Value;
			IgnitionTank_Rework.BlastBaseDamage = Item_Uncommon_Config.Bind<float>("Ignition Tank Rework", "Explosion Base Damage", 3f, "Damage the explosion deals at a single stack.").Value;
			IgnitionTank_Rework.BlastStackDamage = Item_Uncommon_Config.Bind<float>("Ignition Tank Rework", "Explosion Stack Damage", 2f, "Extra damage the explosion deals for each additional stack.").Value;
			IgnitionTank_Rework.BlastBaseRadius = Item_Uncommon_Config.Bind<float>("Ignition Tank Rework", "Explosion Base Radius", 12f, "Radius of the the explosion at a single stack.").Value;
			IgnitionTank_Rework.BlastStackRadius = Item_Uncommon_Config.Bind<float>("Ignition Tank Rework", "Explosion Stack Radius", 2.4f, "Extra explosion radius for each additional stack.").Value;
			IgnitionTank_Rework.BlastInheritDamageType = Item_Uncommon_Config.Bind<bool>("Ignition Tank Rework", "Explosion Inherit Damage Type", false, "Makes the explosion inherit the damage types used from the hit that procced. (For example it would make the explosion non-lethal if it was from Acrid's poison)").Value;
			IgnitionTank_Rework.BlastRollCrit = Item_Uncommon_Config.Bind<bool>("Ignition Tank Rework", "Explosion Roll Crits", false, "Allows the explosion to roll for crits, it will still inherit crits from the hit that procced regardless of this setting.").Value;
		}

		private static void Read_Infusion()
		{
			Infusion.Enable = Item_Uncommon_Config.Bind<bool>("Infusion", "Enable Changes", false, "Enables changes for this item.").Value;
			Infusion.StackLevel = Item_Uncommon_Config.Bind<int>("Infusion", "Stack Level", 2, "Number of levels gained per stack.").Value;
			Infusion.Infinite = Item_Uncommon_Config.Bind<bool>("Infusion", "Soft Cap", true, "Allows samples to be collected beyond the cap with diminishing returns.").Value;
			Infusion.Inherit = Item_Uncommon_Config.Bind<bool>("Infusion", "Inherit", true, "Should your minions with infusions inherit your count.").Value;
			Infusion.ChampionGain = Item_Uncommon_Config.Bind<int>("Infusion", "Champion Value", 5, "Sample value of champion enemies. (Wandering Vagrant, Magma Worm, etc)").Value;
			Infusion.EliteGainMult = Item_Uncommon_Config.Bind<int>("Infusion", "Elite Multiplier", 3, "Sample value multiplier from elite enemies.").Value;
			Infusion.BossGainMult = Item_Uncommon_Config.Bind<int>("Infusion", "Boss Multiplier", 2, "Sample value multiplier from boss enemies.").Value;
			Infusion.Comp_AssistManager = Item_Uncommon_Config.Bind<bool>("Infusion", "Enable Kill Assists", true, "Allows on kill effects from this item to work with AssistManager.").Value;
		}

		private static void Read_LeechingSeed()
		{
			LeechingSeed.Enable = Item_Uncommon_Config.Bind<bool>("Leeching Seed", "Enable Changes", false, "Enables changes for this item.").Value;
			LeechingSeed.ProcHeal = Item_Uncommon_Config.Bind<float>("Leeching Seed", "Proc Healing", 1f, "Healing amount that's affected by proc coefficient.").Value;
			LeechingSeed.BaseHeal = Item_Uncommon_Config.Bind<float>("Leeching Seed", "Base Healing", 1f, "Extra healing amount regardless of proc coefficient.").Value;
			LeechingSeed_Rework.Enable = Item_Uncommon_Config.Bind<bool>("Leeching Seed Rework", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			LeechingSeed_Rework.BaseDoTHeal = Item_Uncommon_Config.Bind<float>("Leeching Seed Rework", "Base DoT Healing", 1f, "Healing amount given from damage over time ticks at a single stack.").Value;
			LeechingSeed_Rework.StackDoTHeal = Item_Uncommon_Config.Bind<float>("Leeching Seed Rework", "Stack DoT Healing", 1f, "Healing amount given from damage over time for each additional stack.").Value;
			LeechingSeed_Rework.ScaleToTickRate = Item_Uncommon_Config.Bind<bool>("Leeching Seed Rework", "Scale To Tick Rate", true, "Healing amount scales with how often the damager over time ticks, slower tick rates give more healing.").Value;
			LeechingSeed_Rework.LeechChance = Item_Uncommon_Config.Bind<float>("Leeching Seed Rework", "Leech Chance", 20f, "Chance of applying the Leech debuff.").Value;
			LeechingSeed_Rework.LeechLifeSteal = Item_Uncommon_Config.Bind<float>("Leeching Seed Rework", "Leech Life Steal", 1f, "Percent of damage received as healing when damaging a target with Leech. (Gets scaled by the attacker's damage stat.)").Value;
			LeechingSeed_Rework.LeechBaseDamage = Item_Uncommon_Config.Bind<float>("Leeching Seed Rework", "Leech Base Damage", 2.5f, "Damage of the Leech at a single stack.").Value;
			LeechingSeed_Rework.LeechStackDamage = Item_Uncommon_Config.Bind<float>("Leeching Seed Rework", "Leech Stack Damage", 0f, "Damage of the Leech for each additional stack.").Value;
			LeechingSeed_Rework.LeechBaseDuration = Item_Uncommon_Config.Bind<float>("Leeching Seed Rework", "Leech Base Duration", 5f, "Duration of the Leech debuff.").Value;
		}

		private static void Read_WaxQuail()
		{
			FlatItemBuff.Items.WaxQuail.Enable = Item_Uncommon_Config.Bind<bool>("Wax Quail", "Enable Changes", false, "Enables changes for this item.").Value;
			FlatItemBuff.Items.WaxQuail.BaseHori = Item_Uncommon_Config.Bind<float>("Wax Quail", "Base Horizontal Boost", 12f, "Horizontal force at a single stack.").Value;
			FlatItemBuff.Items.WaxQuail.StackHori = Item_Uncommon_Config.Bind<float>("Wax Quail", "Stack Horizontal Boost", 8f, "Horizontal force for each additional stack.").Value;
			FlatItemBuff.Items.WaxQuail.CapHori = Item_Uncommon_Config.Bind<float>("Wax Quail", "Capped Horizontal Boost", 120f, "Hyperbolic cap to horizontal force. (Set to 0 or less to disable.)").Value;
			FlatItemBuff.Items.WaxQuail.BaseVert = Item_Uncommon_Config.Bind<float>("Wax Quail", "Base Vertical Boost", 0.2f, "Vertical force at a single stack.").Value;
			FlatItemBuff.Items.WaxQuail.StackVert = Item_Uncommon_Config.Bind<float>("Wax Quail", "Stack Vertical", 0f, "Vertical force for each additional stack.").Value;
			FlatItemBuff.Items.WaxQuail.CapVert = Item_Uncommon_Config.Bind<float>("Wax Quail", "Capped Vertical Boost", 0f, "Hyperbolic cap to vertical force. (Set to 0 or less to disable.)").Value;
			FlatItemBuff.Items.WaxQuail.BaseAirSpeed = Item_Uncommon_Config.Bind<float>("Wax Quail", "Base Air Speed", 0.12f, "Airborne movement speed at a single stack.").Value;
			FlatItemBuff.Items.WaxQuail.StackAirSpeed = Item_Uncommon_Config.Bind<float>("Wax Quail", "Stack Air Speed", 0.08f, "Airborne movement speed for each additional stack.").Value;
			FlatItemBuff.Items.WaxQuail.CapAirSpeed = Item_Uncommon_Config.Bind<float>("Wax Quail", "Capped Air Speed", 1.2f, "Hyperbolic cap to airborne movement speed. (Set to 0 or less to disable.)").Value;
		}

		private static void Read_Stealthkit()
		{
			Stealthkit.Enable = Item_Uncommon_Config.Bind<bool>("Old War Stealthkit", "Enable Changes", false, "Enables changes for this item.").Value;
			Stealthkit.BaseRecharge = Item_Uncommon_Config.Bind<float>("Old War Stealthkit", "Base Cooldown", 30f, "Cooldown between uses.").Value;
			Stealthkit.StackRecharge = Item_Uncommon_Config.Bind<float>("Old War Stealthkit", "Stack Cooldown", 0.5f, "Cooldown rate for each additional stack.").Value;
			Stealthkit.BuffDuration = Item_Uncommon_Config.Bind<float>("Old War Stealthkit", "Buff Duration", 5f, "Duration of the Stealth buff.").Value;
			Stealthkit.Stealth_MoveSpeed = Item_Uncommon_Config.Bind<float>("Old War Stealthkit", "Stealth Movement Speed", 0.4f, "How much Movement Speed is given from the Stealth buff.").Value;
			Stealthkit.Stealth_ArmorPerBuff = Item_Uncommon_Config.Bind<float>("Old War Stealthkit", "Stealth Armor", 20f, "How much Armor to give per stack of the Stealth buff.").Value;
			Stealthkit.CancelDanger = Item_Uncommon_Config.Bind<bool>("Old War Stealthkit", "Cancel Danger", true, "Puts you in 'Out of Danger' upon activation.").Value;
			Stealthkit.CleanseDoT = Item_Uncommon_Config.Bind<bool>("Old War Stealthkit", "Clean DoTs", true, "Removes damage over time effects upon activation.").Value;
			Stealthkit.SmokeBomb = Item_Uncommon_Config.Bind<bool>("Old War Stealthkit", "Smoke Bomb", true, "Causes a stunning smoke bomb effect upon activation.").Value;
		}

		private static void Read_UnstableTransmitter()
		{
			FlatItemBuff.Items.UnstableTransmitter_Rework.Enable = Item_Uncommon_Config.Bind<bool>("Unstable Transmitter", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.BaseCooldown = Item_Uncommon_Config.Bind<float>("Unstable Transmitter", "Base Cooldown", 30f, "Cooldown between activations.").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.AllyStackCooldown = Item_Uncommon_Config.Bind<float>("Unstable Transmitter", "Ally Cooldown", 0.5f, "Cooldown reduction per ally owned.").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.CapCooldown = Item_Uncommon_Config.Bind<float>("Unstable Transmitter", "Cap Cooldown", 1f, "The lowest the cooldown can go.").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.BaseDamage = Item_Uncommon_Config.Bind<float>("Unstable Transmitter", "Base Damage", 3.5f, "Damage at a single stack.").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.StackDamage = Item_Uncommon_Config.Bind<float>("Unstable Transmitter", "Stack Damage", 2.8f, "Damage for each additional stack.").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.BaseRadius = Item_Uncommon_Config.Bind<float>("Unstable Transmitter", "Base Radius", 16f, "Blast radius at a single stack.").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.StackRadius = Item_Uncommon_Config.Bind<float>("Unstable Transmitter", "Stack Radius", 0f, "Blast radius for each additional stack.").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.ProcRate = Item_Uncommon_Config.Bind<float>("Unstable Transmitter", "Proc Coefficient", 1f, "The Proc Coefficient of the blast.").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.ProcBands = Item_Uncommon_Config.Bind<bool>("Unstable Transmitter", "Proc Bands", true, "Should the blast proc bands?").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.AllyOwnsDamage = Item_Uncommon_Config.Bind<bool>("Unstable Transmitter", "Ally Owns Damage", false, "Should the ally own the explosion instead of the user?").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.Respawns = Item_Uncommon_Config.Bind<bool>("Unstable Transmitter", "Respawns Minion", false, "Should the Strike Drone that comes with the item respawn if killed?").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.TeleportRadius = Item_Uncommon_Config.Bind<float>("Unstable Transmitter", "Teleport Radius", 40f, "The maximum radius away from the user that allies can be teleported to.").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.TeleFragRadius = Item_Uncommon_Config.Bind<float>("Unstable Transmitter", "Telefrag Radius", 60f, "Enemies within this radius of the user can be purposely telefragged by allies. (Set to 0 or less to disable this behavior.)").Value;
			FlatItemBuff.Items.UnstableTransmitter_Rework.TeleImmobile = Item_Uncommon_Config.Bind<bool>("Unstable Transmitter", "Teleport Immobile", true, "Allows immobile allies to be targeted for teleportation.").Value;
		}

		private static void Read_HuntersHarpoon()
		{
			HuntersHarpoon.Enable = Item_Uncommon_Config.Bind<bool>("Hunters Harpoon", "Enable Changes", false, "Enables changes for this item.").Value;
			HuntersHarpoon.BaseDuration = Item_Uncommon_Config.Bind<float>("Hunters Harpoon", "Base Duration", 1f, "Buff duration at a single stack.").Value;
			HuntersHarpoon.StackDuration = Item_Uncommon_Config.Bind<float>("Hunters Harpoon", "Stack Duration", 1f, "Extra buff duration for each additional stack.").Value;
			HuntersHarpoon.MovementSpeed = Item_Uncommon_Config.Bind<float>("Hunters Harpoon", "Movement Speed Bonus", 1.25f, "Movement speed given from the buff.").Value;
			HuntersHarpoon.ExtendDuration = Item_Uncommon_Config.Bind<bool>("Hunters Harpoon", "Extend Duration", true, "Adds duration to the buff with each kill instead of refreshing it.").Value;
			HuntersHarpoon.BaseCooldownReduction = Item_Uncommon_Config.Bind<float>("Hunters Harpoon", "Cooldown Reduction", 1f, "Cooldown reduction on kill.").Value;
			HuntersHarpoon.CoolPrimary = Item_Uncommon_Config.Bind<bool>("Hunters Harpoon", "Cooldown Primary", false, "Cooldown reduction affects Primary skills?").Value;
			HuntersHarpoon.CoolSecondary = Item_Uncommon_Config.Bind<bool>("Hunters Harpoon", "Cooldown Secondary", true, "Cooldown reduction affects Secondary skills?").Value;
			HuntersHarpoon.CoolUtility = Item_Uncommon_Config.Bind<bool>("Hunters Harpoon", "Cooldown Utility", false, "Cooldown reduction affects Utility skills?").Value;
			HuntersHarpoon.CoolSpecial = Item_Uncommon_Config.Bind<bool>("Hunters Harpoon", "Cooldown Special", false, "Cooldown reduction affects Special skills?").Value;
			HuntersHarpoon.Comp_AssistManager = Item_Uncommon_Config.Bind<bool>("Hunters Harpoon", "Enable Kill Assists", true, "Allows on kill effects from this item to work with AssistManager.").Value;
		}

		private static void Read_SquidPolyp()
		{
			SquidPolyp.Enable = Item_Uncommon_Config.Bind<bool>("Squid Polyp", "Enable Changes", false, "Enables changes for this item.").Value;
			SquidPolyp.ApplyTar = Item_Uncommon_Config.Bind<bool>("Squid Polyp", "Apply Tar", true, "Makes Squid Turrets apply the Tar debuff with their attack.").Value;
			SquidPolyp.BaseDuration = Item_Uncommon_Config.Bind<int>("Squid Polyp", "Base Duration", 25, "Squid Turret duration at a single stack.").Value;
			SquidPolyp.StackDuration = Item_Uncommon_Config.Bind<int>("Squid Polyp", "Stack Duration", 5, "Squid Turret duration for each additional stack.").Value;
			SquidPolyp.StackHealth = Item_Uncommon_Config.Bind<int>("Squid Polyp", "Stack Health", 2, "Extra Squid Turret health for each additional stack. (1 = +10%)").Value;
			SquidPolyp.MaxTurrets = Item_Uncommon_Config.Bind<int>("Squid Polyp", "Max Turrets", 8, "How many Squid Turrets each player can have, newer turrets will replace old ones. (Set to 0 for vanilla behavior.)").Value;
		}

		private static void Read_WarHorn()
		{
			WarHorn.Enable = Item_Uncommon_Config.Bind<bool>("War Horn", "Enable Changes", false, "Enables changes for this item.").Value;
			WarHorn.BaseDuration = Item_Uncommon_Config.Bind<float>("War Horn", "Base Duration", 6f, "Duration at a single stack.").Value;
			WarHorn.StackDuration = Item_Uncommon_Config.Bind<float>("War Horn", "Stack Duration", 3f, "Duration for each additional stack.").Value;
			WarHorn.BaseAttack = Item_Uncommon_Config.Bind<float>("War Horn", "Base Attack", 0.6f, "Attack Speed at a single stack.").Value;
			WarHorn.StackAttack = Item_Uncommon_Config.Bind<float>("War Horn", "Stack Attack", 0.15f, "Attack Speed for each additional stack.").Value;
		}

		private static void Read_Aegis()
		{
			Aegis.Enable = Item_Legendary_Config.Bind<bool>("Aegis", "Enable Changes", false, "Enables changes for this item.").Value;
			Aegis.AllowRegen = Item_Legendary_Config.Bind<bool>("Aegis", "Count Regen", true, "Allows excess regen to be converted into barrier.").Value;
			Aegis.BaseOverheal = Item_Legendary_Config.Bind<float>("Aegis", "Base Overheal", 1f, "Conversion rate of overheal to barrier at single stack.").Value;
			Aegis.StackOverheal = Item_Legendary_Config.Bind<float>("Aegis", "Stack Overheal", 0f, "Conversion rate of overheal to barrier for each additional stack.").Value;
			Aegis.BaseMaxBarrier = Item_Legendary_Config.Bind<float>("Aegis", "Base Max Barrier", 1f, "Increases maximum barrier by this much at single stack.").Value;
			Aegis.StackMaxBarrier = Item_Legendary_Config.Bind<float>("Aegis", "Stack Max Barrier", 1f, "Increases maximum barrier by this much for each additional stack.").Value;
		}

		private static void Read_BensRaincoat()
		{
			BensRaincoat.Enable = Item_Legendary_Config.Bind<bool>("Bens Raincoat", "Enable Changes", false, "Enables changes for this item.").Value;
			BensRaincoat.BaseBlock = Item_Legendary_Config.Bind<int>("Bens Raincoat", "Base Block", 2, "Debuff blocks to give at a single stack.").Value;
			BensRaincoat.StackBlock = Item_Legendary_Config.Bind<int>("Bens Raincoat", "Stack Block", 1, "Debuff blocks to give for each additional stack.").Value;
			BensRaincoat.Cooldown = Item_Legendary_Config.Bind<float>("Bens Raincoat", "Cooldown", 7f, "Time in seconds it takes to restock debuff blocks. (Anything less than 0 will skip this change.)").Value;
			BensRaincoat.GraceTime = Item_Legendary_Config.Bind<float>("Bens Raincoat", "Debuff Grace Time", 0.25f, "Time in seconds after consuming a block that further debuffs are negated for free.").Value;
		}

		private static void Read_HappiestMask_Rework()
		{
			FlatItemBuff.Items.HappiestMask_Rework.Enable = Item_Legendary_Config.Bind<bool>("Happiest Mask Rework", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			FlatItemBuff.Items.HappiestMask_Rework.BaseDamage = Item_Legendary_Config.Bind<float>("Happiest Mask Rework", "Base Damage", 2f, "Damage increase for ghosts at a single stack.").Value;
			FlatItemBuff.Items.HappiestMask_Rework.StackDamage = Item_Legendary_Config.Bind<float>("Happiest Mask Rework", "Stack Damage", 2f, "Damage increase for ghosts for each additional stack.").Value;
			FlatItemBuff.Items.HappiestMask_Rework.BaseMoveSpeed = Item_Legendary_Config.Bind<float>("Happiest Mask Rework", "Movement Speed", 0.45f, "Movement speed increase for ghosts.").Value;
			FlatItemBuff.Items.HappiestMask_Rework.BaseDuration = Item_Legendary_Config.Bind<int>("Happiest Mask Rework", "Duration", 30, "How long in seconds the ghosts lasts before dying.").Value;
			FlatItemBuff.Items.HappiestMask_Rework.BaseCooldown = Item_Legendary_Config.Bind<int>("Happiest Mask Rework", "Cooldown", 3, "How long in seconds until a new ghost is summoned.").Value;
			FlatItemBuff.Items.HappiestMask_Rework.OnKillOnDeath = Item_Legendary_Config.Bind<bool>("Happiest Mask Rework", "On Kill On Death", true, "Credits the ghost's death as your kill.").Value;
			FlatItemBuff.Items.HappiestMask_Rework.PassKillCredit = Item_Legendary_Config.Bind<bool>("Happiest Mask Rework", "Kill Credit Owner", true, "Credits all kills the ghost scores as yours.").Value;
		}

		private static void Read_LaserScope()
		{
			LaserScope.Enable = Item_Legendary_Config.Bind<bool>("Laser Scope", "Enable Changes", false, "Enables changes for this item.").Value;
			LaserScope.BaseCrit = Item_Legendary_Config.Bind<float>("Laser Scope", "Crit Chance", 5f, "Crit chance at a single stack.").Value;
		}

		private static void Read_SonorousWhispers()
		{
			SonorousWhispers_Rework.Enable = Item_Legendary_Config.Bind<bool>("Sonorous Whispers Rework", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			SonorousWhispers_Rework.BasePower = Item_Legendary_Config.Bind<float>("Sonorous Whispers Rework", "Base Power", 1f, "Health and Damage scaling of the monster at a single stack.").Value;
			SonorousWhispers_Rework.StackPower = Item_Legendary_Config.Bind<float>("Sonorous Whispers Rework", "Stack Power", 0f, "Health and Damage scaling of the monster for each additional stack.").Value;
			SonorousWhispers_Rework.BaseDamage = Item_Legendary_Config.Bind<float>("Sonorous Whispers Rework", "Base Damage", 2f, "Damage Bonus the monster gets against non-player targets at a single stack.").Value;
			SonorousWhispers_Rework.StackDamage = Item_Legendary_Config.Bind<float>("Sonorous Whispers Rework", "Stack Damage", 1f, "Damage Bonus the monster gets against non-player targets for each additional stack.").Value;
			SonorousWhispers_Rework.BaseReward = Item_Legendary_Config.Bind<int>("Sonorous Whispers Rework", "Base Rewards", 1, "Rewards dropped upon defeat at a single stack.").Value;
			SonorousWhispers_Rework.StackReward = Item_Legendary_Config.Bind<int>("Sonorous Whispers Rework", "Stack Rewards", 1, "Rewards dropped upon defeat for each additional stack.").Value;
			SonorousWhispers_Rework.RewardLimit = Item_Legendary_Config.Bind<int>("Sonorous Whispers Rework", "Reward Limit", 200, "The maximum amount of rewards the monster can drop, also acts as a cap for other stacking effects.").Value;
			SonorousWhispers_Rework.BaseGold = Item_Legendary_Config.Bind<int>("Sonorous Whispers Rework", "Base Gold", 200, "Gold dropped upon defeat at a single stack.").Value;
			SonorousWhispers_Rework.StackGold = Item_Legendary_Config.Bind<int>("Sonorous Whispers Rework", "Stack Gold", 100, "Gold dropped upon defeat for each additional stack.").Value;
			SonorousWhispers_Rework.ScalePlayer = Item_Legendary_Config.Bind<bool>("Sonorous Whispers Rework", "Player Scaling", true, "Scales the monster's stats and rewards with player count.").Value;
			SonorousWhispers_Rework.IsElite = Item_Legendary_Config.Bind<bool>("Sonorous Whispers Rework", "Elite", true, "Makes the monster always spawn as Gilded, has no affect on stats.").Value;
			SonorousWhispers_Rework.HasAdaptive = Item_Legendary_Config.Bind<bool>("Sonorous Whispers Rework", "Adaptive Armor", false, "Gives the monster adaptive armor.").Value;
		}

		private static void Read_SymbioticScorpion()
		{
			FlatItemBuff.Items.SymbioticScorpion_Rework.Enable = Item_Legendary_Config.Bind<bool>("Symbiotic Scorpion Rework", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			FlatItemBuff.Items.SymbioticScorpion_Rework.Slayer_BaseDamage = Item_Legendary_Config.Bind<float>("Symbiotic Scorpion Rework", "Slayer DoT Base Damage", 2f, "Slayer DoT damage increase at a single stack.").Value;
			FlatItemBuff.Items.SymbioticScorpion_Rework.Slayer_StackDamage = Item_Legendary_Config.Bind<float>("Symbiotic Scorpion Rework", "Slayer DoT Stack Damage", 0f, "Slayer DoT damage increase for each additional stack.").Value;
			FlatItemBuff.Items.SymbioticScorpion_Rework.SlayerDot_AffectTotalDamage = Item_Legendary_Config.Bind<bool>("Symbiotic Scorpion Rework", "Slayer DoT Affects Total Damage", false, "Makes the Slayer DoT affect the total damage for the purpose of proc items. (False = Vanilla)").Value;
			FlatItemBuff.Items.SymbioticScorpion_Rework.Radius = Item_Legendary_Config.Bind<float>("Symbiotic Scorpion Rework", "Venom Radius", 13f, "The targetting radius for the Venom attack. (Set to 0 to disable the effect entirely.)").Value;
			FlatItemBuff.Items.SymbioticScorpion_Rework.Cooldown = Item_Legendary_Config.Bind<float>("Symbiotic Scorpion Rework", "Venom Cooldown", 5f, "Cooldown between Venom attacks.").Value;
			FlatItemBuff.Items.SymbioticScorpion_Rework.VenomBaseDamage = Item_Legendary_Config.Bind<float>("Symbiotic Scorpion Rework", "Venom Base Damage", 6f, "Damage of the Venom at a single stack.").Value;
			FlatItemBuff.Items.SymbioticScorpion_Rework.VenomStackDamage = Item_Legendary_Config.Bind<float>("Symbiotic Scorpion Rework", "Venom Stack Damage", 6f, "Damage of the Venom for each additional stack.").Value;
		}

		private static void Read_Planula()
		{
			Planula.Enable = Item_Yellow_Config.Bind<bool>("Planula", "Enable Changes", false, "Enables changes for this item.").Value;
			Planula.BaseFlatHeal = Item_Yellow_Config.Bind<float>("Planula", "Base Flat Healing", 10f, "Flat healing at a single stack.").Value;
			Planula.StackFlatHeal = Item_Yellow_Config.Bind<float>("Planula", "Stack Flat Healing", 10f, "Flat healing for each additional stack.").Value;
			Planula.BaseMaxHeal = Item_Yellow_Config.Bind<float>("Planula", "Base Max Healing", 0.02f, "Percent healing at a single stack.").Value;
			Planula.StackMaxHeal = Item_Yellow_Config.Bind<float>("Planula", "Stack Max Healing", 0.02f, "Percent healing for each additional stack.").Value;
			FlatItemBuff.Items.Planula_Rework.Enable = Item_Yellow_Config.Bind<bool>("Planula Rework", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			FlatItemBuff.Items.Planula_Rework.BaseDamage = Item_Yellow_Config.Bind<float>("Planula Rework", "Base Damage", 0.8f, "Damage per second the burn deals at a single stack.").Value;
			FlatItemBuff.Items.Planula_Rework.StackDamage = Item_Yellow_Config.Bind<float>("Planula Rework", "Stack Damage", 0.6f, "Damage per second the burn deals for each additional stack.").Value;
			FlatItemBuff.Items.Planula_Rework.Duration = Item_Yellow_Config.Bind<float>("Planula Rework", "Burn Duration", 5f, "Duration of the burn.").Value;
			FlatItemBuff.Items.Planula_Rework.Radius = Item_Yellow_Config.Bind<float>("Planula Rework", "Burn Radius", 15f, "Radius for enemies to be within to start burning.").Value;
		}

		private static void Read_TitanicKnurl()
		{
			TitanicKnurl.Enable = Item_Yellow_Config.Bind<bool>("Titanic Knurl", "Enable Changes", false, "Enables changes for this item.").Value;
			TitanicKnurl.BaseHP = Item_Yellow_Config.Bind<float>("Titanic Knurl", "Base Health", 30f, "Health each stack gives.").Value;
			TitanicKnurl.LevelHP = Item_Yellow_Config.Bind<float>("Titanic Knurl", "Level Health", 9f, "Health each stack gives per level.").Value;
			TitanicKnurl.BaseRegen = Item_Yellow_Config.Bind<float>("Titanic Knurl", "Base Regen", 1.6f, "Health Regen each stack gives.").Value;
			TitanicKnurl.LevelRegen = Item_Yellow_Config.Bind<float>("Titanic Knurl", "Level Regen", 0.32f, "Health Regen each stack gives per level.").Value;
			FlatItemBuff.Items.TitanicKnurl_Rework.Enable = Item_Yellow_Config.Bind<bool>("Titanic Knurl Rework", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			FlatItemBuff.Items.TitanicKnurl_Rework.BaseDamage = Item_Yellow_Config.Bind<float>("Titanic Knurl Rework", "Base Damage", 8f, "Base damage at a single stack.").Value;
			FlatItemBuff.Items.TitanicKnurl_Rework.StackDamage = Item_Yellow_Config.Bind<float>("Titanic Knurl Rework", "Stack Damage", 6f, "Base damage for each additional stack.").Value;
			FlatItemBuff.Items.TitanicKnurl_Rework.BaseCooldown = Item_Yellow_Config.Bind<float>("Titanic Knurl Rework", "Base Cooldown", 6f, "Cooldown at a single stack.").Value;
			FlatItemBuff.Items.TitanicKnurl_Rework.StackCooldown = Item_Yellow_Config.Bind<float>("Titanic Knurl Rework", "Stack Cooldown", 0.25f, "Cooldown rate for each additional stack.").Value;
			FlatItemBuff.Items.TitanicKnurl_Rework.ProcRate = Item_Yellow_Config.Bind<float>("Titanic Knurl Rework", "Proc Coefficient", 1f, "Proc coefficient of the stone fist.").Value;
			FlatItemBuff.Items.TitanicKnurl_Rework.ProcBands = Item_Yellow_Config.Bind<bool>("Titanic Knurl Rework", "Proc Bands", true, "Should the stone fist proc bands?").Value;
			FlatItemBuff.Items.TitanicKnurl_Rework.TargetRadius = Item_Yellow_Config.Bind<float>("Titanic Knurl Rework", "Target Radius", 60f, "Targeting radius in metres.").Value;
			FlatItemBuff.Items.TitanicKnurl_Rework.TargetMode = Item_Yellow_Config.Bind<int>("Titanic Knurl Rework", "Target Mode", 0, "Decides how the target is selected. (0 = Weak, 1 = Closest)").Value;
		}

		private static void Read_DefenseNucleus()
		{
			DefenseNucleus.Enable = Item_Yellow_Config.Bind<bool>("Defense Nucleus", "Enable Changes", false, "Enables changes for this item.").Value;
			DefenseNucleus.BaseHealth = Item_Yellow_Config.Bind<int>("Defense Nucleus", "Base Health", 10, "Extra health the construct gets at a single stack. (1 = +10%)").Value;
			DefenseNucleus.StackHealth = Item_Yellow_Config.Bind<int>("Defense Nucleus", "Stack Health", 10, "Extra health the construct gets for each additional stack.").Value;
			DefenseNucleus.BaseAttack = Item_Yellow_Config.Bind<int>("Defense Nucleus", "Base Attack Speed", 3, "Extra attack speed the construct gets at a single stack. (1 = +10%)").Value;
			DefenseNucleus.StackAttack = Item_Yellow_Config.Bind<int>("Defense Nucleus", "Stack Attack Speed", 0, "Extra attack speed the construct gets for each additional stack.").Value;
			DefenseNucleus.BaseDamage = Item_Yellow_Config.Bind<int>("Defense Nucleus", "Base Damage", 0, "Extra damage the construct gets at a single stack. (1 = +10%)").Value;
			DefenseNucleus.StackDamage = Item_Yellow_Config.Bind<int>("Defense Nucleus", "Stack Damage", 5, "Extra damage the construct gets for each additional stack.").Value;
			DefenseNucleus.Comp_AssistManager = Item_Yellow_Config.Bind<bool>("Defense Nucleus", "Enable Kill Assists", false, "Allows on kill effects from this item to work with AssistManager.").Value;
			DefenseNucleus_Rework.Enable = Item_Yellow_Config.Bind<bool>("Defense Nucleus Rework", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			DefenseNucleus_Rework.SummonCount = Item_Yellow_Config.Bind<int>("Defense Nucleus Rework", "Summon Count", 3, "How many constructs to summon on activation. (Cannot go above 8 because I said so.)").Value;
			DefenseNucleus_Rework.BaseHealth = Item_Yellow_Config.Bind<int>("Defense Nucleus Rework", "Base Health", 10, "Extra health the construct gets at a single stack. (1 = +10%)").Value;
			DefenseNucleus_Rework.StackHealth = Item_Yellow_Config.Bind<int>("Defense Nucleus Rework", "Stack Health", 10, "Extra health the construct gets for each additional stack.").Value;
			DefenseNucleus_Rework.BaseAttack = Item_Yellow_Config.Bind<int>("Defense Nucleus Rework", "Base Attack Speed", 3, "Extra attack speed the construct gets at a single stack. (1 = +10%)").Value;
			DefenseNucleus_Rework.StackAttack = Item_Yellow_Config.Bind<int>("Defense Nucleus Rework", "Stack Attack Speed", 0, "Extra attack speed the construct gets for each additional stack.").Value;
			DefenseNucleus_Rework.BaseDamage = Item_Yellow_Config.Bind<int>("Defense Nucleus Rework", "Base Damage", 0, "Extra damage the construct gets at a single stack. (1 = +10%)").Value;
			DefenseNucleus_Rework.StackDamage = Item_Yellow_Config.Bind<int>("Defense Nucleus Rework", "Stack Damage", 5, "Extra damage the construct gets for each additional stack.").Value;
			DefenseNucleus_Rework.ShieldBaseDuration = Item_Yellow_Config.Bind<float>("Defense Nucleus Rework", "Shield Base Duration", 5f, "Duration of the projectile shield at a single stack.").Value;
			DefenseNucleus_Rework.ShieldStackDuration = Item_Yellow_Config.Bind<float>("Defense Nucleus Rework", "Shield Stack Duration", 2f, "Duration of the projectile shield for each additional stack.").Value;
			DefenseNucleus_Shared.TweakAI = Item_Yellow_Config.Bind<bool>("Alpha Construct Ally", "Better AI", false, "Gives 360 Degree vision and prevents retaliation against allies.").Value;
			DefenseNucleus_Shared.ForceMechanical = Item_Yellow_Config.Bind<bool>("Alpha Construct Ally", "Is Mechanical", false, "Gives it the Mechanical flag, allowing it to get Spare Drone Parts and Captain's Microbots.").Value;
			DefenseNucleus_Shared.ExtraDisplays = Item_Yellow_Config.Bind<bool>("Alpha Construct Ally", "Modded Displays", false, "Adds Spare Drone Parts item displays to the Alpha Construct.").Value;
		}

		private static void Read_LigmaLenses()
		{
			LigmaLenses.Enable = Item_Void_Config.Bind<bool>("Lost Seers Lenses", "Enable Changes", false, "Enables changes for this item.").Value;
			LigmaLenses.BaseChance = Item_Void_Config.Bind<float>("Lost Seers Lenses", "Base Chance", 0.5f, "Detain chance at a single stack.").Value;
			LigmaLenses.StackChance = Item_Void_Config.Bind<float>("Lost Seers Lenses", "Stack Chance", 0.5f, "Detain chance for each additional stack.").Value;
			LigmaLenses.BaseDamage = Item_Void_Config.Bind<float>("Lost Seers Lenses", "Base Damage", 50f, "Base damage at a single stack.").Value;
			LigmaLenses.StackDamage = Item_Void_Config.Bind<float>("Lost Seers Lenses", "Stack Damage", 0f, "Base damage for each additional stack.").Value;
			LigmaLenses.UseTotalDamage = Item_Void_Config.Bind<bool>("Lost Seers Lenses", "Deal Total", false, "Deal Total Damage of the attack instead of the attacker's damage stat?").Value;
		}

		private static void Read_VoidsentFlame()
		{
			VoidsentFlame.Enable = Item_Void_Config.Bind<bool>("Voidsent Flame", "Enable Changes", false, "Enables changes for this item.").Value;
			VoidsentFlame.BaseRadius = Item_Void_Config.Bind<float>("Voidsent Flame", "Base Radius", 12f, "Blast radius at a single stack.").Value;
			VoidsentFlame.StackRadius = Item_Void_Config.Bind<float>("Voidsent Flame", "Stack Radius", 2.4f, "Extra blast radius for each additional stack.").Value;
			VoidsentFlame.BaseDamage = Item_Void_Config.Bind<float>("Voidsent Flame", "Base Damage", 2.6f, "Blast damage at a single stack.").Value;
			VoidsentFlame.StackDamage = Item_Void_Config.Bind<float>("Voidsent Flame", "Stack Damage", 1.56f, "Blast damage for each additional stack.").Value;
			VoidsentFlame.ProcRate = Item_Void_Config.Bind<float>("Voidsent Flame", "Proc Coefficient", 1f, "Blast proc coefficient.").Value;
		}

		private static void Read_NewlyHatchedZoea()
		{
			FlatItemBuff.Items.NewlyHatchedZoea_Rework.Enable = Item_Void_Config.Bind<bool>("Newly Hatched Zoea Rework", "Enable Rework", false, "Enables the rework for this item. Has priority over the the normal changes.").Value;
			FlatItemBuff.Items.NewlyHatchedZoea_Rework.BaseStock = Item_Void_Config.Bind<int>("Newly Hatched Zoea Rework", "Base Stock", 12, "How many missiles to store at a single stack.").Value;
			FlatItemBuff.Items.NewlyHatchedZoea_Rework.StackStock = Item_Void_Config.Bind<int>("Newly Hatched Zoea Rework", "Stack Stock", 4, "Extra missiles for each additional stack.").Value;
			FlatItemBuff.Items.NewlyHatchedZoea_Rework.BaseDamage = Item_Void_Config.Bind<float>("Newly Hatched Zoea Rework", "Base Damage", 3f, "Missile damage at a single stack.").Value;
			FlatItemBuff.Items.NewlyHatchedZoea_Rework.StackDamage = Item_Void_Config.Bind<float>("Newly Hatched Zoea Rework", "Stack Damage", 0.75f, "Missile damage for each additional stack.").Value;
			FlatItemBuff.Items.NewlyHatchedZoea_Rework.ProcRate = Item_Void_Config.Bind<float>("Newly Hatched Zoea Rework", "Proc Coefficient", 0.2f, "Missile proc coefficient.").Value;
			FlatItemBuff.Items.NewlyHatchedZoea_Rework.RestockTime = Item_Void_Config.Bind<int>("Newly Hatched Zoea Rework", "Restock Time", 30, "How long it takes in seconds to fully restock.").Value;
			FlatItemBuff.Items.NewlyHatchedZoea_Rework.CanCorrupt = Item_Void_Config.Bind<bool>("Newly Hatched Zoea Rework", "Allow Corruption", true, "Set to false to disable the item corruption effect.").Value;
			FlatItemBuff.Items.NewlyHatchedZoea_Rework.CorruptList = Item_Void_Config.Bind<string>("Newly Hatched Zoea Rework", "Corruption List", "", "List of items that this item will corrupt. (Leave blank for vanilla values.)").Value;
			FlatItemBuff.Items.NewlyHatchedZoea_Rework.CorruptText = Item_Void_Config.Bind<string>("Newly Hatched Zoea Rework", "Corruption Text", "<style=cIsTierBoss>yellow items</style>", "The item(s) for the \"Corrupts all X\" text.").Value;
		}
	}
	public class GeneralChanges
	{
		internal static bool TweakBarrierDecay;

		public GeneralChanges()
		{
			MainPlugin.ModLogger.LogInfo((object)"Performing general changes.");
			Hooks();
		}

		private void Hooks()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			if (TweakBarrierDecay)
			{
				MainPlugin.ModLogger.LogInfo((object)"Attempting IL to tweak barrier decay.");
				CharacterBody.RecalculateStats += new Manipulator(IL_RecalculateStats);
			}
		}

		private void IL_RecalculateStats(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "get_maxBarrier")
			}))
			{
				val.Remove();
				val.EmitDelegate<Func<CharacterBody, float>>((Func<CharacterBody, float>)((CharacterBody self) => self.maxHealth + self.maxShield));
			}
			else
			{
				Debug.LogError((object)"FlatItemBuff: General - Improve Barrier Decay - IL Hook failed");
			}
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.kking117.FlatItemBuff", "FlatItemBuff", "1.23.4")]
	public class MainPlugin : BaseUnityPlugin
	{
		public const string MODUID = "com.kking117.FlatItemBuff";

		public const string MODNAME = "FlatItemBuff";

		public const string MODTOKEN = "KKING117_FLATITEMBUFF_";

		public const string MODVERSION = "1.23.4";

		internal static ManualLogSource ModLogger;

		public static PluginInfo pluginInfo;

		internal static bool AssistManager_Loaded;

		private void Awake()
		{
			ModLogger = ((BaseUnityPlugin)this).Logger;
			pluginInfo = ((BaseUnityPlugin)this).Info;
			Configs.Setup();
			AssistManager_Loaded = Chainloader.PluginInfos.ContainsKey("com.Moffein.AssistManager");
			EnableChanges();
			SharedHooks.Setup();
			((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)PostLoad_GameModeCatalog);
		}

		private void EnableChanges()
		{
			new GeneralChanges();
			new AntlerShield_Rework();
			new BisonSteak_Rework();
			new KnockbackFin();
			new TopazBrooch();
			new RollOfPennies_Rework();
			new Chronobauble();
			new DeathMark();
			new HuntersHarpoon();
			new IgnitionTank_Rework();
			new Infusion();
			new LeechingSeed_Rework();
			new FlatItemBuff.Items.UnstableTransmitter_Rework();
			new LeptonDaisy();
			new Stealthkit();
			new SquidPolyp();
			new WarHorn();
			new FlatItemBuff.Items.WaxQuail();
			new Aegis();
			new BensRaincoat();
			new FlatItemBuff.Items.HappiestMask_Rework();
			new LaserScope();
			new SonorousWhispers_Rework();
			new FlatItemBuff.Items.SymbioticScorpion_Rework();
			new DefenseNucleus_Rework();
			new FlatItemBuff.Items.Planula_Rework();
			new FlatItemBuff.Items.TitanicKnurl_Rework();
			new LigmaLenses();
			new FlatItemBuff.Items.NewlyHatchedZoea_Rework();
			new VoidsentFlame();
		}

		private void PostLoad_GameModeCatalog()
		{
			DefenseNucleus_Shared.ExtraChanges();
		}
	}
	public class SharedHooks
	{
		public delegate void Handle_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args, Inventory inventory);

		public delegate void Handle_GlobalKillEvent(DamageReport damageReport);

		public delegate void Handle_GlobalDamageEvent(DamageReport damageReport);

		public delegate void Handle_GlobalHitEvent(CharacterBody victim, CharacterBody attacker, DamageInfo damageInfo);

		public delegate void Handle_HealthComponentTakeDamage(HealthComponent self, DamageInfo damageInfo);

		public delegate void Handle_CharacterMaster_OnBodyDeath(CharacterMaster master, CharacterBody body);

		public delegate void Handle_GlobalInventoryChangedEvent(CharacterBody self);

		public static Handle_GetStatCoefficients Handle_GetStatCoefficients_Actions;

		public static Handle_GlobalKillEvent Handle_GlobalKillEvent_Actions;

		public static Handle_GlobalDamageEvent Handle_GlobalDamageEvent_Actions;

		public static Handle_GlobalHitEvent Handle_GlobalHitEvent_Actions;

		public static Handle_HealthComponentTakeDamage Handle_HealthComponentTakeDamage_Actions;

		public static Handle_CharacterMaster_OnBodyDeath Handle_CharacterMaster_OnBodyDeath_Actions;

		public static Handle_GlobalInventoryChangedEvent Handle_GlobalInventoryChangedEvent_Actions;

		public static void Setup()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Expected O, but got Unknown
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Expected O, but got Unknown
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Expected O, but got Unknown
			if (Handle_GetStatCoefficients_Actions != null)
			{
				RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(GetStatCoefficients);
			}
			if (Handle_GlobalKillEvent_Actions != null)
			{
				GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal;
			}
			if (Handle_GlobalDamageEvent_Actions != null)
			{
				GlobalEventManager.onServerDamageDealt += GlobalEventManager_DamageDealt;
			}
			if (Handle_GlobalHitEvent_Actions != null)
			{
				GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_HitEnemy);
			}
			if (Handle_GlobalHitEvent_Actions != null)
			{
				GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_HitEnemy);
			}
			if (Handle_HealthComponentTakeDamage_Actions != null)
			{
				HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamage);
			}
			if (Handle_GlobalInventoryChangedEvent_Actions != null)
			{
				CharacterBody.onBodyInventoryChangedGlobal += GlobalEventManager_OnInventoryChanged;
			}
			if (Handle_CharacterMaster_OnBodyDeath_Actions != null)
			{
				CharacterMaster.OnBodyDeath += new hook_OnBodyDeath(CharacterMaster_OnBodyDeath);
			}
		}

		internal static void GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (Object.op_Implicit((Object)(object)sender.inventory))
			{
				Handle_GetStatCoefficients_Actions(sender, args, sender.inventory);
			}
		}

		internal static void HealthComponent_TakeDamage(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo)
		{
			Handle_HealthComponentTakeDamage_Actions(self, damageInfo);
			orig.Invoke(self, damageInfo);
		}

		internal static void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport)
		{
			if (NetworkServer.active && Object.op_Implicit((Object)(object)damageReport.attacker) && Object.op_Implicit((Object)(object)damageReport.attackerBody))
			{
				Handle_GlobalKillEvent_Actions(damageReport);
			}
		}

		internal static void GlobalEventManager_DamageDealt(DamageReport damageReport)
		{
			if (NetworkServer.active && Object.op_Implicit((Object)(object)damageReport.attacker) && Object.op_Implicit((Object)(object)damageReport.attackerBody))
			{
				Handle_GlobalDamageEvent_Actions(damageReport);
			}
		}

		internal static void GlobalEventManager_HitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
		{
			orig.Invoke(self, damageInfo, victim);
			if (NetworkServer.active && Object.op_Implicit((Object)(object)victim) && Object.op_Implicit((Object)(object)damageInfo.attacker))
			{
				CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
				CharacterBody component2 = victim.GetComponent<CharacterBody>();
				if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2))
				{
					Handle_GlobalHitEvent_Actions(component2, component, damageInfo);
				}
			}
		}

		internal static void CharacterMaster_OnBodyDeath(orig_OnBodyDeath orig, CharacterMaster self, CharacterBody body)
		{
			orig.Invoke(self, body);
			if (NetworkServer.active)
			{
				Handle_CharacterMaster_OnBodyDeath_Actions(self, body);
			}
		}

		internal static void GlobalEventManager_OnInventoryChanged(CharacterBody self)
		{
			if (NetworkServer.active)
			{
				Handle_GlobalInventoryChangedEvent_Actions(self);
			}
		}
	}
}
namespace FlatItemBuff.Utils
{
	public static class ContentManager
	{
		internal static BuffDef AddBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown, bool isHidden = false, bool ignoreGrowthNectar = false)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
			((Object)val).name = buffName + " (FlatItemBuff)";
			val.buffColor = buffColor;
			val.canStack = canStack;
			val.isDebuff = isDebuff;
			val.eliteDef = null;
			val.iconSprite = buffIcon;
			val.isCooldown = isCooldown;
			val.isHidden = isHidden;
			val.ignoreGrowthNectar = ignoreGrowthNectar;
			((Object)val).name = ((Object)val).name;
			ContentAddition.AddBuffDef(val);
			return val;
		}

		internal static ItemDef AddItem(ItemDef itemDef)
		{
			((Object)itemDef).name = ((Object)itemDef).name;
			ContentAddition.AddItemDef(itemDef);
			return itemDef;
		}

		internal static GameObject AddProjectile(GameObject proj)
		{
			ContentAddition.AddProjectile(proj);
			return proj;
		}

		public static Type RegisterState(Type state)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			bool flag = false;
			ContentAddition.AddEntityState(state, ref flag);
			return state;
		}
	}
	internal class Helpers
	{
		public static bool InflictorHasModdedDamageType(GameObject inflictor, ModdedDamageType moddedDamageType)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)inflictor))
			{
				ModdedDamageTypeHolderComponent component = inflictor.GetComponent<ModdedDamageTypeHolderComponent>();
				if (Object.op_Implicit((Object)(object)component))
				{
					return component.Has(moddedDamageType);
				}
			}
			return false;
		}

		public static void AddOrExtendBuff(CharacterBody body, BuffDef buffDef, float duration)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			BuffIndex buffIndex = buffDef.buffIndex;
			for (int i = 0; i < body.timedBuffs.Count; i++)
			{
				if (body.timedBuffs[i].buffIndex == buffIndex)
				{
					duration += body.timedBuffs[i].timer;
					break;
				}
			}
			body.ClearTimedBuffs(buffIndex);
			body.AddTimedBuff(buffDef, duration);
		}

		public static void Add_ExtendBuffDuration(CharacterBody body, BuffDef buffDef, float addDuration)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			BuffIndex buffIndex = buffDef.buffIndex;
			List<float> list = new List<float>();
			for (int i = 0; i < body.timedBuffs.Count; i++)
			{
				if (body.timedBuffs[i].buffIndex == buffIndex)
				{
					list.Add(body.timedBuffs[i].timer + addDuration);
				}
			}
			body.ClearTimedBuffs(buffIndex);
			for (int j = 0; j < list.Count; j++)
			{
				body.AddTimedBuff(buffDef, list[j]);
			}
		}

		public static float GetBuffDuration(CharacterBody body, BuffDef buffDef)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			List<TimedBuff> timedBuffs = body.timedBuffs;
			for (int i = 0; i < timedBuffs.Count; i++)
			{
				if (timedBuffs[i].buffIndex == buffDef.buffIndex)
				{
					return timedBuffs[i].timer;
				}
			}
			return 0f;
		}

		public static float HyperbolicResult(int itemCount, float baseBonus, float stackBonus, int hardCap)
		{
			float num = baseBonus + stackBonus * (float)(itemCount - 1);
			return (float)hardCap - (float)hardCap / (1f + num);
		}

		public static CharacterMaster GetOwner(MinionOwnership minionowner)
		{
			CharacterMaster ownerMaster = minionowner.ownerMaster;
			if (Object.op_Implicit((Object)(object)minionowner.ownerMaster))
			{
				minionowner = ownerMaster.minionOwnership;
				if (Object.op_Implicit((Object)(object)minionowner.ownerMaster))
				{
					ownerMaster = minionowner.ownerMaster;
				}
			}
			return ownerMaster;
		}

		public static CharacterMaster GetTrueOwner(MinionOwnership minionowner)
		{
			CharacterMaster ownerMaster = minionowner.ownerMaster;
			if (Object.op_Implicit((Object)(object)ownerMaster))
			{
				do
				{
					minionowner = ownerMaster.minionOwnership;
					if (Object.op_Implicit((Object)(object)minionowner.ownerMaster))
					{
						ownerMaster = minionowner.ownerMaster;
					}
				}
				while (Object.op_Implicit((Object)(object)minionowner.ownerMaster));
			}
			return ownerMaster;
		}

		public static CharacterMaster GetOwnerAsDeployable(CharacterMaster self, DeployableSlot slot)
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Invalid comparison between Unknown and I4
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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)
			Deployable component = ((Component)self).GetComponent<Deployable>();
			if (Object.op_Implicit((Object)(object)component))
			{
				CharacterMaster ownerMaster = component.ownerMaster;
				if (Object.op_Implicit((Object)(object)ownerMaster) && ownerMaster.deployablesList != null)
				{
					for (int i = 0; i < ownerMaster.deployablesList.Count; i++)
					{
						if (((int)slot == 22 || ownerMaster.deployablesList[i].slot == slot) && (Object)(object)ownerMaster.deployablesList[i].deployable == (Object)(object)component)
						{
							return ownerMaster;
						}
					}
				}
			}
			return null;
		}

		public static bool IsDeployableSlot(CharacterMaster self, DeployableSlot slot)
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Invalid comparison between Unknown and I4
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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)
			Deployable component = ((Component)self).GetComponent<Deployable>();
			if (Object.op_Implicit((Object)(object)component))
			{
				CharacterMaster ownerMaster = component.ownerMaster;
				if (Object.op_Implicit((Object)(object)ownerMaster) && ownerMaster.deployablesList != null)
				{
					for (int i = 0; i < ownerMaster.deployablesList.Count; i++)
					{
						if (((int)slot == 22 || ownerMaster.deployablesList[i].slot == slot) && (Object)(object)ownerMaster.deployablesList[i].deployable == (Object)(object)component)
						{
							return true;
						}
					}
				}
			}
			return false;
		}

		public static void KillCloseDeployables(CharacterMaster exception, TeamIndex team, DeployableSlot slot, Vector3 origin, float killRange)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			List<Deployable> list = new List<Deployable>(GetDeployableListFromTeam(team, slot));
			for (int i = 0; i < list.Count; i++)
			{
				CharacterMaster component = ((Component)list[i]).GetComponent<CharacterMaster>();
				if (!Object.op_Implicit((Object)(object)component) || !((Object)(object)component != (Object)(object)exception))
				{
					continue;
				}
				CharacterBody body = component.GetBody();
				if (!Object.op_Implicit((Object)(object)body))
				{
					continue;
				}
				HealthComponent healthComponent = body.healthComponent;
				if (Object.op_Implicit((Object)(object)healthComponent) && healthComponent.alive && Vector3.Distance(body.transform.position, origin) <= killRange)
				{
					CharacterMaster ownerMaster = list[i].ownerMaster;
					if (Object.op_Implicit((Object)(object)ownerMaster))
					{
						ownerMaster.RemoveDeployable(list[i]);
					}
					component.TrueKill();
				}
			}
		}

		internal static void RemoveBuffStacks(CharacterBody body, BuffDef buffDef, int amount)
		{
			amount = ((amount >= 1) ? Math.Min(amount, body.GetBuffCount(buffDef)) : body.GetBuffCount(buffDef));
			if (amount > 0)
			{
				for (int i = 0; i < amount; i++)
				{
					body.RemoveBuff(buffDef);
				}
			}
		}

		private static List<Deployable> GetDeployableListFromTeam(TeamIndex team, DeployableSlot slot)
		{
			//IL_0007: 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_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			List<Deployable> list = new List<Deployable>();
			ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers(team);
			for (int i = 0; i < teamMembers.Count; i++)
			{
				CharacterBody body = teamMembers[i].body;
				if (!Object.op_Implicit((Object)(object)body))
				{
					continue;
				}
				CharacterMaster master = body.master;
				if (!Object.op_Implicit((Object)(object)master) || master.deployablesList == null)
				{
					continue;
				}
				for (int j = 0; j < master.deployablesList.Count; j++)
				{
					if (Object.op_Implicit((Object)(object)master.deployablesList[j].deployable) && master.deployablesList[j].slot == slot)
					{
						list.Add(master.deployablesList[j].deployable);
					}
				}
			}
			return list;
		}

		public static void KillDeployables(CharacterMaster owner, DeployableSlot slot, int killAmount)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			if (killAmount <= 0 || !Object.op_Implicit((Object)(object)owner) || owner.GetDeployableCount(slot) <= 0)
			{
				return;
			}
			for (int i = 0; i < CharacterMaster.readOnlyInstancesList.Count; i++)
			{
				if (killAmount <= 0)
				{
					break;
				}
				CharacterMaster val = CharacterMaster.readOnlyInstancesList[i];
				if (!Object.op_Implicit((Object)(object)val))
				{
					continue;
				}
				Deployable component = ((Component)val).GetComponent<Deployable>();
				if (!Object.op_Implicit((Object)(object)component) || !((Object)(object)component.ownerMaster == (Object)(object)owner) || owner.deployablesList == null)
				{
					continue;
				}
				for (int j = 0; j < owner.deployablesList.Count; j++)
				{
					if ((Object)(object)owner.deployablesList[j].deployable == (Object)(object)component && owner.deployablesList[j].slot == slot)
					{
						owner.RemoveDeployable(component);
						val.TrueKill();
						killAmount--;
						break;
					}
				}
			}
		}
	}
}
namespace FlatItemBuff.States
{
	public class SquidFire : BaseState
	{
		public static GameObject hitEffectPrefab = FireSpine.hitEffectPrefab;

		public static GameObject muzzleflashEffectPrefab = FireSpine.muzzleflashEffectPrefab;

		public static float damageCoefficient = 5f;

		public static float procCoefficient = 0.1f;

		public static float baseDuration = 0.75f;

		private const float maxVisionDistance = float.PositiveInfinity;

		public bool fullVision = true;

		private bool hasFiredArrow;

		private BullseyeSearch enemyFinder;

		private float duration;

		public override void OnEnter()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / base.attackSpeedStat;
			((BaseState)this).GetAimRay();
			((EntityState)this).PlayAnimation("Gesture", "FireGoo");
			if (((EntityState)this).isAuthority)
			{
				FireOrbArrow();
			}
		}

		private void FireOrbArrow()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Expected O, but got Unknown
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			if (hasFiredArrow || !NetworkServer.active)
			{
				return;
			}
			Ray aimRay = ((BaseState)this).GetAimRay();
			enemyFinder = new BullseyeSearch();
			enemyFinder.viewer = ((EntityState)this).characterBody;
			enemyFinder.maxDistanceFilter = float.PositiveInfinity;
			enemyFinder.searchOrigin = ((Ray)(ref aimRay)).origin;
			enemyFinder.searchDirection = ((Ray)(ref aimRay)).direction;
			enemyFinder.sortMode = (SortMode)1;
			enemyFinder.teamMaskFilter = TeamMask.allButNeutral;
			enemyFinder.minDistanceFilter = 0f;
			enemyFinder.maxAngleFilter = (fullVision ? 180f : 90f);
			enemyFinder.filterByLoS = true;
			if (Object.op_Implicit((Object)(object)((EntityState)this).teamComponent))
			{
				((TeamMask)(ref enemyFinder.teamMaskFilter)).RemoveTeam(((EntityState)this).teamComponent.teamIndex);
			}
			enemyFinder.RefreshCandidates();
			HurtBox val = enemyFinder.GetResults().FirstOrDefault();
			if (Object.op_Implicit((Object)(object)val))
			{
				Vector3 position = ((Component)val).transform.position;
				Ray aimRay2 = ((BaseState)this).GetAimRay();
				Vector3 val2 = position - ((Ray)(ref aimRay2)).origin;
				aimRay2 = ((BaseState)this).GetAimRay();
				((Ray)(ref aimRay)).origin = ((Ray)(ref aimRay2)).origin;
				((Ray)(ref aimRay)).direction = val2;
				((EntityState)this).inputBank.aimDirection = val2;
				((BaseState)this).StartAimMode(aimRay, 2f, false);
				hasFiredArrow = true;
				SquidOrb val3 = new SquidOrb();
				((GenericDamageOrb)val3).damageValue = ((EntityState)this).characterBody.damage * damageCoefficient;
				((GenericDamageOrb)val3).isCrit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master);
				((GenericDamageOrb)val3).teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject);
				((GenericDamageOrb)val3).attacker = ((EntityState)this).gameObject;
				((GenericDamageOrb)val3).procCoefficient = procCoefficient;
				((GenericDamageOrb)val3).damageType = DamageTypeCombo.op_Implicit((DamageType)512);
				HurtBox val4 = val;
				if (Object.op_Implicit((Object)(object)val4))
				{
					Transform val5 = ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent<ChildLocator>().FindChild("Muzzle");
					EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, "Muzzle", true);
					((Orb)val3).origin = val5.position;
					((Orb)val3).target = val4;
					OrbManager.instance.AddOrb((Orb)(object)val3);
				}
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)1;
		}
	}
}
namespace FlatItemBuff.Properties
{
	[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
	[DebuggerNonUserCode]
	[CompilerGenerated]
	internal class Resources
	{
		private static ResourceManager resourceMan;

		private static CultureInfo resourceCulture;

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static ResourceManager ResourceManager
		{
			get
			{
				if (resourceMan == null)
				{
					ResourceManager resourceManager = new ResourceManager("FlatItemBuff.Properties.Resources", typeof(Resources).Assembly);
					resourceMan = resourceManager;
				}
				return resourceMan;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static CultureInfo Culture
		{
			get
			{
				return resourceCulture;
			}
			set
			{
				resourceCulture = value;
			}
		}

		internal static byte[] texInfusionTracker
		{
			get
			{
				object @object = ResourceManager.GetObject("texInfusionTracker", resourceCulture);
				return (byte[])@object;
			}
		}

		internal Resources()
		{
		}
	}
}
namespace FlatItemBuff.Orbs
{
	public class ScorpionOrb : GenericDamageOrb
	{
		public override void Begin()
		{
			base.speed = 30f;
			((GenericDamageOrb)this).Begin();
		}

		public override GameObject GetOrbEffect()
		{
			return FlatItemBuff.Items.SymbioticScorpion_Rework.OrbVFX;
		}

		public override void OnArrival()
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Expected O, but got Unknown
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			//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)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: 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_00b1: 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_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Expected O, but got Unknown
			if (Object.op_Implicit((Object)(object)((Orb)this).target))
			{
				HealthComponent healthComponent = ((Orb)this).target.healthComponent;
				if (Object.op_Implicit((Object)(object)healthComponent))
				{
					DamageInfo val = new DamageInfo();
					val.damage = base.damageValue;
					val.attacker = base.attacker;
					val.inflictor = null;
					val.force = Vector3.zero;
					val.crit = base.isCrit;
					val.procChainMask = base.procChainMask;
					val.procCoefficient = base.procCoefficient;
					val.position = ((Component)((Orb)this).target).transform.position;
					val.damageColorIndex = base.damageColorIndex;
					val.damageType = base.damageType;
					DamageAPI.AddModdedDamageType(val, FlatItemBuff.Items.SymbioticScorpion_Rework.ScorpionVenomOnHit);
					healthComponent.TakeDamage(val);
					GlobalEventManager.instance.OnHitEnemy(val, ((Component)healthComponent).gameObject);
					GlobalEventManager.instance.OnHitAll(val, ((Component)healthComponent).gameObject);
					EffectManager.SpawnEffect(AssetReferences.permanentDebuffEffectPrefab, new EffectData
					{
						origin = ((Component)((Orb)this).target).transform.position,
						scale = 1.25f
					}, true);
				}
			}
		}
	}
}
namespace FlatItemBuff.Items
{
	public class AntlerShield_Rework
	{
		internal static bool Enable = true;

		internal static float StackArmor = 5f;

		internal static float StackSpeed = 0.07f;

		public AntlerShield_Rework()
		{
			if (Enable)
			{
				MainPlugin.ModLogger.LogInfo((object)"Changing Antler Shield");
				ClampConfig();
				UpdateText();
				UpdateItemDef();
				Hooks();
			}
		}

		private void ClampConfig()
		{
			StackArmor = Math.Max(0f, StackArmor);
			StackSpeed = Math.Max(0f, StackSpeed);
		}

		private void UpdateText()
		{
			MainPlugin.ModLogger.LogInfo((object)"Updating item text");
			string text = "Slightly increase";
			string text2 = "Increases";
			if (StackArmor > 0f)
			{
				text += " armor";
				text2 += string.Format(" <style=cIsHealing>armor</style> by <style=cIsHealing>{0}</style> <style=cStack>(+{0} per stack)</style>", StackArmor);
				if (StackSpeed > 0f)
				{
					text += " and";
					text2 += " and";
				}
			}
			if (StackSpeed > 0f)
			{
				text += " movement speed";
				text2 += string.Format(" <style=cIsUtility>movement speed</style> by <style=cIsUtility>{0}%</style> <style=cStack>(+{0}% per stack)</style>", StackSpeed * 100f);
			}
			LanguageAPI.Add("ITEM_NEGATEATTACK_PICKUP", text + ".");
			LanguageAPI.Add("ITEM_NEGATEATTACK_DESC", text2 + ".");
		}

		private void UpdateItemDef()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			ItemDef val = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC2/Items/NegateAttack/NegateAttack.asset").WaitForCompletion();
			if (Object.op_Implicit((Object)(object)val))
			{
				List<ItemTag> list = val.tags.ToList();
				list.Remove((ItemTag)4);
				list.Remove((ItemTag)11);
				val.tags = list.ToArray();
			}
		}

		private void Hooks()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			MainPlugin.ModLogger.LogInfo((object)"Applying IL modifications");
			HealthComponent.TakeDamageProcess += new Manipulator(IL_OnTakeDamage);
			SharedHooks.Handle_GetStatCoefficients_Actions = (SharedHooks.Handle_GetStatCoefficients)Delegate.Combine(SharedHooks.Handle_GetStatCoefficients_Actions, new SharedHooks.Handle_GetStatCoefficients(GetStatCoefficients));
		}

		private void GetStatCoefficients(CharacterBody sender, StatHookEventArgs args, Inventory inventory)
		{
			if (Object.op_Implicit((Object)(object)sender.inventory))
			{
				int itemCount = sender.inventory.GetItemCount(Items.NegateAttack);
				if (itemCount > 0)
				{
					args.moveSpeedMultAdd += (float)itemCount * StackSpeed;
					args.armorAdd += (float)itemCount * StackArmor;
				}
			}
		}

		private void IL_OnTakeDamage(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(ItemCounts), "antlerShield")
			}))
			{
				val.Index += 1;
				val.Emit(OpCodes.Ldc_I4_0);
				val.Emit(OpCodes.Mul);
			}
			else
			{
				Debug.LogError((object)"FlatItemBuff: Antler Shield IL Hook failed");
			}
		}
	}
	public class BisonSteak
	{
		internal static bool Enable = true;

		internal static float BaseHP = 10f;

		internal static float LevelHP = 3f;

		public BisonSteak()
		{
			if (Enable)
			{
				MainPlugin.ModLogger.LogInfo((object)"Changing Bison Steak");
				ClampConfig();
				UpdateText();
				Hooks();
			}
		}

		private void ClampConfig()
		{
			BaseHP = Math.Max(0f, BaseHP);
			LevelHP = Math.Max(0f, LevelHP);
		}

		private void UpdateText()
		{
			MainPlugin.ModLogger.LogInfo((object)"Updating item text");
			string text = "";
			string text2 = "";
			text += "Gain max health.";
			text2 = ((!(LevelHP > 0f)) ? (text2 + string.Format("Increases <style=cIsHealing>maximum health</style> by <style=cIsHealing>{0}</style> <style=cStack>(+{0} per stack)</style>.", BaseHP)) : (text2 + string.Format("Increases <style=cIsHealing>base health</style> by <style=cIsHealing>{0}</style> <style=cStack>(+{0} per stack)</style>. <style=cStack>Health increases further with level</style>.", BaseHP)));
			LanguageAPI.Add("ITEM_FLATHEALTH_PICKUP", text);
			LanguageAPI.Add("ITEM_FLATHEALTH_DESC", text2);
		}

		private void Hooks()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			MainPlugin.ModLogger.LogInfo((object)"Applying IL modifications");
			CharacterBody.RecalculateStats += new Manipulator(IL_RecalculateStats);
		}

		private void IL_RecalculateStats(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext(new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 70),
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 36),
				(Instruction x) => ILPatternMatchingExt.MatchConvR4(x)
			}))
			{
				val.Index += 3;
				val.Remove();
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<CharacterBody, float>>((Func<CharacterBody, float>)delegate(CharacterBody body)
				{
					float num = BaseHP;
					if (LevelHP > 0f)
					{
						num += (body.level - 1f) * LevelHP;
					}
					return num;
				});
			}
			else
			{
				Debug.LogError((object)"FlatItemBuff: Bison Steak - Health Stat - IL Hook failed");
			}
		}
	}
	public class BisonSteak_Rework
	{
		public static BuffDef FreshRegenBuff;

		internal static bool Enable = true;

		internal static bool NerfFakeKill = false;

		internal static float ExtendDuration = 1f;

		internal static float BaseRegen = 1f;

		internal static float StackRegen = 0f;

		internal static float BaseDuration = 3f;

		internal static float StackDuration = 3f;

		internal static bool Comp_AssistManager = true;

		public BisonSteak_Rework()
		{
			if (!Enable)
			{
				new BisonSteak();
				return;
			}
			MainPlugin.ModLogger.LogInfo((object)"Changing Bison Steak");
			ClampConfig();
			CreateBuffs();
			UpdateItemDef();
			UpdateText();
			Hooks();
			if (MainPlugin.AssistManager_Loaded)
			{
				ApplyAssistManager();
			}
		}

		private void ApplyAssistManager()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: 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
			if (Comp_AssistManager)
			{
				AssistManager.HandleAssistInventoryActions = (HandleAssistInventory)Delegate.Combine((Delegate?)(object)AssistManager.HandleAssistInventoryActions, (Delegate?)new HandleAssistInventory(AssistManger_OnKill));
			}
		}

		private void ClampConfig()
		{
			BaseRegen = Math.Max(0f, BaseRegen);
			StackRegen = Math.Max(0f, StackRegen);
			BaseDuration = Math.Max(0f, BaseDuration);
			StackDuration = Math.Max(0f, StackDuration);
			ExtendDuration = Math.Max(0f, ExtendDuration);
		}

		private void CreateBuffs()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			BuffDef val = Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/Junk/Common/bdMeatRegenBoost.asset").WaitForCompletion();
			FreshRegenBuff = ContentManager.AddBuff("MeatRegen", val.iconSprite, val.buffColor, canStack: true, isDebuff: false, isCooldown: false);
		}

		private void UpdateItemDef()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			ItemDef val = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/FlatHealth/FlatHealth.asset").WaitForCompletion();
			if (Object.op_Implicit((Object)(object)val))
			{
				List<ItemTag> list = val.tags.ToList();
				list.Add((ItemTag)4);
				list.Add((ItemTag)6);
				val.tags = list.ToArray();
			}
		}

		private void UpdateText()
		{
			MainPlugin.ModLogger.LogInfo((object)"Updating item text");
			string text = "";
			string text2 = "";
			text += "Regenerate health after killing an enemy.";
			text2 = ((!(StackRegen > 0f)) ? (text2 + $"Increases <style=cIsHealing>base health regeneration</style> by <style=cIsHealing>+{BaseRegen} hp/s</style>") : (text2 + $"Increases <style=cIsHealing>base health regeneration</style> by <style=cIsHealing>+{BaseRegen} hp/s <style=cStack>(+{StackRegen} hp/s per stack)</style></style>"));
			text2 = ((!(StackDuration > 0f)) ? (text2 + $" for <style=cIsUtility>{BaseDuration}s</style> after killing an enemy.") : (text2 + $" for <style=cIsUtility>{BaseDuration}s <style=cStack>(+{StackDuration}s per stack)</style></style> after killing an enemy."));
			if (ExtendDuration > 0f)
			{
				text2 += $" Consecutive kills extend the duration by <style=cIsUtility>{ExtendDuration}s</style>.";
			}
			LanguageAPI.Add("ITEM_FLATHEALTH_PICKUP", text);
			LanguageAPI.Add("ITEM_FLATHEALTH_DESC", text2);
		}

		private void Hooks()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			MainPlugin.ModLogger.LogInfo((object)"Applying IL modifications");
			CharacterBody.RecalculateStats += new Manipulator(IL_RecalculateStats);
			if (BaseDuration > 0f || StackDuration > 0f)
			{
				SharedHooks.Handle_GlobalKillEvent_Actions = (SharedHooks.Handle_GlobalKillEvent)Delegate.Combine(SharedHooks.Handle_GlobalKillEvent_Actions, new SharedHooks.Handle_GlobalKillEvent(GlobalKillEvent));
			}
			if (BaseRegen > 0f || StackRegen > 0f)
			{
				SharedHooks.Handle_GetStatCoefficients_Actions = (SharedHooks.Handle_GetStatCoefficients)Delegate.Combine(SharedHooks.Handle_GetStatCoefficients_Actions, new SharedHooks.Handle_GetStatCoefficients(GetStatCoefficients));
			}
		}

		private void GetStatCoefficients(CharacterBody sender, StatHookEventArgs args, Inventory inventory)
		{
			int buffCount = sender.GetBuffCount(FreshRegenBuff);
			if (buffCount > 0)
			{
				int num = 0;
				if (Object.op_Implicit((Object)(object)sender.inventory))
				{
					num = Math.Max(0, sender.inventory.GetItemCount(Items.FlatHealth) - 1);
				}
				float num2 = BaseRegen + (float)num * StackRegen;
				float num3 = 1f + (sender.level - 1f) * 0.2f;
				args.baseRegenAdd += num2 * num3 * (float)buffCount;
			}
		}

		private void GlobalKillEvent(DamageReport damageReport)
		{
			CharacterBody attackerBody = damageReport.attackerBody;
			if (!Object.op_Implicit((Object)(object)attackerBody.inventory))
			{
				return;
			}
			int itemCount = attackerBody.inventory.GetItemCount(Items.FlatHealth);
			if (itemCount <= 0)
			{
				return;
			}
			if (NerfFakeKill)
			{
				if (Object.op_Implicit((Object)(object)damageReport.victimMaster) && Object.op_Implicit((Object)(object)damageReport.victimBody))
				{
					Helpers.Add_ExtendBuffDuration(attackerBody, FreshRegenBuff, ExtendDuration);
				}
			}
			else
			{
				Helpers.Add_ExtendBuffDuration(attackerBody, FreshRegenBuff, ExtendDuration);
			}
			float num = BaseDuration + (float)Math.Max(0, itemCount - 1) * StackDuration;
			if (num > 0f)
			{
				attackerBody.AddTimedBuff(FreshRegenBuff, num);
			}
		}

		private void AssistManger_OnKill(Assist assist, Inventory assistInventory, CharacterBody killerBody, DamageInfo damageInfo)
		{
			CharacterBody attackerBody = assist.attackerBody;
			if ((Object)(object)attackerBody == (Object)(object)killerBody)
			{
				return;
			}
			int itemCount = assistInventory.GetItemCount(Items.FlatHealth);
			if (itemCount <= 0)
			{
				return;
			}
			if (NerfFakeKill)
			{
				if (Object.op_Implicit((Object)(object)assist.victimBody) && Object.op_Implicit((Object)(object)assist.victimBody.master))
				{
					Helpers.Add_ExtendBuffDuration(attackerBody, FreshRegenBuff, ExtendDuration);
				}
			}
			else
			{
				Helpers.Add_ExtendBuffDuration(attackerBody, FreshRegenBuff, ExtendDuration);
			}
			float num = BaseDuration + (float)Math.Max(0, itemCount - 1) * StackDuration;
			if (num > 0f)
			{
				attackerBody.AddTimedBuff(FreshRegenBuff, num);
			}
		}

		private void IL_RecalculateStats(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//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);
			if (val.TryGotoNext(new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "FlatHealth"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount")
			}))
			{
				val.Index += 2;
				val.Emit(OpCodes.Ldc_I4_0);
				val.Emit(OpCodes.Mul);
			}
			else
			{
				Debug.LogError((object)"FlatItemBuff: Bison Steak Rework - Effect Override - IL Hook failed");
			}
		}
	}
	public class KnockbackFin
	{
		internal static bool Enable = true;

		internal static float BaseForce = 20f;

		internal static float StackForce = 2f;

		internal static float BackForce = 0.5f;

		internal static float ChampionMult = 0.5f;

		internal static float BossMult = 1f;

		internal static float FlyingMult = 1f;

		internal static float MaxForce = 200f;

		internal static float BaseRadius = 12f;

		internal static float BaseDamage = 1f;

		internal static float ProcRate = 0f;

		internal static float StackDamage = 0.1f;

		internal static float MaxDistDamage = 10f;

		internal static bool DoStun = true;

		internal static bool CreditFall = false;

		internal static int Cooldown = 5;

		private static BuffDef knockBackBuff;

		public static BuffDef knockMidBuff;

		internal static GameObject ImpactEffect;

		public KnockbackFin()
		{
			if (Enable)
			{
				MainPlugin.ModLogger.LogInfo((object)"Changing Knockback Fin");
				ClampConfig();
				UpdateText();
				if (BaseRadius > 0f)
				{
					UpdateItemDef();
				}
				UpdateVFX();
				UpdateBuff();
				Hooks();
			}
		}

		private void ClampConfig()
		{
			BaseForce = Math.Max(0f, BaseForce);
			StackForce = Math.Max(0f, StackForce);
			BackForce = Math.Max(0f, BackForce);
			MaxDistDamage = Math.Max(1f, MaxDistDamage);
			ChampionMult = Math.Max(0f, ChampionMult);
			BossMult = Math.Max(0f, BossMult);
			MaxForce = Math.Max(1f, MaxForce);
			BaseDamage = Math.Max(0f, BaseDamage);
			StackDamage = Math.Max(0f, StackDamage);
			BaseRadius = Math.Max(0f, BaseRadius);
			Cooldown = Math.Max(0, Cooldown);
			ProcRate = Math.Max(0f, ProcRate);
		}

		private void UpdateText()
		{
			MainPlugin.ModLogger.LogInfo((object)"Updating item text");
			string text = "";
			string text2 = "";
			if (BaseForce > 0f)
			{
				text += "Knock enemies upwards on hit.";
				text2 = ((!(StackForce > 0f)) ? (text2 + $"Knock enemies upwards <style=cStack>(downward if airborne)</style> on hit with <style=cIsUtility>{100f}%</style> <style=cIsUtility>force</style>.") : (text2 + $"Knock enemies upwards <style=cStack>(downward if airborne)</style> on hit with <style=cIsUtility>{100f}%</style> <style=cStack>(+{StackForce / BaseForce * 100f}% per stack)</style> <style=cIsUtility>force</style>."));
				if (BaseRadius > 0f)
				{
					text += " ";
					text2 += " ";
				}
			}
			if (BaseRadius > 0f)
			{
				text += "Launched enemies deal damage on impact.";
				text2 = ((!(StackDamage > 0f)) ? (text2 + $"Enemies launched cause a <style=cIsDamage>{BaseRadius}m</style> radius <style=cIsDamage>impact</style>, dealing <style=cIsDamage>{BaseDamage * 100f}%</style> of your base damage") : (text2 + $"Enemies launched cause a <style=cIsDamage>{BaseRadius}m</style> radius <style=cIsDamage>impact</style>, d