Decompiled source of FenrisSkills v1.1.1

FenrisSkills.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.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.Captain.Weapon;
using EntityStates.Drifter;
using EntityStates.Loader;
using EntityStates.Railgunner.Backpack;
using EntityStates.Railgunner.Weapon;
using FenrisSkills.Skills;
using FenrisSkills.Skills.Components;
using FenrisSkills.Skills.States.Captain;
using FenrisSkills.Skills.States.Chef;
using FenrisSkills.Skills.States.Loader;
using FenrisSkills.Skills.States.Railgunner;
using Microsoft.CodeAnalysis;
using On.EntityStates.Loader;
using On.RoR2;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using Rewired.ComponentControls.Effects;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Audio;
using RoR2.ContentManagement;
using RoR2.EntityLogic;
using RoR2.ExpansionManagement;
using RoR2.HudOverlay;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using TMPro;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.UI;

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

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace FenrisSkills
{
	public class Assets
	{
		public static AssetBundle assetBundle;

		public static GameObject railCannonProjectilePrefab;

		public static GameObject railCannonBulletTracerPrefab;

		public static GameObject railCannonBulletTracerCritPrefab;

		public static GameObject railCannonImpactPrefab;

		public static GameObject pyroOverlayPrefab;

		public static GameObject pyroTracerColdEffectPrefab;

		public static GameObject pyroHitColdEffectPrefab;

		public static GameObject pyroTracerWarmEffectPrefab;

		public static GameObject pyroHitWarmEffectPrefab;

		public static GameObject pyroTracerHotEffectPrefab;

		public static GameObject pyroHitHotEffectPrefab;

		public static GameObject mineExplosiveProjectilePrefab;

		public static Material stackingParryBuffOverlayMaterial;

		public static Material stackingParryFlashOverlayMaterial;

		public static GameObject stackingParryEffectPrefab;

		public static void Init()
		{
			GetAssetBundle();
			TryBuildAsset("Rail Cannon Assets", CreateRailCannonAssets);
			TryBuildAsset("Snipe Pyro Assets", CreateSnipePyroAssets);
			TryBuildAsset("Mine Explosive Assets", CreateMineExplosiveAssets);
			TryBuildAsset("Stacking Parry Assets", CreateStackingParryAssets);
		}

		private static void TryBuildAsset(string assetName, Action buildAction)
		{
			try
			{
				buildAction();
			}
			catch (Exception arg)
			{
				Log.Warning($"Failed to complete building asset {assetName}!\n\n{arg}");
			}
		}

		private static void GetAssetBundle()
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("FenrisSkills.mwmwfskillsbundle");
			if (stream != null)
			{
				assetBundle = AssetBundle.LoadFromStream(stream);
			}
		}

		private static void CreateRailCannonAssets()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			GameObject railCannonProjectileChild = assetBundle.LoadAsset<GameObject>("SpawnBulletProjectile");
			railCannonProjectileChild.AddComponent<CreateRailgunBullet>();
			railCannonProjectilePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Captain.CaptainAirstrikeProjectile1_prefab).WaitForCompletion(), "RailCannonProjectile");
			TryBuildAsset("Rail Cannon Projectile Prefab", delegate
			{
				ProjectileImpactExplosion component = railCannonProjectilePrefab.GetComponent<ProjectileImpactExplosion>();
				((ProjectileExplosion)component).fireChildren = true;
				((ProjectileExplosion)component).childrenCount = 1;
				((ProjectileExplosion)component).childrenDamageCoefficient = 1f;
				((ProjectileExplosion)component).childrenProjectilePrefab = railCannonProjectileChild;
				((ProjectileExplosion)component).blastRadius = 0f;
			});
			railCannonBulletTracerPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.TracerRailgunSuper_prefab).WaitForCompletion(), "RailCannonTracer", false);
			TryBuildAsset("Rail Cannon Bullet Tracer Prefab", delegate
			{
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0036: Unknown result type (might be due to invalid IL or missing references)
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_005f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0080: Unknown result type (might be due to invalid IL or missing references)
				//IL_008a: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b2: Expected O, but got Unknown
				//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
				Tracer component = railCannonBulletTracerPrefab.GetComponent<Tracer>();
				component.beamDensity = 1f;
				component.speed = 600f;
				railCannonBulletTracerPrefab.transform.localScale = Vector3.one * 6f;
				railCannonBulletTracerPrefab.transform.Find("FX/BeamParticles, Rings").localScale = Vector3.one * 20f;
				Transform val = railCannonBulletTracerPrefab.transform.Find("FX/mdlRailgunnerBeam");
				val.localScale = Vector3.one * 2f;
				SkinnedMeshRenderer component2 = ((Component)val.Find("mdlRailgunnerBeamMesh")).GetComponent<SkinnedMeshRenderer>();
				Material val2 = new Material(((Renderer)component2).sharedMaterial);
				val2.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampGolem_png).WaitForCompletion());
				val2.SetFloat("_AlphaBoost", 5f);
				val2.SetInt("_Cull", 0);
				((Renderer)component2).sharedMaterial = val2;
			});
			railCannonBulletTracerCritPrefab = PrefabAPI.InstantiateClone(railCannonBulletTracerPrefab, "RailCannonTracerCrit", false);
			TryBuildAsset("Rail Cannon Bullet Tracer Crit Prefab", delegate
			{
				//IL_0021: Unknown result type (might be due to invalid IL or missing references)
				//IL_0027: Expected O, but got Unknown
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				SkinnedMeshRenderer component = ((Component)railCannonBulletTracerCritPrefab.transform.Find("FX/mdlRailgunnerBeam/mdlRailgunnerBeamMesh")).GetComponent<SkinnedMeshRenderer>();
				Material val = new Material(((Renderer)component).sharedMaterial);
				val.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_DLC2_Items_SpeedBoostPickup.texSpeedBoostPickupThornRamp_png).WaitForCompletion());
				((Renderer)component).sharedMaterial = val;
			});
			railCannonImpactPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Captain.CaptainAirstrikeAltImpact_prefab).WaitForCompletion(), "RailCannonImpact", false);
			TryBuildAsset("Rail Cannon Impact Prefab", delegate
			{
				//IL_0063: 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_0103: 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_0133: Unknown result type (might be due to invalid IL or missing references)
				//IL_0138: Unknown result type (might be due to invalid IL or missing references)
				//IL_016f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0174: Unknown result type (might be due to invalid IL or missing references)
				Object.Destroy((Object)(object)railCannonImpactPrefab.GetComponent<AlignToNormal>());
				Object.Destroy((Object)(object)((Component)railCannonImpactPrefab.transform.Find("captain fletchette")).gameObject);
				Object.Destroy((Object)(object)((Component)railCannonImpactPrefab.transform.Find("PP")).GetComponent<SphereCollider>());
				railCannonImpactPrefab.transform.Find("Particles").localScale = Vector3.one * 3f;
				railCannonImpactPrefab.AddComponent<DestroyOnTimer>().duration = 10f;
				EffectComponent component = railCannonImpactPrefab.GetComponent<EffectComponent>();
				component.applyScale = false;
				component.soundName = "Play_railgunner_R_fire";
				ShakeEmitter component2 = railCannonImpactPrefab.GetComponent<ShakeEmitter>();
				component2.wave.amplitude = 3f;
				component2.wave.frequency = 30f;
				component2.duration = 0.4f;
				component2.radius = 200f;
				((Component)railCannonImpactPrefab.transform.Find("Particles/Flames")).transform.localScale = Vector3.one * 3f;
				ParticleSystem component3 = ((Component)railCannonImpactPrefab.transform.Find("Particles/Dust, Directional")).GetComponent<ParticleSystem>();
				ShapeModule shape = component3.shape;
				((ShapeModule)(ref shape)).radius = ((ShapeModule)(ref shape)).radius * 3f;
				Transform val = railCannonImpactPrefab.transform.Find("Particles/Decal");
				((Component)val).GetComponent<MeshFilter>().sharedMesh = Addressables.LoadAssetAsync<Mesh>((object)RoR2_DLC2_FalseSonBoss.meshLunarRainSummonVFX1_FBX_Sphere001_).WaitForCompletion();
				((Renderer)((Component)val).GetComponent<MeshRenderer>()).sharedMaterial = assetBundle.LoadAsset<Material>("InvisibleMaterial");
			});
			railCannonProjectilePrefab.GetComponent<ProjectileImpactExplosion>().impactEffect = railCannonImpactPrefab;
			GameObject railCannonGhostPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Captain.CaptainAirstrikeAltGhost_prefab).WaitForCompletion(), "RailCannonGhost", false);
			TryBuildAsset("Rail Cannon Ghost Prefab", delegate
			{
				//IL_000d: 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_00bb: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
				Transform transform = railCannonGhostPrefab.transform;
				transform.localScale *= 0.7f;
				Object.Destroy((Object)(object)((Component)railCannonGhostPrefab.transform.Find("AirstrikeOrientation")).gameObject);
				Object.Destroy((Object)(object)railCannonGhostPrefab.GetComponent<AkEvent>());
				Object.Destroy((Object)(object)railCannonGhostPrefab.GetComponent<StartEvent>());
				Object.Destroy((Object)(object)railCannonGhostPrefab.GetComponent<OnEnableEvent>());
				Object.Destroy((Object)(object)railCannonGhostPrefab.GetComponent<DelayedEvent>());
				PlaySoundOnDelay playSoundOnDelay = railCannonGhostPrefab.AddComponent<PlaySoundOnDelay>();
				playSoundOnDelay.soundString = "Play_captain_shift_preImpact";
				playSoundOnDelay.delay = 0.8f;
				GameObject obj = railCannonGhostPrefab;
				AkBank[] array = new AkBank[1];
				GameObject obj2 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.RailgunnerBody_prefab).WaitForCompletion();
				array[0] = ((obj2 != null) ? obj2.GetComponent<AkBank>() : null);
				GiveAkBanksToObject(obj, (AkBank[])(object)array);
				ProjectileController component = railCannonProjectilePrefab.GetComponent<ProjectileController>();
				component.ghostPrefabAddress = null;
				component.ghostPrefab = railCannonGhostPrefab;
				Transform val = railCannonGhostPrefab.transform.Find("AreaIndicatorCenter");
				((Component)val).GetComponent<RotateAroundAxis>().slowRotationSpeed = 40f;
				((Component)val.Find("IndicatorRing")).GetComponent<ObjectScaleCurve>().timeMax = 2f;
				ObjectTransformCurve[] componentsInChildren = ((Component)val).GetComponentsInChildren<ObjectTransformCurve>();
				ObjectTransformCurve[] array2 = componentsInChildren;
				foreach (ObjectTransformCurve val2 in array2)
				{
					val2.timeMax = 2f;
				}
			});
			Content.CreateAndAddEffectDef(railCannonImpactPrefab);
			Content.CreateAndAddEffectDef(railCannonBulletTracerPrefab);
			Content.CreateAndAddEffectDef(railCannonBulletTracerCritPrefab);
			ContentPacks.projectilePrefabs.Add(railCannonProjectileChild);
			ContentPacks.projectilePrefabs.Add(railCannonProjectilePrefab);
		}

		private static void CreateSnipePyroAssets()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			pyroOverlayPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.RailgunnerOverchargeUIReady_prefab).WaitForCompletion(), "PyroSnipeOverlay", false);
			TryBuildAsset("Pyro Overlay Prefab", delegate
			{
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_0038: Unknown result type (might be due to invalid IL or missing references)
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_003f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0075: Unknown result type (might be due to invalid IL or missing references)
				//IL_0099: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
				Color val = default(Color);
				((Color)(ref val))..ctor(1f, 0.48f, 0.27f);
				TextMeshProUGUI component = ((Component)pyroOverlayPrefab.transform.Find("BarContainer/SoftGlow/Text, Normal")).GetComponent<TextMeshProUGUI>();
				((TMP_Text)component).m_fontColor32 = Color32.op_Implicit(val);
				((TMP_Text)component).m_fontColor = val;
				Color color = default(Color);
				((Color)(ref color))..ctor(0.99f, 0.56f, 0.39f);
				Image component2 = ((Component)pyroOverlayPrefab.transform.Find("BarContainer/Inner/FillBarDimensions/FillBar")).GetComponent<Image>();
				((Graphic)component2).color = color;
				Image component3 = ((Component)pyroOverlayPrefab.transform.Find("BarContainer/Inner/SpinnySquare")).GetComponent<Image>();
				((Graphic)component3).color = color;
				Image component4 = ((Component)pyroOverlayPrefab.transform.Find("BarContainer/Outer")).GetComponent<Image>();
				((Graphic)component4).color = color;
				PyroUIColorController pyroUIColorController = pyroOverlayPrefab.AddComponent<PyroUIColorController>();
				pyroUIColorController.imagesToUpdate = (Image[])(object)new Image[3] { component2, component3, component4 };
			});
			pyroTracerColdEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.TracerRailgunSuper_prefab).WaitForCompletion(), "PyroTracerCold", false);
			TryBuildAsset("Pyro Tracer Cold Effect Prefab", delegate
			{
				//IL_000e: 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_0047: Unknown result type (might be due to invalid IL or missing references)
				//IL_004d: Expected O, but got Unknown
				//IL_0073: 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_00ad: Expected O, but got Unknown
				//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ed: Expected O, but got Unknown
				//IL_0127: Unknown result type (might be due to invalid IL or missing references)
				//IL_012e: Expected O, but got Unknown
				//IL_0168: Unknown result type (might be due to invalid IL or missing references)
				//IL_016f: Expected O, but got Unknown
				//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
				//IL_01b0: Expected O, but got Unknown
				//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
				//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
				VFXAttributes val = pyroTracerColdEffectPrefab.AddComponent<VFXAttributes>();
				val.vfxPriority = (VFXPriority)2;
				Texture val2 = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampGolem_png).WaitForCompletion();
				LineRenderer component = ((Component)pyroTracerColdEffectPrefab.transform.Find("FX/Brief/Beam, Flash Briefly")).GetComponent<LineRenderer>();
				Material val3 = new Material(((Renderer)component).sharedMaterial);
				val3.SetFloat("_Boost", 3.5f);
				val3.SetColor("_TintColor", new Color(0.67f, 0.03f, 0f));
				((Renderer)component).sharedMaterial = val3;
				component = ((Component)pyroTracerColdEffectPrefab.transform.Find("FX/Longer/Beam, Linger")).GetComponent<LineRenderer>();
				Material val4 = new Material(((Renderer)component).sharedMaterial);
				val4.SetTexture("_RemapTex", val2);
				((Renderer)component).sharedMaterial = val4;
				SkinnedMeshRenderer component2 = ((Component)pyroTracerColdEffectPrefab.transform.Find("FX/mdlRailgunnerBeam/mdlRailgunnerBeamMesh")).GetComponent<SkinnedMeshRenderer>();
				Material val5 = new Material(((Renderer)component2).sharedMaterial);
				val5.SetTexture("_RemapTex", val2);
				((Renderer)component2).sharedMaterial = val5;
				ParticleSystemRenderer component3 = ((Component)pyroTracerColdEffectPrefab.transform.Find("FX/BeamParticles, Rings")).GetComponent<ParticleSystemRenderer>();
				Material val6 = new Material(((Renderer)component3).sharedMaterial);
				val6.SetTexture("_RemapTex", val2);
				((Renderer)component3).sharedMaterial = val6;
				component3 = ((Component)pyroTracerColdEffectPrefab.transform.Find("FX/BeamParticles, Rings/BeamParticles, Small")).GetComponent<ParticleSystemRenderer>();
				Material val7 = new Material(((Renderer)component3).sharedMaterial);
				val7.SetTexture("_RemapTex", val2);
				((Renderer)component3).sharedMaterial = val7;
				component3 = ((Component)pyroTracerColdEffectPrefab.transform.Find("TracerHead/HarshGlow, Billboard")).GetComponent<ParticleSystemRenderer>();
				Material val8 = new Material(((Renderer)component3).sharedMaterial);
				val8.SetTexture("_RemapTex", val2);
				((Renderer)component3).sharedMaterial = val8;
				((Component)pyroTracerColdEffectPrefab.transform.Find("StartTransform/PP")).GetComponent<PostProcessVolume>().sharedProfile = Addressables.LoadAssetAsync<PostProcessProfile>((object)RoR2_DLC3_SolusHeart.ppvSHLaser_asset).WaitForCompletion();
			});
			pyroHitColdEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.ImpactRailgun_prefab).WaitForCompletion(), "PyroHitCold", false);
			TryBuildAsset("Pyro Hit Cold Effect Prefab", delegate
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				//IL_003b: Expected O, but got Unknown
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Expected O, but got Unknown
				//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b2: Expected O, but got Unknown
				//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
				Texture val = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampGolem_png).WaitForCompletion();
				ParticleSystemRenderer component = ((Component)pyroHitColdEffectPrefab.transform.Find("BeamParticles, Small")).GetComponent<ParticleSystemRenderer>();
				Material val2 = new Material(((Renderer)component).sharedMaterial);
				val2.SetTexture("_RemapTex", val);
				((Renderer)component).sharedMaterial = val2;
				component = ((Component)pyroHitColdEffectPrefab.transform.Find("Flash,White")).GetComponent<ParticleSystemRenderer>();
				Material val3 = new Material(((Renderer)component).sharedMaterial);
				val3.SetTexture("_RemapTex", val);
				((Renderer)component).sharedMaterial = val3;
				component = ((Component)pyroHitColdEffectPrefab.transform.Find("Daggers")).GetComponent<ParticleSystemRenderer>();
				Material val4 = new Material(((Renderer)component).sharedMaterial);
				val4.SetTexture("_RemapTex", val);
				((Renderer)component).sharedMaterial = val4;
				MainModule main = ((Component)pyroHitColdEffectPrefab.transform.Find("Shockwave")).GetComponent<ParticleSystem>().main;
				((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(0.89f, 0.13f, 0.11f));
			});
			pyroTracerWarmEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.TracerRailgunSuper_prefab).WaitForCompletion(), "PyroTracerWarm", false);
			TryBuildAsset("Pyro Tracer Warm Effect Prefab", delegate
			{
				//IL_000e: 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_0047: Unknown result type (might be due to invalid IL or missing references)
				//IL_004d: Expected O, but got Unknown
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ab: Expected O, but got Unknown
				//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00eb: Expected O, but got Unknown
				//IL_0125: Unknown result type (might be due to invalid IL or missing references)
				//IL_012c: Expected O, but got Unknown
				//IL_0166: Unknown result type (might be due to invalid IL or missing references)
				//IL_016d: Expected O, but got Unknown
				//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c0: Expected O, but got Unknown
				//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
				//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
				VFXAttributes val = pyroTracerWarmEffectPrefab.AddComponent<VFXAttributes>();
				val.vfxPriority = (VFXPriority)2;
				Texture val2 = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampMagmaWorm_png).WaitForCompletion();
				LineRenderer component = ((Component)pyroTracerWarmEffectPrefab.transform.Find("FX/Brief/Beam, Flash Briefly")).GetComponent<LineRenderer>();
				Material val3 = new Material(((Renderer)component).sharedMaterial);
				val3.SetTexture("_RemapTex", val2);
				val3.SetFloat("_Boost", 7f);
				val3.SetColor("_TintColor", Color.white);
				((Renderer)component).sharedMaterial = val3;
				component = ((Component)pyroTracerWarmEffectPrefab.transform.Find("FX/Longer/Beam, Linger")).GetComponent<LineRenderer>();
				Material val4 = new Material(((Renderer)component).sharedMaterial);
				val4.SetTexture("_RemapTex", val2);
				((Renderer)component).sharedMaterial = val4;
				SkinnedMeshRenderer component2 = ((Component)pyroTracerWarmEffectPrefab.transform.Find("FX/mdlRailgunnerBeam/mdlRailgunnerBeamMesh")).GetComponent<SkinnedMeshRenderer>();
				Material val5 = new Material(((Renderer)component2).sharedMaterial);
				val5.SetTexture("_RemapTex", val2);
				((Renderer)component2).sharedMaterial = val5;
				ParticleSystemRenderer component3 = ((Component)pyroTracerWarmEffectPrefab.transform.Find("FX/BeamParticles, Rings")).GetComponent<ParticleSystemRenderer>();
				Material val6 = new Material(((Renderer)component3).sharedMaterial);
				val6.SetTexture("_RemapTex", val2);
				((Renderer)component3).sharedMaterial = val6;
				component3 = ((Component)pyroTracerWarmEffectPrefab.transform.Find("FX/BeamParticles, Rings/BeamParticles, Small")).GetComponent<ParticleSystemRenderer>();
				Material val7 = new Material(((Renderer)component3).sharedMaterial);
				val7.SetTexture("_RemapTex", val2);
				val7.SetFloat("_AlphaBias", 0.05f);
				((Renderer)component3).sharedMaterial = val7;
				component3 = ((Component)pyroTracerWarmEffectPrefab.transform.Find("TracerHead/HarshGlow, Billboard")).GetComponent<ParticleSystemRenderer>();
				Material val8 = new Material(((Renderer)component3).sharedMaterial);
				val8.SetTexture("_RemapTex", val2);
				((Renderer)component3).sharedMaterial = val8;
				((Component)pyroTracerWarmEffectPrefab.transform.Find("StartTransform/PP")).GetComponent<PostProcessVolume>().sharedProfile = Addressables.LoadAssetAsync<PostProcessProfile>((object)RoR2_DLC3_SolusHeart.ppvSHLaser_asset).WaitForCompletion();
			});
			pyroHitWarmEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.ImpactRailgun_prefab).WaitForCompletion(), "PyroHitWarm", false);
			TryBuildAsset("Pyro Hit Warm Effect Prefab", delegate
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				//IL_003b: Expected O, but got Unknown
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Expected O, but got Unknown
				//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b2: Expected O, but got Unknown
				//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
				//IL_010c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0111: Unknown result type (might be due to invalid IL or missing references)
				Texture val = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampMagmaWorm_png).WaitForCompletion();
				ParticleSystemRenderer component = ((Component)pyroHitWarmEffectPrefab.transform.Find("BeamParticles, Small")).GetComponent<ParticleSystemRenderer>();
				Material val2 = new Material(((Renderer)component).sharedMaterial);
				val2.SetTexture("_RemapTex", val);
				((Renderer)component).sharedMaterial = val2;
				component = ((Component)pyroHitWarmEffectPrefab.transform.Find("Flash,White")).GetComponent<ParticleSystemRenderer>();
				Material val3 = new Material(((Renderer)component).sharedMaterial);
				val3.SetTexture("_RemapTex", val);
				((Renderer)component).sharedMaterial = val3;
				component = ((Component)pyroHitWarmEffectPrefab.transform.Find("Daggers")).GetComponent<ParticleSystemRenderer>();
				Material val4 = new Material(((Renderer)component).sharedMaterial);
				val4.SetTexture("_RemapTex", val);
				val4.SetFloat("_AlphaBias", 0f);
				((Renderer)component).sharedMaterial = val4;
				MainModule main = ((Component)pyroHitWarmEffectPrefab.transform.Find("Shockwave")).GetComponent<ParticleSystem>().main;
				((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(0.89f, 0.67f, 0.11f));
			});
			pyroTracerHotEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.TracerRailgunSuper_prefab).WaitForCompletion(), "PyroTracerHot", false);
			TryBuildAsset("Pyro Tracer Hot Effect Prefab", delegate
			{
				//IL_000e: 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_0047: Unknown result type (might be due to invalid IL or missing references)
				//IL_004d: Expected O, but got Unknown
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ab: Expected O, but got Unknown
				//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00eb: Expected O, but got Unknown
				//IL_0125: Unknown result type (might be due to invalid IL or missing references)
				//IL_012c: Expected O, but got Unknown
				//IL_0166: Unknown result type (might be due to invalid IL or missing references)
				//IL_016d: Expected O, but got Unknown
				//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
				//IL_01ae: Expected O, but got Unknown
				VFXAttributes val = pyroTracerHotEffectPrefab.AddComponent<VFXAttributes>();
				val.vfxPriority = (VFXPriority)2;
				Texture val2 = Addressables.LoadAssetAsync<Texture>((object)RoR2_DLC1_Common_ColorRamps.texRampMinorConstructProjectile_png).WaitForCompletion();
				LineRenderer component = ((Component)pyroTracerHotEffectPrefab.transform.Find("FX/Brief/Beam, Flash Briefly")).GetComponent<LineRenderer>();
				Material val3 = new Material(((Renderer)component).sharedMaterial);
				val3.SetTexture("_RemapTex", val2);
				val3.SetFloat("_Boost", 7f);
				val3.SetColor("_TintColor", Color.white);
				((Renderer)component).sharedMaterial = val3;
				component = ((Component)pyroTracerHotEffectPrefab.transform.Find("FX/Longer/Beam, Linger")).GetComponent<LineRenderer>();
				Material val4 = new Material(((Renderer)component).sharedMaterial);
				val4.SetTexture("_RemapTex", val2);
				((Renderer)component).sharedMaterial = val4;
				SkinnedMeshRenderer component2 = ((Component)pyroTracerHotEffectPrefab.transform.Find("FX/mdlRailgunnerBeam/mdlRailgunnerBeamMesh")).GetComponent<SkinnedMeshRenderer>();
				Material val5 = new Material(((Renderer)component2).sharedMaterial);
				val5.SetTexture("_RemapTex", val2);
				((Renderer)component2).sharedMaterial = val5;
				ParticleSystemRenderer component3 = ((Component)pyroTracerHotEffectPrefab.transform.Find("FX/BeamParticles, Rings")).GetComponent<ParticleSystemRenderer>();
				Material val6 = new Material(((Renderer)component3).sharedMaterial);
				val6.SetTexture("_RemapTex", val2);
				((Renderer)component3).sharedMaterial = val6;
				component3 = ((Component)pyroTracerHotEffectPrefab.transform.Find("FX/BeamParticles, Rings/BeamParticles, Small")).GetComponent<ParticleSystemRenderer>();
				Material val7 = new Material(((Renderer)component3).sharedMaterial);
				val7.SetTexture("_RemapTex", val2);
				((Renderer)component3).sharedMaterial = val7;
				component3 = ((Component)pyroTracerHotEffectPrefab.transform.Find("TracerHead/HarshGlow, Billboard")).GetComponent<ParticleSystemRenderer>();
				Material val8 = new Material(((Renderer)component3).sharedMaterial);
				val8.SetTexture("_RemapTex", val2);
				((Renderer)component3).sharedMaterial = val8;
			});
			pyroHitHotEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.ImpactRailgun_prefab).WaitForCompletion(), "PyroHitHot", false);
			TryBuildAsset("Pyro Hit Hot Effect Prefab", delegate
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				//IL_003b: Expected O, but got Unknown
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Expected O, but got Unknown
				//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b2: Expected O, but got Unknown
				//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fd: 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)
				Texture val = Addressables.LoadAssetAsync<Texture>((object)RoR2_DLC1_Common_ColorRamps.texRampMinorConstructProjectile_png).WaitForCompletion();
				ParticleSystemRenderer component = ((Component)pyroHitHotEffectPrefab.transform.Find("BeamParticles, Small")).GetComponent<ParticleSystemRenderer>();
				Material val2 = new Material(((Renderer)component).sharedMaterial);
				val2.SetTexture("_RemapTex", val);
				((Renderer)component).sharedMaterial = val2;
				component = ((Component)pyroHitHotEffectPrefab.transform.Find("Flash,White")).GetComponent<ParticleSystemRenderer>();
				Material val3 = new Material(((Renderer)component).sharedMaterial);
				val3.SetTexture("_RemapTex", val);
				((Renderer)component).sharedMaterial = val3;
				component = ((Component)pyroHitHotEffectPrefab.transform.Find("Daggers")).GetComponent<ParticleSystemRenderer>();
				Material val4 = new Material(((Renderer)component).sharedMaterial);
				val4.SetTexture("_RemapTex", val);
				val4.SetFloat("_AlphaBias", 0f);
				((Renderer)component).sharedMaterial = val4;
				MainModule main = ((Component)pyroHitHotEffectPrefab.transform.Find("Shockwave")).GetComponent<ParticleSystem>().main;
				((MainModule)(ref main)).startColor = new MinMaxGradient(Color.white);
			});
			Content.CreateAndAddEffectDef(pyroTracerColdEffectPrefab);
			Content.CreateAndAddEffectDef(pyroHitColdEffectPrefab);
			Content.CreateAndAddEffectDef(pyroTracerWarmEffectPrefab);
			Content.CreateAndAddEffectDef(pyroHitWarmEffectPrefab);
			Content.CreateAndAddEffectDef(pyroTracerHotEffectPrefab);
			Content.CreateAndAddEffectDef(pyroHitHotEffectPrefab);
		}

		private static void CreateMineExplosiveAssets()
		{
			//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_0073: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			GameObject mineExplosiveChildProjectilePrefab = assetBundle.LoadAsset<GameObject>("ExplosionDamageProjectile");
			TryBuildAsset("Mine Explosive Child Projectile Prefab", delegate
			{
				mineExplosiveChildProjectilePrefab.AddComponent<CreateMineDamageBlast>();
			});
			GameObject mineExplosiveGhostPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.RailgunnerMineGhost_prefab).WaitForCompletion(), "RailgunnerMineExplosiveGhost", false);
			TryBuildAsset("Mine Explosive Ghost Prefab", delegate
			{
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				//IL_0028: Expected O, but got Unknown
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_0038: Unknown result type (might be due to invalid IL or missing references)
				MeshRenderer component = ((Component)mineExplosiveGhostPrefab.transform.Find("mdlRailGunnerBasicMine/mdlRailGunnerBasicMine/centerlight emit shell")).GetComponent<MeshRenderer>();
				Material val = new Material(((Renderer)component).sharedMaterial);
				val.SetTexture("_EmTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_DLC3.texRampFire02_png).WaitForCompletion());
				val.SetFloat("_EmPower", 5f);
				((Renderer)component).sharedMaterial = val;
			});
			GameObject mineExplosiveExplosionEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.RailgunnerMineExplosion_prefab).WaitForCompletion(), "RailgunnerMineExplosiveExplosion", false);
			TryBuildAsset("Mine Explosive Explosion Effect Prefab", delegate
			{
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0056: Unknown result type (might be due to invalid IL or missing references)
				//IL_005c: Expected O, but got Unknown
				//IL_0067: Unknown result type (might be due to invalid IL or missing references)
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0086: Unknown result type (might be due to invalid IL or missing references)
				//IL_008b: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
				//IL_0104: Unknown result type (might be due to invalid IL or missing references)
				//IL_010a: Expected O, but got Unknown
				//IL_0115: Unknown result type (might be due to invalid IL or missing references)
				//IL_011a: Unknown result type (might be due to invalid IL or missing references)
				((Component)mineExplosiveExplosionEffectPrefab.transform.Find("Point Light")).GetComponent<Light>().color = new Color(1f, 0.54f, 0.07f);
				ParticleSystemRenderer component = ((Component)mineExplosiveExplosionEffectPrefab.transform.Find("SparksOut")).GetComponent<ParticleSystemRenderer>();
				Material val = new Material(((Renderer)component).sharedMaterial);
				val.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_DLC3.texRampFire02_png).WaitForCompletion());
				val.SetTexture("_MainTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_VFX.texOmniHitspark3Mask_png).WaitForCompletion());
				((Renderer)component).sharedMaterial = val;
				MainModule main = ((Component)mineExplosiveExplosionEffectPrefab.transform.Find("Flash, Colored")).GetComponent<ParticleSystem>().main;
				((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(1f, 0.54f, 0.07f));
				component = ((Component)mineExplosiveExplosionEffectPrefab.transform.Find("Sphere, Color")).GetComponent<ParticleSystemRenderer>();
				Material val2 = new Material(((Renderer)component).sharedMaterial);
				val2.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_DLC3.texRampFire01_png).WaitForCompletion());
				((Renderer)component).sharedMaterial = val2;
			});
			mineExplosiveProjectilePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.RailgunnerMine_prefab).WaitForCompletion(), "RailgunnerMineExplosive");
			TryBuildAsset("Mine Explosive Projectile Prefab", delegate
			{
				//IL_0094: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c5: Expected O, but got Unknown
				//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
				//IL_012b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0132: Expected O, but got Unknown
				//IL_013e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0143: Unknown result type (might be due to invalid IL or missing references)
				//IL_0178: Unknown result type (might be due to invalid IL or missing references)
				//IL_017d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0190: Unknown result type (might be due to invalid IL or missing references)
				//IL_0195: Unknown result type (might be due to invalid IL or missing references)
				//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
				//IL_01b5: Expected O, but got Unknown
				ProjectileExplosion component = mineExplosiveProjectilePrefab.GetComponent<ProjectileExplosion>();
				if (Object.op_Implicit((Object)(object)mineExplosiveChildProjectilePrefab))
				{
					component.childrenProjectilePrefab = mineExplosiveChildProjectilePrefab;
					component.fireChildren = true;
					component.childrenCount = 1;
				}
				ProjectileController component2 = mineExplosiveProjectilePrefab.GetComponent<ProjectileController>();
				component2.ghostPrefabAddress = null;
				component2.ghostPrefab = mineExplosiveGhostPrefab;
				mineExplosiveProjectilePrefab.GetComponent<ProjectileExplosion>().explosionEffect = mineExplosiveExplosionEffectPrefab;
				((Component)mineExplosiveProjectilePrefab.transform.Find("PrepEffect/Point Light")).GetComponent<Light>().color = new Color(1f, 0.54f, 0.07f);
				ParticleSystemRenderer component3 = ((Component)mineExplosiveProjectilePrefab.transform.Find("PrepEffect/ChargeIn")).GetComponent<ParticleSystemRenderer>();
				Material val = new Material(((Renderer)component3).sharedMaterial);
				val.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_DLC3.texRampFire02_png).WaitForCompletion());
				val.SetTexture("_MainTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_VFX_ParticleMasks.texSpark1Mask_png).WaitForCompletion());
				((Renderer)component3).sharedMaterial = val;
				component3 = ((Component)mineExplosiveProjectilePrefab.transform.Find("PrepEffect/Core")).GetComponent<ParticleSystemRenderer>();
				Material val2 = new Material(((Renderer)component3).sharedMaterial);
				val2.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampInfusion_png).WaitForCompletion());
				((Renderer)component3).sharedMaterial = val2;
				Transform val3 = mineExplosiveProjectilePrefab.transform.Find("PrepEffect/SoftGlow");
				MainModule main = ((Component)val3).GetComponent<ParticleSystem>().main;
				((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(1f, 0.54f, 0.07f));
				component3 = ((Component)val3).GetComponent<ParticleSystemRenderer>();
				Material val4 = new Material(((Renderer)component3).sharedMaterial);
				val4.renderQueue += 1;
				((Renderer)component3).sharedMaterial = val4;
			});
			ContentPacks.projectilePrefabs.Add(mineExplosiveChildProjectilePrefab);
			ContentPacks.projectilePrefabs.Add(mineExplosiveProjectilePrefab);
			Content.CreateAndAddEffectDef(mineExplosiveExplosionEffectPrefab);
		}

		private static void CreateStackingParryAssets()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			//IL_004c: 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_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Expected O, but got Unknown
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			stackingParryBuffOverlayMaterial = new Material(Addressables.LoadAssetAsync<Material>((object)RoR2_Base_Common.matImmune_mat).WaitForCompletion());
			TryBuildAsset("Stacking Parry Buff Overlay Material", delegate
			{
				//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_009c: Unknown result type (might be due to invalid IL or missing references)
				stackingParryBuffOverlayMaterial.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampTritone2_png).WaitForCompletion());
				stackingParryBuffOverlayMaterial.SetFloat("_InvFade", 0f);
				stackingParryBuffOverlayMaterial.SetFloat("_Boost", 4f);
				stackingParryBuffOverlayMaterial.SetFloat("_AlphaBoost", 4f);
				stackingParryBuffOverlayMaterial.SetFloat("_AlphaBias", 0f);
				stackingParryBuffOverlayMaterial.SetFloat("_OffsetAmount", 0.018f);
				stackingParryBuffOverlayMaterial.SetColor("_TintColor", LoaderRetailiateController.buffGradient[0]);
			});
			stackingParryFlashOverlayMaterial = new Material(Addressables.LoadAssetAsync<Material>((object)RoR2_Base_Common.matEnergyShield_mat).WaitForCompletion());
			TryBuildAsset("Stacking Parry Flash Overlay Material", delegate
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				stackingParryBuffOverlayMaterial.SetColor("_TintColor", Color.white);
			});
			stackingParryEffectPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC3_Parry.ParryEffect_prefab).WaitForCompletion(), "StackingParryEffect", false);
			TryBuildAsset("Stacking Parry Trigger Effect Prefab", delegate
			{
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_0054: Unknown result type (might be due to invalid IL or missing references)
				//IL_005a: Expected O, but got Unknown
				//IL_0065: Unknown result type (might be due to invalid IL or missing references)
				//IL_006a: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b2: Expected O, but got Unknown
				((Component)stackingParryEffectPrefab.transform.Find("Point Light")).GetComponent<Light>().color = new Color(1f, 0.54f, 0.07f);
				ParticleSystemRenderer component = ((Component)stackingParryEffectPrefab.transform.Find("Waves")).GetComponent<ParticleSystemRenderer>();
				Material val = new Material(((Renderer)component).sharedMaterial);
				val.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_DLC2_Scorchling.texRampScorchling_png).WaitForCompletion());
				val.SetFloat("_AlphaBoost", 4f);
				((Renderer)component).sharedMaterial = val;
				component = ((Component)stackingParryEffectPrefab.transform.Find("Sphere")).GetComponent<ParticleSystemRenderer>();
				Material val2 = new Material(val);
				val2.SetInt("_Cull", 2);
				((Renderer)component).sharedMaterial = val2;
				Object.Destroy((Object)(object)((Component)stackingParryEffectPrefab.transform.Find("Glow (Larger)")).gameObject);
			});
			Content.CreateAndAddEffectDef(stackingParryEffectPrefab);
			GameObject gameObject = ((Component)Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Loader.LoaderBody_prefab).WaitForCompletion().transform.GetChild(0)).gameObject;
			AkBank[] array = new AkBank[2];
			GameObject obj = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_Child.ChildBody_prefab).WaitForCompletion();
			array[0] = ((obj != null) ? obj.GetComponent<AkBank>() : null);
			GameObject obj2 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC3_DefectiveUnit.DefectiveUnitBody_prefab).WaitForCompletion();
			array[1] = ((obj2 != null) ? obj2.GetComponent<AkBank>() : null);
			GiveAkBanksToObject(gameObject, (AkBank[])(object)array);
		}

		private static void GiveAkBanksToObject(GameObject obj, AkBank[] banks)
		{
			foreach (AkBank val in banks)
			{
				if ((Object)(object)val != (Object)null)
				{
					AkBank val2 = obj.AddComponent<AkBank>();
					((AkTriggerHandler)val2).triggerList = ((AkTriggerHandler)val).triggerList;
					val2.data.WwiseObjectReference = val.data.WwiseObjectReference;
					val2.unloadTriggerList = val.unloadTriggerList;
				}
			}
		}
	}
	public static class Buffs
	{
		public static BuffDef loaderParryBuff;

		public static BuffDef loaderGauntletBonusBuff;

		public static void Init()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			loaderParryBuff = Content.CreateAndAddBuff("LoaderParryBuff", Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Nullifier.texBuffNullifyStackIcon_tif).WaitForCompletion(), new Color(0f, 0.62f, 0.85f), canStack: false, isDebuff: false, (StackingDisplayMethod)1);
			loaderGauntletBonusBuff = Content.CreateAndAddBuff("LoaderGauntletBonusBuff", Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Nullifier.texBuffNullifiedIcon_tif).WaitForCompletion(), new Color(0f, 0.73f, 1f), canStack: true, isDebuff: false, (StackingDisplayMethod)0);
			SetupGenericBehaviours();
		}

		private static void SetupGenericBehaviours()
		{
		}
	}
	internal class Content
	{
		internal static void Init()
		{
			Assets.Init();
			InitSkills();
			InitStates();
		}

		private static void InitSkills()
		{
			new CookSkill().Init();
			new CallRailgunStrikeSkill().Init();
			new PrepRailgunStrikeSkill().Init();
			new ChargeSnipePyroSkill().Init();
			new FireSnipePyroSkill().Init();
			new global::FenrisSkills.Skills.FireMineExplosive().Init();
		}

		private static void InitStates()
		{
			ContentPacks.entityStates.Add(typeof(CookItem));
			ContentPacks.entityStates.Add(typeof(SetupRailgunStrike));
			ContentPacks.entityStates.Add(typeof(CallRailgunStrikeEnter));
			ContentPacks.entityStates.Add(typeof(CallRailgunStrikeBase));
			ContentPacks.entityStates.Add(typeof(CallRailgunStrike));
			ContentPacks.entityStates.Add(typeof(ChargeSnipePyro));
			ContentPacks.entityStates.Add(typeof(ChargingPyro));
			ContentPacks.entityStates.Add(typeof(ChargedPyro));
			ContentPacks.entityStates.Add(typeof(ExpiredPyro));
			ContentPacks.entityStates.Add(typeof(OnlinePyro));
			ContentPacks.entityStates.Add(typeof(UsePyro));
			ContentPacks.entityStates.Add(typeof(FireSnipePyro));
			ContentPacks.entityStates.Add(typeof(WindupSnipePyro));
			ContentPacks.entityStates.Add(typeof(global::FenrisSkills.Skills.States.Railgunner.FireMineExplosive));
			ContentPacks.entityStates.Add(typeof(StackingParry));
		}

		internal static void AddEffectDef(EffectDef effectDef)
		{
			ContentPacks.effectDefs.Add(effectDef);
		}

		internal static EffectDef CreateAndAddEffectDef(GameObject effectPrefab)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			EffectDef val = new EffectDef(effectPrefab);
			AddEffectDef(val);
			return val;
		}

		internal static BuffDef CreateAndAddBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, StackingDisplayMethod stackingDisplayMethod = (StackingDisplayMethod)0)
		{
			//IL_0010: 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_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
			((Object)val).name = buffName;
			val.buffColor = buffColor;
			val.canStack = canStack;
			val.isDebuff = isDebuff;
			val.eliteDef = null;
			val.iconSprite = buffIcon;
			val.stackingDisplayMethod = stackingDisplayMethod;
			AddBuffDef(val);
			return val;
		}

		internal static void AddBuffDef(BuffDef buffDef)
		{
			ContentPacks.buffDefs.Add(buffDef);
		}
	}
	internal class ContentPacks : IContentPackProvider
	{
		internal ContentPack contentPack = new ContentPack();

		public static List<GameObject> bodyPrefabs = new List<GameObject>();

		public static List<GameObject> masterPrefabs = new List<GameObject>();

		public static List<GameObject> projectilePrefabs = new List<GameObject>();

		public static List<SurvivorDef> survivorDefs = new List<SurvivorDef>();

		public static List<UnlockableDef> unlockableDefs = new List<UnlockableDef>();

		public static List<SkillFamily> skillFamilies = new List<SkillFamily>();

		public static List<SkillDef> skillDefs = new List<SkillDef>();

		public static List<Type> entityStates = new List<Type>();

		public static List<BuffDef> buffDefs = new List<BuffDef>();

		public static List<EffectDef> effectDefs = new List<EffectDef>();

		public static List<NetworkSoundEventDef> networkSoundEventDefs = new List<NetworkSoundEventDef>();

		public static List<GameObject> networkedObjectPrefabs = new List<GameObject>();

		public static List<ItemDef> itemDefs = new List<ItemDef>();

		public static List<ItemTierDef> itemTierDefs = new List<ItemTierDef>();

		public string identifier => "mwmw.FenrisSkills";

		public void Init()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders);
		}

		private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider)
		{
			addContentPackProvider.Invoke((IContentPackProvider)(object)this);
		}

		public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
		{
			contentPack.identifier = identifier;
			contentPack.bodyPrefabs.Add(bodyPrefabs.ToArray());
			contentPack.masterPrefabs.Add(masterPrefabs.ToArray());
			contentPack.projectilePrefabs.Add(projectilePrefabs.ToArray());
			contentPack.survivorDefs.Add(survivorDefs.ToArray());
			contentPack.unlockableDefs.Add(unlockableDefs.ToArray());
			contentPack.skillDefs.Add(skillDefs.ToArray());
			contentPack.skillFamilies.Add(skillFamilies.ToArray());
			contentPack.entityStateTypes.Add(entityStates.ToArray());
			contentPack.buffDefs.Add(buffDefs.ToArray());
			contentPack.effectDefs.Add(effectDefs.ToArray());
			contentPack.networkSoundEventDefs.Add(networkSoundEventDefs.ToArray());
			contentPack.networkedObjectPrefabs.Add(networkedObjectPrefabs.ToArray());
			contentPack.itemDefs.Add(itemDefs.ToArray());
			contentPack.itemTierDefs.Add(itemTierDefs.ToArray());
			args.ReportProgress(1f);
			yield break;
		}

		public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args)
		{
			ContentPack.Copy(contentPack, args.output);
			args.ReportProgress(1f);
			yield break;
		}

		public IEnumerator FinalizeAsync(FinalizeAsyncArgs args)
		{
			args.ReportProgress(1f);
			yield break;
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("mwmw.FenrisSkills", "FenrisSkills", "1.2.1")]
	public class FenrisSkills : BaseUnityPlugin
	{
		public const string PluginGUID = "mwmw.FenrisSkills";

		public const string PluginAuthor = "mwmw";

		public const string PluginName = "FenrisSkills";

		public const string PluginVersion = "1.2.1";

		public static ConfigFile config;

		public void Awake()
		{
			config = ((BaseUnityPlugin)this).Config;
			Log.Init(((BaseUnityPlugin)this).Logger);
			Networking.Init();
			Content.Init();
			Buffs.Init();
			Options.Init();
			new ContentPacks().Init();
			RoR2Application.onLoadFinished = (Action)Delegate.Combine(RoR2Application.onLoadFinished, new Action(OnLoadFinished));
		}

		private void OnLoadFinished()
		{
			Assets.railCannonProjectilePrefab.GetComponent<ProjectileImpactExplosion>().impactEffect = Assets.railCannonImpactPrefab;
		}
	}
	internal static class Log
	{
		private 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);
		}
	}
	public static class Networking
	{
		public static void Init()
		{
			NetworkingAPI.RegisterMessageType<SyncTriggerStackingParry>();
			NetworkingAPI.RegisterMessageType<SyncRemoveRetaliateStacks>();
		}
	}
	public class SyncTriggerStackingParry : INetMessage, ISerializableObject
	{
		private NetworkInstanceId bodyNetId;

		public SyncTriggerStackingParry()
		{
		}

		public SyncTriggerStackingParry(NetworkInstanceId bodyNetId)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			this.bodyNetId = bodyNetId;
		}

		public void Serialize(NetworkWriter writer)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			writer.Write(bodyNetId);
		}

		public void Deserialize(NetworkReader reader)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			bodyNetId = reader.ReadNetworkId();
		}

		public void OnReceived()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Util.FindNetworkObject(bodyNetId);
			CharacterBody val2 = default(CharacterBody);
			if (Object.op_Implicit((Object)(object)val) && val.TryGetComponent<CharacterBody>(ref val2))
			{
				Util.PlaySound("Play_defectiveUnit_attack_melee_explosion", ((Component)val2).gameObject);
				LoaderRetailiateController loaderRetailiateController = default(LoaderRetailiateController);
				if (!val.TryGetComponent<LoaderRetailiateController>(ref loaderRetailiateController))
				{
					loaderRetailiateController = ((Component)val2).gameObject.AddComponent<LoaderRetailiateController>();
				}
				loaderRetailiateController.body = val2;
			}
		}
	}
	public class SyncRemoveRetaliateStacks : INetMessage, ISerializableObject
	{
		private NetworkInstanceId bodyNetId;

		public SyncRemoveRetaliateStacks()
		{
		}

		public SyncRemoveRetaliateStacks(NetworkInstanceId bodyNetId)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			this.bodyNetId = bodyNetId;
		}

		public void Serialize(NetworkWriter writer)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			writer.Write(bodyNetId);
		}

		public void Deserialize(NetworkReader reader)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			bodyNetId = reader.ReadNetworkId();
		}

		public void OnReceived()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Util.FindNetworkObject(bodyNetId);
			CharacterBody val2 = default(CharacterBody);
			if (Object.op_Implicit((Object)(object)val) && val.TryGetComponent<CharacterBody>(ref val2))
			{
				val2.SetBuffCount(Buffs.loaderGauntletBonusBuff.buffIndex, 0);
			}
		}
	}
	public class Options
	{
		private static bool? _rooEnabled;

		public static ConfigEntry<bool> produceStrongFoods;

		public static ConfigEntry<float> pyroMinDamageCoeff;

		public static ConfigEntry<float> pyroMaxDamageCoeff;

		public static ConfigEntry<float> pyroDmgIncreaseSpd;

		public static ConfigEntry<float> pyroSelfDmgTimerMult;

		public static bool rooEnabled
		{
			get
			{
				if (!_rooEnabled.HasValue)
				{
					_rooEnabled = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
				}
				return _rooEnabled.Value;
			}
		}

		public static void Init()
		{
			produceStrongFoods = FenrisSkills.config.Bind<bool>("CHEF: Cook", "Produce Strong Foods", false, "Whether or not the Cook skill can produce a permanent Ultimate Meal or Sautéed Worms, given the ingredients.");
			pyroMinDamageCoeff = FenrisSkills.config.Bind<float>("Railgunner: Pyrocharge", "Min Damage Coeff.", 10f, "The damage coefficient of Pyrocharge immediately upon activation.");
			pyroMaxDamageCoeff = FenrisSkills.config.Bind<float>("Railgunner: Pyrocharge", "Max Damage Coeff.", 80f, "The damage coefficient of Pyrocharge if charged to max.");
			pyroDmgIncreaseSpd = FenrisSkills.config.Bind<float>("Railgunner: Pyrocharge", "Damage Increase Speed", 0.18f, "How fast the damage of Pyrocharge increases along its logarithmic curve.");
			pyroSelfDmgTimerMult = FenrisSkills.config.Bind<float>("Railgunner: Pyrocharge", "Self-Damage Timer Mult.", 0.9f, "The multiplier for the time between self-burn stacks. Smaller values mean faster stacks.");
			if (rooEnabled)
			{
				RoOInit();
			}
		}

		public static void OnLoadFinished()
		{
		}

		private static void RoOInit()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			//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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Expected O, but got Unknown
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Expected O, but got Unknown
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Expected O, but got Unknown
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Expected O, but got Unknown
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Expected O, but got Unknown
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(produceStrongFoods, new CheckBoxConfig()));
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(pyroMinDamageCoeff, new StepSliderConfig
			{
				min = 0f,
				max = 1000f,
				increment = 1f
			}));
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(pyroMaxDamageCoeff, new StepSliderConfig
			{
				min = 0f,
				max = 1000f,
				increment = 1f
			}));
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(pyroDmgIncreaseSpd, new StepSliderConfig
			{
				min = 0f,
				max = 100f,
				increment = 0.001f
			}));
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(pyroSelfDmgTimerMult, new StepSliderConfig
			{
				min = 0f,
				max = 1f,
				increment = 0.001f
			}));
			ModSettingsManager.SetModDescription("Config options for FenrisSkills.");
			ModSettingsManager.SetModIcon(Assets.assetBundle.LoadAsset<Sprite>("icon"));
		}
	}
	public static class Utils
	{
		public static Random random = new Random();

		public static Color LerpGradient(Color[] gradient, float value)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			if (gradient.Length > 2)
			{
				float num = 1f / (float)(gradient.Length - 1);
				int num2 = Mathf.Clamp(Mathf.FloorToInt((float)(gradient.Length - 1) * value), 0, gradient.Length - 2);
				return Color.Lerp(gradient[num2], gradient[num2 + 1], (value - num * (float)num2) / num);
			}
			if (gradient.Length == 1)
			{
				return gradient[0];
			}
			return Color.white;
		}

		public static SphereSearch ExcludeByBuff(this SphereSearch self, BuffDef buff)
		{
			for (int num = self.searchData.candidatesCount - 1; num >= 0; num--)
			{
				HurtBox hurtBox = ((SearchData)(ref self.searchData)).GetCandidate(num).hurtBox;
				bool? obj;
				if (hurtBox == null)
				{
					obj = null;
				}
				else
				{
					HealthComponent healthComponent = hurtBox.healthComponent;
					if (healthComponent == null)
					{
						obj = null;
					}
					else
					{
						CharacterBody body = healthComponent.body;
						obj = ((body != null) ? new bool?(!body.HasBuff(buff)) : ((bool?)null));
					}
				}
				if ((!obj) ?? false)
				{
					((SearchData)(ref self.searchData)).RemoveCandidate(num);
				}
			}
			return self;
		}

		public static TSource RandomOrDefault<TSource>(this IList<TSource> enumerable)
		{
			if (enumerable.Count > 0)
			{
				return enumerable[Random.Range(0, enumerable.Count - 1)];
			}
			return default(TSource);
		}
	}
}
namespace FenrisSkills.Skills
{
	public abstract class BaseCaptainOrbitalSkill<T> : BaseSkill<T> where T : BaseCaptainOrbitalSkill<T>
	{
		protected virtual Sprite disabledIcon => Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Captain.texCaptainSkillIcons_png_texCaptainSkillIcons_4_).WaitForCompletion();

		protected virtual string disabledNameToken => "CAPTAIN_SKILL_DISCONNECT_NAME";

		protected virtual string disabledDescriptionToken => "CAPTAIN_SKILL_DISCONNECT_DESCRIPTION";

		protected override Type skillDefType => typeof(CaptainOrbitalSkillDef);

		protected override void CreateSkill()
		{
			base.CreateSkill();
			SkillDef obj = BaseSkill<T>.skillDef;
			CaptainOrbitalSkillDef val = (CaptainOrbitalSkillDef)(object)((obj is CaptainOrbitalSkillDef) ? obj : null);
			val.disabledIcon = disabledIcon;
			val.disabledNameToken = disabledNameToken;
			val.disabledDescriptionToken = disabledDescriptionToken;
		}
	}
	public abstract class BaseRailgunSkillDef<T> : BaseSkill<T> where T : BaseRailgunSkillDef<T>
	{
		protected virtual Sprite offlineIcon => Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Captain.texCaptainSkillIcons_png_texCaptainSkillIcons_4_).WaitForCompletion();

		protected virtual bool restockOnReload => false;

		protected override Type skillDefType => typeof(RailgunSkillDef);

		protected override void CreateSkill()
		{
			base.CreateSkill();
			SkillDef obj = BaseSkill<T>.skillDef;
			RailgunSkillDef val = (RailgunSkillDef)(object)((obj is RailgunSkillDef) ? obj : null);
			val.offlineIcon = offlineIcon;
			val.restockOnReload = restockOnReload;
		}
	}
	public abstract class BaseSkill<T> where T : BaseSkill<T>
	{
		public enum Skill
		{
			Primary,
			Secondary,
			Utility,
			Special
		}

		public static SkillDef skillDef;

		protected string prefix;

		protected abstract string skillName { get; }

		protected abstract string skillDescription { get; }

		protected abstract Type activationState { get; }

		protected abstract string activationStateMachineName { get; }

		protected abstract GameObject bodyPrefab { get; }

		protected abstract Skill skillCategory { get; }

		protected abstract Sprite icon { get; }

		protected abstract int baseMaxStock { get; }

		protected abstract float baseRechargeInterval { get; }

		protected abstract bool beginSkillCooldownOnSkillEnd { get; }

		protected abstract bool canceledFromSprinting { get; }

		protected abstract bool cancelSprintingOnActivation { get; }

		protected abstract bool fullRestockOnAssign { get; }

		protected abstract InterruptPriority interruptPriority { get; }

		protected abstract bool isCombatSkill { get; }

		protected abstract bool mustKeyPress { get; }

		protected abstract int rechargeStock { get; }

		protected abstract int requiredStock { get; }

		protected abstract int stockToConsume { get; }

		protected virtual bool addToSkillFamily => true;

		protected virtual Type skillDefType => typeof(SkillDef);

		protected virtual string[] keywordTokens { get; }

		protected virtual void CreateSkill()
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: 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_02a6: Expected O, but got Unknown
			//IL_02a7: 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)
			prefix = "FenrisSkills".ToUpper() + "_" + Regex.Replace(skillName.ToUpper(), "[\\s\\p{P}]", "");
			ScriptableObject obj = ScriptableObject.CreateInstance(skillDefType);
			skillDef = (SkillDef)(object)((obj is SkillDef) ? obj : null);
			skillDef.activationState = new SerializableEntityStateType(activationState);
			skillDef.activationStateMachineName = activationStateMachineName;
			skillDef.baseMaxStock = baseMaxStock;
			skillDef.baseRechargeInterval = baseRechargeInterval;
			skillDef.beginSkillCooldownOnSkillEnd = beginSkillCooldownOnSkillEnd;
			skillDef.canceledFromSprinting = canceledFromSprinting;
			skillDef.cancelSprintingOnActivation = cancelSprintingOnActivation;
			skillDef.fullRestockOnAssign = fullRestockOnAssign;
			skillDef.interruptPriority = interruptPriority;
			skillDef.isCombatSkill = isCombatSkill;
			skillDef.mustKeyPress = mustKeyPress;
			skillDef.rechargeStock = rechargeStock;
			skillDef.requiredStock = requiredStock;
			skillDef.stockToConsume = stockToConsume;
			skillDef.icon = icon;
			skillDef.skillDescriptionToken = prefix + "_DESC";
			skillDef.skillName = "{prefix}_NAME";
			skillDef.skillNameToken = prefix + "_NAME";
			skillDef.keywordTokens = keywordTokens;
			LanguageAPI.Add(prefix + "_NAME", skillName);
			LanguageAPI.Add(prefix + "_DESC", skillDescription);
			ContentPacks.skillDefs.Add(skillDef);
			if (addToSkillFamily)
			{
				SkillLocator component = bodyPrefab.GetComponent<SkillLocator>();
				SkillFamily val = null;
				switch (skillCategory)
				{
				case Skill.Primary:
					val = component.primary.skillFamily;
					break;
				case Skill.Secondary:
					val = component.secondary.skillFamily;
					break;
				case Skill.Utility:
					val = component.utility.skillFamily;
					break;
				case Skill.Special:
					val = component.special.skillFamily;
					break;
				}
				Array.Resize(ref val.variants, val.variants.Length + 1);
				Variant[] variants = val.variants;
				int num = variants.Length - 1;
				Variant val2 = new Variant
				{
					skillDef = skillDef,
					unlockableDef = null
				};
				((Variant)(ref val2)).viewableNode = new Node(skillDef.skillNameToken, false, (Node)null);
				variants[num] = val2;
			}
		}

		public void Init()
		{
			CreateSkill();
		}
	}
	public class CallRailgunStrikeSkill : BaseSkill<CallRailgunStrikeSkill>
	{
		protected override string skillName => "OGM-84 'ATLAS' Strike";

		protected override string skillDescription => "<style=cIsDamage>Stunning</style>. Request an <style=cIsDamage>orbital railcannon strike</style> from the <style=cIsDamage>UES Safe Travels</style>, dealing <style=cIsDamage>3000% damage</style>, or <style=cIsDamage>4500% damage</style> on a critical hit.";

		protected override Type activationState => typeof(CallRailgunStrikeEnter);

		protected override string activationStateMachineName => "Weapon";

		protected override GameObject bodyPrefab => Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Captain.CaptainBody_prefab).WaitForCompletion();

		protected override Skill skillCategory => Skill.Primary;

		protected override Sprite icon => Assets.assetBundle.LoadAsset<Sprite>("texRailCannon");

		protected override int baseMaxStock => 1;

		protected override float baseRechargeInterval => 0f;

		protected override bool beginSkillCooldownOnSkillEnd => false;

		protected override bool canceledFromSprinting => true;

		protected override bool cancelSprintingOnActivation => true;

		protected override bool fullRestockOnAssign => true;

		protected override InterruptPriority interruptPriority => (InterruptPriority)2;

		protected override bool isCombatSkill => true;

		protected override bool mustKeyPress => true;

		protected override int rechargeStock => 0;

		protected override int requiredStock => 1;

		protected override int stockToConsume => 1;

		protected override bool addToSkillFamily => false;
	}
	public class ChargeSnipePyroSkill : BaseRailgunSkillDef<ChargeSnipePyroSkill>
	{
		protected override string skillName => "Pyrocharge";

		protected override string skillDescription => "<style=cIsDamage>Ignite</style>. Fire a piercing round for <style=cIsDamage>1000%-8000% damage</style>. Damage increases the longer you hold the skill. Holding the skill causes you to <style=cIsHealth>overheat</style>, taking rapidly increasing damage.";

		protected override Type activationState => typeof(ChargeSnipePyro);

		protected override string activationStateMachineName => "Weapon";

		protected override GameObject bodyPrefab => Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.RailgunnerBody_prefab).WaitForCompletion();

		protected override Skill skillCategory => Skill.Special;

		protected override Sprite icon => Assets.assetBundle.LoadAsset<Sprite>("texPyroSnipe");

		protected override int baseMaxStock => 1;

		protected override float baseRechargeInterval => 12f;

		protected override bool beginSkillCooldownOnSkillEnd => false;

		protected override bool canceledFromSprinting => false;

		protected override bool cancelSprintingOnActivation => true;

		protected override bool fullRestockOnAssign => true;

		protected override InterruptPriority interruptPriority => (InterruptPriority)1;

		protected override bool isCombatSkill => false;

		protected override bool mustKeyPress => false;

		protected override int rechargeStock => 1;

		protected override int requiredStock => 1;

		protected override int stockToConsume => 1;
	}
	public class CookSkill : BaseSkill<CookSkill>
	{
		protected override string skillName => "Cook";

		protected override string skillDescription => "Produce <style=cIsUtility>4 food-related temporary items</style>. Has a small chance to produce <style=cIsUtility>permanent meal items</style> if you have the correct ingredients.";

		protected override Type activationState => typeof(CookItem);

		protected override string activationStateMachineName => "Weapon";

		protected override GameObject bodyPrefab => Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_Chef.ChefBody_prefab).WaitForCompletion();

		protected override Skill skillCategory => Skill.Special;

		protected override Sprite icon => Assets.assetBundle.LoadAsset<Sprite>("texChefCook");

		protected override int baseMaxStock => 1;

		protected override float baseRechargeInterval => 35f;

		protected override bool beginSkillCooldownOnSkillEnd => false;

		protected override bool canceledFromSprinting => false;

		protected override bool cancelSprintingOnActivation => true;

		protected override bool fullRestockOnAssign => true;

		protected override InterruptPriority interruptPriority => (InterruptPriority)2;

		protected override bool isCombatSkill => false;

		protected override bool mustKeyPress => true;

		protected override int rechargeStock => 1;

		protected override int requiredStock => 1;

		protected override int stockToConsume => 1;
	}
	public class FireMineExplosive : BaseSkill<FireMineExplosive>
	{
		protected override string skillName => "Kinetic Device";

		protected override string skillDescription => "Throw out a device that deals <style=cIsDamage>500% damage</style>, and <style=cIsUtility>pushes</style> you and all nearby enemies.";

		protected override Type activationState => typeof(global::FenrisSkills.Skills.States.Railgunner.FireMineExplosive);

		protected override string activationStateMachineName => "WeaponMine";

		protected override GameObject bodyPrefab => Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.RailgunnerBody_prefab).WaitForCompletion();

		protected override Skill skillCategory => Skill.Utility;

		protected override Sprite icon => Assets.assetBundle.LoadAsset<Sprite>("texRailgunnerFireMineExplosive");

		protected override int baseMaxStock => 1;

		protected override float baseRechargeInterval => 8f;

		protected override bool beginSkillCooldownOnSkillEnd => false;

		protected override bool canceledFromSprinting => false;

		protected override bool cancelSprintingOnActivation => false;

		protected override bool fullRestockOnAssign => true;

		protected override InterruptPriority interruptPriority => (InterruptPriority)2;

		protected override bool isCombatSkill => false;

		protected override bool mustKeyPress => true;

		protected override int rechargeStock => 1;

		protected override int requiredStock => 1;

		protected override int stockToConsume => 1;
	}
	public class FireSnipePyroSkill : BaseRailgunSkillDef<FireSnipePyroSkill>
	{
		protected override string skillName => "Pyrocharged Railgun";

		protected override string skillDescription => "<style=cIsDamage>Ignite</style>. Launch a super-heated projectile for <style=cIsDamage>1000%-8000% damage</style>.";

		protected override Type activationState => typeof(WindupSnipePyro);

		protected override string activationStateMachineName => "Weapon";

		protected override GameObject bodyPrefab => Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.RailgunnerBody_prefab).WaitForCompletion();

		protected override Skill skillCategory => Skill.Special;

		protected override Sprite icon => Assets.assetBundle.LoadAsset<Sprite>("texPyroSnipeFire");

		protected override int baseMaxStock => 1;

		protected override float baseRechargeInterval => 1f;

		protected override bool beginSkillCooldownOnSkillEnd => false;

		protected override bool canceledFromSprinting => false;

		protected override bool cancelSprintingOnActivation => true;

		protected override bool fullRestockOnAssign => true;

		protected override InterruptPriority interruptPriority => (InterruptPriority)1;

		protected override bool isCombatSkill => true;

		protected override bool mustKeyPress => false;

		protected override int rechargeStock => 1;

		protected override int requiredStock => 1;

		protected override int stockToConsume => 1;

		protected override bool addToSkillFamily => false;
	}
	public class PrepRailgunStrikeSkill : BaseCaptainOrbitalSkill<PrepRailgunStrikeSkill>
	{
		protected override string skillName => "OGM-84 'ATLAS' Strike";

		protected override string skillDescription => "<style=cIsDamage>Stunning</style>. Request up to <style=cIsDamage>3</style> orbital railcannon strikes from the <style=cIsDamage>UES Safe Travels</style>. Each strike deals <style=cIsDamage>750% damage</style>, or <style=cIsDamage>1500% damage</style> on a critical hit.";

		protected override Type activationState => typeof(SetupRailgunStrike);

		protected override string activationStateMachineName => "Skillswap";

		protected override GameObject bodyPrefab => Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Captain.CaptainBody_prefab).WaitForCompletion();

		protected override Skill skillCategory => Skill.Utility;

		protected override Sprite icon => Assets.assetBundle.LoadAsset<Sprite>("texRailCannon");

		protected override int baseMaxStock => 1;

		protected override float baseRechargeInterval => 16f;

		protected override bool beginSkillCooldownOnSkillEnd => true;

		protected override bool canceledFromSprinting => true;

		protected override bool cancelSprintingOnActivation => true;

		protected override bool fullRestockOnAssign => true;

		protected override InterruptPriority interruptPriority => (InterruptPriority)2;

		protected override bool isCombatSkill => true;

		protected override bool mustKeyPress => true;

		protected override int rechargeStock => 1;

		protected override int requiredStock => 1;

		protected override int stockToConsume => 1;
	}
	public class StackingParrySkill : BaseSkill<StackingParrySkill>
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_TakeDamageProcess <0>__TriggerLoaderParry;

			public static hook_OnEnter <1>__ApplyChargedFistBonusDamage;

			public static hook_OnMeleeHitAuthority <2>__FlagChargedFistBonusDamage;

			public static hook_OnExit <3>__RemoveChargedFistBonusDamage;
		}

		protected override string skillName => "Reverberate";

		protected override string skillDescription => "Enter a parrying stance for a short duration. A successful parry <style=cIsUtility>pushes</style> nearby enemies, reduces the cooldown by <style=cIsUtility>50%</style>, and grants a stack of <style=cIsDamage>Retaliate</style>.";

		protected override Type activationState => typeof(StackingParry);

		protected override string activationStateMachineName => "Pylon";

		protected override GameObject bodyPrefab => Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Loader.LoaderBody_prefab).WaitForCompletion();

		protected override Skill skillCategory => Skill.Special;

		protected override Sprite icon => Assets.assetBundle.LoadAsset<Sprite>("texChefCook");

		protected override int baseMaxStock => 1;

		protected override float baseRechargeInterval => 12f;

		protected override bool beginSkillCooldownOnSkillEnd => true;

		protected override bool canceledFromSprinting => false;

		protected override bool cancelSprintingOnActivation => false;

		protected override bool fullRestockOnAssign => true;

		protected override InterruptPriority interruptPriority => (InterruptPriority)2;

		protected override bool isCombatSkill => false;

		protected override bool mustKeyPress => true;

		protected override int rechargeStock => 1;

		protected override int requiredStock => 1;

		protected override int stockToConsume => 1;

		protected override string[] keywordTokens => new string[1] { "MWMW_FENRISSKILLS_KEYWORD_RETALIATE" };

		protected override void CreateSkill()
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected O, but got Unknown
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Expected O, but got Unknown
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Expected O, but got Unknown
			base.CreateSkill();
			LanguageAPI.Add("MWMW_FENRISSKILLS_KEYWORD_RETALIATE", "<style=cKeywordName>Retaliate</style><style=cSub>Your next gauntlet punch does <style=cIsDamage>50% more damage</style> for each stack of Retaliate you have. You can hold up to <style=cIsUtility>5</style> stacks.");
			object obj = <>O.<0>__TriggerLoaderParry;
			if (obj == null)
			{
				hook_TakeDamageProcess val = TriggerLoaderParry;
				<>O.<0>__TriggerLoaderParry = val;
				obj = (object)val;
			}
			HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)obj;
			object obj2 = <>O.<1>__ApplyChargedFistBonusDamage;
			if (obj2 == null)
			{
				hook_OnEnter val2 = ApplyChargedFistBonusDamage;
				<>O.<1>__ApplyChargedFistBonusDamage = val2;
				obj2 = (object)val2;
			}
			BaseSwingChargedFist.OnEnter += (hook_OnEnter)obj2;
			object obj3 = <>O.<2>__FlagChargedFistBonusDamage;
			if (obj3 == null)
			{
				hook_OnMeleeHitAuthority val3 = FlagChargedFistBonusDamage;
				<>O.<2>__FlagChargedFistBonusDamage = val3;
				obj3 = (object)val3;
			}
			BaseSwingChargedFist.OnMeleeHitAuthority += (hook_OnMeleeHitAuthority)obj3;
			object obj4 = <>O.<3>__RemoveChargedFistBonusDamage;
			if (obj4 == null)
			{
				hook_OnExit val4 = RemoveChargedFistBonusDamage;
				<>O.<3>__RemoveChargedFistBonusDamage = val4;
				obj4 = (object)val4;
			}
			BaseSwingChargedFist.OnExit += (hook_OnExit)obj4;
		}

		private static void TriggerLoaderParry(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Expected O, but got Unknown
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: 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_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: 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_01cc: 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_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_01e2: Expected O, but got Unknown
			//IL_01e3: 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)
			if (!self.body.HasBuff(Buffs.loaderParryBuff) || self.body.HasBuff(Buffs.HiddenRejectAllDamage) || !self.alive || self.godMode)
			{
				orig.Invoke(self, damageInfo);
				return;
			}
			self.body.RemoveBuff(Buffs.loaderParryBuff);
			EffectData val = new EffectData
			{
				origin = self.body.corePosition,
				start = self.body.corePosition,
				scale = self.body.radius
			};
			EffectManager.SpawnEffect(Assets.stackingParryEffectPrefab, val, true);
			if (Object.op_Implicit((Object)(object)self.body.skillLocator))
			{
				GenericSkill special = self.body.skillLocator.special;
				if (special != null)
				{
					special.rechargeStopwatch += 0.5f * special.finalRechargeInterval;
				}
			}
			damageInfo.rejected = true;
			self.body.AddTimedBuff(Buffs.HiddenInvincibility, 0.5f);
			if ((float)self.body.GetBuffCount(Buffs.loaderGauntletBonusBuff) < 5f)
			{
				self.body.AddBuff(Buffs.loaderGauntletBonusBuff);
				NetMessageExtensions.Send((INetMessage)(object)new SyncTriggerStackingParry(((NetworkBehaviour)self.body).netIdentity.netId), (NetworkDestination)1);
			}
			BlastAttack val2 = new BlastAttack
			{
				position = self.body.corePosition,
				attacker = ((Component)self.body).gameObject,
				baseDamage = 0f,
				procChainMask = default(ProcChainMask),
				procCoefficient = 0f,
				radius = 30f,
				teamIndex = self.body.teamComponent.teamIndex,
				baseForce = 3000f,
				bonusForce = Vector3.up * 2500f
			};
			val2.Fire();
			orig.Invoke(self, damageInfo);
		}

		private static void ApplyChargedFistBonusDamage(orig_OnEnter orig, BaseSwingChargedFist self)
		{
			orig.Invoke(self);
			if (((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((EntityState)self).characterBody.HasBuff(Buffs.loaderGauntletBonusBuff))
			{
				self.bonusDamage += (((BasicMeleeAttack)self).damageCoefficient * ((BaseState)self).damageStat + self.bonusDamage) * 0.5f * (float)((EntityState)self).characterBody.GetBuffCount(Buffs.loaderGauntletBonusBuff);
			}
		}

		private static void FlagChargedFistBonusDamage(orig_OnMeleeHitAuthority orig, BaseSwingChargedFist self)
		{
			orig.Invoke(self);
			LoaderRetailiateController loaderRetailiateController = default(LoaderRetailiateController);
			if (((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((EntityState)self).characterBody.HasBuff(Buffs.loaderGauntletBonusBuff) && ((EntityState)self).TryGetComponent<LoaderRetailiateController>(ref loaderRetailiateController))
			{
				loaderRetailiateController.MarkDamageBonusForRemoval();
			}
		}

		private static void RemoveChargedFistBonusDamage(orig_OnExit orig, BaseSwingChargedFist self)
		{
			orig.Invoke(self);
			LoaderRetailiateController loaderRetailiateController = default(LoaderRetailiateController);
			if (((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((EntityState)self).characterBody.HasBuff(Buffs.loaderGauntletBonusBuff) && ((EntityState)self).TryGetComponent<LoaderRetailiateController>(ref loaderRetailiateController))
			{
				loaderRetailiateController.UpdateDamageBonusStatus();
			}
		}
	}
}
namespace FenrisSkills.Skills.States.Railgunner
{
	public class ChargedPyro : BaseCharged
	{
		private const float applyDotMaxTime = 0.5f;

		private const float applyDotMinTime = 0.05f;

		public float damageCoefficient = minCoeff;

		private float currentApplyDotTime = 0.5f;

		private float applyDotStopwatch = 0.5f;

		private DotController dotController;

		private PyroUIColorController colorController;

		private static Color[] gradient = (Color[])(object)new Color[6]
		{
			new Color(0.27f, 0.08f, 0f),
			new Color(1f, 0.14f, 0.14f),
			new Color(1f, 0.58f, 0.04f),
			new Color(1f, 0.98f, 0.75f),
			Color.white,
			Color.white
		};

		public static GameObject pyroCrosshairOverridePrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_Railgunner.RailgunnerSuperchargeCrosshair_prefab).WaitForCompletion();

		public static LoopSoundDef pyroLoopSoundDef = Addressables.LoadAssetAsync<LoopSoundDef>((object)RoR2_DLC1_Railgunner.lsdRailgunnerBackpackCharged_asset).WaitForCompletion();

		public static float minCoeff => Options.pyroMinDamageCoeff.Value;

		public static float maxCoeff => Options.pyroMaxDamageCoeff.Value;

		public static float damageIncreaseSpd => Options.pyroDmgIncreaseSpd.Value;

		private static float applyDotTimeReductionMult => Options.pyroSelfDmgTimerMult.Value;

		public override void OnEnter()
		{
			Util.PlaySound("Play_lemurianBruiser_m1_fly_loop", ((EntityState)this).gameObject);
			base.crosshairOverridePrefab = pyroCrosshairOverridePrefab;
			base.animationStateName = "Charged";
			base.animationPlaybackRateParam = "Backpack.playbackRate";
			base.animationLayerName = "Backpack";
			base.primaryOverride = BaseSkill<FireSnipePyroSkill>.skillDef;
			base.overlayPrefab = Assets.pyroOverlayPrefab;
			base.overlayChildLocatorEntry = "CrosshairExtras";
			((BaseBackpack)this).mecanimBoolName = "isBackpackActive";
			((BaseBackpack)this).loopSoundDef = pyroLoopSoundDef;
			((BaseBackpack)this).enterSoundString = "Play_railgunner_R_gun_ready";
			base.duration = 9999f;
			((BaseCharged)this).OnEnter();
			base.overlayController.onInstanceAdded += delegate(OverlayController controller, GameObject instance)
			{
				colorController = instance.GetComponent<PyroUIColorController>();
			};
		}

		public override void FixedUpdate()
		{
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			((BaseCharged)this).FixedUpdate();
			damageCoefficient = Mathf.Lerp(damageCoefficient, maxCoeff, damageIncreaseSpd * Time.deltaTime);
			if (base.duration > 0f)
			{
				float num = damageCoefficient / maxCoeff;
				foreach (ImageFillController fillUi in base.fillUiList)
				{
					fillUi.SetTValue(num);
				}
				if (Object.op_Implicit((Object)(object)colorController))
				{
					colorController.UpdateColors(Utils.LerpGradient(gradient, num));
				}
			}
			if (!NetworkServer.active)
			{
				return;
			}
			applyDotStopwatch += Time.deltaTime;
			if (!(applyDotStopwatch > currentApplyDotTime))
			{
				return;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).healthComponent))
			{
				while (applyDotStopwatch >= currentApplyDotTime)
				{
					InflictDotInfo val = new InflictDotInfo
					{
						victimObject = ((EntityState)this).gameObject,
						attackerObject = ((EntityState)this).gameObject,
						totalDamage = ((EntityState)this).healthComponent.fullHealth * 0.1f,
						dotIndex = (DotIndex)1,
						damageMultiplier = 1f,
						hitHurtBox = ((EntityState)this).characterBody.mainHurtBox
					};
					DotController.InflictDot(ref val);
					if (!Object.op_Implicit((Object)(object)dotController))
					{
						DotController.dotControllerLocator.TryGetValue(((Object)((EntityState)this).gameObject).GetInstanceID(), out dotController);
					}
					if (Object.op_Implicit((Object)(object)dotController) && dotController.dotStackList.Count > 0)
					{
						List<DotStack> dotStackList = dotController.dotStackList;
						dotStackList[dotStackList.Count - 1].timer = 0.5f;
						List<DotStack> dotStackList2 = dotController.dotStackList;
						dotStackList2[dotStackList2.Count - 1].totalDuration = 0.5f;
					}
					applyDotStopwatch -= currentApplyDotTime;
				}
			}
			applyDotStopwatch = 0f;
			currentApplyDotTime = Mathf.Clamp(currentApplyDotTime * applyDotTimeReductionMult, 0.05f, 0.5f);
		}

		public override EntityState InstantiateExpiredState()
		{
			return (EntityState)(object)new ExpiredPyro();
		}
	}
	public class ChargeSnipePyro : BaseChargeSnipe
	{
		public override void OnEnter()
		{
			base.baseDuration = 2f;
			base.animationStateName = "ChargeSuper";
			base.animationPlaybackRateParam = "Super.playbackRate";
			base.animationLayerName = "Gesture, Override";
			((BaseChargeSnipe)this).OnEnter();
		}

		public override EntityState InstantiateBackpackState()
		{
			return (EntityState)(object)new ChargingPyro();
		}
	}
	public class ChargingPyro : BaseCharging
	{
		public static GameObject pyroCrosshairOverridePrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_UI.SimpleDotCrosshair_prefab).WaitForCompletion();

		public static LoopSoundDef pyroLoopSoundDef = Addressables.LoadAssetAsync<LoopSoundDef>((object)RoR2_DLC1_Railgunner.lsdRailgunnerBackpackCharging_asset).WaitForCompletion();

		public override void OnEnter()
		{
			((BaseBackpack)this).mecanimBoolName = "mecanimBoolName";
			((BaseBackpack)this).loopSoundDef = pyroLoopSoundDef;
			((BaseBackpack)this).enterSoundString = "Play_railgunner_R_gun_swap";
			base.crosshairOverridePrefab = pyroCrosshairOverridePrefab;
			base.baseDuration = 2f;
			base.animationStateName = "Charging";
			base.animationPlaybackRate