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 HarmonyLib;
using Microsoft.CodeAnalysis;
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("BrutalV1")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("V1 with V2-level stats, 250 HP, and Direct Velocity.")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BrutalV1")]
[assembly: AssemblyTitle("BrutalV1")]
[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;
}
}
}
[BepInPlugin("com.potpot.brutalv1", "Brutal V1 Mode", "1.0.0")]
public class BrutalV1 : BaseUnityPlugin
{
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
Harmony val = new Harmony("com.potpot.brutalv1");
val.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"BRUTAL V1: Velocity Injection Engaged.");
}
}
[HarmonyPatch(typeof(NewMovement), "Start")]
public class NewMovementPatch
{
[HarmonyPostfix]
private static void Postfix(NewMovement __instance)
{
__instance.hp = 250;
Traverse.Create((object)__instance).Field("maxHp").SetValue((object)250);
Traverse.Create((object)__instance).Field("stamina").SetValue((object)500f);
Traverse.Create((object)__instance).Field("dashSpeed").SetValue((object)140f);
}
}
[HarmonyPatch(typeof(NewMovement), "Update")]
public class NewMovementUpdatePatch
{
[HarmonyPostfix]
private static void Postfix(NewMovement __instance)
{
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: 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_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: 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_0079: 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_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
Rigidbody component = ((Component)__instance).GetComponent<Rigidbody>();
if ((Object)(object)component != (Object)null)
{
float axisRaw = Input.GetAxisRaw("Horizontal");
float axisRaw2 = Input.GetAxisRaw("Vertical");
Vector3 val = ((Component)__instance).transform.right * axisRaw + ((Component)__instance).transform.forward * axisRaw2;
Vector3 normalized = ((Vector3)(ref val)).normalized;
if (((Vector3)(ref normalized)).magnitude > 0.1f)
{
component.velocity = new Vector3(normalized.x * 35f, component.velocity.y, normalized.z * 35f);
}
}
if (Traverse.Create((object)__instance).Field<bool>("sliding").Value)
{
Traverse.Create((object)__instance).Field("slideSpeed").SetValue((object)80f);
}
float value = Traverse.Create((object)__instance).Field<float>("stamina").Value;
if (value > 500f)
{
Traverse.Create((object)__instance).Field("stamina").SetValue((object)500f);
}
}
}