Decompiled source of BillionDifficulty v1.5.1

BillionDifficulty.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using BillionDifficulty;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Steamworks;
using TMPro;
using ULTRAKILL.Cheats;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.AddressableAssets;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BillionDifficulty")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.5.1.0")]
[assembly: AssemblyInformationalVersion("1.5.1")]
[assembly: AssemblyProduct("Billion Difficulty")]
[assembly: AssemblyTitle("BillionDifficulty")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.5.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
public class util
{
	public static T CallPrivateStatic<T>(Type instanceType, string methodName, Type[] argTypes, object[] args)
	{
		return (T)instanceType.GetMethod(methodName, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, null, argTypes, null).Invoke(null, args);
	}

	public static T CallPrivate<T>(object instance, Type classType, string method, object[] args)
	{
		MethodInfo method2 = classType.GetMethod(method, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
		return (T)method2.Invoke(instance, args);
	}

	public static T GetProperty<T>(string name, Type classType, object instance)
	{
		PropertyInfo property = classType.GetProperty(name, BindingFlags.Instance | BindingFlags.NonPublic);
		return (T)property.GetValue(instance);
	}

	public static T GetPropertyStatic<T>(string name, Type classType)
	{
		PropertyInfo property = classType.GetProperty(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
		return (T)property.GetValue(null);
	}

	public static Texture2D LoadEmbeddedTexture(string resourceName)
	{
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Expected O, but got Unknown
		Assembly executingAssembly = Assembly.GetExecutingAssembly();
		using Stream stream = executingAssembly.GetManifestResourceStream(resourceName);
		if (stream == null)
		{
			Plugin.Logger.LogError((object)("Embedded resource '" + resourceName + "' not found"));
			return null;
		}
		byte[] array = new byte[stream.Length];
		stream.Read(array, 0, array.Length);
		Texture2D val = new Texture2D(2, 2);
		if (ImageConversion.LoadImage(val, array))
		{
			return val;
		}
		Plugin.Logger.LogError((object)"Failed to load embedded texture");
		return null;
	}
}
namespace BillionEnemyPatches
{
	public class StrayAttack : MonoBehaviour
	{
		public int projectilesLeft = 0;

		private Animator anim;

		private EnemyIdentifier eid;

		public void Start()
		{
			anim = ((Component)this).GetComponent<Animator>();
			eid = ((Component)this).GetComponent<EnemyIdentifier>();
		}

		public void Update()
		{
			if (!Object.op_Implicit((Object)(object)eid) || eid.dead || !Object.op_Implicit((Object)(object)anim))
			{
				Object.Destroy((Object)(object)this);
				return;
			}
			if (projectilesLeft > 0 && Object.op_Implicit((Object)(object)eid.zombie) && eid.zombie.grounded)
			{
				anim.speed = 4f;
			}
			else if (Object.op_Implicit((Object)(object)eid.zombie) && !eid.zombie.grounded)
			{
				projectilesLeft = 0;
			}
			if (projectilesLeft == 0)
			{
				anim.speed = 1.75f;
			}
		}
	}
	public class SlowDownOverTimeEase : MonoBehaviour
	{
		public float slowRate;

		public float rateEase;

		public bool makeUnparryableOnStop = false;

		public bool changeColorOnStop = false;

		public bool hasBeam = false;

		public float volumeMultiplier = 1f;

		public Color newProjectileColor;

		public float updateInterval = 0.01f;

		public float timeSinceLastInterval = 0f;

		public bool stop = false;

		public Projectile proj;

		public LineRenderer line;

		public void Start()
		{
			proj = ((Component)this).GetComponent<Projectile>();
			line = ((Component)proj).gameObject.GetComponentInChildren<LineRenderer>();
		}

		public void Update()
		{
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			if (proj.parried)
			{
				return;
			}
			if ((Object)(object)line == (Object)null)
			{
				hasBeam = false;
			}
			if (stop)
			{
				return;
			}
			timeSinceLastInterval += Time.deltaTime;
			if (!(timeSinceLastInterval >= updateInterval))
			{
				return;
			}
			timeSinceLastInterval = 0f;
			if (proj.speed > 0f)
			{
				Projectile obj = proj;
				obj.speed -= slowRate;
			}
			else if (proj.speed < 0f)
			{
				proj.speed = 0.001f;
				stop = true;
				if (makeUnparryableOnStop)
				{
					proj.unparryable = true;
				}
				if (changeColorOnStop)
				{
					MeshRenderer[] componentsInChildren = ((Component)proj).GetComponentsInChildren<MeshRenderer>();
					MeshRenderer[] array = componentsInChildren;
					foreach (MeshRenderer val in array)
					{
						((Renderer)val).material.color = newProjectileColor;
					}
					if (hasBeam)
					{
						line.startColor = newProjectileColor;
						line.endColor = newProjectileColor;
					}
					Light component = ((Component)proj).GetComponent<Light>();
					if ((Object)(object)component != (Object)null)
					{
						component.color = newProjectileColor;
					}
				}
				if (volumeMultiplier != 1f)
				{
					AudioSource[] componentsInChildren2 = ((Component)proj).gameObject.GetComponentsInChildren<AudioSource>();
					foreach (AudioSource val2 in componentsInChildren2)
					{
						val2.volume *= volumeMultiplier;
					}
				}
			}
			slowRate += rateEase;
		}
	}
	public class SlowDownOverTime : MonoBehaviour
	{
		public float slowRate;

		public float updateInterval = 0.01f;

		public float timeSinceLastInterval = 0f;

		public bool stop = false;

		public Projectile proj;

		public void Start()
		{
			proj = ((Component)this).GetComponent<Projectile>();
		}

		public void Update()
		{
			if (proj.parried || stop)
			{
				return;
			}
			timeSinceLastInterval += Time.deltaTime;
			if (timeSinceLastInterval >= updateInterval)
			{
				timeSinceLastInterval = 0f;
				if (proj.speed > 0f)
				{
					Projectile obj = proj;
					obj.speed -= slowRate;
				}
				else if (proj.speed < 0f)
				{
					proj.speed = 0.001f;
					stop = true;
				}
			}
		}
	}
	public class ProjectileSpeedStutter : MonoBehaviour
	{
		public float updateInterval = 0.01f;

		public float timeSinceLastInterval = 0f;

		public float targetSpeedMultiplier;

		public float slowRate;

		public bool homing = false;

		public bool explodeWhenClose = false;

		public float explodeDistance;

		public int explodeStutterDelay;

		public int explodeStutterCounter = -2;

		public bool changeColor = false;

		public AudioSource audio = null;

		public Projectile proj;

		public float originalSpeed;

		public void Start()
		{
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			proj = ((Component)this).GetComponent<Projectile>();
			originalSpeed = proj.speed;
			if (changeColor)
			{
				MeshRenderer[] componentsInChildren = ((Component)proj).GetComponentsInChildren<MeshRenderer>();
				MeshRenderer[] array = componentsInChildren;
				foreach (MeshRenderer val in array)
				{
					((Renderer)val).material.color = new Color(1f, 1f, 1f);
					((Renderer)val).material.renderQueue = 3000;
				}
				TrailRenderer component = ((Component)proj).GetComponent<TrailRenderer>();
				component.startColor = new Color(1f, 0.6902f, 0.0196f);
				component.endColor = new Color(1f, 1f, 0.0431f);
				Light component2 = ((Component)proj).GetComponent<Light>();
				component2.color = new Color(1f, 1f, 1f);
			}
		}

		public void Update()
		{
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: 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_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: 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_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: 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_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02da: Unknown result type (might be due to invalid IL or missing references)
			if (proj.parried)
			{
				return;
			}
			timeSinceLastInterval += Time.deltaTime;
			if (homing)
			{
				proj.turnSpeed = 0f;
			}
			if (!(timeSinceLastInterval >= updateInterval))
			{
				return;
			}
			timeSinceLastInterval = 0f;
			if (proj.speed == originalSpeed && (Object)(object)audio != (Object)null)
			{
				audio.Play();
			}
			if (proj.speed > originalSpeed * targetSpeedMultiplier)
			{
				Projectile obj = proj;
				obj.speed -= slowRate;
				return;
			}
			proj.speed = originalSpeed;
			if (homing)
			{
				proj.homingType = (HomingType)4;
				proj.turningSpeedMultiplier = 100f;
			}
			if (!explodeWhenClose)
			{
				return;
			}
			if (explodeStutterCounter == -2 && explodeDistance >= Vector3.Distance(((Component)MonoSingleton<NewMovement>.Instance).transform.position, ((Component)this).transform.position))
			{
				explodeStutterCounter = -1;
				return;
			}
			if (explodeStutterCounter >= -1 && changeColor)
			{
				MeshRenderer[] componentsInChildren = ((Component)proj).GetComponentsInChildren<MeshRenderer>();
				MeshRenderer[] array = componentsInChildren;
				foreach (MeshRenderer val in array)
				{
					Color color = ((Renderer)val).material.color;
					((Renderer)val).material.color = new Color(color.r - 1f / ((float)explodeStutterDelay + 1f), color.g, color.b);
					((Renderer)val).material.renderQueue = 3000;
				}
				TrailRenderer component = ((Component)proj).GetComponent<TrailRenderer>();
				Color startColor = component.startColor;
				Color endColor = component.endColor;
				component.startColor = new Color(startColor.r - 1f / ((float)explodeStutterDelay + 1f), startColor.g, startColor.b);
				component.endColor = new Color(endColor.r - 1f / ((float)explodeStutterDelay + 1f), endColor.g, endColor.b);
				Light component2 = ((Component)proj).GetComponent<Light>();
				Color color2 = component2.color;
				component2.color = new Color(color2.r - (float)(1 / (explodeStutterDelay + 1)), color2.g, color2.b);
			}
			if (explodeStutterCounter > explodeStutterDelay - 1)
			{
				proj.Explode();
			}
			else if (explodeStutterCounter >= -1 && explodeStutterCounter < explodeStutterDelay)
			{
				explodeStutterCounter++;
			}
		}
	}
	internal class ChangeScaleOverTime : MonoBehaviour
	{
		public float delay = 0f;

		public float targetScaleMultiplier;

		public float time;

		public float timeSinceStart;

		public Projectile proj;

		public Vector3 currentScale;

		public Vector3 initialScale;

		public Vector3 targetScale;

		public LineRenderer line;

		public bool scaleBeam = false;

		public float currentBeamScale;

		public float initialBeamScale;

		public float targetBeamScale;

		public void Start()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			proj = ((Component)this).GetComponent<Projectile>();
			line = ((Component)proj).gameObject.GetComponentInChildren<LineRenderer>();
			currentScale = ((Component)proj).transform.localScale;
			initialScale = ((Component)proj).transform.localScale;
			targetScale = initialScale * targetScaleMultiplier;
			timeSinceStart = 0f;
			if (scaleBeam)
			{
				currentBeamScale = line.startWidth;
				initialBeamScale = line.startWidth;
				targetBeamScale = initialBeamScale * targetScaleMultiplier;
			}
		}

		public void Update()
		{
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)line == (Object)null)
			{
				scaleBeam = false;
			}
			timeSinceStart += Time.deltaTime;
			if (timeSinceStart >= delay)
			{
				float num = Mathf.MoveTowards(currentScale.x, targetScale.x, Time.deltaTime * Mathf.Abs(targetScale.x - initialScale.x) / time);
				float num2 = Mathf.MoveTowards(currentScale.y, targetScale.y, Time.deltaTime * Mathf.Abs(targetScale.y - initialScale.y) / time);
				float num3 = Mathf.MoveTowards(currentScale.z, targetScale.z, Time.deltaTime * Mathf.Abs(targetScale.z - initialScale.z) / time);
				((Component)proj).transform.localScale = new Vector3(num, num2, num3);
				currentScale = new Vector3(num, num2, num3);
				if (scaleBeam)
				{
					float num4 = Mathf.MoveTowards(currentBeamScale, targetBeamScale, Time.deltaTime * Mathf.Abs(targetBeamScale - initialBeamScale) / time);
					line.startWidth = num4;
					line.endWidth = num4;
					currentBeamScale = num4;
				}
			}
		}
	}
	internal class StalkerHealBackMessenger : MonoSingleton
	{
		public Machine source;

		public void Awake()
		{
			source = null;
		}

		public void HealSelf()
		{
			Machine obj = source;
			obj.health += 1.5f;
		}
	}
	internal class StalkerHealBack : MonoSingleton
	{
		public Machine source;

		public bool healed = false;

		public void Update()
		{
			if ((Object)(object)source != (Object)null && !healed)
			{
				Machine obj = source;
				obj.health += 1.5f;
				healed = true;
			}
		}
	}
	internal class StreetcleanerAfterburn : MonoSingleton
	{
		public int damage = 0;

		public float updateInterval = 0.5f;

		public float timeSinceLastInterval = 0f;

		public bool damagedThePlayer = false;

		public bool stoppedAttacking = false;

		public bool destroyOnEnd = false;

		public int ticks = 0;

		public void Update()
		{
			if (!damagedThePlayer || !stoppedAttacking)
			{
				return;
			}
			timeSinceLastInterval += Time.deltaTime;
			if (timeSinceLastInterval >= updateInterval)
			{
				timeSinceLastInterval = 0f;
				if (ticks < 4)
				{
					MonoSingleton<NewMovement>.Instance.GetHurt(damage, false, 0f, false, false, 0.35f, false);
					ticks++;
				}
				else if (destroyOnEnd)
				{
					Object.Destroy((Object)(object)this);
				}
				else
				{
					ticks = 0;
					damagedThePlayer = false;
					stoppedAttacking = false;
				}
			}
		}
	}
	internal class CounterInt : MonoBehaviour
	{
		public int maxValue;

		public bool randomized = false;

		public int randomMin;

		public int randomMax;

		public int value = 1;

		public void Start()
		{
			if (randomized)
			{
				maxValue = Random.Range(randomMin, randomMax + 1);
			}
		}

		public void Add()
		{
			if (value < maxValue)
			{
				value++;
				return;
			}
			value = 1;
			if (randomized)
			{
				maxValue = Random.Range(randomMin, randomMax + 1);
			}
		}
	}
	internal class CounterFloat : MonoBehaviour
	{
		public float currentValue = 0f;

		public void Add(float added)
		{
			currentValue += added;
		}

		public void Reset()
		{
			currentValue = 0f;
		}
	}
	internal class TimerFloat : MonoBehaviour
	{
		public float target = 1f;

		public bool deleteOnReached = false;

		public bool running = false;

		public bool keepRunning = false;

		public bool reached = false;

		public float updateInterval = 1f;

		public float timeSinceLastInterval = 0f;

		public void Start()
		{
			updateInterval = target;
		}

		public void Update()
		{
			if (reached && deleteOnReached)
			{
				Object.Destroy((Object)(object)this);
			}
			else
			{
				if (!running)
				{
					return;
				}
				timeSinceLastInterval += Time.deltaTime;
				if (timeSinceLastInterval >= updateInterval)
				{
					reached = true;
					if (!keepRunning)
					{
						running = false;
					}
				}
			}
		}

		public void Run()
		{
			running = true;
		}

		public void Reset()
		{
			timeSinceLastInterval = 0f;
			reached = false;
		}

		public void ResetAndRun()
		{
			Reset();
			Run();
		}

		public void Stop()
		{
			running = false;
		}

		public void ResetAndStop()
		{
			Reset();
			Stop();
		}
	}
	internal class FloatMoveTowards : MonoBehaviour
	{
		public float initialValue = 0f;

		public float maxValue = 0f;

		public float speedMultiplier = 1f;

		public bool reset = false;

		public bool changeColor = true;

		public Color targetColor;

		public Color targetFerrymanCloakColor;

		public bool reached = false;

		public bool addedStyle = false;

		public float currentValue;

		public float time = 0f;

		public GameObject obj;

		public EnemyIdentifier eid;

		public Material colorMaterial;

		public Material ferrymanCloakColorMaterial;

		public Color initialColor;

		public Color initialFerrymanCloakColor;

		public void Start()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			currentValue = initialValue;
			obj = ((Component)this).gameObject;
			_ = targetColor;
			if (true)
			{
				colorMaterial = ((Renderer)obj.GetComponentInChildren<SkinnedMeshRenderer>()).materials[0];
				initialColor = colorMaterial.color;
			}
			_ = targetFerrymanCloakColor;
			if (true)
			{
				ferrymanCloakColorMaterial = ((Renderer)obj.GetComponentInChildren<SkinnedMeshRenderer>()).materials[1];
				initialFerrymanCloakColor = ferrymanCloakColorMaterial.color;
			}
		}

		public void Update()
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: 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_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			if (currentValue != maxValue)
			{
				time += Time.deltaTime;
			}
			currentValue = Mathf.MoveTowards(currentValue, maxValue, speedMultiplier * Time.deltaTime * maxValue);
			if (changeColor)
			{
				_ = targetColor;
				if ((Object)(object)eid != (Object)null && !eid.dead)
				{
					colorMaterial.color = Color.Lerp(initialColor, targetColor, (currentValue - initialValue) / (maxValue - initialValue));
				}
			}
			if (changeColor)
			{
				_ = targetFerrymanCloakColor;
				if ((Object)(object)eid != (Object)null && !eid.dead)
				{
					ferrymanCloakColorMaterial.color = Color.Lerp(initialFerrymanCloakColor, targetFerrymanCloakColor, (currentValue - initialValue) / (maxValue - initialValue));
				}
			}
			if (currentValue >= maxValue)
			{
				if (!addedStyle)
				{
					reached = true;
				}
				if (reset)
				{
					currentValue = 0f;
				}
			}
		}
	}
	internal class BillionExplosionController : MonoBehaviour
	{
		public float maxSizeMultiplier = 1f;

		public float speedMultiplier = 1f;

		public float enemyDamageMultiplier = 1f;

		public int damage = -1;

		public float damageMultiplier = 1f;

		public void Start()
		{
			maxSizeMultiplier = 1f;
			speedMultiplier = 1f;
			enemyDamageMultiplier = 1f;
			damage = -1;
			damageMultiplier = 1f;
		}
	}
	internal class SentryMortar : MonoBehaviour
	{
		public bool canShootOrb = true;

		public Rigidbody rb;

		public void FixedUpdate()
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)rb != (Object)null)
			{
				rb.AddForce(0f, -5f * Mathf.Abs(rb.velocity.y), 0f);
			}
		}
	}
	internal class ProjectileHeightExplosion : MonoBehaviour
	{
		public float maxDistance = -1f;

		public EnemyTarget target;

		public Transform proj;

		public void Start()
		{
			proj = ((Component)this).transform;
		}

		public void Update()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			if (target != null && target.position.y <= proj.position.y)
			{
				float num = Vector3.Distance(target.position, proj.position);
				if (maxDistance == -1f || (maxDistance != -1f && num <= maxDistance && num > maxDistance / 2f))
				{
					((Component)proj).GetComponent<Projectile>().Explode();
				}
			}
		}
	}
	internal class EnemyIdentifierSaver : MonoBehaviour
	{
		public EnemyIdentifier eid = null;
	}
	internal class IdolHealingSetup : MonoBehaviour
	{
		public EnemyIdentifier eid;

		public float updateInterval = 2f;

		public float timeSinceLastInterval = 0f;

		public bool stop = false;

		public void Start()
		{
			eid = ((Component)this).gameObject.GetComponent<EnemyIdentifier>();
			timeSinceLastInterval = updateInterval;
		}

		public void Update()
		{
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			if (stop)
			{
				return;
			}
			timeSinceLastInterval += Time.deltaTime;
			if (timeSinceLastInterval >= updateInterval)
			{
				timeSinceLastInterval = 0f;
				GameObject val = Object.Instantiate<GameObject>(Plugin.Explosion, ((Component)eid).transform.position, ((Component)eid).transform.rotation);
				((Object)val).name = "Idol Healing Explosion";
				Transform transform = val.transform;
				transform.localScale *= 2.5f;
				Object.Destroy((Object)(object)((Component)val.transform.Find("Sphere_8 (1)")).gameObject);
				Explosion componentInChildren = val.GetComponentInChildren<Explosion>();
				componentInChildren.harmless = true;
				componentInChildren.damage = 0;
				componentInChildren.speed = 1.75f;
				componentInChildren.maxSize = 2.5f;
				componentInChildren.ignite = false;
				val.GetComponent<ExplosionController>().tryIgniteGasoline = false;
				MeshRenderer[] componentsInChildren = val.GetComponentsInChildren<MeshRenderer>();
				MeshRenderer[] array = componentsInChildren;
				foreach (MeshRenderer val2 in array)
				{
					Color color = ((Renderer)val2).material.color;
					((Renderer)val2).material.color = new Color(0f, 1f, 0f);
				}
				((Component)componentInChildren).gameObject.AddComponent<EnemyIdentifierSaver>().eid = eid;
				((Behaviour)val.GetComponentInChildren<AudioSource>()).enabled = false;
				RemoveOnTime[] componentsInChildren2 = val.GetComponentsInChildren<RemoveOnTime>();
				foreach (RemoveOnTime val3 in componentsInChildren2)
				{
					val3.time /= 3f;
				}
				((Component)componentInChildren).gameObject.GetComponent<Rigidbody>().isKinematic = false;
				((Collider)((Component)componentInChildren).gameObject.GetComponent<SphereCollider>()).isTrigger = true;
			}
		}
	}
	[HarmonyPatch(typeof(Explosion), "Start")]
	public class ExplosionIdolPatch
	{
		public static void Postfix(ref Explosion __instance)
		{
			if (MonoSingleton<PrefsManager>.Instance.GetInt("difficulty", 0) != 19 || !(((Object)((Component)__instance).transform.parent).name == "Idol Healing Explosion"))
			{
				return;
			}
			IdolHealingExplosion idolHealingExplosion = ((Component)__instance).gameObject.AddComponent<IdolHealingExplosion>();
			EnemyIdentifierSaver component = ((Component)__instance).gameObject.GetComponent<EnemyIdentifierSaver>();
			idolHealingExplosion.healing = 0.8f;
			EnemyIdentifier[] array = Object.FindObjectsOfType<EnemyIdentifier>();
			EnemyIdentifier[] array2 = array;
			foreach (EnemyIdentifier val in array2)
			{
				if ((Object)(object)val.idol != (Object)null && (Object)(object)val.idol.target == (Object)(object)component.eid)
				{
					((Component)component.eid).gameObject.GetComponent<IdolHealingSetup>().updateInterval = 2f / val.totalHealthModifier;
				}
			}
		}
	}
	internal class IdolHealingExplosion : MonoBehaviour
	{
		public float healing;

		public List<EnemyIdentifier> healedList = new List<EnemyIdentifier>();

		private void Update()
		{
			((Collider)((Component)this).GetComponent<SphereCollider>()).enabled = true;
		}

		private void OnTriggerEnter(Collider other)
		{
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Invalid comparison between Unknown and I4
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Invalid comparison between Unknown and I4
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Invalid comparison between Unknown and I4
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: 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_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Expected I4, but got Unknown
			GameObject gameObject = ((Component)other).gameObject;
			if (gameObject.layer != 10 && gameObject.layer != 11)
			{
				return;
			}
			EnemyIdentifierIdentifier component = ((Component)other).gameObject.GetComponent<EnemyIdentifierIdentifier>();
			if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.eid) || component.eid.dead)
			{
				return;
			}
			EnemyIdentifier eid = component.eid;
			if (healedList.Contains(eid))
			{
				return;
			}
			if ((int)eid.enemyType == 1 || (int)eid.enemyType == 9)
			{
				if (!Object.op_Implicit((Object)(object)eid.drone))
				{
					eid.drone = ((Component)eid).gameObject.GetComponent<Drone>();
				}
				if (Object.op_Implicit((Object)(object)eid.drone))
				{
					eid.drone.health = (float)Mathf.RoundToInt(10f * (eid.drone.health + healing)) / 10f;
					healedList.Add(eid);
				}
				return;
			}
			if ((int)eid.enemyType == 4)
			{
				if (!Object.op_Implicit((Object)(object)eid.spider))
				{
					eid.spider = ((Component)eid).gameObject.GetComponent<SpiderBody>();
				}
				if (Object.op_Implicit((Object)(object)eid.spider))
				{
					eid.spider.health = (float)Mathf.RoundToInt(10f * (eid.spider.health + healing)) / 10f;
					healedList.Add(eid);
				}
				return;
			}
			EnemyClass enemyClass = eid.enemyClass;
			EnemyClass val = enemyClass;
			switch ((int)val)
			{
			case 0:
				if (!Object.op_Implicit((Object)(object)eid.zombie))
				{
					eid.zombie = ((Component)eid).gameObject.GetComponent<Zombie>();
				}
				if (Object.op_Implicit((Object)(object)eid.zombie))
				{
					eid.zombie.health = (float)Mathf.RoundToInt(10f * (eid.zombie.health + healing)) / 10f;
					healedList.Add(eid);
				}
				break;
			case 1:
				if (!Object.op_Implicit((Object)(object)eid.machine))
				{
					eid.machine = ((Component)eid).gameObject.GetComponent<Machine>();
				}
				if (Object.op_Implicit((Object)(object)eid.machine))
				{
					eid.machine.health = (float)Mathf.RoundToInt(10f * (eid.machine.health + healing)) / 10f;
					healedList.Add(eid);
				}
				break;
			case 2:
				if (!Object.op_Implicit((Object)(object)eid.statue))
				{
					eid.statue = ((Component)eid).gameObject.GetComponent<Statue>();
				}
				if (Object.op_Implicit((Object)(object)eid.statue))
				{
					eid.statue.health = (float)Mathf.RoundToInt(10f * (eid.statue.health + healing)) / 10f;
					healedList.Add(eid);
				}
				break;
			}
		}
	}
	public class DamageOverTimeTracker : MonoBehaviour
	{
		public class DamageEvent
		{
			public float timestamp;

			public float amount;
		}

		public float damageThreshold = 30f;

		public float timeWindow = 5f;

		public float cooldown = 1f;

		public bool buffSpeed = true;

		public bool buffingSpeed = false;

		public float speedBuff = 1.25f;

		public float speedBuffTime = 5f;

		public float speedTimeSinceLastInterval = 0f;

		public bool reached = false;

		public bool onCooldown = false;

		public List<DamageEvent> damageEvents = new List<DamageEvent>();

		public float previousHealth;

		public Machine mach;

		public float updateInterval = 1f;

		public float timeSinceLastInterval = 0f;

		private void Start()
		{
			mach = ((Component)this).gameObject.GetComponent<Machine>();
			previousHealth = mach.health;
			updateInterval = cooldown;
		}

		private void Update()
		{
			if (buffingSpeed)
			{
				speedTimeSinceLastInterval += Time.deltaTime;
				if (speedTimeSinceLastInterval >= speedBuffTime)
				{
					buffingSpeed = false;
				}
			}
			if (onCooldown)
			{
				timeSinceLastInterval += Time.deltaTime;
				if (!(timeSinceLastInterval >= updateInterval))
				{
					return;
				}
				reached = false;
				onCooldown = false;
				timeSinceLastInterval = 0f;
				damageEvents.Clear();
			}
			float health = mach.health;
			float num = previousHealth - health;
			if (num > 0f)
			{
				RegisterDamage(num);
			}
			previousHealth = health;
		}

		private void RegisterDamage(float damage)
		{
			float currentTime = Time.time;
			damageEvents.Add(new DamageEvent
			{
				timestamp = currentTime,
				amount = damage
			});
			damageEvents.RemoveAll((DamageEvent e) => currentTime - e.timestamp > timeWindow);
			float num = 0f;
			foreach (DamageEvent damageEvent in damageEvents)
			{
				num += damageEvent.amount;
			}
			if (num >= damageThreshold)
			{
				OnDamageThresholdReached();
				damageEvents.Clear();
			}
		}

		private void OnDamageThresholdReached()
		{
			reached = true;
			onCooldown = false;
			if (buffSpeed)
			{
				buffingSpeed = true;
			}
		}
	}
	public class AlternatingProjectileSplits : MonoBehaviour
	{
		public int maxLayer;

		public float projectileSpeed;

		public float cooldown = 0.15f;

		public int currentLayer = 1;

		public GameObject proj;

		public Projectile projComp;

		public float updateInterval = 0.15f;

		public float timeSinceLastInterval = 0f;

		public void Start()
		{
			proj = ((Component)this).gameObject;
			projComp = proj.GetComponent<Projectile>();
			updateInterval = cooldown;
		}

		public void Update()
		{
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			timeSinceLastInterval += Time.deltaTime;
			if (!(timeSinceLastInterval >= updateInterval))
			{
				return;
			}
			timeSinceLastInterval = 0f;
			if (currentLayer >= maxLayer)
			{
				return;
			}
			projComp.speed = 1f;
			ChangeScaleOverTime changeScaleOverTime = proj.AddComponent<ChangeScaleOverTime>();
			changeScaleOverTime.delay = 0.25f;
			changeScaleOverTime.time = 1f;
			changeScaleOverTime.targetScaleMultiplier = 0f;
			Object.Destroy((Object)(object)proj, 1.25f);
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(0f, 0f, 0f);
			if (currentLayer % 2 == 1)
			{
				for (int i = 0; i < 4; i++)
				{
					switch (i)
					{
					case 0:
						((Vector3)(ref val))..ctor(12.5f, 0f, 0f);
						break;
					case 1:
						((Vector3)(ref val))..ctor(0f, 12.5f, 0f);
						break;
					case 2:
						((Vector3)(ref val))..ctor(-12.5f, 0f, 0f);
						break;
					case 3:
						((Vector3)(ref val))..ctor(0f, -12.5f, 0f);
						break;
					}
					GameObject val2 = Object.Instantiate<GameObject>(Plugin.Projectile, ((Component)this).transform.position, ((Component)this).transform.rotation);
					val2.transform.Rotate(val);
					val2.GetComponent<Projectile>().speed = projectileSpeed;
					if (currentLayer < maxLayer)
					{
						AlternatingProjectileSplits alternatingProjectileSplits = val2.AddComponent<AlternatingProjectileSplits>();
						alternatingProjectileSplits.currentLayer = currentLayer + 1;
						alternatingProjectileSplits.maxLayer = maxLayer;
						alternatingProjectileSplits.projectileSpeed = projectileSpeed;
					}
				}
				return;
			}
			for (int j = 0; j < 4; j++)
			{
				switch (j)
				{
				case 0:
					((Vector3)(ref val))..ctor(12.5f, 12.5f, 0f);
					break;
				case 1:
					((Vector3)(ref val))..ctor(-12.5f, 12.5f, 0f);
					break;
				case 2:
					((Vector3)(ref val))..ctor(-12.5f, -12.5f, 0f);
					break;
				case 3:
					((Vector3)(ref val))..ctor(12.5f, -12.5f, 0f);
					break;
				}
				GameObject val3 = Object.Instantiate<GameObject>(Plugin.Projectile, ((Component)this).transform.position, ((Component)this).transform.rotation);
				val3.transform.Rotate(val);
				val3.GetComponent<Projectile>().speed = projectileSpeed;
				if (currentLayer < maxLayer)
				{
					AlternatingProjectileSplits alternatingProjectileSplits2 = val3.AddComponent<AlternatingProjectileSplits>();
					alternatingProjectileSplits2.currentLayer = currentLayer + 1;
					alternatingProjectileSplits2.maxLayer = maxLayer;
					alternatingProjectileSplits2.projectileSpeed = projectileSpeed;
				}
			}
		}
	}
	public class BoolValue : MonoBehaviour
	{
		public bool value = false;

		public string description;

		public static bool? Get(string target, GameObject obj)
		{
			BoolValue[] components = obj.GetComponents<BoolValue>();
			foreach (BoolValue boolValue in components)
			{
				if (boolValue.description == target)
				{
					return boolValue.value;
				}
			}
			return null;
		}

		public static void Set(string target, bool newValue, GameObject obj)
		{
			BoolValue[] components = obj.GetComponents<BoolValue>();
			foreach (BoolValue boolValue in components)
			{
				if (boolValue.description == target)
				{
					boolValue.value = newValue;
				}
			}
		}
	}
	[HarmonyPatch(typeof(NewMovement))]
	public class NewMovementPatch
	{
		[HarmonyPrefix]
		[HarmonyPatch(typeof(NewMovement), "GetHurt")]
		public static bool GetHurtPrefix(NewMovement __instance, ref int ___difficulty, out float __state)
		{
			__state = __instance.antiHp;
			return true;
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(NewMovement), "GetHurt")]
		public static void GetHurtPostfix(NewMovement __instance, ref int ___difficulty, float __state)
		{
			if (___difficulty == 19)
			{
				float num = __instance.antiHp - __state;
				if (num > 0f)
				{
					num *= 1.4285715f;
					__instance.antiHp = __state + num;
				}
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(NewMovement), "Respawn")]
		public static void RespawnPrefix(ref int ___difficulty)
		{
			if (___difficulty == 19)
			{
				StreetcleanerAfterburn[] array = Object.FindObjectsByType<StreetcleanerAfterburn>((FindObjectsSortMode)0);
				StreetcleanerAfterburn[] array2 = array;
				foreach (StreetcleanerAfterburn streetcleanerAfterburn in array2)
				{
					streetcleanerAfterburn.ticks = 4;
				}
			}
		}
	}
	[HarmonyPatch(typeof(EnemyIdentifier), "Start")]
	public class RadianceSpeedPatch1
	{
		public static void Postfix(ref EnemyIdentifier __instance, ref int ___difficulty)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Invalid comparison between Unknown and I4
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Invalid comparison between Unknown and I4
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Invalid comparison between Unknown and I4
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Invalid comparison between Unknown and I4
			___difficulty = MonoSingleton<PrefsManager>.Instance.GetInt("difficulty", 0);
			if (___difficulty == 19)
			{
				if ((int)__instance.enemyType == 20 || (int)__instance.enemyType == 9)
				{
					__instance.speedBuffModifier = 1.1f;
				}
				else if ((int)__instance.enemyType == 26 || (int)__instance.enemyType == 19)
				{
					__instance.speedBuffModifier = 1.15f;
				}
				else
				{
					__instance.speedBuffModifier = 1.25f;
				}
			}
		}
	}
	[HarmonyPatch(typeof(EnemyIdentifier), "SpeedBuff", new Type[] { typeof(float) })]
	public class RadianceSpeedPatch2
	{
		public static bool Prefix(ref float modifier, ref EnemyIdentifier __instance, ref int ___difficulty)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Invalid comparison between Unknown and I4
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Invalid comparison between Unknown and I4
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Invalid comparison between Unknown and I4
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Invalid comparison between Unknown and I4
			if (___difficulty == 19)
			{
				EnemyIdentifier obj = __instance;
				obj.speedBuffRequests++;
				if ((int)__instance.enemyType == 20 || (int)__instance.enemyType == 9)
				{
					__instance.speedBuffModifier = 1.1f;
				}
				else if ((int)__instance.enemyType == 26 || (int)__instance.enemyType == 19)
				{
					__instance.speedBuffModifier = 1.15f;
				}
				else
				{
					__instance.speedBuffModifier = 1.25f;
				}
				__instance.UpdateBuffs(false, true);
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(Projectile), "Explode")]
	public class ExplosionPatch
	{
		public static bool Prefix(ref Projectile __instance, ref int ___difficulty, ref bool ___active, ref Rigidbody ___rb)
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			if (___active)
			{
				___active = false;
				if (__instance.keepTrail)
				{
					util.CallPrivate<object>(__instance, typeof(Projectile), "KeepTrail", new object[0]);
				}
				Explosion[] componentsInChildren = Object.Instantiate<GameObject>(__instance.explosionEffect, ((Component)__instance).transform.position - ___rb.velocity * 0.02f, ((Component)__instance).transform.rotation).GetComponentsInChildren<Explosion>();
				foreach (Explosion val in componentsInChildren)
				{
					val.sourceWeapon = __instance.sourceWeapon ?? val.sourceWeapon;
					if (__instance.bigExplosion)
					{
						val.maxSize *= 1.5f;
					}
					if (val.damage != 0)
					{
						val.damage = Mathf.RoundToInt(__instance.damage);
					}
					val.enemy = true;
					if (___difficulty != 19)
					{
						continue;
					}
					BillionExplosionController component = ((Component)val).gameObject.GetComponent<BillionExplosionController>();
					if ((Object)(object)component != (Object)null)
					{
						val.maxSize *= component.maxSizeMultiplier;
						val.speed *= component.speedMultiplier;
						val.enemyDamageMultiplier *= component.enemyDamageMultiplier;
						if (component.damage == -1)
						{
							val.damage = Mathf.RoundToInt(component.damageMultiplier * (float)val.damage);
						}
						else
						{
							val.damage = component.damage;
						}
					}
				}
				MonoSingleton<StainVoxelManager>.Instance.TryIgniteAt(((Component)__instance).transform.position, 3);
				Object.Destroy((Object)(object)((Component)__instance).gameObject);
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(EndlessGrid))]
	public class EndlessGridPatch
	{
		[HarmonyPrefix]
		[HarmonyPatch(typeof(EndlessGrid), "NextWave")]
		public static void NextWavePrefix()
		{
			if (MonoSingleton<PrefsManager>.Instance.GetInt("difficulty", 0) == 19)
			{
				SandificationZone[] array = Object.FindObjectsOfType<SandificationZone>();
				SandificationZone[] array2 = array;
				foreach (SandificationZone val in array2)
				{
					Object.Destroy((Object)(object)((Component)((Component)val).transform.root).gameObject);
				}
				SlowDownOverTime[] array3 = Object.FindObjectsOfType<SlowDownOverTime>();
				SlowDownOverTime[] array4 = array3;
				foreach (SlowDownOverTime slowDownOverTime in array4)
				{
					Object.Destroy((Object)(object)((Component)((Component)slowDownOverTime).transform.root).gameObject);
				}
				SlowDownOverTimeEase[] array5 = Object.FindObjectsOfType<SlowDownOverTimeEase>();
				SlowDownOverTimeEase[] array6 = array5;
				foreach (SlowDownOverTimeEase slowDownOverTimeEase in array6)
				{
					Object.Destroy((Object)(object)((Component)((Component)slowDownOverTimeEase).transform.root).gameObject);
				}
			}
		}
	}
	[HarmonyPatch(typeof(StyleHUD))]
	public class StyleHUDPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch(typeof(StyleHUD), "Start")]
		public static void StartPostfix(ref Dictionary<string, string> ___idNameDict)
		{
			if (!___idNameDict.ContainsKey("billion.blue"))
			{
				___idNameDict.Add("billion.blue", "<color=#00ffffff>I'M BLUE</color>");
			}
		}
	}
	[HarmonyPatch(typeof(ZombieMelee), "Start")]
	public class BlueFilthPatch
	{
		public static void Postfix(ref ZombieMelee __instance, ref int ___difficulty, ref EnemyIdentifier ___eid)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Invalid comparison between Unknown and I4
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Expected O, but got Unknown
			if (___difficulty == 19 && (int)___eid.enemyType == 3 && Random.Range(0, 300) == 0)
			{
				Material val = Object.Instantiate<Material>(__instance.originalMaterial);
				Material val2 = Object.Instantiate<Material>(__instance.biteMaterial);
				val.mainTexture = (Texture)(object)Plugin.blueFilthTexture;
				val2.mainTexture = (Texture)(object)Plugin.blueFilthBiteTexture;
				__instance.originalMaterial = val;
				__instance.biteMaterial = val2;
				SkinnedMeshRenderer[] componentsInChildren = ((Component)__instance).gameObject.GetComponentsInChildren<SkinnedMeshRenderer>();
				foreach (SkinnedMeshRenderer val3 in componentsInChildren)
				{
					((Renderer)val3).material = val;
					MaterialPropertyBlock val4 = new MaterialPropertyBlock();
					((Renderer)val3).GetPropertyBlock(val4);
					val4.SetTexture("_MainTex", (Texture)(object)Plugin.blueFilthTexture);
					((Renderer)val3).SetPropertyBlock(val4);
				}
			}
		}
	}
	[HarmonyPatch(typeof(Zombie))]
	public class ZombiePatch
	{
		[HarmonyPostfix]
		[HarmonyPatch(typeof(Zombie), "SetSpeed")]
		public static void SetSpeedPostfix(Zombie __instance, ref int ___difficulty, ref float ___speedMultiplier, ref EnemyIdentifier ___eid)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Invalid comparison between Unknown and I4
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Expected I4, but got Unknown
			if (___difficulty != 19 || ___eid.dead)
			{
				return;
			}
			EnemyType enemyType = ___eid.enemyType;
			EnemyType val = enemyType;
			if ((int)val != 3)
			{
				switch (val - 13)
				{
				case 0:
					___speedMultiplier = 1.75f;
					__instance.anim.speed = 1.75f;
					break;
				case 2:
					___speedMultiplier = 1.75f;
					__instance.anim.speed = 1.25f;
					break;
				case 1:
					___speedMultiplier = 1.75f;
					__instance.anim.speed = 1.75f;
					break;
				}
			}
			else
			{
				___speedMultiplier = 1.75f;
				__instance.anim.speed = 2.25f;
			}
			NavMeshAgent nma = __instance.nma;
			nma.speed *= 1.25f;
		}
	}
	[HarmonyPatch(typeof(ZombieProjectiles))]
	public class ZombieProjectilesPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch(typeof(ZombieProjectiles), "Start")]
		public static void StartPostfix(ZombieProjectiles __instance, ref int ___difficulty, ref EnemyIdentifier ___eid)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Invalid comparison between Unknown and I4
			if (___difficulty == 19 && (int)___eid.enemyType == 13)
			{
				StrayAttack strayAttack = ((Component)__instance).gameObject.AddComponent<StrayAttack>();
				strayAttack.projectilesLeft = 0;
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(ZombieProjectiles), "ThrowProjectile")]
		public static void ThrowPostfix(ZombieProjectiles __instance, ref GameObject ___currentProjectile, ref int ___difficulty, ref float ___coolDown, ref float ___coolDownReduce, ref EnemyIdentifier ___eid)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Invalid comparison between Unknown and I4
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Invalid comparison between Unknown and I4
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			if (___difficulty != 19)
			{
				return;
			}
			if ((int)___eid.enemyType == 13)
			{
				___coolDownReduce = ___coolDown;
				Projectile component = ___currentProjectile.GetComponent<Projectile>();
				component.speed = 90f;
				StrayAttack component2 = ((Component)__instance).gameObject.GetComponent<StrayAttack>();
				component2.projectilesLeft--;
				if (component2.projectilesLeft == 0)
				{
					___coolDownReduce = 1.6f;
				}
			}
			else if ((int)___eid.enemyType == 15)
			{
				___coolDownReduce = 2f;
				___currentProjectile.transform.localScale = new Vector3(3f, 3f, 3f);
				ProjectileSpread component3 = ___currentProjectile.GetComponent<ProjectileSpread>();
				component3.projectileAmount = 8;
				component3.spreadAmount = 12f;
				Projectile componentInChildren = ___currentProjectile.GetComponentInChildren<Projectile>();
				componentInChildren.speed = 82.5f;
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(ZombieProjectiles), "Swing")]
		public static void SwingPrefix(ZombieProjectiles __instance, ref int ___difficulty, ref EnemyIdentifier ___eid)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Invalid comparison between Unknown and I4
			if (___difficulty == 19 && (int)___eid.enemyType == 13)
			{
				StrayAttack component = ((Component)__instance).gameObject.GetComponent<StrayAttack>();
				if (component.projectilesLeft == 0)
				{
					component.projectilesLeft = 3;
				}
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(ZombieProjectiles), "Update")]
		public static void UpdatePostfix(ZombieProjectiles __instance, ref int ___difficulty, ref EnemyIdentifier ___eid, ref Animator ___anim)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Invalid comparison between Unknown and I4
			if (___difficulty == 19 && (int)___eid.enemyType == 13)
			{
				StrayAttack component = ((Component)__instance).gameObject.GetComponent<StrayAttack>();
				if (___anim.GetBool("Running"))
				{
					component.projectilesLeft = 0;
				}
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(ZombieProjectiles), "ShootProjectile")]
		public static void ShootPostfix(ref ZombieProjectiles __instance, ref int ___difficulty, ref GameObject ___currentProjectile)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			if (___difficulty == 19)
			{
				Projectile component = ___currentProjectile.GetComponent<Projectile>();
				component.speed = 60f;
				((Component)component).transform.localScale = new Vector3(1.5f, 1.5f, 1.5f);
				SlowDownOverTimeEase slowDownOverTimeEase = ___currentProjectile.AddComponent<SlowDownOverTimeEase>();
				slowDownOverTimeEase.slowRate = 0.15f;
				slowDownOverTimeEase.rateEase = 0.05f;
				slowDownOverTimeEase.makeUnparryableOnStop = true;
				slowDownOverTimeEase.changeColorOnStop = true;
				slowDownOverTimeEase.hasBeam = true;
				slowDownOverTimeEase.newProjectileColor = new Color(0.6f, 0.65f, 0f);
				slowDownOverTimeEase.volumeMultiplier = 0.8f;
				ChangeScaleOverTime changeScaleOverTime = ___currentProjectile.AddComponent<ChangeScaleOverTime>();
				changeScaleOverTime.delay = 4f;
				changeScaleOverTime.time = 1f;
				changeScaleOverTime.targetScaleMultiplier = 0f;
				LineRenderer componentInChildren = ___currentProjectile.GetComponentInChildren<LineRenderer>();
				if ((Object)(object)componentInChildren != (Object)null)
				{
					componentInChildren.startWidth = 1.5f;
					componentInChildren.endWidth = 1.5f;
					changeScaleOverTime.scaleBeam = true;
				}
			}
		}
	}
	[HarmonyPatch(typeof(ZombieMelee))]
	public class ZombieMeleePatch
	{
		[HarmonyPostfix]
		[HarmonyPatch(typeof(ZombieMelee), "Start")]
		public static void StartPostfix(ref int ___difficulty, ref ZombieMelee __instance, ref float ___defaultCoolDown)
		{
			if (___difficulty == 19)
			{
				___defaultCoolDown = 0.2f;
				TimerFloat timerFloat = ((Component)__instance).gameObject.AddComponent<TimerFloat>();
				timerFloat.target = 0.2f;
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(ZombieMelee), "Update")]
		public static bool UpdatePrefix(ref ZombieMelee __instance, ref int ___difficulty, Transform ___modelTransform, ref EnemyIdentifier ___eid, ref bool ___aboutToDive, ref bool ___inAction, ref float ___randomJumpChanceCooldown, ref Rigidbody ___rb, ref Animator ___anim, ref NavMeshAgent ___nma)
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: 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_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: 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_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0349: Unknown result type (might be due to invalid IL or missing references)
			//IL_0355: Unknown result type (might be due to invalid IL or missing references)
			//IL_0368: Unknown result type (might be due to invalid IL or missing references)
			//IL_0379: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0504: Unknown result type (might be due to invalid IL or missing references)
			//IL_0509: Unknown result type (might be due to invalid IL or missing references)
			//IL_0515: Unknown result type (might be due to invalid IL or missing references)
			//IL_0521: Unknown result type (might be due to invalid IL or missing references)
			//IL_0526: Unknown result type (might be due to invalid IL or missing references)
			//IL_052b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0536: Unknown result type (might be due to invalid IL or missing references)
			if (__instance.diving)
			{
				Vector3 val = ((Component)__instance).transform.position + ((Component)__instance).transform.forward;
				Vector3 up = Vector3.up;
				Vector3 velocity = ___rb.velocity;
				___modelTransform.LookAt(val + up * ((Vector3)(ref velocity)).normalized.y * 5f);
				___modelTransform.Rotate(Vector3.right * 90f, (Space)1);
			}
			else
			{
				___modelTransform.localRotation = Quaternion.identity;
			}
			if (!__instance.diving && __instance.damaging)
			{
				___rb.isKinematic = false;
				float num = 1f;
				if (___difficulty >= 4)
				{
					num = 1.25f;
				}
				___rb.velocity = ((Component)__instance).transform.forward * 40f * num * ___anim.speed;
			}
			if (__instance.track && ___eid.target != null)
			{
				if (___difficulty > 1)
				{
					((Component)__instance).transform.LookAt(new Vector3(___eid.target.position.x, ((Component)__instance).transform.position.y, ___eid.target.position.z));
				}
				else
				{
					float num2 = 720f;
					if (___difficulty == 0)
					{
						num2 = 360f;
					}
					((Component)__instance).transform.rotation = Quaternion.RotateTowards(((Component)__instance).transform.rotation, Quaternion.LookRotation(new Vector3(___eid.target.position.x, ((Component)__instance).transform.position.y, ___eid.target.position.z) - ((Component)__instance).transform.position), Time.deltaTime * num2 * ___eid.totalSpeedModifier);
				}
			}
			float num3 = 3f;
			if (___eid.target != null && !___eid.target.isPlayer)
			{
				num3 = 4f;
			}
			TimerFloat timerFloat = null;
			if (___difficulty == 19)
			{
				timerFloat = ((Component)__instance).gameObject.GetComponent<TimerFloat>();
			}
			if (__instance.coolDown == 0f || (Object.op_Implicit((Object)(object)timerFloat) && timerFloat.reached))
			{
				if (Object.op_Implicit((Object)(object)timerFloat))
				{
					timerFloat.ResetAndStop();
				}
				bool flag = ((___difficulty != 19) ? (___eid.target != null && __instance.zmb.grounded && !___nma.isOnOffMeshLink && !___aboutToDive && !___inAction) : (___eid.target != null));
				float num4 = ((___difficulty != 19) ? 20f : 17.5f);
				if (flag)
				{
					if (___difficulty >= 4)
					{
						if (___difficulty == 19)
						{
							__instance.coolDown = 0.1f;
						}
						float num5 = Vector3.Distance(___eid.target.position, ((Component)__instance).transform.position);
						if (___eid.target.position.y > ((Component)__instance).transform.position.y + 5f && num5 < num4 && !Physics.Raycast(((Component)__instance).transform.position + Vector3.up, ___eid.target.position - (((Component)__instance).transform.position + Vector3.up), Vector3.Distance(___eid.target.position, ((Component)__instance).transform.position + Vector3.up), LayerMask.op_Implicit(LayerMaskDefaults.Get((LMD)1))))
						{
							___aboutToDive = true;
							if (___difficulty == 19)
							{
								__instance.coolDown = 0.2f;
							}
							((MonoBehaviour)__instance).Invoke("JumpAttack", Random.Range(0f, 0.5f));
							if (Object.op_Implicit((Object)(object)timerFloat))
							{
								timerFloat.ResetAndRun();
							}
							return false;
						}
						if (num5 < num3 && !__instance.damaging)
						{
							__instance.Swing();
							return false;
						}
						if (num5 < 20f && num5 > 10f && ___randomJumpChanceCooldown > 1f)
						{
							if (Random.Range(0f, 1f) > 0.8f && !Physics.Raycast(((Component)__instance).transform.position + Vector3.up, ___eid.target.position - (((Component)__instance).transform.position + Vector3.up), Vector3.Distance(___eid.target.position, ((Component)__instance).transform.position + Vector3.up), LayerMask.op_Implicit(LayerMaskDefaults.Get((LMD)1))))
							{
								if (___difficulty == 19)
								{
									__instance.coolDown = 0.2f;
								}
								__instance.JumpAttack();
								if (Object.op_Implicit((Object)(object)timerFloat))
								{
									timerFloat.ResetAndRun();
								}
							}
							___randomJumpChanceCooldown = 0f;
							return false;
						}
					}
					else if (Vector3.Distance(___eid.target.position, ((Component)__instance).transform.position) < num3 && !__instance.damaging)
					{
						__instance.Swing();
					}
				}
				return false;
			}
			if (__instance.coolDown - Time.deltaTime > 0f)
			{
				if (___difficulty == 19)
				{
					ZombieMelee obj = __instance;
					obj.coolDown -= Time.deltaTime / 2.5f * ___eid.totalSpeedModifier;
				}
				else
				{
					ZombieMelee obj2 = __instance;
					obj2.coolDown -= Time.deltaTime / 2.5f * ___eid.totalSpeedModifier;
				}
				return false;
			}
			__instance.coolDown = 0f;
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(ZombieMelee), "JumpStart")]
		public static bool JumpPrefix(ref int ___difficulty, ref ZombieMelee __instance, ref EnemyIdentifier ___eid)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: 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_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			if (___difficulty == 19)
			{
				Vector3 val = ___eid.target.position;
				if (___eid.target.isPlayer)
				{
					val = MonoSingleton<PlayerTracker>.Instance.PredictPlayerPosition(0.5f, false, false);
				}
				((Component)__instance).transform.LookAt(new Vector3(val.x, ((Component)__instance).transform.position.y, val.z));
				__instance.zmb.Jump(Vector3.up * 23f + Vector3.ClampMagnitude(new Vector3((val.x - ((Component)__instance).transform.position.x) * 1.5f, 0f, (val.z - ((Component)__instance).transform.position.z) * 1.5f), 8f));
				Object.Instantiate<GameObject>(__instance.swingSound, ((Component)__instance).transform);
				__instance.diving = true;
				__instance.DamageStart();
				__instance.zmb.ParryableCheck();
				((MonoBehaviour)__instance).Invoke("CheckThatJumpStarted", 1f);
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(SpiderBody))]
	public class SpiderBodyPatch
	{
		[HarmonyPrefix]
		[HarmonyPatch(typeof(SpiderBody), "GetHurt")]
		public static bool GetHurtPrefix(ref GameObject target, Vector3 force, ref Vector3 hitPoint, float multiplier, GameObject sourceWeapon, ref SpiderBody __instance, ref int ___difficulty, ref EnemyIdentifier ___eid, ref GoreZone ___gz, ref GameObject ___currentDrip, ref StyleCalculator ___scalc, ref bool ___parryable, ref GameObject ___currentExplosion, ref int ___parryFramesLeft, ref EnemySimplifier[] ___ensims, ref float ___maxHealth)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0633: Unknown result type (might be due to invalid IL or missing references)
			//IL_0638: Unknown result type (might be due to invalid IL or missing references)
			//IL_0520: Unknown result type (might be due to invalid IL or missing references)
			//IL_0491: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b1: Unknown result type (might be due to invalid IL or missing references)
			bool flag = false;
			float health = __instance.health;
			if (hitPoint == Vector3.zero)
			{
				hitPoint = target.transform.position;
			}
			bool goreOn = MonoSingleton<BloodsplatterManager>.Instance.goreOn;
			if ((Object)(object)___eid == (Object)null)
			{
				___eid = ((Component)__instance).GetComponent<EnemyIdentifier>();
			}
			if (___eid.hitter != "fire")
			{
				if (!___eid.sandified && !___eid.blessed)
				{
					GameObject val = Object.Instantiate<GameObject>(MonoSingleton<BloodsplatterManager>.Instance.GetGore((GoreType)3, ___eid, false), hitPoint, Quaternion.identity);
					if (Object.op_Implicit((Object)(object)val))
					{
						Bloodsplatter component = val.GetComponent<Bloodsplatter>();
						val.transform.SetParent(___gz.goreZone, true);
						if (___eid.hitter == "drill")
						{
							Transform transform = val.transform;
							transform.localScale *= 2f;
						}
						if (__instance.health > 0f)
						{
							component.GetReady();
						}
						if (___eid.hitter == "nail")
						{
							component.hpAmount = 3;
							AudioSource component2 = ((Component)component).GetComponent<AudioSource>();
							component2.volume *= 0.8f;
						}
						else if (multiplier >= 1f)
						{
							component.hpAmount = 30;
						}
						if (goreOn)
						{
							val.GetComponent<ParticleSystem>().Play();
						}
					}
					if (___eid.hitter != "shotgun" && ___eid.hitter != "drill" && ((Component)__instance).gameObject.activeInHierarchy)
					{
						if ((Object)(object)__instance.dripBlood != (Object)null)
						{
							___currentDrip = Object.Instantiate<GameObject>(__instance.dripBlood, hitPoint, Quaternion.identity);
						}
						if (Object.op_Implicit((Object)(object)___currentDrip))
						{
							___currentDrip.transform.parent = ((Component)__instance).transform;
							___currentDrip.transform.LookAt(((Component)__instance).transform);
							___currentDrip.transform.Rotate(180f, 180f, 180f);
							if (goreOn)
							{
								___currentDrip.GetComponent<ParticleSystem>().Play();
							}
						}
					}
				}
				else
				{
					Object.Instantiate<GameObject>(MonoSingleton<BloodsplatterManager>.Instance.GetGore((GoreType)3, ___eid, false), hitPoint, Quaternion.identity);
				}
			}
			if (!___eid.dead)
			{
				if (!___eid.blessed && !InvincibleEnemies.Enabled)
				{
					SpiderBody obj = __instance;
					obj.health -= 1f * multiplier;
				}
				if ((Object)(object)___scalc == (Object)null)
				{
					___scalc = MonoSingleton<StyleCalculator>.Instance;
				}
				if (__instance.health <= 0f)
				{
					flag = true;
				}
				if (((___eid.hitter == "shotgunzone" || ___eid.hitter == "hammerzone") & ___parryable) || ___eid.hitter == "punch")
				{
					if (___parryable)
					{
						___parryable = false;
						MonoSingleton<FistControl>.Instance.currentPunch.Parry(false, ___eid, "");
						___currentExplosion = Object.Instantiate<GameObject>(AddressablesExtensions.ToAsset(__instance.beamExplosion), ((Component)__instance).transform.position, Quaternion.identity);
						if (!InvincibleEnemies.Enabled && !___eid.blessed)
						{
							SpiderBody obj2 = __instance;
							obj2.health -= (float)((___parryFramesLeft > 0) ? 4 : 5) / ___eid.totalHealthModifier;
						}
						Explosion[] componentsInChildren = ___currentExplosion.GetComponentsInChildren<Explosion>();
						foreach (Explosion val2 in componentsInChildren)
						{
							val2.speed *= ___eid.totalDamageModifier;
							val2.maxSize *= 1.75f * ___eid.totalDamageModifier;
							if (___difficulty == 19)
							{
								val2.damage = Mathf.RoundToInt(25f * ___eid.totalDamageModifier);
								val2.canHit = (AffectedSubjects)1;
								val2.friendlyFire = false;
								Transform transform2 = ___currentExplosion.transform;
								transform2.localScale *= 0.8f;
								val2.maxSize *= 0.8f;
								val2.speed *= 1.25f;
								SpiderBody obj3 = __instance;
								obj3.health += 1.5f / ___eid.totalHealthModifier;
							}
							else
							{
								val2.damage = Mathf.RoundToInt(50f * ___eid.totalDamageModifier);
								val2.canHit = (AffectedSubjects)2;
								val2.friendlyFire = true;
							}
						}
						if ((Object)(object)__instance.currentEnrageEffect == (Object)null)
						{
							((MonoBehaviour)__instance).CancelInvoke("BeamFire");
							((MonoBehaviour)__instance).Invoke("StopWaiting", 1f);
							Object.Destroy((Object)(object)__instance.currentCE);
						}
						___parryFramesLeft = 0;
					}
					else
					{
						___parryFramesLeft = MonoSingleton<FistControl>.Instance.currentPunch.activeFrames;
					}
				}
				if (multiplier != 0f)
				{
					___scalc.HitCalculator(___eid.hitter, "spider", "", flag, ___eid, sourceWeapon);
				}
				if (health >= ___maxHealth / 2f && __instance.health < ___maxHealth / 2f)
				{
					if (___ensims == null || ___ensims.Length == 0)
					{
						___ensims = ((Component)__instance).GetComponentsInChildren<EnemySimplifier>();
					}
					Object.Instantiate<GameObject>(__instance.woundedParticle, ((Component)__instance).transform.position, Quaternion.identity);
					if (!___eid.puppet)
					{
						EnemySimplifier[] array = ___ensims;
						foreach (EnemySimplifier val3 in array)
						{
							if (!val3.ignoreCustomColor)
							{
								val3.ChangeMaterialNew((MaterialState)0, __instance.woundedMaterial);
								val3.ChangeMaterialNew((MaterialState)2, __instance.woundedEnrageMaterial);
							}
						}
					}
				}
				if (Object.op_Implicit((Object)(object)__instance.hurtSound) && health > 0f)
				{
					OneShotAudioExtension.PlayClipAtPoint(__instance.hurtSound, MonoSingleton<AudioMixerController>.Instance.goreGroup, ((Component)__instance).transform.position, 12, 1f, 0.75f, Random.Range(0.85f, 1.35f), (AudioRolloffMode)1, 1f, 100f);
				}
				if (__instance.health <= 0f && !___eid.dead)
				{
					__instance.Die();
					return false;
				}
			}
			else if (___eid.hitter == "ground slam")
			{
				__instance.BreakCorpse();
			}
			return false;
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(SpiderBody), "Start")]
		public static void StartPostfix(ref int ___difficulty, ref float ___coolDownMultiplier, ref int ___maxBurst)
		{
			if (___difficulty == 19)
			{
				___coolDownMultiplier = 1.5f;
				___maxBurst = 18;
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(SpiderBody), "ShootProj")]
		public static bool ShootProjPrefix(ref SpiderBody __instance, ref int ___difficulty, ref int ___currentBurst, ref Transform ___headModel, ref GameObject ___currentProj, ref EnemyIdentifier ___eid, ref bool ___readyToShoot)
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: 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_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: 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_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_023c: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_0287: 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_02ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02de: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_0316: Unknown result type (might be due to invalid IL or missing references)
			//IL_032c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0338: 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_034b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0357: Unknown result type (might be due to invalid IL or missing references)
			//IL_0365: Unknown result type (might be due to invalid IL or missing references)
			//IL_036a: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03da: Unknown result type (might be due to invalid IL or missing references)
			//IL_03df: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0404: Unknown result type (might be due to invalid IL or missing references)
			//IL_0412: Unknown result type (might be due to invalid IL or missing references)
			//IL_0417: Unknown result type (might be due to invalid IL or missing references)
			//IL_042d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0439: Unknown result type (might be due to invalid IL or missing references)
			//IL_0447: Unknown result type (might be due to invalid IL or missing references)
			//IL_044c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0462: Unknown result type (might be due to invalid IL or missing references)
			//IL_046e: Unknown result type (might be due to invalid IL or missing references)
			//IL_047c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0481: Unknown result type (might be due to invalid IL or missing references)
			EnemyTarget property = util.GetProperty<EnemyTarget>("target", typeof(SpiderBody), __instance);
			if (property == null)
			{
				return false;
			}
			___currentProj = Object.Instantiate<GameObject>(__instance.proj, __instance.mouth.position, ((Component)___headModel).transform.rotation);
			if (___difficulty == 19)
			{
				Projectile component = ___currentProj.GetComponent<Projectile>();
				component.enemyDamageMultiplier = 0.25f;
				component.damage = 20f;
			}
			___currentProj.transform.rotation = Quaternion.LookRotation(property.headPosition - __instance.mouth.position);
			if (___difficulty == 19)
			{
				switch (___currentBurst % 9)
				{
				case 0:
					___currentProj.transform.LookAt(property.headPosition);
					___currentProj.transform.localScale = new Vector3(1.5f, 1.5f, 1.5f);
					___currentProj.GetComponent<Projectile>().damage = 40f;
					break;
				case 1:
					___currentProj.transform.LookAt(property.headPosition + ((Component)__instance).transform.right * (float)(1 + ___currentBurst / 5 * 2));
					break;
				case 2:
					___currentProj.transform.LookAt(property.headPosition + ((Component)__instance).transform.right * (float)(1 + ___currentBurst / 5 * 2) + ((Component)__instance).transform.up * (float)(1 + ___currentBurst / 5 * 2));
					break;
				case 3:
					___currentProj.transform.LookAt(property.headPosition + ((Component)__instance).transform.up * (float)(1 + ___currentBurst / 5 * 2));
					break;
				case 4:
					___currentProj.transform.LookAt(property.headPosition + ((Component)__instance).transform.up * (float)(1 + ___currentBurst / 5 * 2) - ((Component)__instance).transform.right * (float)(1 + ___currentBurst / 5 * 2));
					break;
				case 5:
					___currentProj.transform.LookAt(property.headPosition - ((Component)__instance).transform.right * (float)(1 + ___currentBurst / 5 * 2));
					break;
				case 6:
					___currentProj.transform.LookAt(property.headPosition - ((Component)__instance).transform.right * (float)(1 + ___currentBurst / 5 * 2) - ((Component)__instance).transform.up * (float)(1 + ___currentBurst / 5 * 2));
					break;
				case 7:
					___currentProj.transform.LookAt(property.headPosition - ((Component)__instance).transform.up * (float)(1 + ___currentBurst / 5 * 2));
					break;
				case 8:
					___currentProj.transform.LookAt(property.headPosition - ((Component)__instance).transform.up * (float)(1 + ___currentBurst / 5 * 2) + ((Component)__instance).transform.right * (float)(1 + ___currentBurst / 5 * 2));
					break;
				}
			}
			else if (___difficulty >= 4)
			{
				switch (___currentBurst % 5)
				{
				case 1:
					___currentProj.transform.LookAt(property.headPosition + ((Component)__instance).transform.right * (float)(1 + ___currentBurst / 5 * 2));
					break;
				case 2:
					___currentProj.transform.LookAt(property.headPosition + ((Component)__instance).transform.up * (float)(1 + ___currentBurst / 5 * 2));
					break;
				case 3:
					___currentProj.transform.LookAt(property.headPosition - ((Component)__instance).transform.right * (float)(1 + ___currentBurst / 5 * 2));
					break;
				case 4:
					___currentProj.transform.LookAt(property.headPosition - ((Component)__instance).transform.up * (float)(1 + ___currentBurst / 5 * 2));
					break;
				}
			}
			___currentBurst++;
			Projectile component2 = ___currentProj.GetComponent<Projectile>();
			component2.safeEnemyType = (EnemyType)4;
			component2.target = ___eid.target;
			if (___difficulty == 19)
			{
				component2.speed *= 1.5f;
			}
			else if (___difficulty > 2)
			{
				component2.speed *= 1.25f;
			}
			else if (___difficulty == 1)
			{
				component2.speed *= 0.75f;
			}
			else if (___difficulty == 0)
			{
				component2.speed *= 0.5f;
			}
			component2.damage *= ___eid.totalDamageModifier;
			___readyToShoot = false;
			if (___difficulty == 19)
			{
				((MonoBehaviour)__instance).Invoke("ReadyToShoot", 0.025f / ___eid.totalSpeedModifier);
				return false;
			}
			if (___difficulty >= 4)
			{
				((MonoBehaviour)__instance).Invoke("ReadyToShoot", 0.05f / ___eid.totalSpeedModifier);
				return false;
			}
			if (___difficulty > 0)
			{
				((MonoBehaviour)__instance).Invoke("ReadyToShoot", 0.1f / ___eid.totalSpeedModifier);
				return false;
			}
			((MonoBehaviour)__instance).Invoke("ReadyToShoot", 0.2f / ___eid.totalSpeedModifier);
			return false;
		}
	}
	[HarmonyPatch(typeof(SwordsMachine))]
	public class SwordsMachinePatch
	{
		[CompilerGenerated]
		private sealed class <SwordsMachineOverpump>d__2 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public Vector3 position;

			public float damageMultiplier;

			private GameObject <explosionObject>5__1;

			private Explosion[] <>s__2;

			private int <>s__3;

			private Explosion <explosion>5__4;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <SwordsMachineOverpump>d__2(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<explosionObject>5__1 = null;
				<>s__2 = null;
				<explosion>5__4 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Expected O, but got Unknown
				//IL_0047: Unknown result type (might be due to invalid IL or missing references)
				//IL_004c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0082: Unknown result type (might be due to invalid IL or missing references)
				//IL_008c: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.15f);
					<>1__state = 1;
					return true;
				case 1:
				{
					<>1__state = -1;
					<explosionObject>5__1 = Object.Instantiate<GameObject>(Plugin.ExplosionSuper, position, Quaternion.identity);
					<explosionObject>5__1.transform.LookAt(((Component)MonoSingleton<NewMovement>.Instance).transform);
					Transform transform = <explosionObject>5__1.transform;
					transform.localScale *= 1.5f;
					<>s__2 = <explosionObject>5__1.GetComponentsInChildren<Explosion>();
					for (<>s__3 = 0; <>s__3 < <>s__2.Length; <>s__3++)
					{
						<explosion>5__4 = <>s__2[<>s__3];
						Explosion obj = <explosion>5__4;
						obj.maxSize *= 1.5f;
						<explosion>5__4.damage = Mathf.RoundToInt(40f * damageMultiplier);
						<explosion>5__4.enemyDamageMultiplier = 0.25f;
						<explosion>5__4 = null;
					}
					<>s__2 = null;
					return false;
				}
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(SwordsMachine), "Start")]
		public static void StartPostfix(ref SwordsMachine __instance, ref int ___difficulty, ref bool ___bossVersion)
		{
			if (___difficulty == 19)
			{
				((Component)__instance).gameObject.AddComponent<CounterInt>().maxValue = 2;
				if (!___bossVersion)
				{
					__instance.phaseChangeHealth = 10f;
				}
				TimerFloat timerFloat = ((Component)__instance).gameObject.AddComponent<TimerFloat>();
				timerFloat.target = 2f;
				timerFloat.reached = true;
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(SwordsMachine), "SetSpeed")]
		public static void StartPostfix(ref SwordsMachine __instance, ref int ___difficulty, ref EnemyIdentifier ___eid, ref NavMeshAgent ___nma, ref Animator ___anim, ref float ___normalMovSpeed, ref float ___normalAnimSpeed, ref float ___moveSpeedMultiplier)
		{
			if (___difficulty == 19)
			{
				___nma.speed = (__instance.firstPhase ? 22 : 26);
				___anim.speed = 1.2f;
				___anim.SetFloat("ThrowSpeedMultiplier", 1.45f);
				___anim.SetFloat("AttackSpeedMultiplier", 1.15f);
				___moveSpeedMultiplier = 1.45f * ___eid.totalSpeedModifier;
				___normalMovSpeed = ___nma.speed * ___eid.totalSpeedModifier;
				___normalAnimSpeed = ___anim.speed * ___eid.totalSpeedModifier;
			}
		}

		[IteratorStateMachine(typeof(<SwordsMachineOverpump>d__2))]
		public static IEnumerator SwordsMachineOverpump(Vector3 position, float damageMultiplier)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <SwordsMachineOverpump>d__2(0)
			{
				position = position,
				damageMultiplier = damageMultiplier
			};
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(SwordsMachine), "ShootGun")]
		public static bool ShootGunPrefix(ref SwordsMachine __instance, ref int ___difficulty, ref EnemyShotgun ___shotgun, ref bool ___shotgunning, ref EnemyIdentifier ___eid)
		{
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			if (___difficulty == 19)
			{
				EnemyTarget property = util.GetProperty<EnemyTarget>("target", typeof(SwordsMachine), __instance);
				if (property == null || ___eid.dead)
				{
					return false;
				}
				CounterInt component = ((Component)__instance).gameObject.GetComponent<CounterInt>();
				TimerFloat component2 = ((Component)__instance).gameObject.GetComponent<TimerFloat>();
				switch (component.value)
				{
				case 1:
					if (!__instance.inAction)
					{
						___shotgun.UpdateTarget(property);
						___shotgun.Fire();
						component.Add();
					}
					break;
				case 2:
				{
					float num = Vector3.Distance(property.position, ((Component)__instance).transform.position);
					if (num <= 20f)
					{
						AudioSource component3 = Object.Instantiate<GameObject>(Plugin.PumpChargeSound).GetComponent<AudioSource>();
						component3.pitch = 1.35f;
						component3.Play();
						((MonoBehaviour)__instance).StartCoroutine(SwordsMachineOverpump(___shotgun.shootPoint.position, ___eid.totalDamageModifier));
						component.Add();
						component2.ResetAndRun();
						___shotgunning = false;
						__instance.inAction = false;
					}
					else
					{
						___shotgun.UpdateTarget(property);
						___shotgun.Fire();
					}
					break;
				}
				}
				return false;
			}
			return true;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(SwordsMachine), "Update")]
		public static bool UpdatePrefix(ref SwordsMachine __instance, ref int ___difficulty, ref NavMeshAgent ___nma, ref EnemyShotgun ___shotgun, ref bool ___gunDelay, ref bool ___shotgunning, ref bool ___targetingStalker, ref Animator ___anim, ref float ___aimLerp)
		{
			EnemyTarget property = util.GetProperty<EnemyTarget>("target", typeof(SwordsMachine), __instance);
			if (___difficulty == 19 && __instance.active && (Object)(object)___nma != (Object)null && property != null && __instance.spawnAttackDelay <= 0f)
			{
				CounterInt component = ((Component)__instance).gameObject.GetComponent<CounterInt>();
				TimerFloat component2 = ((Component)__instance).gameObject.GetComponent<TimerFloat>();
				if (!component2.reached)
				{
					return false;
				}
				if (component.value == 2 && (__instance.firstPhase || __instance.bothPhases) && !__instance.inAction && ___shotgun.gunReady && !___gunDelay && !___shotgunning && !___targetingStalker)
				{
					___shotgunning = true;
					___anim.SetLayerWeight(1, 1f);
					___anim.SetTrigger("Shoot");
					___aimLerp = 0f;
					return false;
				}
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(SwingCheck2), "Update")]
	public class CerberusDashPatch
	{
		public static void Postfix(ref SwingCheck2 __instance)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			if (MonoSingleton<PrefsManager>.Instance.GetInt("difficulty", 0) == 19 && (int)__instance.eid.enemyType == 0 && ((Component)__instance.eid).gameObject.GetComponent<StatueBoss>().enraged)
			{
				__instance.knockBackForce = 23f;
			}
		}
	}
	[HarmonyPatch(typeof(StatueBoss))]
	public class StatueBossPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch(typeof(StatueBoss), "Start")]
		public static void StartPostfix(ref int ___difficulty, ref Animator ___anim)
		{
			if (___difficulty == 19)
			{
				___anim.speed = 1.5f;
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(StatueBoss), "Tackle")]
		public static void TacklePrefix(ref StatueBoss __instance, ref int ___difficulty, ref int ___extraTackles)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			if (___difficulty == 19)
			{
				GameObject val = Object.Instantiate<GameObject>(MonoSingleton<DefaultReferenceManager>.Instance.unparryableFlash, ((Component)__instance).transform.position + Vector3.up * 6f + ((Component)__instance).transform.forward * 3f, ((Component)__instance).transform.rotation);
				Transform transform = val.transform;
				transform.localScale *= 5f;
				val.transform.SetParent(((Component)__instance).transform, true);
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(StatueBoss), "Tackle")]
		public static void TacklePostfix(ref StatueBoss __instance, ref int ___difficulty, ref int ___extraTackles, ref bool ___tracking)
		{
			if (___difficulty == 19)
			{
				___extraTackles = 1;
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(StatueBoss), "StopDash")]
		public static bool StopDashPrefix(ref StatueBoss __instance, ref int ___difficulty, ref float ___dashPower, ref GroundCheckEnemy ___gc, ref Rigidbody ___rb, ref AudioSource ___partAud, ref int ___extraTackles, ref bool ___dontFall, ref bool ___tracking, ref Animator ___anim, ref float ___realSpeedModifier)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			___dashPower = 0f;
			if (___gc.onGround)
			{
				___rb.isKinematic = true;
			}
			else
			{
				___rb.velocity = Vector3.zero;
			}
			__instance.damaging = false;
			___partAud.Stop();
			__instance.StopDamage();
			if (___extraTackles > 0)
			{
				___dontFall = true;
				___extraTackles--;
				___tracking = true;
				___anim.speed = 0.1f;
				GameObject val = Object.Instantiate<GameObject>(MonoSingleton<DefaultReferenceManager>.Instance.unparryableFlash, ((Component)__instance).transform.position + Vector3.up * 6f + ((Component)__instance).transform.forward * 3f, ((Component)__instance).transform.rotation);
				Transform transform = val.transform;
				transform.localScale *= 5f;
				val.transform.SetParent(((Component)__instance).transform, true);
				___anim.Play("Tackle", -1, 0.4f);
				float num = 0.5f;
				if (___difficulty == 19)
				{
					num = ((!__instance.enraged) ? 0.1f : 0.3f);
				}
				((MonoBehaviour)__instance).Invoke("DelayedTackle", num / ___realSpeedModifier);
				return false;
			}
			___dontFall = false;
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(StatueBoss), "StompHit")]
		public static bool StompHitPrefix(ref StatueBoss __instance, ref int ___difficulty, ref EnemyIdentifier ___eid, ref CameraController ___cc, ref GameObject ___currentStompWave)
		{
			//IL_0070: 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_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: 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)
			___cc.CameraShake(1f);
			if ((Object)(object)___currentStompWave != (Object)null)
			{
				Object.Destroy((Object)(object)___currentStompWave);
			}
			int num = 1;
			if (___difficulty == 4)
			{
				num = 2;
			}
			if (___difficulty == 5)
			{
				num = 3;
			}
			if (___difficulty == 19)
			{
				num = 2;
			}
			AudioSource val = default(AudioSource);
			for (int i = 0; i < num; i++)
			{
				___currentStompWave = Object.Instantiate<GameObject>(AddressablesExtensions.ToAsset(__instance.stompWave), new Vector3(__instance.stompPos.position.x, ((Component)__instance).transform.position.y, __instance.stompPos.position.z), Quaternion.identity);
				PhysicalShockwave component = ___currentStompWave.GetComponent<PhysicalShockwave>();
				component.damage = 25;
				if (___difficulty == 19)
				{
					component.speed = 100f;
				}
				else if (___difficulty == 4 || ___difficulty == 5)
				{
					component.speed = 75f;
				}
				else if (___difficulty == 3)
				{
					component.speed = 50f;
				}
				else if (___difficulty == 2)
				{
					component.speed = 35f;
				}
				else if (___difficulty == 1)
				{
					component.speed = 25f;
				}
				else if (___difficulty == 0)
				{
					component.speed = 15f;
				}
				if (i != 0)
				{
					component.speed /= (float)(1 + i * 2);
					if (((Component)component).TryGetComponent<AudioSource>(ref val))
					{
						((Behaviour)val).enabled = false;
					}
				}
				component.damage = Mathf.RoundToInt((float)component.damage * ___eid.totalDamageModifier);
				component.maxSize = 100f;
				component.enemy = true;
				component.enemyType = (EnemyType)0;
			}
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(StatueBoss), "OrbSpawn")]
		public static bool OrbSpawnPrefix(ref StatueBoss __instance, ref int ___difficulty, ref Vector3 ___projectedPlayerPos, ref bool ___orbGrowing, ref Light ___orbLight, ref ParticleSystem ___part, ref EnemyIdentifier ___eid)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result typ