Decompiled source of VoidLemurian v1.0.0

VoidLemurian.dll

Decompiled 7 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using HG.GeneralSerializer;
using KinematicCharacterController;
using Microsoft.CodeAnalysis;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Projectile;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using VoidLemurian.States;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("VoidLemurian")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("VoidLemurian")]
[assembly: AssemblyTitle("VoidLemurian")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace VoidLemurian
{
	internal static class Asset
	{
		public static T Load<T>(string key) where T : Object
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			T val = Addressables.LoadAssetAsync<T>((object)key).WaitForCompletion();
			if (!Object.op_Implicit((Object)(object)val))
			{
				VoidLemurianPlugin.Log.LogError((object)("Missing game asset: " + key));
			}
			return val;
		}

		public static T EscObject<T>(string escKey, string fieldName) where T : Object
		{
			//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)
			Object obj = FindEscField(escKey, fieldName)?.fieldValue.objectValue;
			return (T)(object)((obj is T) ? obj : null);
		}

		public static string EscString(string escKey, string fieldName)
		{
			//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)
			return FindEscField(escKey, fieldName)?.fieldValue.stringValue ?? "";
		}

		private static SerializedField? FindEscField(string escKey, string fieldName)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			EntityStateConfiguration val = Asset.Load<EntityStateConfiguration>(escKey);
			if (!Object.op_Implicit((Object)(object)val))
			{
				return null;
			}
			SerializedField[] serializedFields = val.serializedFieldsCollection.serializedFields;
			foreach (SerializedField val2 in serializedFields)
			{
				if (val2.fieldName == fieldName)
				{
					return val2;
				}
			}
			VoidLemurianPlugin.Log.LogWarning((object)("Field " + fieldName + " not found in " + escKey));
			return null;
		}
	}
	internal static class LemurianPassive
	{
		public const float CollapseChance = 15f;

		public const float HealFraction = 0.05f;

		public static void Hook()
		{
			GlobalEventManager.onServerDamageDealt += OnServerDamageDealt;
			GlobalEventManager.onCharacterDeathGlobal += OnCharacterDeath;
		}

		private static bool IsLemurian(CharacterBody body)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Invalid comparison between Unknown and I4
			if (Object.op_Implicit((Object)(object)body) && body.bodyIndex == LemurianSurvivor.BodyIndex)
			{
				return (int)body.bodyIndex != -1;
			}
			return false;
		}

		private static void OnServerDamageDealt(DamageReport report)
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Invalid comparison between Unknown and I4
			DamageInfo damageInfo = report.damageInfo;
			if (IsLemurian(report.attackerBody) && Object.op_Implicit((Object)(object)report.victimBody) && damageInfo != null && !damageInfo.rejected && (int)report.dotType == -1 && !(damageInfo.procCoefficient <= 0f) && Util.CheckRoll(15f * damageInfo.procCoefficient, report.attackerMaster))
			{
				InflictCollapse(((Component)report.victim).gameObject, report.attacker);
			}
		}

		public static void InflictCollapse(GameObject victim, GameObject attacker)
		{
			//IL_0002: 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_0038: 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)
			InflictDotInfo val = new InflictDotInfo
			{
				victimObject = victim,
				attackerObject = attacker,
				dotIndex = (DotIndex)8,
				duration = 3f,
				damageMultiplier = 1f
			};
			DotController.InflictDot(ref val);
		}

		private static void OnCharacterDeath(DamageReport report)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Invalid comparison between Unknown and I4
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			if (IsLemurian(report.attackerBody) && Object.op_Implicit((Object)(object)report.victimBody) && ((int)report.dotType == 8 || report.victimBody.HasBuff(Buffs.Fracture)) && Object.op_Implicit((Object)(object)report.attackerBody.healthComponent))
			{
				report.attackerBody.healthComponent.HealFraction(0.05f, default(ProcChainMask));
			}
		}
	}
	internal static class LemurianProjectiles
	{
		public static GameObject VoidBolt;

		public static GameObject HorizonOrb;

		public static GameObject Singularity;

		public const float HorizonOrbDamage = 3f;

		public const float SingularityPulseDamage = 0.5f;

		public const float SingularityImplodeDamage = 10f;

		public const float SingularityRadius = 14f;

		public const float SingularityDuration = 3f;

		public static void Create()
		{
			CreateVoidBolt();
			CreateSingularity();
			CreateHorizonOrb();
		}

		public static DamageTypeCombo FromSkill(DamageSource source)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			return new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, source);
		}

		private static void CreateVoidBolt()
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			VoidBolt = PrefabAPI.InstantiateClone(Asset.Load<GameObject>("RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterSmallProjectile.prefab"), "VoidLemurianBoltProjectile", true);
			ProjectileSimple component = VoidBolt.GetComponent<ProjectileSimple>();
			component.desiredForwardSpeed = 120f;
			component.lifetime = 2f;
			VoidBolt.GetComponent<ProjectileDamage>().damageType = FromSkill((DamageSource)1);
			ProjectileController component2 = VoidBolt.GetComponent<ProjectileController>();
			GameObject val = PrefabAPI.InstantiateClone(component2.ghostPrefab, "VoidLemurianBoltGhost", false);
			Transform transform = val.transform;
			transform.localScale *= 1.6f;
			component2.ghostPrefab = val;
			ContentAddition.AddProjectile(VoidBolt);
		}

		private static void CreateSingularity()
		{
			//IL_0057: 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)
			Singularity = PrefabAPI.InstantiateClone(Asset.Load<GameObject>("RoR2/DLC1/ElementalRingVoid/ElementalRingVoidBlackHole.prefab"), "VoidLemurianSingularity", true);
			Object.DestroyImmediate((Object)(object)Singularity.GetComponent<ProjectileExplosion>());
			Object.DestroyImmediate((Object)(object)Singularity.GetComponent<ProjectileFuse>());
			Singularity.GetComponent<ProjectileSimple>().lifetime = 4f;
			Singularity.GetComponent<ProjectileDamage>().damageType = FromSkill((DamageSource)8);
			RadialForce component = Singularity.GetComponent<RadialForce>();
			component.radius = 14f;
			component.forceMagnitude = -1800f;
			ObjectScaleCurve[] componentsInChildren = Singularity.GetComponentsInChildren<ObjectScaleCurve>(true);
			foreach (ObjectScaleCurve val in componentsInChildren)
			{
				if (val.timeMax > 1f)
				{
					val.timeMax = 3f;
				}
			}
			Singularity.AddComponent<SingularityController>();
			ContentAddition.AddProjectile(Singularity);
		}

		private static void CreateHorizonOrb()
		{
			//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)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			HorizonOrb = PrefabAPI.InstantiateClone(Asset.Load<GameObject>("RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterBigProjectile.prefab"), "VoidLemurianHorizonOrb", true);
			HorizonOrb.GetComponent<ProjectileSimple>().desiredForwardSpeed = 65f;
			HorizonOrb.GetComponent<ProjectileDamage>().damageType = FromSkill((DamageSource)8);
			ProjectileImpactExplosion component = HorizonOrb.GetComponent<ProjectileImpactExplosion>();
			component.lifetime = 1.4f;
			((ProjectileExplosion)component).blastRadius = 7f;
			((ProjectileExplosion)component).fireChildren = true;
			((ProjectileExplosion)component).childrenProjectilePrefab = Singularity;
			((ProjectileExplosion)component).childrenCount = 1;
			((ProjectileExplosion)component).childrenDamageCoefficient = 1f / 3f;
			((ProjectileExplosion)component).minAngleOffset = Vector3.zero;
			((ProjectileExplosion)component).maxAngleOffset = Vector3.zero;
			ContentAddition.AddProjectile(HorizonOrb);
		}
	}
	public class SingularityController : MonoBehaviour
	{
		private const float PulseInterval = 1f / 3f;

		private ProjectileController projectileController;

		private ProjectileDamage projectileDamage;

		private float age;

		private float pulseTimer;

		private bool imploded;

		private void Awake()
		{
			projectileController = ((Component)this).GetComponent<ProjectileController>();
			projectileDamage = ((Component)this).GetComponent<ProjectileDamage>();
		}

		private void FixedUpdate()
		{
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkServer.active && !imploded)
			{
				age += Time.fixedDeltaTime;
				pulseTimer -= Time.fixedDeltaTime;
				if (pulseTimer <= 0f)
				{
					pulseTimer += 1f / 3f;
					Blast(0.5f, 0.3f, (FalloffModel)0);
				}
				if (age >= 3f)
				{
					imploded = true;
					Implode();
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
			}
		}

		private void Implode()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: 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_0065: 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_0075: 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_009b: Unknown result type (might be due to invalid IL or missing references)
			EffectManager.SpawnEffect(VoidAssets.ImplodeEffect, new EffectData
			{
				origin = ((Component)this).transform.position,
				scale = 14f
			}, true);
			Result val = Blast(10f, 1f, (FalloffModel)0);
			GameObject owner = projectileController.owner;
			if (!Object.op_Implicit((Object)(object)owner))
			{
				return;
			}
			HitPoint[] hitPoints = val.hitPoints;
			foreach (HitPoint val2 in hitPoints)
			{
				if (Object.op_Implicit((Object)(object)val2.hurtBox) && Object.op_Implicit((Object)(object)val2.hurtBox.healthComponent) && val2.hurtBox.healthComponent.alive)
				{
					LemurianPassive.InflictCollapse(((Component)val2.hurtBox.healthComponent).gameObject, owner);
				}
			}
		}

		private Result Blast(float coefficient, float procCoefficient, FalloffModel falloff)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: 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_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_005b: 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_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: 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_009f: 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_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			GameObject owner = projectileController.owner;
			return new BlastAttack
			{
				attacker = owner,
				inflictor = ((Component)this).gameObject,
				teamIndex = (Object.op_Implicit((Object)(object)projectileController.teamFilter) ? projectileController.teamFilter.teamIndex : TeamComponent.GetObjectTeam(owner)),
				position = ((Component)this).transform.position,
				radius = 14f,
				baseDamage = projectileDamage.damage * coefficient,
				baseForce = 0f,
				crit = projectileDamage.crit,
				damageType = LemurianProjectiles.FromSkill((DamageSource)8),
				damageColorIndex = (DamageColorIndex)9,
				falloffModel = falloff,
				procCoefficient = procCoefficient,
				attackerFiltering = (AttackerFiltering)2
			}.Fire();
		}
	}
	internal static class LemurianSurvivor
	{
		public const string BodyName = "VoidLemurianBody";

		private const float DisplayScale = 0.19f;

		public static GameObject BodyPrefab;

		public static GameObject DisplayPrefab;

		public static GameObject MasterPrefab;

		public static SurvivorDef Survivor;

		public static BodyIndex BodyIndex = (BodyIndex)(-1);

		private static readonly FieldInfo SkillFamilyField = typeof(GenericSkill).GetField("_skillFamily", BindingFlags.Instance | BindingFlags.NonPublic);

		public static void Create()
		{
			RegisterStates();
			CreateBody();
			CreateSkills();
			CreateSkins();
			CreateDisplay();
			CreateSurvivorDef();
			CreateMaster();
			RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, (Action)delegate
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				BodyIndex = BodyCatalog.FindBodyIndex(BodyPrefab);
			});
		}

		private static void RegisterStates()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: 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_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: 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)
			bool flag = default(bool);
			ContentAddition.AddEntityState<VoidLemurianMain>(ref flag);
			ContentAddition.AddEntityState<FireVoidBolt>(ref flag);
			ContentAddition.AddEntityState<NullBreath>(ref flag);
			ContentAddition.AddEntityState<VoidRift>(ref flag);
			ContentAddition.AddEntityState<ChargeEventHorizon>(ref flag);
			ContentAddition.AddEntityState<FireEventHorizon>(ref flag);
		}

		private static void CreateBody()
		{
			//IL_004f: 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_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			BodyPrefab = PrefabAPI.InstantiateClone(Asset.Load<GameObject>("RoR2/Base/LemurianBruiser/LemurianBruiserBody.prefab"), "VoidLemurianBody", true);
			Shrink(VoidLemurianPlugin.BodySize.Value);
			CharacterBody component = BodyPrefab.GetComponent<CharacterBody>();
			component.baseNameToken = "VOIDLEMURIAN_NAME";
			component.subtitleNameToken = "VOIDLEMURIAN_SUBTITLE";
			component.bodyFlags = (BodyFlags)1040;
			component.portraitIcon = (Texture)(object)VoidAssets.Portrait;
			component.bodyColor = VoidAssets.VoidPurple;
			component.preferredPodPrefab = VoidAssets.SurvivorPod;
			component.hullClassification = (HullClassification)1;
			component.isChampion = false;
			component.autoCalculateLevelStats = false;
			component.baseMaxHealth = 160f;
			component.levelMaxHealth = 48f;
			component.baseRegen = 1.5f;
			component.levelRegen = 0.3f;
			component.baseArmor = 20f;
			component.levelArmor = 0f;
			component.baseDamage = 12f;
			component.levelDamage = 2.4f;
			component.baseAttackSpeed = 1f;
			component.baseCrit = 1f;
			component.baseMoveSpeed = 7f;
			component.levelMoveSpeed = 0f;
			component.baseAcceleration = 60f;
			component.baseJumpPower = 17f;
			component.baseJumpCount = 1;
			component.sprintingSpeedMultiplier = 1.45f;
			BodyPrefab.GetComponent<CharacterDirection>().turnSpeed = 480f;
			BodyPrefab.GetComponent<Interactor>().maxInteractionDistance = 5f;
			BodyPrefab.GetComponent<SetStateOnHurt>().canBeHitStunned = false;
			BodyPrefab.GetComponent<CameraTargetParams>().cameraParams = Asset.Load<GameObject>("RoR2/Base/Croco/CrocoBody.prefab").GetComponent<CameraTargetParams>().cameraParams;
			Object.DestroyImmediate((Object)(object)BodyPrefab.GetComponent<DeathRewards>());
			EntityStateMachine[] components = BodyPrefab.GetComponents<EntityStateMachine>();
			foreach (EntityStateMachine val in components)
			{
				if (val.customName == "Body")
				{
					val.initialStateType = new SerializableEntityStateType(typeof(VoidLemurianMain));
					val.mainStateType = new SerializableEntityStateType(typeof(VoidLemurianMain));
				}
			}
			ContentAddition.AddBody(BodyPrefab);
		}

		private static void Shrink(float scale)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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)
			foreach (Transform item in BodyPrefab.transform)
			{
				item.localPosition *= scale;
			}
			Transform modelTransform = BodyPrefab.GetComponent<ModelLocator>().modelTransform;
			modelTransform.localScale *= scale;
			CapsuleCollider component = BodyPrefab.GetComponent<CapsuleCollider>();
			BodyPrefab.GetComponent<KinematicCharacterMotor>().SetCapsuleDimensions(component.radius * scale, component.height * scale, component.center.y * scale);
		}

		private static void CreateSkills()
		{
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			SkillDef val = MakeSkill("PRIMARY", typeof(FireVoidBolt), "Weapon", 0f, (InterruptPriority)0, VoidAssets.PrimaryIcon);
			val.cancelSprintingOnActivation = true;
			SkillDef skill = MakeSkill("SECONDARY", typeof(NullBreath), "Weapon", 5f, (InterruptPriority)1, VoidAssets.SecondaryIcon, "VOIDLEMURIAN_KEYWORD_NULLIFY");
			SkillDef val2 = MakeSkill("UTILITY", typeof(VoidRift), "Body", 6f, (InterruptPriority)2, VoidAssets.UtilityIcon, "VOIDLEMURIAN_KEYWORD_NULLIFY");
			val2.cancelSprintingOnActivation = false;
			val2.mustKeyPress = true;
			SkillDef val3 = MakeSkill("SPECIAL", typeof(ChargeEventHorizon), "Weapon", 12f, (InterruptPriority)1, VoidAssets.SpecialIcon, "VOIDLEMURIAN_KEYWORD_COLLAPSE");
			val3.mustKeyPress = true;
			SkillLocator component = BodyPrefab.GetComponent<SkillLocator>();
			SetFamily(component.primary, "VoidLemurianPrimaryFamily", val);
			SetFamily(component.secondary, "VoidLemurianSecondaryFamily", skill);
			component.utility = BodyPrefab.AddComponent<GenericSkill>();
			SetFamily(component.utility, "VoidLemurianUtilityFamily", val2);
			component.special = BodyPrefab.AddComponent<GenericSkill>();
			SetFamily(component.special, "VoidLemurianSpecialFamily", val3);
			component.passiveSkill = new PassiveSkill
			{
				enabled = true,
				skillNameToken = "VOIDLEMURIAN_PASSIVE_NAME",
				skillDescriptionToken = "VOIDLEMURIAN_PASSIVE_DESCRIPTION",
				keywordToken = "VOIDLEMURIAN_KEYWORD_COLLAPSE",
				icon = VoidAssets.PassiveIcon
			};
		}

		private static SkillDef MakeSkill(string slot, Type state, string machine, float cooldown, InterruptPriority priority, Sprite icon, params string[] keywords)
		{
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
			val.skillName = "VoidLemurian" + slot;
			((Object)val).name = val.skillName;
			val.skillNameToken = "VOIDLEMURIAN_" + slot + "_NAME";
			val.skillDescriptionToken = "VOIDLEMURIAN_" + slot + "_DESCRIPTION";
			val.keywordTokens = keywords;
			val.icon = icon;
			val.activationStateMachineName = machine;
			val.activationState = new SerializableEntityStateType(state);
			val.interruptPriority = priority;
			val.baseRechargeInterval = cooldown;
			val.baseMaxStock = 1;
			val.rechargeStock = 1;
			val.requiredStock = 1;
			val.stockToConsume = 1;
			val.fullRestockOnAssign = true;
			val.cancelSprintingOnActivation = true;
			val.canceledFromSprinting = false;
			val.beginSkillCooldownOnSkillEnd = false;
			val.isCombatSkill = true;
			val.mustKeyPress = false;
			ContentAddition.AddSkillDef(val);
			return val;
		}

		private static void SetFamily(GenericSkill slot, string familyName, SkillDef skill)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			//IL_003a: 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)
			SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>();
			((Object)val).name = familyName;
			Variant[] array = new Variant[1];
			Variant val2 = new Variant
			{
				skillDef = skill
			};
			((Variant)(ref val2)).viewableNode = new Node(skill.skillNameToken, false, (Node)null);
			array[0] = val2;
			val.variants = (Variant[])(object)array;
			ContentAddition.AddSkillFamily(val);
			SkillFamilyField.SetValue(slot, val);
		}

		private static void CreateSkins()
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_00dd: 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_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			GameObject gameObject = ((Component)BodyPrefab.GetComponent<ModelLocator>().modelTransform).gameObject;
			SkinnedMeshRenderer componentInChildren = gameObject.GetComponentInChildren<SkinnedMeshRenderer>(true);
			componentInChildren.sharedMesh = LoadVanillaMesh((Renderer)(object)componentInChildren);
			gameObject.GetComponent<CharacterModel>().baseRendererInfos = (RendererInfo[])(object)new RendererInfo[1] { RendererInfo((Renderer)(object)componentInChildren, VoidAssets.AbyssMaterial) };
			SkinDef val = MakeSkin("ABYSS", gameObject, (Renderer)(object)componentInChildren, VoidAssets.AbyssMaterial, new Color(0.09f, 0.03f, 0.18f), new Color(0.62f, 0.22f, 1f), new Color(0.24f, 0.08f, 0.42f), new Color(1f, 0.45f, 1f));
			SkinDef val2 = MakeSkin("STARLESS", gameObject, (Renderer)(object)componentInChildren, VoidAssets.StarlessMaterial, new Color(0.02f, 0.02f, 0.04f), new Color(0.55f, 0.9f, 1f), new Color(0.13f, 0.15f, 0.25f), new Color(0.92f, 0.96f, 1f));
			SkinDef val3 = MakeSkin("ELDER", gameObject, (Renderer)(object)componentInChildren, VoidAssets.ElderMaterial, new Color(0.55f, 0.18f, 0.1f), new Color(0.95f, 0.6f, 0.2f), new Color(0.35f, 0.25f, 0.15f), new Color(0.86f, 0.73f, 0.27f));
			gameObject.GetComponent<ModelSkinController>().skins = (SkinDef[])(object)new SkinDef[3] { val, val2, val3 };
		}

		private static Mesh LoadVanillaMesh(Renderer renderer)
		{
			//IL_002e: 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_0034: 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_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: 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_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			SkinDefParams val = Asset.Load<SkinDefParams>("RoR2/Base/LemurianBruiser/skinLemurianBruiserBodyDefault_params.asset");
			if (Object.op_Implicit((Object)(object)val) && val.meshReplacements != null)
			{
				MeshReplacement[] meshReplacements = val.meshReplacements;
				foreach (MeshReplacement val2 in meshReplacements)
				{
					if (!Object.op_Implicit((Object)(object)val2.renderer) || !(((Object)val2.renderer).name != ((Object)renderer).name) || val.meshReplacements.Length <= 1)
					{
						if (Object.op_Implicit((Object)(object)val2.mesh))
						{
							return val2.mesh;
						}
						if (val2.meshAddress != null && ((AssetReference)val2.meshAddress).RuntimeKeyIsValid())
						{
							return Addressables.LoadAssetAsync<Mesh>(((AssetReference)val2.meshAddress).RuntimeKey).WaitForCompletion();
						}
					}
				}
			}
			Renderer obj = ((renderer is SkinnedMeshRenderer) ? renderer : null);
			Mesh obj2 = ((obj != null) ? ((SkinnedMeshRenderer)obj).sharedMesh : null);
			if (!Object.op_Implicit((Object)(object)obj2))
			{
				VoidLemurianPlugin.Log.LogError((object)"Could not find the Elder Lemurian mesh; the Void Lemurian will be invisible.");
			}
			return obj2;
		}

		private static RendererInfo RendererInfo(Renderer renderer, Material material)
		{
			//IL_0002: 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_0028: Unknown result type (might be due to invalid IL or missing references)
			return new RendererInfo
			{
				renderer = renderer,
				defaultMaterial = material,
				defaultShadowCastingMode = (ShadowCastingMode)1,
				ignoreOverlays = false
			};
		}

		private static SkinDef MakeSkin(string id, GameObject model, Renderer mesh, Material material, Color top, Color right, Color bottom, Color left)
		{
			//IL_0002: 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_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: 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_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: 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_00cf: Unknown result type (might be due to invalid IL or missing references)
			return Skins.CreateNewSkinDef(new SkinDefParamsInfo
			{
				Name = "skinVoidLemurian" + id,
				NameToken = "VOIDLEMURIAN_SKIN_" + id + "_NAME",
				Icon = Skins.CreateSkinIcon(top, right, bottom, left),
				RootObject = model,
				RendererInfos = (RendererInfo[])(object)new RendererInfo[1] { RendererInfo(mesh, material) },
				BaseSkins = Array.Empty<SkinDef>(),
				MeshReplacements = (MeshReplacement[])(object)new MeshReplacement[1]
				{
					new MeshReplacement
					{
						renderer = mesh,
						mesh = ((SkinnedMeshRenderer)mesh).sharedMesh
					}
				},
				GameObjectActivations = Array.Empty<GameObjectActivation>(),
				ProjectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(),
				MinionSkinReplacements = Array.Empty<MinionSkinReplacement>()
			});
		}

		private static void CreateDisplay()
		{
			//IL_002e: 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)
			DisplayPrefab = PrefabAPI.InstantiateClone(((Component)BodyPrefab.GetComponent<ModelLocator>().modelTransform).gameObject, "VoidLemurianDisplay", false);
			DisplayPrefab.transform.localScale = Vector3.one * 0.095f;
			Object.DestroyImmediate((Object)(object)DisplayPrefab.GetComponent<HurtBoxGroup>());
			HurtBox[] componentsInChildren = DisplayPrefab.GetComponentsInChildren<HurtBox>(true);
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				Object.DestroyImmediate((Object)(object)((Component)componentsInChildren[i]).gameObject);
			}
			AimAssistTarget[] componentsInChildren2 = DisplayPrefab.GetComponentsInChildren<AimAssistTarget>(true);
			for (int i = 0; i < componentsInChildren2.Length; i++)
			{
				Object.DestroyImmediate((Object)(object)((Component)componentsInChildren2[i]).gameObject);
			}
			Object.DestroyImmediate((Object)(object)DisplayPrefab.GetComponent<AimAnimator>());
			Object.DestroyImmediate((Object)(object)DisplayPrefab.GetComponent<FootstepHandler>());
			DisplayPrefab.GetComponent<CharacterModel>().body = null;
		}

		private static void CreateSurvivorDef()
		{
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			Survivor = ScriptableObject.CreateInstance<SurvivorDef>();
			Survivor.cachedName = "VoidLemurian";
			Survivor.bodyPrefab = BodyPrefab;
			Survivor.displayPrefab = DisplayPrefab;
			Survivor.displayNameToken = "VOIDLEMURIAN_NAME";
			Survivor.descriptionToken = "VOIDLEMURIAN_DESCRIPTION";
			Survivor.outroFlavorToken = "VOIDLEMURIAN_OUTRO_FLAVOR";
			Survivor.mainEndingEscapeFailureFlavorToken = "VOIDLEMURIAN_OUTRO_FAILURE";
			Survivor.primaryColor = VoidAssets.VoidPurple;
			Survivor.desiredSortPosition = 100f;
			ContentAddition.AddSurvivorDef(Survivor);
		}

		private static void CreateMaster()
		{
			MasterPrefab = PrefabAPI.InstantiateClone(Asset.Load<GameObject>("RoR2/Base/LemurianBruiser/LemurianBruiserMaster.prefab"), "VoidLemurianMonsterMaster", true);
			MasterPrefab.GetComponent<CharacterMaster>().bodyPrefab = BodyPrefab;
			ContentAddition.AddMaster(MasterPrefab);
		}
	}
	internal static class Tokens
	{
		public const string Prefix = "VOIDLEMURIAN_";

		public static void Register()
		{
			Add("NAME", "Void Lemurian");
			Add("SUBTITLE", "Elder of the Abyss");
			Add("DESCRIPTION", "The Void Lemurian is an Elder Lemurian that wandered into the Void and came back wrong, hungry for anything that still has a shape.<color=#CCD3E0>\n\n< ! > Void Bolt homes in on enemies, so keep firing while you reposition.\n\n< ! > Null Breath roots whole packs in place. Follow it with Event Horizon to finish them together.\n\n< ! > Void Rift makes you untargetable and cleanses debuffs. Use it to escape or to dive into a crowd.\n\n< ! > Hold Jump while falling to glide. Look up during Void Rift to rise.</color>\n");
			Add("LORE", "The survey drone recorded only static, then a shape: an elder lemurian with scales the colour of a bruise and a mouth full of violet light.\n\nIt did not hunt like the others of Petrichor V. It waited for the planet to open a door, and walked through.\n\nWhatever it once was, the Void has finished with it. Now it is only hunger.");
			Add("OUTRO_FLAVOR", "..and so it left, the hunger of the Void sated for now.");
			Add("OUTRO_FAILURE", "..and so it vanished, swallowed by the abyss it once called home.");
			Add("SKIN_ABYSS_NAME", "Abyssal");
			Add("SKIN_STARLESS_NAME", "Starless");
			Add("SKIN_ELDER_NAME", "Elder");
			Add("PASSIVE_NAME", "Devouring Abyss");
			Add("PASSIVE_DESCRIPTION", "Hits have a <style=cIsDamage>15%</style> chance to <style=cIsDamage>Collapse</style> enemies. Killing a Collapsed enemy <style=cIsHealing>heals 5% of your maximum health</style>. Hold <style=cIsUtility>Jump</style> while falling to <style=cIsUtility>glide</style>. Immune to the Void's atmosphere.");
			Add("PRIMARY_NAME", "Void Bolt");
			Add("PRIMARY_DESCRIPTION", "Spit a <style=cIsUtility>homing</style> void bolt for <style=cIsDamage>260% damage</style>.");
			Add("SECONDARY_NAME", "Null Breath");
			Add("SECONDARY_DESCRIPTION", "<style=cIsUtility>Nullifying</style>. Breathe a torrent of void flame that pierces enemies for <style=cIsDamage>1000% damage</style>.");
			Add("UTILITY_NAME", "Void Rift");
			Add("UTILITY_DESCRIPTION", "Dissolve into the Void and <style=cIsUtility>rift forward</style>, becoming <style=cIsUtility>intangible</style> and <style=cIsUtility>cleansing all debuffs</style>. Emerge in a <style=cIsUtility>Nullifying</style> burst for <style=cIsDamage>400% damage</style>.");
			Add("SPECIAL_NAME", "Event Horizon");
			Add("SPECIAL_DESCRIPTION", "Launch a void orb for <style=cIsDamage>300% damage</style> that tears open a <style=cIsUtility>singularity</style>. It drags enemies in for <style=cIsDamage>9x50% damage</style>, then implodes for <style=cIsDamage>1000% damage</style> and <style=cIsDamage>Collapses</style> everything caught.");
			Add("KEYWORD_NULLIFY", "<style=cKeywordName>Nullifying</style><style=cSub>Each hit adds a stack of Nullify. At 3 stacks the enemy is <style=cIsUtility>rooted</style>.</style>");
			Add("KEYWORD_COLLAPSE", "<style=cKeywordName>Collapse</style><style=cSub>After 3 seconds, deal <style=cIsDamage>400%</style> base damage. Stacks.</style>");
		}

		private static void Add(string key, string text)
		{
			LanguageAPI.Add("VOIDLEMURIAN_" + key, text);
		}
	}
	internal static class VoidAssets
	{
		private const string FlamebreathEsc = "RoR2/Base/LemurianBruiser/EntityStates.LemurianBruiserMonster.Flamebreath.asset";

		private const string BlinkEsc = "RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.VoidBlinkBase+VoidBlinkUp.asset";

		private const string BlasterSmallEsc = "RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.Weapon.FireMegaBlasterSmall.asset";

		private const string BlasterBigEsc = "RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.Weapon.FireMegaBlasterBig.asset";

		private const string ChargeBlasterEsc = "RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.Weapon.ChargeMegaBlaster.asset";

		private static readonly Color[] AbyssPalette = (Color[])(object)new Color[5]
		{
			new Color(0.02f, 0.01f, 0.04f),
			new Color(0.09f, 0.03f, 0.18f),
			new Color(0.24f, 0.08f, 0.42f),
			new Color(0.52f, 0.24f, 0.8f),
			new Color(0.93f, 0.78f, 1f)
		};

		private static readonly Color[] StarlessPalette = (Color[])(object)new Color[5]
		{
			new Color(0.01f, 0.01f, 0.02f),
			new Color(0.04f, 0.05f, 0.09f),
			new Color(0.13f, 0.15f, 0.25f),
			new Color(0.42f, 0.48f, 0.68f),
			new Color(0.92f, 0.96f, 1f)
		};

		public static readonly Color VoidPurple = new Color(0.62f, 0.22f, 1f);

		public static Material AbyssMaterial;

		public static Material StarlessMaterial;

		public static Material ElderMaterial;

		public static Texture2D Portrait;

		public static Sprite PassiveIcon;

		public static Sprite PrimaryIcon;

		public static Sprite SecondaryIcon;

		public static Sprite UtilityIcon;

		public static Sprite SpecialIcon;

		public static GameObject SurvivorPod;

		public static GameObject BreathEffect;

		public static GameObject BreathImpact;

		public static GameObject BlinkVfx;

		public static GameObject BlinkMuzzleflash;

		public static Material BlinkOverlay;

		public static GameObject RiftExplosion;

		public static GameObject BoltMuzzleflash;

		public static GameObject HorizonMuzzleflash;

		public static GameObject HorizonCharge;

		public static GameObject ImplodeEffect;

		public static string BreathStartSound;

		public static string BreathEndSound;

		public static string BlinkStartSound;

		public static string BlinkEndSound;

		public static string BoltSound;

		public static string HorizonChargeSound;

		public static string HorizonFireSound;

		public static void Init()
		{
			//IL_002a: 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_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			Material source = (ElderMaterial = Asset.Load<Material>("RoR2/Base/Lemurian/matLemurianBruiser.mat"));
			AbyssMaterial = MakeBodyMaterial(source, "matVoidLemurianAbyss", AbyssPalette, new Color(1.1f, 0.3f, 1.6f), Asset.Load<Texture>("RoR2/Base/Common/ColorRamps/texRampNullifier.png"));
			StarlessMaterial = MakeBodyMaterial(source, "matVoidLemurianStarless", StarlessPalette, new Color(0.55f, 1.1f, 1.6f), Asset.Load<Texture>("RoR2/DLC1/Common/ColorRamps/texRampVoidArenaShield.png"));
			Portrait = GradientMap(Asset.Load<Texture>("RoR2/Base/LemurianBruiser/LemurianBruiserBody.png"), AbyssPalette, 1.1f, mipChain: false);
			((Object)Portrait).name = "texVoidLemurianIcon";
			PrimaryIcon = SkillIcon("RoR2/DLC1/VoidSurvivor/ChargeMegaBlaster.asset");
			SecondaryIcon = SkillIcon("RoR2/DLC1/VoidSurvivor/FireHandBeam.asset");
			UtilityIcon = SkillIcon("RoR2/DLC1/VoidSurvivor/VoidBlinkUp.asset");
			SpecialIcon = SkillIcon("RoR2/DLC1/VoidSurvivor/FireCorruptDisk.asset");
			PassiveIcon = SkillIcon("RoR2/DLC1/VoidSurvivor/VoidSurvivorPassive.asset");
			SurvivorPod = Asset.Load<GameObject>("RoR2/DLC1/VoidSurvivor/VoidSurvivorPod.prefab");
			BreathEffect = ScalableClone(Asset.EscObject<GameObject>("RoR2/Base/LemurianBruiser/EntityStates.LemurianBruiserMonster.Flamebreath.asset", "flamethrowerEffectPrefab"), "VoidLemurianBreathEffect");
			Recolor(BreathEffect, Asset.Load<Texture>("RoR2/Base/Common/ColorRamps/texRampNullifier.png"), VoidPurple, new Color(0.85f, 0.55f, 1f));
			BreathImpact = Asset.Load<GameObject>("RoR2/DLC1/VoidSurvivor/VoidSurvivorBeamImpact.prefab");
			BreathStartSound = Asset.EscString("RoR2/Base/LemurianBruiser/EntityStates.LemurianBruiserMonster.Flamebreath.asset", "startAttackSoundString");
			BreathEndSound = Asset.EscString("RoR2/Base/LemurianBruiser/EntityStates.LemurianBruiserMonster.Flamebreath.asset", "endAttackSoundString");
			BlinkVfx = Asset.EscObject<GameObject>("RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.VoidBlinkBase+VoidBlinkUp.asset", "blinkVfxPrefab");
			BlinkMuzzleflash = Asset.EscObject<GameObject>("RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.VoidBlinkBase+VoidBlinkUp.asset", "blinkEffectPrefab");
			BlinkOverlay = Asset.EscObject<Material>("RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.VoidBlinkBase+VoidBlinkUp.asset", "overlayMaterial");
			BlinkStartSound = Asset.EscString("RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.VoidBlinkBase+VoidBlinkUp.asset", "beginSoundString");
			BlinkEndSound = Asset.EscString("RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.VoidBlinkBase+VoidBlinkUp.asset", "endSoundString");
			RiftExplosion = Asset.Load<GameObject>("RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterExplosion.prefab");
			BoltMuzzleflash = Asset.EscObject<GameObject>("RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.Weapon.FireMegaBlasterSmall.asset", "muzzleflashEffectPrefab");
			BoltSound = Asset.EscString("RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.Weapon.FireMegaBlasterSmall.asset", "attackSoundString");
			HorizonCharge = ScalableClone(Asset.EscObject<GameObject>("RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.Weapon.ChargeMegaBlaster.asset", "chargeEffectPrefab"), "VoidLemurianHorizonCharge");
			HorizonChargeSound = Asset.EscString("RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.Weapon.ChargeMegaBlaster.asset", "chargeSoundString");
			HorizonMuzzleflash = Asset.EscObject<GameObject>("RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.Weapon.FireMegaBlasterBig.asset", "muzzleflashEffectPrefab");
			HorizonFireSound = Asset.EscString("RoR2/DLC1/VoidSurvivor/EntityStates.VoidSurvivor.Weapon.FireMegaBlasterBig.asset", "attackSoundString");
			ImplodeEffect = Asset.Load<GameObject>("RoR2/DLC1/ElementalRingVoid/ElementalRingVoidImplodeEffect.prefab");
		}

		private static GameObject ScalableClone(GameObject prefab, string name)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = PrefabAPI.InstantiateClone(prefab, name, false);
			ParticleSystem[] componentsInChildren = val.GetComponentsInChildren<ParticleSystem>(true);
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				MainModule main = componentsInChildren[i].main;
				((MainModule)(ref main)).scalingMode = (ParticleSystemScalingMode)0;
			}
			return val;
		}

		private static Sprite SkillIcon(string skillDefKey)
		{
			SkillDef val = Asset.Load<SkillDef>(skillDefKey);
			if (!Object.op_Implicit((Object)(object)val))
			{
				return null;
			}
			return val.icon;
		}

		private static Material MakeBodyMaterial(Material source, string name, Color[] palette, Color emission, Texture fresnelRamp)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_0051: 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)
			Material val = new Material(source)
			{
				name = name
			};
			val.SetTexture("_MainTex", (Texture)(object)GradientMap(source.GetTexture("_MainTex"), palette, 1.5f, mipChain: true));
			val.SetTexture("_EmTex", (Texture)(object)Grayscale(source.GetTexture("_EmTex")));
			val.SetColor("_EmColor", emission);
			val.SetFloat("_EmPower", 2.2f);
			val.SetColor("_Color", Color.white);
			if (Object.op_Implicit((Object)(object)fresnelRamp))
			{
				val.SetTexture("_FresnelRamp", fresnelRamp);
				val.SetFloat("_FEON", 1f);
				val.EnableKeyword("FRESNEL_EMISSION");
				val.SetFloat("_FresnelPower", 1.6f);
				val.SetFloat("_FresnelBoost", 2f);
			}
			return val;
		}

		private static Texture2D ReadableCopy(Texture source, bool mipChain)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Expected O, but got Unknown
			RenderTexture temporary = RenderTexture.GetTemporary(source.width, source.height, 0, (RenderTextureFormat)0, (RenderTextureReadWrite)2);
			Graphics.Blit(source, temporary);
			RenderTexture active = RenderTexture.active;
			RenderTexture.active = temporary;
			Texture2D val = new Texture2D(source.width, source.height, (TextureFormat)4, mipChain, false);
			val.ReadPixels(new Rect(0f, 0f, (float)source.width, (float)source.height), 0, 0);
			RenderTexture.active = active;
			RenderTexture.ReleaseTemporary(temporary);
			return val;
		}

		private static Texture2D GradientMap(Texture source, Color[] palette, float contrast, bool mipChain)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: 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_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: 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_008e: 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_00a2: 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_00ca: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = ReadableCopy(source, mipChain);
			Color32[] pixels = val.GetPixels32();
			for (int i = 0; i < pixels.Length; i++)
			{
				Color32 val2 = pixels[i];
				float num = (0.299f * (float)(int)val2.r + 0.587f * (float)(int)val2.g + 0.114f * (float)(int)val2.b) / 255f;
				num = Mathf.Clamp01((num - 0.4f) * contrast + 0.4f);
				Color val3 = SamplePalette(palette, num);
				pixels[i] = new Color32((byte)(val3.r * 255f), (byte)(val3.g * 255f), (byte)(val3.b * 255f), val2.a);
			}
			val.SetPixels32(pixels);
			val.Apply(mipChain, false);
			((Texture)val).wrapMode = source.wrapMode;
			return val;
		}

		private static Texture2D Grayscale(Texture source)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: 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_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: 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)
			Texture2D val = ReadableCopy(source, mipChain: true);
			Color32[] pixels = val.GetPixels32();
			for (int i = 0; i < pixels.Length; i++)
			{
				Color32 val2 = pixels[i];
				byte b = (byte)Mathf.Max((int)val2.r, Mathf.Max((int)val2.g, (int)val2.b));
				pixels[i] = new Color32(b, b, b, val2.a);
			}
			val.SetPixels32(pixels);
			val.Apply(true, true);
			return val;
		}

		private static Color SamplePalette(Color[] palette, float t)
		{
			//IL_0018: 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_002a: Unknown result type (might be due to invalid IL or missing references)
			float num = t * (float)(palette.Length - 1);
			int num2 = Mathf.Min((int)num, palette.Length - 2);
			return Color.Lerp(palette[num2], palette[num2 + 1], num - (float)num2);
		}

		public static void Recolor(GameObject root, Texture ramp, Color tint, Color remapTint)
		{
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: 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_00d9: 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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Invalid comparison between Unknown and I4
			//IL_00e4: 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)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: 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)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			Dictionary<Material, Material> dictionary = new Dictionary<Material, Material>();
			Renderer[] componentsInChildren = root.GetComponentsInChildren<Renderer>(true);
			foreach (Renderer val in componentsInChildren)
			{
				Material[] sharedMaterials = val.sharedMaterials;
				for (int j = 0; j < sharedMaterials.Length; j++)
				{
					Material val2 = sharedMaterials[j];
					if (Object.op_Implicit((Object)(object)val2))
					{
						if (!dictionary.TryGetValue(val2, out var value))
						{
							value = (dictionary[val2] = RecolorMaterial(val2, ramp, tint, remapTint));
						}
						sharedMaterials[j] = value;
					}
				}
				val.sharedMaterials = sharedMaterials;
			}
			ParticleSystem[] componentsInChildren2 = root.GetComponentsInChildren<ParticleSystem>(true);
			foreach (ParticleSystem val4 in componentsInChildren2)
			{
				ParticleSystemRenderer component = ((Component)val4).GetComponent<ParticleSystemRenderer>();
				if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)((Renderer)component).sharedMaterial) || !((Renderer)component).sharedMaterial.HasProperty("_RemapTex"))
				{
					MainModule main = val4.main;
					MinMaxGradient startColor = ((MainModule)(ref main)).startColor;
					if ((int)((MinMaxGradient)(ref startColor)).mode == 0)
					{
						((MinMaxGradient)(ref startColor)).color = Retint(((MinMaxGradient)(ref startColor)).color, tint);
					}
					else if ((int)((MinMaxGradient)(ref startColor)).mode == 2)
					{
						((MinMaxGradient)(ref startColor)).colorMin = Retint(((MinMaxGradient)(ref startColor)).colorMin, tint);
						((MinMaxGradient)(ref startColor)).colorMax = Retint(((MinMaxGradient)(ref startColor)).colorMax, tint);
					}
					((MainModule)(ref main)).startColor = startColor;
				}
			}
			Light[] componentsInChildren3 = root.GetComponentsInChildren<Light>(true);
			for (int i = 0; i < componentsInChildren3.Length; i++)
			{
				componentsInChildren3[i].color = tint;
			}
		}

		private static Material RecolorMaterial(Material material, Texture ramp, Color tint, Color remapTint)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: 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_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: 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_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			if (((Object)material.shader).name.Contains("Distortion"))
			{
				return material;
			}
			Material val = new Material(material)
			{
				name = ((Object)material).name + "VoidLemurian"
			};
			if (Object.op_Implicit((Object)(object)ramp) && val.HasProperty("_RemapTex"))
			{
				val.SetTexture("_RemapTex", ramp);
				if (val.HasProperty("_TintColor"))
				{
					Color color = val.GetColor("_TintColor");
					val.SetColor("_TintColor", new Color(color.r * remapTint.r, color.g * remapTint.g, color.b * remapTint.b, color.a));
				}
				return val;
			}
			string[] array = new string[2] { "_TintColor", "_Color" };
			foreach (string text in array)
			{
				if (val.HasProperty(text) && IsColorful(val.GetColor(text)))
				{
					val.SetColor(text, Retint(val.GetColor(text), tint));
				}
			}
			return val;
		}

		private static bool IsColorful(Color c)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: 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_0037: 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)
			return Mathf.Max(new float[3] { c.r, c.g, c.b }) - Mathf.Min(new float[3] { c.r, c.g, c.b }) > 0.15f;
		}

		private static Color Retint(Color c, Color tint)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: 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_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: 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)
			float num = Mathf.Max(new float[3] { c.r, c.g, c.b });
			return new Color(tint.r * num, tint.g * num, tint.b * num, c.a);
		}
	}
	[BepInPlugin("com.VoidLemurian", "VoidLemurian", "1.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class VoidLemurianPlugin : BaseUnityPlugin
	{
		public const string PluginGUID = "com.VoidLemurian";

		public const string PluginName = "VoidLemurian";

		public const string PluginVersion = "1.0.0";

		internal static ManualLogSource Log;

		internal static ConfigEntry<float> BodySize;

		private void Awake()
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Expected O, but got Unknown
			Log = ((BaseUnityPlugin)this).Logger;
			BodySize = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Body size", 0.4f, new ConfigDescription("Size relative to a vanilla Elder Lemurian. Every player in a lobby needs the same value.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.25f, 0.8f), Array.Empty<object>()));
			Tokens.Register();
			VoidAssets.Init();
			LemurianProjectiles.Create();
			LemurianSurvivor.Create();
			LemurianPassive.Hook();
		}
	}
}
namespace VoidLemurian.States
{
	public class ChargeEventHorizon : LemurianSkillState
	{
		public static float baseDuration = 0.8f;

		public static float chargeEffectScale = 2.5f;

		private float duration;

		private GameObject chargeInstance;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			((BaseState)this).StartAimMode(duration + 1f, false);
			((EntityState)this).PlayCrossfade("Gesture, Additive", "ChargeMegaFireball", "ChargeMegaFireball.playbackRate", duration, 0.1f);
			Util.PlaySound(VoidAssets.HorizonChargeSound, ((EntityState)this).gameObject);
			chargeInstance = SpawnAtMouth(VoidAssets.HorizonCharge, chargeEffectScale);
		}

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

		public override void OnExit()
		{
			if (Object.op_Implicit((Object)(object)chargeInstance))
			{
				EntityState.Destroy((Object)(object)chargeInstance);
			}
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class FireEventHorizon : LemurianSkillState
	{
		public static float baseDuration = 0.6f;

		public static float selfKnockback = 1500f;

		private float duration;

		public override void OnEnter()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			Ray mouthAimRay = GetMouthAimRay();
			((BaseState)this).StartAimMode(2f, false);
			((EntityState)this).PlayAnimation("Gesture, Additive", "FireMegaFireball", "FireMegaFireball.playbackRate", duration * 1.5f, 0f);
			Util.PlaySound(VoidAssets.HorizonFireSound, ((EntityState)this).gameObject);
			EffectManager.SimpleMuzzleFlash(VoidAssets.HorizonMuzzleflash, ((EntityState)this).gameObject, "MuzzleMouth", false);
			((BaseState)this).AddRecoil(-3f, -4f, -1f, 1f);
			if (((EntityState)this).isAuthority)
			{
				ProjectileManager.instance.FireProjectile(new FireProjectileInfo
				{
					projectilePrefab = LemurianProjectiles.HorizonOrb,
					position = ((Ray)(ref mouthAimRay)).origin,
					rotation = Util.QuaternionSafeLookRotation(((Ray)(ref mouthAimRay)).direction),
					owner = ((EntityState)this).gameObject,
					damage = ((BaseState)this).damageStat * 3f,
					force = 2000f,
					crit = ((BaseState)this).RollCrit()
				});
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
				{
					((EntityState)this).characterMotor.ApplyForce(-((Ray)(ref mouthAimRay)).direction * selfKnockback, true, false);
				}
			}
		}

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class FireVoidBolt : LemurianSkillState
	{
		public static float baseDuration = 0.45f;

		public static float damageCoefficient = 2.6f;

		public static float force = 300f;

		private float duration;

		public override void OnEnter()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: 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_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			Ray mouthAimRay = GetMouthAimRay();
			((BaseState)this).StartAimMode(2f, false);
			((EntityState)this).PlayAnimation("Gesture, Additive", "FireMegaFireball", "FireMegaFireball.playbackRate", duration, 0f);
			Util.PlaySound(VoidAssets.BoltSound, ((EntityState)this).gameObject);
			EffectManager.SimpleMuzzleFlash(VoidAssets.BoltMuzzleflash, ((EntityState)this).gameObject, "MuzzleMouth", false);
			((BaseState)this).AddRecoil(-0.6f, -1f, -0.3f, 0.3f);
			((EntityState)this).characterBody.AddSpreadBloom(0.3f);
			if (((EntityState)this).isAuthority)
			{
				ProjectileManager.instance.FireProjectile(new FireProjectileInfo
				{
					projectilePrefab = LemurianProjectiles.VoidBolt,
					position = ((Ray)(ref mouthAimRay)).origin,
					rotation = Util.QuaternionSafeLookRotation(((Ray)(ref mouthAimRay)).direction),
					owner = ((EntityState)this).gameObject,
					damage = ((BaseState)this).damageStat * damageCoefficient,
					force = force,
					crit = ((BaseState)this).RollCrit()
				});
			}
		}

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	public abstract class LemurianSkillState : BaseSkillState
	{
		public const string MouthMuzzle = "MuzzleMouth";

		private const float MaxAimDistance = 1000f;

		protected Ray GetMouthAimRay()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: 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_005f: 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_0074: 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_007b: 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_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: 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_00ad: 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)
			Ray aimRay = ((BaseState)this).GetAimRay();
			Transform val = ((BaseState)this).FindModelChild("MuzzleMouth");
			if (!Object.op_Implicit((Object)(object)val))
			{
				return aimRay;
			}
			Vector3 point = ((Ray)(ref aimRay)).GetPoint(1000f);
			GameObject gameObject = ((EntityState)this).gameObject;
			Ray val2 = aimRay;
			LayerIndex val3 = LayerIndex.world;
			int num = LayerMask.op_Implicit(((LayerIndex)(ref val3)).mask);
			val3 = LayerIndex.entityPrecise;
			RaycastHit val4 = default(RaycastHit);
			if (Util.CharacterRaycast(gameObject, val2, ref val4, 1000f, LayerMask.op_Implicit(num | LayerMask.op_Implicit(((LayerIndex)(ref val3)).mask)), (QueryTriggerInteraction)1))
			{
				point = ((RaycastHit)(ref val4)).point;
			}
			Vector3 val5 = point - val.position;
			if (Vector3.Dot(val5, ((Ray)(ref aimRay)).direction) <= 0f)
			{
				val5 = ((Ray)(ref aimRay)).direction;
			}
			return new Ray(val.position, ((Vector3)(ref val5)).normalized);
		}

		protected GameObject SpawnAtMouth(GameObject prefab, float worldScale)
		{
			//IL_0020: 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_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			Transform val = ((BaseState)this).FindModelChild("MuzzleMouth");
			if (!Object.op_Implicit((Object)(object)prefab) || !Object.op_Implicit((Object)(object)val))
			{
				return null;
			}
			GameObject obj = Object.Instantiate<GameObject>(prefab, val.position, val.rotation);
			obj.transform.localScale = Vector3.one * worldScale;
			obj.AddComponent<FollowTransform>().target = val;
			return obj;
		}
	}
	public class FollowTransform : MonoBehaviour
	{
		public Transform target;

		public bool copyRotation;

		private void LateUpdate()
		{
			//IL_001a: 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)
			if (Object.op_Implicit((Object)(object)target))
			{
				((Component)this).transform.position = target.position;
				if (copyRotation)
				{
					((Component)this).transform.rotation = target.rotation;
				}
			}
		}
	}
	public class NullBreath : LemurianSkillState
	{
		public static float baseEntryDuration = 0.25f;

		public static float baseExitDuration = 0.4f;

		public static float breathDuration = 1.6f;

		public static float totalDamageCoefficient = 10f;

		public static float tickFrequency = 8f;

		public static float procCoefficientPerTick = 0.5f;

		public static float maxDistance = 26f;

		public static float radius = 3.5f;

		public static float force = 100f;

		public static float effectScale = 1.5f;

		private float entryDuration;

		private float exitDuration;

		private float tickDamageCoefficient;

		private float tickTimer;

		private bool breathing;

		private bool finishedBreathing;

		private bool isCrit;

		private GameObject breathInstance;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			entryDuration = baseEntryDuration / ((BaseState)this).attackSpeedStat;
			exitDuration = baseExitDuration / ((BaseState)this).attackSpeedStat;
			tickDamageCoefficient = totalDamageCoefficient / (float)Mathf.Max(1, Mathf.RoundToInt(breathDuration * tickFrequency));
			((EntityState)this).characterBody.SetAimTimer(entryDuration + breathDuration + 1f);
			isCrit = ((BaseState)this).RollCrit();
			((EntityState)this).PlayAnimation("Gesture, Override", "PrepFlamebreath", "PrepFlamebreath.playbackRate", entryDuration, 0f);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (!breathing && !finishedBreathing && ((EntityState)this).fixedAge >= entryDuration)
			{
				StartBreathing();
			}
			if (breathing)
			{
				tickTimer -= ((EntityState)this).GetDeltaTime();
				if (tickTimer <= 0f)
				{
					tickTimer += 1f / tickFrequency;
					FireTick();
				}
				if (((EntityState)this).fixedAge >= entryDuration + breathDuration)
				{
					StopBreathing();
				}
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= entryDuration + breathDuration + exitDuration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void Update()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).Update();
			if (Object.op_Implicit((Object)(object)breathInstance))
			{
				Transform transform = breathInstance.transform;
				Ray aimRay = ((BaseState)this).GetAimRay();
				transform.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction);
			}
		}

		private void StartBreathing()
		{
			breathing = true;
			tickTimer = 0f;
			Util.PlaySound(VoidAssets.BreathStartSound, ((EntityState)this).gameObject);
			((EntityState)this).PlayAnimation("Gesture, Override", "Flamebreath", "Flamebreath.playbackRate", breathDuration, 0f);
			breathInstance = SpawnAtMouth(VoidAssets.BreathEffect, effectScale);
			ScaleParticleSystemDuration val = (Object.op_Implicit((Object)(object)breathInstance) ? breathInstance.GetComponent<ScaleParticleSystemDuration>() : null);
			if (Object.op_Implicit((Object)(object)val))
			{
				val.newDuration = breathDuration;
			}
		}

		private void StopBreathing()
		{
			breathing = false;
			finishedBreathing = true;
			Util.PlaySound(VoidAssets.BreathEndSound, ((EntityState)this).gameObject);
			((EntityState)this).PlayCrossfade("Gesture, Override", "ExitFlamebreath", "ExitFlamebreath.playbackRate", exitDuration, 0.1f);
			DestroyBreath();
		}

		private void FireTick()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: 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_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: 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_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: 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_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			if (((EntityState)this).isAuthority)
			{
				Ray mouthAimRay = GetMouthAimRay();
				BulletAttack val = new BulletAttack
				{
					owner = ((EntityState)this).gameObject,
					weapon = ((EntityState)this).gameObject,
					origin = ((Ray)(ref mouthAimRay)).origin,
					aimVector = ((Ray)(ref mouthAimRay)).direction,
					minSpread = 0f,
					maxSpread = 2f,
					damage = tickDamageCoefficient * ((BaseState)this).damageStat,
					force = force,
					muzzleName = "MuzzleMouth",
					hitEffectPrefab = VoidAssets.BreathImpact,
					isCrit = isCrit,
					radius = radius,
					falloffModel = (FalloffModel)0
				};
				LayerIndex world = LayerIndex.world;
				val.stopperMask = ((LayerIndex)(ref world)).mask;
				val.procCoefficient = procCoefficientPerTick;
				val.maxDistance = maxDistance;
				val.smartCollision = true;
				val.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32768), (DamageTypeExtended)0, (DamageSource)2);
				val.damageColorIndex = (DamageColorIndex)9;
				val.Fire();
			}
		}

		private void DestroyBreath()
		{
			if (Object.op_Implicit((Object)(object)breathInstance))
			{
				EntityState.Destroy((Object)(object)breathInstance);
				breathInstance = null;
			}
		}

		public override void OnExit()
		{
			if (breathing)
			{
				Util.PlaySound(VoidAssets.BreathEndSound, ((EntityState)this).gameObject);
			}
			((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.1f);
			DestroyBreath();
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class VoidLemurianMain : GenericCharacterMain
	{
		public static float glideFallSpeed = 4.5f;

		public static float glideBraking = 40f;

		public override void FixedUpdate()
		{
			((GenericCharacterMain)this).FixedUpdate();
			if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((EntityState)this).inputBank.jump.down && !((EntityState)this).characterMotor.isGrounded && ((EntityState)this).characterMotor.velocity.y < 0f - glideFallSpeed)
			{
				((EntityState)this).characterMotor.velocity.y = Mathf.MoveTowards(((EntityState)this).characterMotor.velocity.y, 0f - glideFallSpeed, glideBraking * ((EntityState)this).GetDeltaTime());
			}
		}
	}
	public class VoidRift : BaseState
	{
		public static float duration = 0.35f;

		public static float speed = 55f;

		public static float blastRadius = 9f;

		public static float blastDamageCoefficient = 4f;

		public static float blastForce = 800f;

		public static float vfxScale = 2.2f;

		private Vector3 dashDirection;

		private Vector3 facing;

		private Transform modelTransform;

		private CharacterModel characterModel;

		private HurtBoxGroup hurtBoxGroup;

		private GameObject vfxInstance;

		private uint loopSoundId;

		public override void OnEnter()
		{
			//IL_0036: 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_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			loopSoundId = Util.PlaySound(VoidAssets.BlinkStartSound, ((EntityState)this).gameObject);
			Vector3 val = (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) ? ((EntityState)this).inputBank.moveVector : Vector3.zero);
			facing = ((((Vector3)(ref val)).sqrMagnitude > 0.01f) ? ((Vector3)(ref val)).normalized : (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).transform.forward));
			facing.y = 0f;
			((Vector3)(ref facing)).Normalize();
			float num = (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) ? Mathf.Max(0f, ((EntityState)this).inputBank.aimDirection.y) : 0f);
			Vector3 val2 = facing + Vector3.up * (0.15f + num);
			dashDirection = ((Vector3)(ref val2)).normalized;
			modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				characterModel = ((Component)modelTransform).GetComponent<CharacterModel>();
				hurtBoxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>();
			}
			if (Object.op_Implicit((Object)(object)characterModel))
			{
				CharacterModel obj = characterModel;
				int invisibilityCount = obj.invisibilityCount;
				obj.invisibilityCount = invisibilityCount + 1;
			}
			if (Object.op_Implicit((Object)(object)hurtBoxGroup))
			{
				HurtBoxGroup obj2 = hurtBoxGroup;
				int invisibilityCount = obj2.hurtBoxesDeactivatorCounter;
				obj2.hurtBoxesDeactivatorCounter = invisibilityCount + 1;
			}
			CharacterBody characterBody = ((EntityState)this).characterBody;
			characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1);
			if (NetworkServer.active)
			{
				CleanseSystem.CleanseBodyServer(((EntityState)this).characterBody, true, false, false, true, true, false);
			}
			if (Object.op_Implicit((Object)(object)VoidAssets.BlinkVfx))
			{
				vfxInstance = Object.Instantiate<GameObject>(VoidAssets.BlinkVfx, ((EntityState)this).transform);
				vfxInstance.transform.localScale = Vector3.one * vfxScale;
			}
			SpawnBlinkEffect();
		}

		public override void FixedUpdate()
		{
			//IL_002f: 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)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
				((EntityState)this).characterMotor.velocity = dashDirection * speed;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterDirection.forward = facing;
			}
			if (Object.op_Implicit((Object)(object)vfxInstance))
			{
				vfxInstance.transform.forward = dashDirection;
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			//IL_0051: 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_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: 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_00d6: Unknown result type (might be due to invalid IL or missing references)
			AkSoundEngine.StopPlayingID(loopSoundId);
			if (!((EntityState)this).outer.destroying)
			{
				Util.PlaySound(VoidAssets.BlinkEndSound, ((EntityState)this).gameObject);
				SpawnBlinkEffect();
				if (((EntityState)this).isAuthority)
				{
					Burst();
				}
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
				{
					CharacterMotor characterMotor = ((EntityState)this).characterMotor;
					characterMotor.velocity *= 0.2f;
				}
				AddExitOverlay();
			}
			if (Object.op_Implicit((Object)(object)vfxInstance))
			{
				VfxKillBehavior.KillVfxObject(vfxInstance);
			}
			if (Object.op_Implicit((Object)(object)characterModel))
			{
				CharacterModel obj = characterModel;
				int invisibilityCount = obj.invisibilityCount;
				obj.invisibilityCount = invisibilityCount - 1;
			}
			if (Object.op_Implicit((Object)(object)hurtBoxGroup))
			{
				HurtBoxGroup obj2 = hurtBoxGroup;
				int invisibilityCount = obj2.hurtBoxesDeactivatorCounter;
				obj2.hurtBoxesDeactivatorCounter = invisibilityCount - 1;
			}
			CharacterBody characterBody = ((EntityState)this).characterBody;
			characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2);
			((EntityState)this).OnExit();
		}

		private void SpawnBlinkEffect()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//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_0032: Expected O, but got Unknown
			EffectManager.SpawnEffect(VoidAssets.BlinkMuzzleflash, new EffectData
			{
				origin = Util.GetCorePosition(((EntityState)this).gameObject),
				rotation = Util.QuaternionSafeLookRotation(dashDirection)
			}, false);
		}

		private void Burst()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: 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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: 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_0059: 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_0070: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: 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_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: 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_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Expected O, but got Unknown
			Vector3 corePosition = Util.GetCorePosition(((EntityState)this).gameObject);
			new BlastAttack
			{
				attacker = ((EntityState)this).gameObject,
				inflictor = ((EntityState)this).gameObject,
				teamIndex = ((BaseState)this).GetTeam(),
				position = corePosition,
				radius = blastRadius,
				baseDamage = base.damageStat * blastDamageCoefficient,
				baseForce = blastForce,
				crit = ((BaseState)this).RollCrit(),
				damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32768), (DamageTypeExtended)0, (DamageSource)4),
				damageColorIndex = (DamageColorIndex)9,
				falloffModel = (FalloffModel)0,
				procCoefficient = 1f,
				attackerFiltering = (AttackerFiltering)2
			}.Fire();
			EffectManager.SpawnEffect(VoidAssets.RiftExplosion, new EffectData
			{
				origin = corePosition,
				scale = blastRadius
			}, true);
		}

		private void AddExitOverlay()
		{
			if (Object.op_Implicit((Object)(object)modelTransform) && Object.op_Implicit((Object)(object)characterModel) && Object.op_Implicit((Object)(object)VoidAssets.BlinkOverlay))
			{
				TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject);
				obj.duration = 0.4f;
				obj.animateShaderAlpha = true;
				obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
				obj.destroyComponentOnEnd = true;
				obj.originalMaterial = VoidAssets.BlinkOverlay;
				obj.AddToCharacterModel(characterModel);
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
}