Decompiled source of Ravager v1.5.2

plugins/rob_gaming-Ravager/RedGuyMod.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AncientScepter;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.CaptainDefenseMatrixItem;
using EntityStates.Commando;
using EntityStates.Huntress;
using EntityStates.ImpMonster;
using HG;
using HG.BlendableTypes;
using JetBrains.Annotations;
using KinematicCharacterController;
using On.RoR2;
using On.RoR2.UI;
using On.RoR2.UI.MainMenu;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RedGuyMod.Content;
using RedGuyMod.Content.Components;
using RedGuyMod.Content.Survivors;
using RedGuyMod.Modules;
using RedGuyMod.Modules.Achievements;
using RedGuyMod.SkillStates;
using RedGuyMod.SkillStates.BaseStates;
using RedGuyMod.SkillStates.Emote;
using RedGuyMod.SkillStates.Ravager;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CameraModes;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.EntityLogic;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using RoR2.UI.MainMenu;
using TMPro;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("RedGuyMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RedGuyMod")]
[assembly: AssemblyTitle("RedGuyMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
public class RocketRotation : MonoBehaviour
{
	private Rigidbody rb;

	private void Awake()
	{
		rb = ((Component)this).GetComponent<Rigidbody>();
	}

	private void FixedUpdate()
	{
		//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_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		Transform transform = ((Component)this).transform;
		Vector3 velocity = rb.velocity;
		transform.rotation = Util.QuaternionSafeLookRotation(((Vector3)(ref velocity)).normalized);
	}
}
public class StupidFuckingBullshit : MonoBehaviour
{
	public ParticleSystem faggot;

	private void Awake()
	{
		faggot = ((Component)this).GetComponentInChildren<ParticleSystem>();
		((Component)faggot).transform.SetParent((Transform)null);
	}

	private void FixedUpdate()
	{
		//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)
		((Component)faggot).transform.SetPositionAndRotation(((Component)this).transform.position, ((Component)this).transform.rotation);
	}
}
[CreateAssetMenu(fileName = "rsd", menuName = "ScriptableObjects/RavagerSkinDef", order = 1)]
public class RavagerSkinDef : ScriptableObject
{
	public string nameToken = "";

	public Texture iconOverride;

	public GameObject basicSwingEffectPrefab;

	public GameObject bigSwingEffectPrefab;

	public GameObject leapEffectPrefab;

	public GameObject slashEffectPrefab;

	public GameObject bloodOrbEffectPrefab;

	public GameObject bloodBombEffectPrefab;

	public GameObject bloodRushActivationEffectPrefab;

	public Material bloodOrbOverlayMaterial;

	public Material bloodRushOverlayMaterial;

	public string consumeSoundString = "";

	public string healSoundString = "";

	public bool useAltAnimSet = false;

	public Material electricityMat;

	public Material swordElectricityMat;

	public Color glowColor = Color.red;
}
internal static class Log
{
	internal static ManualLogSource _logSource;

	internal static void Init(ManualLogSource logSource)
	{
		_logSource = logSource;
	}

	internal static void Debug(object data)
	{
		_logSource.LogDebug(data);
	}

	internal static void Error(object data)
	{
		_logSource.LogError(data);
	}

	internal static void Fatal(object data)
	{
		_logSource.LogFatal(data);
	}

	internal static void Info(object data)
	{
		_logSource.LogInfo(data);
	}

	internal static void Message(object data)
	{
		_logSource.LogMessage(data);
	}

	internal static void Warning(object data)
	{
		_logSource.LogWarning(data);
	}
}
internal enum RavagerCameraParams
{
	DEFAULT,
	AIM,
	DRAG,
	SLAM,
	CLING,
	BEAM,
	FAR,
	EMOTE
}
internal class BodyInfo
{
	internal string bodyName = "";

	internal string bodyNameToken = "";

	internal string subtitleNameToken = "";

	internal Color bodyColor = Color.white;

	public Vector3 modelBasePosition = new Vector3(0f, -0.9f, 0f);

	public Vector3 aimOrigin = new Vector3(0f, 1.4f, 0f);

	public Vector3 cameraPivot = new Vector3(0f, 1.59f, 0f);

	internal Texture characterPortrait = null;

	internal GameObject crosshair = null;

	internal GameObject podPrefab = null;

	internal float maxHealth = 100f;

	internal float healthGrowth = 2f;

	internal float healthRegen = 0f;

	internal float shield = 0f;

	internal float shieldGrowth = 0f;

	internal float moveSpeed = 7f;

	internal float moveSpeedGrowth = 0f;

	internal float acceleration = 80f;

	internal float jumpPower = 15f;

	internal float jumpPowerGrowth = 0f;

	internal float damage = 12f;

	internal float attackSpeed = 1f;

	internal float attackSpeedGrowth = 0f;

	internal float armor = 0f;

	internal float armorGrowth = 0f;

	internal float crit = 1f;

	internal float critGrowth = 0f;

	internal int jumpCount = 1;
}
internal class CustomRendererInfo
{
	internal string childName;

	internal Material material;

	internal bool ignoreOverlays;
}
internal class SkillDefInfo
{
	public string skillName;

	public string skillNameToken;

	public string skillDescriptionToken;

	public string[] keywordTokens = new string[0];

	public Sprite baseIcon;

	public Sprite empoweredIcon;

	public SerializableEntityStateType activationState;

	public InterruptPriority interruptPriority;

	public string activationStateMachineName;

	public float baseRechargeInterval;

	public int baseMaxStock = 1;

	public int rechargeStock = 1;

	public int requiredStock = 1;

	public int stockToConsume = 1;

	public bool isCombatSkill = true;

	public bool canceledFromSprinting;

	public bool forceSprintDuringState;

	public bool cancelSprintingOnActivation = true;

	public bool beginSkillCooldownOnSkillEnd;

	public bool fullRestockOnAssign = true;

	public bool resetCooldownTimerOnUse;

	public bool mustKeyPress;

	public SkillDefInfo()
	{
	}

	public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, Sprite skillIcon2, SerializableEntityStateType activationState, string activationStateMachineName, InterruptPriority interruptPriority, bool isCombatSkill, float baseRechargeInterval)
	{
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		this.skillName = skillName;
		this.skillNameToken = skillNameToken;
		this.skillDescriptionToken = skillDescriptionToken;
		baseIcon = skillIcon;
		empoweredIcon = skillIcon2;
		this.activationState = activationState;
		this.activationStateMachineName = activationStateMachineName;
		this.interruptPriority = interruptPriority;
		this.isCombatSkill = isCombatSkill;
		this.baseRechargeInterval = baseRechargeInterval;
	}

	public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, Sprite skillIcon2, SerializableEntityStateType activationState, string activationStateMachineName = "Weapon", bool agile = false)
	{
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		this.skillName = skillName;
		this.skillNameToken = skillNameToken;
		this.skillDescriptionToken = skillDescriptionToken;
		baseIcon = skillIcon;
		empoweredIcon = skillIcon2;
		this.activationState = activationState;
		this.activationStateMachineName = activationStateMachineName;
		interruptPriority = (InterruptPriority)0;
		isCombatSkill = true;
		baseRechargeInterval = 0f;
		requiredStock = 0;
		stockToConsume = 0;
		cancelSprintingOnActivation = !agile;
		if (agile)
		{
			keywordTokens = new string[1] { "KEYWORD_AGILE" };
		}
	}
}
namespace RedGuyMod
{
	internal static class RavagerSkinCatalog
	{
		internal static RavagerSkinDef[] skinDefs = new RavagerSkinDef[0];

		internal static void AddSkin(RavagerSkinDef skinDef)
		{
			Array.Resize(ref skinDefs, skinDefs.Length + 1);
			int num = skinDefs.Length - 1;
			skinDefs[num] = skinDef;
		}

		internal static RavagerSkinDef GetSkin(int index)
		{
			return skinDefs[index];
		}

		internal static RavagerSkinDef GetSkin(string nameToken)
		{
			for (int i = 0; i < skinDefs.Length; i++)
			{
				if (Object.op_Implicit((Object)(object)skinDefs[i]) && skinDefs[i].nameToken == nameToken)
				{
					return skinDefs[i];
				}
			}
			return skinDefs[0];
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.rob.Ravager", "Ravager", "1.5.2")]
	[R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI", "DirectorAPI", "LoadoutAPI", "UnlockableAPI", "NetworkingAPI", "RecalculateStatsAPI" })]
	public class MainPlugin : BaseUnityPlugin
	{
		public const string MODUID = "com.rob.Ravager";

		public const string MODNAME = "Ravager";

		public const string MODVERSION = "1.5.2";

		public const string developerPrefix = "ROB";

		public static MainPlugin instance;

		public static List<HurtBox> hurtboxesList = new List<HurtBox>();

		public static bool scepterInstalled => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter");

		public static bool rooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");

		public static bool hunkInstalled => Chainloader.PluginInfos.ContainsKey("com.rob.Hunk");

		private void Awake()
		{
			instance = this;
			Files.PluginInfo = ((BaseUnityPlugin)this).Info;
			Config.myConfig = ((BaseUnityPlugin)this).Config;
			Log.Init(((BaseUnityPlugin)this).Logger);
			Config.ReadConfig();
			Assets.PopulateAssets();
			CameraParams.InitializeParams();
			States.RegisterStates();
			Projectiles.RegisterProjectiles();
			new LanguageTokens();
			ItemDisplays.PopulateDisplays();
			NetworkingAPI.RegisterMessageType<SyncBloodWell>();
			NetworkingAPI.RegisterMessageType<SyncOrbOverlay>();
			NetworkingAPI.RegisterMessageType<SyncRevive>();
			new RedGuy().CreateCharacter();
			Hook();
			new ContentPacks().Initialize();
			ContentManager.onContentPacksAssigned += LateSetup;
		}

		private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj)
		{
			RedGuy.SetItemDisplays();
		}

		private void Hook()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			CharacterModel.UpdateOverlays += new hook_UpdateOverlays(CharacterModel_UpdateOverlays);
			CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
			HurtBox.OnEnable += new hook_OnEnable(HurtBox_OnEnable);
			HurtBox.OnDisable += new hook_OnDisable(HurtBox_OnDisable);
		}

		private void HurtBox_OnEnable(orig_OnEnable orig, HurtBox self)
		{
			orig.Invoke(self);
			hurtboxesList.Add(self);
		}

		private void HurtBox_OnDisable(orig_OnDisable orig, HurtBox self)
		{
			orig.Invoke(self);
			hurtboxesList.Remove(self);
		}

		private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self))
			{
				if (self.HasBuff(RedGuy.grabbedBuff))
				{
					self.damage = 0f;
				}
				if (self.HasBuff(RedGuy.clingDefendBuff))
				{
					self.armor += 500f;
				}
				if (self.HasBuff(RedGuy.bloodRushBuff))
				{
					self.moveSpeed += 4f;
				}
			}
		}

		private void CharacterModel_UpdateOverlays(orig_UpdateOverlays orig, CharacterModel self)
		{
			orig.Invoke(self);
			if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)self.body) || !(self.body.baseNameToken == RedGuy.bodyNameToken))
			{
				return;
			}
			RedGuyController component = ((Component)self.body).GetComponent<RedGuyController>();
			if (Object.op_Implicit((Object)(object)component) && component.draining)
			{
				RavagerOverlayTracker component2 = ((Component)self.body).GetComponent<RavagerOverlayTracker>();
				if (!Object.op_Implicit((Object)(object)component2))
				{
					component2 = ((Component)self.body).gameObject.AddComponent<RavagerOverlayTracker>();
					component2.body = self.body;
					TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)self).gameObject);
					val.duration = float.PositiveInfinity;
					val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
					val.animateShaderAlpha = true;
					val.destroyComponentOnEnd = true;
					val.originalMaterial = Assets.bloodOverlayMat;
					val.AddToCharacterModel(self);
					component2.overlay = val;
					component2.penis = component;
				}
			}
		}

		public static float GetICBMDamageMult(CharacterBody body)
		{
			float num = 1f;
			if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory))
			{
				int itemCount = body.inventory.GetItemCount(Items.MoreMissile);
				int num2 = itemCount - 1;
				if (num2 > 0)
				{
					num += (float)num2 * 0.5f;
				}
			}
			return num;
		}
	}
}
namespace RedGuyMod.SkillStates
{
	public class ConsumedDeath : GenericCharacterDeath
	{
		public override void OnEnter()
		{
			if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform))
			{
				Object.Destroy((Object)(object)((Component)((EntityState)this).modelLocator.modelTransform).gameObject);
			}
			((GenericCharacterDeath)this).OnEnter();
		}
	}
	public class FuckMyAss : GenericCharacterDeath
	{
		public override bool shouldAutoDestroy => false;

		public override void OnEnter()
		{
			//IL_0008: 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_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			((GenericCharacterDeath)this).OnEnter();
			Vector3 val = Vector3.up * 3f;
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				val += ((EntityState)this).characterMotor.velocity;
				((Behaviour)((EntityState)this).characterMotor).enabled = false;
			}
			if (!Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform))
			{
				return;
			}
			RagdollController component = ((Component)((GenericCharacterDeath)this).cachedModelTransform).GetComponent<RagdollController>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				return;
			}
			Transform[] bones = component.bones;
			foreach (Transform val2 in bones)
			{
				if (Object.op_Implicit((Object)(object)val2))
				{
					((Component)val2).gameObject.layer = LayerIndex.ragdoll.intVal;
					((Component)val2).gameObject.SetActive(true);
				}
			}
			component.BeginRagdoll(val);
		}

		public override void PlayDeathAnimation(float crossfadeDuration = 0.1f)
		{
		}

		public override void FixedUpdate()
		{
			((GenericCharacterDeath)this).FixedUpdate();
			if (NetworkServer.active && ((EntityState)this).fixedAge > 4f)
			{
				EntityState.Destroy((Object)(object)((EntityState)this).gameObject);
			}
		}

		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)7;
		}
	}
}
namespace RedGuyMod.SkillStates.Ravager
{
	public class BaseRavagerSkillState : BaseSkillState
	{
		protected RedGuyController penis;

		protected bool empowered;

		public override void OnEnter()
		{
			RefreshEmpoweredState();
			((BaseState)this).OnEnter();
			if (Object.op_Implicit((Object)(object)penis) && penis.draining && penis.passive.isAltBloodWell)
			{
				penis.meter -= 10f;
			}
		}

		protected void RefreshEmpoweredState()
		{
			if (!Object.op_Implicit((Object)(object)penis))
			{
				penis = ((EntityState)this).gameObject.GetComponent<RedGuyController>();
			}
			if (Object.op_Implicit((Object)(object)penis))
			{
				empowered = penis.draining;
			}
		}
	}
	public class BaseRavagerState : BaseState
	{
		protected RedGuyController penis;

		public override void OnEnter()
		{
			penis = ((EntityState)this).gameObject.GetComponent<RedGuyController>();
			((BaseState)this).OnEnter();
		}
	}
	public class Blink : BaseRavagerState
	{
		public float duration = 0.15f;

		public float speedCoefficient = 10f;

		public float healthCostFraction = 0.05f;

		private Transform modelTransform;

		private float stopwatch;

		private Vector3 blinkVector = Vector3.zero;

		private CharacterModel characterModel;

		private HurtBoxGroup hurtboxGroup;

		public override void OnEnter()
		{
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Expected O, but got Unknown
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: 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)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			Util.PlaySound(BlinkState.beginSoundString, ((EntityState)this).gameObject);
			modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				characterModel = ((Component)modelTransform).GetComponent<CharacterModel>();
				hurtboxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>();
			}
			if (Object.op_Implicit((Object)(object)characterModel))
			{
				CharacterModel obj = characterModel;
				obj.invisibilityCount++;
			}
			if (Object.op_Implicit((Object)(object)hurtboxGroup))
			{
				HurtBoxGroup val = hurtboxGroup;
				int hurtBoxesDeactivatorCounter = val.hurtBoxesDeactivatorCounter + 1;
				val.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter;
			}
			blinkVector = GetBlinkVector();
			CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject));
			if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).healthComponent) && !penis.draining)
			{
				DamageInfo val2 = new DamageInfo();
				val2.damage = ((EntityState)this).healthComponent.combinedHealth * healthCostFraction;
				val2.position = ((EntityState)this).characterBody.corePosition;
				val2.force = Vector3.zero;
				val2.damageColorIndex = (DamageColorIndex)0;
				val2.crit = false;
				val2.attacker = null;
				val2.inflictor = null;
				val2.damageType = DamageTypeCombo.op_Implicit((DamageType)3);
				val2.procCoefficient = 0f;
				val2.procChainMask = default(ProcChainMask);
				((EntityState)this).healthComponent.TakeDamage(val2);
			}
		}

		protected virtual Vector3 GetBlinkVector()
		{
			//IL_0007: 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_000f: Unknown result type (might be due to invalid IL or missing references)
			return ((EntityState)this).inputBank.aimDirection;
		}

		private void CreateBlinkEffect(Vector3 origin)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: 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)
			EffectData val = new EffectData();
			val.rotation = Util.QuaternionSafeLookRotation(blinkVector);
			val.origin = origin;
			EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false);
		}

		public override void FixedUpdate()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: 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_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterMotor.velocity = Vector3.zero;
				CharacterMotor characterMotor = ((EntityState)this).characterMotor;
				characterMotor.rootMotion += blinkVector * (((BaseState)this).moveSpeedStat * speedCoefficient * Time.fixedDeltaTime);
			}
			if (stopwatch >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			if (!((EntityState)this).outer.destroying)
			{
				CreateBlinkEffect(Util.GetCorePosition(((EntityState)this).gameObject));
				if (Object.op_Implicit((Object)(object)modelTransform))
				{
					TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject);
					val.duration = 0.6f;
					val.animateShaderAlpha = true;
					val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
					val.destroyComponentOnEnd = true;
					val.originalMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Imp/matImpDissolve.mat").WaitForCompletion();
					val.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>());
				}
			}
			if (Object.op_Implicit((Object)(object)characterModel))
			{
				CharacterModel obj = characterModel;
				obj.invisibilityCount--;
			}
			if (Object.op_Implicit((Object)(object)hurtboxGroup))
			{
				HurtBoxGroup val2 = hurtboxGroup;
				int hurtBoxesDeactivatorCounter = val2.hurtBoxesDeactivatorCounter - 1;
				val2.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				((EntityState)this).characterMotor.disableAirControlUntilCollision = false;
			}
			((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)1;
		}
	}
	public class BlinkBig : WallJumpBig
	{
		private Transform modelTransform;

		private CharacterModel characterModel;

		public override void OnEnter()
		{
			duration = 0.35f;
			base.OnEnter();
			modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				characterModel = ((Component)modelTransform).GetComponent<CharacterModel>();
			}
			if (Object.op_Implicit((Object)(object)characterModel))
			{
				CharacterModel obj = characterModel;
				obj.invisibilityCount++;
			}
			((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
		}

		public override void OnExit()
		{
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
			((EntityState)this).PlayAnimation("FullBody, Override Soft", "Blink");
			Util.PlaySound("sfx_ravager_sonido", ((EntityState)this).gameObject);
			base.OnExit();
			EffectData val = new EffectData();
			val.rotation = Util.QuaternionSafeLookRotation(-jumpDir);
			val.origin = Util.GetCorePosition(((EntityState)this).gameObject);
			EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false);
			if (!((BaseState)this).isGrounded)
			{
				((EntityState)this).characterMotor.velocity = Vector3.up * 10f;
			}
			if (Object.op_Implicit((Object)(object)characterModel))
			{
				CharacterModel obj = characterModel;
				obj.invisibilityCount--;
			}
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject);
				val2.duration = 0.5f;
				val2.animateShaderAlpha = true;
				val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
				val2.destroyComponentOnEnd = true;
				val2.originalMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Imp/matImpDissolve.mat").WaitForCompletion();
				val2.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>());
			}
		}

		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)3;
		}
	}
	public class BossGrab : BaseRavagerSkillState
	{
		public HealthComponent target;

		private int step;

		private float stopwatch;

		private float duration;

		public override void OnEnter()
		{
			base.OnEnter();
			((BaseState)this).SmallHop(((EntityState)this).characterMotor, 24f);
			penis.RefreshBlink();
			Util.PlaySound("sfx_ravager_grab", ((EntityState)this).gameObject);
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility);
			}
			((EntityState)this).PlayAnimation("FullBody, Override", "GrabBoss");
			if (Object.op_Implicit((Object)(object)target))
			{
				ForceFlinch(target.body);
			}
		}

		public override void FixedUpdate()
		{
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Expected O, but got Unknown
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			((BaseState)this).StartAimMode(0.5f, false);
			switch (step)
			{
			case 0:
				if (((BaseState)this).isGrounded)
				{
					if (((EntityState)this).characterMotor.velocity.y <= -8f)
					{
						((EntityState)this).characterMotor.velocity.y += -125f * Time.fixedDeltaTime;
					}
					else
					{
						((EntityState)this).characterMotor.velocity.y += -60f * Time.fixedDeltaTime;
					}
					Util.PlaySound("sfx_ravager_landing", ((EntityState)this).gameObject);
					EffectManager.SpawnEffect(Assets.groundImpactEffect, new EffectData
					{
						origin = ((EntityState)this).transform.position,
						rotation = Quaternion.identity,
						scale = 1f
					}, false);
					step++;
					stopwatch = 0f;
					duration = 3.2f;
					((EntityState)this).PlayAnimation("FullBody, Override", "GrabBossLand", "Grab.playbackRate", duration, 0f);
				}
				break;
			case 1:
				((EntityState)this).characterMotor.velocity = Vector3.zero;
				if (stopwatch >= 0.76f * duration)
				{
					step++;
					ThrowTarget();
				}
				break;
			case 2:
				((EntityState)this).characterMotor.velocity = Vector3.zero;
				if (((EntityState)this).isAuthority && stopwatch >= duration)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
				break;
			}
		}

		public override void OnExit()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).OnExit();
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
			}
			if (Object.op_Implicit((Object)(object)target))
			{
				((Component)target).GetComponent<GrabController>().Throw(((EntityState)this).characterDirection.forward, ((EntityState)this).characterBody.corePosition + ((EntityState)this).characterDirection.forward * 1.5f);
			}
		}

		public void ThrowTarget()
		{
			//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_0028: 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)
			((Component)target).GetComponent<GrabController>().Throw(((EntityState)this).characterDirection.forward, ((EntityState)this).characterBody.corePosition + ((EntityState)this).characterDirection.forward * 1.5f);
			SlamComponent slamComponent = ((Component)target).gameObject.AddComponent<SlamComponent>();
			slamComponent.attackerBody = ((EntityState)this).characterBody;
			target = null;
		}

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

		protected virtual void ForceFlinch(CharacterBody body)
		{
			if (!Util.HasEffectiveAuthority(((Component)body).gameObject))
			{
				return;
			}
			EntityStateMachine[] components = ((Component)target).GetComponents<EntityStateMachine>();
			foreach (EntityStateMachine val in components)
			{
				if (val.customName == "Body")
				{
					val.SetNextState((EntityState)(object)new FakeStun
					{
						duration = 3.2f
					});
				}
				else
				{
					val.SetNextStateToMain();
				}
			}
		}
	}
	public class BossGrabAlt : BaseRavagerSkillState
	{
		public HealthComponent target;

		public float damageCoefficient;

		public bool shouldThrow;

		private int step;

		private float stopwatch;

		private float duration;

		private CameraParamsOverrideHandle camParamsOverrideHandle;

		public override void OnEnter()
		{
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			((BaseState)this).SmallHop(((EntityState)this).characterMotor, 24f);
			penis.RefreshBlink();
			Util.PlaySound("sfx_ravager_grab", ((EntityState)this).gameObject);
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(Buffs.ArmorBoost);
			}
			camParamsOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, RavagerCameraParams.FAR);
			penis.holdingBoss = true;
			((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
			((EntityState)this).PlayAnimation("FullBody, Override", "GrabBoss");
		}

		public override void FixedUpdate()
		{
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Expected O, but got Unknown
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			((BaseState)this).StartAimMode(0.5f, false);
			switch (step)
			{
			case 0:
				if (((EntityState)this).characterMotor.velocity.y <= -8f)
				{
					((EntityState)this).characterMotor.velocity.y += -45f * Time.fixedDeltaTime;
				}
				else
				{
					((EntityState)this).characterMotor.velocity.y += -30f * Time.fixedDeltaTime;
				}
				if (((BaseState)this).isGrounded)
				{
					Util.PlaySound("sfx_ravager_landing", ((EntityState)this).gameObject);
					EffectManager.SpawnEffect(Assets.bossSlamImpact, new EffectData
					{
						origin = ((EntityState)this).transform.position,
						rotation = Quaternion.identity,
						scale = 1f
					}, false);
					step++;
					stopwatch = 0f;
					duration = 0.6f;
					((EntityState)this).PlayAnimation("FullBody, Override", "GrabBossLandAlt", "Grab.playbackRate", duration, 0f);
					if (((EntityState)this).isAuthority)
					{
						Result val = new BlastAttack
						{
							attacker = ((EntityState)this).gameObject,
							procChainMask = default(ProcChainMask),
							impactEffect = (EffectIndex)(-1),
							losType = (LoSType)0,
							damageColorIndex = (DamageColorIndex)5,
							damageType = (DamageTypeCombo.op_Implicit((DamageType)32) | DamageTypeCombo.GenericSpecial),
							procCoefficient = 1f,
							bonusForce = DashGrab.upForce * Vector3.up,
							baseForce = DashGrab.launchForce,
							baseDamage = damageCoefficient * ((BaseState)this).damageStat,
							falloffModel = (FalloffModel)0,
							radius = 20f,
							position = ((Component)target.body.mainHurtBox).transform.position,
							attackerFiltering = (AttackerFiltering)2,
							teamIndex = ((BaseState)this).GetTeam(),
							inflictor = ((EntityState)this).gameObject,
							crit = ((BaseState)this).RollCrit()
						}.Fire();
					}
					ThrowTarget();
					((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal;
					((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
				}
				break;
			case 1:
				if (((EntityState)this).isAuthority && stopwatch >= duration)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
				break;
			}
		}

		public override void OnExit()
		{
			//IL_0091: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: 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_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).OnExit();
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.RemoveBuff(Buffs.ArmorBoost);
			}
			penis.holdingBoss = false;
			if (Object.op_Implicit((Object)(object)target))
			{
				((Component)target).GetComponent<GrabController>().Throw(((EntityState)this).characterDirection.forward, ((EntityState)this).characterBody.corePosition + ((EntityState)this).characterDirection.forward * 1.5f + Vector3.up);
			}
			((EntityState)this).cameraTargetParams.RemoveParamsOverride(camParamsOverrideHandle, 0.2f);
			((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
		}

		public void ThrowTarget()
		{
			//IL_0069: 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_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)
			if (shouldThrow)
			{
				((Component)target).GetComponent<GrabController>().Throw(((EntityState)this).characterDirection.forward, ((EntityState)this).characterBody.corePosition + ((EntityState)this).characterDirection.forward * 1.5f + Vector3.up);
			}
			else
			{
				((Component)target).GetComponent<GrabController>().Release(((EntityState)this).transform.position);
			}
			target = null;
			penis.holdingBoss = false;
		}

		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)7;
		}
	}
	public class ChargeBeam : BaseRavagerSkillState
	{
		public float baseDuration = 30f;

		public static float maxDamageCoefficient = 24f;

		public static float minDamageCoefficient = 5f;

		public float minRadius = 0.1f;

		public float maxRadius = 14f;

		private float duration;

		private float stopwatch;

		private GameObject chargeEffectInstance;

		private CameraParamsOverrideHandle camParamsOverrideHandle;

		private uint playId;

		private bool isCharged;

		private Animator animator;

		private float fuckMyAss;

		private OverrideRequest crosshairOverrideRequest;

		private bool allySucc;

		protected GameObject areaIndicatorInstance { get; set; }

		private float charge
		{
			get
			{
				float num = Mathf.Clamp(stopwatch + (float)((EntityState)this).characterBody.GetBuffCount(RedGuy.projectileEatedBuff) * 1.25f, 0f, duration);
				return Util.Remap(num, 0f, duration, 0f, 1f);
			}
		}

		public override void OnEnter()
		{
			//IL_0043: 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_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			if (Object.op_Implicit((Object)(object)penis))
			{
				penis.projectilesDeleted = 0;
			}
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			camParamsOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, RavagerCameraParams.AIM, 1f);
			allySucc = Config.allySucc.Value;
			animator = ((EntityState)this).GetModelAnimator();
			((EntityState)this).PlayCrossfade("Gesture, Override", "ChargeBeam", "Beam.playbackRate", duration * 0.15f, 0.05f);
			chargeEffectInstance = Object.Instantiate<GameObject>(Assets.beamChargeEffect);
			chargeEffectInstance.transform.parent = ((BaseState)this).FindModelChild("HandL");
			chargeEffectInstance.transform.localPosition = new Vector3(-0.5f, 0f, -0.2f);
			chargeEffectInstance.transform.localRotation = Quaternion.identity;
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(Buffs.Slow50);
			}
			if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab) && ((EntityState)this).isAuthority)
			{
				areaIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab);
				areaIndicatorInstance.transform.localScale = Vector3.zero;
			}
			crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, Assets.beamCrosshair, (OverridePriority)1);
			Util.PlaySound("sfx_ravager_charge_beam", ((EntityState)this).gameObject);
			playId = Util.PlaySound("sfx_ravager_beam_loop", ((EntityState)this).gameObject);
		}

		public override void OnExit()
		{
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).OnExit();
			if (charge < 0.5f)
			{
				((EntityState)this).PlayAnimation("Gesture, Override", "FireBeam", "Beam.playbackRate", 1f, 0f);
			}
			if (Object.op_Implicit((Object)(object)areaIndicatorInstance))
			{
				EntityState.Destroy((Object)(object)areaIndicatorInstance.gameObject);
			}
			((EntityState)this).cameraTargetParams.RemoveParamsOverride(camParamsOverrideHandle, 0.2f);
			if (crosshairOverrideRequest != null)
			{
				crosshairOverrideRequest.Dispose();
			}
			if (Object.op_Implicit((Object)(object)chargeEffectInstance))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstance);
			}
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50);
				int buffCount = ((EntityState)this).characterBody.GetBuffCount(RedGuy.projectileEatedBuff);
				for (int i = 0; i < buffCount; i++)
				{
					((EntityState)this).characterBody.RemoveBuff(RedGuy.projectileEatedBuff);
				}
			}
			AkSoundEngine.StopPlayingID(playId);
			penis.projectilesDeleted = 0;
		}

		public override void Update()
		{
			((EntityState)this).Update();
			UpdateAreaIndicator();
		}

		public override void FixedUpdate()
		{
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if (empowered)
			{
				stopwatch += 10f * Time.fixedDeltaTime;
			}
			((EntityState)this).characterBody.outOfCombatStopwatch = 0f;
			((BaseState)this).StartAimMode(0.5f, false);
			((EntityState)this).characterBody.isSprinting = false;
			if (((EntityState)this).isAuthority)
			{
				if (((ButtonState)(ref ((EntityState)this).inputBank.skill1)).justPressed)
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new FireBullet
					{
						charge = charge
					});
					return;
				}
				if (((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed)
				{
					ThrowOrb(charge);
					((EntityState)this).outer.SetNextState((EntityState)(object)new ThrowOrb());
					return;
				}
			}
			if (Object.op_Implicit((Object)(object)areaIndicatorInstance))
			{
				float num = Util.Remap(charge, 0f, 1f, minRadius, maxRadius);
				areaIndicatorInstance.transform.localScale = new Vector3(num, num, num);
			}
			if (!isCharged && charge >= 1f)
			{
				isCharged = true;
				Util.PlaySound("sfx_ravager_beam_maxcharge", ((EntityState)this).gameObject);
				((EntityState)this).PlayCrossfade("Gesture, Override", "ChargeBeamMax", "Beam.playbackRate", 1f, 0.05f);
			}
			CheckForProjectiles();
			chargeEffectInstance.transform.localScale = Vector3.one * Util.Remap(charge, 0f, 1f, 0f, 2f);
			penis.chargeValue = charge;
			if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill3.down)
			{
				FireBeam();
			}
		}

		private void UpdateAreaIndicator()
		{
			//IL_001b: 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_0021: 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_007d: 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_009a: 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_0060: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)areaIndicatorInstance))
			{
				float num = 3000f;
				Ray aimRay = ((BaseState)this).GetAimRay();
				RaycastHit val = default(RaycastHit);
				if (Physics.Raycast(aimRay, ref val, num, LayerMask.op_Implicit(CommonMasks.bullet)))
				{
					areaIndicatorInstance.transform.position = ((RaycastHit)(ref val)).point;
					areaIndicatorInstance.transform.up = ((RaycastHit)(ref val)).normal;
				}
				else
				{
					areaIndicatorInstance.transform.position = ((Ray)(ref aimRay)).GetPoint(num);
					areaIndicatorInstance.transform.up = -((Ray)(ref aimRay)).direction;
				}
				if (((EntityState)this).isAuthority)
				{
					areaIndicatorInstance.SetActive(((EntityState)this).inputBank.skill2.down);
				}
			}
		}

		protected virtual void EatProjectile(ProjectileController pc)
		{
			//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_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Expected O, but got Unknown
			Util.PlaySound("sfx_ravager_beam_consume", ((Component)pc).gameObject);
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff);
				penis.projectilesDeleted++;
				if (((EntityState)this).fixedAge <= 0.5f)
				{
					((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff);
					penis.projectilesDeleted++;
					((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff);
					penis.projectilesDeleted++;
					((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff);
					penis.projectilesDeleted++;
				}
				Object.Destroy((Object)(object)((Component)pc).gameObject);
				if (Object.op_Implicit((Object)(object)DefenseMatrixOn.tracerEffectPrefab))
				{
					EffectData val = new EffectData
					{
						origin = chargeEffectInstance.transform.position,
						start = ((Component)pc).transform.position
					};
					EffectManager.SpawnEffect(DefenseMatrixOn.tracerEffectPrefab, val, true);
				}
			}
		}

		protected virtual void CheckForProjectiles()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: 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)
			Collider[] array = Physics.OverlapSphere(chargeEffectInstance.transform.position, 12f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.projectile)).mask));
			for (int i = 0; i < array.Length; i++)
			{
				ProjectileController componentInParent = ((Component)array[i]).GetComponentInParent<ProjectileController>();
				if (!Object.op_Implicit((Object)(object)componentInParent) || !((Object)(object)componentInParent.owner != (Object)(object)((EntityState)this).gameObject))
				{
					continue;
				}
				if (!allySucc)
				{
					if (componentInParent.teamFilter.teamIndex != ((BaseState)this).GetTeam())
					{
						EatProjectile(componentInParent);
					}
				}
				else
				{
					EatProjectile(componentInParent);
				}
			}
		}

		protected virtual void FireBeam()
		{
			if (charge >= 0.5f)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new FireBeam
				{
					charge = charge
				});
			}
			else
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new FireBullet
				{
					charge = charge
				});
			}
		}

		private void ThrowOrb(float storedCharge)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			penis.lastChargeAmount = storedCharge;
			if (((EntityState)this).isAuthority)
			{
				float num = Util.Remap(storedCharge, 0f, 1f, minDamageCoefficient, maxDamageCoefficient);
				Ray aimRay = ((BaseState)this).GetAimRay();
				ProjectileManager instance = ProjectileManager.instance;
				FireProjectileInfo val = new FireProjectileInfo
				{
					crit = ((BaseState)this).RollCrit(),
					damage = num * ((BaseState)this).damageStat,
					damageColorIndex = (DamageColorIndex)0,
					force = 4000f,
					owner = ((EntityState)this).gameObject,
					position = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * 0.5f,
					procChainMask = default(ProcChainMask),
					projectilePrefab = Projectiles.orbBomb,
					rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction)
				};
				((FireProjectileInfo)(ref val)).speedOverride = 60f;
				val._speedOverride = 60f;
				val.useFuseOverride = false;
				val.useSpeedOverride = true;
				instance.FireProjectileServer(val, (NetworkConnection)null, (ushort)0, 0.0);
			}
		}

		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)3;
		}
	}
	public class ChargeBlink : ChargeJump
	{
		private Transform modelTransform;

		private GameObject predictionEffectInstance;

		public override void OnEnter()
		{
			//IL_007f: 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)
			duration = 0.6f;
			base.OnEnter();
			modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject);
				val.duration = duration;
				val.animateShaderAlpha = true;
				val.alphaCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
				val.destroyComponentOnEnd = true;
				val.originalMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Imp/matImpDissolve.mat").WaitForCompletion();
				val.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>());
			}
			if (((EntityState)this).isAuthority)
			{
				predictionEffectInstance = Object.Instantiate<GameObject>(Assets.blinkPredictionEffect);
			}
		}

		public override void OnExit()
		{
			base.OnExit();
			if (!Object.op_Implicit((Object)(object)predictionEffectInstance))
			{
				return;
			}
			ParticleSystem[] componentsInChildren = predictionEffectInstance.GetComponentsInChildren<ParticleSystem>();
			foreach (ParticleSystem val in componentsInChildren)
			{
				if (Object.op_Implicit((Object)(object)val))
				{
					val.Stop();
				}
			}
			Object.Destroy((Object)(object)predictionEffectInstance, 5f);
		}

		public override void FixedUpdate()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: 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)
			base.FixedUpdate();
			((EntityState)this).characterBody.isSprinting = true;
			if (Object.op_Implicit((Object)(object)predictionEffectInstance))
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				float num = Mathf.Clamp(((EntityState)this).characterBody.moveSpeed, 1f, 18f);
				float num2 = Mathf.Clamp01(Util.Remap(((EntityState)this).fixedAge, 0f, duration, 0f, 1f));
				float num3 = 0.35f;
				float num4 = (jumpForce = Util.Remap(num2, 0f, 1f, 0.1773399f, 0.37334976f) * ((EntityState)this).characterBody.jumpPower * num);
				Vector3 position = ((EntityState)this).transform.position + ((Ray)(ref aimRay)).direction * (jumpForce * 1.5f * num3);
				predictionEffectInstance.transform.position = position;
			}
		}

		protected override void PlayAnim()
		{
			((EntityState)this).PlayCrossfade("Body", "BlinkCharge", "Jump.playbackRate", duration, 0.1f);
		}

		protected override void SetJumpTime()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_0014: 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)
			//IL_001e: 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)
			jumpTime = 0.5f;
			EffectData val = new EffectData();
			val.rotation = Util.QuaternionSafeLookRotation(jumpDir);
			val.origin = Util.GetCorePosition(((EntityState)this).gameObject);
			EffectManager.SpawnEffect(BlinkState.blinkPrefab, val, false);
		}

		protected override void NextState()
		{
			//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)
			((EntityState)this).outer.SetNextState((EntityState)(object)new BlinkBig
			{
				jumpDir = jumpDir,
				jumpForce = jumpForce * 1.5f
			});
		}

		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)3;
		}
	}
	public class ChargeJump : BaseRavagerState
	{
		public float duration = 0.65f;

		public bool hopoo = false;

		private Vector3 origin;

		private ParticleSystem x1;

		private ParticleSystem x2;

		protected float jumpTime;

		private bool hasJumped;

		protected Vector3 jumpDir;

		protected float jumpForce;

		private bool isSliding;

		private uint playID;

		private bool permaCling;

		private Animator animator;

		private bool snapped;

		public override void OnEnter()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			origin = ((EntityState)this).transform.position;
			((EntityState)this).PlayAnimation("FullBody, Override Soft", "BufferEmpty");
			permaCling = Config.permanentCling.Value;
			penis.isWallClinging = true;
			penis.skibidi = true;
			animator = ((EntityState)this).GetModelAnimator();
			SnapToGround();
			PlayAnim();
			x1 = ((Component)((BaseState)this).FindModelChild("FootChargeL")).gameObject.GetComponent<ParticleSystem>();
			x2 = ((Component)((BaseState)this).FindModelChild("FootChargeR")).gameObject.GetComponent<ParticleSystem>();
			x1.Play();
			x2.Play();
			if (!Object.op_Implicit((Object)(object)penis) || !Object.op_Implicit((Object)(object)penis.skinDef) || penis.skinDef.glowColor.a != 0f)
			{
				playID = Util.PlaySound("sfx_ravager_charge_jump", ((EntityState)this).gameObject);
			}
			penis.IncrementWallJump();
		}

		private void SnapToGround()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			RaycastHit val = default(RaycastHit);
			if (Physics.Raycast(origin, Vector3.down, ref val, 3f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
			{
				snapped = true;
			}
		}

		protected virtual void PlayAnim()
		{
			if (hopoo)
			{
				((EntityState)this).PlayCrossfade("Body", "JumpChargeHopoo", "Jump.playbackRate", duration, 0.1f);
			}
			else
			{
				((EntityState)this).PlayCrossfade("Body", "JumpCharge", "Jump.playbackRate", duration, 0.1f);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			((EntityState)this).PlayAnimation("Body", "AscendDescend");
			penis.isWallClinging = false;
			x1.Stop();
			x2.Stop();
			AkSoundEngine.StopPlayingID(playID);
		}

		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)3;
		}

		public override void FixedUpdate()
		{
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0326: Unknown result type (might be due to invalid IL or missing references)
			//IL_032d: Unknown result type (might be due to invalid IL or missing references)
			//IL_033e: Expected O, but got Unknown
			((EntityState)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)animator))
			{
				if (((BaseState)this).isGrounded || snapped)
				{
					animator.SetFloat("airBlend", 0f);
				}
				else
				{
					animator.SetFloat("airBlend", 1f);
				}
			}
			if (hasJumped)
			{
				jumpTime -= Time.fixedDeltaTime;
				if (jumpTime <= 0f)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
				else
				{
					((EntityState)this).characterMotor.velocity = jumpDir * jumpForce;
				}
				if (((BaseState)this).isGrounded && !isSliding)
				{
					((EntityState)this).PlayAnimation("Body", "Sprint");
					((EntityState)this).PlayAnimation("FullBody, Override Soft", "Slide");
					isSliding = true;
				}
				((EntityState)this).characterDirection.moveVector = jumpDir;
			}
			else
			{
				if (!((EntityState)this).isAuthority)
				{
					return;
				}
				((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(origin, true);
				((EntityState)this).characterMotor.velocity = Vector3.zero;
				if (((EntityState)this).inputBank.skill1.down)
				{
					EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Weapon").SetInterruptState((EntityState)(object)new ChargeSlash(), (InterruptPriority)1);
				}
				if ((!(((EntityState)this).fixedAge >= duration) || permaCling) && ((EntityState)this).inputBank.jump.down)
				{
					return;
				}
				x1.Stop();
				x2.Stop();
				if (((EntityState)this).fixedAge <= 0.2f)
				{
					GenericCharacterMain.ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, 1.6f, 1.5f, false);
					((EntityState)this).outer.SetNextState((EntityState)(object)new WallJumpSmall());
					return;
				}
				((EntityState)this).characterBody.isSprinting = true;
				float num = 15f;
				((BaseState)this).AddRecoil(-1f * num, -2f * num, -0.5f * num, 0.5f * num);
				float num2 = Mathf.Clamp01(Util.Remap(((EntityState)this).fixedAge, 0f, duration, 0f, 1f));
				Ray aimRay = ((BaseState)this).GetAimRay();
				jumpDir = ((Ray)(ref aimRay)).direction;
				float num3 = Mathf.Clamp(((EntityState)this).characterBody.moveSpeed, 1f, 18f);
				jumpForce = Util.Remap(num2, 0f, 1f, 0.1773399f, 0.37334976f) * ((EntityState)this).characterBody.jumpPower * num3;
				((EntityState)this).characterMotor.velocity = jumpDir * jumpForce;
				hasJumped = true;
				SetJumpTime();
				if (hopoo)
				{
					EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/FeatherEffect"), new EffectData
					{
						origin = ((EntityState)this).characterBody.footPosition
					}, true);
				}
				NextState();
			}
		}

		protected virtual void SetJumpTime()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: 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_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: 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_005c: Expected O, but got Unknown
			jumpTime = 0.25f;
			EffectData val = new EffectData
			{
				origin = ((EntityState)this).transform.position + Vector3.up * 0.75f
			};
			Ray aimRay = ((BaseState)this).GetAimRay();
			val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction);
			val.scale = 1f;
			EffectData val2 = val;
			EffectManager.SpawnEffect(penis.skinDef.leapEffectPrefab, val2, true);
		}

		protected virtual void NextState()
		{
			//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)
			((EntityState)this).outer.SetNextState((EntityState)(object)new WallJumpBig
			{
				jumpDir = jumpDir,
				jumpForce = jumpForce
			});
		}
	}
	public class ChargeSlash : BaseRavagerSkillState
	{
		public override void OnEnter()
		{
			base.OnEnter();
			((EntityState)this).PlayCrossfade("Gesture, Override", "ChargeSlash", "Slash.playbackRate", 0.3f, 0.1f);
			Util.PlaySound("sfx_ravager_foley_01", ((EntityState)this).gameObject);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority && ((!((EntityState)this).inputBank.skill1.down && ((EntityState)this).fixedAge >= 0.1f) || (((BaseState)this).isGrounded && ((EntityState)this).fixedAge >= 1.25f)) && !penis.isWallClinging)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new ThrowSlash());
			}
		}

		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 Cling : GenericCharacterMain
	{
		public HurtBox targetHurtbox;

		public Vector3 offset;

		public GameObject anchor;

		private Transform modelTransform;

		private RedGuyController penis;

		private CameraParamsOverrideHandle camParamsOverrideHandle;

		private OverrideRequest crosshairOverrideRequest;

		private bool cancelling;

		public override void OnEnter()
		{
			//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)
			((GenericCharacterMain)this).OnEnter();
			((Behaviour)((EntityState)this).characterDirection).enabled = false;
			((Behaviour)((EntityState)this).modelLocator).enabled = false;
			modelTransform = ((EntityState)this).GetModelTransform();
			penis = ((EntityState)this).GetComponent<RedGuyController>();
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(Buffs.ArmorBoost);
			}
			penis.clingTimer = 8f;
			((EntityState)this).skillLocator.primary.SetSkillOverride((object)this, RedGuy.clingSlashSkillDef, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.secondary.SetSkillOverride((object)this, RedGuy.clingStabSkillDef, (SkillOverridePriority)4);
			if (((EntityState)this).skillLocator.utility.skillDef.skillNameToken == RedGuy.healNameToken)
			{
				((EntityState)this).skillLocator.utility.SetSkillOverride((object)this, RedGuy.clingHealSkillDef, (SkillOverridePriority)4);
			}
			else
			{
				((EntityState)this).skillLocator.utility.SetSkillOverride((object)this, RedGuy.clingBeamSkillDef, (SkillOverridePriority)4);
			}
			camParamsOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, RavagerCameraParams.CLING, 1f);
			crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, Assets.clingCrosshair, (OverridePriority)1);
			((EntityState)this).gameObject.layer = LayerIndex.ignoreRaycast.intVal;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
		}

		public override void OnExit()
		{
			//IL_007a: 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)
			((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
			((GenericCharacterMain)this).OnExit();
			((Behaviour)((EntityState)this).characterDirection).enabled = true;
			((Behaviour)((EntityState)this).modelLocator).enabled = true;
			penis.clingTimer = 0f;
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.RemoveBuff(Buffs.ArmorBoost);
			}
			((EntityState)this).cameraTargetParams.RemoveParamsOverride(camParamsOverrideHandle, 0.2f);
			if (crosshairOverrideRequest != null)
			{
				crosshairOverrideRequest.Dispose();
			}
			((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)this, RedGuy.clingSlashSkillDef, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.secondary.UnsetSkillOverride((object)this, RedGuy.clingStabSkillDef, (SkillOverridePriority)4);
			if (((EntityState)this).skillLocator.utility.skillDef.skillNameToken == RedGuy.healNameToken)
			{
				((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)this, RedGuy.clingHealSkillDef, (SkillOverridePriority)4);
			}
			else
			{
				((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)this, RedGuy.clingBeamSkillDef, (SkillOverridePriority)4);
			}
		}

		public override bool CanExecuteSkill(GenericSkill skillSlot)
		{
			if ((Object)(object)skillSlot == (Object)(object)((EntityState)this).skillLocator.special)
			{
				return false;
			}
			return ((GenericCharacterMain)this).CanExecuteSkill(skillSlot);
		}

		public override void HandleMovements()
		{
		}

		public override void ProcessJump()
		{
		}

		public override void FixedUpdate()
		{
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: 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_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_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			((GenericCharacterMain)this).FixedUpdate();
			((EntityState)this).characterBody.isSprinting = false;
			if (((EntityState)this).isAuthority)
			{
				if (Object.op_Implicit((Object)(object)targetHurtbox) && Object.op_Implicit((Object)(object)anchor) && targetHurtbox.healthComponent.alive)
				{
					((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(anchor.transform.position, true);
					if (Object.op_Implicit((Object)(object)modelTransform))
					{
						Transform obj = modelTransform;
						Vector3 val = ((Component)targetHurtbox).transform.position - ((EntityState)this).transform.position;
						obj.rotation = Util.QuaternionSafeLookRotation(((Vector3)(ref val)).normalized);
						modelTransform.position = ((EntityState)this).transform.position;
					}
				}
				else
				{
					cancelling = true;
				}
				if (((ButtonState)(ref ((EntityState)this).inputBank.jump)).justPressed)
				{
					cancelling = true;
				}
				if (penis.clingTimer <= 0f)
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new ClingFlourish());
					return;
				}
				((EntityState)this).characterMotor.velocity = Vector3.zero;
			}
			if (cancelling)
			{
				((EntityState)this).PlayAnimation("FullBody, Override Soft", "JumpEnemy");
				((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
				((EntityState)this).characterMotor.velocity = Vector3.up * 20f;
				Util.PlaySound("sfx_ravager_enemystep", ((EntityState)this).gameObject);
				((EntityState)this).outer.SetNextStateToMain();
			}
			else if (((EntityState)this).isAuthority && ((ButtonState)(ref ((EntityState)this).inputBank.skill4)).justPressed)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new ClingFlourish());
			}
		}
	}
	public class ClingChargeBeam : BaseRavagerSkillState
	{
		public float baseDuration = 30f;

		public static float maxDamageCoefficient = 24f;

		public static float minDamageCoefficient = 2f;

		public float minRadius = 0.1f;

		public float maxRadius = 14f;

		private float duration;

		private float stopwatch;

		private GameObject chargeEffectInstance;

		private uint playId;

		private bool isCharged;

		private Animator animator;

		private float fuckMyAss;

		private OverrideRequest crosshairOverrideRequest;

		private bool allySucc;

		private float charge
		{
			get
			{
				float num = Mathf.Clamp(stopwatch + (float)((EntityState)this).characterBody.GetBuffCount(RedGuy.projectileEatedBuff) * 1.25f, 0f, duration);
				return Util.Remap(num, 0f, duration, 0f, 1f);
			}
		}

		public override void OnEnter()
		{
			//IL_00bf: 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)
			base.OnEnter();
			if (Object.op_Implicit((Object)(object)penis))
			{
				penis.projectilesDeleted = 0;
			}
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			allySucc = Config.allySucc.Value;
			animator = ((EntityState)this).GetModelAnimator();
			((EntityState)this).PlayCrossfade("FullBody, Override", "ClingChargeBeam", "Beam.playbackRate", duration * 0.1f, 0.05f);
			chargeEffectInstance = Object.Instantiate<GameObject>(Assets.beamChargeEffect);
			chargeEffectInstance.transform.parent = ((BaseState)this).FindModelChild("HandL");
			chargeEffectInstance.transform.localPosition = new Vector3(-0.5f, 0f, -0.2f);
			chargeEffectInstance.transform.localRotation = Quaternion.identity;
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(Buffs.Slow50);
			}
			crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, Assets.clingBeamCrosshair, (OverridePriority)2);
			Util.PlaySound("sfx_ravager_charge_beam", ((EntityState)this).gameObject);
			playId = Util.PlaySound("sfx_ravager_beam_loop", ((EntityState)this).gameObject);
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			((EntityState)this).PlayAnimation("FullBody, Override", "ClingSlash1", "Slash.playbackRate", 1f, 0f);
			if (crosshairOverrideRequest != null)
			{
				crosshairOverrideRequest.Dispose();
			}
			if (Object.op_Implicit((Object)(object)chargeEffectInstance))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstance);
			}
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50);
				int buffCount = ((EntityState)this).characterBody.GetBuffCount(RedGuy.projectileEatedBuff);
				for (int i = 0; i < buffCount; i++)
				{
					((EntityState)this).characterBody.RemoveBuff(RedGuy.projectileEatedBuff);
				}
			}
			AkSoundEngine.StopPlayingID(playId);
			penis.projectilesDeleted = 0;
		}

		public override void FixedUpdate()
		{
			//IL_0177: 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)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if (empowered)
			{
				stopwatch += 10f * Time.fixedDeltaTime;
			}
			((EntityState)this).characterBody.outOfCombatStopwatch = 0f;
			penis.clingTimer += Time.fixedDeltaTime;
			((BaseState)this).StartAimMode(0.5f, false);
			((EntityState)this).characterBody.isSprinting = false;
			if (Object.op_Implicit((Object)(object)animator))
			{
				float num = 0f;
				if (((EntityState)this).inputBank.skill2.down)
				{
					num = -1f;
				}
				else if (((EntityState)this).inputBank.skill1.down)
				{
					num = 1f;
				}
				fuckMyAss = Mathf.Lerp(fuckMyAss, num, Time.fixedDeltaTime * 8f);
				animator.SetFloat("beamType", fuckMyAss);
			}
			if (!isCharged && charge >= 1f)
			{
				isCharged = true;
				Util.PlaySound("sfx_ravager_beam_maxcharge", ((EntityState)this).gameObject);
				((EntityState)this).PlayCrossfade("FullBody, Override", "ClingChargeBeamMax", "Beam.playbackRate", 0.5f, 0.05f);
			}
			CheckForProjectiles();
			chargeEffectInstance.transform.localScale = Vector3.one * Util.Remap(charge, 0f, 1f, 0f, 2f);
			penis.chargeValue = charge;
			if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill3.down)
			{
				FireBeam();
			}
		}

		protected virtual void EatProjectile(ProjectileController pc)
		{
			//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_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Expected O, but got Unknown
			Util.PlaySound("sfx_ravager_beam_consume", ((Component)pc).gameObject);
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff);
				penis.projectilesDeleted++;
				if (((EntityState)this).fixedAge <= 0.5f)
				{
					((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff);
					penis.projectilesDeleted++;
					((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff);
					penis.projectilesDeleted++;
					((EntityState)this).characterBody.AddBuff(RedGuy.projectileEatedBuff);
					penis.projectilesDeleted++;
				}
				Object.Destroy((Object)(object)((Component)pc).gameObject);
				if (Object.op_Implicit((Object)(object)DefenseMatrixOn.tracerEffectPrefab))
				{
					EffectData val = new EffectData
					{
						origin = chargeEffectInstance.transform.position,
						start = ((Component)pc).transform.position
					};
					EffectManager.SpawnEffect(DefenseMatrixOn.tracerEffectPrefab, val, true);
				}
			}
		}

		protected virtual void CheckForProjectiles()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: 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)
			Collider[] array = Physics.OverlapSphere(chargeEffectInstance.transform.position, 12f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.projectile)).mask));
			for (int i = 0; i < array.Length; i++)
			{
				ProjectileController componentInParent = ((Component)array[i]).GetComponentInParent<ProjectileController>();
				if (!Object.op_Implicit((Object)(object)componentInParent) || !((Object)(object)componentInParent.owner != (Object)(object)((EntityState)this).gameObject))
				{
					continue;
				}
				if (!allySucc)
				{
					if (componentInParent.teamFilter.teamIndex != ((BaseState)this).GetTeam())
					{
						EatProjectile(componentInParent);
					}
				}
				else
				{
					EatProjectile(componentInParent);
				}
			}
		}

		protected virtual void FireBeam()
		{
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: 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_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//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_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: 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_0203: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0209: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: 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_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: Unknown result type (might be due to invalid IL or missing references)
			//IL_028d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_029f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02da: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e3: Expected O, but got Unknown
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			float num = charge;
			float num2 = Util.Remap(num, 0f, 1f, 1f, 16f);
			((BaseState)this).AddRecoil(-0.4f * num2, -0.8f * num2, -0.3f * num2, 0.3f * num2);
			((EntityState)this).characterBody.AddSpreadBloom(4f);
			if (charge >= 0.75f)
			{
				EffectManager.SimpleMuzzleFlash(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ImpBoss/ImpBossBlink.prefab").WaitForCompletion(), ((EntityState)this).gameObject, "HandL", true);
			}
			else if (charge >= 0.25f)
			{
				EffectManager.SimpleMuzzleFlash(Assets.cssEffect, ((EntityState)this).gameObject, "HandL", true);
			}
			else
			{
				EffectManager.SimpleMuzzleFlash(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Golem/MuzzleflashGolem.prefab").WaitForCompletion(), ((EntityState)this).gameObject, "HandL", true);
			}
			Util.PlaySound("sfx_ravager_blast", ((EntityState)this).gameObject);
			GameObject val = null;
			GameObject val2 = null;
			val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/Railgunner/TracerRailgunSuper.prefab").WaitForCompletion();
			val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Golem/ExplosionGolem.prefab").WaitForCompletion();
			if (num >= 0.5f)
			{
				val.transform.GetChild(4).GetChild(3).localScale = Vector3.one * 6f;
			}
			float damage = Util.Remap(num, 0f, 1f, ChargeBeam.minDamageCoefficient, ChargeBeam.maxDamageCoefficient) * ((BaseState)this).damageStat;
			Ray aimRay = ((BaseState)this).GetAimRay();
			BulletAttack val3 = new BulletAttack
			{
				aimVector = ((Ray)(ref aimRay)).direction,
				origin = ((Ray)(ref aimRay)).origin,
				damage = damage,
				damageColorIndex = (DamageColorIndex)0,
				damageType = (DamageTypeCombo.op_Implicit((DamageType)32) | DamageTypeCombo.GenericUtility),
				falloffModel = (FalloffModel)0,
				maxDistance = 2000f,
				force = Util.Remap(num, 0f, 1f, 5f, 5000f),
				hitMask = CommonMasks.bullet,
				isCrit = ((BaseState)this).RollCrit(),
				owner = ((EntityState)this).gameObject,
				muzzleName = "HandL",
				smartCollision = true,
				procChainMask = default(ProcChainMask),
				procCoefficient = 1f,
				radius = Util.Remap(num, 0f, 1f, 0f, 5f),
				sniper = false,
				stopperMask = ((LayerIndex)(ref LayerIndex.noCollision)).mask,
				weapon = null,
				tracerEffectPrefab = val,
				spreadPitchScale = 1f,
				spreadYawScale = 1f,
				queryTriggerInteraction = (QueryTriggerInteraction)0,
				hitEffectPrefab = val2,
				HitEffectNormal = Object.op_Implicit((Object)(object)val2),
				maxSpread = 0f,
				minSpread = 0f,
				bulletCount = 1u
			};
			val3.Fire();
			((EntityState)this).outer.SetNextStateToMain();
		}

		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)3;
		}
	}
	public class ClingDefend : BaseRavagerSkillState
	{
		private Transform modelTransform;

		private TemporaryOverlay temporaryOverlay;

		public override void OnEnter()
		{
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			modelTransform = ((EntityState)this).GetModelTransform();
			((EntityState)this).PlayCrossfade("FullBody, Override", "ClingDefend", 0.05f);
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(RedGuy.clingDefendBuff);
			}
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				temporaryOverlay = ((Component)modelTransform).gameObject.AddComponent<TemporaryOverlay>();
				temporaryOverlay.duration = 1000f;
				temporaryOverlay.animateShaderAlpha = true;
				temporaryOverlay.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
				temporaryOverlay.destroyComponentOnEnd = true;
				temporaryOverlay.originalMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Imp/matImpDissolve.mat").WaitForCompletion();
				temporaryOverlay.AddToCharacerModel(((Component)modelTransform).GetComponent<CharacterModel>());
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			((EntityState)this).PlayAnimation("FullBody, Override", "ClingDefendOff");
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.RemoveBuff(RedGuy.clingDefendBuff);
			}
			if (Object.op_Implicit((Object)(object)temporaryOverlay))
			{
				EntityState.Destroy((Object)(object)temporaryOverlay);
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill3.down && ((EntityState)this).fixedAge >= 0.1f)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		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 ClingFlourish : BaseMeleeAttack
	{
		public static float _damageCoefficient = 10f;

		private GameObject swingEffectInstance;

		public override void OnEnter()
		{
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			RefreshEmpoweredState();
			hitboxName = "Sword";
			damageCoefficient = _damageCoefficient;
			pushForce = 200f;
			baseDuration = 1.4f;
			if (empowered)
			{
				baseDuration *= 0.65f;
			}
			baseEarlyExitTime = 0.5f;
			attackRecoil = 2f / ((BaseState)this).attackSpeedStat;
			attackStartTime = 0.21f;
			attackEndTime = 0.5f;
			hitStopDuration = 0.32f;
			smoothHitstop = true;
			swingSoundString = "sfx_ravager_bigswing";
			swingEffectPrefab = penis.skinDef.bigSwingEffectPrefab;
			hitSoundString = "";
			hitEffectPrefab = penis.skinDef.slashEffectPrefab;
			impactSound = Assets.bigSlashSoundEvent.index;
			damageType = DamageTypeCombo.op_Implicit((DamageType)32) | DamageTypeCombo.GenericSpecial;
			muzzleString = "SwingMuzzleLeap";
			Util.PlaySound("sfx_ravager_foley_01", ((EntityState)this).gameObject);
			base.OnEnter();
		}

		protected override void OnHitEnemyAuthority(int amount)
		{
			base.OnHitEnemyAuthority(amount);
			if (Object.op_Implicit((Object)(object)penis))
			{
				penis.FillGauge(1.5f + (float)amount * 0.5f);
				penis.RefreshBlink();
			}
		}

		protected override void FireAttack()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//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)
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				Vector3 direction = ((Ray)(ref aimRay)).direction;
				direction.y = Mathf.Max(direction.y, direction.y * 0.5f);
				((BaseState)this).FindModelChild("SwordPivot").rotation = Util.QuaternionSafeLookRotation(direction);
				EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Body").SetNextStateToMain();
				CharacterMotor characterMotor = ((EntityState)this).characterMotor;
				aimRay = ((BaseState)this).GetAimRay();
				characterMotor.velocity = -((Ray)(ref aimRay)).direction * 25f;
				((EntityState)this).transform.parent = null;
			}
			base.FireAttack();
		}

		protected override void PlaySwingEffect()
		{
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			Util.PlaySound(swingSoundString, ((EntityState)this).gameObject);
			if (!Object.op_Implicit((Object)(object)swingEffectPrefab))
			{
				return;
			}
			Transform val = ((BaseState)this).FindModelChild(muzzleString);
			if (Object.op_Implicit((Object)(object)val))
			{
				swingEffectInstance = Object.Instantiate<GameObject>(swingEffectPrefab, val);
				Transform transform = swingEffectInstance.transform;
				transform.localScale *= 1.5f;
				ScaleParticleSystemDuration component = swingEffectInstance.GetComponent<ScaleParticleSystemDuration>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.newDuration = component.initialDuration;
				}
			}
		}

		protected override void TriggerHitStop()
		{
			base.TriggerHitStop();
			if (Object.op_Implicit((Object)(object)swingEffectInstance))
			{
				ScaleParticleSystemDuration component = swingEffectInstance.GetComponent<ScaleParticleSystemDuration>();
				if (Object.op_