using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("TinyEnemies")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TinyEnemies")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8e337a40-3e71-4cfa-82d6-da35241827bd")]
[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 TinyEnemiesMod;
[BepInPlugin("com.error.tinyenemies", "Pocket Enemies (April Fools)", "1.1.1")]
public class TinyEnemiesMod : BaseUnityPlugin
{
public static ConfigEntry<bool> ModEnabled;
public static ConfigEntry<float> EnemyScale;
public static ConfigEntry<bool> RandomSize;
private void Awake()
{
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Expected O, but got Unknown
ModEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Enable Mod", true, "Turn the mod on or off.");
EnemyScale = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Enemy Size", 0.3f, "1 is normal. 0.3 is tiny. 3 is giant.");
RandomSize = ((BaseUnityPlugin)this).Config.Bind<bool>("Fun", "Random Variance", true, "Adds a little bit of random height to every enemy for variety.");
Harmony val = new Harmony("com.error.tinyenemies");
val.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"Pocket Enemies (Visuals Only) Loaded!");
}
}
[HarmonyPatch(typeof(EnemyIdentifier), "Start")]
public class EnemyPatch
{
[HarmonyPostfix]
private static void Postfix(EnemyIdentifier __instance)
{
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
if (TinyEnemiesMod.ModEnabled.Value)
{
float num = TinyEnemiesMod.EnemyScale.Value;
if (TinyEnemiesMod.RandomSize.Value)
{
num += Random.Range(-0.05f, 0.05f);
}
Transform transform = ((Component)__instance).transform;
transform.localScale *= num;
}
}
}