Decompiled source of WolfoItemBuffs v1.0.8

WolfoItemBuffs.dll

Decompiled a week ago
using System;
using System.CodeDom.Compiler;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.Missions.LunarScavengerEncounter;
using EntityStates.ScavMonster;
using IL.RoR2;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates.Missions.LunarScavengerEncounter;
using On.EntityStates.ScavMonster;
using On.RoR2;
using On.RoR2.Artifacts;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Items;
using RoR2.Projectile;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using WolfoItemBuffs.Properties;

[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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("WolfoItemBuffs")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+61fa6adb0be0ebffaf8d1820ae659183c93f0b5b")]
[assembly: AssemblyProduct("WolfoItemBuffs")]
[assembly: AssemblyTitle("WolfoItemBuffs")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace WolfoItemBuffs
{
	public class WConfig
	{
		public static ConfigFile ConfigFileUNSORTED = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Wolfo_Item_Buffs.cfg", true);

		public static ConfigEntry<bool> cfg_White_Warbanner;

		public static ConfigEntry<bool> cfg_Green_LeechSeed;

		public static ConfigEntry<bool> cfg_Green_Harpoon;

		public static ConfigEntry<float> cfg_Green_Harpoon_VAL;

		public static ConfigEntry<bool> cfg_Green_Whip;

		public static ConfigEntry<bool> cfg_Green_Squid;

		public static ConfigEntry<bool> cfg_Green_WarCry;

		public static ConfigEntry<bool> cfg_Green_RegenScrap;

		public static ConfigEntry<bool> cfg_Green_IgnitionTank;

		public static ConfigEntry<bool> cfg_Red_Aegis;

		public static ConfigEntry<float> cfg_Red_Aegis_VAL;

		public static ConfigEntry<bool> cfg_Red_LaserScope;

		public static ConfigEntry<bool> cfg_Red_ICBM;

		public static ConfigEntry<bool> cfg_Yellow_Knurl;

		public static ConfigEntry<bool> cfg_Yellow_DefenseNuc;

		public static ConfigEntry<bool> cfg_Pink_Ring;

		public static ConfigEntry<bool> cfg_Blue_Eulogy;

		public static ConfigEntry<bool> cfg_Blue_Focus;

		public static ConfigEntry<bool> cfg_Orange_EliteInherit;

		public static void InitConfig()
		{
			cfg_White_Warbanner = ConfigFileUNSORTED.Bind<bool>("White", "Warbanner", true, "Procs on spawn and special bosses.");
			cfg_Green_Harpoon = ConfigFileUNSORTED.Bind<bool>("Green", "Hunters Harpoon", true, "Hunters Harpoon Returns Buffs");
			cfg_Green_WarCry = ConfigFileUNSORTED.Bind<bool>("Green", "Hunters Harpoon", true, "Hunters Harpoon Returns Buffs");
			cfg_Green_Harpoon_VAL = ConfigFileUNSORTED.Bind<float>("Green", "Hunters Harpoon - Speed Buff", 100f, "How much speed should it give you in %");
			cfg_Green_Squid = ConfigFileUNSORTED.Bind<bool>("Green", "Squid Polyp", true, "Squids count as mechanical.");
			cfg_Green_LeechSeed = ConfigFileUNSORTED.Bind<bool>("Green", "Leech Seed", true, "Heals regardless of proc coeff.");
			cfg_Red_Aegis = ConfigFileUNSORTED.Bind<bool>("Red", "Aegis", true, "Slow or Remove Barrier Decay.");
			cfg_Red_Aegis_VAL = ConfigFileUNSORTED.Bind<float>("Red", "Aegis - Barrier Decay", 0.2f, "Barrier Decay Multiplier");
			cfg_Red_LaserScope = ConfigFileUNSORTED.Bind<bool>("Red", "Laser Scope", true, "10 crit");
			cfg_Yellow_Knurl = ConfigFileUNSORTED.Bind<bool>("Yellow", "Titanic Knurl", true, "14 armor per stack");
			cfg_Yellow_DefenseNuc = ConfigFileUNSORTED.Bind<bool>("Yellow", "Defense Nucleus", true, "Give them Wake of Vultures");
			cfg_Pink_Ring = ConfigFileUNSORTED.Bind<bool>("Void", "Singularity Band", true, "300 damage instead of 100");
			cfg_Blue_Eulogy = ConfigFileUNSORTED.Bind<bool>("Lunar", "Eulogy Zero", true, "Perfected Elites");
			cfg_Blue_Focus = ConfigFileUNSORTED.Bind<bool>("Lunar", "Focused Convergence", true, "Exponential stacking instead linear divided");
			cfg_Orange_EliteInherit = ConfigFileUNSORTED.Bind<bool>("Equipment", "Elite Equipment Inheritance", true, "Minions spawn as elite when you have a elite");
		}
	}
	public static class ArrayUtil
	{
		public static T[] Add<T>(this T[] array, params T[] items)
		{
			return (array ?? Enumerable.Empty<T>()).Concat(items).ToArray();
		}

		public static T[] Remove<T>(this T[] array, params T[] items)
		{
			return (array ?? Enumerable.Empty<T>()).Except(items).ToArray();
		}
	}
	public class WRect
	{
		public static readonly Random random = new Random();

		public static Rect rec128 = new Rect(0f, 0f, 128f, 128f);

		public static Vector2 half = new Vector2(0.5f, 0.5f);
	}
	public class Equipment
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_AddMinion <0>__Minion_Inherit_Elite;
		}

		public static void Start()
		{
			//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_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Expected O, but got Unknown
			GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VendingMachine/VendingMachine.prefab").WaitForCompletion();
			BoxCollider component = ((Component)val.transform.GetChild(0)).gameObject.GetComponent<BoxCollider>();
			((Collider)component).isTrigger = false;
			component.size = component.extents;
			Addressables.LoadAssetAsync<EquipmentDef>((object)"RoR2/Base/Jetpack/Jetpack.asset").WaitForCompletion().canBeRandomlyTriggered = true;
			if (WConfig.cfg_Orange_EliteInherit.Value)
			{
				object obj = <>O.<0>__Minion_Inherit_Elite;
				if (obj == null)
				{
					hook_AddMinion val2 = Minion_Inherit_Elite;
					<>O.<0>__Minion_Inherit_Elite = val2;
					obj = (object)val2;
				}
				MinionGroup.AddMinion += (hook_AddMinion)obj;
			}
		}

		public static void Minion_Inherit_Elite(orig_AddMinion orig, NetworkInstanceId ownerId, MinionOwnership minion)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: 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_0052: Invalid comparison between Unknown and I4
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(ownerId, minion);
			if (!NetworkServer.active || !Object.op_Implicit((Object)(object)minion.ownerMaster) || !Object.op_Implicit((Object)(object)minion.ownerMaster.playerCharacterMasterController))
			{
				return;
			}
			EquipmentIndex equipmentIndex = minion.ownerMaster.inventory.GetEquipmentIndex();
			if ((int)equipmentIndex != -1)
			{
				EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(equipmentIndex);
				if (Object.op_Implicit((Object)(object)equipmentDef.passiveBuffDef) && equipmentDef.passiveBuffDef.isElite && !((Object)minion).name.StartsWith("AffixEarth"))
				{
					Inventory component = ((Component)minion).gameObject.GetComponent<Inventory>();
					component.SetEquipment(new EquipmentState(equipmentIndex, FixedTimeStamp.negativeInfinity, (byte)0, false), 0u);
				}
			}
		}
	}
	public class T1_White
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_Start <0>__WarbannerOnSpawn;

			public static hook_BeginEncounter <1>__Warbanner_ScriptedCombat;

			public static hook_OnBodyTeleport <2>__Warbanner_AfterVoidlingTeleport;

			public static hook_PerformInvasion <3>__Warbanner_OnVengence;
		}

		public static void Start()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Expected O, but got Unknown
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Expected O, but got Unknown
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Expected O, but got Unknown
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Expected O, but got Unknown
			bool flag = Chainloader.PluginInfos.ContainsKey("com.RiskyLives.RiskyMod");
			if (!WConfig.cfg_White_Warbanner.Value)
			{
				return;
			}
			LanguageAPI.Add("ITEM_WARDONLEVEL_DESC", "On <style=cIsUtility>level up, stage start</style> or starting a <style=cIsUtility>boss fight</style>, drop a banner that strengthens all allies within <style=cIsUtility>16m</style> <style=cStack>(+8m per stack)</style>. Raise <style=cIsDamage>attack</style> and <style=cIsUtility>movement speed</style> by <style=cIsDamage>30%</style>.", "en");
			object obj = <>O.<0>__WarbannerOnSpawn;
			if (obj == null)
			{
				hook_Start val = WarbannerOnSpawn;
				<>O.<0>__WarbannerOnSpawn = val;
				obj = (object)val;
			}
			CharacterBody.Start += (hook_Start)obj;
			if (!flag)
			{
				object obj2 = <>O.<1>__Warbanner_ScriptedCombat;
				if (obj2 == null)
				{
					hook_BeginEncounter val2 = Warbanner_ScriptedCombat;
					<>O.<1>__Warbanner_ScriptedCombat = val2;
					obj2 = (object)val2;
				}
				ScriptedCombatEncounter.BeginEncounter += (hook_BeginEncounter)obj2;
			}
			object obj3 = <>O.<2>__Warbanner_AfterVoidlingTeleport;
			if (obj3 == null)
			{
				hook_OnBodyTeleport val3 = Warbanner_AfterVoidlingTeleport;
				<>O.<2>__Warbanner_AfterVoidlingTeleport = val3;
				obj3 = (object)val3;
			}
			VoidRaidGauntletExitController.OnBodyTeleport += (hook_OnBodyTeleport)obj3;
			object obj4 = <>O.<3>__Warbanner_OnVengence;
			if (obj4 == null)
			{
				hook_PerformInvasion val4 = Warbanner_OnVengence;
				<>O.<3>__Warbanner_OnVengence = val4;
				obj4 = (object)val4;
			}
			DoppelgangerInvasionManager.PerformInvasion += (hook_PerformInvasion)obj4;
			ItemDef val5 = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/WardOnLevel/WardOnLevel.asset").WaitForCompletion();
			val5.tags = val5.tags.Remove((ItemTag)13);
		}

		private static void Warbanner_AfterVoidlingTeleport(orig_OnBodyTeleport orig, VoidRaidGauntletExitController self, CharacterBody body)
		{
			orig.Invoke(self, body);
			WardOnLevelManager.OnCharacterLevelUp(body);
		}

		public static void Warbanner_OnVengence(orig_PerformInvasion orig, Xoroshiro128Plus rng)
		{
			orig.Invoke(rng);
			foreach (CharacterBody instances in CharacterBody.instancesList)
			{
				WardOnLevelManager.OnCharacterLevelUp(instances);
			}
		}

		public static void Warbanner_ScriptedCombat(orig_BeginEncounter orig, ScriptedCombatEncounter self)
		{
			orig.Invoke(self);
			if (!Object.op_Implicit((Object)(object)((Component)self).GetComponent<BossGroup>()))
			{
				return;
			}
			foreach (CharacterBody instances in CharacterBody.instancesList)
			{
				WardOnLevelManager.OnCharacterLevelUp(instances);
			}
		}

		public static void WarbannerOnSpawn(orig_Start orig, CharacterBody self)
		{
			orig.Invoke(self);
			WardOnLevelManager.OnCharacterLevelUp(self);
		}
	}
	public class T2_Green
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static Manipulator <0>__Harpoon_ChangeMoveSpeed;

			public static Manipulator <1>__Harpoon_ChangeDuration;

			public static Manipulator <2>__Seed2;

			public static Manipulator <3>__Longer_WarCryWindow;

			public static hook_UpdateLastHitTime <4>__StealthKitElixir;
		}

		public static float HarpoonSpeed = 1f;

		public static void Start()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0092: Expected O, but got Unknown
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Expected O, but got Unknown
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Expected O, but got Unknown
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Expected O, but got Unknown
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
			HarpoonSpeed = WConfig.cfg_Green_Harpoon_VAL.Value / 100f;
			bool flag = Chainloader.PluginInfos.ContainsKey("com.Wolfo.AegisRemovesBarrierDecay");
			Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/DLC1/MoveSpeedOnKill/bdKillMoveSpeed.asset").WaitForCompletion().canStack = false;
			if (!flag && WConfig.cfg_Green_Harpoon.Value)
			{
				object obj = <>O.<0>__Harpoon_ChangeMoveSpeed;
				if (obj == null)
				{
					Manipulator val = Harpoon_ChangeMoveSpeed;
					<>O.<0>__Harpoon_ChangeMoveSpeed = val;
					obj = (object)val;
				}
				CharacterBody.RecalculateStats += (Manipulator)obj;
				object obj2 = <>O.<1>__Harpoon_ChangeDuration;
				if (obj2 == null)
				{
					Manipulator val2 = Harpoon_ChangeDuration;
					<>O.<1>__Harpoon_ChangeDuration = val2;
					obj2 = (object)val2;
				}
				GlobalEventManager.OnCharacterDeath += (Manipulator)obj2;
				Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/DLC1/MoveSpeedOnKill/bdKillMoveSpeed.asset").WaitForCompletion().canStack = false;
				LanguageAPI.Add("ITEM_MOVESPEEDONKILL_DESC", "Killing an enemy increases <style=cIsUtility>movement speed</style> by <style=cIsUtility>" + WConfig.cfg_Green_Harpoon_VAL.Value + "%</style> for <style=cIsUtility>1</style> <style=cStack>(+1 per stack)</style> seconds. Consecutive kills increase buff duration for up to 25 seconds.", "en");
			}
			if (!Chainloader.PluginInfos.ContainsKey("OakPrime.LeechingSeedBuff") && WConfig.cfg_Green_LeechSeed.Value)
			{
				object obj3 = <>O.<2>__Seed2;
				if (obj3 == null)
				{
					Manipulator val3 = Seed2;
					<>O.<2>__Seed2 = val3;
					obj3 = (object)val3;
				}
				HealthComponent.TakeDamageProcess += (Manipulator)obj3;
				LanguageAPI.Add("ITEM_SEED_DESC", "Dealing damage <style=cIsHealing>heals</style> you for <style=cIsHealing>1 <style=cStack>(+1 per stack)</style> health</style>. Damage over time effects <style=cIsHealing>heal</style> <style=cIsHealing>0.2 <style=cStack>(+0.2 per stack)</style> health</style> per tick.", "en");
			}
			if (WConfig.cfg_Green_WarCry.Value)
			{
				object obj4 = <>O.<3>__Longer_WarCryWindow;
				if (obj4 == null)
				{
					Manipulator val4 = Longer_WarCryWindow;
					<>O.<3>__Longer_WarCryWindow = val4;
					obj4 = (object)val4;
				}
				CharacterBody.AddMultiKill += (Manipulator)obj4;
				LanguageAPI.Add("ITEM_WARCRYONMULTIKILL_DESC", "<style=cIsDamage>Killing 4 enemies</style> within <style=cIsDamage>2</style> second of each other sends you into a <style=cIsDamage>frenzy</style> for <style=cIsDamage>6s</style> <style=cStack>(+4s per stack)</style>. Increases <style=cIsUtility>movement speed</style> by <style=cIsUtility>50%</style> and <style=cIsDamage>attack speed</style> by <style=cIsDamage>100%</style>.", "en");
			}
			object obj5 = <>O.<4>__StealthKitElixir;
			if (obj5 == null)
			{
				hook_UpdateLastHitTime val5 = StealthKitElixir;
				<>O.<4>__StealthKitElixir = val5;
				obj5 = (object)val5;
			}
			HealthComponent.UpdateLastHitTime += (hook_UpdateLastHitTime)obj5;
			BetterRedWhipCheck();
			if (WConfig.cfg_Green_Squid.Value)
			{
				CharacterBody component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Squid/SquidTurretBody.prefab").WaitForCompletion().GetComponent<CharacterBody>();
				component.bodyFlags = (BodyFlags)(component.bodyFlags | 2);
			}
		}

		public static void BetterRedWhipCheck()
		{
			//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_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Huntress/AimArrowSnipe.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Toolbot/ToolbotBodyToolbotDash.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Engi/EngiBodyPlaceBubbleShield.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Mage/MageBodyFlyUp.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Merc/MercBodyAssaulter.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Merc/MercBodyFocusedAssault.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Treebot/TreebotBodyPlantSonicBoom.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Treebot/TreebotBodySonicBoom.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Loader/FireHook.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Loader/FireYankHook.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Croco/CrocoLeap.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Croco/CrocoChainableLeap.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Captain/PrepSupplyDrop.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/Railgunner/RailgunnerBodyScopeLight.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/Railgunner/RailgunnerBodyScopeHeavy.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidSurvivor/VoidBlinkDown.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/Seeker/SeekerBodySojourn.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/Chef/ChefRolyPoly.asset").WaitForCompletion().isCombatSkill = false;
			Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/Chef/ChefRolyPolyBoosted.asset").WaitForCompletion().isCombatSkill = false;
		}

		public static void StealthKitElixir(orig_UpdateLastHitTime orig, HealthComponent self, float damageValue, Vector3 damagePosition, bool damageIsSilent, GameObject attacker, bool delayedDamage, bool firstHitOfDelayedDamage)
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkServer.active && Object.op_Implicit((Object)(object)self.body) && damageValue > 0f)
			{
				PhasingBodyBehavior component = ((Component)self).GetComponent<PhasingBodyBehavior>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.FixedUpdate();
				}
			}
			orig.Invoke(self, damageValue, damagePosition, damageIsSilent, attacker, delayedDamage, firstHitOfDelayedDamage);
		}

		public static void Longer_WarCryWindow(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "multiKillTimer")
			}))
			{
				val.Next.OpCode = OpCodes.Ldc_R4;
				val.Next.Operand = 2f;
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: Longer_WarCryWindow");
			}
		}

		public static void Seed2(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);
			val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "FragileDamageBonus")
			});
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageInfo", "procCoefficient")
			}))
			{
				val.EmitDelegate<Func<DamageInfo, DamageInfo>>((Func<DamageInfo, DamageInfo>)delegate(DamageInfo damageInfo)
				{
					//IL_0028: Unknown result type (might be due to invalid IL or missing references)
					//IL_005e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0063: Unknown result type (might be due to invalid IL or missing references)
					//IL_0077: Unknown result type (might be due to invalid IL or missing references)
					CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
					int itemCount = component.inventory.GetItemCount(Items.Seed);
					if (itemCount > 0 && ((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)67108864))
					{
						HealthComponent component2 = ((Component)component).GetComponent<HealthComponent>();
						if (Object.op_Implicit((Object)(object)component2))
						{
							ProcChainMask procChainMask = damageInfo.procChainMask;
							((ProcChainMask)(ref procChainMask)).AddProc((ProcType)6);
							component2.Heal((float)itemCount * 0.2f, procChainMask, true);
						}
					}
					return damageInfo;
				});
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: Leeching Seed");
			}
		}

		public static void Harpoon_ChangeMoveSpeed(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((MoveType)0, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.25f),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Buffs", "KillMoveSpeed")
			}))
			{
				val.Next.Operand = 1.25f;
			}
			else
			{
				Debug.LogWarning((object)"Failed to apply Hunter's Harpoon Move Speed Increase hook");
			}
		}

		private static void Harpoon_ChangeDuration(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			int num2 = default(int);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f),
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num2),
				(Instruction x) => ILPatternMatchingExt.MatchConvR4(x),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f)
			}))
			{
				val.Index -= 2;
				val.Next.OpCode = OpCodes.Ldc_I4_0;
				val.Index += 9;
				val.RemoveRange(3);
				val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_corePosition")
				});
				val.EmitDelegate<Func<CharacterBody, CharacterBody>>((Func<CharacterBody, CharacterBody>)delegate(CharacterBody attackerBody)
				{
					//IL_003b: Unknown result type (might be due to invalid IL or missing references)
					//IL_0045: Unknown result type (might be due to invalid IL or missing references)
					int itemCount = attackerBody.master.inventory.GetItemCount(Items.MoveSpeedOnKill);
					float num = itemCount;
					if (attackerBody.HasBuff(Buffs.KillMoveSpeed))
					{
						for (int i = 0; i < attackerBody.timedBuffs.Count; i++)
						{
							if (attackerBody.timedBuffs[i].buffIndex == Buffs.KillMoveSpeed.buffIndex)
							{
								num += attackerBody.timedBuffs[i].timer;
								break;
							}
						}
					}
					if (num > 25f)
					{
						num = 25f;
					}
					attackerBody.ClearTimedBuffs(Buffs.KillMoveSpeed);
					attackerBody.AddTimedBuff(Buffs.KillMoveSpeed, num);
					return attackerBody;
				});
			}
			else
			{
				Debug.LogWarning((object)"Failed to apply Hunter's Harpoon Duration hook");
			}
		}
	}
	public class T3_Red
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_RecalculateStats <0>__AegisNoDecay;
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static StatHookEventHandler <>9__1_0;

			internal void <Start>b__1_0(CharacterBody sender, StatHookEventArgs args)
			{
				if ((Object)(object)sender.inventory != (Object)null && sender.inventory.GetItemCount(Items.CritDamage) > 0)
				{
					args.critAdd += 10f;
				}
			}
		}

		public static float AegisDrainMult = 0.2f;

		public static void Start()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Expected O, but got Unknown
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Expected O, but got Unknown
			AegisDrainMult = WConfig.cfg_Red_Aegis_VAL.Value;
			if (!Chainloader.PluginInfos.ContainsKey("com.Wolfo.RoRRHuntersHarpoon") && WConfig.cfg_Red_Aegis.Value)
			{
				object obj = <>O.<0>__AegisNoDecay;
				if (obj == null)
				{
					hook_RecalculateStats val = AegisNoDecay;
					<>O.<0>__AegisNoDecay = val;
					obj = (object)val;
				}
				CharacterBody.RecalculateStats += (hook_RecalculateStats)obj;
				LanguageAPI.Add("ITEM_BARRIERONOVERHEAL_PICKUP", "Healing past full grants you a barrier. Barrier no longer decays.", "en");
				if (WConfig.cfg_Red_Aegis_VAL.Value == 0f)
				{
					LanguageAPI.Add("ITEM_BARRIERONOVERHEAL_DESC", "Healing past full grants you a <style=cIsHealing>barrier</style> for <style=cIsHealing>50% <style=cStack>(+50% per stack)</style></style> of the amount you <style=cIsHealing>healed</style>. All <style=cIsHealing>barrier</style> no longer naturally decays.", "en");
				}
				else
				{
					LanguageAPI.Add("ITEM_BARRIERONOVERHEAL_DESC", "Healing past full grants you a <style=cIsHealing>barrier</style> for <style=cIsHealing>50% <style=cStack>(+50% per stack)</style></style> of the amount you <style=cIsHealing>healed</style>. All <style=cIsHealing>barrier</style> decays <style=cIsHealing>" + (1f - WConfig.cfg_Red_Aegis_VAL.Value) * 100f + "%</style> slower.", "en");
				}
			}
			if (!WConfig.cfg_Red_LaserScope.Value)
			{
				return;
			}
			object obj2 = <>c.<>9__1_0;
			if (obj2 == null)
			{
				StatHookEventHandler val2 = delegate(CharacterBody sender, StatHookEventArgs args)
				{
					if ((Object)(object)sender.inventory != (Object)null && sender.inventory.GetItemCount(Items.CritDamage) > 0)
					{
						args.critAdd += 10f;
					}
				};
				<>c.<>9__1_0 = val2;
				obj2 = (object)val2;
			}
			RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj2;
			LanguageAPI.Add("ITEM_CRITDAMAGE_DESC", "Gain <style=cIsDamage>10% critical chance</style>. <style=cIsDamage>Critical Strikes</style> deal an additional <style=cIsDamage>100% damage</style><style=cStack>(+100% per stack)</style>.");
		}

		public static void AegisNoDecay(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(Items.BarrierOnOverHeal) > 0)
			{
				self.barrierDecayRate *= AegisDrainMult;
			}
		}
	}
	public class T_Boss
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static StatHookEventHandler <>9__0_0;

			internal void <Start>b__0_0(CharacterBody sender, StatHookEventArgs args)
			{
				if ((Object)(object)sender.inventory != (Object)null)
				{
					args.armorAdd += (float)(sender.inventory.GetItemCount(Items.Knurl) * 14);
				}
			}
		}

		public static void Start()
		{
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			bool flag = Chainloader.PluginInfos.ContainsKey("OakPrime.KnurlBuff");
			if (WConfig.cfg_Yellow_Knurl.Value && !flag)
			{
				object obj = <>c.<>9__0_0;
				if (obj == null)
				{
					StatHookEventHandler val = delegate(CharacterBody sender, StatHookEventArgs args)
					{
						if ((Object)(object)sender.inventory != (Object)null)
						{
							args.armorAdd += (float)(sender.inventory.GetItemCount(Items.Knurl) * 14);
						}
					};
					<>c.<>9__0_0 = val;
					obj = (object)val;
				}
				RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
				LanguageAPI.Add("ITEM_KNURL_PICKUP", "Boosts health, regeneration, and armor");
				LanguageAPI.Add("ITEM_KNURL_DESC", "<style=cIsHealing>Increase maximum health</style> by <style=cIsHealing>40</style> <style=cStack>(+40 per stack)</style>, <style=cIsHealing>base health regeneration</style> by <style=cIsHealing>+1.6 hp/s</style> <style=cStack>(+1.6 hp/s per stack)</style>, and <style=cIsHealing>armor</style> by <style=cIsHealing>14</style> <style=cStack>(+14 per stack)</style>.");
			}
			if (WConfig.cfg_Yellow_DefenseNuc.Value)
			{
				ItemDef val2 = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/HeadHunter/HeadHunter.asset").WaitForCompletion();
				GameObject val3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/MajorAndMinorConstruct/MinorConstructOnKillMaster.prefab").WaitForCompletion();
				ItemDefInfo[] array = (ItemDefInfo[])(object)new ItemDefInfo[0];
				array = array.Add(new ItemDefInfo
				{
					itemDef = Items.HeadHunter,
					count = 200
				});
				val3.AddComponent<GivePickupsOnStart>().itemDefInfos = array;
			}
		}
	}
	public class T_Lunar
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_Spawn <0>__LunarEulogyHook;

			public static hook_ApplyRate <1>__FocusConvergenceController_ApplyRate;
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_Awake <>9__1_0;

			public static hook_BeginEncounter <>9__1_1;

			public static hook_OnEnter <>9__1_2;

			public static hook_OnPreDestroyBodyServer <>9__1_3;

			internal void <Start>b__1_0(orig_Awake orig, HoldoutZoneController self)
			{
				orig.Invoke(self);
				if (self.minimumRadius == 0f)
				{
					self.minimumRadius = 10f;
				}
			}

			internal void <Start>b__1_1(orig_BeginEncounter orig, ScriptedCombatEncounter self)
			{
				//IL_001f: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Unknown result type (might be due to invalid IL or missing references)
				//IL_006d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0089: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
				if (((Object)self).name.StartsWith("ScavLunar"))
				{
					int num = Util.GetItemCountForTeam((TeamIndex)1, Items.LunarTrinket.itemIndex, false, true);
					if (num == 0)
					{
						num = 1;
					}
					float num2 = self.spawns[0].explicitSpawnPosition.localPosition.x + 8f;
					float y = self.spawns[0].explicitSpawnPosition.localPosition.y;
					float num3 = self.spawns[0].explicitSpawnPosition.localPosition.z;
					int num4 = 1;
					for (int i = 0; i < num; i++)
					{
						self.spawns[0].explicitSpawnPosition.localPosition = new Vector3(num2, y, num3);
						num2 -= 8f;
						if (num4 == 4)
						{
							num4 = 0;
							num2 += 32f;
							num3 -= 8f;
						}
						num4++;
						self.hasSpawnedServer = false;
						orig.Invoke(self);
					}
				}
				else
				{
					orig.Invoke(self);
				}
			}

			internal void <Start>b__1_2(orig_OnEnter orig, FadeOut self)
			{
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(self);
				int num = Util.GetItemCountForTeam((TeamIndex)1, Items.LunarTrinket.itemIndex, false, true);
				if (num > 1)
				{
					if (num > 10)
					{
						num = 10;
					}
					float num2 = FadeOut.duration / 4f * (float)(num - 1);
					Reflection.SetFieldValue<float>((object)self, "duration", FadeOut.duration + num2);
				}
			}

			internal void <Start>b__1_3(orig_OnPreDestroyBodyServer orig, Death self)
			{
				if (((Object)((EntityState)self).outer).name.StartsWith("ScavLunar"))
				{
					self.shouldDropPack = true;
				}
				orig.Invoke(self);
			}
		}

		public static EliteDef EliteDefLunarEulogy = ScriptableObject.CreateInstance<EliteDef>();

		public static void Start()
		{
			//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_0014: 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_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Expected O, but got Unknown
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Expected O, but got Unknown
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Expected O, but got Unknown
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Expected O, but got Unknown
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Expected O, but got Unknown
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01db: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: Expected O, but got Unknown
			Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/DLC2/FalseSon/bdlunarruin.asset").WaitForCompletion().flags = (Flags)0;
			EliteDef val = Addressables.LoadAssetAsync<EliteDef>((object)"RoR2/Base/EliteLunar/edLunar.asset").WaitForCompletion();
			EliteDefLunarEulogy.modifierToken = val.modifierToken;
			EliteDefLunarEulogy.eliteEquipmentDef = val.eliteEquipmentDef;
			EliteDefLunarEulogy.color = val.color;
			EliteDefLunarEulogy.shaderEliteRampIndex = val.shaderEliteRampIndex;
			EliteDefLunarEulogy.healthBoostCoefficient = 3.2f;
			EliteDefLunarEulogy.damageBoostCoefficient = val.damageBoostCoefficient;
			((Object)EliteDefLunarEulogy).name = "edLunarEulogy";
			ContentAddition.AddEliteDef(EliteDefLunarEulogy);
			if (WConfig.cfg_Blue_Eulogy.Value)
			{
				object obj = <>O.<0>__LunarEulogyHook;
				if (obj == null)
				{
					hook_Spawn val2 = LunarEulogyHook;
					<>O.<0>__LunarEulogyHook = val2;
					obj = (object)val2;
				}
				CombatDirector.Spawn += (hook_Spawn)obj;
				LanguageAPI.Add("ITEM_RANDOMLYLUNAR_PICKUP", "Items, equipment and elites have a small chance to transform into a Lunar version instead.", "en");
				LanguageAPI.Add("ITEM_RANDOMLYLUNAR_DESC", "Items and equipment have a <style=cIsUtility>5% <style=cStack>(+5% per stack)</style></style> chance to become a <style=cIsLunar>Lunar</style> item or equipment and Elite Enemies have a <style=cIsUtility>10% <style=cStack>(+5% per stack)</style></style> spawn as <style=cIsLunar>Perfected</style> instead.", "en");
			}
			FocusConvergenceController.cap = 999999;
			object obj2 = <>c.<>9__1_0;
			if (obj2 == null)
			{
				hook_Awake val3 = delegate(orig_Awake orig, HoldoutZoneController self)
				{
					orig.Invoke(self);
					if (self.minimumRadius == 0f)
					{
						self.minimumRadius = 10f;
					}
				};
				<>c.<>9__1_0 = val3;
				obj2 = (object)val3;
			}
			HoldoutZoneController.Awake += (hook_Awake)obj2;
			if (WConfig.cfg_Blue_Focus.Value)
			{
				object obj3 = <>O.<1>__FocusConvergenceController_ApplyRate;
				if (obj3 == null)
				{
					hook_ApplyRate val4 = FocusConvergenceController_ApplyRate;
					<>O.<1>__FocusConvergenceController_ApplyRate = val4;
					obj3 = (object)val4;
				}
				FocusConvergenceController.ApplyRate += (hook_ApplyRate)obj3;
			}
			LanguageAPI.Add("ITEM_LUNARTRINKET_DESC", "Once guided to the <style=cIsUtility>monolith</style>, become whole and <style=cIsDamage>fight 1 <style=cStack>(+1 per stack)</style> guardians</style>", "en");
			object obj4 = <>c.<>9__1_1;
			if (obj4 == null)
			{
				hook_BeginEncounter val5 = delegate(orig_BeginEncounter orig, ScriptedCombatEncounter self)
				{
					//IL_001f: Unknown result type (might be due to invalid IL or missing references)
					//IL_004b: Unknown result type (might be due to invalid IL or missing references)
					//IL_006d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0089: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
					if (((Object)self).name.StartsWith("ScavLunar"))
					{
						int num3 = Util.GetItemCountForTeam((TeamIndex)1, Items.LunarTrinket.itemIndex, false, true);
						if (num3 == 0)
						{
							num3 = 1;
						}
						float num4 = self.spawns[0].explicitSpawnPosition.localPosition.x + 8f;
						float y = self.spawns[0].explicitSpawnPosition.localPosition.y;
						float num5 = self.spawns[0].explicitSpawnPosition.localPosition.z;
						int num6 = 1;
						for (int i = 0; i < num3; i++)
						{
							self.spawns[0].explicitSpawnPosition.localPosition = new Vector3(num4, y, num5);
							num4 -= 8f;
							if (num6 == 4)
							{
								num6 = 0;
								num4 += 32f;
								num5 -= 8f;
							}
							num6++;
							self.hasSpawnedServer = false;
							orig.Invoke(self);
						}
					}
					else
					{
						orig.Invoke(self);
					}
				};
				<>c.<>9__1_1 = val5;
				obj4 = (object)val5;
			}
			ScriptedCombatEncounter.BeginEncounter += (hook_BeginEncounter)obj4;
			object obj5 = <>c.<>9__1_2;
			if (obj5 == null)
			{
				hook_OnEnter val6 = delegate(orig_OnEnter orig, FadeOut self)
				{
					//IL_000f: Unknown result type (might be due to invalid IL or missing references)
					orig.Invoke(self);
					int num = Util.GetItemCountForTeam((TeamIndex)1, Items.LunarTrinket.itemIndex, false, true);
					if (num > 1)
					{
						if (num > 10)
						{
							num = 10;
						}
						float num2 = FadeOut.duration / 4f * (float)(num - 1);
						Reflection.SetFieldValue<float>((object)self, "duration", FadeOut.duration + num2);
					}
				};
				<>c.<>9__1_2 = val6;
				obj5 = (object)val6;
			}
			FadeOut.OnEnter += (hook_OnEnter)obj5;
			object obj6 = <>c.<>9__1_3;
			if (obj6 == null)
			{
				hook_OnPreDestroyBodyServer val7 = delegate(orig_OnPreDestroyBodyServer orig, Death self)
				{
					if (((Object)((EntityState)self).outer).name.StartsWith("ScavLunar"))
					{
						self.shouldDropPack = true;
					}
					orig.Invoke(self);
				};
				<>c.<>9__1_3 = val7;
				obj6 = (object)val7;
			}
			Death.OnPreDestroyBodyServer += (hook_OnPreDestroyBodyServer)obj6;
		}

		private static void FocusConvergenceController_ApplyRate(orig_ApplyRate orig, MonoBehaviour self, ref float rate)
		{
			if (((FocusConvergenceController)((self is FocusConvergenceController) ? self : null)).currentFocusConvergenceCount > 0)
			{
				rate *= 1f / MathF.Pow(0.7f, ((FocusConvergenceController)((self is FocusConvergenceController) ? self : null)).currentFocusConvergenceCount);
			}
		}

		public static bool LunarEulogyHook(orig_Spawn orig, CombatDirector self, SpawnCard spawnCard, EliteDef eliteDef, Transform spawnTarget, MonsterSpawnDistance spawnDistance, bool preventOverhead, float valueMultiplier, PlacementMode placementMode)
		{
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)eliteDef))
			{
				int itemCountFromPlayers = WolfoItemBuffs.GetItemCountFromPlayers(Items.RandomlyLunar.itemIndex);
				if (itemCountFromPlayers > 0)
				{
					itemCountFromPlayers++;
					if (eliteDef.healthBoostCoefficient < 8f && self.rng.nextNormalizedFloat < 0.05f * (float)itemCountFromPlayers)
					{
						eliteDef = EliteDefLunarEulogy;
					}
				}
			}
			return orig.Invoke(self, spawnCard, eliteDef, spawnTarget, spawnDistance, preventOverhead, valueMultiplier, placementMode);
		}
	}
	public class T_Void
	{
		public class VoidAffixPlayer : MonoBehaviour
		{
			public void OnEnable()
			{
				//IL_0054: Unknown result type (might be due to invalid IL or missing references)
				//IL_005a: Invalid comparison between Unknown and I4
				CharacterModel component = ((Component)((Component)this).transform.root).GetComponent<CharacterModel>();
				TeamComponent val = ((Component)((Component)this).transform.root).GetComponent<TeamComponent>();
				if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.body))
				{
					val = component.body.teamComponent;
				}
				if (Object.op_Implicit((Object)(object)val) && (int)val.teamIndex == 1)
				{
					((Component)((Component)this).transform.GetChild(1).GetChild(1)).gameObject.SetActive(false);
					((Component)((Component)this).transform.GetChild(1).GetChild(2)).gameObject.SetActive(true);
				}
			}
		}

		[CompilerGenerated]
		private static class <>O
		{
			public static Manipulator <0>__BuffSingularityBand;

			public static hook_OnEnable <1>__AffixVoidBehavior_OnEnable;
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_RespawnExtraLifeVoid <>9__1_0;

			public static Func<Instruction, bool> <>9__4_1;

			public static Func<Instruction, bool> <>9__4_0;

			internal void <VoidAffix>b__1_0(orig_RespawnExtraLifeVoid orig, CharacterMaster self)
			{
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0015: Invalid comparison between Unknown and I4
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0040: Unknown result type (might be due to invalid IL or missing references)
				//IL_004a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0061: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_006d: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(self);
				if ((int)self.inventory.currentEquipmentIndex != -1 && Object.op_Implicit((Object)(object)EquipmentCatalog.GetEquipmentDef(self.inventory.currentEquipmentIndex).passiveBuffDef))
				{
					CharacterMasterNotificationQueue.PushEquipmentTransformNotification(self, self.inventory.currentEquipmentIndex, Equipment.EliteVoidEquipment.equipmentIndex, (TransformationType)1);
					self.inventory.SetEquipment(new EquipmentState(Equipment.EliteVoidEquipment.equipmentIndex, FixedTimeStamp.negativeInfinity, (byte)0, false), 0u);
				}
			}

			internal bool <BuffSingularityBand>b__4_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdstr(x, "Prefabs/Projectiles/ElementalRingVoidBlackHole");
			}

			internal bool <BuffSingularityBand>b__4_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 1f);
			}
		}

		public static void Start()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			if (WConfig.cfg_Pink_Ring.Value)
			{
				object obj = <>O.<0>__BuffSingularityBand;
				if (obj == null)
				{
					Manipulator val = BuffSingularityBand;
					<>O.<0>__BuffSingularityBand = val;
					obj = (object)val;
				}
				GlobalEventManager.ProcessHitEnemy += (Manipulator)obj;
				LanguageAPI.Add("ITEM_ELEMENTALRINGVOID_DESC", "Hits that deal <style=cIsDamage>more than 400% damage</style> also fire a black hole that <style=cIsUtility>draws enemies within 15m into its center</style>. Lasts <style=cIsUtility>5</style> seconds before collapsing, dealing <style=cIsDamage>150%</style> <style=cStack>(+150% per stack)</style> TOTAL damage. Recharges every <style=cIsUtility>20</style> seconds. <style=cIsVoid>Corrupts all Runald's and Kjaro's Bands</style>.", "en");
			}
			VoidAffix();
		}

		public static void VoidAffix()
		{
			//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_001a: 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_0069: 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_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Expected O, but got Unknown
			//IL_01fa: 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_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Expected O, but got Unknown
			//IL_025a: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Expected O, but got Unknown
			EquipmentDef val = Addressables.LoadAssetAsync<EquipmentDef>((object)"RoR2/DLC1/EliteVoid/EliteVoidEquipment.asset").WaitForCompletion();
			GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteVoid/DisplayAffixVoid.prefab").WaitForCompletion();
			GameObject val3 = PrefabAPI.InstantiateClone(val2, "PickupAffixVoidW", false);
			val3.transform.GetChild(0).GetChild(1).SetAsFirstSibling();
			val3.transform.GetChild(1).localPosition = new Vector3(0f, 0.7f, 0f);
			val3.transform.GetChild(1).GetChild(0).localPosition = new Vector3(0f, -0.5f, -0.6f);
			val3.transform.GetChild(1).GetChild(0).localScale = new Vector3(1.5f, 1.5f, 1.5f);
			((Component)val3.transform.GetChild(1).GetChild(1)).gameObject.SetActive(false);
			((Component)val3.transform.GetChild(1).GetChild(3)).gameObject.SetActive(false);
			val3.transform.GetChild(0).eulerAngles = new Vector3(310f, 0f, 0f);
			val3.transform.GetChild(0).localScale = new Vector3(0.75f, 0.75f, 0.75f);
			ItemDisplay component = val3.GetComponent<ItemDisplay>();
			component.rendererInfos = component.rendererInfos.Remove(component.rendererInfos[4]);
			LanguageAPI.Add("EQUIPMENT_AFFIXVOID_NAME", "Voidborne Curiosity", "en");
			LanguageAPI.Add("EQUIPMENT_AFFIXVOID_PICKUP", "Lose your aspect of self.", "en");
			LanguageAPI.Add("EQUIPMENT_AFFIXVOID_DESC", "Increases <style=cIsHealing>maximum health</style> by <style=cIsHealing>50%</style> and decrease <style=cIsDamage>base damage</style> by <style=cIsDamage>30%</style>. <style=cIsDamage>Collapse</style> enemies on hit and <style=cIsHealing>block</style> incoming damage once every <style=cIsUtility>15 seconds</style>. ", "en");
			Texture2D val4 = new Texture2D(128, 128, (TextureFormat)12, false);
			ImageConversion.LoadImage(val4, Resources.UniqueAffixVoid, true);
			((Texture)val4).filterMode = (FilterMode)1;
			((Texture)val4).wrapMode = (TextureWrapMode)1;
			Sprite pickupIconSprite = Sprite.Create(val4, WRect.rec128, WRect.half);
			val.pickupIconSprite = pickupIconSprite;
			val.pickupModelPrefab = val3;
			val.dropOnDeathChance = 0.00025f;
			object obj = <>c.<>9__1_0;
			if (obj == null)
			{
				hook_RespawnExtraLifeVoid val5 = delegate(orig_RespawnExtraLifeVoid orig, CharacterMaster self)
				{
					//IL_000f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0015: Invalid comparison between Unknown and I4
					//IL_001d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0040: Unknown result type (might be due to invalid IL or missing references)
					//IL_004a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0061: Unknown result type (might be due to invalid IL or missing references)
					//IL_0066: Unknown result type (might be due to invalid IL or missing references)
					//IL_006d: Unknown result type (might be due to invalid IL or missing references)
					orig.Invoke(self);
					if ((int)self.inventory.currentEquipmentIndex != -1 && Object.op_Implicit((Object)(object)EquipmentCatalog.GetEquipmentDef(self.inventory.currentEquipmentIndex).passiveBuffDef))
					{
						CharacterMasterNotificationQueue.PushEquipmentTransformNotification(self, self.inventory.currentEquipmentIndex, Equipment.EliteVoidEquipment.equipmentIndex, (TransformationType)1);
						self.inventory.SetEquipment(new EquipmentState(Equipment.EliteVoidEquipment.equipmentIndex, FixedTimeStamp.negativeInfinity, (byte)0, false), 0u);
					}
				};
				<>c.<>9__1_0 = val5;
				obj = (object)val5;
			}
			CharacterMaster.RespawnExtraLifeVoid += (hook_RespawnExtraLifeVoid)obj;
			object obj2 = <>O.<1>__AffixVoidBehavior_OnEnable;
			if (obj2 == null)
			{
				hook_OnEnable val6 = AffixVoidBehavior_OnEnable;
				<>O.<1>__AffixVoidBehavior_OnEnable = val6;
				obj2 = (object)val6;
			}
			AffixVoidBehavior.OnEnable += (hook_OnEnable)obj2;
			val2.AddComponent<VoidAffixPlayer>();
		}

		private static void AffixVoidBehavior_OnEnable(orig_OnEnable orig, AffixVoidBehavior self)
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Invalid comparison between Unknown and I4
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)((ItemBehavior)self).body) && Object.op_Implicit((Object)(object)((ItemBehavior)self).body.teamComponent) && (int)((ItemBehavior)self).body.teamComponent.teamIndex == 1 && !self.wasVoidBody)
			{
				CharacterBody body = ((ItemBehavior)self).body;
				body.bodyFlags = (BodyFlags)(body.bodyFlags & -1025);
			}
		}

		public static void BuffSingularityBand(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((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "Prefabs/Projectiles/ElementalRingVoidBlackHole")
			}))
			{
				val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f)
				});
				val.Next.Operand = 1.5f;
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: Singularity Band");
			}
		}
	}
	public class SotV_Reworks
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static StatHookEventHandler <0>__LaserScope_Rework;

			public static hook_PayCost <1>__CostTypeDef_PayCost;

			public static Manipulator <2>__IgnitionTank_Willo;

			public static Manipulator <3>__IgnitionTank_VoidWillo;

			public static Manipulator <4>__ICBM_StickyBomb;
		}

		public static void Start()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Expected O, but got Unknown
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			//IL_0095: 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_00a0: Expected O, but got Unknown
			object obj = <>O.<0>__LaserScope_Rework;
			if (obj == null)
			{
				StatHookEventHandler val = LaserScope_Rework;
				<>O.<0>__LaserScope_Rework = val;
				obj = (object)val;
			}
			RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
			object obj2 = <>O.<1>__CostTypeDef_PayCost;
			if (obj2 == null)
			{
				hook_PayCost val2 = CostTypeDef_PayCost;
				<>O.<1>__CostTypeDef_PayCost = val2;
				obj2 = (object)val2;
			}
			CostTypeDef.PayCost += (hook_PayCost)obj2;
			object obj3 = <>O.<2>__IgnitionTank_Willo;
			if (obj3 == null)
			{
				Manipulator val3 = IgnitionTank_Willo;
				<>O.<2>__IgnitionTank_Willo = val3;
				obj3 = (object)val3;
			}
			GlobalEventManager.ProcessHitEnemy += (Manipulator)obj3;
			object obj4 = <>O.<3>__IgnitionTank_VoidWillo;
			if (obj4 == null)
			{
				Manipulator val4 = IgnitionTank_VoidWillo;
				<>O.<3>__IgnitionTank_VoidWillo = val4;
				obj4 = (object)val4;
			}
			HealthComponent.TakeDamageProcess += (Manipulator)obj4;
			object obj5 = <>O.<4>__ICBM_StickyBomb;
			if (obj5 == null)
			{
				Manipulator val5 = ICBM_StickyBomb;
				<>O.<4>__ICBM_StickyBomb = val5;
				obj5 = (object)val5;
			}
			GlobalEventManager.ProcessHitEnemy += (Manipulator)obj5;
		}

		private static PayCostResults CostTypeDef_PayCost(orig_PayCost orig, CostTypeDef self, int cost, Interactor activator, GameObject purchasedObject, Xoroshiro128Plus rng, ItemIndex avoidedItemIndex)
		{
			throw new NotImplementedException();
		}

		private static void IgnitionTank_NerfDamage(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 3)
			}))
			{
				val.Next.OpCode = OpCodes.Ldc_R4;
				val.Next.Operand = 2.5f;
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: IgnitionTank_NerfDamage");
			}
		}

		private static void IgnitionTank_VoidWillo(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((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.HealthComponent/AssetReferences", "explodeOnDeathVoidExplosionPrefab")
			}))
			{
				val.EmitDelegate<Func<DelayBlast, DelayBlast>>((Func<DelayBlast, DelayBlast>)((DelayBlast damageInfo) => damageInfo));
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: IgnitionTank_Willo");
			}
		}

		private static void IgnitionTank_Willo(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((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "Prefabs/Projectiles/FireTornado")
			}))
			{
				val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "Prefabs/Projectiles/FireTornado")
				});
				val.EmitDelegate<Func<FireProjectileInfo, FireProjectileInfo>>((Func<FireProjectileInfo, FireProjectileInfo>)((FireProjectileInfo damageInfo) => damageInfo));
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: IgnitionTank_Kjaro");
			}
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.GlobalEventManager/CommonAssets", "explodeOnDeathPrefab")
			}))
			{
				val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "Prefabs/Projectiles/FireTornado")
				});
				val.EmitDelegate<Func<DelayBlast, DelayBlast>>((Func<DelayBlast, DelayBlast>)((DelayBlast damageInfo) => damageInfo));
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: IgnitionTank_Willo");
			}
		}

		private static void ICBM_StickyBomb(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)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2Content.Items", "StickyBomb")
			}))
			{
				val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.8f)
				});
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<float, DamageInfo, GameObject, float>>((Func<float, DamageInfo, GameObject, float>)delegate(float damageCoeff, DamageInfo damageInfo, GameObject victim)
				{
					//IL_0060: Unknown result type (might be due to invalid IL or missing references)
					//IL_0065: Unknown result type (might be due to invalid IL or missing references)
					//IL_0068: Unknown result type (might be due to invalid IL or missing references)
					//IL_006d: Unknown result type (might be due to invalid IL or missing references)
					//IL_006f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0074: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
					//IL_00af: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
					//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
					//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
					//IL_010d: Unknown result type (might be due to invalid IL or missing references)
					//IL_010f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0106: Unknown result type (might be due to invalid IL or missing references)
					//IL_0114: Unknown result type (might be due to invalid IL or missing references)
					//IL_0125: Unknown result type (might be due to invalid IL or missing references)
					//IL_0127: Unknown result type (might be due to invalid IL or missing references)
					int itemCount = damageInfo.attacker.GetComponent<CharacterBody>().inventory.GetItemCount(Items.MoreMissile);
					if (itemCount > 0)
					{
						damageCoeff *= 0.5f + 0.5f * (float)itemCount;
						CharacterBody val2 = (Object.op_Implicit((Object)(object)victim) ? victim.GetComponent<CharacterBody>() : null);
						bool alive = val2.healthComponent.alive;
						float num = 5f;
						Vector3 position = damageInfo.position;
						Vector3 val3 = val2.corePosition - position;
						float magnitude = ((Vector3)(ref val3)).magnitude;
						float num2 = Util.OnHitProcDamage(damageInfo.damage, damageInfo.attacker.GetComponent<CharacterBody>().damage, damageCoeff);
						Quaternion val4 = ((magnitude != 0f) ? Util.QuaternionSafeLookRotation(val3) : Random.rotationUniform);
						ProjectileManager.instance.FireProjectile(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/StickyBomb"), position, val4, damageInfo.attacker, num2, 100f, damageInfo.crit, (DamageColorIndex)3, (GameObject)null, alive ? (magnitude * num) : (-1f), (DamageTypeCombo?)null);
						val4 = ((magnitude != 0f) ? Util.QuaternionSafeLookRotation(val3) : Random.rotationUniform);
						ProjectileManager.instance.FireProjectile(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/StickyBomb"), position, val4, damageInfo.attacker, num2, 100f, damageInfo.crit, (DamageColorIndex)3, (GameObject)null, alive ? (magnitude * num) : (-1f), (DamageTypeCombo?)null);
					}
					return damageCoeff;
				});
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: ICBM_StickyBomb");
			}
		}

		private static void LaserScope_Rework(CharacterBody sender, StatHookEventArgs args)
		{
			if (!((Object)(object)sender.inventory != (Object)null))
			{
				return;
			}
			int itemCount = sender.inventory.GetItemCount(Items.CritDamage);
			if (itemCount > 0)
			{
				args.critAdd += (float)(40 * sender.inventory.GetItemCount(Items.CritDamage));
				if (sender.crit > 100f)
				{
					args.critDamageMultAdd += sender.crit - 100f;
				}
			}
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.Wolfo.WolfoItemBuffs", "WolfoItemBuffs", "1.0.8")]
	public class WolfoItemBuffs : BaseUnityPlugin
	{
		public void Awake()
		{
			WConfig.InitConfig();
			T1_White.Start();
			T2_Green.Start();
			T3_Red.Start();
			T_Boss.Start();
			T_Lunar.Start();
			T_Void.Start();
			Equipment.Start();
		}

		public static int GetItemCountFromPlayers(ItemIndex itemIndex)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			int num = 0;
			ReadOnlyCollection<PlayerCharacterMasterController> instances = PlayerCharacterMasterController.instances;
			int i = 0;
			for (int count = instances.Count; i < count; i++)
			{
				CharacterMaster master = instances[i].master;
				num += master.inventory.GetItemCount(itemIndex);
			}
			return num;
		}
	}
}
namespace WolfoItemBuffs.Properties
{
	[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
	[DebuggerNonUserCode]
	[CompilerGenerated]
	public class Resources
	{
		private static ResourceManager resourceMan;

		private static CultureInfo resourceCulture;

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

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

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

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

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

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

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

		internal Resources()
		{
		}
	}
}