Decompiled source of BalancedFalseSon v1.0.0

BalancedFalseSon.dll

Decompiled 19 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BalancedFalseSon.Changes;
using BalancedFalseSon.Modules;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.FalseSon;
using IL.EntityStates.FalseSon;
using IL.RoR2;
using Microsoft.CodeAnalysis;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using On.EntityStates;
using On.EntityStates.FalseSon;
using On.RoR2;
using R2API;
using RoR2;
using RoR2.Achievements.FalseSon;
using RoR2.ContentManagement;
using RoR2.Skills;
using RoR2BepInExPack.GameAssetPathsBetter;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("RoR2")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BalancedFalseSon")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BalancedFalseSon")]
[assembly: AssemblyTitle("BalancedFalseSon")]
[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 BalancedFalseSon
{
	[BepInPlugin("com.Bloonjitsu7.BalancedFalseSon", "BalancedFalseSon", "1.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class MainPlugin : BaseUnityPlugin
	{
		public void Awake()
		{
			Log.Init(((BaseUnityPlugin)this).Logger);
			new ContentPacks().Initialize();
			Main main = new Main();
			main.SetupConfig(((BaseUnityPlugin)this).Config);
			main.Initialize();
		}
	}
	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);
		}
	}
}
namespace BalancedFalseSon.Modules
{
	public static class DamageTypes
	{
		public static ModdedDamageType fsLaserRechargeProc = DamageAPI.ReserveDamageType();
	}
	public static class Buffs
	{
		internal static List<BuffDef> buffDefs = new List<BuffDef>();

		internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown, bool isHidden, bool ignoreNectar)
		{
			//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)
			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.isCooldown = isCooldown;
			val.isHidden = isHidden;
			val.ignoreGrowthNectar = ignoreNectar;
			buffDefs.Add(val);
			return val;
		}
	}
	public static class Effects
	{
		private static GameObject finder = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Mushroom.MushroomWard_prefab).WaitForCompletion();

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

		internal static void RegisterEffects()
		{
		}

		private static GameObject CreateTracer()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CloneTracer("RoR2/Base/Huntress/TracerHuntressSnipe.prefab", "TracerStormboundAurelioniteLaser", Color.red, new Color(1f, 0.04f, 0.04f, 1f), 2f);
			Object.Destroy((Object)(object)((Component)val.transform.Find("TracerHead")).gameObject);
			return val;
		}

		private static GameObject CreateHuntressVFX()
		{
			//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)
			return CloneObject(RoR2_Base_Huntress.HuntressArrowRain_prefab, "BloonHuntressArrowRain", Color.cyan, Color.cyan, 1f, 0f, colorMesh: false);
		}

		private static GameObject CloneObject(string originalObjectName, string newObjectName, Color color1, Color color2, float scaleMult = 1f, float colorTemp = 0f, bool colorMesh = true, string soundName = "", bool parentToTransform = false, bool recolor = true)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Addressables.LoadAssetAsync<GameObject>((object)originalObjectName).WaitForCompletion();
			if ((Object)(object)val == (Object)null)
			{
				Log.Warning(originalObjectName + " is null!");
				return null;
			}
			Component[] componentsInChildren = val.GetComponentsInChildren(typeof(Component));
			foreach (Component data in componentsInChildren)
			{
				Log.Message(data);
			}
			GameObject val2 = PrefabAPI.InstantiateClone(val, newObjectName, false);
			if ((Object)(object)val2.GetComponent<EffectComponent>() == (Object)null)
			{
				val2.AddComponent<EffectComponent>();
			}
			if ((Object)(object)val2.GetComponent<VFXAttributes>() == (Object)null)
			{
				val2.AddComponent<VFXAttributes>();
			}
			val2.GetComponent<VFXAttributes>().vfxPriority = (VFXPriority)2;
			val2.GetComponent<VFXAttributes>().DoNotPool = true;
			if (recolor)
			{
				val2.Recolor(color1, color2, scaleMult, colorTemp, colorMesh);
			}
			CreateEffectFromObject(val2, soundName, parentToTransform);
			return val2;
		}

		private static GameObject CloneTracer(string originalTracerName, string newTracerName, Color color1, Color color2, float widthMult = 1f, float? speed = null, float? length = null)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: 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)
			GameObject val = Addressables.LoadAssetAsync<GameObject>((object)originalTracerName).WaitForCompletion();
			if ((Object)(object)val == (Object)null)
			{
				Log.Warning(originalTracerName + " is null!");
				return null;
			}
			GameObject val2 = PrefabAPI.InstantiateClone(val, newTracerName, false);
			if (!Object.op_Implicit((Object)(object)val2.GetComponent<EffectComponent>()))
			{
				val2.AddComponent<EffectComponent>();
			}
			if (!Object.op_Implicit((Object)(object)val2.GetComponent<VFXAttributes>()))
			{
				val2.AddComponent<VFXAttributes>();
			}
			val2.GetComponent<VFXAttributes>().vfxPriority = (VFXPriority)2;
			val2.GetComponent<VFXAttributes>().DoNotPool = true;
			if (!Object.op_Implicit((Object)(object)val2.GetComponent<NetworkIdentity>()))
			{
				val2.AddComponent<NetworkIdentity>();
			}
			val2.GetComponent<Tracer>().speed = (speed.HasValue ? speed.Value : val2.GetComponent<Tracer>().speed);
			val2.GetComponent<Tracer>().length = (length.HasValue ? length.Value : val2.GetComponent<Tracer>().length);
			val2.Recolor(color1, color2, widthMult);
			CreateAndAddEffectDef(val2);
			return val2;
		}

		private static void Recolor(this GameObject thingToColor, Color color1, Color color2, float widthMult = 1f, float colorTemp = 0f, bool colorMesh = true)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Expected O, but got Unknown
			//IL_00d7: 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_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_023c: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
			bool flag = true;
			LineRenderer[] componentsInChildren = thingToColor.GetComponentsInChildren<LineRenderer>();
			foreach (LineRenderer val in componentsInChildren)
			{
				bool flag2 = true;
				val.startColor = color1;
				val.endColor = color2;
				if (widthMult != 1f)
				{
					val.widthMultiplier *= widthMult;
				}
			}
			ParticleSystem[] componentsInChildren2 = thingToColor.GetComponentsInChildren<ParticleSystem>();
			foreach (ParticleSystem val2 in componentsInChildren2)
			{
				MainModule main = val2.main;
				MinMaxCurve startSize = ((MainModule)(ref main)).startSize;
				((MainModule)(ref main)).startSize = new MinMaxCurve(((MinMaxCurve)(ref startSize)).constant * widthMult);
				((MainModule)(ref main)).startColor = new MinMaxGradient(color1);
				TrailModule trails = val2.trails;
				if (((TrailModule)(ref trails)).enabled)
				{
					Gradient val3 = new Gradient();
					GradientColorKey[] array = (GradientColorKey[])(object)new GradientColorKey[2];
					array[0].color = color1;
					array[0].time = 0f;
					array[1].color = color2;
					array[1].time = 1f;
					GradientAlphaKey[] array2 = (GradientAlphaKey[])(object)new GradientAlphaKey[2];
					array2[0].alpha = color1.a;
					array2[0].time = 0f;
					array2[1].alpha = color2.a;
					array2[1].time = 1f;
					val3.SetKeys(array, array2);
					((TrailModule)(ref trails)).colorOverLifetime = new MinMaxGradient(val3);
				}
			}
			Light[] componentsInChildren3 = thingToColor.GetComponentsInChildren<Light>();
			foreach (Light val4 in componentsInChildren3)
			{
				if (colorTemp > 0f)
				{
					val4.colorTemperature = colorTemp;
					val4.useColorTemperature = true;
				}
				else
				{
					val4.useColorTemperature = false;
				}
				val4.color = color1;
				Transform transform = ((Component)val4).transform;
				transform.localScale *= widthMult;
			}
			ParticleSystemRenderer[] componentsInChildren4 = thingToColor.GetComponentsInChildren<ParticleSystemRenderer>();
			foreach (ParticleSystemRenderer val5 in componentsInChildren4)
			{
				((Renderer)val5).material.SetColor("_MainColor", color1);
				((Renderer)val5).material.SetColor("_Color", color1);
				((Renderer)val5).material.SetColor("_TintColor", color2);
			}
			if (colorMesh)
			{
				MeshRenderer[] componentsInChildren5 = thingToColor.GetComponentsInChildren<MeshRenderer>();
				foreach (MeshRenderer val6 in componentsInChildren5)
				{
					((Renderer)val6).material.SetColor("_MainColor", color1);
					((Renderer)val6).material.SetColor("_Color", color1);
					((Renderer)val6).material.SetColor("_TintColor", color2);
				}
			}
		}

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

		internal static EffectDef CreateAndAddEffectDef(GameObject effectPrefab, bool donotPool = false)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			if (donotPool)
			{
				VFXAttributes val = effectPrefab.GetComponent<VFXAttributes>();
				if ((Object)(object)val == (Object)null)
				{
					val = effectPrefab.AddComponent<VFXAttributes>();
				}
				val.DoNotPool = true;
			}
			EffectDef val2 = new EffectDef(effectPrefab);
			AddEffectDef(val2);
			return val2;
		}

		internal static void CreateEffectFromObject(GameObject newEffect, string soundName, bool parentToTransform)
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			newEffect.AddComponent<DestroyOnTimer>().duration = 6f;
			newEffect.AddComponent<NetworkIdentity>();
			if (!Object.op_Implicit((Object)(object)newEffect.GetComponent<VFXAttributes>()))
			{
				newEffect.AddComponent<VFXAttributes>().vfxPriority = (VFXPriority)2;
			}
			EffectComponent component = newEffect.GetComponent<EffectComponent>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				component = newEffect.AddComponent<EffectComponent>();
				component.applyScale = true;
				component.effectIndex = (EffectIndex)(-1);
				component.parentToReferencedTransform = parentToTransform;
				component.positionAtReferencedTransform = true;
				component.soundName = soundName;
			}
			CreateAndAddEffectDef(newEffect);
		}
	}
	internal class ContentPacks : IContentPackProvider
	{
		internal ContentPack contentPack = new ContentPack();

		public string identifier => "com.Bloonjitsu7.BalancedFalseSon";

		public void Initialize()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			Effects.RegisterEffects();
			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.effectDefs.Add(Effects.effectDefs.ToArray());
			contentPack.buffDefs.Add(Buffs.buffDefs.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;
		}
	}
}
namespace BalancedFalseSon.Changes
{
	public class Main
	{
		public static List<Hook> hooks = new List<Hook>();

		public static List<ILHook> ILhooks = new List<ILHook>();

		public static BuffDef GrowthBuff;

		public static BuffDef LaserArmorBuff;

		private static Sprite growthIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_DLC2_Elites_EliteBead.texBuffEliteBeadIcon_png).WaitForCompletion();

		private static Sprite armorIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Common.texBuffGenericShield_tif).WaitForCompletion();

		internal static bool HasStormbound => Chainloader.PluginInfos.ContainsKey("com.Bloonjitsu7.StormboundFalseSon");

		public void SetupConfig(ConfigFile cfg)
		{
		}

		public void Initialize()
		{
			CreateBuffs();
			FalseSonChanges falseSonChanges = new FalseSonChanges();
			falseSonChanges.Initialize();
		}

		private void CreateBuffs()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			GrowthBuff = Buffs.AddNewBuff("BloonGrowthBuff", growthIcon, Color.yellow, canStack: true, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: true);
			LaserArmorBuff = Buffs.AddNewBuff("BloonFSLaserArmorBuff", armorIcon, Color.yellow, canStack: false, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: false);
		}

		public static float ConvertReductionIntoStackingDivision(float baseFraction, int itemCount)
		{
			float num = 1f - baseFraction;
			float num2 = (1f + num) / num - 2f;
			num2 *= (float)(itemCount - 1);
			return num2 + 1f;
		}

		public static void DumpComponents(GameObject gameObject)
		{
			Component[] componentsInChildren = gameObject.GetComponentsInChildren(typeof(Component));
			foreach (Component data in componentsInChildren)
			{
				Log.Message(data);
			}
		}
	}
	public class FalseSonChanges
	{
		private static GameObject survivorPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSon.FalseSonBody_prefab).WaitForCompletion();

		public static SkillDef spikeSkill = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_DLC2_FalseSon.FalseSonBodyLunarSpikes_asset).WaitForCompletion();

		public static SkillDef stakeSkill = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_DLC2_FalseSon.FalseSonLunarStake_asset).WaitForCompletion();

		public static SkillDef dashSkill = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_DLC2_FalseSon.FalseSonBodyStep_asset).WaitForCompletion();

		public static SkillDef meridianSkill = Addressables.LoadAssetAsync<SkillDef>((object)RoR2_DLC2_FalseSon.FalseSonMeridiansWill_asset).WaitForCompletion();

		public static SteppedSkillDef laserSkill = Addressables.LoadAssetAsync<SteppedSkillDef>((object)RoR2_DLC2_FalseSon.FalseSonBodyLaser_asset).WaitForCompletion();

		public static SteppedSkillDef burstSkill = Addressables.LoadAssetAsync<SteppedSkillDef>((object)RoR2_DLC2_FalseSon.FalseSonBodyLaserBurst_asset).WaitForCompletion();

		public void Initialize()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Expected O, but got Unknown
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Expected O, but got Unknown
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Expected O, but got Unknown
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Expected O, but got Unknown
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Expected O, but got Unknown
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Expected O, but got Unknown
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Expected O, but got Unknown
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Expected O, but got Unknown
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Expected O, but got Unknown
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Expected O, but got Unknown
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			GenericProjectileBaseState.OnEnter += new hook_OnEnter(OnProjectileEnter);
			GenericBulletBaseState.OnEnter += new hook_OnEnter(OnBulletEnter);
			BasicMeleeAttack.OnEnter += new hook_OnEnter(OnMeleeEnter);
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnRecalcStats);
			CharacterBody.ComputeTamperedHeartBonus += new hook_ComputeTamperedHeartBonus(OnComputeTamperedHeart);
			HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(OnTakeDamage);
			if (!Main.HasStormbound)
			{
				HealthComponent.TakeDamageProcess += new Manipulator(IL_TakeDamage);
			}
			FalseSonController.UpdateGrowth += new hook_UpdateGrowth(OnUpdateGrowth);
			FalseSonController.GetGrowthSpecialStock += new hook_GetGrowthSpecialStock(OnUpdateSpecial);
			FalseSonController.GetGrowthLaserBonusDuration += new hook_GetGrowthLaserBonusDuration(OnUpdateLaser);
			LunarSpikes.InitializeLunarSpike += new hook_InitializeLunarSpike(OnInitLunarSpike);
			MeridiansWillFire.OnEnter += new hook_OnEnter(OnMeridianEnter);
			LaserFatherCharged.OnEnter += new hook_OnEnter(OnLaserEnter);
			LaserFatherCharged.OnExit += new hook_OnExit(OnLaserExit);
			LaserFatherCharged.OnEnter += new Manipulator(IL_LaserEnter);
			LaserFatherCharged.FixedUpdate += new Manipulator(IL_LaserUpdate);
			LaserFatherCharged.FireBullet += new Manipulator(IL_LaserFire);
			RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoadFalseSon));
			UpdateLang();
		}

		public void OnLoadFalseSon()
		{
			StepBrothers.damageCoefficient = 3f;
			LunarSpikes.attackSpeedAltAnimationThreshold = 1.4f;
			LaserFatherBurst.damageCoefficient = 12f;
			FalseSonGrowthChallenge.requirement = 25;
			dashSkill.baseMaxStock = 1;
			dashSkill.baseRechargeInterval = 7f;
			stakeSkill.baseRechargeInterval = 10f;
			((SkillDef)burstSkill).baseRechargeInterval = 8.5f;
			FalseSonController.meridianWillMultiplier = 2.5f;
		}

		public void UpdateLang()
		{
			LanguageAPI.Add("KEYWORD_BLOONSPIKEGROWTH", "<style=cKeywordName>Growth</style><style=cSub>Each stack of <style=cIsHealing>Growth</style> grants this skill an additional charge.</style>");
			LanguageAPI.Add("KEYWORD_BLOONSTAKEGROWTH", "<style=cKeywordName>Growth</style><style=cSub>Every 2 stacks of <style=cIsHealing>Growth</style> grants this skill an additional charge.</style>");
			LanguageAPI.Add("KEYWORD_BLOONDASHGROWTH", "<style=cKeywordName>Growth</style><style=cSub>Every 3 stacks of <style=cIsHealing>Growth</style> grants this skill an additional charge.</style>");
			LanguageAPI.Add("KEYWORD_BLOONMERIDIANGROWTH", "<style=cKeywordName>Growth</style><style=cSub>Each stack of <style=cIsHealing>Growth</style> grants this skill +20% damage and +10% radius.</style>");
			LanguageAPI.Add("KEYWORD_BLOONLASERGROWTH", "<style=cKeywordName>Growth</style><style=cSub>Each stack of <style=cIsHealing>Growth</style> increases this skill's tick rate by 10%.</style>");
			LanguageAPI.Add("KEYWORD_BLOONBURSTGROWTH", "<style=cKeywordName>Growth</style><style=cSub>Every 4 stacks of <style=cIsHealing>Growth</style> grants this skill an additional charge.</style>");
			LanguageAPI.Add("KEYWORD_ENERGIZEDCORE", "<style=cKeywordName>Energized Core</style><style=cSub>Increases the benefits of your passive by 2.5x.</style>");
			LanguageAPI.Add("FALSESON_DESCRIPTION", "The False Son is a slow but stalwart close-range warrior. With extreme health and defense, False Son can weather any storm. Use False Son\\u2019s durability to stay in the fray and capitalize on his slow but deadly skills.<style=cSub>\r\n\r\n< ! > False son closes the distance on enemies with dashes to deliver destruction with his lunar club. Charge the club swing for an explosive slam.\r\n\r\n< ! > Increasing your max health increases your Lunar Spike count, which in turn increases your power. Try building into items that boost health and durability.\r\n\r\n< ! > For each Lunar Spike you have you gain primary damage and armor and using the Lunar Spikes depletes those bonuses. The more depleted slots of Lunar Spikes you have, the quicker you will move and heal.\r\n\r\n< ! > Utilize the long-range potential of your laser and lunar spikes to pick off out-of-reach aerial enemies.</style>");
			LanguageAPI.Add("ACHIEVEMENT_FALSESONGROWTHCHALLENGE_DESCRIPTION", "As False Son, reach 25 stacks of Growth.");
			LanguageAPI.Add("FALSESON_PASSIVE_DESCRIPTION", "Gain stacks of <style=cIsHealing>Growth</style> as your <style=cIsHealing>maximum health increases</style>, enhancing your abilities. Unused Lunar Spikes give <style=cIsUtility>+7.5% primary skill damage</style> and <style=cIsUtility>+2.5 armor</style>. Used spikes give <style=cIsUtility>+5% movement speed</style> and <style=cIshealing>+2.5 health regeneration</style>.");
			LanguageAPI.Add("FALSESON_PRIMARY_DESCRIPTION", "Swing for <style=cIsDamage>400% damage</style>. Hold the primary and secondary skills to charge a slam for <style=cIsDamage>1000% damage</style>.");
			LanguageAPI.Add("FALSESON_SECONDARY_DESCRIPTION", "<style=cIsHealing>Growth</style>. <style=cIsUtility>Lunar Ruin</style>. <style=cIsUtility>Agile</style>. Throw a Lunar Spike for <style=cIsDamage>200% damage.</style> Starts with 4 charges.");
			spikeSkill.keywordTokens = new string[3] { "KEYWORD_BLOONSPIKEGROWTH", "KEYWORD_LUNARRUIN", "KEYWORD_AGILE" };
			LanguageAPI.Add("FALSESON_SECONDARY_ALT1_DESCRIPTION", "<style=cIsHealing>Growth</style>. <style=cIsUtility>Lunar Ruin</style>. Fire a <style=cIsDamage>piercing</style>, <style=cIsDamage>lightning</style> infused stake for <style=cIsDamage>300% damage</style>. Each Lunar Stake counts as <style=cIsUtility>2</style> Lunar Spikes. Starts with 2 charges.");
			stakeSkill.keywordTokens = new string[3] { "KEYWORD_BLOONSTAKEGROWTH", "KEYWORD_LUNARRUIN", "KEYWORD_LUNARLIGHTNING" };
			LanguageAPI.Add("FALSESON_UTILITY_DESCRIPTION", "<style=cIsHealing>Growth</style>. Dash a short distance, generating an explosion of <style=cIsDamage>300% damage</style> for every enemy hit.");
			dashSkill.keywordTokens = new string[1] { "KEYWORD_BLOONDASHGROWTH" };
			LanguageAPI.Add("FALSESON_UTILITY_ALT1_DESCRIPTION", "<style=cIsHealing>Growth</style>. <style=cIsDamage>Stunning</style>. <style=cIsUtility>Teleport</style> and explode for <style=cIsDamage>150% damage</style>, <style=cIsUtility>pulling</style> enemies towards you. Grants <style=cIsDamage>Energized Core</style> for <style=cIsUtility>5s</style>, plus an additional <style=cIsUtility>1s</style> for each enemy hit.");
			meridianSkill.keywordTokens = new string[3] { "KEYWORD_BLOONMERIDIANGROWTH", "KEYWORD_STUNNING", "KEYWORD_ENERGIZEDCORE" };
			LanguageAPI.Add("FALSESON_SPECIAL_DESCRIPTION", "<style=cIsHealing>Growth</style>. <style=cIsUtility>Charge</style> a rapidly hitting laser that deals <style=cIsDamage>200% damage every 0.25s</style> for <style=cIsUtility>2-6s</style> based on the charge level. Each hit refills <style=cIsUtility>5%</style> of your Lunar Spikes.");
			((SkillDef)laserSkill).keywordTokens = new string[1] { "KEYWORD_BLOONLASERGROWTH" };
			LanguageAPI.Add("FALSESON_SPECIAL_ALT1_DESCRIPTION", "<style=cIsHealing>Growth</style>. Fire an instant piercing laser for <style=cIsDamage>1200% damage</style>, refilling <style=cIsUtility>50%</style> of your Lunar Spikes.");
			((SkillDef)burstSkill).keywordTokens = new string[1] { "KEYWORD_BLOONBURSTGROWTH" };
		}

		public void OnProjectileEnter(orig_OnEnter orig, GenericProjectileBaseState self)
		{
			orig.Invoke(self);
		}

		public void OnBulletEnter(orig_OnEnter orig, GenericBulletBaseState self)
		{
			orig.Invoke(self);
		}

		public void OnMeleeEnter(orig_OnEnter orig, BasicMeleeAttack self)
		{
			if (self is ClubSwing || self is OverheadClubSwing)
			{
				self.damageCoefficient = 4f;
			}
			orig.Invoke(self);
		}

		public int OnUpdateSecondary(orig_GetGrowthSecondaryStock orig, FalseSonController self)
		{
			return 0;
		}

		public int OnUpdateSpecial(orig_GetGrowthSpecialStock orig, FalseSonController self)
		{
			return 0;
		}

		public float OnUpdateLaser(orig_GetGrowthLaserBonusDuration orig, FalseSonController self)
		{
			return 0f;
		}

		public bool OnUpdateGrowth(orig_UpdateGrowth orig, FalseSonController self)
		{
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			float num = self.maxHealth - self.characterBody.baseMaxHealth;
			int num2 = 0;
			float num3 = 50f;
			int num4 = 0;
			while (num > 0f)
			{
				num -= num3;
				num3 *= 1.125f;
				if (num >= 0f)
				{
					num2++;
				}
				num4++;
			}
			if (num2 != self.growthLevel || self.growthLevel != self.characterBody.GetBuffCount(Main.GrowthBuff))
			{
				Log.Message(num2);
				if (NetworkServer.active)
				{
					self.SetGrowthLevel(num2);
					self.characterBody.SetBuffCount(Main.GrowthBuff.buffIndex, num2);
				}
				else
				{
					self.CallCmdSetGrowthLevel(num2);
					self.growthLevel = num2;
				}
				self.UpdateStats();
				return true;
			}
			return false;
		}

		private void OnRecalcStats(CharacterBody sender, StatHookEventArgs args)
		{
			if (!((Object)(object)sender != (Object)null))
			{
				return;
			}
			int buffCount = sender.GetBuffCount(Main.GrowthBuff);
			if (buffCount > 0 && Object.op_Implicit((Object)(object)sender.skillLocator))
			{
				GenericSkill utility = sender.skillLocator.utility;
				if (Object.op_Implicit((Object)(object)utility) && Object.op_Implicit((Object)(object)utility.skillDef) && utility.skillDef.skillIndex == dashSkill.skillIndex)
				{
					args.utilitySkill.bonusStockAdd += (int)Math.Floor((float)buffCount / 3f);
				}
				GenericSkill special = sender.skillLocator.special;
				if (Object.op_Implicit((Object)(object)special) && Object.op_Implicit((Object)(object)special.skillDef) && special.skillDef.skillIndex == ((SkillDef)burstSkill).skillIndex)
				{
					args.specialSkill.bonusStockAdd += (int)Math.Floor((float)buffCount / 4f);
				}
			}
			if (sender.HasBuff(Main.LaserArmorBuff))
			{
				args.armorAdd += 50f;
			}
		}

		public float OnComputeTamperedHeart(orig_ComputeTamperedHeartBonus orig, CharacterBody self, TamperingHeartBonusType bonusType)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Invalid comparison between Unknown and I4
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if ((int)bonusType == 2)
			{
				return 0f;
			}
			return orig.Invoke(self, bonusType);
		}

		private void OnTakeDamage(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo info)
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)info.attacker))
			{
				CharacterBody component = info.attacker.GetComponent<CharacterBody>();
				if (Object.op_Implicit((Object)(object)component) && component.HasBuff(Buffs.TamperingASAndArmorBonus) && (int)info.damageType.damageSource == 1)
				{
					float num = (component.HasBuff(Buffs.EnergizedCore) ? FalseSonController.meridianWillMultiplier : 1f);
					float num2 = 1f + 0.075f * (float)component.GetBuffCount(Buffs.TamperingASAndArmorBonus) * num;
					info.damage *= num2;
				}
				if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.skillLocator) && DamageAPI.HasModdedDamageType(info, DamageTypes.fsLaserRechargeProc))
				{
					Log.Message("Wahoo1");
					GenericSkill secondary = component.skillLocator.secondary;
					if ((Object)(object)secondary != (Object)null && ((Object)(object)secondary.skillDef == (Object)(object)spikeSkill || (Object)(object)secondary.skillDef == (Object)(object)stakeSkill))
					{
						Log.Message("Wahoo2");
						if (secondary.stock < secondary.maxStock)
						{
							float num3 = (float)secondary.maxStock * 0.05f * secondary.finalRechargeInterval;
							Log.Message(num3);
							int num4 = 0;
							while (num3 > 0f)
							{
								if (num3 >= secondary.finalRechargeInterval)
								{
									num3 -= secondary.finalRechargeInterval;
									secondary.stock += 1;
								}
								else
								{
									float num5 = secondary.finalRechargeInterval - secondary.rechargeStopwatch;
									if (!(num5 <= num3))
									{
										secondary.rechargeStopwatch += num3;
										break;
									}
									secondary.rechargeStopwatch = 0f;
									secondary.stock += 1;
									num3 -= num5;
								}
								if (secondary.stock >= secondary.maxStock)
								{
									secondary.rechargeStopwatch = 0f;
									break;
								}
								num4++;
							}
						}
					}
				}
			}
			orig.Invoke(self, info);
		}

		public void IL_TakeDamage(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_000f: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			MoveType val2 = (MoveType)2;
			int loc1 = -1;
			if (val.TryGotoNext(val2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "lunarruin"),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(CharacterBody), "GetBuffCount")
			}))
			{
				if (val.TryGotoNext(val2, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc1)
				}))
				{
					val.Emit(OpCodes.Ldarg_0);
					val.EmitDelegate<Func<HealthComponent, float>>((Func<HealthComponent, float>)delegate(HealthComponent self)
					{
						float num = 0f;
						float num2 = 0.1f * (float)self.body.GetBuffCount(Buffs.lunarruin);
						float num3 = 0.75f;
						int num4 = 1;
						while (0f < num2)
						{
							float num5 = Mathf.Max(0f, num3 - num2);
							num2 -= num3;
							num += (num3 - num5) / (float)num4;
							num4 *= 2;
						}
						return num;
					});
					val.Emit(OpCodes.Stloc, loc1);
				}
				else
				{
					Log.Error(((MemberReference)il.Method).Name + " Hook 2.2 failed!");
				}
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 2.1 failed!");
			}
		}

		public void OnInitLunarSpike(orig_InitializeLunarSpike orig, LunarSpikes self)
		{
			self.baseDuration = 0.256f;
			orig.Invoke(self);
		}

		public void OnMeridianEnter(orig_OnEnter orig, MeridiansWillFire self)
		{
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody))
			{
				((BaseState)self).attackSpeedStat = ((EntityState)self).characterBody.attackSpeed;
				((BaseState)self).damageStat = ((EntityState)self).characterBody.damage;
				((BaseState)self).critStat = ((EntityState)self).characterBody.crit;
				((BaseState)self).moveSpeedStat = ((EntityState)self).characterBody.moveSpeed;
			}
			((EntityState)self).PlayAnimation("FullBody, Override", self.beginExplosionPullState);
			self.falseSonController = ((Component)((EntityState)self).characterBody).GetComponent<FalseSonController>();
			Log.Message(self.blastRadius);
			Log.Message(self.forcePullRadius);
			Log.Message(self.damage);
			float num = ((EntityState)self).characterBody.GetBuffCount(Main.GrowthBuff);
			self.damage = 1.5f + 0.3f * num;
			self.blastRadius = 15f + 1.5f * num;
			self.forcePullDistSqr = self.blastRadius * self.blastRadius;
			self.pullPosition = ((EntityState)self).characterBody.footPosition + ((EntityState)self).inputBank.aimDirection * 5f;
			self.pullPosition.y = ((EntityState)self).characterBody.footPosition.y;
			if (NetworkServer.active)
			{
				self.GetHurtBoxs();
				float num2 = 5f;
				for (int i = 0; i < self.hurtBoxes.Length; i++)
				{
					self.ApplyDamage(self.hurtBoxes[i]);
					self.InitializePullInfo(i);
					num2 += 1f;
				}
				((EntityState)self).characterBody.AddTimedBuff(Buffs.EnergizedCore, num2);
			}
		}

		public void OnLaserEnter(orig_OnEnter orig, LaserFatherCharged self)
		{
			LaserFatherCharged.maximumDuration = 0f;
			LaserFatherCharged.baseFireFrequency = 4f;
			LaserFatherCharged.procCoefficientPerTick = 0.8f;
			LaserFatherCharged.damageCoefficient = 2f;
			if (self.charge <= 0.175f)
			{
				self.charge = 0f;
			}
			orig.Invoke(self);
			if (NetworkServer.active)
			{
				((EntityState)self).characterBody.AddTimedBuff(Main.LaserArmorBuff, self.duration);
			}
			self.charge = 1f;
			self.spikeRefillAmountPerSecond = 0f;
		}

		public void IL_LaserEnter(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0009: 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_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			MoveType val2 = (MoveType)0;
			MoveType val3 = (MoveType)2;
			if (val.TryGotoNext(val3, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(FalseSonController), "GetGrowthLaserBonusDuration"),
				(Instruction x) => ILPatternMatchingExt.MatchAdd(x),
				(Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(LaserFatherCharged), "duration")
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Action<LaserFatherCharged>>((Action<LaserFatherCharged>)delegate(LaserFatherCharged self)
				{
					self.duration = 2f + 4f * self.charge;
				});
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1.1 failed!");
			}
		}

		public void IL_LaserUpdate(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			MoveType val2 = (MoveType)0;
			MoveType val3 = (MoveType)2;
			int loc1 = -1;
			if (val.TryGotoNext(val3, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(BaseState), "attackSpeedStat"),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref loc1)
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<LaserFatherCharged, float>>((Func<LaserFatherCharged, float>)delegate(LaserFatherCharged self)
				{
					int buffCount = ((EntityState)self).characterBody.GetBuffCount(Main.GrowthBuff);
					return 1f + (float)buffCount * 0.1f;
				});
				val.Emit(OpCodes.Stloc, loc1);
				if (val.TryGotoNext(val3, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchStloc(x, loc1)
				}))
				{
					val.Emit(OpCodes.Ldarg_0);
					val.EmitDelegate<Func<LaserFatherCharged, float>>((Func<LaserFatherCharged, float>)delegate(LaserFatherCharged self)
					{
						int buffCount = ((EntityState)self).characterBody.GetBuffCount(Main.GrowthBuff);
						return 1f + (float)buffCount * 0.1f;
					});
					val.Emit(OpCodes.Stloc, loc1);
				}
				else
				{
					Log.Error(((MemberReference)il.Method).Name + " Hook 1.2 failed!");
				}
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1.1 failed!");
			}
		}

		public void IL_LaserFire(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0009: 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_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			MoveType val2 = (MoveType)0;
			MoveType val3 = (MoveType)2;
			if (val.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchNewobj<BulletAttack>(x)
			}))
			{
				val.Emit(OpCodes.Dup);
				val.EmitDelegate<Action<BulletAttack>>((Action<BulletAttack>)delegate(BulletAttack bulletAttack)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					DamageAPI.AddModdedDamageType(bulletAttack, DamageTypes.fsLaserRechargeProc);
				});
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void OnLaserExit(orig_OnExit orig, LaserFatherCharged self)
		{
			if (NetworkServer.active && ((EntityState)self).characterBody.HasBuff(Main.LaserArmorBuff))
			{
				((EntityState)self).characterBody.RemoveBuff(Main.LaserArmorBuff);
			}
			orig.Invoke(self);
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}