using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using P2.Game.Miracle;
using P2.Sound;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("MiracleSkip")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+46b1b0be557c8978def656efb2677b7f64f15e60")]
[assembly: AssemblyProduct("Miracle Skip")]
[assembly: AssemblyTitle("MiracleSkip")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.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 MiracleSkip
{
[BepInPlugin("ninja.nairobi.miracleskip", "Miracle Skip", "1.0.0")]
[BepInProcess("PATAPON12_REPLAY.exe")]
public class Plugin : BasePlugin
{
public override void Load()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
Harmony val = new Harmony("ninja.nairobi.miracleskip");
val.PatchAll();
}
}
[HarmonyPatch(typeof(Director), "startSoundGame")]
public static class P2MiracleSkip
{
public static bool Prefix(Director __instance, int miniGameType)
{
if (miniGameType != 1)
{
return true;
}
Controller miracleController = __instance.getGame().getMiracleController();
miracleController.endMiracle();
miracleController.activate(100u);
__instance.getBeatCommander().onEndMiracle();
MethodInfo methodInfo = AccessTools.Method(typeof(BeatCommander), "sendCommandFailed", (Type[])null, (Type[])null);
methodInfo.Invoke(__instance.getBeatCommander(), new object[2] { false, false });
return false;
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "MiracleSkip";
public const string PLUGIN_NAME = "Miracle Skip";
public const string PLUGIN_VERSION = "1.0.0";
}
}