using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using EntityStates;
using EntityStates.VoidSurvivor;
using EntityStates.VoidSurvivor.Weapon;
using Microsoft.CodeAnalysis;
using On.EntityStates.VoidSurvivor;
using On.EntityStates.VoidSurvivor.Weapon;
using On.RoR2;
using RoR2;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
[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("VoidFiendRework")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("VoidFiendRework")]
[assembly: AssemblyTitle("VoidFiendRework")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace VoidFiendBuffs
{
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);
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("VVitchh.VoidFiendRework", "VoidFiendRework", "1.0.0")]
public class VoidFiendRework : BaseUnityPlugin
{
public const string PluginGUID = "VVitchh.VoidFiendRework";
public const string PluginAuthor = "VVitchh";
public const string PluginName = "VoidFiendRework";
public const string PluginVersion = "1.0.0";
public bool corrupted = false;
public void Awake()
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Expected O, but got Unknown
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Expected O, but got Unknown
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Expected O, but got Unknown
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Expected O, but got Unknown
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: 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)
Log.Init(((BaseUnityPlugin)this).Logger);
VoidBlinkBase.GetVelocity += new hook_GetVelocity(OnVoidBlinkBaseGetVelocity);
CrushBase.OnEnter += new hook_OnEnter(OnCrushBaseOnEnter);
ChargeCrushBase.OnEnter += new hook_OnEnter(OnChargeCrushBaseOnEnter);
CorruptionTransitionBase.OnEnter += new hook_OnEnter(OnCorruptionTransitionBaseOnEnter);
FireCorruptHandBeam.OnEnter += new hook_OnEnter(OnFireCorruptHandBeamOnEnter);
VoidSurvivorController.OnEnable += new hook_OnEnable(OnVoidSurvivorControllerOnEnable);
VoidSurvivorSkillDef val = Addressables.LoadAssetAsync<VoidSurvivorSkillDef>((object)"RoR2/DLC1/VoidSurvivor/CrushCorruption.asset").WaitForCompletion();
val.minimumCorruption = 10f;
SkillDef val2 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidSurvivor/CrushHealth.asset").WaitForCompletion();
val2.baseMaxStock = 3;
SkillDef val3 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidSurvivor/VoidBlinkUp.asset").WaitForCompletion();
val3.baseMaxStock = 2;
val3.baseRechargeInterval = 8f;
}
private void OnVoidSurvivorControllerOnEnable(orig_OnEnable orig, VoidSurvivorController self)
{
self.minimumCorruptionPerVoidItem = 0f;
self.corruptionPerCrit = 0f;
self.corruptionPerSecondInCombat = 4f + 4f * (0.02f * (float)self.voidItemCount);
self.corruptionForFullHeal /= 2f;
self.corruptionForFullDamage /= 2f;
orig.Invoke(self);
}
private Vector3 OnVoidBlinkBaseGetVelocity(orig_GetVelocity orig, VoidBlinkBase self)
{
//IL_0026: 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_0030: 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_0042: 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_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Unknown result type (might be due to invalid IL or missing references)
//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_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: 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_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: 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)
self.duration = 0.5f;
float num = ((EntityState)self).fixedAge / 0.5f;
Vector3 val = self.forwardSpeed.Evaluate(num) * self.forwardVector;
Vector3 val2 = self.upSpeed.Evaluate(num) * Vector3.up;
if (!corrupted)
{
val *= 3f;
val2 /= 1.3f;
}
return (val + val2) * self.speedCoefficient * ((BaseState)self).moveSpeedStat;
}
private void OnFireCorruptHandBeamOnEnter(orig_OnEnter orig, FireCorruptHandBeam self)
{
self.damageCoefficientPerSecond = 15f;
self.procCoefficientPerSecond = 3f;
orig.Invoke(self);
}
private void OnChargeCrushBaseOnEnter(orig_OnEnter orig, ChargeCrushBase self)
{
if (self != null)
{
self.baseDuration = 0.3f * ((EntityState)self).characterBody.attackSpeed;
}
orig.Invoke(self);
}
private void OnCorruptionTransitionBaseOnEnter(orig_OnEnter orig, CorruptionTransitionBase self)
{
if (self is EnterCorruptionTransition)
{
corrupted = true;
self.duration = 0.4f;
}
else if (self is ExitCorruptionTransition)
{
corrupted = false;
}
orig.Invoke(self);
}
private void OnCrushBaseOnEnter(orig_OnEnter orig, CrushBase self)
{
if (self is CrushCorruption)
{
self.selfHealFraction = 0.07f;
self.corruptionChange = -10f;
self.baseDuration = 0.3f * ((EntityState)self).characterBody.attackSpeed;
}
else if (self is CrushHealth)
{
self.selfHealFraction = -0.2f;
self.corruptionChange = 20f;
self.baseDuration = 0.7f;
}
orig.Invoke(self);
}
}
}