Decompiled source of WolfoItemBuffs v1.0.6

WolfoItemBuffs.dll

Decompiled 2 weeks 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 Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates.Missions.LunarScavengerEncounter;
using On.EntityStates.ScavMonster;
using On.RoR2;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Items;
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 = "")]
[assembly: AssemblyCompany("WolfoItemBuffs")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[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: UnverifiableCode]
namespace WolfoItemBuffs
{
	public class WConfig
	{
		public static ConfigFile ConfigFileUNSORTED = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Wolfo_Item_Buffs.cfg", true);

		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_Red_Aegis;

		public static ConfigEntry<float> cfg_Red_Aegis_VAL;

		public static ConfigEntry<bool> cfg_Red_LaserScope;

		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_Orange_EliteInherit;

		public static void InitConfig()
		{
			cfg_Green_Harpoon = 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 - Value", 0.1f, "Barrier Decay Multiplier");
			cfg_Red_LaserScope = ConfigFileUNSORTED.Bind<bool>("Red", "Laser Scope", true, "15 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_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);
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.Wolfo.WolfoItemBuffs", "WolfoItemBuffs", "1.0.6")]
	public class WolfoItemBuffs : BaseUnityPlugin
	{
		public static float HarpoonSpeed = 1f;

		public static float AegisDrainMult = 0.1f;

		public void Awake()
		{
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Expected O, but got Unknown
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Expected O, but got Unknown
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Expected O, but got Unknown
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Expected O, but got Unknown
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Expected O, but got Unknown
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fb: Expected O, but got Unknown
			WConfig.InitConfig();
			HarpoonSpeed = WConfig.cfg_Green_Harpoon_VAL.Value / 100f;
			AegisDrainMult = WConfig.cfg_Red_Aegis_VAL.Value;
			WolfoItemBuffs2.Start();
			bool flag = Chainloader.PluginInfos.ContainsKey("com.Wolfo.AegisRemovesBarrierDecay");
			bool flag2 = Chainloader.PluginInfos.ContainsKey("com.Wolfo.RoRRHuntersHarpoon");
			if (!Chainloader.PluginInfos.ContainsKey("OakPrime.LeechingSeedBuff") && WConfig.cfg_Green_LeechSeed.Value)
			{
				HealthComponent.TakeDamageProcess += new Manipulator(Seed2);
				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 (!flag && WConfig.cfg_Green_Harpoon.Value)
			{
				CharacterBody.RecalculateStats += new Manipulator(Harpoon_ChangeMoveSpeed);
				GlobalEventManager.OnCharacterDeath += new Manipulator(Harpoon_ChangeDuration);
				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 (!flag2 && WConfig.cfg_Red_Aegis.Value)
			{
				CharacterBody.RecalculateStats += new hook_RecalculateStats(AegisNoDecay);
				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_Pink_Ring.Value)
			{
				GlobalEventManager.ProcessHitEnemy += new Manipulator(BuffSingularityBand);
				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");
			}
			HealthComponent.UpdateLastHitTime += new hook_UpdateLastHitTime(StealthKitElixir);
			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;
		}

		private void StealthKitElixir(orig_UpdateLastHitTime orig, HealthComponent self, float damageValue, Vector3 damagePosition, bool damageIsSilent, GameObject attacker)
		{
			//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);
		}

		private 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.DLC2Content/Buffs", "LowerHealthHigherDamageBuff")
			});
			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");
			}
		}

		private 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");
			}
		}

		private 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 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 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 WolfoItemBuffs2
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static StatHookEventHandler <>9__3_0;

			public static StatHookEventHandler <>9__3_1;

			public static hook_Awake <>9__3_2;

			public static hook_BeginEncounter <>9__3_3;

			public static hook_OnEnter <>9__3_4;

			public static hook_OnPreDestroyBodyServer <>9__3_5;

			public static hook_RespawnExtraLifeVoid <>9__4_0;

			public static hook_OnEquipmentLost <>9__4_1;

			public static hook_OnEnable <>9__4_2;

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

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

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

			internal void <Items>b__3_3(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 <Items>b__3_4(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 <Items>b__3_5(orig_OnPreDestroyBodyServer orig, Death self)
			{
				if (((Object)((EntityState)self).outer).name.StartsWith("ScavLunar"))
				{
					self.shouldDropPack = true;
				}
				orig.Invoke(self);
			}

			internal void <VoidAffix>b__4_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 void <VoidAffix>b__4_1(orig_OnEquipmentLost orig, CharacterBody self, EquipmentDef equipmentDef)
			{
				if (!((Object)(object)equipmentDef == (Object)(object)Equipment.EliteVoidEquipment) || self.healthComponent.alive)
				{
					orig.Invoke(self, equipmentDef);
				}
			}

			internal void <VoidAffix>b__4_2(orig_OnEnable orig, AffixVoidBehavior self)
			{
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_003e: 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_006c: 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 (Object.op_Implicit((Object)(object)((ItemBehavior)self).body) && ((ItemBehavior)self).body.isPlayerControlled && ((ItemBehavior)self).body.inventory.currentEquipmentIndex != Equipment.EliteVoidEquipment.equipmentIndex && !self.wasVoidBody)
				{
					CharacterBody body = ((ItemBehavior)self).body;
					body.bodyFlags = (BodyFlags)(body.bodyFlags & -1025);
				}
			}
		}

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

		public static void Start()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			Items();
			BetterRedWhipCheck();
			VoidAffix();
			if (WConfig.cfg_Orange_EliteInherit.Value)
			{
				MinionGroup.AddMinion += new hook_AddMinion(MinionsInheritWithDrones);
			}
		}

		public static void MinionsInheritWithDrones(orig_AddMinion orig, NetworkInstanceId ownerId, MinionOwnership minion)
		{
			//IL_0002: 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_0059: Invalid comparison between Unknown and I4
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(ownerId, minion);
			if (NetworkServer.active && !((Object)minion).name.StartsWith("AffixEarth") && Object.op_Implicit((Object)(object)minion.ownerMaster) && Object.op_Implicit((Object)(object)((Component)minion.ownerMaster).GetComponent<PlayerCharacterMasterController>()) && (int)minion.ownerMaster.inventory.GetEquipmentIndex() != -1 && minion.ownerMaster.hasBody && minion.ownerMaster.GetBody().isElite)
			{
				Inventory component = ((Component)minion).gameObject.GetComponent<Inventory>();
				component.SetEquipment(new EquipmentState(minion.ownerMaster.inventory.GetEquipmentIndex(), FixedTimeStamp.negativeInfinity, (byte)0, false), 0u);
				component.GiveItem(Items.BoostDamage, 10);
				component.GiveItem(Items.BoostHp, 30);
			}
		}

		public static void Items()
		{
			//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_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Expected O, but got Unknown
			//IL_010a: 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_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Expected O, but got Unknown
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Expected O, but got Unknown
			//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Expected O, but got Unknown
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: 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
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Expected O, but got Unknown
			//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02df: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ff: Unknown result type (might be due to invalid IL or missing references)
			Addressables.LoadAssetAsync<EquipmentDef>((object)"RoR2/Base/Jetpack/Jetpack.asset").WaitForCompletion().canBeRandomlyTriggered = true;
			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);
			}
			if (WConfig.cfg_Red_LaserScope.Value)
			{
				object obj = <>c.<>9__3_0;
				if (obj == null)
				{
					StatHookEventHandler val = delegate(CharacterBody sender, StatHookEventArgs args)
					{
						if ((Object)(object)sender.inventory != (Object)null && sender.inventory.GetItemCount(Items.CritDamage) > 0)
						{
							args.critAdd += 10f;
						}
					};
					<>c.<>9__3_0 = val;
					obj = (object)val;
				}
				RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
				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>.");
			}
			bool flag = Chainloader.PluginInfos.ContainsKey("OakPrime.KnurlBuff");
			if (WConfig.cfg_Yellow_Knurl.Value && !flag)
			{
				object obj2 = <>c.<>9__3_1;
				if (obj2 == null)
				{
					StatHookEventHandler val2 = delegate(CharacterBody sender, StatHookEventArgs args)
					{
						if ((Object)(object)sender.inventory != (Object)null)
						{
							args.armorAdd += (float)(sender.inventory.GetItemCount(Items.Knurl) * 14);
						}
					};
					<>c.<>9__3_1 = val2;
					obj2 = (object)val2;
				}
				RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj2;
				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>.");
			}
			EliteDef val3 = Addressables.LoadAssetAsync<EliteDef>((object)"RoR2/Base/EliteLunar/edLunar.asset").WaitForCompletion();
			EliteDefLunarEulogy.modifierToken = val3.modifierToken;
			EliteDefLunarEulogy.eliteEquipmentDef = val3.eliteEquipmentDef;
			EliteDefLunarEulogy.color = val3.color;
			EliteDefLunarEulogy.shaderEliteRampIndex = val3.shaderEliteRampIndex;
			EliteDefLunarEulogy.healthBoostCoefficient = 3.2f;
			EliteDefLunarEulogy.damageBoostCoefficient = val3.damageBoostCoefficient;
			((Object)EliteDefLunarEulogy).name = "edLunarEulogy";
			ContentAddition.AddEliteDef(val3);
			if (WConfig.cfg_Blue_Eulogy.Value)
			{
				CombatDirector.Spawn += new hook_Spawn(LunarEulogyHook);
				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 obj3 = <>c.<>9__3_2;
			if (obj3 == null)
			{
				hook_Awake val4 = delegate(orig_Awake orig, HoldoutZoneController self)
				{
					orig.Invoke(self);
					if (self.minimumRadius == 0f)
					{
						self.minimumRadius = 10f;
					}
				};
				<>c.<>9__3_2 = val4;
				obj3 = (object)val4;
			}
			HoldoutZoneController.Awake += (hook_Awake)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__3_3;
			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__3_3 = val5;
				obj4 = (object)val5;
			}
			ScriptedCombatEncounter.BeginEncounter += (hook_BeginEncounter)obj4;
			object obj5 = <>c.<>9__3_4;
			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__3_4 = val6;
				obj5 = (object)val6;
			}
			FadeOut.OnEnter += (hook_OnEnter)obj5;
			object obj6 = <>c.<>9__3_5;
			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__3_5 = val7;
				obj6 = (object)val7;
			}
			Death.OnPreDestroyBodyServer += (hook_OnPreDestroyBodyServer)obj6;
			if (WConfig.cfg_Yellow_DefenseNuc.Value)
			{
				ItemDef val8 = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/HeadHunter/HeadHunter.asset").WaitForCompletion();
				GameObject val9 = 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
				});
				val9.AddComponent<GivePickupsOnStart>().itemDefInfos = array;
			}
		}

		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_0067: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: 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_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Expected O, but got Unknown
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Expected O, but got Unknown
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Expected O, but got Unknown
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_0287: Expected O, but got Unknown
			EquipmentDef val = Addressables.LoadAssetAsync<EquipmentDef>((object)"RoR2/DLC1/EliteVoid/EliteVoidEquipment.asset").WaitForCompletion();
			GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteVoid/DisplayAffixVoid.prefab").WaitForCompletion(), "PickupAffixVoidW", false);
			val2.transform.GetChild(0).GetChild(1).SetAsFirstSibling();
			val2.transform.GetChild(1).localPosition = new Vector3(0f, 0.7f, 0f);
			val2.transform.GetChild(1).GetChild(0).localPosition = new Vector3(0f, -0.5f, -0.6f);
			val2.transform.GetChild(1).GetChild(0).localScale = new Vector3(1.5f, 1.5f, 1.5f);
			((Component)val2.transform.GetChild(1).GetChild(1)).gameObject.SetActive(false);
			((Component)val2.transform.GetChild(1).GetChild(3)).gameObject.SetActive(false);
			val2.transform.GetChild(0).eulerAngles = new Vector3(310f, 0f, 0f);
			val2.transform.GetChild(0).localScale = new Vector3(0.75f, 0.75f, 0.75f);
			ItemDisplay component = val2.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 val3 = new Texture2D(128, 128, (TextureFormat)12, false);
			ImageConversion.LoadImage(val3, Resources.UniqueAffixVoid, true);
			((Texture)val3).filterMode = (FilterMode)1;
			((Texture)val3).wrapMode = (TextureWrapMode)1;
			Sprite pickupIconSprite = Sprite.Create(val3, WRect.rec128, WRect.half);
			val.pickupIconSprite = pickupIconSprite;
			val.pickupModelPrefab = val2;
			val.dropOnDeathChance = 0.00025f;
			object obj = <>c.<>9__4_0;
			if (obj == null)
			{
				hook_RespawnExtraLifeVoid val4 = 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__4_0 = val4;
				obj = (object)val4;
			}
			CharacterMaster.RespawnExtraLifeVoid += (hook_RespawnExtraLifeVoid)obj;
			object obj2 = <>c.<>9__4_1;
			if (obj2 == null)
			{
				hook_OnEquipmentLost val5 = delegate(orig_OnEquipmentLost orig, CharacterBody self, EquipmentDef equipmentDef)
				{
					if (!((Object)(object)equipmentDef == (Object)(object)Equipment.EliteVoidEquipment) || self.healthComponent.alive)
					{
						orig.Invoke(self, equipmentDef);
					}
				};
				<>c.<>9__4_1 = val5;
				obj2 = (object)val5;
			}
			CharacterBody.OnEquipmentLost += (hook_OnEquipmentLost)obj2;
			object obj3 = <>c.<>9__4_2;
			if (obj3 == null)
			{
				hook_OnEnable val6 = delegate(orig_OnEnable orig, AffixVoidBehavior self)
				{
					//IL_0034: Unknown result type (might be due to invalid IL or missing references)
					//IL_003e: 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_006c: 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 (Object.op_Implicit((Object)(object)((ItemBehavior)self).body) && ((ItemBehavior)self).body.isPlayerControlled && ((ItemBehavior)self).body.inventory.currentEquipmentIndex != Equipment.EliteVoidEquipment.equipmentIndex && !self.wasVoidBody)
					{
						CharacterBody body = ((ItemBehavior)self).body;
						body.bodyFlags = (BodyFlags)(body.bodyFlags & -1025);
					}
				};
				<>c.<>9__4_2 = val6;
				obj3 = (object)val6;
			}
			AffixVoidBehavior.OnEnable += (hook_OnEnable)obj3;
		}

		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 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 = 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 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()
		{
		}
	}
}