Decompiled source of Spikestrip2 0 v1.2.1

plugins/Spikestrip2_0/Spikestrip2_0.dll

Decompiled 8 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Cryptography;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.Captain.Weapon;
using EntityStates.Commando.CommandoWeapon;
using EntityStates.Destructible;
using EntityStates.LunarGolem;
using EntityStates.Mage.Weapon;
using EntityStates.Railgunner.Reload;
using EntityStates.Railgunner.Scope;
using EntityStates.Railgunner.Weapon;
using GrooveSaladSpikestripContent;
using GrooveSaladSpikestripContent.Content;
using HG;
using HG.Reflection;
using IL.RoR2;
using JetBrains.Annotations;
using KinematicCharacterController;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MysticsItems.Items;
using NoopSpikestripContent.Utils;
using On.RoR2;
using On.RoR2.CharacterAI;
using On.RoR2.PostProcessing;
using On.RoR2.Projectile;
using On.RoR2.UI;
using On.RoR2.UI.LogBook;
using PlasmaCoreSpikestripContent.Components;
using PlasmaCoreSpikestripContent.Content.Elites;
using PlasmaCoreSpikestripContent.Content.Equipment;
using PlasmaCoreSpikestripContent.Content.Interactibles;
using PlasmaCoreSpikestripContent.Content.Items;
using PlasmaCoreSpikestripContent.Content.Monsters.States;
using PlasmaCoreSpikestripContent.Content.Skills;
using PlasmaCoreSpikestripContent.Content.Skills.States;
using PlasmaCoreSpikestripContent.Core;
using PlasmaCoreSpikestripContent.Misc;
using PlasmaCoreSpikestripContent.Networking;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.ScriptableObjects;
using R2API.Utils;
using Rewired.ComponentControls.Effects;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.EntitlementManagement;
using RoR2.ExpansionManagement;
using RoR2.Hologram;
using RoR2.Navigation;
using RoR2.Orbs;
using RoR2.PostProcessing;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using Spikestrip2_0;
using Spikestrip2_0.Core;
using TMPro;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: OptIn]
[assembly: NetworkCompatibility(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Spikestrip2_0")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+3500b6cf78c80f21e3824adafa3d2d7fb7181e8e")]
[assembly: AssemblyProduct("Spikestrip2_0")]
[assembly: AssemblyTitle("Spikestrip2_0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[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;
		}
	}
}
public class ChokeProjectileImpactExplosionTagger : MonoBehaviour, IProjectileImpactBehavior
{
	public float radius = 6f;

	public void OnProjectileImpact(ProjectileImpactInfo impactInfo)
	{
		//IL_0091: 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_0155: Unknown result type (might be due to invalid IL or missing references)
		ProjectileController component = ((Component)this).GetComponent<ProjectileController>();
		ChokeMainZone chokeMainZone = null;
		foreach (ChokeMainZone instance in ChokeMainZone.instances)
		{
			if (Object.op_Implicit((Object)(object)instance.attackerBody) && (Object)(object)((Component)instance.attackerBody).gameObject == (Object)(object)component.owner)
			{
				chokeMainZone = instance;
				break;
			}
		}
		if (!Object.op_Implicit((Object)(object)chokeMainZone))
		{
			return;
		}
		Collider[] array = Physics.OverlapSphere(((Component)this).gameObject.transform.position, radius, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask));
		for (int i = 0; i < array.Length; i++)
		{
			HurtBox component2 = ((Component)array[i]).GetComponent<HurtBox>();
			if (!Object.op_Implicit((Object)(object)component2))
			{
				continue;
			}
			HealthComponent healthComponent = component2.healthComponent;
			if (Object.op_Implicit((Object)(object)healthComponent))
			{
				if (Object.op_Implicit((Object)(object)component.owner) && (Object)(object)((Component)healthComponent).gameObject == (Object)(object)component.owner)
				{
					chokeMainZone.forceTargets.Add(healthComponent);
					healthComponent.body.AddTimedBuff(MageChokeArea.scriptableObject.buffs[1], 10f);
				}
				else if (FriendlyFireManager.ShouldSplashHitProceed(healthComponent, component.teamFilter.teamIndex))
				{
					chokeMainZone.forceTargets.Add(healthComponent);
					healthComponent.body.AddTimedBuff(MageChokeArea.scriptableObject.buffs[1], 10f);
				}
			}
		}
	}
}
public class LoadMaterialFromAdress : MonoBehaviour
{
	public CharacterModel targetCharacterModel;

	public Renderer targetRenderer;

	public string[] matAddresses;

	public UnityEvent action;

	public ParticleSystemRenderer targetTrail;

	private void Awake()
	{
		if (Object.op_Implicit((Object)(object)targetTrail))
		{
			targetTrail.trailMaterial = SpikestripUtil.AddressablesLoad<Material>(matAddresses[0]);
		}
		if (Object.op_Implicit((Object)(object)targetCharacterModel))
		{
			for (int i = 0; i < matAddresses.Length && i < targetCharacterModel.baseRendererInfos.Length; i++)
			{
				targetCharacterModel.baseRendererInfos[i].defaultMaterial = SpikestripUtil.AddressablesLoad<Material>(matAddresses[i]);
			}
		}
		if (Object.op_Implicit((Object)(object)targetRenderer))
		{
			List<Material> list = new List<Material>();
			for (int num = matAddresses.Length - 1; num >= 0; num--)
			{
				list.Add(SpikestripUtil.AddressablesLoad<Material>(matAddresses[num]));
			}
			RendererSetMaterialsExtension.SetMaterials(targetRenderer, list);
		}
		action.Invoke();
	}
}
public class PlasmaCore : MonoBehaviour
{
	private void Start()
	{
	}

	private void Update()
	{
	}
}
[RequireComponent(typeof(ProjectileController))]
public class ProjectileImpactSpawner : MonoBehaviour, IProjectileImpactBehavior
{
	public GameObject prefab;

	public bool useRotation;

	public void OnProjectileImpact(ProjectileImpactInfo impactInfo)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: 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)
		//IL_0065: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0084: Unknown result type (might be due to invalid IL or missing references)
		if (NetworkServer.active)
		{
			Quaternion val = Quaternion.identity;
			if (useRotation)
			{
				val = ((Component)this).transform.rotation;
			}
			ProjectileController component = ((Component)this).GetComponent<ProjectileController>();
			ProjectileDamage component2 = ((Component)this).GetComponent<ProjectileDamage>();
			if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component))
			{
				ProjectileManager.instance.FireProjectile(prefab, ((Component)this).transform.position, val, component.owner, component2.damage, component2.force, component2.crit, component2.damageColorIndex, (GameObject)null, -1f, (DamageTypeCombo?)null);
			}
		}
	}
}
namespace PlasmaCoreSpikestripContent.Networking
{
	public class IFSACtivateEquipmentNetworkMessage : INetMessage, ISerializableObject
	{
		public NetworkIdentity targeterInstance;

		public bool isValid;

		public void Deserialize(NetworkReader reader)
		{
			isValid = reader.ReadBoolean();
			targeterInstance = reader.ReadNetworkIdentity();
		}

		public void OnReceived()
		{
			if (NetworkServer.active && (Object)(object)targeterInstance != (Object)null && Object.op_Implicit((Object)(object)((Component)targeterInstance).GetComponent<ImpulseFrostShield.ImpulseFrostTargeter>()))
			{
				ImpulseFrostShield.ImpulseFrostTargeter component = ((Component)targeterInstance).GetComponent<ImpulseFrostShield.ImpulseFrostTargeter>();
				component.targetIsValid = isValid;
				component.forceTargetIsValid = isValid;
				((Component)targeterInstance).GetComponent<EquipmentSlot>().ExecuteIfReady();
			}
		}

		public void Serialize(NetworkWriter writer)
		{
			writer.Write(isValid);
			writer.Write(targeterInstance);
		}
	}
	public class IFSClientTargetRequestNetworkMessage : INetMessage, ISerializableObject
	{
		public NetworkIdentity targeterInstance;

		public GameObject bodyGameObject;

		public void Deserialize(NetworkReader reader)
		{
			bodyGameObject = reader.ReadGameObject();
			targeterInstance = reader.ReadNetworkIdentity();
		}

		public void OnReceived()
		{
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Expected O, but got Unknown
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Expected O, but got Unknown
			if (NetworkServer.active)
			{
				if (Object.op_Implicit((Object)(object)bodyGameObject))
				{
					NetMessageExtensions.Send((INetMessage)new IFSTargetConfirmRequestNetworkMessage
					{
						targeterInstance = targeterInstance,
						isValid = (Reflection.GetFieldValue<float>((object)bodyGameObject.GetComponent<CharacterBody>(), "outOfCombatStopwatch") <= 0.75f)
					}, (NetworkDestination)1);
				}
				else
				{
					NetMessageExtensions.Send((INetMessage)new IFSTargetConfirmRequestNetworkMessage
					{
						targeterInstance = targeterInstance,
						isValid = false
					}, (NetworkDestination)1);
				}
			}
		}

		public void Serialize(NetworkWriter writer)
		{
			writer.Write(bodyGameObject);
			writer.Write(targeterInstance);
		}
	}
	public class IFSTargetConfirmRequestNetworkMessage : INetMessage, ISerializableObject
	{
		public NetworkIdentity targeterInstance;

		public bool isValid;

		public void Deserialize(NetworkReader reader)
		{
			isValid = reader.ReadBoolean();
			targeterInstance = reader.ReadNetworkIdentity();
		}

		public void OnReceived()
		{
			if (!NetworkServer.active && (Object)(object)targeterInstance != (Object)null && Object.op_Implicit((Object)(object)((Component)targeterInstance).GetComponent<ImpulseFrostShield.ImpulseFrostTargeter>()))
			{
				((Component)targeterInstance).GetComponent<ImpulseFrostShield.ImpulseFrostTargeter>().targetIsValid = isValid;
			}
		}

		public void Serialize(NetworkWriter writer)
		{
			writer.Write(isValid);
			writer.Write(targeterInstance);
		}
	}
}
namespace PlasmaCoreSpikestripContent.Misc
{
	public class ApplyWeaveDebuffNetworkMessage : INetMessage, ISerializableObject
	{
		public GameObject attacker;

		public GameObject target;

		public float damage;

		public void Deserialize(NetworkReader reader)
		{
			attacker = reader.ReadGameObject();
			target = reader.ReadGameObject();
			damage = reader.ReadSingle();
		}

		public void OnReceived()
		{
			//IL_00d1: 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)
			if (!NetworkServer.active)
			{
				return;
			}
			CharacterBody component = target.GetComponent<CharacterBody>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				return;
			}
			List<HealthComponent> list = new List<HealthComponent>(0);
			foreach (HurtBox readOnlyBullseyes in HurtBox.readOnlyBullseyesList)
			{
				if (Object.op_Implicit((Object)(object)readOnlyBullseyes.healthComponent) && (Object)(object)readOnlyBullseyes.healthComponent != (Object)(object)component.healthComponent && readOnlyBullseyes.healthComponent.body.HasBuff(Weave.scriptableObject.buffs[0]) && !list.Contains(readOnlyBullseyes.healthComponent))
				{
					WeaveOrb weaveOrb = new WeaveOrb();
					weaveOrb.damage = damage;
					((Orb)weaveOrb).origin = target.transform.position;
					((Orb)weaveOrb).target = readOnlyBullseyes;
					weaveOrb.attackerBody = attacker.GetComponent<CharacterBody>();
					OrbManager.instance.AddOrb((Orb)(object)weaveOrb);
					list.Add(readOnlyBullseyes.healthComponent);
				}
			}
			component.AddTimedBuff(Weave.scriptableObject.buffs[0], 4f);
		}

		public void Serialize(NetworkWriter writer)
		{
			writer.Write(attacker);
			writer.Write(target);
			writer.Write(damage);
		}
	}
	public class ChokeOrb : Orb
	{
		public static float damageCoef = 1.5f;

		public static float baseForce = 1f;

		public static float massForceBonusMult = 2f;

		public List<HurtBox> futureTargets;

		public ChokeMainZone chokeMainZone;

		public override void Begin()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: 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_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: 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_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)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Expected O, but got Unknown
			((Orb)this).duration = 0.2f;
			EffectData val = new EffectData
			{
				scale = 1f,
				origin = base.origin,
				start = base.origin,
				rotation = Util.QuaternionSafeLookRotation(((Component)base.target).transform.position - base.origin),
				genericFloat = ((Orb)this).duration
			};
			val.SetHurtBoxReference(base.target);
			EffectManager.SpawnEffect(MageChokeArea.scriptableObject.Effects[0], val, true);
			((Orb)this).Begin();
		}

		public override void OnArrival()
		{
			//IL_053b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0540: 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_00be: 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_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025a: Unknown result type (might be due to invalid IL or missing references)
			//IL_027e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0283: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_0299: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Expected O, but got Unknown
			//IL_036a: Unknown result type (might be due to invalid IL or missing references)
			//IL_037f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0384: Unknown result type (might be due to invalid IL or missing references)
			//IL_0389: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0461: Unknown result type (might be due to invalid IL or missing references)
			//IL_0466: Unknown result type (might be due to invalid IL or missing references)
			((Orb)this).OnArrival();
			if (!Object.op_Implicit((Object)(object)chokeMainZone) || !Object.op_Implicit((Object)(object)chokeMainZone.attackerBody))
			{
				return;
			}
			if (Object.op_Implicit((Object)(object)base.target) && Object.op_Implicit((Object)(object)base.target.healthComponent) && Object.op_Implicit((Object)(object)base.target.healthComponent.body))
			{
				int num = 0;
				for (int i = 0; i < chokeMainZone.allCharacters.Count; i++)
				{
					if (Object.op_Implicit((Object)(object)chokeMainZone.allCharacters[i]))
					{
						Vector3 position = ((Component)chokeMainZone.allCharacters[i]).gameObject.transform.position;
						float sqrMagnitude = ((Vector3)(ref position)).sqrMagnitude;
						position = ((Component)base.target).transform.position;
						if (sqrMagnitude - ((Vector3)(ref position)).sqrMagnitude > chokeMainZone.crushRange * chokeMainZone.crushRange)
						{
							num++;
						}
					}
					else
					{
						chokeMainZone.allCharacters.RemoveAt(0);
						i--;
					}
				}
				float num2 = 2f;
				if (Object.op_Implicit((Object)(object)((Component)base.target.healthComponent).gameObject.GetComponent<Rigidbody>()))
				{
					num2 = ((Component)base.target.healthComponent).gameObject.GetComponent<Rigidbody>().mass;
				}
				if (FriendlyFireManager.ShouldDirectHitProceed(base.target.healthComponent, chokeMainZone.attackerBody.teamComponent.teamIndex))
				{
					Vector3 val = ((Component)chokeMainZone).transform.position - ((Component)base.target).gameObject.transform.position;
					DamageInfo val2 = new DamageInfo
					{
						damage = chokeMainZone.attackerBody.damage * damageCoef * (1f + (float)num * 0.25f),
						crit = chokeMainZone.attackerBody.RollCrit(),
						inflictor = ((Component)chokeMainZone.attackerBody).gameObject,
						attacker = ((Component)chokeMainZone.attackerBody).gameObject,
						force = ((Vector3)(ref val)).normalized * (Mathf.Min(((Vector3)(ref val)).magnitude, 20f) * baseForce * (num2 * massForceBonusMult)),
						position = ((Component)base.target).transform.position,
						procCoefficient = 1f,
						damageType = DamageTypeCombo.op_Implicit((DamageType)0),
						damageColorIndex = (DamageColorIndex)9
					};
					base.target.healthComponent.TakeDamage(val2);
					GlobalEventManager.instance.OnHitEnemy(val2, ((Component)base.target.healthComponent).gameObject);
					GlobalEventManager.instance.OnHitAll(val2, ((Component)base.target.healthComponent).gameObject);
				}
				else if (base.target.healthComponent.body.HasBuff(MageChokeArea.scriptableObject.buffs[0]))
				{
					base.target.healthComponent.body.RemoveBuff(MageChokeArea.scriptableObject.buffs[0]);
					Vector3 val3 = ((Component)chokeMainZone).transform.position - ((Component)base.target).gameObject.transform.position;
					base.target.healthComponent.TakeDamageForce(((Vector3)(ref val3)).normalized * (Mathf.Min(((Vector3)(ref val3)).magnitude, 20f) * baseForce * (num2 * massForceBonusMult)), true, false);
				}
				Util.PlaySound("Play_item_proc_novaonheal_spawn", ((Component)base.target).gameObject);
				if (futureTargets.Count <= 0)
				{
					return;
				}
				while (!Object.op_Implicit((Object)(object)futureTargets[0]))
				{
					futureTargets.Remove(futureTargets[0]);
					if (futureTargets.Count == 0)
					{
						return;
					}
				}
				ChokeOrb chokeOrb = new ChokeOrb();
				((Orb)chokeOrb).origin = ((Component)base.target).transform.position;
				((Orb)chokeOrb).target = futureTargets[0];
				futureTargets.Remove(futureTargets[0]);
				chokeOrb.futureTargets = futureTargets;
				chokeOrb.chokeMainZone = chokeMainZone;
				OrbManager.instance.AddOrb((Orb)(object)chokeOrb);
			}
			else
			{
				if (futureTargets.Count <= 0)
				{
					return;
				}
				while (!Object.op_Implicit((Object)(object)futureTargets[0]))
				{
					futureTargets.Remove(futureTargets[0]);
					if (futureTargets.Count == 0)
					{
						return;
					}
				}
				ChokeOrb chokeOrb2 = new ChokeOrb();
				((Orb)chokeOrb2).origin = base.origin;
				((Orb)chokeOrb2).target = futureTargets[0];
				futureTargets.Remove(futureTargets[0]);
				chokeOrb2.futureTargets = futureTargets;
				chokeOrb2.chokeMainZone = chokeMainZone;
				OrbManager.instance.AddOrb((Orb)(object)chokeOrb2);
			}
		}
	}
	public class ChokeReturnOrb : Orb
	{
		public override void Begin()
		{
			//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_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: 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_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: 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_005d: Expected O, but got Unknown
			EffectData val = new EffectData
			{
				scale = 1f,
				origin = base.origin,
				start = base.origin,
				rotation = Util.QuaternionSafeLookRotation(((Component)base.target).transform.position - base.origin),
				genericFloat = ((Orb)this).duration
			};
			val.SetHurtBoxReference(base.target);
			EffectManager.SpawnEffect(MageChokeArea.scriptableObject.Effects[4], val, true);
			((Orb)this).Begin();
		}

		public override void OnArrival()
		{
			((Orb)this).OnArrival();
			if (Object.op_Implicit((Object)(object)base.target) && Object.op_Implicit((Object)(object)base.target.healthComponent) && Object.op_Implicit((Object)(object)base.target.healthComponent.body.skillLocator))
			{
				GenericSkill secondary = base.target.healthComponent.body.skillLocator.secondary;
				if (Object.op_Implicit((Object)(object)secondary))
				{
					secondary.UnsetSkillOverride((object)base.target.healthComponent.body.skillLocator.secondary, MageChokeArea.scriptableObject.MiscSkillDefs[0], (SkillOverridePriority)4);
					base.target.healthComponent.body.skillLocator.secondary.AddOneStock();
				}
			}
		}
	}
	public class SunSwordOrb : Orb
	{
		public CharacterBody attackerBody;

		public static float sunSwordDamageMult = 15f;

		public override void Begin()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: 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_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: 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_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)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Expected O, but got Unknown
			((Orb)this).duration = 1f;
			EffectData val = new EffectData
			{
				scale = 1f,
				origin = base.origin,
				start = base.origin,
				rotation = Util.QuaternionSafeLookRotation(((Component)base.target).transform.position - base.origin),
				genericFloat = ((Orb)this).duration
			};
			val.SetHurtBoxReference(base.target);
			EffectManager.SpawnEffect(SunSword.effect, val, true);
			((Orb)this).Begin();
		}

		public override void OnArrival()
		{
			//IL_005b: 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_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			((Orb)this).OnArrival();
			if (Object.op_Implicit((Object)(object)base.target) && Object.op_Implicit((Object)(object)base.target.healthComponent) && Object.op_Implicit((Object)(object)base.target.healthComponent.body) && Object.op_Implicit((Object)(object)attackerBody))
			{
				InflictDotInfo val = new InflictDotInfo
				{
					victimObject = ((Component)base.target.healthComponent.body).gameObject,
					attackerObject = ((Component)attackerBody).gameObject,
					totalDamage = 1f * attackerBody.damage * sunSwordDamageMult,
					dotIndex = (DotIndex)7,
					damageMultiplier = 15f,
					duration = 1.5f
				};
				Util.PlaySound("Play_merc_R_slicingBlades_throw", ((Component)base.target).gameObject);
				DotController.InflictDot(ref val);
			}
		}
	}
	public class WeaveOrb : Orb
	{
		public CharacterBody attackerBody;

		public bool isCrit;

		public float damage = 1.5f;

		public override void Begin()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: 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_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: 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_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)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Expected O, but got Unknown
			((Orb)this).duration = 0.2f;
			EffectData val = new EffectData
			{
				scale = 1f,
				origin = base.origin,
				start = base.origin,
				rotation = Util.QuaternionSafeLookRotation(((Component)base.target).transform.position - base.origin),
				genericFloat = ((Orb)this).duration
			};
			val.SetHurtBoxReference(base.target);
			EffectManager.SpawnEffect(Weave.scriptableObject.Effects[1], val, true);
			((Orb)this).Begin();
		}

		public override void OnArrival()
		{
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: 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_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: 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_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: 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)
			//IL_0124: Expected O, but got Unknown
			//IL_007f: 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)
			((Orb)this).OnArrival();
			if (Object.op_Implicit((Object)(object)base.target) && Object.op_Implicit((Object)(object)base.target.healthComponent) && Object.op_Implicit((Object)(object)base.target.healthComponent.body) && Object.op_Implicit((Object)(object)base.target.healthComponent.body.teamComponent) && Object.op_Implicit((Object)(object)attackerBody) && base.target.healthComponent.body.teamComponent.teamIndex != attackerBody.teamComponent.teamIndex)
			{
				DamageInfo val = new DamageInfo
				{
					damage = damage,
					crit = isCrit,
					inflictor = ((Component)attackerBody).gameObject,
					attacker = ((Component)attackerBody).gameObject,
					force = Vector3.zero,
					position = ((Component)base.target).transform.position,
					procCoefficient = 1f,
					damageType = DamageTypeCombo.op_Implicit((DamageType)0),
					damageColorIndex = (DamageColorIndex)9
				};
				base.target.healthComponent.TakeDamage(val);
				GlobalEventManager.instance.OnHitEnemy(val, ((Component)base.target.healthComponent).gameObject);
				GlobalEventManager.instance.OnHitAll(val, ((Component)base.target.healthComponent).gameObject);
			}
		}
	}
}
namespace PlasmaCoreSpikestripContent.Core
{
	public static class PlasmaCorePlugin
	{
		public static AssetBundle bundle;

		public static GameObject skyShardProjectile;

		public static Dictionary<string, SSItemBaseSO> itemBaseScriptableObjects = new Dictionary<string, SSItemBaseSO>();

		public static Dictionary<string, SSEquipBaseSO> equipBaseScriptableObjects = new Dictionary<string, SSEquipBaseSO>();

		public static Dictionary<string, SSArtifactBaseSO> artifactBaseScriptableObjects = new Dictionary<string, SSArtifactBaseSO>();

		public static Dictionary<string, SSInteractibleBaseSO> interactibleBaseScriptableObjects = new Dictionary<string, SSInteractibleBaseSO>();

		public static Dictionary<string, SSSkillBaseSO> skillBaseScriptableObjects = new Dictionary<string, SSSkillBaseSO>();

		public static Dictionary<string, SSEnemyBaseSO> enemyBaseScriptableObjects = new Dictionary<string, SSEnemyBaseSO>();

		public static Dictionary<string, SSEliteBaseSO> eliteBaseScriptableObjects = new Dictionary<string, SSEliteBaseSO>();

		public static GameObject crosshairIFSActive;

		public static GameObject crosshairIFSInactive;

		public static GameObject freezeEffectIFS;

		public static void Init()
		{
			//IL_009e: 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)
			NetworkingAPI.RegisterMessageType<IFSClientTargetRequestNetworkMessage>();
			NetworkingAPI.RegisterMessageType<IFSTargetConfirmRequestNetworkMessage>();
			NetworkingAPI.RegisterMessageType<IFSACtivateEquipmentNetworkMessage>();
			NetworkingAPI.RegisterMessageType<ApplyWeaveDebuffNetworkMessage>();
			bundle = Main.LoadBundle("plasmacorespikestripcontentpack.bundle");
			freezeEffectIFS = bundle.LoadAsset<GameObject>("FreezeEffect");
			ContentAddition.AddEffect(freezeEffectIFS);
			crosshairIFSActive = bundle.LoadAsset<GameObject>("IFSIndicatorActive");
			crosshairIFSInactive = bundle.LoadAsset<GameObject>("IFSIndicatorInactive");
			skyShardProjectile = bundle.LoadAsset<GameObject>("SkyShardProjectile");
			PlasmaUtils.RegisterNetworkPrefab(skyShardProjectile);
			ContentAddition.AddProjectile(skyShardProjectile);
			Material material = ((Renderer)((Component)Addressables.LoadAssetAsync<GameObject>((object)"e478bf9d9eb031246b7262dd8171c63e").WaitForCompletion().transform.GetChild(4).GetChild(0).GetChild(2)
				.GetChild(0)).GetComponent<MeshRenderer>()).materials[0];
			((Renderer)((Component)bundle.LoadAsset<GameObject>("SkyShardImpactEffect").transform.GetChild(1).GetChild(1)).GetComponent<MeshRenderer>()).material = material;
			((Renderer)((Component)bundle.LoadAsset<GameObject>("SkyShardWarningGhost").transform.GetChild(0).GetChild(0).GetChild(0)
				.GetChild(1)).GetComponent<MeshRenderer>()).material = material;
			ContentAddition.AddEffect(bundle.LoadAsset<GameObject>("SkyShardImpactEffect"));
			StubShaders(bundle.LoadAllAssets<Material>());
			PlasmaLog.Log("Getting all ItemBaseSOs", allLogOnly: true);
			SSItemBaseSO[] array = bundle.LoadAllAssets<SSItemBaseSO>();
			SSItemBaseSO[] array2 = array;
			foreach (SSItemBaseSO sSItemBaseSO in array2)
			{
				PlasmaLog.Log("Adding ItemBaseSO with name " + sSItemBaseSO.ItemName, allLogOnly: true);
				itemBaseScriptableObjects.Add(sSItemBaseSO.ItemName, sSItemBaseSO);
			}
			PlasmaLog.Log("Getting all EquipBaseSOs", allLogOnly: true);
			SSEquipBaseSO[] array3 = bundle.LoadAllAssets<SSEquipBaseSO>();
			SSEquipBaseSO[] array4 = array3;
			foreach (SSEquipBaseSO sSEquipBaseSO in array4)
			{
				PlasmaLog.Log("Adding EquipBaseSO with name " + sSEquipBaseSO.EquipName, allLogOnly: true);
				equipBaseScriptableObjects.Add(sSEquipBaseSO.EquipName, sSEquipBaseSO);
			}
			PlasmaLog.Log("Getting all ArtifactBaseSOs", allLogOnly: true);
			SSArtifactBaseSO[] array5 = bundle.LoadAllAssets<SSArtifactBaseSO>();
			SSArtifactBaseSO[] array6 = array5;
			foreach (SSArtifactBaseSO sSArtifactBaseSO in array6)
			{
				PlasmaLog.Log("Adding ArtifactBaseSO with name " + sSArtifactBaseSO.Name, allLogOnly: true);
				artifactBaseScriptableObjects.Add(sSArtifactBaseSO.Name, sSArtifactBaseSO);
			}
			PlasmaLog.Log("Getting all InteractibleBaseSOs", allLogOnly: true);
			SSInteractibleBaseSO[] array7 = bundle.LoadAllAssets<SSInteractibleBaseSO>();
			SSInteractibleBaseSO[] array8 = array7;
			foreach (SSInteractibleBaseSO sSInteractibleBaseSO in array8)
			{
				PlasmaLog.Log("Adding InteractibleBaseSO with name " + sSInteractibleBaseSO.InteractableName, allLogOnly: true);
				interactibleBaseScriptableObjects.Add(sSInteractibleBaseSO.InteractableName, sSInteractibleBaseSO);
			}
			PlasmaLog.Log("Getting all SkillBaseSOs", allLogOnly: true);
			SSSkillBaseSO[] array9 = bundle.LoadAllAssets<SSSkillBaseSO>();
			SSSkillBaseSO[] array10 = array9;
			foreach (SSSkillBaseSO sSSkillBaseSO in array10)
			{
				PlasmaLog.Log("Adding SkillBaseSO with name " + sSSkillBaseSO.Name, allLogOnly: true);
				skillBaseScriptableObjects.Add(sSSkillBaseSO.Name, sSSkillBaseSO);
			}
			PlasmaLog.Log("Getting all EnemyBaseSOs", allLogOnly: true);
			SSEnemyBaseSO[] array11 = bundle.LoadAllAssets<SSEnemyBaseSO>();
			SSEnemyBaseSO[] array12 = array11;
			foreach (SSEnemyBaseSO sSEnemyBaseSO in array12)
			{
				PlasmaLog.Log("Adding EnemyBaseSO with name " + sSEnemyBaseSO.Name, allLogOnly: true);
				enemyBaseScriptableObjects.Add(sSEnemyBaseSO.Name, sSEnemyBaseSO);
			}
			PlasmaLog.Log("Getting all EnemyBaseSOs", allLogOnly: true);
			SSEliteBaseSO[] array13 = bundle.LoadAllAssets<SSEliteBaseSO>();
			SSEliteBaseSO[] array14 = array13;
			foreach (SSEliteBaseSO sSEliteBaseSO in array14)
			{
				PlasmaLog.Log("Adding EnemyBaseSO with name " + sSEliteBaseSO.Name, allLogOnly: true);
				eliteBaseScriptableObjects.Add(sSEliteBaseSO.Name, sSEliteBaseSO);
			}
		}

		public static void StubShaders(Material[] materials)
		{
			//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_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: 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_002c: 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_0037: 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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: 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_0062: 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_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)
			AsyncOperationHandle<Shader> val = Addressables.LoadAssetAsync<Shader>((object)"48dca5b99d113b8d11006bab44295342");
			AsyncOperationHandle<Shader> val2 = Addressables.LoadAssetAsync<Shader>((object)"bbffe49749c91724d819563daf91445d");
			AsyncOperationHandle<Shader> val3 = Addressables.LoadAssetAsync<Shader>((object)"a035a371a79a19c468ec4e6dc40911c5");
			AsyncOperationHandle<Shader> val4 = Addressables.LoadAssetAsync<Shader>((object)"43a6c7a9084ef9743ab45ee8d5f3c4e9");
			AsyncOperationHandle<Shader> val5 = Addressables.LoadAssetAsync<Shader>((object)"f6bd449dcf2a4496da3d2ad0c3881450");
			AsyncOperationHandle<Shader> val6 = Addressables.LoadAssetAsync<Shader>((object)"302e1057ea9d0e74dab5a0de5cbf611c");
			AsyncOperationHandle<Shader> val7 = Addressables.LoadAssetAsync<Shader>((object)"94b2ede73cf555f4f8549dc24b957446");
			AsyncOperationHandle<Shader> val8 = Addressables.LoadAssetAsync<Shader>((object)"d48a4aa52cd665f45a89801d053c38de");
			AsyncOperationHandle<Shader> val9 = Addressables.LoadAssetAsync<Shader>((object)"cd44d5076b47fbc4d8872b2a500b78f8");
			AsyncOperationHandle<Shader> val10 = Addressables.LoadAssetAsync<Shader>((object)"ec2c273472427df41846b25c110155c2");
			Shader shader = val.WaitForCompletion();
			Shader shader2 = val2.WaitForCompletion();
			Shader shader3 = val3.WaitForCompletion();
			Shader shader4 = val4.WaitForCompletion();
			Shader shader5 = val5.WaitForCompletion();
			Shader shader6 = val6.WaitForCompletion();
			Shader shader7 = val7.WaitForCompletion();
			Shader shader8 = val8.WaitForCompletion();
			Shader shader9 = val9.WaitForCompletion();
			Shader shader10 = val10.WaitForCompletion();
			foreach (Material val11 in materials)
			{
				switch (((Object)val11.shader).name)
				{
				case "StubbedShader/deferred/standard":
					val11.shader = shader;
					break;
				case "StubbedShader/fx/hgcloudremap":
					val11.shader = shader2;
					val11.EnableKeyword("USE_CLOUDS");
					val11.EnableKeyword("VERTEXCOLOR");
					val11.EnableKeyword("_EMISSION");
					break;
				case "StubbedShader/fx/hgopaquecloudremap":
					val11.shader = shader3;
					break;
				case "StubbedShader/fx/cloudintersectionremap":
					val11.shader = shader4;
					val11.EnableKeyword("CLOUDOFFSET");
					val11.EnableKeyword("USE_CLOUDS");
					val11.EnableKeyword("_EMISSION");
					break;
				case "StubbedShader/fx/hgdistortion":
					val11.shader = shader5;
					break;
				case "StubbedShader/fx/solidparallax":
					val11.shader = shader6;
					break;
				case "StubbedShader/fx/hgforwardplanet":
					val11.shader = shader7;
					break;
				case "StubbedShader/environment/distantwater":
					val11.shader = shader8;
					break;
				case "StubbedShader/deferred/hgtriplanarterrainblend":
					val11.shader = shader9;
					break;
				case "StubbedShader/deferred/hgsnowtopped":
					val11.shader = shader10;
					break;
				default:
					if (PlasmaLog.debugAll && (((Object)val11.shader).name.ToLower().Contains("stub") || ((Object)val11.shader).name.ToLower().Contains("hopoo")))
					{
						PlasmaLog.LogWarn("[VF2Plugin]: Unable to find shader for stub " + ((Object)val11.shader).name, allLogOnly: true);
					}
					break;
				}
			}
		}
	}
	public static class PlasmaLog
	{
		public static bool debugAll = false;

		private static int sequenceCount = 0;

		private static string[] sequence = new string[30]
		{
			"Memories broken", "The truth goes unspoken", "I've even forgotten my NAAAAAME!", "I don't know the season", "Or what is the reson", "I'm standing here holding my BLAAAAADE!", "A desolate place! (place!)", "Without any trace! (trace!)", "It's only the cold wind I feel", "It's me that I spite",
			"As I stand up and fight", "The only thing I know for real...", "THERE WILL BE", "BLOOD! (BLOOD!)", "SHED! (SHED!)", "THE MAN IN THE MIRROR NODS HIS HEAD!", "THE ONLY ONE!", "LEFT!", "WILL RIDE UPON THE DRAGON'S BACK!", "Because the mountains don't give back what they taaake",
			"OH NO, THERE WILL BE", "BLOOD! (BLOOD!)", "SHED! (SHED!)", "IT'S THE ONLY THING I'VE EVER KNOOOOWN!", "Losing my identityyy", "Wondering, have I gone insane?", "To find the truth in fronta meee", "I must climb this mountain range", "Looking downward from this deadly height", "And never realizing why I fiiiiight!"
		};

		public static void Log(string output, bool allLogOnly = false)
		{
			if (!allLogOnly || debugAll)
			{
				Debug.Log((object)("[SSCPPlugin.PlasmaCore]: " + output));
			}
		}

		public static void LogWarn(string output, bool allLogOnly = false)
		{
			if (!allLogOnly || debugAll)
			{
				Debug.LogWarning((object)("[SSCPPlugin.PlasmaCore]: " + output));
			}
		}

		public static void LogError(string output, bool allLogOnly = false)
		{
			if (!allLogOnly || debugAll)
			{
				Debug.LogError((object)("[SSCPPlugin.PlasmaCore]: " + output));
			}
		}

		public static void LogSequence()
		{
			if (debugAll)
			{
				Debug.LogWarning((object)("[SSCPPlugin.PlasmaCore]: " + sequence[sequenceCount]));
				sequenceCount++;
				if (sequenceCount >= sequence.Length)
				{
					sequenceCount = 0;
				}
			}
		}
	}
	public static class PlasmaUtils
	{
		public static Vector3 RandomTerrainPositionInCylinder(Vector3 position, float radius, float topOfCylinderHeight)
		{
			//IL_001f: 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_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: 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_006e: 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_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			float num = Random.Range(0f, radius);
			float num2 = Random.Range(0f, MathF.PI * 2f);
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(position.x + Mathf.Sin(num2) * num, position.y + topOfCylinderHeight, position.z + Mathf.Cos(num2) * num);
			Ray val2 = default(Ray);
			((Ray)(ref val2))..ctor(val, Vector3.down);
			RaycastHit val3 = default(RaycastHit);
			if (Physics.Raycast(val2, ref val3, topOfCylinderHeight * 3f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1))
			{
				return ((RaycastHit)(ref val3)).point;
			}
			return val - Vector3.down * topOfCylinderHeight * 3f;
		}

		public static Vector3 GetNearestNode(Vector3 position, float maxDist = float.PositiveInfinity, HullClassification hullSize = (HullClassification)0, bool useAirNodes = false)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: 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_0022: 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_0041: 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_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_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			Vector3 result = position;
			if (!Object.op_Implicit((Object)(object)SceneInfo.instance))
			{
				PlasmaLog.LogWarn("GetNearestNode: SceneInfo.instance is null!");
				return result;
			}
			NodeGraph val = ((!useAirNodes) ? SceneInfo.instance.airNodes : SceneInfo.instance.groundNodes);
			NodeIndex val2 = val.FindClosestNode(position, hullSize, maxDist);
			if (val2 != NodeIndex.invalid)
			{
				val.GetNodePosition(val2, ref result);
				return result;
			}
			return position;
		}

		public static void RegisterNetworkPrefabs(GameObject[] gameObjects)
		{
			for (int i = 0; i < gameObjects.Length; i++)
			{
				RegisterNetworkPrefab(gameObjects[i]);
			}
		}

		public static void RegisterNetworkPrefab(GameObject gameObject)
		{
			//IL_0046: 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_0092: Unknown result type (might be due to invalid IL or missing references)
			NetworkIdentity val = gameObject.GetComponent<NetworkIdentity>();
			if (!Object.op_Implicit((Object)(object)val))
			{
				PlasmaLog.LogWarn("RegisterNetworkPrefab: Adding NetworkID to prefab " + ((Object)gameObject).name + ", as it has none.");
				val = gameObject.AddComponent<NetworkIdentity>();
			}
			if (Object.op_Implicit((Object)(object)val))
			{
				NetworkHash128 assetId = val.assetId;
				if (((NetworkHash128)(ref assetId)).IsValid())
				{
					ClientScene.RegisterPrefab(gameObject);
					return;
				}
				MethodBase method = new StackFrame(2).GetMethod();
				ClientScene.RegisterPrefab(gameObject, NetworkHash128.Parse(PrefabAPIMakeHash(((Object)gameObject).name + method.DeclaringType.AssemblyQualifiedName + method.Name)));
			}
		}

		public static string PrefabAPIMakeHash(string s)
		{
			MD5 mD = MD5.Create();
			StringBuilder stringBuilder = new StringBuilder();
			byte[] array = mD.ComputeHash(Encoding.UTF8.GetBytes(s));
			byte[] array2 = array;
			foreach (byte b in array2)
			{
				stringBuilder.Append(b.ToString("x2"));
			}
			mD.Dispose();
			return stringBuilder.ToString();
		}
	}
	[CreateAssetMenu(fileName = "ssabBlank", menuName = "PlasmaCore/SpikeStrip/ArtifactBase", order = 1)]
	public class SSArtifactBaseSO : ScriptableObject
	{
		public string Name = "";

		public string OverrideFullName = "";

		public string Description = "";

		public Sprite EnabledIcon;

		public Sprite DisabledIcon;

		public ArtifactCode artifactCode;

		public GameObject pickupModel;

		public UnlockableDef unlockableDef;

		public BuffDef[] associatedBuffs;
	}
	[CreateAssetMenu(fileName = "ssebBlank", menuName = "PlasmaCore/SpikeStrip/EliteBase", order = 7)]
	public class SSEliteBaseSO : ScriptableObject
	{
		public enum EliteTierType
		{
			TierOne = 1,
			TierTwo = 3,
			Honor = 2,
			Lunar = 4
		}

		public string Name;

		public Color eliteColor = Color.white;

		public Color affixColor = Color.white;

		public EliteTierType tier = EliteTierType.TierOne;

		public Sprite buffSprite;

		public Sprite EquipmentIcon;

		public string EquipmentName;

		public string AffixDescriptionMainWord;

		public Texture2D EliteRampTexture;

		public GameObject EquipmentDisplayModel;

		public GameObject[] MiscGameObjects = (GameObject[])(object)new GameObject[0];

		public BuffDef[] MiscBuffs = (BuffDef[])(object)new BuffDef[0];

		public Material OverlayMaterial;
	}
	[CreateAssetMenu(fileName = "ssebBlank", menuName = "PlasmaCore/SpikeStrip/EnemyBase", order = 6)]
	public class SSEnemyBaseSO : ScriptableObject
	{
		public GameObject CharacterMaster;

		public GameObject CharacterBody;

		public GameObject CharacterModel;

		public string Name;

		public UnlockableDef logUnlock;

		[Header("Skills and Projectiles")]
		public BuffDef[] Buffs;

		public SkillFamily[] SkillFamilies;

		public SkillDef[] Skills;

		public GameObject[] Effects;

		public GameObject[] Projectiles;

		public GameObject[] MiscGameObjects;

		[Header("Spawn Card")]
		public CharacterSpawnCard CharacterSpawnCard;

		public string CharacterCategory = "";

		public int SelectionWeight = 1;

		public MonsterSpawnDistance spawnDistance;

		public int MinimumStageCompletion;
	}
	[CreateAssetMenu(fileName = "ssebBlank", menuName = "PlasmaCore/SpikeStrip/EquipBase", order = 1)]
	public class SSEquipBaseSO : ScriptableObject
	{
		public string EquipName = "";

		public Sprite Icon;

		public string EquipToken = "";

		[TextArea(0, 5)]
		public string EquipPickup = "";

		[TextArea(0, 5)]
		public string EquipDescription = "";

		public float Cooldown = 45f;

		public GameObject pickupObject;

		public GameObject displayObject;

		public GameObject[] extraDisplayObjects;

		public BuffDef associatedBuff;

		public BuffDef[] buffs;
	}
	[CreateAssetMenu(fileName = "ssibBlank", menuName = "PlasmaCore/SpikeStrip/InterableBase", order = 2)]
	public class SSInteractibleBaseSO : ScriptableObject
	{
		public string InteractableName = "";

		public bool UsesDirector = true;

		public InteractableSpawnCard InteractableSpawnCard;

		public string interactableCategory = "";

		public int SelectionWeight = 1;

		public MonsterSpawnDistance spawnDistance;

		public int MinimumStageCompletion;
	}
	[CreateAssetMenu(fileName = "ssibBlank", menuName = "PlasmaCore/SpikeStrip/ItemBase", order = 0)]
	public class SSItemBaseSO : ScriptableObject
	{
		public string ItemName = "";

		public Sprite Icon;

		public ItemTier ItemTier = (ItemTier)5;

		public string ItemToken = "";

		[TextArea(0, 5)]
		public string ItemPickup = "";

		[TextArea(0, 5)]
		public string ItemDescription = "";

		public GameObject pickupObject;

		public GameObject displayObject;

		public GameObject[] extraDisplayObjects;

		public BuffDef[] buffs;

		public ItemTag[] tags = Array.Empty<ItemTag>();
	}
	[CreateAssetMenu(fileName = "sssbBlank", menuName = "PlasmaCore/SpikeStrip/SkillBase", order = 5)]
	public class SSSkillBaseSO : ScriptableObject
	{
		public string Name = "";

		[TextArea(0, 5)]
		public string Description = "";

		public string SkillToken = "";

		public string PrerequisiteIdentifier = "";

		public string AchievementName = "";

		public Sprite SkillIcon;

		public string CharacterName = "";

		public string OwnerBodyPath = "";

		public string SkillFamilyPath = "";

		public Type[] EntityStateTypes = new Type[0];

		public SkillDef SkillDefinition;

		public GameObject[] Projectiles;

		public GameObject[] Effects;

		public GameObject[] MiscGameObjects;

		public Texture[] MiscTextures;

		public BuffDef[] buffs;

		public SkillDef[] MiscSkillDefs;
	}
}
namespace PlasmaCoreSpikestripContent.Content.Skills
{
	public class DeepRot : SpikestripVoidAltSkillsBase<DeepRot>
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Func<CharacterModel, bool> <>9__26_0;

			public static Func<CharacterModel, bool> <>9__26_1;

			public static EffectRadius <>9__26_2;

			public static EffectCondition <>9__26_3;

			public static EffectRadius <>9__26_4;

			public static EffectCondition <>9__26_5;

			internal bool <Init>b__26_0(CharacterModel self)
			{
				return self.body.HasBuff(scriptableObject.buffs[0]);
			}

			internal bool <Init>b__26_1(CharacterModel self)
			{
				return self.body.HasBuff(scriptableObject.buffs[1]);
			}

			internal float <Init>b__26_2(CharacterBody body)
			{
				return body.bestFitRadius;
			}

			internal bool <Init>b__26_3(CharacterBody body)
			{
				return body.HasBuff(scriptableObject.buffs[0]);
			}

			internal float <Init>b__26_4(CharacterBody body)
			{
				return body.bestFitRadius;
			}

			internal bool <Init>b__26_5(CharacterBody body)
			{
				return body.HasBuff(scriptableObject.buffs[1]) && !body.HasBuff(scriptableObject.buffs[0]);
			}
		}

		public static GameObject muzzleFlashEffect;

		public static SSSkillBaseSO scriptableObject;

		public static Material deepRotMinor;

		public static Material deepRotMajor;

		public static DotIndex deepRotDOT;

		public override string SkillName => "「Deeprot」";

		public override string SkillDescription => scriptableObject.Description;

		public override string SkillToken => scriptableObject.SkillToken;

		public override string PrerequisiteIdentifier => scriptableObject.PrerequisiteIdentifier;

		public override string CharacterName => scriptableObject.CharacterName;

		public override string AchievementName => scriptableObject.AchievementName;

		public override Sprite SkillIcon => scriptableObject.SkillIcon;

		public override GameObject OwnerBodyPrefab => SpikestripUtil.LegacyLoad<GameObject>(scriptableObject.OwnerBodyPath);

		public override SkillFamily[] SkillFamilies => (SkillFamily[])(object)new SkillFamily[1] { SpikestripUtil.LegacyLoad<SkillFamily>(scriptableObject.SkillFamilyPath) };

		public override Type[] EntityStateTypes => new Type[0];

		public override SkillDef GetSkillDef()
		{
			SpikestripUtil.FillInertSkillDef(scriptableObject.SkillDefinition);
			return scriptableObject.SkillDefinition;
		}

		public override void Init()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: 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_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_0053: Expected O, but got Unknown
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Expected O, but got Unknown
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Expected O, but got Unknown
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Expected O, but got Unknown
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Expected O, but got Unknown
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Expected O, but got Unknown
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Expected O, but got Unknown
			//IL_022c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Expected O, but got Unknown
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Expected O, but got Unknown
			PlasmaCorePlugin.skillBaseScriptableObjects.TryGetValue(SkillName, out scriptableObject);
			deepRotDOT = DotAPI.RegisterDotDef(new DotDef
			{
				interval = 0.333f,
				damageCoefficient = 0.6666f,
				damageColorIndex = (DamageColorIndex)9,
				associatedBuff = scriptableObject.buffs[0]
			}, (CustomDotBehaviour)null, (CustomDotVisual)null);
			LanguageAPI.Add("KEYWORD_SOULROT", "<style=cKeywordName>Soulrot</style><style=cSub>Deals <style=cIsVoid>fatal damage</style> equal to <style=cIsVoid>62.5%</style> of their maximum health over 25s.</style>");
			deepRotMinor = Object.Instantiate<Material>(SpikestripUtil.LegacyLoad<Material>("Materials/matPoisoned"));
			deepRotMinor.SetTexture("_RemapTex", scriptableObject.MiscTextures[0]);
			deepRotMajor = Object.Instantiate<Material>(SpikestripUtil.LegacyLoad<Material>("Materials/matPoisoned"));
			deepRotMajor.SetTexture("_RemapTex", scriptableObject.MiscTextures[1]);
			ContentAddition.AddBuffDef(scriptableObject.buffs[0]);
			ContentAddition.AddBuffDef(scriptableObject.buffs[1]);
			CrocoDamageTypeController.GetDamageType += new hook_GetDamageType(CrocoDamageTypeController_GetDamageType);
			GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy);
			DotController.AddDot_GameObject_float_HurtBox_DotIndex_float_ProcChainMask_Nullable1_Nullable1_Nullable1 += new hook_AddDot_GameObject_float_HurtBox_DotIndex_float_ProcChainMask_Nullable1_Nullable1_Nullable1(DotController_AddDot);
			OverlayMaterials.Register(deepRotMajor, (CharacterModel self) => self.body.HasBuff(scriptableObject.buffs[0]));
			OverlayMaterials.Register(deepRotMinor, (CharacterModel self) => self.body.HasBuff(scriptableObject.buffs[1]));
			GameObject obj = scriptableObject.MiscGameObjects[0];
			object obj2 = <>c.<>9__26_2;
			if (obj2 == null)
			{
				EffectRadius val = (CharacterBody body) => body.bestFitRadius;
				<>c.<>9__26_2 = val;
				obj2 = (object)val;
			}
			object obj3 = <>c.<>9__26_3;
			if (obj3 == null)
			{
				EffectCondition val2 = (CharacterBody body) => body.HasBuff(scriptableObject.buffs[0]);
				<>c.<>9__26_3 = val2;
				obj3 = (object)val2;
			}
			TempVisualEffectAPI.AddTemporaryVisualEffect(obj, (EffectRadius)obj2, (EffectCondition)obj3, "Head");
			GameObject obj4 = SpikestripUtil.LegacyLoad<GameObject>("Prefabs/TemporaryVisualEffects/VoidFogMildEffect");
			object obj5 = <>c.<>9__26_4;
			if (obj5 == null)
			{
				EffectRadius val3 = (CharacterBody body) => body.bestFitRadius;
				<>c.<>9__26_4 = val3;
				obj5 = (object)val3;
			}
			object obj6 = <>c.<>9__26_5;
			if (obj6 == null)
			{
				EffectCondition val4 = (CharacterBody body) => body.HasBuff(scriptableObject.buffs[1]) && !body.HasBuff(scriptableObject.buffs[0]);
				<>c.<>9__26_5 = val4;
				obj6 = (object)val4;
			}
			TempVisualEffectAPI.AddTemporaryVisualEffect(obj4, (EffectRadius)obj5, (EffectCondition)obj6, "");
			base.Init();
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			int buffCount = sender.GetBuffCount(scriptableObject.buffs[1]);
			if (buffCount > 0)
			{
				args.cooldownMultAdd += (float)buffCount * 0.3f;
				args.attackSpeedMultAdd -= (float)buffCount * 0.1f;
				args.moveSpeedReductionMultAdd += (float)buffCount * 0.1f;
			}
		}

		private void DotController_AddDot(orig_AddDot_GameObject_float_HurtBox_DotIndex_float_ProcChainMask_Nullable1_Nullable1_Nullable1 orig, DotController self, GameObject attackerObject, float duration, HurtBox hitHurtBox, DotIndex dotIndex, float damageMultiplier, ProcChainMask procChainMask, uint? maxStacksFromAttacker, float? totalDamage, DotIndex? preUpgradeDotIndex)
		{
			//IL_0008: 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_0034: 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)
			orig.Invoke(self, attackerObject, duration, hitHurtBox, dotIndex, damageMultiplier, procChainMask, maxStacksFromAttacker, totalDamage, preUpgradeDotIndex);
			DotStack val = self.dotStackList[self.dotStackList.Count - 1];
			if (val.dotIndex == deepRotDOT)
			{
				val.damage = Mathf.Max(self.victimBody.healthComponent.fullCombinedHealth / 100f * 2.5f * val.dotDef.interval, val.damage);
			}
		}

		private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
		{
			//IL_0006: 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)
			//IL_000d: 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_0013: 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_001d: 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_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			DamageType val = (DamageType)1052672;
			if (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit(val)) == val && damageInfo.procCoefficient > 0f && !damageInfo.rejected && Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)victim.GetComponent<CharacterBody>()))
			{
				CrocoDamageTypeController component = damageInfo.attacker.GetComponent<CrocoDamageTypeController>();
				if (Object.op_Implicit((Object)(object)component) && component.passiveSkillSlot.skillNameToken == "SPIKESTRIPSKILL_DEEPROT_NAME")
				{
					damageInfo.damageType &= DamageTypeCombo.op_Implicit(~val);
					CharacterBody component2 = victim.GetComponent<CharacterBody>();
					if (!component2.HasBuff(scriptableObject.buffs[0]))
					{
						component2.AddTimedBuff(scriptableObject.buffs[1], 12f);
						component2.RecalculateStats();
						if (component2.GetBuffCount(scriptableObject.buffs[1]) >= 5)
						{
							Util.PlaySound("Play_acrid_m2_bite_hit", victim);
							DotController.InflictDot(victim, damageInfo.attacker, deepRotDOT, 20f, 1f, (uint?)null);
						}
					}
					else
					{
						component2.AddTimedBuff(scriptableObject.buffs[1], 12f);
						component2.RecalculateStats();
					}
				}
			}
			orig.Invoke(self, damageInfo, victim);
		}

		private DamageTypeCombo CrocoDamageTypeController_GetDamageType(orig_GetDamageType orig, CrocoDamageTypeController self)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)self.passiveSkillSlot.skillDef == (Object)(object)scriptableObject.SkillDefinition)
			{
				return DamageTypeCombo.op_Implicit((DamageType)1052672);
			}
			return orig.Invoke(self);
		}
	}
	public class MageChokeArea : SpikestripVoidAltSkillsBase<MageChokeArea>
	{
		public static GameObject muzzleFlashEffect;

		public static SSSkillBaseSO scriptableObject;

		public static GameObject mainProjectile;

		public override string SkillName => "「Choke」";

		public override string SkillDescription => scriptableObject.Description;

		public override string SkillToken => scriptableObject.SkillToken;

		public override string PrerequisiteIdentifier => scriptableObject.PrerequisiteIdentifier;

		public override string CharacterName => scriptableObject.CharacterName;

		public override string AchievementName => scriptableObject.AchievementName;

		public override Sprite SkillIcon => scriptableObject.SkillIcon;

		public override GameObject OwnerBodyPrefab => SpikestripUtil.LegacyLoad<GameObject>(scriptableObject.OwnerBodyPath);

		public override SkillFamily[] SkillFamilies => (SkillFamily[])(object)new SkillFamily[1] { SpikestripUtil.LegacyLoad<SkillFamily>(scriptableObject.SkillFamilyPath) };

		public override Type[] EntityStateTypes => new Type[3]
		{
			typeof(Choke),
			typeof(ChokeFire),
			typeof(FireVoidBolts)
		};

		public override SkillDef GetSkillDef()
		{
			return scriptableObject.SkillDefinition;
		}

		public override void Init()
		{
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: 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_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_028e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0293: Unknown result type (might be due to invalid IL or missing references)
			PlasmaCorePlugin.skillBaseScriptableObjects.TryGetValue(SkillName, out scriptableObject);
			SkillDef[] miscSkillDefs = scriptableObject.MiscSkillDefs;
			SkillDef[] array = miscSkillDefs;
			foreach (SkillDef val in array)
			{
				ContentAddition.AddSkillDef(val);
			}
			GameObject[] effects = scriptableObject.Effects;
			GameObject[] array2 = effects;
			foreach (GameObject val2 in array2)
			{
				if (Object.op_Implicit((Object)(object)val2.GetComponent<OrbEffect>()))
				{
					SpikestripUtil.DisableEffectPooling(val2);
				}
				ContentAddition.AddEffect(val2);
			}
			effects = scriptableObject.Projectiles;
			GameObject[] array3 = effects;
			foreach (GameObject val3 in array3)
			{
				ContentAddition.AddProjectile(val3);
				PlasmaUtils.RegisterNetworkPrefab(val3);
			}
			BuffDef[] buffs = scriptableObject.buffs;
			BuffDef[] array4 = buffs;
			foreach (BuffDef val4 in array4)
			{
				ContentAddition.AddBuffDef(val4);
			}
			base.Init();
			LanguageAPI.Add("MAGE_OVERRIDE_VOIDBOLTS_NAME", "「Void Bolts」");
			LanguageAPI.Add("MAGE_OVERRIDE_VOIDBOLTS_DESC", "Fire a bolt for <style=cIsVoid>220% damage</style> that <style=cIsVoid>marks</style> in a small area. Hold up to 4.</style>");
			LanguageAPI.Add("KEYWORD_CRUSH", "<style=cKeywordName>Crushing</style><style=cSub>Targets suffer <style=cIsVoid>25% more damage</style> for each character within 4m.</style>");
			muzzleFlashEffect = PrefabAPI.InstantiateClone(SpikestripUtil.LegacyLoad<GameObject>("Prefabs/Effects/MuzzleFlashes/MuzzleflashMageLightningLarge"), "MuzzleflashMageVoidLarge", false);
			ParticleSystemRenderer[] componentsInChildren = muzzleFlashEffect.GetComponentsInChildren<ParticleSystemRenderer>();
			((Renderer)componentsInChildren[0]).material = Object.Instantiate<Material>(((Renderer)componentsInChildren[0]).material);
			((Renderer)componentsInChildren[0]).material.SetTexture("_RemapTex", scriptableObject.MiscTextures[2]);
			MainModule main = ((Component)componentsInChildren[1]).GetComponent<ParticleSystem>().main;
			Reflection.SetPropertyValue<Color>((object)((MainModule)(ref main)).startColor, "color", Color32.op_Implicit(new Color32((byte)249, (byte)23, byte.MaxValue, byte.MaxValue)));
			((Renderer)componentsInChildren[2]).material = Object.Instantiate<Material>(((Renderer)componentsInChildren[2]).material);
			((Renderer)componentsInChildren[2]).material.SetTexture("_RemapTex", scriptableObject.MiscTextures[1]);
			((Renderer)componentsInChildren[3]).material = Object.Instantiate<Material>(((Renderer)componentsInChildren[3]).material);
			((Renderer)componentsInChildren[3]).material.SetTexture("_RemapTex", scriptableObject.MiscTextures[0]);
			((Renderer)componentsInChildren[3]).material.SetFloat("_Boost", 1f);
			((Renderer)componentsInChildren[3]).material.SetFloat("_AlphaBoost", 3f);
			muzzleFlashEffect.GetComponentInChildren<Light>().color = Color32.op_Implicit(new Color32((byte)249, (byte)23, byte.MaxValue, byte.MaxValue));
			ContentAddition.AddEffect(muzzleFlashEffect);
			GameObject ghostPrefab = scriptableObject.Projectiles[0].GetComponent<ProjectileController>().ghostPrefab;
			ghostPrefab = scriptableObject.Effects[3];
			((Renderer)((Component)ghostPrefab.transform.GetChild(2)).GetComponent<ParticleSystemRenderer>()).material = SpikestripUtil.AddressablesLoad<Material>("cc20cbe750bfc654e871cd6df71758df");
			((Renderer)((Component)ghostPrefab.transform.GetChild(0)).GetComponent<MeshRenderer>()).materials = (Material[])(object)new Material[1] { SpikestripUtil.AddressablesLoad<Material>("1501cfe00570370439ba4b8b88565b12") };
			((Component)ghostPrefab.transform).GetComponentInChildren<PostProcessVolume>().profile = SpikestripUtil.AddressablesLoad<PostProcessProfile>("de37d74cae517ba4ca557bf528fd331f");
			((Renderer)((Component)ghostPrefab.transform.GetChild(5)).GetComponent<ParticleSystemRenderer>()).material = ((Renderer)componentsInChildren[3]).material;
			((Renderer)((Component)scriptableObject.Projectiles[1].GetComponent<ProjectileController>().ghostPrefab.transform.GetChild(1)).GetComponent<ParticleSystemRenderer>()).material = ((Renderer)componentsInChildren[3]).material;
			((Renderer)((Component)scriptableObject.Projectiles[2].GetComponent<ProjectileController>().ghostPrefab.transform.GetChild(1)).GetComponent<ParticleSystemRenderer>()).material = ((Renderer)componentsInChildren[3]).material;
			((Renderer)((Component)scriptableObject.Effects[2].transform.GetChild(0).GetChild(3)).GetComponent<MeshRenderer>()).material = SpikestripUtil.AddressablesLoad<Material>("1501cfe00570370439ba4b8b88565b12");
			((Renderer)((Component)scriptableObject.Effects[4].transform.GetChild(1)).GetComponent<ParticleSystemRenderer>()).material = ((Renderer)componentsInChildren[3]).material;
		}
	}
	public class Torpor : SpikestripVoidAltSkillsBase<Torpor>
	{
		public static GameObject muzzleFlashEffect;

		public static SSSkillBaseSO scriptableObject;

		public static GameObject scopeOverlayPrefab;

		public static GameObject reloadOverlayPrefab;

		public static GameObject overrideCrosshair;

		public static CharacterCameraParams cameraParams;

		public override string SkillName => "「Torpor」";

		public override string SkillDescription => scriptableObject.Description;

		public override string SkillToken => scriptableObject.SkillToken;

		public override string PrerequisiteIdentifier => scriptableObject.PrerequisiteIdentifier;

		public override string CharacterName => scriptableObject.CharacterName;

		public override string AchievementName => scriptableObject.AchievementName;

		public override Sprite SkillIcon => scriptableObject.SkillIcon;

		public override GameObject OwnerBodyPrefab => SpikestripUtil.LegacyLoad<GameObject>(scriptableObject.OwnerBodyPath);

		public override SkillFamily[] SkillFamilies => (SkillFamily[])(object)new SkillFamily[1] { SpikestripUtil.LegacyLoad<SkillFamily>(scriptableObject.SkillFamilyPath) };

		public override Type[] EntityStateTypes => new Type[5]
		{
			typeof(WindUpScopeTorpor),
			typeof(WindDownScopeTorpor),
			typeof(ActiveScopeTorpor),
			typeof(FireSnipeTorpor),
			typeof(ReloadingAgressive)
		};

		public override SkillDef GetSkillDef()
		{
			return scriptableObject.SkillDefinition;
		}

		public override void Init()
		{
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01db: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_026c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0271: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cb: Expected O, but got Unknown
			PlasmaCorePlugin.skillBaseScriptableObjects.TryGetValue(SkillName, out scriptableObject);
			scriptableObject.SkillIcon = SpikestripContent.UnsharedBundle.LoadAsset<Sprite>("texTorporIcon");
			LanguageAPI.Add("RAILGUNNER_AGRESSIVE_RELOAD_NAME", "Agressive Reload");
			LanguageAPI.Add("RAILGUNNER_AGRESSIVE_RELOAD_DESC", "Time your reload to <style=cIsVoid>fire repeatedly</style>.");
			LanguageAPI.Add("RAILGUNNER_SNIPE_TORPOR_NAME", "Fire 「Torpor」");
			LanguageAPI.Add("RAILGUNNER_SNIPE_TORPOR_DESC", "Fire a shot with your piercing <style=cIsVoid>2500% damage</style> plasma railgun.");
			LanguageAPI.Add("KEYWORD_DORMANT", "<style=cKeywordName>Dormant</style><style=cSub>Using other skills <style=cIsVoid>reduces</style> this skill's cooldown by <style=cIsVoid>1.5s</style>.");
			LanguageAPI.Add("KEYWORD_AGRESSIVE_RELOAD", "<style=cKeywordName>Aggressive Reload</style><style=cSub><style=cSub>Reload your railgun after firing. Executing a  <style=cIsVoid>perfect reload</style> immediately fires <style=cIsVoid>「Torpor」</style> again.");
			LanguageAPI.Add("RAILGUNNER_FLAVOR_SCOPETORPOR", "??? MODULE AWAKE.");
			SkillDef[] miscSkillDefs = scriptableObject.MiscSkillDefs;
			SkillDef[] array = miscSkillDefs;
			foreach (SkillDef val in array)
			{
				SpikestripUtil.FillInertSkillDef(val);
				ContentAddition.AddSkillDef(val);
			}
			scopeOverlayPrefab = PrefabAPI.InstantiateClone(SpikestripUtil.AddressablesLoad<GameObject>("db5a0c21c1f689c4292ae5e292fd4f0e"), "TorporScopeOverlay", false);
			((Graphic)((Component)scopeOverlayPrefab.transform.GetChild(1)).GetComponent<RawImage>()).color = Color32.op_Implicit(new Color32((byte)19, (byte)4, (byte)10, (byte)150));
			((Component)scopeOverlayPrefab.transform.GetChild(0)).GetComponent<SniperTargetViewer>().visualizerPrefab = scriptableObject.MiscGameObjects[0];
			reloadOverlayPrefab = PrefabAPI.InstantiateClone(SpikestripUtil.AddressablesLoad<GameObject>("6d0dc1abdc7493b4d8875a220e487de4"), "TorporReloadUI", false);
			Image[] componentsInChildren = reloadOverlayPrefab.GetComponentsInChildren<Image>(true);
			((Graphic)componentsInChildren[0]).color = Color32.op_Implicit(new Color32((byte)57, (byte)59, (byte)118, (byte)110));
			((Graphic)componentsInChildren[1]).color = Color32.op_Implicit(new Color32((byte)32, (byte)11, (byte)34, (byte)197));
			((Graphic)componentsInChildren[2]).color = Color32.op_Implicit(new Color32((byte)148, (byte)153, byte.MaxValue, byte.MaxValue));
			((Graphic)componentsInChildren[3]).color = Color32.op_Implicit(new Color32((byte)125, (byte)16, (byte)85, byte.MaxValue));
			((Graphic)componentsInChildren[4]).color = Color32.op_Implicit(new Color32((byte)207, (byte)76, (byte)202, (byte)166));
			((Graphic)componentsInChildren[5]).color = Color32.op_Implicit(new Color32((byte)174, (byte)136, byte.MaxValue, byte.MaxValue));
			((Graphic)componentsInChildren[6]).color = Color32.op_Implicit(new Color32((byte)251, (byte)220, byte.MaxValue, byte.MaxValue));
			((Graphic)componentsInChildren[7]).color = Color32.op_Implicit(new Color32((byte)219, (byte)55, (byte)177, byte.MaxValue));
			overrideCrosshair = scriptableObject.MiscGameObjects[1];
			cameraParams = Object.Instantiate<CharacterCameraParams>(SpikestripUtil.AddressablesLoad<CharacterCameraParams>("3c56c5a9e0a16c345b3aa02c048553f9"));
			cameraParams.data.fov.value = 40f;
			CharacterBody.Awake += new hook_Awake(CharacterBody_Awake);
			base.Init();
		}

		public void CharacterBody_Awake(orig_Awake orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (self.baseNameToken == "RAILGUNNER_BODY_NAME")
			{
				self.onSkillActivatedAuthority += CharacterBody_onSkillActivatedAuthority;
			}
		}

		public void CharacterBody_onSkillActivatedAuthority([NotNull] GenericSkill obj)
		{
			SkillLocator component = ((Component)obj).GetComponent<SkillLocator>();
			if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.secondary) && component.secondary.skillDef.skillName == SkillDef.skillName)
			{
				InputBankTest component2 = ((Component)obj).GetComponent<InputBankTest>();
				if (!Object.op_Implicit((Object)(object)component2) || !component2.skill2.down)
				{
					component.secondary.RunRecharge(1.5f);
				}
			}
		}
	}
	public class Weave : SpikestripVoidAltSkillsBase<Weave>
	{
		public static GameObject muzzleFlashEffect;

		public static SSSkillBaseSO scriptableObject;

		public override string SkillName => "「Weave」";

		public override string SkillDescription => scriptableObject.Description;

		public override string SkillToken => scriptableObject.SkillToken;

		public override string PrerequisiteIdentifier => scriptableObject.PrerequisiteIdentifier;

		public override string CharacterName => scriptableObject.CharacterName;

		public override string AchievementName => scriptableObject.AchievementName;

		public override Sprite SkillIcon => scriptableObject.SkillIcon;

		public override GameObject OwnerBodyPrefab => SpikestripUtil.LegacyLoad<GameObject>(scriptableObject.OwnerBodyPath);

		public override SkillFamily[] SkillFamilies => (SkillFamily[])(object)new SkillFamily[1] { SpikestripUtil.LegacyLoad<SkillFamily>(scriptableObject.SkillFamilyPath) };

		public override Type[] EntityStateTypes => new Type[1] { typeof(FireWeave) };

		public override SkillDef GetSkillDef()
		{
			return scriptableObject.SkillDefinition;
		}

		public override void Init()
		{
			PlasmaCorePlugin.skillBaseScriptableObjects.TryGetValue(SkillName, out scriptableObject);
			GameObject[] effects = scriptableObject.Effects;
			GameObject[] array = effects;
			foreach (GameObject val in array)
			{
				ContentAddition.AddEffect(val);
			}
			ContentAddition.AddBuffDef(scriptableObject.buffs[0]);
			LanguageAPI.Add("KEYWORD_ENTANGLE", "<style=cKeywordName>Entangled</style><style=cSub> enemies suffer <style=cIsVoid>50% base damage</style> when an ally is hit by this attack.</style>");
			base.Init();
		}
	}
}
namespace PlasmaCoreSpikestripContent.Content.Skills.States
{
	public class ActiveScopeTorpor : BaseActive
	{
		public override void OnEnter()
		{
			((BaseScopeState)this).cameraParams = Torpor.cameraParams;
			base.loopSound = SpikestripUtil.AddressablesLoad<LoopSoundDef>("95cebc5fd9fc83444937c4e509ab9453");
			((BaseScopeState)this).crosshairOverridePrefab = Torpor.overrideCrosshair;
			((BaseScopeState)this).scopeOverlayPrefab = Torpor.scopeOverlayPrefab;
			base.primaryOverride = Torpor.scriptableObject.MiscSkillDefs[0];
			((BaseActive)this).OnEnter();
		}

		public override BaseWindDown GetNextState()
		{
			return (BaseWindDown)(object)new WindDownScopeTorpor();
		}

		public override void OnExit()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			if (((SoundLoopPtr)(ref base.loopPtr)).isValid)
			{
				LoopSoundManager.StopSoundLoopLocal(base.loopPtr);
			}
			SkillLocator skillLocator = ((EntityState)this).skillLocator;
			GenericSkill val = (((Object)(object)skillLocator != (Object)null) ? skillLocator.primary : null);
			if (Object.op_Implicit((Object)(object)val))
			{
				val.onSkillChanged -= base.TryOverrideSkill;
			}
			if (Object.op_Implicit((Object)(object)base.overriddenSkill))
			{
				base.overriddenSkill.UnsetSkillOverride((object)this, base.primaryOverride, (SkillOverridePriority)4);
			}
			((BaseScopeState)this).EndScopeParamsOverride(0f);
			Animator modelAnimator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.SetBool(BaseScopeState.mecanimBoolName, false);
			}
			((BaseScopeState)this).RemoveOverlay(0f);
			OverrideRequest crosshairOverrideRequest = ((BaseScopeState)this).crosshairOverrideRequest;
			if (crosshairOverrideRequest != null)
			{
				crosshairOverrideRequest.Dispose();
			}
		}
	}
	public class Choke : BaseSkillState
	{
		public static float baseDuration = 0.25f;

		public float duration = 0.25f;

		public static GameObject muzzleflash;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			duration = baseDuration / ((EntityState)this).characterBody.attackSpeed;
			((EntityState)this).PlayAnimation("Gesture, Additive", "PrepWall", "PrepWall.playbackRate", duration, 0f);
			Util.PlayAttackSpeedSound("Play_voidDevastator_m1_chargeUp", ((EntityState)this).gameObject, 1.5f * ((EntityState)this).characterBody.attackSpeed);
			EffectManager.SimpleMuzzleFlash(MageChokeArea.muzzleFlashEffect, ((EntityState)this).gameObject, "MuzzleLeft", false);
			EffectManager.SimpleMuzzleFlash(MageChokeArea.muzzleFlashEffect, ((EntityState)this).gameObject, "MuzzleRight", false);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority && ((EntityState)this).age > duration && !((BaseSkillState)this).IsKeyDownAuthority())
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new ChokeFire());
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	public class ChokeFire : BaseSkillState
	{
		public static float baseDuration = 0.1f;

		public float duration = 0.25f;

		public override void OnEnter()
		{
			//IL_0090: 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_00d8: 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_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_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / ((EntityState)this).characterBody.attackSpeed;
			Util.PlayAttackSpeedSound("Play_voidDevastator_m2_secondary_explo", ((EntityState)this).gameObject, 1.5f * ((EntityState)this).characterBody.attackSpeed);
			EffectManager.SimpleMuzzleFlash(MageChokeArea.muzzleFlashEffect, ((EntityState)this).gameObject, "MuzzleLeft", false);
			EffectManager.SimpleMuzzleFlash(MageChokeArea.muzzleFlashEffect, ((EntityState)this).gameObject, "MuzzleRight", false);
			((EntityState)this).PlayAnimation("Gesture, Additive", "FireWall");
			if (((EntityState)this).isAuthority)
			{
				FireProjectileInfo val = new FireProjectileInfo
				{
					crit = ((BaseState)this).RollCrit(),
					owner = ((EntityState)this).gameObject,
					position = ((EntityState)this).characterBody.corePosition,
					projectilePrefab = MageChokeArea.scriptableObject.Projectiles[0]
				};
				Ray aimRay = ((BaseState)this).GetAimRay();
				val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction);
				val.damage = ((BaseState)this).damageStat;
				val.damageColorIndex = (DamageColorIndex)9;
				FireProjectileInfo val2 = val;
				ProjectileManager.instance.FireProjectile(val2);
				((EntityState)this).characterBody.AddBuff(MageChokeArea.scriptableObject.buffs[0]);
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).age > duration)
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.secondary))
				{
					((EntityState)this).skillLocator.secondary.SetSkillOverride((object)((EntityState)this).skillLocator.secondary, MageChokeArea.scriptableObject.MiscSkillDefs[0], (SkillOverridePriority)4);
					((EntityState)this).skillLocator.secondary.stock = ((EntityState)this).skillLocator.secondary.maxStock;
				}
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	public class FireSnipeTorpor : BaseFireSnipe
	{
		public bool highInteruptPriority;

		public FireSnipeTorpor()
		{
		}

		public FireSnipeTorpor(bool priority)
		{
			highInteruptPriority = priority;
		}

		public override void OnEnter()
		{
			base.crosshairOverridePrefab = Torpor.overrideCrosshair;
			((GenericBulletBaseState)this).hitEffectPrefab = SpikestripUtil.AddressablesLoad<GameObject>("59aeb9d13a08cee479e7d33108a8a3e9");
			((GenericBulletBaseState)this).force = 300f;
			((GenericBulletBaseState)this).fireSoundString = "Play_voidman_m2_shoot";
			((GenericBulletBaseState)this).damageCoefficient = 2f;
			base.critDamageMultiplier = 1f;
			((GenericBulletBaseState)this).bulletRadius = 0.1f;
			((GenericBulletBaseState)this).bulletCount = 8;
			((GenericBulletBaseState)this).baseDuration = 0.25f;
			base.animationStateName = "FireSniper";
			base.animationPlaybackRateParam = "FireSniper.playbackRate";
			base.animationLayerName = "Gesture, Override";
			((GenericBulletBaseState)this).recoilAmplitudeY = 5f;
			((GenericBulletBaseState)this).recoilAmplitudeX = 1.5f;
			base.queueReload = false;
			((GenericBulletBaseState)this).procCoefficient = 1f;
			base.piercingDamageCoefficientPerTarget = 0.5f;
			((GenericBulletBaseState)this).muzzleName = "MuzzleRight";
			((GenericBulletBaseState)this).muzzleFlashPrefab = SpikestripUtil.AddressablesLoad<GameObject>("899041d000ece5e49970ee1866cace48");
			((GenericBulletBaseState)this).minSpread = 0f;
			((GenericBulletBaseState)this).maxSpread = 3f;
			((GenericBulletBaseState)this).maxDistance = 2000f;
			base.isPiercing = true;
			((GenericBulletBaseState)this).useSmartCollision = true;
			base.useSecondaryStocks = true;
			((GenericBulletBaseState)this).tracerEffectPrefab = SpikestripUtil.AddressablesLoad<GameObject>("47a345efb5b31f54aadb66df3be99b26");
			((GenericBulletBaseState)this).spreadYawScale = 1f;
			((GenericBulletBaseState)this).spreadPitchScale = 0.75f;
			((GenericBulletBaseState)this).spreadBloomValue = 1f;
			base.selfKnockbackForce = 200f;
			base.piercingDamageCoefficientPerTarget = 1f;
			base.headshotSoundString = "Play_railgunner_m2_headshot";
			((BaseFireSnipe)this).OnEnter();
			Animator modelAnimator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.SetBool("isScoped", true);
			}
		}

		public override void ModifyBullet(BulletAttack bulletAttack)
		{
			//IL_001b: 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_00df: Expected O, but got Unknown
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			bulletAttack.sniper = false;
			bulletAttack.isCrit = ((EntityState)this).characterBody.RollCrit();
			bulletAttack.falloffModel = (FalloffModel)0;
			EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Reload");
			if (Object.op_Implicit((Object)(object)val))
			{
				EntityState state = val.state;
				Boosted val2 = (Boosted)(object)((state is Boosted) ? state : null);
				if (val2 != null)
				{
					bulletAttack.damage += val2.GetBonusDamage();
					val2.ConsumeBoost(false);
				}
				if (((EntityState)this).skillLocator.primary.stock <= 0)
				{
					((EntityState)this).skillLocator.secondary.AddOneStock();
					val.SetNextState((EntityState)(object)new ReloadingAgressive());
				}
			}
			if (base.isPiercing)
			{
				bulletAttack.stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask;
			}
			bulletAttack.modifyOutgoingDamageCallback = (ModifyOutgoingDamageCallback)delegate(BulletAttack _bulletAttack, ref BulletHit hitInfo, DamageInfo damageInfo)
			{
				_bulletAttack.damage *= base.piercingDamageCoefficientPerTarget;
				base.wasMiss = false;
				if (damageInfo.crit)
				{
					damageInfo.damage *= base.critDamageMultiplier;
					base.wasAtLeastOneWeakpoint = true;
				}
			};
			EntityStateMachine val3 = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Backpack");
			EntityState val4 = ((BaseFireSnipe)this).InstantiateBackpackState();
			if (Object.op_Implicit((Object)(object)val3) && val4 != null)
			{
				val3.SetNextState(val4);
			}
		}

		public override void OnExit()
		{
			((BaseFireSnipe)this).OnExit();
			Animator modelAnimator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.SetBool("isScoped", false);
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			if (highInteruptPriority)
			{
				return (InterruptPriority)2;
			}
			return ((BaseFireSnipe)this).GetMinimumInterruptPriority();
		}
	}
	public class FireVoidBolts : BaseState, IStepSetter
	{
		[SerializeField]
		public static float procCoefficient = 1f;

		[SerializeField]
		public static float damageCoefficient = 2.2f;

		[SerializeField]
		public static float force = 20f;

		public static float attackSpeedAltAnimationThreshold = 1f;

		[SerializeField]
		public static float baseDuration = 0.25f;

		[SerializeField]
		public static string attackSoundString = "Play_mage_m1_shoot";

		[SerializeField]
		public static float attackSoundPitch = 1f;

		public static float bloom = 0.2f;

		private float duration;

		private bool hasFiredGauntlet;

		private string muzzleString;

		private Transform muzzleTransform;

		private Animator animator;

		private ChildLocator childLocator;

		private Gauntlet gauntlet;

		public void SetStep(int i)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			gauntlet = (Gauntlet)i;
		}

		public override void OnEnter()
		{
			//IL_0070: 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_0076: 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_0078: 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: Invalid comparison between Unknown and I4
			((BaseState)this).OnEnter();
			duration = baseDuration / base.attackSpeedStat;
			Util.PlayAttackSpeedSound(attackSoundString, ((EntityState)this).gameObject, attackSoundPitch);
			((EntityState)this).characterBody.SetAimTimer(2f);
			animator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)animator))
			{
				childLocator = ((Component)animator).GetComponent<ChildLocator>();
			}
			Gauntlet val = gauntlet;
			Gauntlet val2 = val;
			if ((int)val2 != 0)
			{
				if ((int)val2 == 1)
				{
					muzzleString = "MuzzleRight";
					if (base.attackSpeedStat < attackSpeedAltAnimationThreshold)
					{
						((EntityState)this).PlayCrossfade("Gesture, Additive", "Cast1Right", "FireGauntlet.playbackRate", duration, 0.1f);
						((EntityState)this).PlayAnimation("Gesture Left, Additive", "Empty");
						((EntityState)this).PlayAnimation("Gesture Right, Additive", "Empty");
					}
					else
					{
						((EntityState)this).PlayAnimation("Gesture Right, Additive", "FireGauntletRight", "FireGauntlet.playbackRate", duration, 0f);
						((EntityState)this).PlayAnimation("Gesture, Additive", "HoldGauntletsUp", "FireGauntlet.playbackRate", duration, 0f);
						FireGauntlet();
					}
				}
			}
			else
			{
				muzzleString = "MuzzleLeft";
				if (base.attackSpeedStat < attackSpeedAltAnimationThreshold)
				{
					((EntityState)this).PlayCrossfade("Gesture, Additive", "Cast1Left", "FireGauntlet.playbackRate", duration, 0.1f);
					((EntityState)this).PlayAnimation("Gesture Left, Additive", "Empty");
					((EntityState)this).PlayAnimation("Gesture Right, Additive", "Empty");
				}
				else
				{
					((EntityState)this).PlayAnimation("Gesture Left, Additive", "FireGauntletLeft", "FireGauntlet.playbackRate", duration, 0f);
					((EntityState)this).PlayAnimation("Gesture, Additive", "HoldGauntletsUp", "FireGauntlet.playbackRate", duration, 0f);
					FireGauntlet();
				}
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.secondary) && ((EntityState)this).skillLocator.secondary.stock <= 0)
			{
				((EntityState)this).skillLocator.secondary.UnsetSkillOverride((object)((EntityState)this).skillLocator.secondary, MageChokeArea.scriptableObject.MiscSkillDefs[0], (SkillOverridePriority)4);
				((EntityState)this).skillLocator.secondary.RemoveAllStocks();
			}
		}

		private void FireGauntlet()
		{
			//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_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)
			if (!hasFiredGauntlet)
			{
				((EntityState)this).characterBody.AddSpreadBloom(bloom);
				hasFiredGauntlet = true;
				Ray aimRay = ((BaseState)this).GetAimRay();
				if (Object.op_Implicit((Object)(object)childLocator))
				{
					muzzleTransform = childLocator.FindChild(muzzleString);
				}
				if (Object.op_Implicit((Object)(object)MageChokeArea.muzzleFlashEffect))
				{
					EffectManager.SimpleMuzzleFlash(MageChokeArea.muzzleFlashEffect, ((EntityState)this).gameObject, muzzleString, false);
				}
				if (((EntityState)this).isAuthority)
				{
					ProjectileManager.instance.FireProjectile(MageChokeArea.scriptableObject.Projectiles[1], ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, damageCoefficient * base.damageStat, 0f, Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null);
				}
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (animator.GetFloat("FireGauntlet.fire") > 0f && !hasFiredGauntlet)
			{
				FireGauntlet();
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((