Decompiled source of HIFUVoidFiendTweaks v1.0.2

HIFUVoidFiendTweaks.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
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.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.VoidSurvivor;
using EntityStates.VoidSurvivor.Weapon;
using HIFUVoidFiendTweaks.Misc;
using HIFUVoidFiendTweaks.Skills;
using HIFUVoidFiendTweaks.VFX;
using HarmonyLib;
using IL.EntityStates.VoidSurvivor.Weapon;
using IL.RoR2;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates.VoidSurvivor;
using On.EntityStates.VoidSurvivor.Weapon;
using On.RoR2;
using R2API;
using RoR2;
using RoR2.Projectile;
using RoR2.Skills;
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: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("HIFUVoidFiendTweaks")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("HIFUVoidFiendTweaks")]
[assembly: AssemblyTitle("HIFUVoidFiendTweaks")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.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 HIFUVoidFiendTweaks
{
	public class ConfigManager
	{
		internal static bool ConfigChanged;

		internal static bool VersionChanged;

		public static T HandleConfig<T>(ConfigEntryBase entry, ConfigFile config, string name)
		{
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Expected O, but got Unknown
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Expected O, but got Unknown
			MethodInfo methodInfo = (from x in typeof(ConfigFile).GetMethods()
				where x.Name == "Bind"
				select x).First();
			methodInfo = methodInfo.MakeGenericMethod(typeof(T));
			object[] parameters = new object[3]
			{
				(object)new ConfigDefinition(Regex.Replace(config.ConfigFilePath, "\\W", "") + " : " + entry.Definition.Section, name),
				entry.DefaultValue,
				(object)new ConfigDescription(entry.Description.Description, (AcceptableValueBase)null, Array.Empty<object>())
			};
			ConfigEntryBase val = (ConfigEntryBase)methodInfo.Invoke(config, parameters);
			if (Main._preVersioning)
			{
				entry.BoxedValue = entry.DefaultValue;
			}
			if (!ConfigEqual(val.DefaultValue, val.BoxedValue) && VersionChanged)
			{
				entry.BoxedValue = entry.DefaultValue;
				val.BoxedValue = val.DefaultValue;
			}
			return default(T);
		}

		private static bool ConfigEqual(object a, object b)
		{
			if (a.Equals(b))
			{
				return true;
			}
			if (float.TryParse(a.ToString(), out var result) && float.TryParse(b.ToString(), out var result2) && (double)Mathf.Abs(result - result2) < 0.0001)
			{
				return true;
			}
			return false;
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("HIFU.HIFUVoidFiendTweaks", "HIFUVoidFiendTweaks", "1.0.1")]
	public class Main : BaseUnityPlugin
	{
		public const string PluginGUID = "HIFU.HIFUVoidFiendTweaks";

		public const string PluginAuthor = "HIFU";

		public const string PluginName = "HIFUVoidFiendTweaks";

		public const string PluginVersion = "1.0.1";

		public static ConfigFile HVFTConfig;

		public static ConfigFile HVFTBackupConfig;

		public static ManualLogSource HVFTLogger;

		public static bool _preVersioning;

		public static ConfigEntry<bool> enableAutoConfig { get; set; }

		public static ConfigEntry<string> latestVersion { get; set; }

		public void Awake()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			HVFTLogger = ((BaseUnityPlugin)this).Logger;
			HVFTConfig = ((BaseUnityPlugin)this).Config;
			HVFTBackupConfig = new ConfigFile(Paths.ConfigPath + "\\HIFU.HIFUVoidFiendTweaks.Backup.cfg", true);
			HVFTBackupConfig.Bind<string>(": DO NOT MODIFY THIS FILES CONTENTS :", ": DO NOT MODIFY THIS FILES CONTENTS :", ": DO NOT MODIFY THIS FILES CONTENTS :", ": DO NOT MODIFY THIS FILES CONTENTS :");
			enableAutoConfig = HVFTConfig.Bind<bool>("Config", "Enable Auto Config Sync", true, "Disabling this would stop HIFUVoidFiendTweaks from syncing config whenever a new version is found.");
			_preVersioning = !((Dictionary<ConfigDefinition, string>)AccessTools.DeclaredPropertyGetter(typeof(ConfigFile), "OrphanedEntries").Invoke(HVFTConfig, null)).Keys.Any((ConfigDefinition x) => x.Key == "Latest Version");
			latestVersion = HVFTConfig.Bind<string>("Config", "Latest Version", "1.0.1", "DO NOT CHANGE THIS");
			if (enableAutoConfig.Value && (_preVersioning || latestVersion.Value != "1.0.1"))
			{
				latestVersion.Value = "1.0.1";
				ConfigManager.VersionChanged = true;
				HVFTLogger.LogInfo((object)"Config Autosync Enabled.");
			}
			GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBody.prefab").WaitForCompletion();
			EntityStateMachine val2 = val.AddComponent<EntityStateMachine>();
			val2.customName = "Flood";
			val2.initialStateType = new SerializableEntityStateType(typeof(Idle));
			val2.mainStateType = new SerializableEntityStateType(typeof(Idle));
			SkillDef val3 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidSurvivor/ChargeMegaBlaster.asset").WaitForCompletion();
			val3.activationStateMachineName = "Flood";
			IEnumerable<Type> enumerable = from type in Assembly.GetExecutingAssembly().GetTypes()
				where !type.IsAbstract && type.IsSubclassOf(typeof(TweakBase))
				select type;
			HVFTLogger.LogInfo((object)"==+----------------==TWEAKS==----------------+==");
			foreach (Type item in enumerable)
			{
				TweakBase tweakBase = (TweakBase)Activator.CreateInstance(item);
				if (ValidateTweak(tweakBase))
				{
					tweakBase.Init();
				}
			}
			IEnumerable<Type> enumerable2 = from type in Assembly.GetExecutingAssembly().GetTypes()
				where !type.IsAbstract && type.IsSubclassOf(typeof(MiscBase))
				select type;
			HVFTLogger.LogInfo((object)"==+----------------==MISC==----------------+==");
			foreach (Type item2 in enumerable2)
			{
				MiscBase miscBase = (MiscBase)Activator.CreateInstance(item2);
				if (ValidateMisc(miscBase))
				{
					miscBase.Init();
				}
			}
			BigTracer.Create();
			CorruptedDescriptions.ChangeDescriptions();
		}

		public bool ValidateTweak(TweakBase tb)
		{
			if (tb.isEnabled && ((BaseUnityPlugin)this).Config.Bind<bool>(tb.Name, "Enable?", true, "Vanilla is false").Value)
			{
				return true;
			}
			return false;
		}

		public bool ValidateMisc(MiscBase mb)
		{
			if (mb.isEnabled && ((BaseUnityPlugin)this).Config.Bind<bool>(mb.Name, "Enable?", true, "Vanilla is false").Value)
			{
				return true;
			}
			return false;
		}

		private void WITHINDESTRUCTIONMYFUCKINGBELOVED()
		{
		}
	}
	public abstract class MiscBase
	{
		public abstract string Name { get; }

		public virtual bool isEnabled { get; } = true;


		public T ConfigOption<T>(T value, string name, string description)
		{
			ConfigEntry<T> val = Main.HVFTConfig.Bind<T>(Name, name, value, description);
			ConfigManager.HandleConfig<T>((ConfigEntryBase)(object)val, Main.HVFTBackupConfig, name);
			return val.Value;
		}

		public abstract void Hooks();

		public string d(float f)
		{
			return f * 100f + "%";
		}

		public virtual void Init()
		{
			Hooks();
			Main.HVFTLogger.LogInfo((object)("Added " + Name));
		}
	}
	public abstract class MiscBase<T> : MiscBase where T : MiscBase<T>
	{
		public static T instance { get; set; }

		public MiscBase()
		{
			if (instance != null)
			{
				throw new InvalidOperationException("Singleton class " + typeof(T).Name + " was instantiated twice");
			}
			instance = this as T;
		}
	}
	public abstract class TweakBase
	{
		public abstract string Name { get; }

		public abstract string SkillToken { get; }

		public abstract string DescText { get; }

		public abstract bool isVoid { get; }

		public virtual bool isEnabled { get; } = true;


		public T ConfigOption<T>(T value, string name, string description)
		{
			ConfigEntry<T> val = Main.HVFTConfig.Bind<T>(Name, name, value, description);
			ConfigManager.HandleConfig<T>((ConfigEntryBase)(object)val, Main.HVFTBackupConfig, name);
			return val.Value;
		}

		public abstract void Hooks();

		public string d(float f)
		{
			return f * 100f + "%";
		}

		public virtual void Init()
		{
			Hooks();
			string text = ((!isVoid) ? ("VOIDSURVIVOR_" + SkillToken.ToUpper() + "_DESCRIPTION") : ("VOIDSURVIVOR_" + SkillToken.ToUpper() + "_TOOLTIP"));
			LanguageAPI.Add(text, DescText);
			Main.HVFTLogger.LogInfo((object)("Added " + Name));
		}
	}
	public abstract class TweakBase<T> : TweakBase where T : TweakBase<T>
	{
		public static T instance { get; set; }

		public TweakBase()
		{
			if (instance != null)
			{
				throw new InvalidOperationException("Singleton class " + typeof(T).Name + " was instantiated twice");
			}
			instance = this as T;
		}
	}
}
namespace HIFUVoidFiendTweaks.VFX
{
	public static class BigTracer
	{
		public static GameObject tracer;

		public static void Create()
		{
			//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_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			tracer = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBeamTracer.prefab").WaitForCompletion(), "FourthBeamTracer", false);
			EffectComponent component = tracer.GetComponent<EffectComponent>();
			component.applyScale = true;
			LineRenderer component2 = tracer.GetComponent<LineRenderer>();
			component2.widthMultiplier = Drown.FourthRadius * 0.5f;
			Transform transform = tracer.transform;
			transform.localScale = new Vector3(Drown.FourthRadius, Drown.FourthRadius, Drown.FourthRadius);
			Transform child = transform.GetChild(0);
			child.localScale = new Vector3(Drown.FourthRadius, Drown.FourthRadius, Drown.FourthRadius);
			Transform child2 = transform.GetChild(1);
			child2.localScale = new Vector3(Drown.FourthRadius, Drown.FourthRadius, Drown.FourthRadius);
			ParticleSystem component3 = ((Component)child.GetChild(1)).GetComponent<ParticleSystem>();
			((Component)component3).gameObject.SetActive(true);
			MainModule main = component3.main;
			((MainModule)(ref main)).startSize = MinMaxCurve.op_Implicit(0.15f * Drown.FourthRadius);
			Light component4 = ((Component)child2.GetChild(2)).GetComponent<Light>();
			component4.range = 2f * Drown.FourthRadius;
			component4.intensity = 10f;
			ContentAddition.AddEffect(tracer);
		}
	}
}
namespace HIFUVoidFiendTweaks.Skills
{
	public class CorruptedDrown : TweakBase
	{
		public static float Damage;

		public static float PPS;

		public override string Name => "Primary :: Corrupted Drown";

		public override string SkillToken => "primary_uprade";

		public override string DescText => "<style=cKeywordName>【Corruption Upgrade】</style><style=cSub>Transform into a " + d(Damage) + " damage short-range beam.</style>";

		public override bool isVoid => true;

		public override void Init()
		{
			Damage = ConfigOption(12f, "Damage", "Decimal. Vanilla is 20");
			PPS = ConfigOption(4f, "Proc Coefficient Per Second", "Vanilla is 5");
			base.Init();
		}

		public override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			FireCorruptHandBeam.OnEnter += new hook_OnEnter(FireCorruptHandBeam_OnEnter);
		}

		private void FireCorruptHandBeam_OnEnter(orig_OnEnter orig, FireCorruptHandBeam self)
		{
			self.damageCoefficientPerSecond = Damage;
			self.procCoefficientPerSecond = PPS;
			orig.Invoke(self);
		}
	}
	internal class CorruptedFlood : TweakBase
	{
		public static float Damage;

		public static float Knockback;

		public static float AoE;

		public static float ProjectileSpeed;

		public static float Lifetime;

		public static float Cooldown;

		public override string Name => "Secondary :: Corrupted Flood";

		public override string SkillToken => "secondary_uprade";

		public override string DescText => "<style=cKeywordName>【Corruption Upgrade】</style><style=cSub>Transform into a " + d(Damage) + " damage black hole that pulls enemies in an enormous radius.</style>";

		public override bool isVoid => true;

		public override void Init()
		{
			Knockback = ConfigOption(-2500f, "Knockback", "Vanilla is 3000");
			AoE = ConfigOption(25f, "Radius", "Vanilla is 10");
			Damage = ConfigOption(4f, "Damage", "Decimal. Vanilla is 11");
			ProjectileSpeed = ConfigOption(40f, "Projectile Speed", "Vanilla is 70");
			Lifetime = ConfigOption(4f, "Projectile Duration", "Vanilla is 99");
			Cooldown = ConfigOption(7.5f, "Cooldown", "Vanilla is 4");
			base.Init();
		}

		public override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			FireCorruptDisks.OnEnter += new hook_OnEnter(FireCorruptDisks_OnEnter);
			Changes();
		}

		private void FireCorruptDisks_OnEnter(orig_OnEnter orig, FireCorruptDisks self)
		{
			self.damageCoefficient = Damage;
			orig.Invoke(self);
		}

		private void Changes()
		{
			//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_0038: 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_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterBigProjectileCorrupted.prefab").WaitForCompletion();
			ProjectileSimple component = val.GetComponent<ProjectileSimple>();
			component.desiredForwardSpeed = ProjectileSpeed;
			component.lifetime = Lifetime;
			component.lifetimeExpiredEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterExplosionCorrupted.prefab").WaitForCompletion();
			ProjectileImpactExplosion component2 = val.GetComponent<ProjectileImpactExplosion>();
			((ProjectileExplosion)component2).blastRadius = AoE;
			RadialForce val2 = val.AddComponent<RadialForce>();
			val2.radius = AoE;
			val2.damping = 0.5f;
			val2.forceMagnitude = Knockback;
			val2.forceCoefficientAtEdge = 0.5f;
			GameObject ghostPrefab = val.GetComponent<ProjectileController>().ghostPrefab;
			ghostPrefab.GetComponent<ProjectileGhostController>().inheritScaleFromProjectile = true;
			SkillDef val3 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidSurvivor/FireCorruptDisk.asset").WaitForCompletion();
			val3.baseRechargeInterval = Cooldown;
		}
	}
	public class CorruptedSuppress : TweakBase
	{
		public static float SelfDamage;

		public static float CorruptionGain;

		public static int MaxCharges;

		public static float duration;

		public static float endlag;

		public override string Name => "Special :: Corrupted Suppress";

		public override string SkillToken => "special_uprade";

		public override string DescText => "<style=cKeywordName>【Corruption Upgrade】</style><style=cSub>Transform to crush " + d(SelfDamage) + " health, gaining " + CorruptionGain + "% Corruption instead. Can hold up to " + MaxCharges + " orbs.</style>";

		public override bool isVoid => true;

		public override void Init()
		{
			SelfDamage = ConfigOption(0.19f, "Self Damage", "Decimal. Vanilla is 0.25");
			MaxCharges = ConfigOption(2, "Max Charges", "Vanilla is 2");
			CorruptionGain = ConfigOption(25f, "Corruption Gain", "Vanilla is 25");
			duration = ConfigOption(0.8f, "Animation Duration", "Vanilla is 1");
			endlag = ConfigOption(0.3f, "Endlag", "Vanilla is 1");
			base.Init();
		}

		public override void Hooks()
		{
			//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
			CrushBase.OnEnter += new hook_OnEnter(CrushBase_OnEnter);
			ChargeCrushBase.OnEnter += new hook_OnEnter(ChargeCrushBase_OnEnter);
			Changes();
		}

		private void ChargeCrushBase_OnEnter(orig_OnEnter orig, ChargeCrushBase self)
		{
			if (self != null)
			{
				self.baseDuration = duration;
			}
			orig.Invoke(self);
		}

		private void CrushBase_OnEnter(orig_OnEnter orig, CrushBase self)
		{
			if (self is CrushHealth)
			{
				self.selfHealFraction = 0f - SelfDamage;
				self.corruptionChange = CorruptionGain;
				self.baseDuration = endlag;
			}
			orig.Invoke(self);
		}

		private void Changes()
		{
			//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)
			SkillDef val = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidSurvivor/CrushHealth.asset").WaitForCompletion();
			val.baseMaxStock = MaxCharges;
		}
	}
	public class Drown : TweakBase
	{
		public static float Damage;

		public static float Radius;

		public static int FalloffType;

		public static float FourthDamage;

		public static int FourthFalloff;

		public static float FourthRadius;

		public int faaa;

		public override string Name => "Primary : Drown";

		public override string SkillToken => "primary";

		public override string DescText => "Fire a <style=cIsUtility>slowing</style> long-range beam for <style=cIsDamage>" + d(Damage) + " damage</style>. Every fourth shot fires a medium beam for an additional <style=cIsDamage>" + d(FourthDamage) + " damage</style>.";

		public override bool isVoid => false;

		public override void Init()
		{
			Damage = ConfigOption(3f, "Damage", "Decimal. Vanilla is 3");
			Radius = ConfigOption(1f, "Radius", "Vanilla is 2");
			FalloffType = ConfigOption(1, "Falloff Type", "0 is None, 1 is Standard, 2 is Buckshot. Vanilla is 0");
			FourthDamage = ConfigOption(1.75f, "Fourth Hit Damage", "Decimal. Default is 1.5");
			FourthFalloff = ConfigOption(0, "Fourth Hit Falloff Type", "0 is None, 1 is Standard, 2 is Buckshot. Default is 0");
			FourthRadius = ConfigOption(5f, "Fourth Hit Radius", "Default is 5");
			base.Init();
		}

		public override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: 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
			FireHandBeam.OnEnter += new hook_OnEnter(FireHandBeam_OnEnter);
			CharacterBody.onBodyStartGlobal += CharacterBody_onBodyStartGlobal;
			FireHandBeam.OnEnter += new Manipulator(FireHandBeam_OnEnter1);
		}

		private void CharacterBody_onBodyStartGlobal(CharacterBody body)
		{
			if (((Object)body).name == "VoidSurvivorBody(Clone)")
			{
				DrownFour component = ((Component)body).GetComponent<DrownFour>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					((Component)body).gameObject.AddComponent<DrownFour>();
				}
			}
		}

		private void FireHandBeam_OnEnter1(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(BulletAttack), "falloffModel")
			}))
			{
				val.Remove();
				val.Emit(OpCodes.Ldc_I4, faaa);
			}
			else
			{
				Main.HVFTLogger.LogError((object)"Failed to apply Drown Falloff IL Hook");
			}
		}

		private void FireHandBeam_OnEnter(orig_OnEnter orig, FireHandBeam self)
		{
			self.damageCoefficient = Damage;
			self.bulletRadius = Radius;
			DrownFour component = ((Component)((EntityState)self).characterBody).GetComponent<DrownFour>();
			if ((Object)(object)component != (Object)null)
			{
				component.FireCount++;
			}
			orig.Invoke(self);
		}

		public Drown()
		{
			int falloffType = FalloffType;
			if (1 == 0)
			{
			}
			int num = falloffType switch
			{
				1 => 1, 
				2 => 2, 
				_ => 0, 
			};
			if (1 == 0)
			{
			}
			faaa = num;
			base..ctor();
		}
	}
	public class DrownFour : MonoBehaviour
	{
		public int FireCount;

		public CharacterBody body => ((Component)this).GetComponent<CharacterBody>();

		private GameObject hitEffectPrefab => Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBeamImpact.prefab").WaitForCompletion();

		public void FixedUpdate()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: 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_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			if (FireCount >= 4 && Util.HasEffectiveAuthority(((Component)body).gameObject))
			{
				Util.PlaySound("Play_voidman_m2_explode", ((Component)this).gameObject);
				BulletAttack val = new BulletAttack();
				val.owner = ((Component)this).gameObject;
				val.weapon = ((Component)this).gameObject;
				val.origin = body.corePosition;
				Ray aimRay = body.inputBank.GetAimRay();
				val.aimVector = ((Ray)(ref aimRay)).direction;
				val.muzzleName = "MuzzleHandBeam";
				val.maxDistance = 1000f;
				val.minSpread = 0f;
				val.maxSpread = 0f;
				val.radius = Drown.FourthRadius;
				BulletAttack val2 = val;
				int fourthFalloff = Drown.FourthFalloff;
				if (1 == 0)
				{
				}
				FalloffModel falloffModel = (FalloffModel)(fourthFalloff switch
				{
					1 => 1, 
					2 => 2, 
					_ => 0, 
				});
				if (1 == 0)
				{
				}
				val2.falloffModel = falloffModel;
				val.smartCollision = true;
				val.damage = body.damage * Drown.FourthDamage;
				val.procCoefficient = 0f;
				val.force = 0f;
				val.isCrit = Util.CheckRoll(body.crit, body.master);
				val.hitEffectPrefab = hitEffectPrefab;
				val.stopperMask = ((LayerIndex)(ref LayerIndex.noCollision)).mask;
				val.bulletCount = 1u;
				val.tracerEffectPrefab = BigTracer.tracer;
				val.damageType = (DamageType)8;
				val.Fire();
				FireCount = 0;
			}
		}
	}
	public class Suppress : TweakBase
	{
		public static float Healing;

		public static int MaxCharges;

		public static float CorruptionLoss;

		public override string Name => "Special : Suppress";

		public override string SkillToken => "special";

		public override string DescText => "Crush <style=cIsVoid>" + CorruptionLoss + "% Corruption</style> to heal yourself for <style=cIsHealing>" + d(Healing) + " maximum health</style>." + ((MaxCharges > 1) ? (" <style=cIsUtility>Can hold up to " + MaxCharges + " orbs</style>.") : "");

		public override bool isVoid => false;

		public override void Init()
		{
			Healing = ConfigOption(0.175f, "Healing", "Decimal. Vanilla is 0.25");
			MaxCharges = ConfigOption(2, "Max Charges", "Vanilla is 1");
			CorruptionLoss = ConfigOption(15f, "Corruption Loss", "Vanilla is 25");
			base.Init();
		}

		public override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			CrushBase.OnEnter += new hook_OnEnter(CrushBase_OnEnter);
			Changes();
		}

		private void CrushBase_OnEnter(orig_OnEnter orig, CrushBase self)
		{
			if (self is CrushCorruption)
			{
				self.selfHealFraction = Healing;
				self.corruptionChange = 0f - CorruptionLoss;
			}
			orig.Invoke(self);
		}

		private void Changes()
		{
			//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)
			VoidSurvivorSkillDef val = Addressables.LoadAssetAsync<VoidSurvivorSkillDef>((object)"RoR2/DLC1/VoidSurvivor/CrushCorruption.asset").WaitForCompletion();
			if (MaxCharges > 1)
			{
				((SkillDef)val).baseMaxStock = MaxCharges;
				((SkillDef)val).rechargeStock = 0;
				val.minimumCorruption = CorruptionLoss;
			}
		}
	}
	internal class SwingMelee1 : SwingMeleeBase
	{
		public override void OnEnter()
		{
			//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_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Expected O, but got Unknown
			//IL_00b7: 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_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			((BasicMeleeAttack)this).beginStateSoundString = "Play_bandit2_m2_slash";
			((BasicMeleeAttack)this).baseDuration = 0.5f;
			animationStateName = "SwingMelee1";
			animationPlaybackRateParameter = "Melee.playbackRate";
			animationLayerName = "LeftArm, Override";
			((BasicMeleeAttack)this).pushAwayForce = 0f;
			((BasicMeleeAttack)this).procCoefficient = 1f;
			((BasicMeleeAttack)this).mecanimHitboxActiveParameter = "Melee.hitBoxActive";
			((BasicMeleeAttack)this).ignoreAttackSpeed = false;
			((BasicMeleeAttack)this).hitPauseDuration = 0.1f;
			((BasicMeleeAttack)this).hitEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBeamImpact.prefab").WaitForCompletion();
			((BasicMeleeAttack)this).hitBoxGroupName = "Melee";
			AnimationCurve val = new AnimationCurve();
			val.preWrapMode = (WrapMode)1;
			val.postWrapMode = (WrapMode)1;
			Keyframe[] array = new Keyframe[2];
			Keyframe val2 = default(Keyframe);
			((Keyframe)(ref val2)).time = 0f;
			((Keyframe)(ref val2)).value = 0.3f;
			((Keyframe)(ref val2)).inTangent = -1f;
			((Keyframe)(ref val2)).outTangent = -1f;
			((Keyframe)(ref val2)).inWeight = 0f;
			((Keyframe)(ref val2)).outWeight = 0.06f;
			((Keyframe)(ref val2)).weightedMode = (WeightedMode)0;
			array[0] = val2;
			val2 = default(Keyframe);
			((Keyframe)(ref val2)).time = 1f;
			((Keyframe)(ref val2)).value = 0f;
			((Keyframe)(ref val2)).inTangent = -0.23f;
			((Keyframe)(ref val2)).outTangent = -0.23f;
			((Keyframe)(ref val2)).inWeight = 0.1f;
			((Keyframe)(ref val2)).outWeight = 0f;
			((Keyframe)(ref val2)).weightedMode = (WeightedMode)0;
			array[1] = val2;
			val.keys = (Keyframe[])(object)array;
			((BasicMeleeAttack)this).forwardVelocityCurve = val;
			((BasicMeleeAttack)this).forceVector = Vector3.zero;
			((BasicMeleeAttack)this).forceForwardVelocity = false;
			((BasicMeleeAttack)this).damageCoefficient = 3f;
			bloom = 0f;
			((BasicMeleeAttack)this).swingEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorMeleeSlash1.prefab").WaitForCompletion();
			((BasicMeleeAttack)this).swingEffectMuzzleString = "MuzzleMelee";
			((BasicMeleeAttack)this).shorthopVelocityFromHit = 3f;
			((BasicMeleeAttack)this).scaleHitPauseDurationAndVelocityWithAttackSpeed = true;
			recoilAmplitude = 1f;
		}

		public override void FixedUpdate()
		{
			((BasicMeleeAttack)this).FixedUpdate();
		}

		public override void OnExit()
		{
			base.OnExit();
		}
	}
	internal class SwingMeleeBase : BasicMeleeAttack
	{
		[SerializeField]
		public float recoilAmplitude;

		[SerializeField]
		public float bloom;

		[SerializeField]
		public string animationLayerName;

		[SerializeField]
		public string animationStateName;

		[SerializeField]
		public string animationPlaybackRateParameter;

		public override bool allowExitFire => Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && !((EntityState)this).characterBody.isSprinting;

		public override void OnEnter()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			((BasicMeleeAttack)this).OnEnter();
			CharacterDirection characterDirection = ((EntityState)this).characterDirection;
			Ray aimRay = ((BaseState)this).GetAimRay();
			characterDirection.forward = ((Ray)(ref aimRay)).direction;
		}

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

		public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack)
		{
			((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack);
		}

		public override void PlayAnimation()
		{
			((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParameter, base.duration);
		}

		public override void OnMeleeHitAuthority()
		{
			((BasicMeleeAttack)this).OnMeleeHitAuthority();
			((EntityState)this).characterBody.AddSpreadBloom(bloom);
		}

		public override void BeginMeleeAttackEffect()
		{
			((BaseState)this).AddRecoil(-0.1f * recoilAmplitude, 0.1f * recoilAmplitude, -1f * recoilAmplitude, 1f * recoilAmplitude);
			((BasicMeleeAttack)this).BeginMeleeAttackEffect();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)1;
		}
	}
}
namespace HIFUVoidFiendTweaks.Skilldefs
{
	public static class CorruptedPermeateSD
	{
		public static SteppedSkillDef sd;

		public static string nameToken = "HVFT_VOIDSURVIVOR_PRIMARY_MELEE_ALT_NAME";

		public static void Create()
		{
			//IL_0020: 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_00ec: Unknown result type (might be due to invalid IL or missing references)
			sd = ScriptableObject.CreateInstance<SteppedSkillDef>();
			((SkillDef)sd).activationStateMachineName = "Weapon";
			((SkillDef)sd).interruptPriority = (InterruptPriority)1;
			((SkillDef)sd).baseRechargeInterval = 0f;
			((SkillDef)sd).baseMaxStock = 1;
			((SkillDef)sd).rechargeStock = 1;
			((SkillDef)sd).requiredStock = 1;
			((SkillDef)sd).stockToConsume = 1;
			((SkillDef)sd).resetCooldownTimerOnUse = false;
			((SkillDef)sd).fullRestockOnAssign = true;
			((SkillDef)sd).dontAllowPastMaxStocks = false;
			((SkillDef)sd).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)sd).cancelSprintingOnActivation = false;
			((SkillDef)sd).forceSprintDuringState = true;
			((SkillDef)sd).canceledFromSprinting = false;
			((SkillDef)sd).isCombatSkill = true;
			((SkillDef)sd).mustKeyPress = false;
			sd.stepCount = 3;
			sd.stepGraceDuration = 0.5f;
			((SkillDef)sd).icon = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Croco/CrocoSpit.asset").WaitForCompletion().icon;
			((SkillDef)sd).skillNameToken = nameToken;
			((SkillDef)sd).skillDescriptionToken = "HVFT_VOIDSURVIVOR_PRIMARY_MELEE_ALT_DESCRIPTION";
			((SkillDef)sd).keywordTokens = new string[1] { "KEYWORD_AGILE" };
			LanguageAPI.Add("HVFT_VOIDSURVIVOR_PRIMARY_MELEE_ALT_NAME", "『P?ermea??te】");
			LanguageAPI.Add("HVFT_VOIDSURVIVOR_PRIMARY_MELEE_ALT_DESCRIPTION", "<style=cIsUtility>Agile</style>.");
			ContentAddition.AddSkillDef((SkillDef)(object)sd);
		}
	}
	public static class PermeateSD
	{
		public static SteppedSkillDef sd;

		public static string nameToken = "HVFT_VOIDSURVIVOR_PRIMARY_MELEE_NAME";

		public static void Create()
		{
			//IL_0020: 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_00ec: Unknown result type (might be due to invalid IL or missing references)
			sd = ScriptableObject.CreateInstance<SteppedSkillDef>();
			((SkillDef)sd).activationStateMachineName = "Weapon";
			((SkillDef)sd).interruptPriority = (InterruptPriority)1;
			((SkillDef)sd).baseRechargeInterval = 0f;
			((SkillDef)sd).baseMaxStock = 1;
			((SkillDef)sd).rechargeStock = 1;
			((SkillDef)sd).requiredStock = 1;
			((SkillDef)sd).stockToConsume = 1;
			((SkillDef)sd).resetCooldownTimerOnUse = false;
			((SkillDef)sd).fullRestockOnAssign = true;
			((SkillDef)sd).dontAllowPastMaxStocks = false;
			((SkillDef)sd).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)sd).cancelSprintingOnActivation = false;
			((SkillDef)sd).forceSprintDuringState = true;
			((SkillDef)sd).canceledFromSprinting = false;
			((SkillDef)sd).isCombatSkill = true;
			((SkillDef)sd).mustKeyPress = false;
			sd.stepCount = 2;
			sd.stepGraceDuration = 0.5f;
			((SkillDef)sd).icon = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Croco/CrocoSpit.asset").WaitForCompletion().icon;
			((SkillDef)sd).skillNameToken = nameToken;
			((SkillDef)sd).skillDescriptionToken = "HVFT_VOIDSURVIVOR_PRIMARY_MELEE_DESCRIPTION";
			((SkillDef)sd).keywordTokens = new string[1] { "KEYWORD_AGILE" };
			LanguageAPI.Add("HVFT_VOIDSURVIVOR_PRIMARY_MELEE_NAME", "『P?ermea??te】");
			LanguageAPI.Add("HVFT_VOIDSURVIVOR_PRIMARY_MELEE_DESCRIPTION", "<style=cIsUtility>Agile</style>.");
			ContentAddition.AddSkillDef((SkillDef)(object)sd);
		}
	}
}
namespace HIFUVoidFiendTweaks.Misc
{
	public static class CorruptedDescriptions
	{
		public static string corruptedM1Description => "Fire a short-range beam for <style=cIsDamage>" + d(CorruptedDrown.Damage) + " damage</style>.";

		public static string corruptedM2Description => "Fire an arcing black hole for <style=cIsDamage>" + d(CorruptedFlood.Damage) + " damage</style>.";

		public static string corruptedSpecialDescription => "Crush <style=cIsHealing>" + d(CorruptedSuppress.SelfDamage) + " health</style> to gain <style=cIsVoid>" + CorruptedSuppress.CorruptionGain + "% Corruption</style>.";

		public static SkillDef corruptedM1SkillDef => Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidSurvivor/FireCorruptBeam.asset").WaitForCompletion();

		public static SkillDef corruptedM2SkillDef => Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidSurvivor/FireCorruptDisk.asset").WaitForCompletion();

		public static SkillDef corruptedSpecialSkillDef => Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidSurvivor/CrushHealth.asset").WaitForCompletion();

		private static string d(float f)
		{
			return f * 100f + "%";
		}

		public static void ChangeDescriptions()
		{
			LanguageAPI.Add("VOIDSURVIVOR_PRIMARY_ALT_DESCRIPTION", corruptedM1Description);
			LanguageAPI.Add("VOIDSURVIVOR_SECONDARY_ALT_DESCRIPTION", corruptedM2Description);
			LanguageAPI.Add("VOIDSURVIVOR_SPECIAL_ALT_DESCRIPTION", corruptedSpecialDescription);
			LanguageAPI.Add("VOIDSURVIVOR_SPECIAL_NAME", "【Supp??ress』");
		}
	}
	internal class HRTTransitions : MiscBase
	{
		public static float Duration;

		public override string Name => "Misc :: Transitions";

		public override void Init()
		{
			Duration = ConfigOption(0.6f, "Duration", "Vanilla is 1");
			base.Init();
		}

		public override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			CorruptionTransitionBase.OnEnter += new hook_OnEnter(CorruptionTransitionBase_OnEnter);
		}

		private void CorruptionTransitionBase_OnEnter(orig_OnEnter orig, CorruptionTransitionBase self)
		{
			if (self is EnterCorruptionTransition)
			{
				self.duration = Duration;
			}
			orig.Invoke(self);
		}
	}
	internal class Passive : MiscBase
	{
		public static float CPSinCombat;

		public static float CPSOutOfCombat;

		public static float CPerCrit;

		public static float ArmorBuff;

		public static float CFullHeal;

		public static float CFullDamage;

		public static float HealingMultiplier;

		public override string Name => "Misc : Corruption System";

		public override void Init()
		{
			CPSinCombat = ConfigOption(5f, "Corruption Per Second In Combat", "Vanilla is 3");
			CPSOutOfCombat = ConfigOption(3.5f, "Corruption Per Second Out Of Combat", "Vanilla is 3");
			CPerCrit = ConfigOption(0f, "Corruption Per Crit", "Vanilla is 2");
			ArmorBuff = ConfigOption(-40f, "Corruption Armor", "Vanilla is 100");
			CFullHeal = ConfigOption(-115f, "Corruption For Full Heal", "Vanilla is -100. This is used to reduce corruption while healing, formula: Heal Amount / (Max HP + Max Shields) * Corruption For Full Heal");
			CFullDamage = ConfigOption(40f, "Corruption For Full Damage", "Vanilla is 50. This is used to increase corruption while taking damage, formula: Damage Taken Amount / (Max HP + Max Shields) * Corruption For Full Damage");
			HealingMultiplier = ConfigOption(0.6f, "Healing Multiplier", "Vanilla is 1");
			base.Init();
		}

		public override void Hooks()
		{
			//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
			VoidSurvivorController.OnEnable += new hook_OnEnable(VoidSurvivorController_OnEnable);
			CharacterBody.RecalculateStats += new Manipulator(CharacterBody_RecalculateStats);
			HealthComponent.Heal += new hook_Heal(HealthComponent_Heal);
			Changes();
		}

		private float HealthComponent_Heal(orig_Heal orig, HealthComponent self, float amount, ProcChainMask procChainMask, bool nonRegen)
		{
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkServer.active && amount > 0f && nonRegen && Object.op_Implicit((Object)(object)self.body.inventory) && self.body.inventory.GetItemCount(Items.VoidmanPassiveItem) > 0 && !((ProcChainMask)(ref procChainMask)).HasProc((ProcType)21))
			{
				amount *= HealingMultiplier;
			}
			return orig.Invoke(self, amount, procChainMask, nonRegen);
		}

		private void CharacterBody_RecalculateStats(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			ILLabel val3 = default(ILLabel);
			float num = default(float);
			ILLabel val2 = default(ILLabel);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[6]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Buffs", "VoidSurvivorCorruptMode"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "HasBuff"),
				(Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val3),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num),
				(Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val2),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 100f)
			}))
			{
				val.Index += 5;
				val.Next.Operand = ArmorBuff;
			}
			else
			{
				Main.HVFTLogger.LogError((object)"Failed to apply Corrupted Armor IL Hook");
			}
		}

		private void VoidSurvivorController_OnEnable(orig_OnEnable orig, VoidSurvivorController self)
		{
			self.corruptionPerSecondInCombat = CPSinCombat;
			self.corruptionPerSecondOutOfCombat = CPSOutOfCombat;
			self.corruptionPerCrit = CPerCrit;
			self.corruptionForFullHeal = CFullHeal;
			self.corruptionForFullDamage = CFullDamage;
			orig.Invoke(self);
		}

		private void Changes()
		{
			LanguageAPI.Add("KEYWORD_VOIDCORRUPTION", "<style=cKeywordName>Corruption</style><style=cSub>Gain Corruption by receiving damage" + ((CPerCrit > 0f) ? ", dealing Critical Strikes," : "") + " or holding Void Items. Reduce Corruption by healing.</style>");
		}
	}
}