using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using HarmonyLib;
using Il2Cpp;
using Il2CppAssets.Scripts.Actors.Player;
using Il2CppAssets.Scripts.Inventory__Items__Pickups;
using Il2CppAssets.Scripts.Inventory__Items__Pickups.Stats;
using Il2CppAssets.Scripts.Menu.Shop;
using Il2CppAssets.Scripts._Data.Tomes;
using Il2CppSystem.Collections.Generic;
using MegabonkMod.LuckyMan;
using MelonLoader;
using Microsoft.CodeAnalysis;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(Core), "LuckyMan", "1.0.7", "Slimaeus", null)]
[assembly: MelonGame("Ved", "Megabonk")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("MegabonkMod.LuckyMan")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.7")]
[assembly: AssemblyInformationalVersion("1.0.0+941f2be2e56a11a0fb4a99e25df8fac7289cfb71")]
[assembly: AssemblyProduct("MegabonkMod.LuckyMan")]
[assembly: AssemblyTitle("MegabonkMod.LuckyMan")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.7.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;
}
}
}
namespace MegabonkMod.LuckyMan
{
public class Core : MelonMod
{
[HarmonyPatch(typeof(MyPlayer))]
public static class PlayerPatches
{
[HarmonyPatch("Spawn")]
[HarmonyPostfix]
public static void Spawn_Postfix(MyPlayer __instance)
{
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Expected O, but got Unknown
TomeData val = DataManager.Instance.tomeData[(ETome)13];
List<StatModifier> val2 = new List<StatModifier>();
val2.Add(new StatModifier
{
stat = (EStat)30,
modification = 10000f,
modifyType = (EStatModifyType)2
});
__instance.inventory.tomeInventory.AddTome(val, val2, (ERarity)0);
for (int i = 0; i < 98; i++)
{
__instance.inventory.tomeInventory.AddTome(val, new List<StatModifier>(), (ERarity)5);
}
}
}
}
}