Decompiled source of Ravager v1.4.3

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 BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.CaptainDefenseMatrixItem;
using EntityStates.Commando;
using EntityStates.GolemMonster;
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 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,
	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.4.3")]
	[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.4.3";

		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);
			((EntityState)this).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 ChargeBeam : 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 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_0133: 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_01d6: 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 (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 (Object.op_Implicit((Object)(object)areaIndicatorInstance))
			{
				float num2 = Util.Remap(charge, 0f, 1f, minRadius, maxRadius);
				areaIndicatorInstance.transform.localScale = new Vector3(num2, num2, num2);
			}
			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()
		{
			//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_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Expected O, but got Unknown
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0215: 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_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_0343: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Unknown result type (might be due to invalid IL or missing references)
			//IL_0357: Unknown result type (might be due to invalid IL or missing references)
			//IL_035c: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03df: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0403: Unknown result type (might be due to invalid IL or missing references)
			//IL_0408: Unknown result type (might be due to invalid IL or missing references)
			//IL_040a: Unknown result type (might be due to invalid IL or missing references)
			//IL_040f: Unknown result type (might be due to invalid IL or missing references)
			//IL_041b: Unknown result type (might be due to invalid IL or missing references)
			//IL_043b: Unknown result type (might be due to invalid IL or missing references)
			//IL_043c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0441: Unknown result type (might be due to invalid IL or missing references)
			//IL_0446: Unknown result type (might be due to invalid IL or missing references)
			//IL_0452: Unknown result type (might be due to invalid IL or missing references)
			//IL_045e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0469: Unknown result type (might be due to invalid IL or missing references)
			//IL_0470: Unknown result type (might be due to invalid IL or missing references)
			//IL_0476: Unknown result type (might be due to invalid IL or missing references)
			//IL_047c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0487: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04be: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_050a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0515: Unknown result type (might be due to invalid IL or missing references)
			//IL_051e: Expected O, but got Unknown
			//IL_038b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0395: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_0287: Unknown result type (might be due to invalid IL or missing references)
			//IL_0293: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b5: Expected O, but got Unknown
			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);
			if (((EntityState)this).inputBank.skill2.down)
			{
				((EntityState)this).PlayAnimation("Gesture, Override", "FireBeam", "Beam.playbackRate", 1f, 0f);
				if (((EntityState)this).isAuthority)
				{
					float baseDamage = Util.Remap(num, 0f, 1f, minDamageCoefficient, maxDamageCoefficient) * ((BaseState)this).damageStat;
					float radius = Util.Remap(num, 0f, 1f, minRadius, maxRadius);
					BlastAttack val = new BlastAttack();
					val.radius = radius;
					val.procCoefficient = 1f;
					val.position = areaIndicatorInstance.transform.position;
					val.attacker = ((EntityState)this).gameObject;
					val.crit = ((BaseState)this).RollCrit();
					val.baseDamage = baseDamage;
					val.falloffModel = (FalloffModel)0;
					val.baseForce = Util.Remap(num, 0f, 1f, 10f, 8000f);
					val.teamIndex = ((EntityState)this).teamComponent.teamIndex;
					val.damageType = DamageTypeCombo.op_Implicit((DamageType)32);
					val.attackerFiltering = (AttackerFiltering)2;
					val.Fire();
				}
				Transform modelTransform = ((EntityState)this).GetModelTransform();
				if (Object.op_Implicit((Object)(object)modelTransform))
				{
					ChildLocator component = ((Component)modelTransform).GetComponent<ChildLocator>();
					if (Object.op_Implicit((Object)(object)component))
					{
						int num3 = component.FindChildIndex("HandL");
						if (Object.op_Implicit((Object)(object)FireLaser.tracerEffectPrefab))
						{
							EffectData val2 = new EffectData
							{
								origin = areaIndicatorInstance.transform.position
							};
							Ray aimRay = ((BaseState)this).GetAimRay();
							val2.start = ((Ray)(ref aimRay)).origin;
							EffectData val3 = val2;
							val3.SetChildLocatorTransformReference(((EntityState)this).gameObject, num3);
							EffectManager.SpawnEffect(FireLaser.tracerEffectPrefab, val3, true);
							EffectManager.SpawnEffect(FireLaser.hitEffectPrefab, val3, true);
						}
					}
				}
				((EntityState)this).outer.SetNextStateToMain();
				return;
			}
			if (num >= 0.5f && !((EntityState)this).inputBank.skill1.down)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new FireBeam
				{
					charge = num
				});
				return;
			}
			GameObject val4 = null;
			GameObject val5 = null;
			val4 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/Railgunner/TracerRailgunSuper.prefab").WaitForCompletion();
			val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Golem/ExplosionGolem.prefab").WaitForCompletion();
			if (num >= 0.5f)
			{
				val4.transform.GetChild(4).GetChild(3).localScale = Vector3.one * 6f;
			}
			float damage = Util.Remap(num, 0f, 1f, minDamageCoefficient, maxDamageCoefficient) * ((BaseState)this).damageStat;
			Ray aimRay2 = ((BaseState)this).GetAimRay();
			BulletAttack val6 = new BulletAttack
			{
				aimVector = ((Ray)(ref aimRay2)).direction,
				origin = ((Ray)(ref aimRay2)).origin,
				damage = damage,
				damageColorIndex = (DamageColorIndex)0,
				damageType = DamageTypeCombo.op_Implicit((DamageType)32),
				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 = val4,
				spreadPitchScale = 1f,
				spreadYawScale = 1f,
				queryTriggerInteraction = (QueryTriggerInteraction)0,
				hitEffectPrefab = val5,
				HitEffectNormal = Object.op_Implicit((Object)(object)val5),
				maxSpread = 0f,
				minSpread = 0f,
				bulletCount = 1u
			};
			val6.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 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_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			((GenericCharacterMain)this).OnEnter();
			((Behaviour)((EntityState)this).characterDirection).enabled = false;
			((Behaviour)((EntityState)this).modelLocator).enabled = false;
			modelTransform = ((EntityState)this).GetModelTransform();
			penis = ((EntityState)this).GetComponent<RedGuyController>();
			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);
			((EntityState)this).skillLocator.special.SetSkillOverride((object)this, RedGuy.clingFlourishSkillDef, (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_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).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;
			((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);
			((EntityState)this).skillLocator.special.UnsetSkillOverride((object)this, RedGuy.clingFlourishSkillDef, (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 void HandleMovements()
		{
		}

		public override void ProcessJump()
		{
		}

		public override void FixedUpdate()
		{
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: 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_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			((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)
				{
					cancelling = true;
				}
				((EntityState)this).characterMotor.velocity = Vector3.zero;
			}
			if (cancelling)
			{
				((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
				((EntityState)this).characterMotor.velocity = Vector3.up * 15f;
				((EntityState)this).outer.SetNextStateToMain();
			}
		}
	}
	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_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_026c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: 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_0283: 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_0295: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: 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),
				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)
			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 = (DamageType)32;
			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_Implicit((Object)(object)component))
				{
					component.newDuration = 20f;
				}
			}
		}

		protected override void ClearHitStop()
		{
			base.ClearHitStop();
			if (Object.op_Implicit((Object)(object)swingEffectInstance))
			{
				ScaleParticleSystemDuration component = swingEffectInstance.GetComponent<ScaleParticleSystemDuration>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.newDuration = component.initialDuration;
				}
			}
		}

		protected override void PlayAttackAnimation()
		{
			((EntityState)this).PlayCrossfade("FullBody, Override", "ClingFlourish", "Slash.playbackRate", duration, 0.1f);
		}

		protected override void SetNextState()
		{
		}

		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 ClingHeal : BaseRavagerSkillState
	{
		public static float maxDamageCoefficient = 24f;

		public static float minDamageCoefficient = 6f;

		private float amount;

		private float charge;

		public override void OnEnter()
		{
			//IL_032e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0333: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_030c: Expected O, but got Unknown
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: 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_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_026c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0271: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_0278: Unknown result type (might be due to invalid IL or missing references)
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			if (Object.op_Implicit((Object)(object)penis))
			{
				Util.PlaySound(penis.skinDef.healSoundString, ((EntityState)this).gameObject);
				if (((EntityState)this).isAuthority)
				{
					charge = Util.Remap(penis.meter, 0f, 100f, 0f, 1f);
					amount = Util.Remap(penis.meter, 0f, 100f, 0f, ((EntityState)this).healthComponent.fullHealth * 0.5f);
				}
				penis.meter = 0f;
				penis.storedHealth = 0f;
				if (charge > 0f)
				{
					if (empowered)
					{
						((EntityState)this).PlayCrossfade("FullBody, Override", "ClingHealBlast", "Heal.playbackRate", 1.5f, 0.05f);
					}
					else if (charge > 0.5f)
					{
						((EntityState)this).PlayCrossfade("FullBody, Override", "ClingHeal", "Heal.playbackRate", 1.25f, 0.05f);
					}
					else
					{
						((EntityState)this).PlayCrossfade("FullBody, Override", "ClingHealLow", "Heal.playbackRate", 0.8f, 0.05f);
					}
				}
				if (amount > 0f)
				{
					if (empowered)
					{
						if (NetworkServer.active)
						{
							((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 1.5f);
						}
						if (((EntityState)this).isAuthority)
						{
							Result val = new BlastAttack
							{
								attacker = ((EntityState)this).gameObject,
								procChainMask = default(ProcChainMask),
								impactEffect = (EffectIndex)(-1),
								losType = (LoSType)0,
								damageColorIndex = (DamageColorIndex)0,
								damageType = DamageTypeCombo.op_Implicit((DamageType)32),
								procCoefficient = 1f,
								bonusForce = 400f * Vector3.up,
								baseForce = 2000f,
								baseDamage = Util.Remap(charge, 0f, 1f, Heal.maxDamageCoefficient, Heal.maxDamageCoefficient) * ((BaseState)this).damageStat,
								falloffModel = (FalloffModel)0,
								radius = 16f,
								position = ((EntityState)this).characterBody.corePosition,
								attackerFiltering = (AttackerFiltering)2,
								teamIndex = ((BaseState)this).GetTeam(),
								inflictor = ((EntityState)this).gameObject,
								crit = ((BaseState)this).RollCrit()
							}.Fire();
						}
						Util.PlaySound("sfx_ravager_explosion", ((EntityState)this).gameObject);
						EffectManager.SpawnEffect(penis.skinDef.bloodBombEffectPrefab, new EffectData
						{
							origin = ((EntityState)this).transform.position + Vector3.up * 1.8f,
							rotation = Quaternion.identity,
							scale = 1f
						}, false);
					}
					if (NetworkServer.active)
					{
						ConsumeOrb consumeOrb = new ConsumeOrb();
						((Orb)consumeOrb).origin = ((BaseState)this).FindModelChild("HandR").position;
						((Orb)consumeOrb).target = ((EntityState)this).characterBody.mainHurtBox;
						consumeOrb.healOverride = amount;
						OrbManager.instance.AddOrb((Orb)(object)consumeOrb);
					}
				}
			}
			if (((EntityState)this).isAuthority && !((BaseState)this).isGrounded)
			{
				if (!empowered)
				{
					((BaseState)this).SmallHop(((EntityState)this).characterMotor, Util.Remap(charge, 0f, 1f, 8f, 12f));
				}
				else
				{
					((BaseState)this).SmallHop(((EntityState)this).characterMotor, 16f);
				}
			}
			((EntityState)this).outer.SetNextStateToMain();
		}

		public override void OnSerialize(NetworkWriter writer)
		{
			((BaseSkillState)this).OnSerialize(writer);
			writer.Write(amount);
			writer.Write(charge);
		}

		public override void OnDeserialize(NetworkReader reader)
		{