Decompiled source of BossAdd v1.0.4

BepInEx/plugins/bossadd/AnimationSpeedManager.dll

Decompiled a day ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using HarmonyLib;
using JetBrains.Annotations;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("AnimationSpeedManager")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AnimationSpeedManager")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("B3A6D52C-449A-4665-9FD0-BB48C8CF2CDF")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[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;
		}
	}
}
public static class AnimationSpeedManager
{
	public delegate double Handler(Character character, double speed);

	private static readonly Harmony harmony = new Harmony("AnimationSpeedManager");

	private static bool hasMarkerPatch = false;

	private static readonly MethodInfo method = AccessTools.DeclaredMethod(typeof(CharacterAnimEvent), "CustomFixedUpdate", (Type[])null, (Type[])null);

	private static int index = 0;

	private static bool changed = false;

	private static Handler[][] handlers = Array.Empty<Handler[]>();

	private static readonly Dictionary<int, List<Handler>> handlersPriorities = new Dictionary<int, List<Handler>>();

	[PublicAPI]
	public static void Add(Handler handler, int priority = 400)
	{
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Expected O, but got Unknown
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Expected O, but got Unknown
		if (!hasMarkerPatch)
		{
			harmony.Patch((MethodBase)method, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(AnimationSpeedManager), "markerPatch", (Type[])null, (Type[])null)), (HarmonyMethod)null);
			hasMarkerPatch = true;
		}
		if (!handlersPriorities.TryGetValue(priority, out List<Handler> value))
		{
			handlersPriorities.Add(priority, value = new List<Handler>());
			harmony.Patch((MethodBase)method, (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(AnimationSpeedManager), "wrapper", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
		}
		value.Add(handler);
		handlers = (from kv in handlersPriorities
			orderby kv.Key
			select kv.Value.ToArray()).ToArray();
	}

	private static void wrapper(Character ___m_character, Animator ___m_animator)
	{
		Character ___m_character2 = ___m_character;
		double num = (double)___m_animator.speed * 10000000.0 % 100.0;
		if ((!(num > 10.0) || !(num < 30.0)) && !(___m_animator.speed <= 0.001f))
		{
			double num2 = ___m_animator.speed;
			double num3 = handlers[index++].Aggregate(num2, (double current, Handler handler) => handler(___m_character2, current));
			if (num3 != num2)
			{
				___m_animator.speed = (float)(num3 - num3 % 1E-05);
				changed = true;
			}
		}
	}

	private static void markerPatch(Animator ___m_animator)
	{
		if (changed)
		{
			double num = (double)___m_animator.speed * 10000000.0 % 100.0;
			if ((num < 10.0 || num > 30.0) ? true : false)
			{
				___m_animator.speed += 1.9E-06f;
			}
			changed = false;
		}
		index = 0;
	}
}

BepInEx/plugins/bossadd/bossadd.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
using bossadd.Patches;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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 bossadd
{
	public static class BonemassConfig
	{
		public static ConfigEntry<bool> SplitEnabled { get; private set; }

		public static ConfigEntry<float> SplitHealthThreshold { get; private set; }

		public static ConfigEntry<bool> KillConditionEnabled { get; private set; }

		public static ConfigEntry<bool> KillOrderEnabled { get; private set; }

		public static ConfigEntry<float> WrongOrderHealPercent { get; private set; }

		public static ConfigEntry<float> MiniDamageMult { get; private set; }

		public static ConfigEntry<float> MiniHPMult { get; private set; }

		public static ConfigEntry<float> MiniSpeedMult { get; private set; }

		public static ConfigEntry<float> MiniAttackRangeMult { get; private set; }

		public static ConfigEntry<float> MiniAttackIntervalMult { get; private set; }

		public static ConfigEntry<string> MiniResistBlunt { get; private set; }

		public static ConfigEntry<string> MiniResistSlash { get; private set; }

		public static ConfigEntry<string> MiniResistPierce { get; private set; }

		public static ConfigEntry<string> MiniResistFire { get; private set; }

		public static ConfigEntry<string> MiniResistFrost { get; private set; }

		public static ConfigEntry<string> MiniResistLightning { get; private set; }

		public static ConfigEntry<string> MiniResistPoison { get; private set; }

		public static ConfigEntry<string> MiniResistSpirit { get; private set; }

		public static ConfigEntry<bool> BonusSpawnEnabled { get; private set; }

		public static ConfigEntry<string> BonusSpawnPrefab { get; private set; }

		public static ConfigEntry<float> BonusSpawnChance { get; private set; }

		public static ConfigEntry<int> BonusSpawnCount { get; private set; }

		public static ConfigEntry<float> BonusSpawnHealthThreshold { get; private set; }

		public static ConfigEntry<string> PhaseMessage { get; private set; }

		public static ConfigEntry<float> PhaseMessageHP { get; private set; }

		public static void Bind(ConfigFile cfg)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: 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_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Expected O, but got Unknown
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Expected O, but got Unknown
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Expected O, but got Unknown
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Expected O, but got Unknown
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Expected O, but got Unknown
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Expected O, but got Unknown
			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bc: Expected O, but got Unknown
			//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ec: Expected O, but got Unknown
			//IL_0312: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: Expected O, but got Unknown
			//IL_0342: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Expected O, but got Unknown
			//IL_0372: Unknown result type (might be due to invalid IL or missing references)
			//IL_037c: Expected O, but got Unknown
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ac: Expected O, but got Unknown
			//IL_03d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dc: Expected O, but got Unknown
			//IL_0456: Unknown result type (might be due to invalid IL or missing references)
			//IL_0460: Expected O, but got Unknown
			//IL_0489: Unknown result type (might be due to invalid IL or missing references)
			//IL_0493: Expected O, but got Unknown
			//IL_04c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d1: Expected O, but got Unknown
			//IL_052a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0534: Expected O, but got Unknown
			SplitEnabled = cfg.Bind<bool>("Bonemass", "(Split Summon) Enabled", true, LocalizationManager.Desc("Bonemass.SplitSummon.Enabled"));
			SplitHealthThreshold = cfg.Bind<float>("Bonemass", "(Split Summon) HPThreshold", 50f, new ConfigDescription(LocalizationManager.Desc("Bonemass.SplitSummon.HPThreshold"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 99f), Array.Empty<object>()));
			KillConditionEnabled = cfg.Bind<bool>("Bonemass", "(Kill Condition) Enabled", true, LocalizationManager.Desc("Bonemass.KillCondition.Enabled"));
			KillOrderEnabled = cfg.Bind<bool>("Bonemass", "(Kill Condition) OrderEnabled", true, LocalizationManager.Desc("Bonemass.KillCondition.OrderEnabled"));
			WrongOrderHealPercent = cfg.Bind<float>("Bonemass", "(Kill Condition) WrongOrderHeal", 5f, new ConfigDescription(LocalizationManager.Desc("Bonemass.KillCondition.WrongOrderHeal"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 50f), Array.Empty<object>()));
			MiniDamageMult = cfg.Bind<float>("Bonemass", "(Mini Stat) DamageMult", 1f, new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniStat.DamageMult"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
			MiniHPMult = cfg.Bind<float>("Bonemass", "(Mini Stat) HPMult", 0.3f, new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniStat.HPMult"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.05f, 1f), Array.Empty<object>()));
			MiniSpeedMult = cfg.Bind<float>("Bonemass", "(Mini Stat) SpeedMult", 1.6f, new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniStat.SpeedMult"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 4f), Array.Empty<object>()));
			MiniAttackRangeMult = cfg.Bind<float>("Bonemass", "(Mini Stat) AttackRangeMult", 0.35f, new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniStat.AttackRangeMult"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 1f), Array.Empty<object>()));
			MiniAttackIntervalMult = cfg.Bind<float>("Bonemass", "(Mini Stat) AttackIntervalMult", 1f, new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniStat.AttackIntervalMult"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.3f, 3f), Array.Empty<object>()));
			AcceptableValueList<string> val = new AcceptableValueList<string>(new string[8] { "Inherit", "Normal", "Resistant", "VeryResistant", "Weak", "VeryWeak", "Immune", "Ignore" });
			MiniResistBlunt = cfg.Bind<string>("Bonemass", "(Mini Resist) Blunt", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Blunt"), (AcceptableValueBase)(object)val, Array.Empty<object>()));
			MiniResistSlash = cfg.Bind<string>("Bonemass", "(Mini Resist) Slash", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Slash"), (AcceptableValueBase)(object)val, Array.Empty<object>()));
			MiniResistPierce = cfg.Bind<string>("Bonemass", "(Mini Resist) Pierce", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Pierce"), (AcceptableValueBase)(object)val, Array.Empty<object>()));
			MiniResistFire = cfg.Bind<string>("Bonemass", "(Mini Resist) Fire", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Fire"), (AcceptableValueBase)(object)val, Array.Empty<object>()));
			MiniResistFrost = cfg.Bind<string>("Bonemass", "(Mini Resist) Frost", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Frost"), (AcceptableValueBase)(object)val, Array.Empty<object>()));
			MiniResistLightning = cfg.Bind<string>("Bonemass", "(Mini Resist) Lightning", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Lightning"), (AcceptableValueBase)(object)val, Array.Empty<object>()));
			MiniResistPoison = cfg.Bind<string>("Bonemass", "(Mini Resist) Poison", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Poison"), (AcceptableValueBase)(object)val, Array.Empty<object>()));
			MiniResistSpirit = cfg.Bind<string>("Bonemass", "(Mini Resist) Spirit", "Inherit", new ConfigDescription(LocalizationManager.Desc("Bonemass.MiniResist.Spirit"), (AcceptableValueBase)(object)val, Array.Empty<object>()));
			BonusSpawnEnabled = cfg.Bind<bool>("Bonemass", "(Throw Summon) Enabled", false, LocalizationManager.Desc("Bonemass.ThrowSummon.Enabled"));
			BonusSpawnPrefab = cfg.Bind<string>("Bonemass", "(Throw Summon) Prefab", "Blob", LocalizationManager.Desc("Bonemass.ThrowSummon.Prefab"));
			BonusSpawnChance = cfg.Bind<float>("Bonemass", "(Throw Summon) Chance", 50f, new ConfigDescription(LocalizationManager.Desc("Bonemass.ThrowSummon.Chance"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			BonusSpawnCount = cfg.Bind<int>("Bonemass", "(Throw Summon) Count", 1, new ConfigDescription(LocalizationManager.Desc("Bonemass.ThrowSummon.Count"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), Array.Empty<object>()));
			BonusSpawnHealthThreshold = cfg.Bind<float>("Bonemass", "(Throw Summon) HPThreshold", 100f, new ConfigDescription(LocalizationManager.Desc("Bonemass.ThrowSummon.HPThreshold"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>()));
			PhaseMessage = cfg.Bind<string>("Bonemass", "(Phase) Message", "", LocalizationManager.Desc("Bonemass.Phase.Message"));
			PhaseMessageHP = cfg.Bind<float>("Bonemass", "(Phase) MessageHP", 50f, new ConfigDescription(LocalizationManager.Desc("Bonemass.Phase.MessageHP"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>()));
		}
	}
	internal static class MiniBonemassVariants
	{
		public const int Count = 5;

		public static readonly string[] Names = new string[5] { "MiniBonemass_Red", "MiniBonemass_Orange", "MiniBonemass_Yellow", "MiniBonemass_Green", "MiniBonemass_Blue" };

		public static readonly string[] KoreanNames = new string[5] { "빨강", "주황", "노랑", "초록", "파랑" };

		public static readonly Color[] Colors = (Color[])(object)new Color[5]
		{
			new Color(1f, 0.05f, 0.05f),
			new Color(1f, 0.45f, 0f),
			new Color(1f, 1f, 0f),
			new Color(0f, 0.9f, 0.8f),
			new Color(0.05f, 0.3f, 1f)
		};

		public static bool IsMini(string prefabName)
		{
			return prefabName?.StartsWith("MiniBonemass_") ?? false;
		}

		public static int IndexOf(string prefabName)
		{
			for (int i = 0; i < Names.Length; i++)
			{
				if (Names[i] == prefabName)
				{
					return i;
				}
			}
			return -1;
		}
	}
	[HarmonyPatch(typeof(ZNetScene), "Awake")]
	internal static class MonsterDB
	{
		private static readonly FieldInfo s_namedPrefabsField = AccessTools.Field(typeof(ZNetScene), "m_namedPrefabs");

		private static readonly GameObject[] s_variants = (GameObject[])(object)new GameObject[5];

		[HarmonyPostfix]
		public static void Postfix(ZNetScene __instance)
		{
			if (!(s_namedPrefabsField.GetValue(__instance) is Dictionary<int, GameObject> namedPrefabs))
			{
				Plugin.Log.LogError((object)"[MonsterDB] m_namedPrefabs 접근 실패");
				return;
			}
			for (int i = 0; i < 5; i++)
			{
				RegisterVariant(__instance, namedPrefabs, i);
			}
		}

		private static void RegisterVariant(ZNetScene zns, Dictionary<int, GameObject> namedPrefabs, int idx)
		{
			//IL_000f: 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_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0270: 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_0283: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_028d: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0346: Unknown result type (might be due to invalid IL or missing references)
			//IL_0354: Unknown result type (might be due to invalid IL or missing references)
			//IL_035e: Unknown result type (might be due to invalid IL or missing references)
			string text = MiniBonemassVariants.Names[idx];
			Color tint = MiniBonemassVariants.Colors[idx];
			if ((Object)(object)zns.GetPrefab(text) != (Object)null)
			{
				return;
			}
			if ((Object)(object)s_variants[idx] != (Object)null)
			{
				zns.m_prefabs.Add(s_variants[idx]);
				namedPrefabs[StringExtensionMethods.GetStableHashCode(text)] = s_variants[idx];
				Plugin.Log.LogInfo((object)("[MonsterDB] " + text + " 재등록"));
				return;
			}
			GameObject prefab = zns.GetPrefab("Bonemass");
			if ((Object)(object)prefab == (Object)null)
			{
				Plugin.Log.LogError((object)("[MonsterDB] Bonemass 프리팹 없음 — " + text + " 등록 실패"));
				return;
			}
			bool activeSelf = prefab.activeSelf;
			prefab.SetActive(false);
			GameObject val = Object.Instantiate<GameObject>(prefab);
			prefab.SetActive(activeSelf);
			((Object)val).name = text;
			Object.DontDestroyOnLoad((Object)(object)val);
			val.SetActive(false);
			Character component = prefab.GetComponent<Character>();
			Character component2 = val.GetComponent<Character>();
			if ((Object)(object)component2 != (Object)null)
			{
				component2.m_boss = false;
				component2.m_bossEvent = "";
				component2.m_runSpeed *= BonemassConfig.MiniSpeedMult.Value;
				component2.m_walkSpeed *= BonemassConfig.MiniSpeedMult.Value;
				component2.m_swimSpeed *= BonemassConfig.MiniSpeedMult.Value;
				if ((Object)(object)component != (Object)null)
				{
					component2.m_health = Mathf.Max(component.m_health * BonemassConfig.MiniHPMult.Value, 1f);
				}
			}
			if ((Object)(object)component2 != (Object)null)
			{
				DamageModifiers damageModifiers = component2.m_damageModifiers;
				damageModifiers.m_blunt = ParseModifier(BonemassConfig.MiniResistBlunt.Value, damageModifiers.m_blunt);
				damageModifiers.m_slash = ParseModifier(BonemassConfig.MiniResistSlash.Value, damageModifiers.m_slash);
				damageModifiers.m_pierce = ParseModifier(BonemassConfig.MiniResistPierce.Value, damageModifiers.m_pierce);
				damageModifiers.m_fire = ParseModifier(BonemassConfig.MiniResistFire.Value, damageModifiers.m_fire);
				damageModifiers.m_frost = ParseModifier(BonemassConfig.MiniResistFrost.Value, damageModifiers.m_frost);
				damageModifiers.m_lightning = ParseModifier(BonemassConfig.MiniResistLightning.Value, damageModifiers.m_lightning);
				damageModifiers.m_poison = ParseModifier(BonemassConfig.MiniResistPoison.Value, damageModifiers.m_poison);
				damageModifiers.m_spirit = ParseModifier(BonemassConfig.MiniResistSpirit.Value, damageModifiers.m_spirit);
				component2.m_damageModifiers = damageModifiers;
			}
			ZNetView component3 = val.GetComponent<ZNetView>();
			if ((Object)(object)component3 != (Object)null)
			{
				component3.m_persistent = false;
			}
			MonsterAI component4 = val.GetComponent<MonsterAI>();
			if ((Object)(object)component4 != (Object)null && BonemassConfig.MiniAttackIntervalMult.Value != 1f)
			{
				component4.m_minAttackInterval *= BonemassConfig.MiniAttackIntervalMult.Value;
			}
			CharacterDrop component5 = val.GetComponent<CharacterDrop>();
			if ((Object)(object)component5 != (Object)null)
			{
				component5.m_drops.Clear();
			}
			ApplyTint(val, tint);
			val.transform.localScale = Vector3.one * 0.3f;
			zns.m_prefabs.Add(val);
			namedPrefabs[StringExtensionMethods.GetStableHashCode(text)] = val;
			s_variants[idx] = val;
			Plugin.Log.LogInfo((object)("[MonsterDB] " + text + " 등록 완료 — " + $"HP {component2?.m_health:F0} / 보스 플래그 OFF"));
		}

		private static DamageModifier ParseModifier(string value, DamageModifier original)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: 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_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: 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)
			if (string.IsNullOrEmpty(value) || value == "Inherit")
			{
				return original;
			}
			if (Enum.TryParse<DamageModifier>(value, out DamageModifier result))
			{
				return result;
			}
			Plugin.Log.LogWarning((object)("[MonsterDB] 알 수 없는 저항값 '" + value + "' → Inherit 처리"));
			return original;
		}

		private static void ApplyTint(GameObject go, Color tint)
		{
			//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_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//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_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: 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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			Renderer[] componentsInChildren = go.GetComponentsInChildren<Renderer>(true);
			foreach (Renderer val in componentsInChildren)
			{
				if (val is ParticleSystemRenderer)
				{
					continue;
				}
				Material[] sharedMaterials = val.sharedMaterials;
				bool flag = false;
				for (int j = 0; j < sharedMaterials.Length; j++)
				{
					if (!((Object)(object)sharedMaterials[j] == (Object)null))
					{
						Material val2 = new Material(sharedMaterials[j]);
						if (val2.HasProperty("_Color"))
						{
							Color color = val2.color;
							val2.color = new Color(tint.r, tint.g, tint.b, color.a);
						}
						if (val2.HasProperty("_EmissionColor"))
						{
							val2.EnableKeyword("_EMISSION");
							val2.SetColor("_EmissionColor", tint * 15f);
						}
						if (val2.HasProperty("_TintColor"))
						{
							val2.SetColor("_TintColor", new Color(tint.r, tint.g, tint.b, 0.5f));
						}
						sharedMaterials[j] = val2;
						flag = true;
					}
				}
				if (flag)
				{
					val.sharedMaterials = sharedMaterials;
				}
			}
			ParticleSystem[] componentsInChildren2 = go.GetComponentsInChildren<ParticleSystem>(true);
			foreach (ParticleSystem val3 in componentsInChildren2)
			{
				MainModule main = val3.main;
				EmissionModule emission = val3.emission;
				((EmissionModule)(ref emission)).rateOverTimeMultiplier = ((EmissionModule)(ref emission)).rateOverTimeMultiplier * 0.1f;
				((EmissionModule)(ref emission)).rateOverDistanceMultiplier = ((EmissionModule)(ref emission)).rateOverDistanceMultiplier * 0.1f;
				((MainModule)(ref main)).startSizeMultiplier = ((MainModule)(ref main)).startSizeMultiplier * 0.35f;
				MinMaxGradient startColor = ((MainModule)(ref main)).startColor;
				Color color2 = ((MinMaxGradient)(ref startColor)).color;
				((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(tint.r, tint.g, tint.b, color2.a * 0.06f));
			}
		}
	}
	public static class EikthyrSummonConfig
	{
		public static ConfigEntry<bool> Enabled { get; private set; }

		public static ConfigEntry<SummonTriggerMode> TriggerMode { get; private set; }

		public static ConfigEntry<int> HealthStepCount { get; private set; }

		public static ConfigEntry<float> TimerInterval { get; private set; }

		public static ConfigEntry<string> SummonPrefab { get; private set; }

		public static ConfigEntry<int> SummonCount { get; private set; }

		public static ConfigEntry<int> SummonLevel { get; private set; }

		public static ConfigEntry<int> MaxTotalSummons { get; private set; }

		public static ConfigEntry<bool> UseCLLC { get; private set; }

		public static ConfigEntry<bool> SpecialSummonEnabled { get; private set; }

		public static ConfigEntry<float> SpecialSummonHealthThreshold { get; private set; }

		public static ConfigEntry<string> SpecialSummonPrefab { get; private set; }

		public static ConfigEntry<int> SpecialSummonCount { get; private set; }

		public static ConfigEntry<int> SpecialSummonLevel { get; private set; }

		public static ConfigEntry<string> SpecialSummonVfxPrefab { get; private set; }

		public static ConfigEntry<bool> Phase2Enabled { get; private set; }

		public static ConfigEntry<float> Phase2HealthThreshold { get; private set; }

		public static ConfigEntry<string> StompAnimName { get; private set; }

		public static ConfigEntry<float> LightningProcChance { get; private set; }

		public static ConfigEntry<int> LightningCount { get; private set; }

		public static ConfigEntry<float> LightningDamageBlunt { get; private set; }

		public static ConfigEntry<float> LightningDamageSlash { get; private set; }

		public static ConfigEntry<float> LightningDamagePierce { get; private set; }

		public static ConfigEntry<float> LightningDamageLightning { get; private set; }

		public static ConfigEntry<float> LightningStartDelay { get; private set; }

		public static ConfigEntry<float> LightningSafeZoneRadius { get; private set; }

		public static ConfigEntry<float> LightningDotDuration { get; private set; }

		public static ConfigEntry<float> LightningDotMinDamage { get; private set; }

		public static ConfigEntry<float> LightningDotMaxDamage { get; private set; }

		public static ConfigEntry<bool> HornLaunchEnabled { get; private set; }

		public static ConfigEntry<float> HornLaunchHealthThreshold { get; private set; }

		public static ConfigEntry<string> HornLaunchAnimName { get; private set; }

		public static ConfigEntry<float> HornLaunchHorizontalForce { get; private set; }

		public static ConfigEntry<float> HornLaunchVerticalForce { get; private set; }

		public static ConfigEntry<float> HornLaunchProcChance { get; private set; }

		public static ConfigEntry<bool> HornLaunchAffectsBlocking { get; private set; }

		public static ConfigEntry<string> PhaseMessage { get; private set; }

		public static ConfigEntry<float> PhaseMessageHP { get; private set; }

		public static void Bind(ConfigFile cfg)
		{
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Expected O, but got Unknown
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Expected O, but got Unknown
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Expected O, but got Unknown
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Expected O, but got Unknown
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Expected O, but got Unknown
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Expected O, but got Unknown
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			//IL_027a: Expected O, but got Unknown
			//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fe: Expected O, but got Unknown
			//IL_0357: Unknown result type (might be due to invalid IL or missing references)
			//IL_0361: Expected O, but got Unknown
			//IL_038a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0394: Expected O, but got Unknown
			//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d2: Expected O, but got Unknown
			//IL_0406: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Expected O, but got Unknown
			//IL_0444: Unknown result type (might be due to invalid IL or missing references)
			//IL_044e: Expected O, but got Unknown
			//IL_0482: Unknown result type (might be due to invalid IL or missing references)
			//IL_048c: Expected O, but got Unknown
			//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ca: Expected O, but got Unknown
			//IL_04fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0508: Expected O, but got Unknown
			//IL_053c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0546: Expected O, but got Unknown
			//IL_057a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0584: Expected O, but got Unknown
			//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c2: Expected O, but got Unknown
			//IL_0617: Unknown result type (might be due to invalid IL or missing references)
			//IL_0621: Expected O, but got Unknown
			//IL_067a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0684: Expected O, but got Unknown
			//IL_06b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c2: Expected O, but got Unknown
			//IL_06f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0700: Expected O, but got Unknown
			//IL_077a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0784: Expected O, but got Unknown
			Enabled = cfg.Bind<bool>("Eikthyr", "(Summon) Enabled", true, LocalizationManager.Desc("Eikthyr.Summon.Enabled"));
			TriggerMode = cfg.Bind<SummonTriggerMode>("Eikthyr", "(Summon) TriggerMode", SummonTriggerMode.Both, LocalizationManager.Desc("Eikthyr.Summon.TriggerMode"));
			HealthStepCount = cfg.Bind<int>("Eikthyr", "(Summon) HealthStepCount", 10, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.HealthStepCount"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 100), Array.Empty<object>()));
			TimerInterval = cfg.Bind<float>("Eikthyr", "(Summon) TimerInterval", 30f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.TimerInterval"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 3600f), Array.Empty<object>()));
			SummonPrefab = cfg.Bind<string>("Eikthyr", "(Summon) Prefab", "Troll", LocalizationManager.Desc("Eikthyr.Summon.Prefab"));
			SummonCount = cfg.Bind<int>("Eikthyr", "(Summon) Count", 2, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.Count"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 50), Array.Empty<object>()));
			SummonLevel = cfg.Bind<int>("Eikthyr", "(Summon) Level", 1, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.Level"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 5), Array.Empty<object>()));
			MaxTotalSummons = cfg.Bind<int>("Eikthyr", "(Summon) MaxTotal", 20, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.MaxTotal"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 200), Array.Empty<object>()));
			UseCLLC = cfg.Bind<bool>("Eikthyr", "(Summon) UseCLLC", false, LocalizationManager.Desc("Eikthyr.Summon.UseCLLC"));
			SpecialSummonEnabled = cfg.Bind<bool>("Eikthyr", "(Special Summon) Enabled", true, LocalizationManager.Desc("Eikthyr.Summon.SpecialEnabled"));
			SpecialSummonHealthThreshold = cfg.Bind<float>("Eikthyr", "(Special Summon) HPThreshold", 50f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.SpecialHPThreshold"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 99f), Array.Empty<object>()));
			SpecialSummonPrefab = cfg.Bind<string>("Eikthyr", "(Special Summon) Prefab", "Troll", LocalizationManager.Desc("Eikthyr.Summon.SpecialPrefab"));
			SpecialSummonCount = cfg.Bind<int>("Eikthyr", "(Special Summon) Count", 1, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.SpecialCount"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), Array.Empty<object>()));
			SpecialSummonLevel = cfg.Bind<int>("Eikthyr", "(Special Summon) Level", 3, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Summon.SpecialLevel"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 5), Array.Empty<object>()));
			SpecialSummonVfxPrefab = cfg.Bind<string>("Eikthyr", "(Special Summon) VFX", "vfx_GodExplosion", LocalizationManager.Desc("Eikthyr.Summon.SpecialVFX"));
			Phase2Enabled = cfg.Bind<bool>("Eikthyr", "(Lightning) Enabled", true, LocalizationManager.Desc("Eikthyr.Lightning.Enabled"));
			Phase2HealthThreshold = cfg.Bind<float>("Eikthyr", "(Lightning) HPThreshold", 50f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.HPThreshold"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 99f), Array.Empty<object>()));
			StompAnimName = cfg.Bind<string>("Eikthyr", "(Lightning) StompAnim", "stomp", LocalizationManager.Desc("Eikthyr.Lightning.StompAnim"));
			LightningProcChance = cfg.Bind<float>("Eikthyr", "(Lightning) ProcChance", 50f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.ProcChance"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			LightningCount = cfg.Bind<int>("Eikthyr", "(Lightning) Count", 3, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.Count"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), Array.Empty<object>()));
			LightningDamageBlunt = cfg.Bind<float>("Eikthyr", "(Lightning) DamageBlunt", 0f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.DamageBlunt"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1000f), Array.Empty<object>()));
			LightningDamageSlash = cfg.Bind<float>("Eikthyr", "(Lightning) DamageSlash", 0f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.DamageSlash"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1000f), Array.Empty<object>()));
			LightningDamagePierce = cfg.Bind<float>("Eikthyr", "(Lightning) DamagePierce", 0f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.DamagePierce"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1000f), Array.Empty<object>()));
			LightningDamageLightning = cfg.Bind<float>("Eikthyr", "(Lightning) DamageLightning", 50f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.DamageLightning"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1000f), Array.Empty<object>()));
			LightningStartDelay = cfg.Bind<float>("Eikthyr", "(Lightning) StartDelay", 0.8f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.StartDelay"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 5f), Array.Empty<object>()));
			LightningSafeZoneRadius = cfg.Bind<float>("Eikthyr", "(Lightning) SafeZoneRadius", 10f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.SafeZoneRadius"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 49f), Array.Empty<object>()));
			LightningDotDuration = cfg.Bind<float>("Eikthyr", "(Lightning) DotDuration", 4f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.DotDuration"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 30f), Array.Empty<object>()));
			LightningDotMinDamage = cfg.Bind<float>("Eikthyr", "(Lightning) DotMinDamage", 1f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.DotMinDamage"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			LightningDotMaxDamage = cfg.Bind<float>("Eikthyr", "(Lightning) DotMaxDamage", 5f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Lightning.DotMaxDamage"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			HornLaunchEnabled = cfg.Bind<bool>("Eikthyr", "(Horn Attack) Enabled", true, LocalizationManager.Desc("Eikthyr.HornAttack.Enabled"));
			HornLaunchHealthThreshold = cfg.Bind<float>("Eikthyr", "(Horn Attack) HPThreshold", 100f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.HornAttack.HPThreshold"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>()));
			HornLaunchAnimName = cfg.Bind<string>("Eikthyr", "(Horn Attack) Anim", "attack1", LocalizationManager.Desc("Eikthyr.HornAttack.Anim"));
			HornLaunchHorizontalForce = cfg.Bind<float>("Eikthyr", "(Horn Attack) HorizontalForce", 15f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.HornAttack.HorizontalForce"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			HornLaunchVerticalForce = cfg.Bind<float>("Eikthyr", "(Horn Attack) VerticalForce", 12f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.HornAttack.VerticalForce"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			HornLaunchProcChance = cfg.Bind<float>("Eikthyr", "(Horn Attack) ProcChance", 100f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.HornAttack.ProcChance"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			HornLaunchAffectsBlocking = cfg.Bind<bool>("Eikthyr", "(Horn Attack) AffectsBlocking", false, LocalizationManager.Desc("Eikthyr.HornAttack.AffectsBlocking"));
			PhaseMessage = cfg.Bind<string>("Eikthyr", "(Phase) Message", "", LocalizationManager.Desc("Eikthyr.Phase.Message"));
			PhaseMessageHP = cfg.Bind<float>("Eikthyr", "(Phase) MessageHP", 50f, new ConfigDescription(LocalizationManager.Desc("Eikthyr.Phase.MessageHP"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>()));
		}
	}
	public static class ModerConfig
	{
		public static ConfigEntry<bool> SplitEnabled { get; private set; }

		public static ConfigEntry<float> SplitHPThreshold { get; private set; }

		public static ConfigEntry<int> SplitCount { get; private set; }

		public static ConfigEntry<float> MiniScaleMult { get; private set; }

		public static ConfigEntry<float> MiniHPMult { get; private set; }

		public static ConfigEntry<float> MiniDamageMult { get; private set; }

		public static ConfigEntry<float> MiniSpeedMult { get; private set; }

		public static ConfigEntry<float> MiniAttackIntervalMult { get; private set; }

		public static ConfigEntry<float> MiniAttackRangeMult { get; private set; }

		public static ConfigEntry<float> MiniFlightDuration { get; private set; }

		public static ConfigEntry<float> MiniFarTargetMinDist { get; private set; }

		public static ConfigEntry<bool> AirBreathEnabled { get; private set; }

		public static ConfigEntry<float> AirBreathCooldown { get; private set; }

		public static ConfigEntry<float> AirBreathRange { get; private set; }

		public static ConfigEntry<float> AirBreathAngle { get; private set; }

		public static ConfigEntry<float> AirBreathDamageFrost { get; private set; }

		public static ConfigEntry<float> AirBreathDamageBlunt { get; private set; }

		public static ConfigEntry<string> AirBreathVFX { get; private set; }

		public static ConfigEntry<float> AirBreathMinAltitude { get; private set; }

		public static ConfigEntry<float> AirBreathHPThreshold { get; private set; }

		public static ConfigEntry<string> AirBreathPhaseMessage { get; private set; }

		public static ConfigEntry<float> AirBreathPhaseMessageHP { get; private set; }

		public static ConfigEntry<bool> LandBlastEnabled { get; private set; }

		public static ConfigEntry<float> LandBlastRadius { get; private set; }

		public static ConfigEntry<float> LandBlastPushForce { get; private set; }

		public static ConfigEntry<float> LandBlastPushForceY { get; private set; }

		public static ConfigEntry<string> LandBlastVFX { get; private set; }

		public static ConfigEntry<float> LandBlastVFXScale { get; private set; }

		public static ConfigEntry<string> LandBlastSFX { get; private set; }

		public static ConfigEntry<float> LandBlastCooldown { get; private set; }

		public static ConfigEntry<float> LandBlastDelay { get; private set; }

		public static ConfigEntry<bool> RoarEnabled { get; private set; }

		public static ConfigEntry<float> RoarHPThreshold { get; private set; }

		public static ConfigEntry<float> RoarCooldown { get; private set; }

		public static ConfigEntry<float> RoarRadius { get; private set; }

		public static ConfigEntry<float> RoarDamageFrost { get; private set; }

		public static ConfigEntry<float> RoarDamageBlunt { get; private set; }

		public static ConfigEntry<float> RoarPushForce { get; private set; }

		public static ConfigEntry<float> RoarStaggerMult { get; private set; }

		public static ConfigEntry<bool> RoarBlockable { get; private set; }

		public static ConfigEntry<string> RoarVFX { get; private set; }

		public static ConfigEntry<string> RoarSFX { get; private set; }

		public static ConfigEntry<bool> ZoneEnabled { get; private set; }

		public static ConfigEntry<float> ZoneHPThreshold { get; private set; }

		public static ConfigEntry<bool> ZoneSlowEnabled { get; private set; }

		public static ConfigEntry<int> ZoneCount { get; private set; }

		public static ConfigEntry<float> ZoneSpawnRange { get; private set; }

		public static ConfigEntry<float> ZoneRadius { get; private set; }

		public static ConfigEntry<float> ZoneDamageFrost { get; private set; }

		public static ConfigEntry<float> ZoneDamageBlunt { get; private set; }

		public static ConfigEntry<float> ZoneDuration { get; private set; }

		public static ConfigEntry<string> ZoneVFX { get; private set; }

		public static ConfigEntry<float> ZoneVFXScale { get; private set; }

		public static void Bind(ConfigFile cfg)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Expected O, but got Unknown
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Expected O, but got Unknown
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Expected O, but got Unknown
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Expected O, but got Unknown
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Expected O, but got Unknown
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Expected O, but got Unknown
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Expected O, but got Unknown
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Expected O, but got Unknown
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Expected O, but got Unknown
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02db: Expected O, but got Unknown
			//IL_030f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0319: Expected O, but got Unknown
			//IL_034d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0357: Expected O, but got Unknown
			//IL_038b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0395: Expected O, but got Unknown
			//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d3: Expected O, but got Unknown
			//IL_042c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0436: Expected O, but got Unknown
			//IL_046a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0474: Expected O, but got Unknown
			//IL_04cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d7: Expected O, but got Unknown
			//IL_052c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0536: Expected O, but got Unknown
			//IL_056a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0574: Expected O, but got Unknown
			//IL_05a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b2: Expected O, but got Unknown
			//IL_060b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0615: Expected O, but got Unknown
			//IL_066e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0678: Expected O, but got Unknown
			//IL_06ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b6: Expected O, but got Unknown
			//IL_070b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0715: Expected O, but got Unknown
			//IL_0749: Unknown result type (might be due to invalid IL or missing references)
			//IL_0753: Expected O, but got Unknown
			//IL_0787: Unknown result type (might be due to invalid IL or missing references)
			//IL_0791: Expected O, but got Unknown
			//IL_07c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07cf: Expected O, but got Unknown
			//IL_0803: Unknown result type (might be due to invalid IL or missing references)
			//IL_080d: Expected O, but got Unknown
			//IL_0841: Unknown result type (might be due to invalid IL or missing references)
			//IL_084b: Expected O, but got Unknown
			//IL_087f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0889: Expected O, but got Unknown
			//IL_0949: Unknown result type (might be due to invalid IL or missing references)
			//IL_0953: Expected O, but got Unknown
			//IL_099d: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a7: Expected O, but got Unknown
			//IL_09db: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e5: Expected O, but got Unknown
			//IL_0a19: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a23: Expected O, but got Unknown
			//IL_0a57: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a61: Expected O, but got Unknown
			//IL_0a95: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a9f: Expected O, but got Unknown
			//IL_0ad3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0add: Expected O, but got Unknown
			//IL_0b36: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b40: Expected O, but got Unknown
			SplitEnabled = cfg.Bind<bool>("Moder", "(Frost Clone) Enabled", true, LocalizationManager.Desc("Moder.FrostClone.Enabled"));
			SplitHPThreshold = cfg.Bind<float>("Moder", "(Frost Clone) HPThreshold", 40f, new ConfigDescription(LocalizationManager.Desc("Moder.FrostClone.HPThreshold"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 99f), Array.Empty<object>()));
			SplitCount = cfg.Bind<int>("Moder", "(Frost Clone) Count", 2, new ConfigDescription(LocalizationManager.Desc("Moder.FrostClone.Count"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 5), Array.Empty<object>()));
			MiniScaleMult = cfg.Bind<float>("Moder", "(Mini Stat) ScaleMult", 0.55f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniStat.ScaleMult"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.2f, 0.9f), Array.Empty<object>()));
			MiniHPMult = cfg.Bind<float>("Moder", "(Mini Stat) HPMult", 0.3f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniStat.HPMult"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.05f, 1f), Array.Empty<object>()));
			MiniDamageMult = cfg.Bind<float>("Moder", "(Mini Stat) DamageMult", 0.5f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniStat.DamageMult"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 3f), Array.Empty<object>()));
			MiniSpeedMult = cfg.Bind<float>("Moder", "(Mini Stat) SpeedMult", 1.4f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniStat.SpeedMult"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.5f, 3f), Array.Empty<object>()));
			MiniAttackIntervalMult = cfg.Bind<float>("Moder", "(Mini Stat) AttackIntervalMult", 0.6f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniStat.AttackIntervalMult"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.2f, 2f), Array.Empty<object>()));
			MiniAttackRangeMult = cfg.Bind<float>("Moder", "(Mini Stat) AttackRangeMult", 0.6f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniStat.AttackRangeMult"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 1.5f), Array.Empty<object>()));
			MiniFlightDuration = cfg.Bind<float>("Moder", "(Mini Flight) FlightDuration", 6f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniFlight.FlightDuration"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(2f, 30f), Array.Empty<object>()));
			MiniFarTargetMinDist = cfg.Bind<float>("Moder", "(Mini Flight) FarTargetMinDist", 20f, new ConfigDescription(LocalizationManager.Desc("Moder.MiniFlight.FarTargetMinDist"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(5f, 60f), Array.Empty<object>()));
			AirBreathEnabled = cfg.Bind<bool>("Moder", "(Air Breath) Enabled", true, LocalizationManager.Desc("Moder.AirBreath.Enabled"));
			AirBreathCooldown = cfg.Bind<float>("Moder", "(Air Breath) Cooldown", 8f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.Cooldown"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 60f), Array.Empty<object>()));
			AirBreathRange = cfg.Bind<float>("Moder", "(Air Breath) Range", 28f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.Range"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(5f, 80f), Array.Empty<object>()));
			AirBreathAngle = cfg.Bind<float>("Moder", "(Air Breath) Angle", 60f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.Angle"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(10f, 180f), Array.Empty<object>()));
			AirBreathDamageFrost = cfg.Bind<float>("Moder", "(Air Breath) DamageFrost", 25f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.DamageFrost"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 500f), Array.Empty<object>()));
			AirBreathDamageBlunt = cfg.Bind<float>("Moder", "(Air Breath) DamageBlunt", 0f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.DamageBlunt"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 500f), Array.Empty<object>()));
			AirBreathVFX = cfg.Bind<string>("Moder", "(Air Breath) VFX", "vfx_dragon_coldbreath", LocalizationManager.Desc("Moder.AirBreath.VFX"));
			AirBreathMinAltitude = cfg.Bind<float>("Moder", "(Air Breath) MinAltitude", 8f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.MinAltitude"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 30f), Array.Empty<object>()));
			AirBreathHPThreshold = cfg.Bind<float>("Moder", "(Air Breath) HPThreshold", 100f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.HPThreshold"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>()));
			AirBreathPhaseMessage = cfg.Bind<string>("Moder", "(Air Breath) PhaseMessage", "", LocalizationManager.Desc("Moder.AirBreath.PhaseMessage"));
			AirBreathPhaseMessageHP = cfg.Bind<float>("Moder", "(Air Breath) PhaseMessageHP", 50f, new ConfigDescription(LocalizationManager.Desc("Moder.AirBreath.PhaseMessageHP"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>()));
			LandBlastEnabled = cfg.Bind<bool>("Moder", "(Landing Blast) Enabled", true, LocalizationManager.Desc("Moder.LandingBlast.Enabled"));
			LandBlastRadius = cfg.Bind<float>("Moder", "(Landing Blast) Radius", 14f, new ConfigDescription(LocalizationManager.Desc("Moder.LandingBlast.Radius"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 40f), Array.Empty<object>()));
			LandBlastPushForce = cfg.Bind<float>("Moder", "(Landing Blast) PushForce", 25f, new ConfigDescription(LocalizationManager.Desc("Moder.LandingBlast.PushForce"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 200f), Array.Empty<object>()));
			LandBlastPushForceY = cfg.Bind<float>("Moder", "(Landing Blast) PushForceY", 0f, new ConfigDescription(LocalizationManager.Desc("Moder.LandingBlast.PushForceY"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			LandBlastVFX = cfg.Bind<string>("Moder", "(Landing Blast) VFX", "fx_eikthyr_stomp", LocalizationManager.Desc("Moder.LandingBlast.VFX"));
			LandBlastVFXScale = cfg.Bind<float>("Moder", "(Landing Blast) VFXScale", 2f, new ConfigDescription(LocalizationManager.Desc("Moder.LandingBlast.VFXScale"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
			LandBlastSFX = cfg.Bind<string>("Moder", "(Landing Blast) SFX", "sfx_dragon_scream", LocalizationManager.Desc("Moder.LandingBlast.SFX"));
			LandBlastCooldown = cfg.Bind<float>("Moder", "(Landing Blast) Cooldown", 10f, new ConfigDescription(LocalizationManager.Desc("Moder.LandingBlast.Cooldown"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 60f), Array.Empty<object>()));
			LandBlastDelay = cfg.Bind<float>("Moder", "(Landing Blast) Delay", 2f, new ConfigDescription(LocalizationManager.Desc("Moder.LandingBlast.Delay"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 5f), Array.Empty<object>()));
			RoarEnabled = cfg.Bind<bool>("Moder", "(Freeze Roar) Enabled", true, LocalizationManager.Desc("Moder.FreezeRoar.Enabled"));
			RoarHPThreshold = cfg.Bind<float>("Moder", "(Freeze Roar) HPThreshold", 100f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.HPThreshold"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>()));
			RoarCooldown = cfg.Bind<float>("Moder", "(Freeze Roar) Cooldown", 25f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.Cooldown"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(5f, 300f), Array.Empty<object>()));
			RoarRadius = cfg.Bind<float>("Moder", "(Freeze Roar) Radius", 15f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.Radius"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 60f), Array.Empty<object>()));
			RoarDamageFrost = cfg.Bind<float>("Moder", "(Freeze Roar) DamageFrost", 30f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.DamageFrost"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 500f), Array.Empty<object>()));
			RoarDamageBlunt = cfg.Bind<float>("Moder", "(Freeze Roar) DamageBlunt", 0f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.DamageBlunt"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 500f), Array.Empty<object>()));
			RoarPushForce = cfg.Bind<float>("Moder", "(Freeze Roar) PushForce", 20f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.PushForce"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 200f), Array.Empty<object>()));
			RoarStaggerMult = cfg.Bind<float>("Moder", "(Freeze Roar) StaggerMult", 1f, new ConfigDescription(LocalizationManager.Desc("Moder.FreezeRoar.StaggerMult"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 5f), Array.Empty<object>()));
			RoarBlockable = cfg.Bind<bool>("Moder", "(Freeze Roar) Blockable", true, LocalizationManager.Desc("Moder.FreezeRoar.Blockable"));
			RoarVFX = cfg.Bind<string>("Moder", "(Freeze Roar) VFX", "", LocalizationManager.Desc("Moder.FreezeRoar.VFX"));
			RoarSFX = cfg.Bind<string>("Moder", "(Freeze Roar) SFX", "", LocalizationManager.Desc("Moder.FreezeRoar.SFX"));
			ZoneEnabled = cfg.Bind<bool>("Moder", "(Ice Field) Enabled", true, LocalizationManager.Desc("Moder.IceField.Enabled"));
			ZoneHPThreshold = cfg.Bind<float>("Moder", "(Ice Field) HPThreshold", 100f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.HPThreshold"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>()));
			ZoneSlowEnabled = cfg.Bind<bool>("Moder", "(Ice Field) SlowEnabled", true, LocalizationManager.Desc("Moder.IceField.SlowEnabled"));
			ZoneCount = cfg.Bind<int>("Moder", "(Ice Field) Count", 2, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.Count"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 30), Array.Empty<object>()));
			ZoneSpawnRange = cfg.Bind<float>("Moder", "(Ice Field) SpawnRange", 12f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.SpawnRange"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(2f, 40f), Array.Empty<object>()));
			ZoneRadius = cfg.Bind<float>("Moder", "(Ice Field) Radius", 6f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.Radius"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 20f), Array.Empty<object>()));
			ZoneDamageFrost = cfg.Bind<float>("Moder", "(Ice Field) DamageFrost", 10f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.DamageFrost"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 200f), Array.Empty<object>()));
			ZoneDamageBlunt = cfg.Bind<float>("Moder", "(Ice Field) DamageBlunt", 0f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.DamageBlunt"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 200f), Array.Empty<object>()));
			ZoneDuration = cfg.Bind<float>("Moder", "(Ice Field) Duration", 8f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.Duration"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 60f), Array.Empty<object>()));
			ZoneVFX = cfg.Bind<string>("Moder", "(Ice Field) VFX", "fx_fenring_icenova", LocalizationManager.Desc("Moder.IceField.VFX"));
			ZoneVFXScale = cfg.Bind<float>("Moder", "(Ice Field) VFXScale", 1f, new ConfigDescription(LocalizationManager.Desc("Moder.IceField.VFXScale"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
		}
	}
	[HarmonyPatch(typeof(ZNetScene), "Awake")]
	internal static class ModerMonsterDB
	{
		private static readonly FieldInfo s_namedPrefabsField = AccessTools.Field(typeof(ZNetScene), "m_namedPrefabs");

		private static GameObject s_miniModer;

		public const string PrefabName = "MiniModer";

		[HarmonyPostfix]
		public static void Postfix(ZNetScene __instance)
		{
			if (!(s_namedPrefabsField.GetValue(__instance) is Dictionary<int, GameObject> namedPrefabs))
			{
				Plugin.Log.LogError((object)"[ModerDB] m_namedPrefabs 접근 실패");
			}
			else
			{
				RegisterMiniModer(__instance, namedPrefabs);
			}
		}

		private static void RegisterMiniModer(ZNetScene zns, Dictionary<int, GameObject> namedPrefabs)
		{
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: 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)
			if ((Object)(object)zns.GetPrefab("MiniModer") != (Object)null)
			{
				return;
			}
			if ((Object)(object)s_miniModer != (Object)null)
			{
				zns.m_prefabs.Add(s_miniModer);
				namedPrefabs[StringExtensionMethods.GetStableHashCode("MiniModer")] = s_miniModer;
				Plugin.Log.LogInfo((object)"[ModerDB] MiniModer 재등록");
				return;
			}
			GameObject prefab = zns.GetPrefab("Dragon");
			if ((Object)(object)prefab == (Object)null)
			{
				Plugin.Log.LogError((object)"[ModerDB] Dragon 프리팹 없음 — MiniModer 등록 실패");
				return;
			}
			bool activeSelf = prefab.activeSelf;
			prefab.SetActive(false);
			GameObject val = Object.Instantiate<GameObject>(prefab);
			prefab.SetActive(activeSelf);
			((Object)val).name = "MiniModer";
			Object.DontDestroyOnLoad((Object)(object)val);
			val.SetActive(false);
			Character component = prefab.GetComponent<Character>();
			Character component2 = val.GetComponent<Character>();
			if ((Object)(object)component2 != (Object)null)
			{
				component2.m_boss = false;
				component2.m_bossEvent = "";
				float value = ModerConfig.MiniSpeedMult.Value;
				component2.m_runSpeed *= value;
				component2.m_walkSpeed *= value;
				component2.m_swimSpeed *= value;
				if ((Object)(object)component != (Object)null)
				{
					component2.m_health = Mathf.Max(component.m_health * ModerConfig.MiniHPMult.Value, 1f);
				}
			}
			ZNetView component3 = val.GetComponent<ZNetView>();
			if ((Object)(object)component3 != (Object)null)
			{
				component3.m_persistent = false;
			}
			MonsterAI component4 = val.GetComponent<MonsterAI>();
			if ((Object)(object)component4 != (Object)null)
			{
				float value2 = ModerConfig.MiniAttackIntervalMult.Value;
				if (!Mathf.Approximately(value2, 1f))
				{
					component4.m_minAttackInterval *= value2;
				}
			}
			CharacterDrop component5 = val.GetComponent<CharacterDrop>();
			if ((Object)(object)component5 != (Object)null)
			{
				component5.m_drops.Clear();
			}
			ApplyFrostTint(val, new Color(0.15f, 0.55f, 1f));
			float value3 = ModerConfig.MiniScaleMult.Value;
			val.transform.localScale = Vector3.one * value3;
			zns.m_prefabs.Add(val);
			namedPrefabs[StringExtensionMethods.GetStableHashCode("MiniModer")] = val;
			s_miniModer = val;
			Plugin.Log.LogInfo((object)("[ModerDB] MiniModer 등록 완료 — " + $"HP {component2?.m_health:F0} / scale {value3:F2} / 보스 플래그 OFF"));
		}

		private static void ApplyFrostTint(GameObject go, Color tint)
		{
			//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_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//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_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: 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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			Renderer[] componentsInChildren = go.GetComponentsInChildren<Renderer>(true);
			foreach (Renderer val in componentsInChildren)
			{
				if (val is ParticleSystemRenderer)
				{
					continue;
				}
				Material[] sharedMaterials = val.sharedMaterials;
				bool flag = false;
				for (int j = 0; j < sharedMaterials.Length; j++)
				{
					if (!((Object)(object)sharedMaterials[j] == (Object)null))
					{
						Material val2 = new Material(sharedMaterials[j]);
						if (val2.HasProperty("_Color"))
						{
							Color color = val2.color;
							val2.color = new Color(tint.r, tint.g, tint.b, color.a);
						}
						if (val2.HasProperty("_EmissionColor"))
						{
							val2.EnableKeyword("_EMISSION");
							val2.SetColor("_EmissionColor", tint * 8f);
						}
						if (val2.HasProperty("_TintColor"))
						{
							val2.SetColor("_TintColor", new Color(tint.r, tint.g, tint.b, 0.5f));
						}
						sharedMaterials[j] = val2;
						flag = true;
					}
				}
				if (flag)
				{
					val.sharedMaterials = sharedMaterials;
				}
			}
			ParticleSystem[] componentsInChildren2 = go.GetComponentsInChildren<ParticleSystem>(true);
			foreach (ParticleSystem val3 in componentsInChildren2)
			{
				MainModule main = val3.main;
				EmissionModule emission = val3.emission;
				((EmissionModule)(ref emission)).rateOverTimeMultiplier = ((EmissionModule)(ref emission)).rateOverTimeMultiplier * 0.5f;
				((EmissionModule)(ref emission)).rateOverDistanceMultiplier = ((EmissionModule)(ref emission)).rateOverDistanceMultiplier * 0.5f;
				((MainModule)(ref main)).startSizeMultiplier = ((MainModule)(ref main)).startSizeMultiplier * 0.6f;
				MinMaxGradient startColor = ((MainModule)(ref main)).startColor;
				Color color2 = ((MinMaxGradient)(ref startColor)).color;
				((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(tint.r, tint.g, tint.b, color2.a));
			}
		}
	}
	[HarmonyPatch(typeof(ZNetScene), "CreateObject")]
	internal static class MiniModerStaleZDOCleanupPatch
	{
		[HarmonyPrefix]
		public static bool Prefix(ZNetScene __instance, ZDO zdo, ref GameObject __result)
		{
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			int prefab = zdo.GetPrefab();
			GameObject prefab2 = __instance.GetPrefab(prefab);
			if ((Object)(object)prefab2 == (Object)null || ((Object)prefab2).name != "MiniModer")
			{
				return true;
			}
			if (ZDOMan.instance != null && zdo.IsOwner())
			{
				ZDOMan.instance.DestroyZDO(zdo);
			}
			Plugin.Log.LogInfo((object)$"[ModerDB] 잔존 ZDO 제거: MiniModer ({zdo.m_uid})");
			__result = null;
			return false;
		}
	}
	[BepInPlugin("bossadd", "BossAdd", "1.0.4")]
	public class Plugin : BaseUnityPlugin
	{
		public static ManualLogSource Log;

		public static bool SummonBlocked;

		private bool _playerWasDead = false;

		private float _unblockTime = 0f;

		public static Plugin Instance { get; private set; }

		private void Awake()
		{
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			Instance = this;
			Log = ((BaseUnityPlugin)this).Logger;
			LocalizationManager.Init();
			BossStatConfig.Bind(((BaseUnityPlugin)this).Config);
			EikthyrSummonConfig.Bind(((BaseUnityPlugin)this).Config);
			BossSummonConfig.Bind(((BaseUnityPlugin)this).Config);
			TheElderConfig.Bind(((BaseUnityPlugin)this).Config);
			BonemassConfig.Bind(((BaseUnityPlugin)this).Config);
			ModerConfig.Bind(((BaseUnityPlugin)this).Config);
			YagluthConfig.Bind(((BaseUnityPlugin)this).Config);
			QueenConfig.Bind(((BaseUnityPlugin)this).Config);
			new Harmony("bossadd").PatchAll();
			Log.LogInfo((object)"BossAdd loaded.");
		}

		private void Update()
		{
			EikthyrTimerSummonHandler.Tick();
			BossTimerSummonHandler.Tick();
			TheElderRockThrowHandler.Tick();
			MiniModerFlightHandler.Tick();
			ModerRoarZoneHandler.Tick();
			ModerAirBreathHandler.Tick();
			YagluthRageHandler.Tick();
			YagluthDeathZoneHandler.Tick();
			YagluthMeteorFireHandler.Tick();
			QueenBroodTimerHandler.Tick();
			QueenPoisonZoneHandler.Tick();
			CheckRespawn();
		}

		private void CheckRespawn()
		{
			if ((Object)(object)Player.m_localPlayer == (Object)null || ((Character)Player.m_localPlayer).IsDead())
			{
				if (!_playerWasDead)
				{
					_playerWasDead = true;
					SummonBlocked = true;
					Log.LogInfo((object)"[EikthyrSummon] 플레이어 사망 → 소환 차단 시작");
				}
			}
			else if (_playerWasDead)
			{
				_playerWasDead = false;
				EikthyrSummonHelper.DespawnSummons("플레이어 리스폰");
				_unblockTime = Time.time + 3f;
				Log.LogInfo((object)"[EikthyrSummon] 플레이어 리스폰 → 3초 후 소환 재개 예정");
			}
			if (SummonBlocked && _unblockTime > 0f && Time.time >= _unblockTime)
			{
				SummonBlocked = false;
				_unblockTime = 0f;
				Log.LogInfo((object)"[EikthyrSummon] 소환 차단 해제 — 전투 재개");
			}
		}
	}
	public static class QueenConfig
	{
		public static ConfigEntry<bool> BroodHPEnabled { get; private set; }

		public static ConfigEntry<float> BroodHPStep { get; private set; }

		public static ConfigEntry<int> BroodHPCount { get; private set; }

		public static ConfigEntry<int> BroodHPLevel { get; private set; }

		public static ConfigEntry<float> BroodHPScale { get; private set; }

		public static ConfigEntry<string> BroodHPPrefab { get; private set; }

		public static ConfigEntry<string> BroodHPVFX { get; private set; }

		public static ConfigEntry<string> BroodHPMessage { get; private set; }

		public static ConfigEntry<bool> BroodTimerEnabled { get; private set; }

		public static ConfigEntry<float> BroodTimerInterval { get; private set; }

		public static ConfigEntry<int> BroodTimerCount { get; private set; }

		public static ConfigEntry<int> BroodTimerLevel { get; private set; }

		public static ConfigEntry<float> BroodTimerScale { get; private set; }

		public static ConfigEntry<string> BroodTimerPrefab { get; private set; }

		public static ConfigEntry<string> BroodTimerVFX { get; private set; }

		public static ConfigEntry<bool> BreathSummonEnabled { get; private set; }

		public static ConfigEntry<string> BreathSummonVFXTrigger { get; private set; }

		public static ConfigEntry<float> BreathSummonChance { get; private set; }

		public static ConfigEntry<string> BreathSummonPrefab { get; private set; }

		public static ConfigEntry<int> BreathSummonCount { get; private set; }

		public static ConfigEntry<int> BreathSummonLevel { get; private set; }

		public static ConfigEntry<float> BreathSummonScale { get; private set; }

		public static ConfigEntry<string> BreathSummonVFX { get; private set; }

		public static ConfigEntry<bool> BreathSummonDebugScan { get; private set; }

		public static ConfigEntry<bool> PoisonEnabled { get; private set; }

		public static ConfigEntry<float> PoisonMoveInterval { get; private set; }

		public static ConfigEntry<float> PoisonDuration { get; private set; }

		public static ConfigEntry<float> PoisonRadius { get; private set; }

		public static ConfigEntry<float> PoisonDamagePerTick { get; private set; }

		public static ConfigEntry<float> PoisonTickInterval { get; private set; }

		public static ConfigEntry<int> PoisonMaxZones { get; private set; }

		public static ConfigEntry<string> PoisonVFX { get; private set; }

		public static ConfigEntry<float> PoisonVFXScale { get; private set; }

		public static void Bind(ConfigFile cfg)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Expected O, but got Unknown
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Expected O, but got Unknown
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Expected O, but got Unknown
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Expected O, but got Unknown
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Expected O, but got Unknown
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Expected O, but got Unknown
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_033c: Expected O, but got Unknown
			//IL_038a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0394: Expected O, but got Unknown
			//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c6: Expected O, but got Unknown
			//IL_03fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0404: Expected O, but got Unknown
			//IL_049f: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a9: Expected O, but got Unknown
			//IL_04dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e7: Expected O, but got Unknown
			//IL_051b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0525: Expected O, but got Unknown
			//IL_0559: Unknown result type (might be due to invalid IL or missing references)
			//IL_0563: Expected O, but got Unknown
			//IL_0597: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a1: Expected O, but got Unknown
			//IL_05ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d4: Expected O, but got Unknown
			//IL_062d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0637: Expected O, but got Unknown
			BroodHPEnabled = cfg.Bind<bool>("The Queen", "(HP Summon) Enabled", true, LocalizationManager.Desc("Queen.HPSummon.Enabled"));
			BroodHPStep = cfg.Bind<float>("The Queen", "(HP Summon) HPStep", 25f, new ConfigDescription(LocalizationManager.Desc("Queen.HPSummon.HPStep"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 99f), Array.Empty<object>()));
			BroodHPCount = cfg.Bind<int>("The Queen", "(HP Summon) Count", 3, new ConfigDescription(LocalizationManager.Desc("Queen.HPSummon.Count"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), Array.Empty<object>()));
			BroodHPLevel = cfg.Bind<int>("The Queen", "(HP Summon) Level", 1, new ConfigDescription(LocalizationManager.Desc("Queen.HPSummon.Level"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 5), Array.Empty<object>()));
			BroodHPScale = cfg.Bind<float>("The Queen", "(HP Summon) Scale", 1f, new ConfigDescription(LocalizationManager.Desc("Queen.HPSummon.Scale"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
			BroodHPPrefab = cfg.Bind<string>("The Queen", "(HP Summon) Prefab", "Seeker", LocalizationManager.Desc("Queen.HPSummon.Prefab"));
			BroodHPVFX = cfg.Bind<string>("The Queen", "(HP Summon) VFX", "", LocalizationManager.Desc("Queen.HPSummon.VFX"));
			BroodHPMessage = cfg.Bind<string>("The Queen", "(HP Summon) PhaseMessage", "The Queen calls her brood!", LocalizationManager.Desc("Queen.HPSummon.PhaseMessage"));
			BroodTimerEnabled = cfg.Bind<bool>("The Queen", "(Timer Summon) Enabled", true, LocalizationManager.Desc("Queen.TimerSummon.Enabled"));
			BroodTimerInterval = cfg.Bind<float>("The Queen", "(Timer Summon) Interval", 30f, new ConfigDescription(LocalizationManager.Desc("Queen.TimerSummon.Interval"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(5f, 600f), Array.Empty<object>()));
			BroodTimerCount = cfg.Bind<int>("The Queen", "(Timer Summon) Count", 2, new ConfigDescription(LocalizationManager.Desc("Queen.TimerSummon.Count"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), Array.Empty<object>()));
			BroodTimerLevel = cfg.Bind<int>("The Queen", "(Timer Summon) Level", 1, new ConfigDescription(LocalizationManager.Desc("Queen.TimerSummon.Level"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 5), Array.Empty<object>()));
			BroodTimerScale = cfg.Bind<float>("The Queen", "(Timer Summon) Scale", 1f, new ConfigDescription(LocalizationManager.Desc("Queen.TimerSummon.Scale"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
			BroodTimerPrefab = cfg.Bind<string>("The Queen", "(Timer Summon) Prefab", "Seeker", LocalizationManager.Desc("Queen.TimerSummon.Prefab"));
			BroodTimerVFX = cfg.Bind<string>("The Queen", "(Timer Summon) VFX", "", LocalizationManager.Desc("Queen.TimerSummon.VFX"));
			BreathSummonEnabled = cfg.Bind<bool>("The Queen", "(Breath Summon) Enabled", true, LocalizationManager.Desc("Queen.BreathSummon.Enabled"));
			BreathSummonVFXTrigger = cfg.Bind<string>("The Queen", "(Breath Summon) VFXTrigger", "", LocalizationManager.Desc("Queen.BreathSummon.VFXTrigger"));
			BreathSummonChance = cfg.Bind<float>("The Queen", "(Breath Summon) Chance", 50f, new ConfigDescription(LocalizationManager.Desc("Queen.BreathSummon.Chance"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>()));
			BreathSummonPrefab = cfg.Bind<string>("The Queen", "(Breath Summon) Prefab", "SeekerBrute", LocalizationManager.Desc("Queen.BreathSummon.Prefab"));
			BreathSummonCount = cfg.Bind<int>("The Queen", "(Breath Summon) Count", 1, new ConfigDescription(LocalizationManager.Desc("Queen.BreathSummon.Count"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), Array.Empty<object>()));
			BreathSummonLevel = cfg.Bind<int>("The Queen", "(Breath Summon) Level", 1, new ConfigDescription(LocalizationManager.Desc("Queen.BreathSummon.Level"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 5), Array.Empty<object>()));
			BreathSummonScale = cfg.Bind<float>("The Queen", "(Breath Summon) Scale", 1f, new ConfigDescription(LocalizationManager.Desc("Queen.BreathSummon.Scale"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
			BreathSummonVFX = cfg.Bind<string>("The Queen", "(Breath Summon) VFX", "", LocalizationManager.Desc("Queen.BreathSummon.VFX"));
			BreathSummonDebugScan = cfg.Bind<bool>("The Queen", "(Breath Summon) DebugScan", false, LocalizationManager.Desc("Queen.BreathSummon.DebugScan"));
			PoisonEnabled = cfg.Bind<bool>("The Queen", "(Poison Field) Enabled", true, LocalizationManager.Desc("Queen.PoisonField.Enabled"));
			PoisonMoveInterval = cfg.Bind<float>("The Queen", "(Poison Field) MoveInterval", 10f, new ConfigDescription(LocalizationManager.Desc("Queen.PoisonField.MoveInterval"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 120f), Array.Empty<object>()));
			PoisonDuration = cfg.Bind<float>("The Queen", "(Poison Field) Duration", 20f, new ConfigDescription(LocalizationManager.Desc("Queen.PoisonField.Duration"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 300f), Array.Empty<object>()));
			PoisonRadius = cfg.Bind<float>("The Queen", "(Poison Field) Radius", 6f, new ConfigDescription(LocalizationManager.Desc("Queen.PoisonField.Radius"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 50f), Array.Empty<object>()));
			PoisonDamagePerTick = cfg.Bind<float>("The Queen", "(Poison Field) DamagePerTick", 5f, new ConfigDescription(LocalizationManager.Desc("Queen.PoisonField.DamagePerTick"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 500f), Array.Empty<object>()));
			PoisonTickInterval = cfg.Bind<float>("The Queen", "(Poison Field) TickInterval", 1f, new ConfigDescription(LocalizationManager.Desc("Queen.PoisonField.TickInterval"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.5f, 10f), Array.Empty<object>()));
			PoisonMaxZones = cfg.Bind<int>("The Queen", "(Poison Field) MaxZones", 5, new ConfigDescription(LocalizationManager.Desc("Queen.PoisonField.MaxZones"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), Array.Empty<object>()));
			PoisonVFX = cfg.Bind<string>("The Queen", "(Poison Field) VFX", "", LocalizationManager.Desc("Queen.PoisonField.VFX"));
			PoisonVFXScale = cfg.Bind<float>("The Queen", "(Poison Field) VFXScale", 2f, new ConfigDescription(LocalizationManager.Desc("Queen.PoisonField.VFXScale"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 20f), Array.Empty<object>()));
		}
	}
	public class BossStatEntry
	{
		public readonly string PrefabName;

		public readonly string DisplayName;

		public ConfigEntry<float> HealthMultiplier { get; private set; }

		public ConfigEntry<float> MoveSpeedMultiplier { get; private set; }

		public ConfigEntry<float> AttackSpeedMultiplier { get; private set; }

		public BossStatEntry(string prefabName, string displayName, string sectionName, ConfigFile cfg)
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Expected O, but got Unknown
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Expected O, but got Unknown
			PrefabName = prefabName;
			DisplayName = displayName;
			HealthMultiplier = cfg.Bind<float>(sectionName, "(Boss Stat) HealthMultiplier", 1f, new ConfigDescription(LocalizationManager.Desc("BossStat.Health"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 100f), Array.Empty<object>()));
			MoveSpeedMultiplier = cfg.Bind<float>(sectionName, "(Boss Stat) MoveSpeedMultiplier", 1f, new ConfigDescription(LocalizationManager.Desc("BossStat.Speed"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			AttackSpeedMultiplier = cfg.Bind<float>(sectionName, "(Boss Stat) AttackSpeedMultiplier", 1f, new ConfigDescription(LocalizationManager.Desc("BossStat.AttackFreq"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
		}
	}
	public static class BossStatConfig
	{
		public static readonly Dictionary<string, BossStatEntry> All = new Dictionary<string, BossStatEntry>();

		public static void Bind(ConfigFile cfg)
		{
			Register(new BossStatEntry("Eikthyr", "에이크쉬르", "Eikthyr", cfg));
			Register(new BossStatEntry("gd_king", "더 엘더", "The Elder", cfg));
			Register(new BossStatEntry("Bonemass", "본매스", "Bonemass", cfg));
			Register(new BossStatEntry("Dragon", "모더", "Moder", cfg));
			Register(new BossStatEntry("GoblinKing", "야글루스", "Yagluth", cfg));
			Register(new BossStatEntry("SeekerQueen", "더 퀸", "The Queen", cfg));
			Register(new BossStatEntry("Fader", "페이더", "Fader", cfg));
		}

		private static void Register(BossStatEntry e)
		{
			All[e.PrefabName] = e;
		}
	}
	public enum SummonTriggerMode
	{
		Health,
		Timer,
		Both
	}
	public class BossConfig
	{
		public readonly string PrefabName;

		public readonly string DisplayName;

		public ConfigEntry<bool> Enabled { get; private set; }

		public ConfigEntry<SummonTriggerMode> TriggerMode { get; private set; }

		public ConfigEntry<int> HealthStepCount { get; private set; }

		public ConfigEntry<float> TimerInterval { get; private set; }

		public ConfigEntry<string> SummonPrefab { get; private set; }

		public ConfigEntry<int> SummonCount { get; private set; }

		public ConfigEntry<int> SummonLevel { get; private set; }

		public ConfigEntry<int> MaxTotalSummons { get; private set; }

		public ConfigEntry<bool> UseCLLC { get; private set; }

		public ConfigEntry<bool> SpecialSummonEnabled { get; private set; }

		public ConfigEntry<float> SpecialSummonHealthThreshold { get; private set; }

		public ConfigEntry<string> SpecialSummonPrefab { get; private set; }

		public ConfigEntry<int> SpecialSummonCount { get; private set; }

		public ConfigEntry<int> SpecialSummonLevel { get; private set; }

		public ConfigEntry<string> SpecialSummonVfxPrefab { get; private set; }

		public BossConfig(string prefabName, string displayName, string sectionName, ConfigFile cfg, string defaultPrefab, int defaultCount = 2, int defaultLevel = 1, string specialPrefab = "", int specialCount = 1, int specialLevel = 3)
		{
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Expected O, but got Unknown
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Expected O, but got Unknown
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Expected O, but got Unknown
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Expected O, but got Unknown
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Expected O, but got Unknown
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Expected O, but got Unknown
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Expected O, but got Unknown
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Expected O, but got Unknown
			PrefabName = prefabName;
			DisplayName = displayName;
			Enabled = cfg.Bind<bool>(sectionName, "(Summon) Enabled", true, LocalizationManager.Desc("BossSummon.Enabled"));
			TriggerMode = cfg.Bind<SummonTriggerMode>(sectionName, "(Summon) TriggerMode", SummonTriggerMode.Health, LocalizationManager.Desc("BossSummon.TriggerMode"));
			HealthStepCount = cfg.Bind<int>(sectionName, "(Summon) HealthStepCount", 5, new ConfigDescription(LocalizationManager.Desc("BossSummon.HealthStepCount"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 100), Array.Empty<object>()));
			TimerInterval = cfg.Bind<float>(sectionName, "(Summon) TimerInterval", 30f, new ConfigDescription(LocalizationManager.Desc("BossSummon.TimerInterval"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 3600f), Array.Empty<object>()));
			SummonPrefab = cfg.Bind<string>(sectionName, "(Summon) Prefab", defaultPrefab, LocalizationManager.Desc("BossSummon.Prefab"));
			SummonCount = cfg.Bind<int>(sectionName, "(Summon) Count", defaultCount, new ConfigDescription(LocalizationManager.Desc("BossSummon.Count"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 50), Array.Empty<object>()));
			SummonLevel = cfg.Bind<int>(sectionName, "(Summon) Level", defaultLevel, new ConfigDescription(LocalizationManager.Desc("BossSummon.Level"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 5), Array.Empty<object>()));
			MaxTotalSummons = cfg.Bind<int>(sectionName, "(Summon) MaxTotal", 20, new ConfigDescription(LocalizationManager.Desc("BossSummon.MaxTotal"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 200), Array.Empty<object>()));
			UseCLLC = cfg.Bind<bool>(sectionName, "(Summon) UseCLLC", false, LocalizationManager.Desc("BossSummon.UseCLLC"));
			SpecialSummonEnabled = cfg.Bind<bool>(sectionName, "(Special Summon) Enabled", true, LocalizationManager.Desc("BossSummon.SpecialEnabled"));
			SpecialSummonHealthThreshold = cfg.Bind<float>(sectionName, "(Special Summon) HPThreshold", 50f, new ConfigDescription(LocalizationManager.Desc("BossSummon.SpecialHPThreshold"), (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 99f), Array.Empty<object>()));
			SpecialSummonPrefab = cfg.Bind<string>(sectionName, "(Special Summon) Prefab", string.IsNullOrEmpty(specialPrefab) ? defaultPrefab : specialPrefab, LocalizationManager.Desc("BossSummon.SpecialPrefab"));
			SpecialSummonCount = cfg.Bind<int>(sectionName, "(Special Summon) Count", specialCount, new ConfigDescription(LocalizationManager.Desc("BossSummon.SpecialCount"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), Array.Empty<object>()));
			SpecialSummonLevel = cfg.Bind<int>(sectionName, "(Special Summon) Level", specialLevel, new ConfigDescription(LocalizationManager.Desc("BossSummon.SpecialLevel"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 5), Array.Empty<object>()));
			SpecialSummonVfxPrefab = cfg.Bind<string>(sectionName, "(Special Summon) VFX", "vfx_GodExplosion", LocalizationManager.Desc("BossSummon.SpecialVFX"));
		}
	}
	public static class BossSummonConfig
	{
		public static readonly Dictionary<string, BossConfig> All = new Dictionary<string, BossConfig>();

		public static void Bind(ConfigFile cfg)
		{
			Register(new BossConfig("gd_king", "더 엘더", "The Elder", cfg, "Greydwarf_Elite", 2, 1, "Troll"));
			Register(new BossConfig("Bonemass", "본매스", "Bonemass", cfg, "Skeleton", 3, 1, "Draugr_Elite"));
			Register(new BossConfig("Dragon", "모더", "Moder", cfg, "Hatchling", 2, 1, "StoneGolem"));
			Register(new BossConfig("GoblinKing", "야글루스", "Yagluth", cfg, "Goblin", 3, 1, "GoblinBrute"));
			Register(new BossConfig("SeekerQueen", "더 퀸", "The Queen", cfg, "Seeker", 2, 1, "SeekerBrute"));
			Register(new BossConfig("Fader", "페이더", "Fader", cfg, "Charred_Melee", 2, 1, "Charred_Melee"));
		}

		private static void Register(BossConfig c)
		{
			All[c.PrefabName] = c;
		}
	}
	public static class BossVFXManager
	{
		private static readonly Dictionary<string, GameObject> _cache = new Dictionary<string, GameObject>(StringComparer.Ordinal);

		private static readonly HashSet<string> _safeToDestroy = new HashSet<string>(StringComparer.Ordinal);

		private static bool _initialized = false;

		private static AssetBundle _magicCircleBundle;

		private static GameObject _magicCirclePrefab;

		private const string RpcPlayVFX = "BossAdd_PlayVFX";

		private const string RpcForceJump = "BossAdd_ForceJump";

		private static bool _rpcRegistered = false;

		private static readonly FieldInfo s_peersField = AccessTools.Field(typeof(ZNet), "m_peers");

		public static void Initialize()
		{
			if (!_initialized)
			{
				string[] array = new string[2] { "lightningAOE", "vfx_GodExplosion" };
				string[] array2 = array;
				foreach (string prefabName in array2)
				{
					TryCachePrefab(prefabName);
				}
				_initialized = true;
				Plugin.Log.LogInfo((object)$"[BossVFX] 초기화 완료 ({_cache.Count}개 캐싱)");
			}
		}

		private static void TryCachePrefab(string prefabName)
		{
			if (!_cache.ContainsKey(prefabName) && !((Object)(object)ZNetScene.instance == (Object)null))
			{
				GameObject prefab = ZNetScene.instance.GetPrefab(prefabName);
				if ((Object)(object)prefab != (Object)null)
				{
					_cache[prefabName] = prefab;
				}
			}
		}

		public static void RegisterAsDestroyable(string prefabName)
		{
			if (_safeToDestroy.Contains(prefabName) || (Object)(object)ZNetScene.instance == (Object)null)
			{
				return;
			}
			GameObject prefab = ZNetScene.instance.GetPrefab(prefabName);
			if ((Object)(object)prefab == (Object)null)
			{
				Plugin.Log.LogWarning((object)("[BossVFX] RegisterAsDestroyable: '" + prefabName + "' 없음"));
				return;
			}
			bool activeSelf = prefab.activeSelf;
			prefab.SetActive(false);
			GameObject val = Object.Instantiate<GameObject>(prefab);
			prefab.SetActive(activeSelf);
			((Object)val).name = prefabName;
			Object.DontDestroyOnLoad((Object)(object)val);
			ZNetView[] componentsInChildren = val.GetComponentsInChildren<ZNetView>(true);
			foreach (ZNetView val2 in componentsInChildren)
			{
				Object.DestroyImmediate((Object)(object)val2);
			}
			ZSyncTransform[] componentsInChildren2 = val.GetComponentsInChildren<ZSyncTransform>(true);
			foreach (ZSyncTransform val3 in componentsInChildren2)
			{
				Object.DestroyImmediate((Object)(object)val3);
			}
			ZSyncAnimation[] componentsInChildren3 = val.GetComponentsInChildren<ZSyncAnimation>(true);
			foreach (ZSyncAnimation val4 in componentsInChildren3)
			{
				Object.DestroyImmediate((Object)(object)val4);
			}
			val.SetActive(false);
			_cache[prefabName] = val;
			_safeToDestroy.Add(prefabName);
			Plugin.Log.LogInfo((object)("[BossVFX] '" + prefabName + "' Destroyable 등록 완료"));
		}

		public static GameObject Play(string prefabName, Vector3 position, float lifetime = 3f)
		{
			//IL_0095: 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)
			if (string.IsNullOrEmpty(prefabName))
			{
				return null;
			}
			if ((Object)(object)ZNetScene.instance == (Object)null)
			{
				return null;
			}
			try
			{
				if (!_cache.TryGetValue(prefabName, out var value) || (Object)(object)value == (Object)null)
				{
					value = ZNetScene.instance.GetPrefab(prefabName);
					if ((Object)(object)value == (Object)null)
					{
						Plugin.Log.LogWarning((object)("[BossVFX] 프리팹 '" + prefabName + "' 없음"));
						return null;
					}
					_cache[prefabName] = value;
				}
				GameObject val = Object.Instantiate<GameObject>(value, position, Quaternion.identity);
				if ((Object)(object)val == (Object)null)
				{
					return null;
				}
				if (!val.activeSelf)
				{
					val.SetActive(true);
				}
				if (lifetime > 0f && _safeToDestroy.Contains(prefabName))
				{
					Object.Destroy((Object)(object)val, lifetime);
				}
				return val;
			}
			catch (Exception ex)
			{
				Plugin.Log.LogError((object)("[BossVFX] Play(" + prefabName + ") 실패: " + ex.Message));
				return null;
			}
		}

		public static GameObject PlayAndDestroy(string prefabName, Vector3 position, float lifetime = 3f)
		{
			//IL_0077: 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)
			if (string.IsNullOrEmpty(prefabName))
			{
				return null;
			}
			if ((Object)(object)ZNetScene.instance == (Object)null)
			{
				return null;
			}
			try
			{
				GameObject prefab = ZNetScene.instance.GetPrefab(prefabName);
				if ((Object)(object)prefab == (Object)null)
				{
					Plugin.Log.LogWarning((object)("[BossVFX] PlayAndDestroy: '" + prefabName + "' 없음"));
					return null;
				}
				bool activeSelf = prefab.activeSelf;
				prefab.SetActive(false);
				GameObject val = Object.Instantiate<GameObject>(prefab, position, Quaternion.identity);
				prefab.SetActive(activeSelf);
				ZNetView[] componentsInChildren = val.GetComponentsInChildren<ZNetView>(true);
				foreach (ZNetView val2 in componentsInChildren)
				{
					Object.DestroyImmediate((Object)(object)val2);
				}
				ZSyncTransform[] componentsInChildren2 = val.GetComponentsInChildren<ZSyncTransform>(true);
				foreach (ZSyncTransform val3 in componentsInChildren2)
				{
					Object.DestroyImmediate((Object)(object)val3);
				}
				ZSyncAnimation[] componentsInChildren3 = val.GetComponentsInChildren<ZSyncAnimation>(true);
				foreach (ZSyncAnimation val4 in componentsInChildren3)
				{
					Object.DestroyImmediate((Object)(object)val4);
				}
				Aoe[] componentsInChildren4 = val.GetComponentsInChildren<Aoe>(true);
				foreach (Aoe val5 in componentsInChildren4)
				{
					Object.DestroyImmediate((Object)(object)val5);
				}
				val.SetActive(true);
				if (lifetime > 0f)
				{
					Object.Destroy((Object)(object)val, lifetime);
				}
				return val;
			}
			catch (Exception ex)
			{
				Plugin.Log.LogError((object)("[BossVFX] PlayAndDestroy(" + prefabName + ") 실패: " + ex.Message));
				return null;
			}
		}

		public static void RegisterRpc()
		{
			Plugin.Log.LogInfo((object)string.Format("[BossVFX] RegisterRpc called. _rpcRegistered={0}, ZRoutedRpc={1}", _rpcRegistered, (ZRoutedRpc.instance == null) ? "null" : "ok"));
			if (_rpcRegistered)
			{
				return;
			}
			if (ZRoutedRpc.instance == null)
			{
				Plugin.Log.LogWarning((object)"[BossVFX] RegisterRpc: ZRoutedRpc.instance == null — 등록 스킵");
				return;
			}
			ZRoutedRpc.instance.Register<string, Vector3, float>("BossAdd_PlayVFX", (Action<long, string, Vector3, float>)delegate(long _, string name, Vector3 pos, float lt)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				PlayAndDestroy(name, pos, lt);
			});
			ZRoutedRpc.instance.Register<Vector3>("BossAdd_ForceJump", (Action<long, Vector3>)delegate(long _, Vector3 vel)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				Player localPlayer = Player.m_localPlayer;
				if (localPlayer != null)
				{
					((Character)localPlayer).ForceJump(vel, true);
				}
			});
			_rpcRegistered = true;
			Plugin.Log.LogInfo((object)"[BossVFX] RPC 등록 완료");
		}

		public static void PlayGlobal(string prefabName, Vector3 position, float lifetime = 3f)
		{
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			if (!string.IsNullOrEmpty(prefabName) && ZRoutedRpc.instance != null)
			{
				if (!_rpcRegistered)
				{
					RegisterRpc();
				}
				if (_rpcRegistered)
				{
					ZRoutedRpc.instance.InvokeRoutedRPC(ZRoutedRpc.Everybody, "BossAdd_PlayVFX", new object[3] { prefabName, position, lifetime });
				}
			}
		}

		public static void ForceJumpPlayer(Player target, Vector3 velocity)
		{
			//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_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: 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_00be: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)target == (Object)null || ZRoutedRpc.instance == null || (Object)(object)ZNet.instance == (Object)null)
			{
				return;
			}
			if (!_rpcRegistered)
			{
				RegisterRpc();
			}
			if (!_rpcRegistered)
			{
				return;
			}
			ZDOID zDOID = ((Character)target).GetZDOID();
			if (s_peersField?.GetValue(ZNet.instance) is List<ZNetPeer> list)
			{
				foreach (ZNetPeer item in list)
				{
					if (item.m_characterID != zDOID)
					{
						continue;
					}
					ZRoutedRpc.instance.InvokeRoutedRPC(item.m_uid, "BossAdd_ForceJump", new object[1] { velocity });
					return;
				}
			}
			if ((Object)(object)target == (Object)(object)Player.m_localPlayer)
			{
				((Character)target).ForceJump(velocity, true);
			}
		}

		public static void ClearCache()
		{
			_cache.Clear();
			_safeToDestroy.Clear();
			_initialized = false;
			_rpcRegistered = false;
			Plugin.Log.LogInfo((object)"[BossVFX] 캐시 초기화 완료 (씬 언로드)");
		}
	}
	[HarmonyPatch(typeof(ZNetScene), "Awake")]
	public static class BossVFXManager_ZNetScene_Patch
	{
		[HarmonyPostfix]
		public static void Postfix()
		{
			Plugin.Log.LogInfo((object)"[BossVFX] ZNetScene.Awake PostFix fired");
			try
			{
				BossVFXManager.Initialize();
				BossVFXManager.RegisterRpc();
				BossVFXManager.RegisterAsDestroyable("vfx_GodExplosion");
			}
			catch (Exception ex)
			{
				Plugin.Log.LogError((object)("[BossVFX] ZNetScene 초기화 실패: " + ex.Message));
			}
		}
	}
	[HarmonyPatch(typeof(ZNetScene), "OnDestroy")]
	public static class BossVFXManager_ZNetScene_OnDestroy_Patch
	{
		[HarmonyPostfix]
		public static void Postfix()
		{
			BossVFXManager.ClearCache();
		}
	}
	[HarmonyPatch(typeof(ZNet), "Awake")]
	public static class BossVFXManager_ZNet_Patch
	{
		[HarmonyPostfix]
		public static void Postfix()
		{
			Plugin.Log.LogInfo((object)"[BossVFX] ZNet.Awake PostFix fired");
			try
			{
				BossVFXManager.RegisterRpc();
			}
			catch (Exception ex)
			{
				Plugin.Log.LogError((object)("[BossVFX] ZNet RPC 등록 실패: " + ex.Message));
			}
		}
	}
	public static class LocalizationManager
	{
		private static Dictionary<string, string> _strings = new Dictionary<string, s