using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("ParryingUseZeroStamina")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ParryingUseZeroStamina")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("1ed595cc-b6c8-4116-9719-5bc6ae651705")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace ExampleShowTamed;
[BepInPlugin("dickdangerjustice.ParryingUseZeroStamina", "ParryingUseZeroStamina", "1.1.1")]
[BepInProcess("valheim.exe")]
public class ParryingUseZeroStamina : BaseUnityPlugin
{
[HarmonyPatch(typeof(Humanoid), "BlockAttack")]
private class Parrying_Stamina
{
private static void Prefix(ref float ___m_blockStaminaDrain)
{
___m_blockStaminaDrain = 0f;
}
}
[HarmonyPatch(typeof(Character), "AddStaggerDamage")]
private class Parrying_Stagger
{
private static void Prefix(ref float damage)
{
damage /= 3f;
}
}
private readonly Harmony harmony = new Harmony("dickdangerjustice.ParryingUseZeroStamina");
private void Awake()
{
harmony.PatchAll();
}
}