using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using MelonLoader;
using Repo_InfiniteHealth;
using Repo_Library;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(InfiniteHealth), "R.E.P.O Infinite Health Mod", "1.0.0", ".Zer0", null)]
[assembly: MelonGame("semiwork", "REPO")]
[assembly: AssemblyTitle("InfiniteHealth")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("InfiniteHealth")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("9371c202-9550-4c0a-8b09-fe955ebdb6de")]
[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 Repo_InfiniteHealth;
public class InfiniteHealth : MelonMod
{
private readonly Library Repo_Lib = new Library();
public override void OnUpdate()
{
if (!Repo_Lib.IsInGame())
{
return;
}
PlayerController playerController = Repo_Lib.GetPlayerController();
StatsManager statsManager = Repo_Lib.GetStatsManager();
try
{
typeof(PlayerHealth).GetField("godMode", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(Repo_Lib.GetPlayerAvatar().playerHealth, true);
}
catch (Exception ex)
{
MelonLogger.Msg((object)ex);
}
}
}