using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using GlobalSettings;
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("increase shards")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("increase shards")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("bbfdfb9b-55a0-4a15-a5c9-1dcf6455b7e4")]
[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")]
[BepInPlugin("com.EylonShachmon.IncreaseShards", "IncreaseShards", "1.1.1")]
public class IncreaseShards : BaseUnityPlugin
{
private static ConfigEntry<int> multiply;
private void Awake()
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin loaded and initialized");
multiply = ((BaseUnityPlugin)this).Config.Bind<int>("General", "ShardMultiplyValue", 3, "The number by which Shard drops and maximum is multiplied. Must be a whole number");
Harmony.CreateAndPatchAll(typeof(IncreaseShards), (string)null);
}
[HarmonyPrefix]
[HarmonyPatch(typeof(CurrencyManager), "ChangeCurrency", new Type[]
{
typeof(int),
typeof(CurrencyType),
typeof(bool)
})]
private static void MoreShards(CurrencyManager __instance, ref int amount, CurrencyType type, bool showCounter = true)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0003: Invalid comparison between Unknown and I4
if ((int)type == 1 && amount > 0)
{
amount *= multiply.Value;
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(Gameplay), "GetCurrencyCap")]
public static void GetCurrencyCapChange(ref int __result)
{
__result *= multiply.Value;
}
}