using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using UnboundLib;
using UnboundLib.Cards;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("gazuntiteRoundsMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("gazuntiteRoundsMod")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("0b23792b-7a40-46d7-bf13-1bfa5b69145e")]
[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 GesundheitModPack;
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.gesundheit.rounds.modpack", "Gesundheit Mod Pack", "1.0.0")]
[BepInProcess("Rounds.exe")]
public class GesundheitModPack : BaseUnityPlugin
{
private const string ModId = "com.gesundheit.rounds.modpack";
private const string ModName = "Gesundheit Mod Pack";
public const string Version = "1.0.0";
public static GesundheitModPack instance { get; private set; }
private void Awake()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("com.gesundheit.rounds.modpack").PatchAll();
}
private void Start()
{
instance = this;
CustomCard.BuildCard<GesundheitCard>();
}
}
[HarmonyPatch(typeof(Gun), "DoAttack")]
public class GunAttackPatch
{
private static int originalProjectileCount;
private static bool wasModified;
private static bool Prefix(Gun __instance)
{
if ((Object)(object)((Component)__instance).gameObject.GetComponent<GesundheitTracker>() != (Object)null)
{
GunAmmo val = ((Component)__instance).GetComponent<GunAmmo>() ?? ((Component)__instance).GetComponentInParent<GunAmmo>() ?? ((Component)((Component)__instance).transform.root).GetComponentInChildren<GunAmmo>();
if ((Object)(object)val != (Object)null)
{
int num = (int)ExtensionMethods.GetFieldValue((object)val, "currentAmmo");
if (num > 0)
{
originalProjectileCount = __instance.numberOfProjectiles;
wasModified = true;
__instance.numberOfProjectiles = num + originalProjectileCount - 1;
__instance.bursts = 0;
__instance.timeBetweenBullets = 0f;
ExtensionMethods.SetFieldValue((object)val, "currentAmmo", (object)0);
Debug.Log((object)$"[GesundheitModPack] Handled Mag Blast: {__instance.numberOfProjectiles} physical bullets.");
}
}
}
return true;
}
private static void Postfix(Gun __instance)
{
if (wasModified)
{
__instance.numberOfProjectiles = originalProjectileCount;
wasModified = false;
}
}
}
public class GesundheitCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.cardName = "Gesundheit";
gun.reloadTime = 1.5f;
gun.spread = 0.05f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
if (!Object.op_Implicit((Object)(object)((Component)gun).gameObject.GetComponent<GesundheitTracker>()))
{
((Component)gun).gameObject.AddComponent<GesundheitTracker>();
}
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
GesundheitTracker component = ((Component)gun).gameObject.GetComponent<GesundheitTracker>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
public override string GetModName()
{
return "Ravens";
}
protected override GameObject GetCardArt()
{
CardInfo val = ((IEnumerable<CardInfo>)Resources.FindObjectsOfTypeAll<CardInfo>()).FirstOrDefault((Func<CardInfo, bool>)((CardInfo c) => c.cardName.ToLower() == "buckshot"));
if ((Object)(object)val != (Object)null && (Object)(object)val.cardArt != (Object)null)
{
return val.cardArt;
}
return null;
}
protected override CardInfoStat[] GetStats()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: 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_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: 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_005e: Expected O, but got Unknown
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = true,
stat = "<color=#22FF22>+</color> projectiles",
amount = "ammo",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Reload Time",
amount = "+50%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Spread",
amount = "+5°",
simepleAmount = (SimpleAmount)0
}
};
}
protected override string GetTitle()
{
return "Gesundheit!";
}
protected override string GetDescription()
{
return "Bless you. Oops! Fire the whole magazine.";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)0;
}
}
public class GesundheitTracker : MonoBehaviour
{
}