Decompiled source of Jiraiya v1.2.3

plugins/Jiraiya/Jiraiya.dll

Decompiled 17 minutes ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization.Json;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using ExtraSkillSlots;
using HG;
using KinematicCharacterController;
using Microsoft.CodeAnalysis;
using On.RoR2;
using On.RoR2.SurvivorMannequins;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using Rewired;
using RoR2;
using RoR2.CameraModes;
using RoR2.CharacterAI;
using RoR2.ConVar;
using RoR2.ContentManagement;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.SurvivorMannequins;
using RoR2.UI;
using TMPro;
using Unity.Profiling;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Jiraiya")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+0f84804deff0b28f7b133ff1bd79c57a4862d666")]
[assembly: AssemblyProduct("Jiraiya")]
[assembly: AssemblyTitle("Jiraiya")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace JiraiyaMod
{
	[DefaultExecutionOrder(1100)]
	public sealed class BuntaGround04 : MonoBehaviour
	{
		private Visual visual;

		private SummonActor summon;

		private Vector3 normal = Vector3.up;

		private float offset;

		private float drop;

		public string Debug07 = "";

		public float Drop => drop;

		private void Start()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: 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_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			visual = ((Component)this).GetComponent<Visual>();
			summon = ((Component)this).GetComponentInParent<SummonActor>();
			Vector3 origin = summon.origin;
			Vector3 forward = ((Component)summon).transform.forward;
			Vector3 right = ((Component)summon).transform.right;
			float scale = summon.scale;
			Vector3[] array = (Vector3[])(object)new Vector3[4]
			{
				origin + right * 5f * scale,
				origin - right * 5f * scale,
				origin + forward * 6f * scale,
				origin - forward * 3f * scale
			};
			Vector3[] array2 = (Vector3[])(object)new Vector3[4];
			int num = 0;
			RaycastHit val = default(RaycastHit);
			for (int i = 0; i < 4; i++)
			{
				if (Physics.Raycast(array[i] + Vector3.up * 12f, Vector3.down, ref val, 25f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1) && ((RaycastHit)(ref val)).normal.y > 0.45f)
				{
					array2[i] = ((RaycastHit)(ref val)).point;
					num++;
				}
			}
			if (num != 4)
			{
				return;
			}
			Vector3 val2 = Vector3.Cross(array2[2] - array2[3], array2[0] - array2[1]);
			Vector3 val3 = ((Vector3)(ref val2)).normalized;
			if (val3.y < 0f)
			{
				val3 = -val3;
			}
			if (val3.y > 0.65f)
			{
				normal = val3;
				float num2 = 0f;
				Vector3[] array3 = array2;
				foreach (Vector3 val4 in array3)
				{
					num2 += val4.y + (normal.x * (val4.x - origin.x) + normal.z * (val4.z - origin.z)) / normal.y;
				}
				offset = Mathf.Clamp(num2 / 4f - origin.y, -2f * scale, 2f * scale);
			}
		}

		private void LateUpdate()
		{
			//IL_0033: 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_003e: 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)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)visual) || !Object.op_Implicit((Object)(object)summon))
			{
				return;
			}
			float num = SageController.Now - summon.started;
			((Component)this).transform.rotation = Quaternion.FromToRotation(Vector3.up, normal) * ((Component)summon).transform.rotation;
			((Component)this).transform.position = ((Component)summon).transform.position + Vector3.up * offset;
			if (num < 0.45f)
			{
				return;
			}
			float num2 = 0f;
			string[] array = new string[2] { "l", "r" };
			foreach (string side in array)
			{
				num2 = Mathf.Max(num2, Deficit(side, "thigh", "calf", "foot"));
			}
			drop = Mathf.Lerp(drop, Mathf.Min(num2 * 1.05f, 0.9f * summon.scale), 1f - Mathf.Exp((0f - Time.deltaTime) * 12f));
			Transform transform = ((Component)this).transform;
			transform.position -= Vector3.up * drop;
			array = new string[2] { "l", "r" };
			foreach (string side2 in array)
			{
				Plant(side2, "thigh", "calf", "foot");
				if (num <= 6f || num >= 10.52f)
				{
					Plant(side2, "upperarm", "forearm", "hand");
				}
			}
		}

		private bool Target(string side, string upper, string lower, string end, out Transform a, out Transform b, out Transform c, out Vector3 target)
		{
			//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_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			a = visual.Bone("2gbt00t0 " + side + " " + upper);
			b = visual.Bone("2gbt00t0 " + side + " " + lower);
			c = visual.Bone("2gbt00t0 " + side + " " + end);
			target = Vector3.zero;
			if (!Object.op_Implicit((Object)(object)a) || !Object.op_Implicit((Object)(object)b) || !Object.op_Implicit((Object)(object)c))
			{
				return false;
			}
			Vector3 val = ((Component)this).transform.InverseTransformPoint(c.position);
			Vector3 val2 = ((Component)this).transform.TransformPoint(new Vector3(val.x, 0f, val.z));
			RaycastHit val3 = default(RaycastHit);
			if (!Physics.Raycast(val2 + Vector3.up * 3f, Vector3.down, ref val3, 6f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1) || ((RaycastHit)(ref val3)).normal.y < 0.4f)
			{
				return false;
			}
			float num = Mathf.Clamp(((RaycastHit)(ref val3)).point.y - val2.y, -1.5f * summon.scale, 1.5f * summon.scale);
			target = c.position + Vector3.up * num;
			return Mathf.Abs(num) >= 0.015f;
		}

		private float Deficit(string side, string upper, string lower, string end)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			if (!Target(side, upper, lower, end, out var a, out var b, out var c, out var target))
			{
				return 0f;
			}
			float num = (Vector3.Distance(a.position, b.position) + Vector3.Distance(b.position, c.position)) * 0.995f;
			float num2 = Vector3.Distance(a.position, target) - num;
			if (!(num2 > 0f))
			{
				return 0f;
			}
			return num2;
		}

		private void Plant(string side, string upper, string lower, string end)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			if (Target(side, upper, lower, end, out var a, out var b, out var c, out var target))
			{
				Solve(a, b, c, target);
			}
		}

		public static void Solve(Transform a, Transform b, Transform c, Vector3 target)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//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_000f: 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_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: 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_002b: 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_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: 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_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: 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_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			Quaternion rotation = c.rotation;
			Vector3 position = a.position;
			Vector3 position2 = b.position;
			float num = Vector3.Distance(position, position2);
			float num2 = Vector3.Distance(position2, c.position);
			Vector3 val = target - position;
			float num3 = Mathf.Clamp(((Vector3)(ref val)).magnitude, 0.001f, (num + num2) * 0.998f);
			Vector3 normalized = ((Vector3)(ref val)).normalized;
			Vector3 val2 = position2 - position;
			val2 -= normalized * Vector3.Dot(val2, normalized);
			if (((Vector3)(ref val2)).sqrMagnitude < 0.001f)
			{
				val2 = Vector3.Cross(normalized, Vector3.forward);
			}
			((Vector3)(ref val2)).Normalize();
			float num4 = (num * num - num2 * num2 + num3 * num3) / (2f * num3);
			Vector3 val3 = position + normalized * num4 + val2 * Mathf.Sqrt(Mathf.Max(0f, num * num - num4 * num4));
			a.rotation = Quaternion.FromToRotation(b.position - position, val3 - position) * a.rotation;
			b.rotation = Quaternion.FromToRotation(c.position - b.position, target - b.position) * b.rotation;
			c.rotation = rotation;
		}
	}
	[DefaultExecutionOrder(1200)]
	public sealed class BuntaSound06 : MonoBehaviour
	{
		public SummonActor Owner;

		public Visual Model;

		private readonly GameObject[] emitters = (GameObject[])(object)new GameObject[3];

		private readonly uint[] ids = new uint[3];

		private readonly bool[] posted = new bool[3];

		private static readonly float[] starts = new float[3] { 0.45f, 0.95f, 6.65f };

		private static readonly float[] ends = new float[3] { 3.45f, 6f, 10.52f };

		private static readonly string[] cues = new string[3] { "Landing", "Oil", "Sword" };

		private bool resolvedOwner;

		public int Posts;

		public uint[] PlayingIds => ids;

		private void LateUpdate()
		{
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Expected O, but got Unknown
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)Owner) || !Object.op_Implicit((Object)(object)Model) || !Object.op_Implicit((Object)(object)Run.instance))
			{
				StopAll();
				return;
			}
			if (!Object.op_Implicit((Object)(object)Owner.owner))
			{
				if (resolvedOwner)
				{
					StopAll();
				}
				return;
			}
			resolvedOwner = true;
			if (!Owner.owner.healthComponent.alive)
			{
				StopAll();
			}
			else
			{
				if (!NetworkClient.active)
				{
					return;
				}
				float num = SageController.Now - Owner.started;
				for (int i = 0; i < 3; i++)
				{
					if (num >= ends[i])
					{
						Stop(i);
						posted[i] = true;
						continue;
					}
					if (!posted[i] && num >= starts[i])
					{
						posted[i] = true;
						GameObject val = new GameObject("Bunta06 " + cues[i] + " finite audio");
						emitters[i] = val;
						val.transform.position = Position(i);
						val.AddComponent<AkGameObj>();
						AkSoundEngine.SetGameObjectOutputBusVolume(val, (GameObject)null, 0.85f);
						ids[i] = AkSoundEngine.PostEvent("Play_Jiraiya06_" + cues[i], val, 1048576u, (EventCallback)null, (object)null);
						if (ids[i] != 0)
						{
							Posts++;
						}
						if (num - starts[i] > 0.08f)
						{
							AkSoundEngine.SeekOnEvent("Play_Jiraiya06_" + cues[i], val, (int)((num - starts[i]) * 1000f), false, ids[i]);
						}
					}
					if (Object.op_Implicit((Object)(object)emitters[i]))
					{
						emitters[i].transform.position = Position(i);
					}
				}
			}
		}

		private Vector3 Position(int i)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			switch (i)
			{
			case 0:
				return Owner.origin + Vector3.up * Owner.scale;
			case 2:
			{
				Transform val3 = Model.Bone("2gbt00t0 r hand");
				if (!Object.op_Implicit((Object)(object)val3))
				{
					return Owner.origin;
				}
				return val3.position;
			}
			default:
			{
				Transform val = Model.Bone("2gbt00t0 lip01");
				Transform val2 = Model.Bone("2gbt00t0 lip10");
				if (!Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)val2))
				{
					return Owner.origin;
				}
				return (val.position + val2.position) * 0.5f;
			}
			}
		}

		private void Stop(int i)
		{
			if (ids[i] != 0)
			{
				AkSoundEngine.StopPlayingID(ids[i], 60);
				ids[i] = 0u;
			}
			if (Object.op_Implicit((Object)(object)emitters[i]))
			{
				Object.Destroy((Object)(object)emitters[i], 0.08f);
				emitters[i] = null;
			}
		}

		public void StopAll()
		{
			for (int i = 0; i < 3; i++)
			{
				Stop(i);
				posted[i] = true;
			}
		}

		private void OnDestroy()
		{
			StopAll();
		}
	}
	public static class Playtest
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Func<Transform, bool> <>9__1_2;

			public static Func<OilActor, bool> <>9__1_0;

			public static Func<OilActor, bool> <>9__1_1;

			public static Func<OilActor, bool> <>9__2_0;

			public static Func<OilActor, bool> <>9__2_1;

			public static Func<OilActor, bool> <>9__2_2;

			public static Func<OilActor, bool> <>9__2_3;

			public static Func<SkinnedMeshRenderer, bool> <>9__3_0;

			public static Func<Vector3, Vector3, Vector3> <>9__3_1;

			public static Func<Transform, bool> <>9__4_1;

			public static Func<AkAudioListener, bool> <>9__4_0;

			public static Func<OilActor, bool> <>9__5_0;

			public static Func<OilActor, bool> <>9__5_1;

			public static Func<EntityStateMachine, bool> <>9__6_0;

			public static Func<OilActor, bool> <>9__6_1;

			public static Func<SummonActor, bool> <>9__6_2;

			public static Func<OilActor, bool> <>9__6_3;

			public static Func<SummonActor, bool> <>9__6_4;

			public static Func<SceneDef, bool> <>9__6_5;

			public static Func<OilActor, bool> <>9__9_0;

			public static Func<OilActor, bool> <>9__9_1;

			public static Func<OilActor, bool> <>9__9_2;

			public static Func<SummonActor, bool> <>9__9_3;

			public static Func<OilActor, bool> <>9__9_4;

			public static Func<int, float> <>9__14_0;

			public static Func<int, float> <>9__14_1;

			public static Func<SummonActor, bool> <>9__14_2;

			public static Func<SummonActor, bool> <>9__14_3;

			public static Func<SummonActor, bool> <>9__14_4;

			public static Func<SceneDef, bool> <>9__15_0;

			public static Func<SummonActor, bool> <>9__16_0;

			public static Func<GenericSkill, bool> <>9__16_1;

			public static Func<SummonActor, bool> <>9__16_2;

			public static Func<AkAudioListener, bool> <>9__16_3;

			public static Func<EntityStateMachine, bool> <>9__19_0;

			public static Func<Corpse03, int> <>9__20_0;

			public static Func<Rigidbody, float> <>9__20_1;

			public static Func<OilActor, bool> <>9__23_0;

			public static Func<OilActor, IEnumerable<ParticleSystem>> <>9__23_1;

			public static Func<ParticleSystem, bool> <>9__23_2;

			public static Func<ParticleSystem, int> <>9__23_3;

			public static Func<OilActor, bool> <>9__25_0;

			public static Func<OilActor, bool> <>9__25_1;

			public static Func<OilActor, bool> <>9__25_2;

			public static Func<OilActor, bool> <>9__25_3;

			public static Func<OilActor, bool> <>9__25_4;

			public static Func<SkinnedMeshRenderer, bool> <>9__29_0;

			public static Func<OilActor, bool> <>9__31_0;

			public static Func<OilActor, bool> <>9__31_1;

			public static Func<OilActor, bool> <>9__31_2;

			public static Func<float, string> <>9__32_8;

			public static Func<float, bool> <>9__32_0;

			public static Func<OilActor, bool> <>9__32_1;

			public static Func<SummonActor, bool> <>9__32_2;

			public static Func<SummonActor, bool> <>9__32_9;

			public static Func<SummonActor, bool> <>9__32_10;

			public static Func<OilActor, bool> <>9__32_3;

			public static Func<OilActor, IEnumerable<ParticleSystem>> <>9__32_4;

			public static Func<ParticleSystem, int> <>9__32_5;

			public static Func<ParticleSystem, int> <>9__32_6;

			public static Func<SummonActor, bool> <>9__34_0;

			public static Func<OilActor, bool> <>9__34_4;

			public static Func<OilActor, IEnumerable<ParticleSystem>> <>9__34_5;

			public static Func<ParticleSystem, int> <>9__34_6;

			public static Func<ParticleSystem, int> <>9__34_7;

			public static Func<SceneDef, bool> <>9__34_3;

			public static Func<RendererInfo, bool> <>9__42_0;

			public static Func<RasenganDelivery03, bool> <>9__43_5;

			public static Func<SummonActor, bool> <>9__43_6;

			public static Func<OilActor, bool> <>9__43_0;

			public static Func<OilActor, bool> <>9__43_1;

			public static Func<OilActor, IEnumerable<ParticleSystem>> <>9__43_2;

			public static Func<ParticleSystem, int> <>9__43_3;

			public static Func<ParticleSystem, int> <>9__43_4;

			public static Func<SceneDef, bool> <>9__46_0;

			public static Func<EntityStateMachine, bool> <>9__46_1;

			public static Func<RasenganDelivery03, bool> <>9__47_0;

			public static Func<OilActor, bool> <>9__47_1;

			public static Func<OilActor, IEnumerable<ParticleSystem>> <>9__47_2;

			public static Func<ParticleSystem, int> <>9__47_3;

			public static Func<RasenganDelivery03, bool> <>9__50_1;

			public static Func<RasenganDelivery03, bool> <>9__50_0;

			public static Func<OilActor, bool> <>9__50_2;

			public static Func<OilActor, IEnumerable<ParticleSystem>> <>9__50_3;

			public static Func<ParticleSystem, int> <>9__50_4;

			public static Func<ParticleSystem, int> <>9__50_5;

			public static Func<RasenganDelivery03, bool> <>9__51_4;

			public static Func<RasenganDelivery03, bool> <>9__51_5;

			public static Func<RasenganDelivery03, bool> <>9__51_0;

			public static Func<SceneDef, bool> <>9__51_1;

			public static Func<EntityStateMachine, bool> <>9__51_2;

			public static Func<RasenganDelivery03, bool> <>9__51_3;

			public static Func<string, string> <>9__55_0;

			public static Func<RasenganDelivery03, bool> <>9__57_0;

			public static Func<FieldInfo, bool> <>9__63_0;

			public static Func<FieldInfo, bool> <>9__63_1;

			public static Func<FieldInfo, string> <>9__63_2;

			public static Func<SummonActor, bool> <>9__64_0;

			public static Func<RasenganDelivery03, bool> <>9__65_1;

			public static Func<string> <>9__65_2;

			public static Func<Vector3> <>9__65_3;

			public static Func<Vector3> <>9__65_4;

			public static Func<Vector3> <>9__65_5;

			public static Func<SummonActor, bool> <>9__65_9;

			public static Func<string> <>9__65_6;

			public static Func<SummonActor, bool> <>9__65_10;

			public static Func<Vector3> <>9__65_7;

			public static Func<CharacterMaster, bool> <>9__65_12;

			public static Func<string> <>9__65_13;

			public static Func<string, string> <>9__66_0;

			public static Func<Vector3> <>9__71_0;

			public static Func<Vector3> <>9__71_1;

			public static Func<Vector3> <>9__71_2;

			public static Func<SummonActor, bool> <>9__71_5;

			public static Func<Vector3> <>9__71_3;

			public static Func<Vector3> <>9__71_4;

			public static Func<float, string> <>9__71_6;

			public static Func<float, bool> <>9__71_7;

			public static Func<SummonActor, bool> <>9__71_12;

			public static Func<string> <>9__71_8;

			public static Func<SummonActor, bool> <>9__71_13;

			public static Func<Vector3> <>9__71_9;

			public static Func<CharacterMaster, bool> <>9__71_15;

			public static Func<SummonActor, bool> <>9__71_16;

			public static Func<SummonActor, bool> <>9__71_18;

			public static Func<Vector3> <>9__71_17;

			public static Func<RasenganDelivery03, bool> <>9__71_20;

			public static Func<RasenganDelivery03, bool> <>9__71_21;

			public static Func<OilActor, bool> <>9__73_6;

			public static Func<string> <>9__73_3;

			public static Func<OilActor, bool> <>9__73_7;

			public static Func<string> <>9__73_4;

			public static Func<OilActor, bool> <>9__73_8;

			public static Func<string, ProfilerRecorder> <>9__75_0;

			public static Func<string, List<float>> <>9__75_1;

			public static Func<OilActor, bool> <>9__75_2;

			public static Func<List<float>, float, float> <>9__75_3;

			public static Func<SummonActor, bool> <>9__76_1;

			public static Func<Vector3> <>9__76_0;

			public static Func<Vector3> <>9__76_2;

			public static Func<SummonActor, bool> <>9__76_3;

			public static Func<SummonActor, bool> <>9__76_6;

			public static Func<SummonActor, bool> <>9__76_9;

			public static Func<string> <>9__76_7;

			public static Func<OilActor, bool> <>9__76_12;

			public static Func<GenericSkill, string> <>9__76_13;

			public static Func<RasenganDelivery03, bool> <>9__84_1;

			public static Func<bool> <>9__84_0;

			public static Func<bool> <>9__84_2;

			public static Func<float, bool> <>9__85_7;

			public static Func<float, float> <>9__85_8;

			public static Func<float, float> <>9__86_0;

			public static hook_Update <>9__93_0;

			public static hook_FixedUpdate <>9__93_1;

			public static Action <>9__93_2;

			public static Func<JiraiyaSelectionVoice, bool> <>9__96_3;

			public static Func<Visual, bool> <>9__96_4;

			public static Func<NetworkUser, bool> <>9__96_0;

			public static Func<VehicleSeat, bool> <>9__96_1;

			public static Func<EntityStateMachine, bool> <>9__96_2;

			internal bool <Closure02>b__1_2(Transform t)
			{
				if (((Component)t).gameObject.activeInHierarchy)
				{
					return ((Object)t).name.EndsWith("ponynub");
				}
				return false;
			}

			internal bool <Closure02>b__1_0(OilActor a)
			{
				if (Object.op_Implicit((Object)(object)a) && a.kind == 0 && !a.burning)
				{
					return a.expires - a.started > 31f;
				}
				return false;
			}

			internal bool <Closure02>b__1_1(OilActor a)
			{
				if (Object.op_Implicit((Object)(object)a))
				{
					return a.kind == 0;
				}
				return false;
			}

			internal bool <EdgeFixture>b__2_0(OilActor p)
			{
				if (Object.op_Implicit((Object)(object)p))
				{
					return p.kind == 1;
				}
				return false;
			}

			internal bool <EdgeFixture>b__2_1(OilActor p)
			{
				if (Object.op_Implicit((Object)(object)p))
				{
					return p.kind == 1;
				}
				return false;
			}

			internal bool <EdgeFixture>b__2_2(OilActor p)
			{
				if (Object.op_Implicit((Object)(object)p))
				{
					return p.kind == 3;
				}
				return false;
			}

			internal bool <EdgeFixture>b__2_3(OilActor p)
			{
				if (Object.op_Implicit((Object)(object)p))
				{
					return p.kind == 3;
				}
				return false;
			}

			internal bool <MovementClose02>b__3_0(SkinnedMeshRenderer t)
			{
				return ((Object)t).name.Contains(" eye_");
			}

			internal Vector3 <MovementClose02>b__3_1(Vector3 a, Vector3 v)
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				return a + v;
			}

			internal bool <FaceAudio02>b__4_1(Transform t)
			{
				return ((Object)t).name.EndsWith(" head");
			}

			internal bool <FaceAudio02>b__4_0(AkAudioListener l)
			{
				return ((Behaviour)l).isActiveAndEnabled;
			}

			internal bool <FinalFixture>b__5_0(OilActor p)
			{
				if (Object.op_Implicit((Object)(object)p))
				{
					return p.kind == 3;
				}
				return false;
			}

			internal bool <FinalFixture>b__5_1(OilActor p)
			{
				if (Object.op_Implicit((Object)(object)p))
				{
					return p.kind == 3;
				}
				return false;
			}

			internal bool <MapMechanics>b__6_0(EntityStateMachine machine)
			{
				return machine.customName == "Weapon";
			}

			internal bool <MapMechanics>b__6_1(OilActor p)
			{
				if (Object.op_Implicit((Object)(object)p) && p.kind == 0)
				{
					return (Object)(object)p.owner == (Object)(object)actor;
				}
				return false;
			}

			internal bool <MapMechanics>b__6_2(SummonActor a)
			{
				if ((Object)(object)a.owner == (Object)(object)actor)
				{
					return a.kind == 1;
				}
				return false;
			}

			internal bool <MapMechanics>b__6_3(OilActor p)
			{
				if (Object.op_Implicit((Object)(object)p) && p.kind == 0)
				{
					return p.burning;
				}
				return false;
			}

			internal bool <MapMechanics>b__6_4(SummonActor a)
			{
				if (a.kind == 1)
				{
					return (Object)(object)a.owner == (Object)(object)actor;
				}
				return false;
			}

			internal bool <MapMechanics>b__6_5(SceneDef s)
			{
				return s.baseSceneName == "blackbeach";
			}

			internal bool <Mechanics>b__9_0(OilActor p)
			{
				if (Object.op_Implicit((Object)(object)p) && p.kind == 0)
				{
					return (Object)(object)p.owner == (Object)(object)actor;
				}
				return false;
			}

			internal bool <Mechanics>b__9_1(OilActor p)
			{
				if (Object.op_Implicit((Object)(object)p))
				{
					return p.burning;
				}
				return false;
			}

			internal bool <Mechanics>b__9_2(OilActor p)
			{
				if (Object.op_Implicit((Object)(object)p))
				{
					return p.kind == 3;
				}
				return false;
			}

			internal bool <Mechanics>b__9_3(SummonActor s)
			{
				return (Object)(object)s.owner == (Object)(object)actor;
			}

			internal bool <Mechanics>b__9_4(OilActor p)
			{
				if (Object.op_Implicit((Object)(object)p))
				{
					return (Object)(object)p.owner == (Object)(object)actor;
				}
				return false;
			}

			internal float <Pass02Fixture>b__14_0(int i)
			{
				return Combo.Coefficient(sage: false, i);
			}

			internal float <Pass02Fixture>b__14_1(int i)
			{
				return Combo.Coefficient(sage: true, i);
			}

			internal bool <Pass02Fixture>b__14_2(SummonActor a)
			{
				return a.kind == 3;
			}

			internal bool <Pass02Fixture>b__14_3(SummonActor a)
			{
				return a.kind == 3;
			}

			internal bool <Pass02Fixture>b__14_4(SummonActor a)
			{
				return a.kind == 3;
			}

			internal bool <Pass03Air>b__15_0(SceneDef s)
			{
				return s.baseSceneName == "blackbeach";
			}

			internal bool <Pass03Closure>b__16_0(SummonActor a)
			{
				if (a.kind == 2)
				{
					return (Object)(object)a.owner == (Object)(object)actor;
				}
				return false;
			}

			internal bool <Pass03Closure>b__16_1(GenericSkill s)
			{
				return s.stock == s.maxStock;
			}

			internal bool <Pass03Closure>b__16_2(SummonActor a)
			{
				if (a.kind == 1)
				{
					return (Object)(object)a.owner == (Object)(object)actor;
				}
				return false;
			}

			internal bool <Pass03Closure>b__16_3(AkAudioListener l)
			{
				return ((Behaviour)l).isActiveAndEnabled;
			}

			internal bool <BindRespawn03>b__19_0(EntityStateMachine m)
			{
				return m.customName == "Weapon";
			}

			internal int <Pass03Motion>b__20_0(Corpse03 x)
			{
				return ((Object)x).GetInstanceID();
			}

			internal float <Pass03Motion>b__20_1(Rigidbody p)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				Vector3 velocity = p.velocity;
				return ((Vector3)(ref velocity)).magnitude;
			}

			internal bool <Pass04Fire>b__23_0(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.kind == 0;
				}
				return false;
			}

			internal IEnumerable<ParticleSystem> <Pass04Fire>b__23_1(OilActor x)
			{
				return ((Component)x).GetComponentsInChildren<ParticleSystem>();
			}

			internal bool <Pass04Fire>b__23_2(ParticleSystem x)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				MainModule main = x.main;
				return ((MainModule)(ref main)).maxParticles == 40;
			}

			internal int <Pass04Fire>b__23_3(ParticleSystem x)
			{
				return x.particleCount;
			}

			internal bool <Pass04Closure>b__25_0(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.kind == 0;
				}
				return false;
			}

			internal bool <Pass04Closure>b__25_1(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.kind == 0;
				}
				return false;
			}

			internal bool <Pass04Closure>b__25_2(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.kind == 0;
				}
				return false;
			}

			internal bool <Pass04Closure>b__25_3(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.burning;
				}
				return false;
			}

			internal bool <Pass04Closure>b__25_4(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.burning;
				}
				return false;
			}

			internal bool <SampleBuntaGround04>b__29_0(SkinnedMeshRenderer x)
			{
				return ((Object)x).name.Contains(" body_");
			}

			internal bool <Pass04Fixture>b__31_0(OilActor x)
			{
				return Object.op_Implicit((Object)(object)x);
			}

			internal bool <Pass04Fixture>b__31_1(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.burning;
				}
				return false;
			}

			internal bool <Pass04Fixture>b__31_2(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.burning;
				}
				return false;
			}

			internal string <Pass05Closure>b__32_8(float x)
			{
				return x.ToString("F2");
			}

			internal bool <Pass05Closure>b__32_0(float x)
			{
				return Mathf.Abs(x - 9f) < 0.001f;
			}

			internal bool <Pass05Closure>b__32_1(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.kind == 0;
				}
				return false;
			}

			internal bool <Pass05Closure>b__32_2(SummonActor x)
			{
				if (x.kind == 2)
				{
					return (Object)(object)x.owner == (Object)(object)actor;
				}
				return false;
			}

			internal bool <Pass05Closure>b__32_9(SummonActor x)
			{
				return x.kind == 3;
			}

			internal bool <Pass05Closure>b__32_10(SummonActor x)
			{
				return x.kind == 3;
			}

			internal bool <Pass05Closure>b__32_3(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.kind == 0;
				}
				return false;
			}

			internal IEnumerable<ParticleSystem> <Pass05Closure>b__32_4(OilActor x)
			{
				return ((Component)x).GetComponentsInChildren<ParticleSystem>();
			}

			internal int <Pass05Closure>b__32_5(ParticleSystem x)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				MainModule main = x.main;
				return ((MainModule)(ref main)).maxParticles;
			}

			internal int <Pass05Closure>b__32_6(ParticleSystem x)
			{
				return x.particleCount;
			}

			internal bool <Pass05Final>b__34_0(SummonActor x)
			{
				return x.kind == 3;
			}

			internal bool <Pass05Final>b__34_4(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.kind == 0;
				}
				return false;
			}

			internal IEnumerable<ParticleSystem> <Pass05Final>b__34_5(OilActor x)
			{
				return ((Component)x).GetComponentsInChildren<ParticleSystem>();
			}

			internal int <Pass05Final>b__34_6(ParticleSystem x)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				MainModule main = x.main;
				return ((MainModule)(ref main)).maxParticles;
			}

			internal int <Pass05Final>b__34_7(ParticleSystem x)
			{
				return x.particleCount;
			}

			internal bool <Pass05Final>b__34_3(SceneDef x)
			{
				return x.baseSceneName == "blackbeach";
			}

			internal bool <Pass05Camera>b__42_0(RendererInfo x)
			{
				//IL_0000: 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)
				if (Object.op_Implicit((Object)(object)x.renderer))
				{
					return x.renderer.enabled;
				}
				return false;
			}

			internal bool <Pass05Fixture>b__43_5(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal bool <Pass05Fixture>b__43_6(SummonActor x)
			{
				return x.kind == 3;
			}

			internal bool <Pass05Fixture>b__43_0(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.kind == 0;
				}
				return false;
			}

			internal bool <Pass05Fixture>b__43_1(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.kind == 0;
				}
				return false;
			}

			internal IEnumerable<ParticleSystem> <Pass05Fixture>b__43_2(OilActor x)
			{
				return ((Component)x).GetComponentsInChildren<ParticleSystem>();
			}

			internal int <Pass05Fixture>b__43_3(ParticleSystem x)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				MainModule main = x.main;
				return ((MainModule)(ref main)).maxParticles;
			}

			internal int <Pass05Fixture>b__43_4(ParticleSystem x)
			{
				return x.particleCount;
			}

			internal bool <Pass06Closure>b__46_0(SceneDef x)
			{
				return x.baseSceneName == "blackbeach";
			}

			internal bool <Pass06Closure>b__46_1(EntityStateMachine m)
			{
				return m.customName == "Weapon";
			}

			internal bool <Pass06Final>b__47_0(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal bool <Pass06Final>b__47_1(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.kind == 0;
				}
				return false;
			}

			internal IEnumerable<ParticleSystem> <Pass06Final>b__47_2(OilActor x)
			{
				return ((Component)x).GetComponentsInChildren<ParticleSystem>();
			}

			internal int <Pass06Final>b__47_3(ParticleSystem x)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				MainModule main = x.main;
				return ((MainModule)(ref main)).maxParticles;
			}

			internal bool <Pass06Fixture>b__50_1(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal bool <Pass06Fixture>b__50_0(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal bool <Pass06Fixture>b__50_2(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x))
				{
					return x.kind == 0;
				}
				return false;
			}

			internal IEnumerable<ParticleSystem> <Pass06Fixture>b__50_3(OilActor x)
			{
				return ((Component)x).GetComponentsInChildren<ParticleSystem>();
			}

			internal int <Pass06Fixture>b__50_4(ParticleSystem x)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				MainModule main = x.main;
				return ((MainModule)(ref main)).maxParticles;
			}

			internal int <Pass06Fixture>b__50_5(ParticleSystem x)
			{
				return x.particleCount;
			}

			internal bool <Pass06Lifecycle>b__51_4(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal bool <Pass06Lifecycle>b__51_5(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal bool <Pass06Lifecycle>b__51_0(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal bool <Pass06Lifecycle>b__51_1(SceneDef x)
			{
				return x.baseSceneName == "blackbeach";
			}

			internal bool <Pass06Lifecycle>b__51_2(EntityStateMachine m)
			{
				return m.customName == "Weapon";
			}

			internal bool <Pass06Lifecycle>b__51_3(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal string <Section07>b__55_0(string x)
			{
				return x.Trim();
			}

			internal bool <RasenganNote>b__57_0(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal bool <CameraPitch07>b__63_0(FieldInfo f)
			{
				return typeof(CameraModeBase).IsAssignableFrom(f.FieldType);
			}

			internal bool <CameraPitch07>b__63_1(FieldInfo f)
			{
				return typeof(IDictionary).IsAssignableFrom(f.FieldType);
			}

			internal string <CameraPitch07>b__63_2(FieldInfo f)
			{
				return f.Name + ":" + f.FieldType.Name;
			}

			internal bool <FireAtKen07>b__64_0(SummonActor x)
			{
				return x.kind == 3;
			}

			internal bool <Pass07Fixture>b__65_1(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal string <Pass07Fixture>b__65_2()
			{
				//IL_0061: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				GoemonPresentation06 component = ((Component)actor).GetComponent<GoemonPresentation06>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					return "none";
				}
				return "age=" + component.Age.ToString("F2") + " ignited=" + component.Ignited + " C=" + ((object)component.Convergence/*cast due to .constrained prefix*/).ToString();
			}

			internal Vector3 <Pass07Fixture>b__65_3()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: 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_0019: Unknown result type (might be due to invalid IL or missing references)
				return actor.corePosition + fw07 * 8f;
			}

			internal Vector3 <Pass07Fixture>b__65_4()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: 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_0019: Unknown result type (might be due to invalid IL or missing references)
				//IL_001e: 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_002d: Unknown result type (might be due to invalid IL or missing references)
				return actor.corePosition + fw07 * 4f + Vector3.up * 0.5f;
			}

			internal Vector3 <Pass07Fixture>b__65_5()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: 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_0019: Unknown result type (might be due to invalid IL or missing references)
				return actor.corePosition + fw07 * 16f;
			}

			internal string <Pass07Fixture>b__65_6()
			{
				SummonActor summonActor = Object.FindObjectsOfType<SummonActor>().FirstOrDefault((SummonActor x) => x.kind == 3);
				if (!Object.op_Implicit((Object)(object)summonActor))
				{
					return "none";
				}
				return "age=" + (SageController.Now - summonActor.started).ToString("F2") + " blocks=" + summonActor.Blocks + " hits=" + summonActor.guardHits;
			}

			internal bool <Pass07Fixture>b__65_9(SummonActor x)
			{
				return x.kind == 3;
			}

			internal Vector3 <Pass07Fixture>b__65_7()
			{
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				//IL_0048: Unknown result type (might be due to invalid IL or missing references)
				//IL_0052: Unknown result type (might be due to invalid IL or missing references)
				//IL_0057: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				SummonActor summonActor = Object.FindObjectsOfType<SummonActor>().FirstOrDefault((SummonActor x) => x.kind == 3);
				if (!Object.op_Implicit((Object)(object)summonActor))
				{
					return actor.corePosition;
				}
				return ((Component)summonActor).transform.position + Vector3.up * 5f;
			}

			internal bool <Pass07Fixture>b__65_10(SummonActor x)
			{
				return x.kind == 3;
			}

			internal bool <Pass07Fixture>b__65_12(CharacterMaster m)
			{
				return Object.op_Implicit((Object)(object)m);
			}

			internal string <Pass07Fixture>b__65_13()
			{
				SummonActor bunta = ((Component)actor).GetComponent<SummonOwner>().bunta;
				if (!Object.op_Implicit((Object)(object)bunta))
				{
					return "none";
				}
				return "age=" + (SageController.Now - bunta.started).ToString("F2") + " landed=" + bunta.HasLanded + " slashed=" + bunta.HasSlashed;
			}

			internal string <Section08>b__66_0(string x)
			{
				return x.Trim();
			}

			internal Vector3 <Pass08Fixture>b__71_0()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: 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_0019: Unknown result type (might be due to invalid IL or missing references)
				return actor.corePosition + fw07 * 8f;
			}

			internal Vector3 <Pass08Fixture>b__71_1()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: 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_0019: Unknown result type (might be due to invalid IL or missing references)
				return actor.corePosition + Vector3.up * 0.7f;
			}

			internal Vector3 <Pass08Fixture>b__71_2()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: 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_0019: Unknown result type (might be due to invalid IL or missing references)
				return actor.corePosition + fw07 * 9f;
			}

			internal bool <Pass08Fixture>b__71_5(SummonActor x)
			{
				return x.kind == 3;
			}

			internal Vector3 <Pass08Fixture>b__71_3()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: 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_0019: Unknown result type (might be due to invalid IL or missing references)
				return actor.corePosition + Vector3.up * 0.3f;
			}

			internal Vector3 <Pass08Fixture>b__71_4()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: 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_0019: Unknown result type (might be due to invalid IL or missing references)
				return actor.corePosition + Vector3.up * 0.6f;
			}

			internal string <Pass08Fixture>b__71_6(float s)
			{
				return s.ToString("F2");
			}

			internal bool <Pass08Fixture>b__71_7(float s)
			{
				return s > 9.5f;
			}

			internal string <Pass08Fixture>b__71_8()
			{
				SummonActor summonActor = Object.FindObjectsOfType<SummonActor>().FirstOrDefault((SummonActor x) => x.kind == 3);
				if (!Object.op_Implicit((Object)(object)summonActor))
				{
					return "none";
				}
				return "age=" + (SageController.Now - summonActor.started).ToString("F2") + " blocks=" + summonActor.Blocks;
			}

			internal bool <Pass08Fixture>b__71_12(SummonActor x)
			{
				return x.kind == 3;
			}

			internal Vector3 <Pass08Fixture>b__71_9()
			{
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				//IL_0048: Unknown result type (might be due to invalid IL or missing references)
				//IL_0052: Unknown result type (might be due to invalid IL or missing references)
				//IL_0057: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				SummonActor summonActor = Object.FindObjectsOfType<SummonActor>().FirstOrDefault((SummonActor x) => x.kind == 3);
				if (!Object.op_Implicit((Object)(object)summonActor))
				{
					return actor.corePosition;
				}
				return ((Component)summonActor).transform.position + Vector3.up * 2.2f;
			}

			internal bool <Pass08Fixture>b__71_13(SummonActor x)
			{
				return x.kind == 3;
			}

			internal bool <Pass08Fixture>b__71_15(CharacterMaster m)
			{
				return Object.op_Implicit((Object)(object)m);
			}

			internal bool <Pass08Fixture>b__71_16(SummonActor x)
			{
				return x.kind == 3;
			}

			internal Vector3 <Pass08Fixture>b__71_17()
			{
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				//IL_0048: Unknown result type (might be due to invalid IL or missing references)
				//IL_0052: Unknown result type (might be due to invalid IL or missing references)
				//IL_0057: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				SummonActor summonActor = Object.FindObjectsOfType<SummonActor>().FirstOrDefault((SummonActor x) => x.kind == 3);
				if (!Object.op_Implicit((Object)(object)summonActor))
				{
					return actor.corePosition;
				}
				return ((Component)summonActor).transform.position + Vector3.up * 0.4f;
			}

			internal bool <Pass08Fixture>b__71_18(SummonActor x)
			{
				return x.kind == 3;
			}

			internal bool <Pass08Fixture>b__71_20(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal bool <Pass08Fixture>b__71_21(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal string <Pass09Sections>b__73_3()
			{
				return "burning=" + OilSystem.Actors.Count((OilActor a) => Object.op_Implicit((Object)(object)a) && a.kind == 0 && a.burning);
			}

			internal bool <Pass09Sections>b__73_6(OilActor a)
			{
				if (Object.op_Implicit((Object)(object)a) && a.kind == 0)
				{
					return a.burning;
				}
				return false;
			}

			internal string <Pass09Sections>b__73_4()
			{
				return "burning=" + OilSystem.Actors.Count((OilActor a) => Object.op_Implicit((Object)(object)a) && a.kind == 0 && a.burning);
			}

			internal bool <Pass09Sections>b__73_7(OilActor a)
			{
				if (Object.op_Implicit((Object)(object)a) && a.kind == 0)
				{
					return a.burning;
				}
				return false;
			}

			internal bool <Pass09Sections>b__73_8(OilActor a)
			{
				if (Object.op_Implicit((Object)(object)a) && a.kind == 0)
				{
					return a.burning;
				}
				return false;
			}

			internal ProfilerRecorder <Perf09>b__75_0(string m)
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				return ProfilerRecorder.StartNew(ProfilerCategory.Any, m, 1, (ProfilerRecorderOptions)24);
			}

			internal List<float> <Perf09>b__75_1(string m)
			{
				return new List<float>();
			}

			internal bool <Perf09>b__75_2(OilActor x)
			{
				if (Object.op_Implicit((Object)(object)x) && x.kind == 0)
				{
					return x.burning;
				}
				return false;
			}

			internal float <Perf09>b__75_3(List<float> l, float f)
			{
				if (l.Count <= 0)
				{
					return 0f;
				}
				return l[Mathf.Clamp(Mathf.RoundToInt(f * (float)(l.Count - 1)), 0, l.Count - 1)];
			}

			internal bool <Pass10Sections>b__76_1(SummonActor x)
			{
				return x.kind == 3;
			}

			internal Vector3 <Pass10Sections>b__76_0()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: 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_0019: Unknown result type (might be due to invalid IL or missing references)
				return actor.corePosition + Vector3.up * 0.3f;
			}

			internal Vector3 <Pass10Sections>b__76_2()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: 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_0019: Unknown result type (might be due to invalid IL or missing references)
				return actor.corePosition + Vector3.up * 0.2f;
			}

			internal bool <Pass10Sections>b__76_3(SummonActor x)
			{
				if (x.kind == 1)
				{
					return (Object)(object)x.owner == (Object)(object)actor;
				}
				return false;
			}

			internal bool <Pass10Sections>b__76_6(SummonActor x)
			{
				if (x.kind == 1)
				{
					return (Object)(object)x.owner == (Object)(object)actor;
				}
				return false;
			}

			internal string <Pass10Sections>b__76_7()
			{
				//IL_009e: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
				SummonActor summonActor = Object.FindObjectsOfType<SummonActor>().FirstOrDefault((SummonActor x) => x.kind == 2 && (Object)(object)x.owner == (Object)(object)actor);
				if (!Object.op_Implicit((Object)(object)summonActor))
				{
					return "none";
				}
				string[] obj = new string[8]
				{
					"age=",
					(SageController.Now - summonActor.started).ToString("F2"),
					" phase=",
					summonActor.phase.ToString(),
					" fall=",
					summonActor.fallComplete.ToString(),
					" pos=",
					null
				};
				Vector3 position = ((Component)summonActor).transform.position;
				obj[7] = ((Vector3)(ref position)).ToString("F1");
				return string.Concat(obj);
			}

			internal bool <Pass10Sections>b__76_9(SummonActor x)
			{
				if (x.kind == 2)
				{
					return (Object)(object)x.owner == (Object)(object)actor;
				}
				return false;
			}

			internal bool <Pass10Sections>b__76_12(OilActor a)
			{
				if (Object.op_Implicit((Object)(object)a))
				{
					if (a.kind != 1)
					{
						return a.kind == 2;
					}
					return true;
				}
				return false;
			}

			internal string <Pass10Sections>b__76_13(GenericSkill s)
			{
				if (!Object.op_Implicit((Object)(object)s.icon))
				{
					return "null";
				}
				return ((Texture)s.icon.texture).width + "x" + ((Texture)s.icon.texture).height;
			}

			internal bool <Pass10Perf>b__84_0()
			{
				return Object.FindObjectsOfType<RasenganDelivery03>().Any((RasenganDelivery03 x) => (Object)(object)x.Body == (Object)(object)actor);
			}

			internal bool <Pass10Perf>b__84_1(RasenganDelivery03 x)
			{
				return (Object)(object)x.Body == (Object)(object)actor;
			}

			internal bool <Pass10Perf>b__84_2()
			{
				return Object.FindObjectsOfType<GoemonBeam08>().Length != 0;
			}

			internal bool <Window10>b__85_7(float x)
			{
				return x >= 0f;
			}

			internal float <Window10>b__85_8(float x)
			{
				return x;
			}

			internal float <Median10>b__86_0(float x)
			{
				return x;
			}

			internal void <Init>b__93_0(orig_Update orig, PlayerCharacterMasterController self)
			{
				orig.Invoke(self);
				CharacterMaster master = self.master;
				if (master != null)
				{
					CharacterBody body = master.GetBody();
					if (body != null)
					{
						((Component)body).GetComponent<FixtureAim>()?.Apply(fixedInput: false);
					}
				}
			}

			internal void <Init>b__93_1(orig_FixedUpdate orig, PlayerCharacterMasterController self)
			{
				orig.Invoke(self);
				CharacterMaster master = self.master;
				if (master != null)
				{
					CharacterBody body = master.GetBody();
					if (body != null)
					{
						((Component)body).GetComponent<FixtureAim>()?.Apply(fixedInput: true);
					}
				}
			}

			internal void <Init>b__93_2()
			{
				((MonoBehaviour)Plugin.Instance).StartCoroutine(RunTest());
			}

			internal bool <RunTest>b__96_3(JiraiyaSelectionVoice v)
			{
				return Voice.Playing(v.PlayingId);
			}

			internal bool <RunTest>b__96_4(Visual v)
			{
				return v.controller;
			}

			internal bool <RunTest>b__96_0(NetworkUser x)
			{
				return ((NetworkBehaviour)x).isLocalPlayer;
			}

			internal bool <RunTest>b__96_1(VehicleSeat s)
			{
				return (Object)(object)s.currentPassengerBody == (Object)(object)actor;
			}

			internal bool <RunTest>b__96_2(EntityStateMachine m)
			{
				return m.customName == "Weapon";
			}
		}

		private static int comboStages;

		private static CharacterBody aimTarget04;

		private static Vector3 targetAfter04;

		private static Camera reviewCam04;

		private static RenderTexture reviewRT04;

		private static Texture2D reviewTex04;

		private static int hits05;

		private static CharacterBody victim05;

		private static readonly List<float> coefficients05 = new List<float>();

		private static int waves06;

		private static bool traceCombo06;

		private static Camera cam07;

		private static RenderTexture rt07;

		private static Texture2D tex07;

		private static Vector3 fw07 = Vector3.forward;

		private static Vector3 side07 = Vector3.right;

		private static float darkAmbient = 1f;

		private static readonly string[] markers09 = new string[8] { "Main Thread", "Render Thread", "PlayerLoop", "Gfx.WaitForPresentOnGfxThread", "Gfx.WaitForGfxCommandsFromMainThread", "ParticleSystem.EndUpdateAll", "ParticleSystem.ScheduleGeometryJobs", "Camera.Render" };

		private static readonly List<float> rollT10 = new List<float>();

		private static string evidence;

		private static CharacterBody actor;

		private static EntityStateMachine weapon;

		private static Vector3 naturalHome;

		private static int blocks07 => SummonActor.TotalBlocks;

		private static bool FullTiming => !File.Exists(Path.Combine(Media.Assets, "RUN_JIRAIYA_FOCUSED"));

		private static IEnumerator ThreeJumps(FixtureAim input)
		{
			for (int i = 0; i < 3; i++)
			{
				input.Jump = true;
				yield return (object)new WaitForSeconds(0.12f);
				input.Jump = false;
				yield return (object)new WaitForSeconds(0.23f);
			}
		}

		private unsafe static IEnumerator Closure02(Vector3 home)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			Application.targetFrameRate = 60;
			FixtureAim input = ((Component)actor).GetComponent<FixtureAim>();
			SageController sage = ((Component)actor).GetComponent<SageController>();
			GenericSkill slot = ((Component)actor).GetComponent<ExtraSkillLocator>().extraSecond;
			Check("Native_EN_Spawn", actor.skinIndex == 1 && Voice.Language(actor) == "EN");
			Check("Isolated_Language_Saved", File.Exists(Voice.LanguageFile) && File.ReadAllText(Voice.LanguageFile) == "EN");
			Vector3 focusOffset;
			for (int form = 0; form < 2; form++)
			{
				if (form == 1)
				{
					slot.stock = 1;
					sage.Begin();
				}
				yield return (object)new WaitForSeconds(0.3f);
				yield return Motion("FaceClose" + form, 1.2f, new Vector3(0.25f, 0.08f, 1.1f), Vector3.up * 0.5f);
				yield return Motion("HairRearIdle" + form, 1.1f, new Vector3(0.8f, 0.2f, -2.4f), Vector3.up * 0.15f);
				Visual visual = Visual.Find(actor);
				Transform[] array = (from t in ((Component)visual).GetComponentsInChildren<Transform>()
					where ((Component)t).gameObject.activeInHierarchy && ((Object)t).name.EndsWith("ponynub")
					select t).ToArray();
				foreach (Transform val in array)
				{
					string[] obj = new string[6]
					{
						"PONY_DIAGNOSTIC form=",
						form.ToString(),
						" localTip=",
						null,
						null,
						null
					};
					focusOffset = ((Component)visual).transform.InverseTransformPoint(val.position);
					obj[3] = ((object)(*(Vector3*)(&focusOffset))/*cast due to .constrained prefix*/).ToString();
					obj[4] = " forward=";
					focusOffset = actor.characterDirection.forward;
					obj[5] = ((object)(*(Vector3*)(&focusOffset))/*cast due to .constrained prefix*/).ToString();
					Log(string.Concat(obj));
				}
				input.Move = Vector3.forward;
				string name = "HairSideRun" + form;
				Vector3 offset = new Vector3(2.8f, 0.15f, -0.8f);
				focusOffset = default(Vector3);
				yield return Motion(name, 1.2f, offset, focusOffset);
				input.Move = Vector3.zero;
				Place02(home);
			}
			sage.End();
			yield return (object)new WaitForSeconds(0.3f);
			Loadout val2 = new Loadout();
			val2.bodyLoadoutManager.SetSkinIndex(actor.bodyIndex, 0u);
			CharacterMaster jpMaster = new MasterSummon
			{
				masterPrefab = Plugin.Master,
				position = home + Vector3.right * 4f,
				rotation = Quaternion.identity,
				teamIndexOverride = (TeamIndex)1,
				loadout = val2,
				ignoreTeamMemberLimit = true
			}.Perform();
			BaseAI[] components = ((Component)jpMaster).GetComponents<BaseAI>();
			for (int num = 0; num < components.Length; num++)
			{
				((Behaviour)components[num]).enabled = false;
			}
			yield return (object)new WaitForSeconds(0.5f);
			CharacterBody jp = jpMaster.GetBody();
			Check("Native_JP_Separate_Body", jp.skinIndex == 0 && Voice.Language(jp) == "JP" && Voice.Language(actor) == "EN");
			CharacterBody[] array2 = (CharacterBody[])(object)new CharacterBody[2] { actor, jp };
			foreach (CharacterBody body in array2)
			{
				string[] array3 = new string[12]
				{
					"Rasengan", "Mane", "Goemon", "Support", "Prepare", "Sage", "Revert", "Bark1", "Bark5", "SageBark1",
					"SageBark5", "Gamaken"
				};
				foreach (string role in array3)
				{
					((Component)body).GetComponent<Voice>()?.ResetGate();
					Voice.Play(body, role);
					yield return (object)new WaitForSeconds(0.2f);
					Voice component = ((Component)body).GetComponent<Voice>();
					Check("Native_Audio_" + Voice.Language(body) + "_" + role, component.LastEvent.Contains("_" + Voice.Language(body) + "_" + role) && Voice.Playing(component.PlayingId), component.LastEvent);
				}
				((Component)body).GetComponent<Voice>().ResetGate();
				Voice.Play(body, 23);
				yield return (object)new WaitForSeconds(2.5f);
				Voice.Play(body, 24);
				yield return (object)new WaitForSeconds(0.15f);
				Check("Prep_To_Sage_Announcement_" + Voice.Language(body), ((Component)body).GetComponent<Voice>().LastEvent.Contains("_Sage") && Voice.Playing(((Component)body).GetComponent<Voice>().PlayingId));
			}
			NetworkServer.Destroy(((Component)jp).gameObject);
			NetworkServer.Destroy(((Component)jpMaster).gameObject);
			CharacterMaster victimMaster = Target("BeetleMaster", home + Vector3.forward * 3f);
			yield return (object)new WaitForSeconds(0.8f);
			CharacterBody victim = victimMaster.GetBody();
			victim.baseArmor = 0f;
			victim.levelArmor = 0f;
			victim.baseRegen = 0f;
			victim.levelRegen = 0f;
			victim.RecalculateStats();
			TeleportHelper.TeleportBody(victim, home + Vector3.forward * 3f);
			actor.baseCrit = 0f;
			actor.RecalculateStats();
			yield return (object)new WaitForSeconds(0.2f);
			float hp = victim.healthComponent.health;
			comboStages = 0;
			input.Primary = true;
			actor.skillLocator.primary.ExecuteIfReady();
			Vector3 offset2 = new Vector3(3.5f, 1f, -4f);
			focusOffset = default(Vector3);
			yield return Motion("NativeDamageCombo", 3.03f, offset2, focusOffset);
			input.Primary = false;
			weapon.SetNextStateToMain();
			Check("Native_Normal_Combo_Damage", Mathf.Abs(hp - victim.healthComponent.health - actor.damage * 18.45f) < 0.2f, "loss=" + (hp - victim.healthComponent.health) + " expected=" + actor.damage * 18.45f + " mask=" + comboStages);
			NetworkServer.Destroy(((Component)victim).gameObject);
			NetworkServer.Destroy(((Component)victimMaster).gameObject);
			actor.inventory.GiveItem(Items.Feather.itemIndex, 1);
			actor.RecalculateStats();
			Place02(home);
			yield return (object)new WaitForSeconds(0.4f);
			((MonoBehaviour)Plugin.Instance).StartCoroutine(ThreeJumps(input));
			Vector3 offset3 = new Vector3(3f, 0.2f, -1f);
			focusOffset = default(Vector3);
			yield return Motion("NativeFeatherThreeJumps", 1.1f, offset3, focusOffset);
			Check("Native_Item_ThirdJump", actor.characterMotor.jumpCount == 3, "count=" + actor.characterMotor.jumpCount);
			input.Jump = false;
			actor.inventory.RemoveItem(Items.Feather.itemIndex, 1);
			yield return (object)new WaitForSeconds(1.8f);
			Place02(home);
			sage.End();
			actor.skillLocator.secondary.stock = 1;
			actor.skillLocator.secondary.ExecuteIfReady();
			yield return (object)new WaitForSeconds(0.06f);
			weapon.SetNextStateToMain();
			yield return (object)new WaitForFixedUpdate();
			Check("Cancelled_M2_Refund_Preserved", actor.skillLocator.secondary.stock == 1 && !sage.FireNext);
			CharacterMaster close = Target("BeetleMaster", home + new Vector3(-4f, 1f, 9f));
			CharacterMaster flying = Target("WispMaster", home + new Vector3(5f, 5f, 12f));
			yield return (object)new WaitForSeconds(0.7f);
			TeleportHelper.TeleportBody(close.GetBody(), home + new Vector3(-4f, 1f, 9f));
			TeleportHelper.TeleportBody(flying.GetBody(), home + new Vector3(5f, 5f, 12f));
			yield return (object)new WaitForFixedUpdate();
			weapon.SetNextState((EntityState)(object)new Hair());
			yield return Motion("NativeHairSurface", 1.4f, new Vector3(7f, 3f, -5f), Vector3.forward * 6f);
			CharacterMaster[] array4 = (CharacterMaster[])(object)new CharacterMaster[2] { close, flying };
			foreach (CharacterMaster obj2 in array4)
			{
				NetworkServer.Destroy(((Component)obj2.GetBody()).gameObject);
				NetworkServer.Destroy(((Component)obj2).gameObject);
			}
			Check("Native_Hair_Cleanup", Object.FindObjectsOfType<HairTendril>().Length == 0);
			ClearOil();
			SummonActor.Spawn(actor, 1, home + new Vector3(-20f, 0f, 0f), Vector3.forward, 1f, sage: false);
			float begin = SageController.Now;
			OilActor oldest = null;
			int maxCount = 0;
			int volleys = 0;
			while (SageController.Now - begin < 25f)
			{
				if ((Object)(object)oldest == (Object)null)
				{
					oldest = OilSystem.Actors.FirstOrDefault((OilActor a) => Object.op_Implicit((Object)(object)a) && a.kind == 0 && !a.burning && a.expires - a.started > 31f);
				}
				if (SageController.Now - begin >= (float)(volleys * 4))
				{
					focusOffset = new Vector3(0.5f, -0.3f, 1f);
					input.Aim = ((Vector3)(ref focusOffset)).normalized;
					sage.End();
					actor.skillLocator.secondary.stock = 1;
					actor.skillLocator.secondary.ExecuteIfReady();
					volleys++;
				}
				maxCount = Mathf.Max(maxCount, OilSystem.Actors.Count((OilActor a) => Object.op_Implicit((Object)(object)a) && a.kind == 0));
				yield return (object)new WaitForSeconds(0.2f);
			}
			input.Aim = Vector3.forward;
			Check("Bunta_Deposit_Still_Visible_After25s", Object.op_Implicit((Object)(object)oldest) && oldest.expires - oldest.started >= 32f, "maxPatches=" + maxCount + " volleys=" + volleys + " age=" + (Object.op_Implicit((Object)(object)oldest) ? (SageController.Now - oldest.started) : 0f));
			Check("Combined_Oil_Bounded", maxCount <= 48);
			yield return Motion("LongLivedSharedOil", 0.6f, new Vector3(30f, 18f, 30f), Vector3.forward * 16f);
			if (Object.op_Implicit((Object)(object)oldest))
			{
				float expiry = oldest.expires;
				while (SageController.Now < expiry + 0.2f)
				{
					yield return (object)new WaitForSeconds(0.2f);
				}
				Check("Bunta_Deposit_Expires_After32", !Object.op_Implicit((Object)(object)oldest));
			}
			ClearOil();
			Place02(home);
			GameObject cylinder = GameObject.CreatePrimitive((PrimitiveType)2);
			((Object)cylinder).name = "Pass02 curved wall";
			cylinder.layer = LayerIndex.world.intVal;
			cylinder.transform.position = home + new Vector3(0f, 12f, 6f);
			cylinder.transform.localScale = new Vector3(10f, 12f, 10f);
			Place02(home + Vector3.forward * 0.1f);
			yield return (object)new WaitForSeconds(0.4f);
			Physics.SyncTransforms();
			input.Move = Vector3.forward;
			input.Jump = true;
			yield return (object)new WaitForSeconds(0.5f);
			WallRun wall = ((Component)actor).GetComponent<WallRun>();
			Vector3 initialNormal = wall.Normal;
			focusOffset = Vector3.right + Vector3.forward * 0.15f;
			input.Move = ((Vector3)(ref focusOffset)).normalized;
			Vector3 offset4 = new Vector3(6f, 2f, -5f);
			focusOffset = default(Vector3);
			yield return Motion("CurvedWall", 1.1f, offset4, focusOffset);
			float num3 = Vector3.Angle(initialNormal, wall.Normal);
			Check("Curved_Surface_Transport", wall.Running && num3 > 10f, "normalChange=" + num3);
			input.Move = Vector3.zero;
			yield return (object)new WaitForSeconds(0.5f);
			Check("Curved_Surface_Hold", wall.Standing);
			input.Jump = false;
			Object.Destroy((Object)(object)cylinder);
			Place02(home);
			yield return (object)new WaitForSeconds(0.5f);
			GameObject overhang = GameObject.CreatePrimitive((PrimitiveType)3);
			overhang.layer = LayerIndex.world.intVal;
			overhang.transform.position = home + new Vector3(0f, 8f, 8f);
			overhang.transform.localScale = new Vector3(24f, 16f, 1f);
			overhang.transform.rotation = Quaternion.Euler(-20f, 0f, 0f);
			Physics.SyncTransforms();
			RaycastHit val3 = default(RaycastHit);
			if (Physics.Raycast(home + Vector3.up * 3f, Vector3.forward, ref val3, 20f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
			{
				Place02(((RaycastHit)(ref val3)).point - Vector3.forward * 0.75f - Vector3.up * 1f);
				yield return (object)new WaitForSeconds(0.4f);
				input.Move = Vector3.forward;
				input.Jump = true;
				Vector3 offset5 = new Vector3(5f, 2f, -4f);
				focusOffset = default(Vector3);
				yield return Motion("ModestOverhang", 0.9f, offset5, focusOffset);
				bool ok = wall.Running && wall.Normal.y < -0.2f;
				focusOffset = wall.Normal;
				Check("Modest_Overhang", ok, "normal=" + ((object)(*(Vector3*)(&focusOffset))/*cast due to .constrained prefix*/).ToString());
			}
			else
			{
				Check("Overhang_Fixture", ok: false);
			}
			input.Move = Vector3.zero;
			input.Jump = false;
			Object.Destroy((Object)(object)overhang);
			Place02(home);
			yield return (object)new WaitForSeconds(0.3f);
			CharacterMaster master = actor.master;
			actor.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo));
			yield return (object)new WaitForSeconds(0.2f);
			CharacterBody revived = master.Respawn(home + Vector3.up, Quaternion.identity, false);
			yield return (object)new WaitForSeconds(0.5f);
			Check("Native_EN_Respawn_Persists", Object.op_Implicit((Object)(object)revived) && revived.skinIndex == 1 && Voice.Language(revived) == "EN");
		}

		private static IEnumerator EdgeFixture(Vector3 home)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			SageController sage = ((Component)actor).GetComponent<SageController>();
			GenericSkill slot = ((Component)actor).GetComponent<ExtraSkillLocator>().extraSecond;
			actor.inventory.GiveItem(Items.AlienHead, 1);
			actor.RecalculateStats();
			yield return (object)new WaitForSeconds(0.3f);
			Check("AlienHead_Native_Sage_Cooldown", slot.finalRechargeInterval < 80f && slot.finalRechargeInterval > 0f, "interval=" + slot.finalRechargeInterval);
			actor.inventory.RemoveItem(Items.AlienHead.itemIndex, 1);
			actor.RecalculateStats();
			yield return (object)new WaitForSeconds(0.3f);
			slot.SetBonusStockFromBody(1);
			yield return (object)new WaitForFixedUpdate();
			Check("Bonus_Stock_Fixture", slot.maxStock == 2);
			slot.stock = 1;
			slot.rechargeStopwatch = 20f;
			sage.Begin();
			Check("Bonus_Stock_Preserves_Recharge", Mathf.Abs(slot.rechargeStopwatch - 20f) < 0.1f && slot.stock == 0, "progress=" + slot.rechargeStopwatch);
			sage.End();
			slot.SetBonusStockFromBody(0);
			slot.stock = 1;
			actor.skillLocator.secondary.stock = 1;
			actor.skillLocator.secondary.ExecuteIfReady();
			yield return (object)new WaitForSeconds(0.08f);
			weapon.SetNextStateToMain();
			yield return (object)new WaitForFixedUpdate();
			Check("Cancelled_Volley_Refund", actor.skillLocator.secondary.stock == 1 && !sage.FireNext);
			actor.skillLocator.secondary.ExecuteIfReady();
			yield return (object)new WaitForSeconds(0.7f);
			Check("Successful_Two_Bomb_Volley", sage.FireNext && OilSystem.Actors.Count((OilActor p) => Object.op_Implicit((Object)(object)p) && p.kind == 1) == 2, "bombs=" + OilSystem.Actors.Count((OilActor p) => Object.op_Implicit((Object)(object)p) && p.kind == 1));
			ClearOil();
			sage.End();
			GameObject wall = GameObject.CreatePrimitive((PrimitiveType)3);
			wall.layer = LayerIndex.world.intVal;
			wall.transform.position = actor.corePosition + Vector3.forward * 0.7f;
			wall.transform.localScale = new Vector3(20f, 20f, 0.3f);
			yield return (object)new WaitForFixedUpdate();
			Physics.SyncTransforms();
			Check("Initial_Wall_Fixture_Overlap", Physics.OverlapSphere(actor.corePosition, 1.25f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)).Contains(wall.GetComponent<Collider>()));
			OilSystem.Wave(actor, new Ray(actor.corePosition, Vector3.forward));
			yield return (object)new WaitForFixedUpdate();
			Check("Wave_Initial_Wall_Overlap", !OilSystem.Actors.Any((OilActor p) => Object.op_Implicit((Object)(object)p) && p.kind == 3));
			Object.Destroy((Object)(object)wall);
			yield return (object)new WaitForFixedUpdate();
			OilSystem.Wave(actor, new Ray(home + Vector3.up * 0.7f, Vector3.forward));
			yield return (object)new WaitForSeconds(0.15f);
			Check("Wave_Initial_Floor_Allowed", OilSystem.Actors.Any((OilActor p) => Object.op_Implicit((Object)(object)p) && p.kind == 3));
			ClearOil();
			CharacterMaster m = Target("BeetleMaster", home + Vector3.forward * 7f + Vector3.up);
			yield return (object)new WaitForSeconds(2f);
			CharacterBody victim = m.GetBody();
			((BaseCharacterController)victim.characterMotor).Motor.SetPosition(home + Vector3.forward * 7f + Vector3.up, true);
			victim.characterMotor.velocity = Vector3.zero;
			yield return (object)new WaitForFixedUpdate();
			CharacterMaster ally = new MasterSummon
			{
				masterPrefab = Plugin.Master,
				position = home + Vector3.right * 8f + Vector3.up,
				rotation = Quaternion.identity,
				teamIndexOverride = (TeamIndex)1,
				ignoreTeamMemberLimit = true
			}.Perform();
			BaseAI[] components = ((Component)ally).GetComponents<BaseAI>();
			for (int num = 0; num < components.Length; num++)
			{
				((Behaviour)components[num]).enabled = false;
			}
			yield return (object)new WaitForSeconds(0.2f);
			CharacterBody body = ally.GetBody();
			OilActor a = OilSystem.Patch(actor, victim.footPosition, 4f, burning: false);
			OilActor b = OilSystem.Patch(body, victim.footPosition, 4f, burning: false);
			yield return (object)new WaitForFixedUpdate();
			float health = victim.healthComponent.health;
			OilSystem.BurnTick(a);
			float health2 = victim.healthComponent.health;
			OilSystem.BurnTick(a);
			float health3 = victim.healthComponent.health;
			OilSystem.BurnTick(b);
			float health4 = victim.healthComponent.health;
			Check("Same_Owner_Burn_Deduplicated", health2 < health && Mathf.Abs(health3 - health2) < 0.001f);
			Check("Two_Owners_Both_Damage", health4 < health3, "first=" + (health - health2) + " second=" + (health3 - health4));
			ClearOil();
			NetworkServer.Destroy(((Component)m).gameObject);
			NetworkServer.Destroy(((Component)ally).gameObject);
			((BaseCharacterController)actor.characterMotor).Motor.SetPosition(home + Vector3.up, true);
			actor.characterMotor.velocity = Vector3.zero;
			slot.stock = 1;
			sage.Begin();
			yield return (object)new WaitForSeconds(0.3f);
			weapon.SetNextState((EntityState)(object)new FrogSong());
			yield return Capture("ClearShoulderChant", 1.4f, actor.corePosition + Vector3.up * 0.4f, new Vector3(0.3f, 0.3f, 2.7f));
			yield return (object)new WaitForSeconds(1.8f);
			weapon.SetNextState((EntityState)(object)new Goemon());
			yield return Capture("ClearThreeStreams", 1.6f, actor.corePosition + Vector3.forward * 1.5f, new Vector3(3.2f, 1.4f, 4.2f));
			ClearOil();
			yield return (object)new WaitForSeconds(0.3f);
			ScreenCapture.CaptureScreenshot(Path.Combine(evidence, "SageHUD.png"));
			yield return (object)new WaitForSeconds(0.3f);
			Voice.Play(actor, 24);
			yield return (object)new WaitForSeconds(0.2f);
			Check("Source_JP_Audio_Playback", Object.op_Implicit((Object)(object)((Component)actor).GetComponent<Voice>()) && Voice.Playing(((Component)actor).GetComponent<Voice>().PlayingId), "WwiseID=" + ((Component)actor).GetComponent<Voice>().PlayingId);
			GameObject chant = Voice.Chant(actor.transform);
			yield return (object)new WaitForSeconds(0.2f);
			Check("Authored_MaPa_Chant_Playback", Object.op_Implicit((Object)(object)chant) && Voice.Playing(chant.GetComponent<ChantCue>().PlayingId));
			yield return (object)new WaitForSeconds(0.3f);
		}

		private unsafe static IEnumerator MovementClose02(Vector3 home)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			FixtureAim input = ((Component)actor).GetComponent<FixtureAim>();
			SageController sage = ((Component)actor).GetComponent<SageController>();
			for (int form = 0; form < 2; form++)
			{
				if (form == 1)
				{
					((Component)actor).GetComponent<ExtraSkillLocator>().extraSecond.stock = 1;
					sage.Begin();
				}
				yield return (object)new WaitForSeconds(0.4f);
				Visual visual = ((form == 0) ? Visual.Find(actor).normal : Visual.Find(actor).sage);
				SkinnedMeshRenderer[] eyes = (from t in ((Component)visual).GetComponentsInChildren<SkinnedMeshRenderer>()
					where ((Object)t).name.Contains(" eye_")
					select t).ToArray();
				Mesh baked = new Mesh();
				Log("EYE_SURFACES " + eyes.Length);
				Camera cam = new GameObject("Eye level portrait").AddComponent<Camera>();
				((Behaviour)cam).enabled = false;
				cam.fieldOfView = 42f;
				cam.nearClipPlane = 0.03f;
				RenderTexture rt = (cam.targetTexture = new RenderTexture(1280, 720, 24));
				Texture2D tex = new Texture2D(1280, 720, (TextureFormat)3, false);
				for (int f = 0; f < 24; f++)
				{
					if (f == 12)
					{
						Visual.Find(actor).Play("Combo1", 2f);
					}
					yield return (object)new WaitForEndOfFrame();
					Vector3 val2 = Vector3.zero;
					SkinnedMeshRenderer[] array = eyes;
					foreach (SkinnedMeshRenderer val3 in array)
					{
						val3.BakeMesh(baked);
						val2 += ((Component)val3).transform.TransformPoint(baked.vertices.Aggregate(Vector3.zero, (Vector3 a, Vector3 v) => a + v) / (float)baked.vertexCount);
					}
					val2 = val2 / (float)eyes.Length - Vector3.up * 0.04f;
					((Component)cam).transform.position = val2 + new Vector3(0f, -0.08f, 0.65f);
					((Component)cam).transform.LookAt(val2);
					cam.Render();
					RenderTexture active = RenderTexture.active;
					RenderTexture.active = rt;
					tex.ReadPixels(new Rect(0f, 0f, 1280f, 720f), 0, 0);
					tex.Apply();
					File.WriteAllBytes(Path.Combine(evidence, "Eyes" + form + "_" + f.ToString("D4") + ".jpg"), ImageConversion.EncodeToJPG(tex, 95));
					RenderTexture.active = active;
					yield return (object)new WaitForSeconds(0.04f);
				}
				cam.targetTexture = null;
				Object.Destroy((Object)(object)rt);
				Object.Destroy((Object)(object)tex);
				Object.Destroy((Object)(object)((Component)cam).gameObject);
				Object.Destroy((Object)(object)baked);
				Visual.Find(actor).Release();
			}
			if (!File.Exists(Path.Combine(Media.Assets, "RUN_JIRAIYA_PUPILS_ONLY02")))
			{
				Visual.Find(actor).Play("Idle");
				yield return (object)new WaitForSeconds(0.1f);
				input.Jump = true;
				yield return Motion("SageFirstJump", 0.6f, new Vector3(4f, 0f, 1f));
				Check("Sage_First_Jump", actor.characterMotor.jumpCount == 1);
				input.Jump = false;
				yield return (object)new WaitForSeconds(0.1f);
				input.Jump = true;
				yield return Motion("SageDoubleJump", 0.7f, new Vector3(4f, 0f, 1f));
				Check("Sage_Second_Jump", actor.characterMotor.jumpCount == 2);
				input.Jump = false;
				yield return Motion("SageFall", 0.6f, new Vector3(4f, 0f, 1f));
				Check("Sage_Fall_Or_Landed", Visual.Find(actor).Current == "Fall" || (actor.characterMotor.isGrounded && Visual.Find(actor).Current == "Idle"), Visual.Find(actor).Current);
				yield return (object)new WaitForSeconds(1.2f);
				Place02(home);
				GameObject wall = GameObject.CreatePrimitive((PrimitiveType)3);
				wall.layer = LayerIndex.world.intVal;
				wall.transform.position = home + new Vector3(0f, 16f, 8f);
				wall.transform.localScale = new Vector3(45f, 32f, 1f);
				Physics.SyncTransforms();
				Place02(home + Vector3.forward * 6.8f);
				yield return (object)new WaitForSeconds(0.4f);
				input.Move = Vector3.forward;
				input.Jump = true;
				yield return (object)new WaitForSeconds(0.5f);
				WallRun climb = ((Component)actor).GetComponent<WallRun>();
				Check("Wall_Before_Shift", climb.Running);
				actor.skillLocator.utility.stock = 1;
				actor.skillLocator.utility.ExecuteIfReady();
				yield return Motion("WallShiftDetach", 0.5f, new Vector3(6f, 2f, -4f));
				bool ok = !climb.Running && actor.characterMotor.velocity.y > 0f;
				Vector3 velocity = actor.characterMotor.velocity;
				Check("Wall_Shift_Detach", ok, "velocity=" + ((object)(*(Vector3*)(&velocity))/*cast due to .constrained prefix*/).ToString());
				input.Jump = false;
				input.Move = Vector3.zero;
				Object.Destroy((Object)(object)wall);
				yield return (object)new WaitForSeconds(0.4f);
				Place02(home);
				yield return (object)new WaitForSeconds(0.5f);
				input.Jump = true;
				yield return Motion("PostWallNativeJump", 0.4f, new Vector3(4f, 0f, 1f));
				Check("Post_Wall_Native_Jump", actor.characterMotor.jumpCount == 1 && !climb.Running);
				input.Jump = false;
			}
		}

		private static IEnumerator FaceAudio02(Vector3 home)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			Check("Selected_Local_JP", actor.skinIndex == 0 && Voice.Language(actor) == "JP" && actor.isPlayerControlled && Util.HasEffectiveAuthority(((Component)actor).gameObject));
			Check("JP_Selection_Persisted", File.ReadAllText(Voice.LanguageFile) == "JP");
			SageController sage = ((Component)actor).GetComponent<SageController>();
			for (int form = 0; form < 2; form++)
			{
				if (form == 1)
				{
					((Component)actor).GetComponent<ExtraSkillLocator>().extraSecond.stock = 1;
					sage.Begin();
				}
				yield return (object)new WaitForSeconds(0.4f);
				Visual visual = ((form == 0) ? Visual.Find(actor).normal : Visual.Find(actor).sage);
				Transform head = ((Component)visual).GetComponentsInChildren<Transform>().First((Transform t) => ((Object)t).name.EndsWith(" head"));
				Camera cam = new GameObject("Animated head closeup").AddComponent<Camera>();
				((Behaviour)cam).enabled = false;
				cam.fieldOfView = 42f;
				cam.nearClipPlane = 0.03f;
				RenderTexture rt = (cam.targetTexture = new RenderTexture(1280, 720, 24));
				Texture2D tex = new Texture2D(1280, 720, (TextureFormat)3, false);
				for (int f = 0; f < 20; f++)
				{
					yield return (object)new WaitForEndOfFrame();
					Vector3 val2 = head.position + Vector3.up * 0.1f;
					((Component)cam).transform.position = val2 + new Vector3(0.05f, 0.02f, 1.35f);
					((Component)cam).transform.LookAt(val2);
					cam.Render();
					RenderTexture active = RenderTexture.active;
					RenderTexture.active = rt;
					tex.ReadPixels(new Rect(0f, 0f, 1280f, 720f), 0, 0);
					tex.Apply();
					File.WriteAllBytes(Path.Combine(evidence, "Pupils" + form + "_" + f.ToString("D4") + ".jpg"), ImageConversion.EncodeToJPG(tex, 95));
					RenderTexture.active = active;
					yield return (object)new WaitForSeconds(0.04f);
				}
				cam.targetTexture = null;
				Object.Destroy((Object)(object)rt);
				Object.Destroy((Object)(object)tex);
				Object.Destroy((Object)(object)((Component)cam).gameObject);
				string[] array = new string[12]
				{
					"Rasengan", "Mane", "Goemon", "Support", "Prepare", "Sage", "Revert", "Bark1", "Bark5", "SageBark1",
					"SageBark5", "Gamaken"
				};
				foreach (string role in array)
				{
					((Component)actor).GetComponent<Voice>()?.ResetGate();
					Voice.Play(actor, role);
					yield return (object)new WaitForSeconds(0.2f);
					Voice component = ((Component)actor).GetComponent<Voice>();
					Check("Local_JP_" + form + "_" + role, component.LastEvent == Voice.Event("JP", role, local: true) && Voice.Playing(component.PlayingId), component.LastEvent);
				}
			}
			sage.End();
			((Component)actor).GetComponent<Voice>().ResetGate();
			Voice.Play(actor, 23);
			yield return (object)new WaitForSeconds(2.5f);
			Voice.Play(actor, 24);
			yield return (object)new WaitForSeconds(0.2f);
			Check("JP_Prepare_To_Sage", ((Component)actor).GetComponent<Voice>().LastEvent == Voice.Event("JP", "Sage", local: true) && Voice.Playing(((Component)actor).GetComponent<Voice>().PlayingId));
			OilActor oilActor = OilSystem.Patch(actor, home + Vector3.right * 8f, 3f, burning: true);
			Check("Default_Burn_Unchanged", Object.op_Implicit((Object)(object)oilActor) && Mathf.Abs(oilActor.expires - oilActor.started - 12f) < 0.05f);
			ClearOil();
			AkAudioListener listener = ((IEnumerable<AkAudioListener>)Object.FindObjectsOfType<AkAudioListener>()).FirstOrDefault((Func<AkAudioListener, bool>)((AkAudioListener l) => ((Behaviour)l).isActiveAndEnabled));
			Check("World_Listener_Found", Object.op_Implicit((Object)(object)listener));
			if (Object.op_Implicit((Object)(object)listener))
			{
				CharacterMaster remote = new MasterSummon
				{
					masterPrefab = Plugin.Master,
					position = home + Vector3.right * 4f,
					rotation = Quaternion.identity,
					teamIndexOverride = (TeamIndex)1,
					ignoreTeamMemberLimit = true
				}.Perform();
				BaseAI[] components = ((Component)remote).GetComponents<BaseAI>();
				for (int num = 0; num < components.Length; num++)
				{
					((Behaviour)components[num]).enabled = false;
				}
				yield return (object)new WaitForSeconds(0.5f);
				CharacterBody body = remote.GetBody();
				TeleportHelper.TeleportBody(body, ((Component)listener).transform.position);
				yield return (object)new WaitForFixedUpdate();
				Log("WORLD_EMITTER_DISTANCE " + Vector3.Distance(body.transform.position, ((Component)listener).transform.position));
				Voice.Play(body, "Rasengan");
				yield return (object)new WaitForSeconds(0.2f);
				Check("JP_World_At_Listener", Voice.Playing(((Component)body).GetComponent<Voice>().PlayingId), ((Component)body).GetComponent<Voice>().LastEvent);
				NetworkServer.Destroy(((Component)body).gameObject);
				NetworkServer.Destroy(((Component)remote).gameObject);
			}
			CharacterMaster master = actor.master;
			actor.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo));
			yield return (object)new WaitForSeconds(0.2f);
			CharacterBody revived = master.Respawn(home + Vector3.up, Quaternion.identity, false);
			yield return (object)new WaitForSeconds(0.5f);
			Check("JP_Respawn_Persists", Object.op_Implicit((Object)(object)revived) && revived.skinIndex == 0 && Voice.Language(revived) == "JP");
		}

		private static IEnumerator FinalFixture(Vector3 home)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			GameObject ramp = GameObject.CreatePrimitive((PrimitiveType)3);
			ramp.layer = LayerIndex.world.intVal;
			ramp.transform.position = home + Vector3.forward * 16f + Vector3.up * 1.8f;
			ramp.transform.localScale = new Vector3(22f, 1f, 20f);
			ramp.transform.rotation = Quaternion.Euler(-15f, 0f, 0f);
			yield return (object)new WaitForFixedUpdate();
			OilSystem.Wave(actor, new Ray(actor.corePosition, Vector3.forward));
			yield return (object)new WaitForSeconds(0.05f);
			OilActor wave = OilSystem.Actors.FirstOrDefault((OilActor p) => Object.op_Implicit((Object)(object)p) && p.kind == 3);
			float reach = 0f;
			float rise = 0f;
			for (int i = 0; i < 15; i++)
			{
				yield return (object)new WaitForSeconds(0.1f);
				if (Object.op_Implicit((Object)(object)wave))
				{
					reach = Mathf.Max(reach, ((Component)wave).transform.position.z - home.z);
					rise = Mathf.Max(rise, ((Component)wave).transform.position.y - home.y);
				}
			}
			Check("Goemon_Slope_Traversal", reach > 28f && rise > 3f, "forward=" + reach + " height=" + rise);
			ClearOil();
			Object.Destroy((Object)(object)ramp);
			GameObject wall = GameObject.CreatePrimitive((PrimitiveType)3);
			wall.layer = LayerIndex.world.intVal;
			wall.transform.position = actor.corePosition + Vector3.forward * 3f;
			wall.transform.localScale = new Vector3(25f, 25f, 1f);
			yield return (object)new WaitForFixedUpdate();
			OilSystem.Wave(actor, new Ray(actor.corePosition, Vector3.forward));
			yield return (object)new WaitForSeconds(0.3f);
			Check("Goemon_Wall_Still_Stops", !OilSystem.Actors.Any((OilActor p) => Object.op_Implicit((Object)(object)p) && p.kind == 3));
			ClearOil();
			Object.Destroy((Object)(object)wall);
			yield return (object)new WaitForSeconds(0.1f);
			yield return MapMechanics();
		}

		private unsafe static IEnumerator MapMechanics()
		{
			((Component)actor).gameObject.AddComponent<FixtureAim>();
			actor.baseMaxHealth = 100000f;
			actor.baseRegen = 10000f;
			actor.RecalculateStats();
			actor.healthComponent.health = actor.maxHealth;
			((BaseCharacterController)actor.characterMotor).Motor.SetPosition(naturalHome + Vector3.up * 2f, true);
			actor.characterMotor.velocity = Vector3.zero;
			weapon = ((Component)actor).GetComponents<EntityStateMachine>().First((EntityStateMachine machine) => machine.customName == "Weapon");
			yield return (object)new WaitForSeconds(1f);
			ExtraSkillLocator slots = ((Component)actor).GetComponent<ExtraSkillLocator>();
			SummonOwner summon = ((Component)actor).GetComponent<SummonOwner>();
			SageController sage = ((Component)actor).GetComponent<SageController>();
			Vector3 point;
			float scale;
			bool ok = SummonActor.Placement(actor, out point, out scale);
			string text = scale.ToString();
			Vector3 val = point;
			Check("Map_Bunta_Placement", ok, "scale=" + text + " point=" + ((object)(*(Vector3*)(&val))/*cast due to .constrained prefix*/).ToString());
			CharacterMaster m = Target("BeetleMaster", Combat.Ground(point + Vector3.forward * 10f) + Vector3.up);
			yield return (object)new WaitForSeconds(0.6f);
			CharacterBody victim = (Object.op_Implicit((Object)(object)m) ? m.GetBody() : null);
			if (Object.op_Implicit((Object)(object)victim))
			{
				victim.baseMaxHealth = 100000f;
				victim.RecalculateStats();
				victim.healthComponent.health = victim.maxHealth;
			}
			float hp = (Object.op_Implicit((Object)(object)victim) ? victim.healthComponent.health : 0f);
			slots.extraFirst.stock = 1;
			summon.Bunta();
			SummonActor bunta = summon.bunta;
			yield return Capture("MapBuntaLanding", 1.2f, point + Vector3.up * 7f, new Vector3(26f, 12f, 29f));
			Check("Bunta_Landing_Damage", Object.op_Implicit((Object)(object)victim) && victim.healthComponent.health < hp);
			Vector3 before = actor.footPosition;
			for (int i = 0; i < 40; i++)
			{
				CharacterMotor characterMotor = actor.characterMotor;
				characterMotor.rootMotion += Vector3.right * 0.1f;
				yield return (object)new WaitForFixedUpdate();
			}
			Check("Bunta_Player_Free", Vector3.Distance(actor.footPosition, before) > 1f && ((Component)bunta).GetComponentsInCh