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 IL.RoR2.Orbs;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2.Orbs;
using RoR2;
using RoR2.Orbs;
using UnityEngine;
[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("FuckPrimeDevastator")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FuckPrimeDevastator")]
[assembly: AssemblyTitle("FuckPrimeDevastator")]
[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 R2API.Utils
{
[AttributeUsage(AttributeTargets.Assembly)]
public class ManualNetworkRegistrationAttribute : Attribute
{
}
}
namespace FuckPrimeDevastator
{
[BepInPlugin("com.Moffein.FuckPrimeDevastator", "FuckPrimeDevastator", "1.0.0")]
public class FuckPrimeDevastatorPlugin : BaseUnityPlugin
{
private void Awake()
{
//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
PrimeDevastatorChainOrb.OnArrival += new Manipulator(PrimeDevastatorChainOrb_OnArrival);
PrimeDevastatorChainOrb.OnArrival += new hook_OnArrival(PrimeDevastatorChainOrb_OnArrival1);
}
private void PrimeDevastatorChainOrb_OnArrival1(orig_OnArrival orig, PrimeDevastatorChainOrb self)
{
orig.Invoke(self);
if (Object.op_Implicit((Object)(object)((Orb)self).target) && Object.op_Implicit((Object)(object)((Orb)self).target.healthComponent) && Object.op_Implicit((Object)(object)((Orb)self).target.healthComponent.body))
{
CharacterBody body = ((Orb)self).target.healthComponent.body;
for (int i = 0; i < 4; i++)
{
body.AddTimedBuff(Buffs.lunarruin, 420f);
}
}
}
private void PrimeDevastatorChainOrb_OnArrival(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);
if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "DisableAllSkills")
}))
{
val.EmitDelegate<Func<BuffDef, BuffDef>>((Func<BuffDef, BuffDef>)((BuffDef x) => Buffs.lunarruin));
}
else
{
Debug.LogError((object)"FuckPrimeDevastator: Buff removal IL hook failed.");
}
}
}
}