using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Logging; using EntityStates; using GojoSatoruMod.Components; using GojoSatoruMod.Content; using GojoSatoruMod.States; using GojoSatoruMod.Visuals; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Utils; using RoR2; using RoR2.CharacterAI; using RoR2.Skills; using UnityEngine; using UnityEngine.Networking; using UnityEngine.Rendering; [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("YujiItadori")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.2.1.0")] [assembly: AssemblyInformationalVersion("1.2.1+fd97d1e734adcd9e1245285b6bc69f1c40353929")] [assembly: AssemblyProduct("YujiItadori")] [assembly: AssemblyTitle("YujiItadori")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.2.1.0")] [module: UnverifiableCode] namespace GojoSatoruMod.Yuji { [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency("dev.marmennz.satorugojo", "1.2.1")] [BepInPlugin("dev.marmennz.yujiitadori", "Yuji Itadori", "1.2.1")] public sealed class YujiPlugin : BaseUnityPlugin { public const string PluginGuid = "dev.marmennz.yujiitadori"; public const string PluginVersion = "1.2.1"; public const string PluginName = "Yuji Itadori"; private void Awake() { JujutsuStartup.UseHost((MonoBehaviour)(object)this); JujutsuAssetPaths.AddPlugin(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location)); JujutsuStartup.Step("Yuji's text", (Action)YujiLanguage.Register); JujutsuStartup.Step("Yuji's assets", (Action)YujiAssets.Initialize); JujutsuStartup.Step("Yuji's voice", (Func)YujiAssets.LoadVoices); JujutsuStartup.Step("Yuji's flow buff", (Action)YujiBuffs.Register); JujutsuStartup.Step("Yuji's vessel", (Action)YujiVessel.Initialize); JujutsuStartup.Step("Yuji's flow", (Action)delegate { JujutsuHitSync.Register("yuji-flow-claim", 12f, (Action)YujiVessel.LandFlow); }); JujutsuStartup.Survivor("Yuji", (Action)YujiSurvivor.Initialize); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Yuji Itadori 1.2.1 loaded."); } } internal static class GeneratedVersion { internal const string Value = "1.2.1"; } } namespace GojoSatoruMod.Visuals { internal static class YujiExtraSkins { private sealed class Part { internal string Name; internal int Outfit; internal string Texture; internal bool IsCutout; internal Vector3[] Vertices; internal Vector3[] Normals; internal Vector2[] Uvs; internal BoneWeight[] Weights; internal int[] Triangles; } private const string ModelFileName = "yuji-skins.model"; private const string TextureDirectoryName = "yuji-skins"; private static readonly string[] SkinNames = new string[6] { "SECOND", "THIRD", "FOURTH", "FIFTH", "SIXTH", "SEVENTH" }; private static readonly (Color Primary, Color Secondary)[] SkinIconColors = new(Color, Color)[6] { (new Color(0.9f, 0.42f, 0.3f), new Color(0.28f, 0.11f, 0.09f)), (new Color(0.62f, 0.66f, 0.72f), new Color(0.18f, 0.2f, 0.24f)), (new Color(0.45f, 0.58f, 0.86f), new Color(0.13f, 0.17f, 0.29f)), (new Color(0.78f, 0.72f, 0.36f), new Color(0.24f, 0.21f, 0.1f)), (new Color(0.36f, 0.62f, 0.45f), new Color(0.11f, 0.2f, 0.14f)), (new Color(0.07f, 0.09f, 0.2f), new Color(0.62f, 0.1f, 0.09f)) }; private static readonly Dictionary textureCache = new Dictionary(); private static string[] boneNames; private static Matrix4x4[] rest; private static List parts; private static readonly HashSet applied = new HashSet(); private static bool reportedMaterial; internal static void RegisterOnPrefab(GameObject bodyPrefab) { try { ModelSkinController val = (Object.op_Implicit((Object)(object)bodyPrefab) ? bodyPrefab.GetComponentInChildren(true) : null); if (!Object.op_Implicit((Object)(object)val)) { return; } if (!File.Exists(JujutsuAssetPaths.Find(new string[2] { "assets", "yuji-skins.model" }))) { Plugin.Log.LogInfo((object)"Yuji extra skins: yuji-skins.model is absent, so only his own outfit is offered."); return; } Transform val2 = (Object.op_Implicit((Object)(object)val.characterModel) ? ((Component)val.characterModel).transform : ((Component)val).transform); GameObject[] array = (GameObject[])(object)new GameObject[SkinNames.Length]; for (int i = 0; i < array.Length; i++) { array[i] = MakeGroup(val2, "YujiOutfit" + SkinNames[i]); array[i].SetActive(false); } GameObject val3 = MakeGroup(val2, "YujiOutfitDEFAULT"); val3.SetActive(true); SkinnedMeshRenderer[] componentsInChildren = ((Component)val2).GetComponentsInChildren(true); foreach (SkinnedMeshRenderer val4 in componentsInChildren) { if ((Object)(object)((Component)val4).gameObject != (Object)(object)val3 && !IsInside(((Component)val4).transform, array) && !((Component)val4).transform.IsChildOf(val3.transform)) { ((Component)val4).transform.SetParent(val3.transform, true); } } List ownMeshes = new List { val3 }; List list = new List { BuildSkin("DEFAULT", -1, 0, ((Component)val2).gameObject, array, ownMeshes) }; for (int k = 0; k < array.Length; k++) { list.Add(BuildSkin(SkinNames[k], k, k + 1, ((Component)val2).gameObject, array, ownMeshes)); } val.skins = list.ToArray(); Plugin.Log.LogInfo((object)($"Yuji extra skins: registered {list.Count} skins on " + ((Object)bodyPrefab).name + ".")); } catch (Exception arg) { Plugin.Log.LogError((object)$"Yuji extra skins could not be registered: {arg}"); } } private static void ReportRest(Transform[] bones, Transform root) { //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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0150: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) Matrix4x4 worldToLocalMatrix = root.worldToLocalMatrix; string[] array = new string[6] { "mixamorig:Hips", "mixamorig:Spine", "mixamorig:Head", "mixamorig:LeftArm", "mixamorig:LeftHand", "mixamorig:LeftFoot" }; foreach (string text in array) { int num = Array.IndexOf(boneNames, text); if (num >= 0 && Object.op_Implicit((Object)(object)bones[num])) { Vector3 val = ((Matrix4x4)(ref worldToLocalMatrix)).MultiplyPoint3x4(bones[num].position); Vector3 val2 = Vector4.op_Implicit(((Matrix4x4)(ref rest[num])).GetColumn(3)); Matrix4x4 val3 = worldToLocalMatrix * bones[num].localToWorldMatrix; Vector3 val4 = Vector4.op_Implicit(((Matrix4x4)(ref val3)).GetColumn(2)); val3 = worldToLocalMatrix * bones[num].localToWorldMatrix; float num2 = Quaternion.Angle(Quaternion.LookRotation(val4, Vector4.op_Implicit(((Matrix4x4)(ref val3)).GetColumn(1))), Quaternion.LookRotation(Vector4.op_Implicit(((Matrix4x4)(ref rest[num])).GetColumn(2)), Vector4.op_Implicit(((Matrix4x4)(ref rest[num])).GetColumn(1)))); Plugin.Log.LogInfo((object)("Yuji extra skins: " + text + " live=" + $"({val.x:0.000},{val.y:0.000},{val.z:0.000}) file=" + $"({val2.x:0.000},{val2.y:0.000},{val2.z:0.000}) " + $"twist={num2:0.0} deg")); } } } private static GameObject MakeGroup(Transform root, string name) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) Transform val = root.Find(name); object obj = (Object.op_Implicit((Object)(object)val) ? ((object)((Component)val).gameObject) : ((object)new GameObject(name))); ((GameObject)obj).layer = ((Component)root).gameObject.layer; ((GameObject)obj).transform.SetParent(root, false); return (GameObject)obj; } private static bool IsInside(Transform candidate, GameObject[] groups) { foreach (GameObject val in groups) { if (candidate.IsChildOf(val.transform)) { return true; } } return false; } private static SkinDef BuildSkin(string skinName, int shown, int colorIndex, GameObject root, GameObject[] groups, List ownMeshes) { //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) SkinDef val = ScriptableObject.CreateInstance(); ((Object)val).name = "skinYuji" + skinName; val.nameToken = "CODEX_YUJI_SKIN_" + skinName + "_NAME"; int index = Mathf.Clamp(colorIndex, 0, SkinIconColors.Length - 1); val.icon = GojoAssets.LoadIcon("yuji-skin-" + skinName.ToLowerInvariant(), (Func)(() => GojoAssets.CreateSkinIcon("texYujiSkin" + skinName, SkinIconColors[index].Primary, SkinIconColors[index].Secondary))); val.rootObject = root; val.baseSkins = Array.Empty(); val.unlockableDef = null; SkinDefParams val2 = ScriptableObject.CreateInstance(); ((Object)val2).name = "skinParamsYuji" + skinName; val2.rendererInfos = Array.Empty(); val2.meshReplacements = Array.Empty(); val2.projectileGhostReplacements = Array.Empty(); val2.minionSkinReplacements = Array.Empty(); List list = new List(); for (int num = 0; num < groups.Length; num++) { list.Add(new GameObjectActivation { gameObject = groups[num], shouldActivate = (num == shown) }); } foreach (GameObject ownMesh in ownMeshes) { list.Add(new GameObjectActivation { gameObject = ownMesh, shouldActivate = (shown < 0) }); } val2.gameObjectActivations = list.ToArray(); val.skinDefParams = val2; val.Bake(); return val; } internal static void Apply(CharacterModel characterModel) { try { if (!Object.op_Implicit((Object)(object)characterModel)) { return; } GameObject[] array = FindGroups(characterModel); if (array == null || !Load() || !applied.Add(((Object)characterModel).GetInstanceID())) { return; } SkinnedMeshRenderer val = FindTemplate(characterModel); if (!Object.op_Implicit((Object)(object)val)) { Plugin.Log.LogWarning((object)"Yuji extra skins: the rig has no skinned renderer to take a material from. Skipped."); return; } int found; Transform[] bones = ResolveBones(characterModel, out found); Plugin.Log.LogInfo((object)($"Yuji extra skins: {found} of {boneNames.Length} bones " + "found on the live rig by name.")); if (found < boneNames.Length / 2) { Plugin.Log.LogWarning((object)"Yuji extra skins: too few bones resolved. Skipped."); return; } MeasureAgainstRig(bones, ((Component)characterModel).transform, out var bindPoses, out var offsets, out var scale); ReportRest(bones, ((Component)characterModel).transform); int num = 0; float[] array2 = new float[array.Length]; for (int i = 0; i < array2.Length; i++) { array2[i] = float.MinValue; } foreach (Part part in parts) { if ((uint)part.Outfit < (uint)array.Length) { float num2 = BuildRenderer(part, bones, bindPoses, offsets, scale, val, array[part.Outfit].transform); if (!IsDecal(part) && num2 > array2[part.Outfit]) { array2[part.Outfit] = num2; } num++; } } JujutsuNeckFit.NoteOutfitHeights(array2); Plugin.Log.LogInfo((object)($"Yuji extra skins: built {num} outfit renderers on " + ((Object)characterModel).name + ".")); } catch (Exception arg) { Plugin.Log.LogError((object)$"Yuji extra skins could not be applied: {arg}"); } } private static SkinnedMeshRenderer FindTemplate(CharacterModel characterModel) { SkinnedMeshRenderer val = null; SkinnedMeshRenderer[] componentsInChildren = ((Component)characterModel).GetComponentsInChildren(true); foreach (SkinnedMeshRenderer val2 in componentsInChildren) { if (Object.op_Implicit((Object)(object)val2.sharedMesh) && !((Object)(object)((Renderer)val2).sharedMaterial == (Object)null) && ((Object)(object)val == (Object)null || val2.sharedMesh.vertexCount > val.sharedMesh.vertexCount)) { val = val2; } } return val; } private static GameObject[] FindGroups(CharacterModel characterModel) { GameObject[] array = (GameObject[])(object)new GameObject[SkinNames.Length]; for (int i = 0; i < array.Length; i++) { Transform val = ((Component)characterModel).transform.Find("YujiOutfit" + SkinNames[i]); if (!Object.op_Implicit((Object)(object)val)) { return null; } array[i] = ((Component)val).gameObject; } return array; } private static Transform[] ResolveBones(CharacterModel characterModel, out int found) { Dictionary dictionary = new Dictionary(StringComparer.Ordinal); Transform[] componentsInChildren = ((Component)characterModel).GetComponentsInChildren(true); foreach (Transform val in componentsInChildren) { if (!dictionary.ContainsKey(((Object)val).name)) { dictionary[((Object)val).name] = val; } } found = 0; Transform[] array = (Transform[])(object)new Transform[boneNames.Length]; for (int j = 0; j < boneNames.Length; j++) { if (dictionary.TryGetValue(boneNames[j], out var value)) { array[j] = value; found++; continue; } foreach (KeyValuePair item in dictionary) { if (item.Key.EndsWith(boneNames[j], StringComparison.Ordinal)) { array[j] = item.Value; found++; break; } } if (!Object.op_Implicit((Object)(object)array[j])) { array[j] = ((Component)characterModel).transform; } } return array; } private static Vector3 ToRigSpace(Vector3 stored) { //IL_0000: 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_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) return new Vector3(stored.x, stored.z, 0f - stored.y); } private static float MeasureScale(Transform[] bones, Matrix4x4 toRoot) { //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) //IL_0056: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) int num = Array.IndexOf(boneNames, "mixamorig:Hips"); int num2 = Array.IndexOf(boneNames, "mixamorig:Head"); if (num < 0 || num2 < 0 || !Object.op_Implicit((Object)(object)bones[num]) || !Object.op_Implicit((Object)(object)bones[num2])) { return 1f; } float num3 = Vector3.Distance(((Matrix4x4)(ref toRoot)).MultiplyPoint3x4(bones[num].position), ((Matrix4x4)(ref toRoot)).MultiplyPoint3x4(bones[num2].position)); float num4 = Vector3.Distance(Vector4.op_Implicit(((Matrix4x4)(ref rest[num])).GetColumn(3)), Vector4.op_Implicit(((Matrix4x4)(ref rest[num2])).GetColumn(3))); if (!(num4 > 0.0001f)) { return 1f; } return num3 / num4; } private static void MeasureAgainstRig(Transform[] bones, Transform root, out Matrix4x4[] bindPoses, out Vector3[] offsets, out float scale) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: 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_003a: 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_0043: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_0074: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) bindPoses = (Matrix4x4[])(object)new Matrix4x4[bones.Length]; offsets = (Vector3[])(object)new Vector3[bones.Length]; Matrix4x4 worldToLocalMatrix = root.worldToLocalMatrix; scale = MeasureScale(bones, worldToLocalMatrix); for (int i = 0; i < bones.Length; i++) { Matrix4x4 val = (Object.op_Implicit((Object)(object)bones[i]) ? (worldToLocalMatrix * bones[i].localToWorldMatrix) : Matrix4x4.identity); bindPoses[i] = ((Matrix4x4)(ref val)).inverse; offsets[i] = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(3)) - ToRigSpace(Vector4.op_Implicit(((Matrix4x4)(ref rest[i])).GetColumn(3))) * scale; } Plugin.Log.LogInfo((object)($"Yuji extra skins: outfits scaled by {scale:0.000} onto the " + "rig, Z-up taken to Y-up.")); } private static float BuildRenderer(Part part, Transform[] bones, Matrix4x4[] bindPoses, Vector3[] offsets, float scale, SkinnedMeshRenderer template, Transform parent) { //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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0104: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: 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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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) int num = part.Vertices.Length; Mesh val = new Mesh { name = "meshYuji_" + part.Name, indexFormat = (IndexFormat)(num > 65000) }; Vector3[] array = (Vector3[])(object)new Vector3[num]; Vector3[] array2 = (Vector3[])(object)new Vector3[num]; float num2 = float.MinValue; for (int i = 0; i < num; i++) { BoneWeight val2 = part.Weights[i]; Vector3 val3 = offsets[((BoneWeight)(ref val2)).boneIndex0] * ((BoneWeight)(ref val2)).weight0 + offsets[((BoneWeight)(ref val2)).boneIndex1] * ((BoneWeight)(ref val2)).weight1 + offsets[((BoneWeight)(ref val2)).boneIndex2] * ((BoneWeight)(ref val2)).weight2 + offsets[((BoneWeight)(ref val2)).boneIndex3] * ((BoneWeight)(ref val2)).weight3; float num3 = ((BoneWeight)(ref val2)).weight0 + ((BoneWeight)(ref val2)).weight1 + ((BoneWeight)(ref val2)).weight2 + ((BoneWeight)(ref val2)).weight3; array[i] = ToRigSpace(part.Vertices[i]) * scale + ((num3 > 0.0001f) ? (val3 / num3) : Vector3.zero); array2[i] = ToRigSpace(part.Normals[i]); if (array[i].y > num2) { num2 = array[i].y; } } val.vertices = array; val.normals = array2; val.uv = part.Uvs; val.boneWeights = part.Weights; val.bindposes = bindPoses; val.triangles = part.Triangles; val.RecalculateBounds(); GameObject val4 = new GameObject(part.Name) { layer = ((Component)parent).gameObject.layer }; val4.transform.SetParent(parent, false); SkinnedMeshRenderer obj = val4.AddComponent(); obj.sharedMesh = val; obj.bones = bones; obj.rootBone = ((bones.Length != 0 && Object.op_Implicit((Object)(object)bones[0])) ? bones[0] : parent); ((Renderer)obj).sharedMaterial = BuildMaterial(template, part); obj.quality = (SkinQuality)4; obj.updateWhenOffscreen = true; return num2; } private static Material BuildMaterial(SkinnedMeshRenderer template, Part part) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) Material val = Object.Instantiate(((Renderer)template).sharedMaterial); ((Object)val).name = "matYujiSkin_" + part.Name; Texture2D val2 = LoadTexture(part.Texture); if (val.HasProperty("_MainTex")) { val.SetTexture("_MainTex", (Texture)(object)val2); } if (val.HasProperty("_Color")) { val.SetColor("_Color", Color.white); } if (part.IsCutout && val.HasProperty("_EnableCutout")) { val.SetFloat("_EnableCutout", 1f); } if (IsDecal(part)) { val.SetFloat("_EnableCutout", 1f); val.EnableKeyword("CUTOUT"); ReportMaterial(val, part); } return val; } private static void ReportMaterial(Material material, Part part) { //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) if (!reportedMaterial) { reportedMaterial = true; string[] obj = new string[8] { "_EnableCutout", "_Cutoff", "_Mode", "_SrcBlend", "_DstBlend", "_ZWrite", "_MainTex", "_Color" }; StringBuilder stringBuilder = new StringBuilder(); string[] array = obj; foreach (string text in array) { stringBuilder.Append(text).Append('=').Append(material.HasProperty(text) ? "yes " : "no "); } Texture val = (material.HasProperty("_MainTex") ? material.GetTexture("_MainTex") : null); ManualLogSource log = Plugin.Log; string[] obj2 = new string[11] { "Yuji extra skins: decal '", part.Name, "' texture '", part.Texture, "' loaded=", Object.op_Implicit((Object)(object)val) ? (val.width + "x" + val.height) : "none", " format=", null, null, null, null }; Texture2D val2 = (Texture2D)(object)((val is Texture2D) ? val : null); obj2[7] = ((val2 != null) ? ((object)val2.format/*cast due to .constrained prefix*/).ToString() : "?"); obj2[8] = " "; Shader shader = material.shader; obj2[9] = $"shader '{((shader != null) ? ((Object)shader).name : null)}' queue={material.renderQueue} "; obj2[10] = string.Format("props: {0}keywords: {1}", stringBuilder, string.Join(",", material.shaderKeywords)); log.LogInfo((object)string.Concat(obj2)); } } private static bool IsDecal(Part part) { return part.Name.IndexOf("decal", StringComparison.OrdinalIgnoreCase) >= 0; } private static Texture2D LoadTexture(string textureName) { if (string.IsNullOrEmpty(textureName)) { return Texture2D.whiteTexture; } if (textureCache.TryGetValue(textureName, out var value) && Object.op_Implicit((Object)(object)value)) { return value; } string text = JujutsuAssetPaths.Find(new string[3] { "assets", "yuji-skins", textureName }); bool flag = File.Exists(text); TextureAudit.Record("yuji-skins", textureName, flag); if (!flag) { Plugin.Log.LogWarning((object)("Yuji skin texture was not found: " + text)); return Texture2D.whiteTexture; } Texture2D val = JujutsuTextures.Load(text, "texYujiSkin_" + Path.GetFileNameWithoutExtension(textureName), (TextureWrapMode)1, false); if (!Object.op_Implicit((Object)(object)val)) { Plugin.Log.LogWarning((object)("Yuji skin texture could not be decoded: " + text)); return Texture2D.whiteTexture; } textureCache[textureName] = val; return val; } private static bool Load() { //IL_00eb: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: 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_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0165: 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_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) if (parts != null) { return parts.Count > 0; } parts = new List(); string path = JujutsuAssetPaths.Find(new string[2] { "assets", "yuji-skins.model" }); if (!File.Exists(path)) { Plugin.Log.LogInfo((object)"Yuji extra skins: yuji-skins.model is absent."); return false; } using FileStream input = File.OpenRead(path); using BinaryReader binaryReader = new BinaryReader(input); if (new string(binaryReader.ReadChars(8)) != "SUKNMDL1") { throw new InvalidDataException("Yuji skin model header is invalid."); } int num = binaryReader.ReadInt32(); if (num != 2) { throw new InvalidDataException($"Unsupported Yuji skin model version {num}."); } int num2 = binaryReader.ReadInt32(); boneNames = new string[num2]; int[] array = new int[num2]; Matrix4x4[] array2 = (Matrix4x4[])(object)new Matrix4x4[num2]; for (int i = 0; i < num2; i++) { boneNames[i] = binaryReader.ReadString(); array[i] = binaryReader.ReadInt32(); Vector3 val = ReadVector3(binaryReader); Quaternion val2 = ReadQuaternion(binaryReader); Vector3 val3 = ReadVector3(binaryReader); array2[i] = Matrix4x4.TRS(val, val2, val3); } rest = (Matrix4x4[])(object)new Matrix4x4[num2]; for (int j = 0; j < num2; j++) { rest[j] = ((array[j] < 0) ? array2[j] : (rest[array[j]] * array2[j])); } int num3 = binaryReader.ReadInt32(); for (int k = 0; k < num3; k++) { Part part = new Part { Name = binaryReader.ReadString(), Outfit = binaryReader.ReadInt32() }; binaryReader.ReadString(); part.Texture = binaryReader.ReadString(); part.IsCutout = binaryReader.ReadBoolean(); int num4 = binaryReader.ReadInt32(); part.Vertices = (Vector3[])(object)new Vector3[num4]; part.Normals = (Vector3[])(object)new Vector3[num4]; part.Uvs = (Vector2[])(object)new Vector2[num4]; part.Weights = (BoneWeight[])(object)new BoneWeight[num4]; for (int l = 0; l < num4; l++) { part.Vertices[l] = ReadVector3(binaryReader); part.Normals[l] = ReadVector3(binaryReader); part.Uvs[l] = new Vector2(binaryReader.ReadSingle(), binaryReader.ReadSingle()); BoneWeight[] weights = part.Weights; int num5 = l; BoneWeight val4 = default(BoneWeight); ((BoneWeight)(ref val4)).boneIndex0 = binaryReader.ReadInt32(); ((BoneWeight)(ref val4)).boneIndex1 = binaryReader.ReadInt32(); ((BoneWeight)(ref val4)).boneIndex2 = binaryReader.ReadInt32(); ((BoneWeight)(ref val4)).boneIndex3 = binaryReader.ReadInt32(); ((BoneWeight)(ref val4)).weight0 = binaryReader.ReadSingle(); ((BoneWeight)(ref val4)).weight1 = binaryReader.ReadSingle(); ((BoneWeight)(ref val4)).weight2 = binaryReader.ReadSingle(); ((BoneWeight)(ref val4)).weight3 = binaryReader.ReadSingle(); weights[num5] = val4; } int num6 = binaryReader.ReadInt32(); part.Triangles = new int[num6]; for (int m = 0; m < num6; m++) { part.Triangles[m] = binaryReader.ReadInt32(); } if ((uint)part.Outfit < (uint)SkinNames.Length) { parts.Add(part); } } Plugin.Log.LogInfo((object)($"Yuji extra skins: loaded {parts.Count} mesh part(s) over " + $"{num2} bones.")); return parts.Count > 0; } private static Vector3 ReadVector3(BinaryReader reader) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) return new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); } private static Quaternion ReadQuaternion(BinaryReader reader) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) return new Quaternion(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); } } internal sealed class YujiFlowGlow : MonoBehaviour { private sealed class Palm { private Transform hand; private TrailRenderer[] trails; private Material[] materials; private Color[] tints; private float[] glows; private Transform follower; private ParticleSystem embers; private float span; private bool showing; internal bool Alive { get { if (trails == null || !Object.op_Implicit((Object)(object)hand) || !Object.op_Implicit((Object)(object)follower)) { return false; } for (int i = 0; i < trails.Length; i++) { if (!Object.op_Implicit((Object)(object)trails[i])) { return false; } } return true; } } internal static Palm Build(Transform bone, float palm) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_0088: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)bone)) { return null; } Palm palm2 = new Palm { hand = bone, span = palm, trails = (TrailRenderer[])(object)new TrailRenderer[TrailSeconds.Length], materials = (Material[])(object)new Material[TrailSeconds.Length], tints = (Color[])(object)new Color[TrailSeconds.Length], glows = new float[TrailSeconds.Length] }; Color colour = Color.Lerp(YujiBuffs.Colour, Color.white, 0.12f); colour.a = 0.32f; float x = bone.lossyScale.x; float num = ((x > 0.0001f) ? (palm * 0.5f / x) : (palm * 0.5f)); Vector3 offset = PalmDirection(bone) * num; for (int i = 0; i < TrailSeconds.Length; i++) { palm2.MakeTrail(i, (JujutsuFxLayer)i, colour, offset, x); } GameObject val = new GameObject("YujiFlowEmber"); val.transform.position = bone.position; palm2.follower = val.transform; return palm2; } private unsafe void MakeTrail(int layer, JujutsuFxLayer which, Color colour, Vector3 offset, float handScale) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_012b: Expected O, but got Unknown //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0171: 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_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("YujiFlowTrail" + ((object)(*(JujutsuFxLayer*)(&which))/*cast due to .constrained prefix*/).ToString()); val.transform.SetParent(hand, false); val.transform.localPosition = offset; TrailRenderer val2 = val.AddComponent(); JujutsuFxMaterials.PrepareRenderer((Renderer)(object)val2); Color val3 = YujiFx.LayerTint(colour, which); float num = JujutsuFxMaterials.GlowFor(which); Material val4 = (((Renderer)val2).sharedMaterial = JujutsuFxMaterials.CreateLineMaterial("matYujiFlowTrail" + ((object)(*(JujutsuFxLayer*)(&which))/*cast due to .constrained prefix*/).ToString(), val3, num, JujutsuFxTextures.Streak)); if (Object.op_Implicit((Object)(object)val4)) { JujutsuFxMaterials.Claim(val, val4); } val2.time = TrailSeconds[layer]; val2.minVertexDistance = 0.02f; val2.numCornerVertices = 3; val2.numCapVertices = 3; val2.autodestruct = false; val2.textureMode = (LineTextureMode)0; val2.alignment = (LineAlignment)0; float num2 = span * TrailWidthOfPalm[layer]; val2.widthMultiplier = ((handScale > 0.0001f) ? (num2 / handScale) : num2); val2.widthCurve = JujutsuEase.Curve((Func)((float t) => 1f - JujutsuEase.InCubic(t)), 8); Gradient val6 = new Gradient(); val6.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(Color.white, 0f), new GradientColorKey(Color.white, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.72f, 0.35f), new GradientAlphaKey(0f, 1f) }); val2.colorGradient = val6; trails[layer] = val2; materials[layer] = val4; tints[layer] = val3; glows[layer] = num; } internal void Follow(float level) { //IL_0026: 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) if (Object.op_Implicit((Object)(object)follower) && Object.op_Implicit((Object)(object)hand)) { follower.position = hand.position; } if (materials == null) { return; } for (int i = 0; i < materials.Length; i++) { if (Object.op_Implicit((Object)(object)materials[i])) { JujutsuFxMaterials.SetEnvelope(materials[i], tints[i], level, glows[i]); } } } internal void Show(bool on) { //IL_010b: 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_0115: 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_007d: 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_00cc: Unknown result type (might be due to invalid IL or missing references) if (showing == on) { return; } showing = on; if (trails != null) { for (int i = 0; i < trails.Length; i++) { if (Object.op_Implicit((Object)(object)trails[i])) { ((Component)trails[i]).gameObject.SetActive(on); if (on) { trails[i].Clear(); } } } } if (!Object.op_Implicit((Object)(object)hand)) { return; } if (on) { YujiFx.Ignite(hand.position, YujiBuffs.Colour, Mathf.Max(0.22f, span * 4.5f)); if (Object.op_Implicit((Object)(object)follower)) { follower.position = hand.position; embers = JujutsuMotes.Attach(follower, YujiBuffs.Colour, Mathf.Max(0.25f, span * 3f), (JujutsuMoteKind)0); } } else { JujutsuMotes.Stop(embers); embers = null; JujutsuMotes.Burst(hand.position, Vector3.up, YujiBuffs.Colour, Mathf.Max(0.25f, span * 3f), (JujutsuMoteKind)0, 6); } } internal void Discard() { JujutsuMotes.Stop(embers); embers = null; if (trails != null) { for (int i = 0; i < trails.Length; i++) { if (Object.op_Implicit((Object)(object)trails[i])) { Object.Destroy((Object)(object)((Component)trails[i]).gameObject); } } } trails = null; materials = null; if (Object.op_Implicit((Object)(object)follower)) { Object.Destroy((Object)(object)((Component)follower).gameObject); } follower = null; showing = false; } } private const float AlongPalm = 0.5f; private const float AssumedPalm = 0.09f; private static readonly float[] TrailSeconds = new float[3] { 0.09f, 0.13f, 0.21f }; private static readonly float[] TrailWidthOfPalm = new float[3] { 0.26f, 0.52f, 0.98f }; private const float TrailStep = 0.02f; private const float TrailSolidity = 0.32f; private const float FlickerLow = 0.62f; private const float FlickerRate = 9.3f; private static bool reported; private CharacterBody body; private Palm left; private Palm right; private bool lit; private void Awake() { body = ((Component)this).GetComponent(); } private void OnDisable() { Show(on: false); } private void OnDestroy() { Drop(); } private void Update() { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)YujiBuffs.Flow) || !body.HasBuff(YujiBuffs.Flow)) { Show(on: false); return; } if (!Standing(left) || !Standing(right)) { Drop(); if (!Build()) { return; } } Show(on: true); Drive(); } private void Drive() { float time = Time.time; Glow(left, JujutsuEase.FlickerScaled(time, 0.62f, 9.3f)); Glow(right, JujutsuEase.FlickerScaled(time + 0.37f, 0.62f, 9.3f)); } private static void Glow(Palm palm, float level) { palm?.Follow(level); } private bool Build() { //IL_00df: Unknown result type (might be due to invalid IL or missing references) Transform val = default(Transform); Transform bone = default(Transform); if (!JujutsuBones.TryFindHands(body, ref val, ref bone)) { return false; } float num = MeasurePalm(val); left = Palm.Build(val, num); right = Palm.Build(bone, num); if (!reported) { reported = true; Transform val2 = Knuckle(val); Plugin.Log.LogInfo((object)($"Yuji flow trail: palm measured at {num:0.000} m from " + "'" + ((Object)val).name + "' to '" + (Object.op_Implicit((Object)(object)val2) ? ((Object)val2).name : "nothing") + "', three layers " + $"up to {num * TrailWidthOfPalm[2]:0.000} m wide hung " + $"{num * 0.5f:0.000} m along it at " + $"{PalmDirection(val)} in the bone's space.")); } if (Standing(left)) { return Standing(right); } return false; } private static bool Standing(Palm palm) { return palm?.Alive ?? false; } private static float MeasurePalm(Transform hand) { //IL_0017: 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) Transform val = Knuckle(hand); float num = (Object.op_Implicit((Object)(object)val) ? Vector3.Distance(hand.position, val.position) : 0f); if (num > 0.001f) { return num; } Plugin.Log.LogWarning((object)("Yuji flow trail: '" + ((Object)hand).name + "' has no finger to measure the " + $"palm with, so {0.09f:0.000} m is assumed. The trail " + "will be the wrong width on a rig scaled differently.")); return 0.09f; } private static Transform Knuckle(Transform hand) { //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) Transform val = null; for (int i = 0; i < hand.childCount; i++) { Transform child = hand.GetChild(i); if (((Object)child).name.IndexOf("Middle", StringComparison.OrdinalIgnoreCase) >= 0) { return child; } if (!Object.op_Implicit((Object)(object)val)) { Vector3 localPosition = child.localPosition; if (((Vector3)(ref localPosition)).sqrMagnitude > 1E-06f) { val = child; } } } return val; } private static Vector3 PalmDirection(Transform hand) { //IL_0017: 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_001c: 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_002b: Unknown result type (might be due to invalid IL or missing references) Transform val = Knuckle(hand); Vector3 val2 = (Object.op_Implicit((Object)(object)val) ? val.localPosition : Vector3.zero); if (!(((Vector3)(ref val2)).sqrMagnitude > 1E-06f)) { return Vector3.up; } return ((Vector3)(ref val2)).normalized; } private void Show(bool on) { if (lit != on) { lit = on; Switch(left, on); Switch(right, on); } } private static void Switch(Palm palm, bool on) { palm?.Show(on); } private void Drop() { if (left != null) { left.Discard(); left = null; } if (right != null) { right.Discard(); right = null; } lit = false; } } internal static class YujiFx { private sealed class Piece { internal GameObject Item; internal Mesh Mesh; internal Material Material; internal Color Tint; internal float Glow; internal void Fade(float alpha) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Material)) { JujutsuFxMaterials.SetEnvelope(Material, Tint, alpha, Glow); } } internal void Size(float metres) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Item)) { Item.transform.localScale = Vector3.one * Mathf.Max(0.0001f, metres); } } internal void Under(Transform parent) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Item) && Object.op_Implicit((Object)(object)parent)) { Item.transform.SetParent(parent, false); Item.transform.localPosition = Vector3.zero; } } } private sealed class Snip { internal Piece Marks; internal Piece Seam; internal Piece Upper; internal Piece Lower; internal Transform Rig; internal Vector3 From; internal Vector3 Run; internal Vector3 Face; internal float Lead; } private sealed class GroundRing { private readonly JujutsuGroundField field; private readonly Vector3 centre; internal float Reach; internal float Lift; internal Func Height { get; } internal GroundRing(JujutsuGroundField sampled, Vector3 around) { //IL_000e: 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) field = sampled; centre = around; Height = Sample; } private float Sample(float angle) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (field == null) { return 0f; } return field.PointAt(angle, Reach, Lift).y - centre.y; } } private sealed class MeshKeeper : MonoBehaviour { private Mesh mesh; internal void Own(Mesh owned) { mesh = owned; } private void OnDestroy() { if (Object.op_Implicit((Object)(object)mesh)) { Object.Destroy((Object)(object)mesh); } } } internal sealed class Wake : MonoBehaviour { private CharacterBody body; private Material[] materials; private Color[] tints; private float[] glows; private ParticleSystem embers; private float until; private float drain; private float closedAt; private bool closed; internal unsafe static Wake Open(CharacterBody caster, Color colour, float width, float seconds) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00ce: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: 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_027d: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("YujiWake"); val.transform.position = caster.corePosition; Wake wake = val.AddComponent(); wake.body = caster; wake.until = Time.time + Mathf.Max(0.05f, seconds); wake.materials = (Material[])(object)new Material[3]; wake.tints = (Color[])(object)new Color[3]; wake.glows = new float[3]; float[] array = new float[3] { 0.14f, 0.2f, 0.3f }; float[] array2 = new float[3] { 0.34f, 0.7f, 1.25f }; for (int i = 0; i < 3; i++) { GameObject val2 = new GameObject("YujiWakeLayer" + i); val2.transform.SetParent(val.transform, false); TrailRenderer val3 = val2.AddComponent(); JujutsuFxMaterials.PrepareRenderer((Renderer)(object)val3); JujutsuFxLayer val4 = (JujutsuFxLayer)i; Color val5 = LayerTint(colour, val4); float num = JujutsuFxMaterials.GlowFor(val4); Material val6 = (((Renderer)val3).sharedMaterial = JujutsuFxMaterials.CreateLineMaterial("matYujiWake" + ((object)(*(JujutsuFxLayer*)(&val4))/*cast due to .constrained prefix*/).ToString(), val5, num, JujutsuFxTextures.Streak)); if (Object.op_Implicit((Object)(object)val6)) { JujutsuFxMaterials.Claim(val2, val6); } val3.time = array[i]; val3.minVertexDistance = 0.12f; val3.numCornerVertices = 2; val3.numCapVertices = 3; val3.autodestruct = false; val3.textureMode = (LineTextureMode)0; val3.alignment = (LineAlignment)0; val3.widthMultiplier = width * array2[i]; val3.widthCurve = JujutsuEase.Curve((Func)((float t) => 1f - JujutsuEase.InCubic(t)), 8); Gradient val8 = new Gradient(); val8.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(Color.white, 0f), new GradientColorKey(Color.white, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.6f, 0.4f), new GradientAlphaKey(0f, 1f) }); val3.colorGradient = val8; wake.materials[i] = val6; wake.tints[i] = val5; wake.glows[i] = num; wake.drain = Mathf.Max(wake.drain, array[i]); } wake.embers = JujutsuMotes.Attach(val.transform, colour, Mathf.Max(0.4f, width * 2f), (JujutsuMoteKind)0); return wake; } internal void Close() { if (!closed) { closed = true; closedAt = Time.time; JujutsuMotes.Stop(embers); embers = null; Object.Destroy((Object)(object)((Component)this).gameObject, drain + 0.15f); } } private void LateUpdate() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) if (closed) { Dim(); } else if (!Object.op_Implicit((Object)(object)body) || Time.time >= until) { Close(); } else { ((Component)this).transform.position = body.corePosition; } } private void Dim() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) if (materials == null) { return; } float num = 1f - JujutsuEase.InQuad(Mathf.Clamp01((Time.time - closedAt) / Mathf.Max(0.05f, drain))); for (int i = 0; i < materials.Length; i++) { if (Object.op_Implicit((Object)(object)materials[i])) { JujutsuFxMaterials.SetEnvelope(materials[i], tints[i], num, glows[i]); } } } private void OnDestroy() { JujutsuMotes.Stop(embers); embers = null; } } internal sealed class Knot : MonoBehaviour { private Piece core; private Piece body; private Piece haze; private ParticleSystem embers; private float radius; private float snappedAt = -999f; internal static Knot Open(Vector3 point, Color colour, float startRadius) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_00d8: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("YujiHeldKnot"); val.transform.position = point; Knot knot = val.AddComponent(); knot.radius = Mathf.Max(0.02f, startRadius); knot.haze = Flare("YujiKnotHaze", point, colour, (JujutsuFxLayer)2, -35f, 0f); knot.body = Flare("YujiKnotBody", point, colour, (JujutsuFxLayer)1, 70f, 0f); knot.core = Flare("YujiKnotCore", point, colour, (JujutsuFxLayer)0, -190f, 0f); if (knot.haze != null) { knot.haze.Under(val.transform); } if (knot.body != null) { knot.body.Under(val.transform); } if (knot.core != null) { knot.core.Under(val.transform); } knot.embers = JujutsuMotes.Attach(val.transform, colour, Mathf.Max(0.3f, startRadius * 2f), (JujutsuMoteKind)0); return knot; } internal void Move(Vector3 point) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.position = point; } internal void SetRadius(float metres) { radius = Mathf.Max(0.02f, metres); } internal void Snap() { snappedAt = Time.time; } internal void CloseAndBurst(Vector3 aim, Color colour) { //IL_0018: 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_001e: Unknown result type (might be due to invalid IL or missing references) //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) JujutsuMotes.Stop(embers); embers = null; JujutsuMotes.Burst(((Component)this).transform.position, aim, colour, Mathf.Max(0.3f, radius * 4f), (JujutsuMoteKind)2, 14); Ignite(((Component)this).transform.position, colour, radius * 5f, 0.22f); Object.Destroy((Object)(object)((Component)this).gameObject); } private void LateUpdate() { float num = JujutsuEase.FlickerScaled(Time.time, 0.7f, 14f); float num2 = 1f + 2.2f * JujutsuEase.Snap(Mathf.Clamp01((Time.time - snappedAt) / 0.16f), 0.1f); if (core != null) { core.Size(radius * 1.5f * num2); core.Fade(num); } if (body != null) { body.Size(radius * 2.6f * num2); body.Fade(num * 0.9f); } if (haze != null) { haze.Size(radius * 4.4f * num2); haze.Fade((1.7f - num) * 0.55f); } } private void OnDestroy() { JujutsuMotes.Stop(embers); embers = null; } } internal static readonly Color FlashVoid = new Color(0.015f, 0f, 0.02f, 0.94f); internal static readonly Color FlashEdge = new Color(0.95f, 0.1f, 0.16f, 1f); internal static readonly Color FlashCore = new Color(1f, 0.88f, 0.84f, 1f); private const float FailureRest = 20f; private static float restingUntil; private static bool failureLogged; internal const float JabWeight = 0.16f; internal const float DivergentLift = 0.38f; internal const float DivergentCeiling = 0.68f; private const float ScreenFull = 14f; private const float ScreenNone = 55f; internal static readonly Color Ink = new Color(0.05f, 0.032f, 0.038f, 0.97f); private static readonly Color SnipPaper = new Color(1f, 0.97f, 0.95f, 0.97f); private const float SnipLife = 0.62f; private const float SnipSweep = 0.62f; private const float SnipLead = 0.11f; private const float SnipPitch = 1.15f; private const float SnipCount = 4f; private const float SnipOpen = 22f; private const float SnipShut = 4f; private const float SnipStub = 0.08f; private static readonly List snipPath = new List(16); private static float snipMarkWidth = 0.3f; private static float snipSeamTail = 0.1f; private static float snipSeamHead = 0.6f; private static readonly Func SnipMarkWidthOf = (float t) => snipMarkWidth; private static readonly Func SnipMarkShadeOf = (float t) => Solid; private static readonly Func SnipSeamWidthOf = (float t) => Mathf.Lerp(snipSeamTail, snipSeamHead, Mathf.Clamp01(t)); private const float DashFill = 0.62f; private static Texture2D dashMark; private static Texture2D cutMark; private static Texture2D scissorHalf; private static readonly Color Clear = new Color(1f, 1f, 1f, 0f); private static readonly Color Solid = new Color(1f, 1f, 1f, 1f); private static Texture2D DashMark { get { if (!Object.op_Implicit((Object)(object)dashMark)) { return dashMark = BuildDashMark(); } return dashMark; } } private static Texture2D CutMark { get { if (!Object.op_Implicit((Object)(object)cutMark)) { return cutMark = JujutsuFxTextures.Build("texYujiCutMark", 64, (Func)delegate(float u, float v) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Abs(v - 0.5f); return Marked(Mathf.Clamp01((0.34f - num) * 13f), Mathf.Clamp01((0.43f - num) * 13f)); }); } return cutMark; } } private static Texture2D ScissorHalf { get { if (!Object.op_Implicit((Object)(object)scissorHalf)) { return scissorHalf = JujutsuFxTextures.Build("texYujiScissorHalf", 192, (Func)ScissorPixel); } return scissorHalf; } } internal static Color LayerTint(Color colour, JujutsuFxLayer layer) { //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) //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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Invalid comparison between Unknown and I4 //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) if ((int)layer != 0) { if ((int)layer == 2) { Color result = Color.Lerp(colour, Color.black, 0.15f); result.a = colour.a * 0.45f; return result; } return colour; } Color result2 = Color.Lerp(colour, Color.white, 0.78f); result2.a = colour.a; return result2; } private static Piece Flare(string name, Vector3 position, Color colour, JujutsuFxLayer layer, float spin, float life) { //IL_000d: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0041: 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_00b8: 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) if (JujutsuFxBudget.Available((Kind)3, 1) < 1) { return null; } GameObject val = JujutsuPrimitives.Quad(name, position, false); if (!Object.op_Implicit((Object)(object)val)) { return null; } val.AddComponent().spin = spin; MeshRenderer component = val.GetComponent(); JujutsuFxMaterials.PrepareRenderer((Renderer)(object)component); Color val2 = LayerTint(colour, layer); float num = JujutsuFxMaterials.GlowFor(layer); Material val3 = JujutsuFxMaterials.CreateLineMaterial(name + "Material", val2, num, JujutsuFxTextures.Radial); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)val3)) { Object.Destroy((Object)(object)val); return null; } ((Renderer)component).sharedMaterial = val3; JujutsuFxMaterials.Claim(val, val3); if (life > 0f) { Object.Destroy((Object)(object)val, life); } JujutsuFxBudget.Register(val, (Kind)3); return new Piece { Item = val, Material = val3, Tint = val2, Glow = num }; } private static Piece Shadow(string name, Vector3 position, Color colour, float spin, float life) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) if (!JujutsuFxMaterials.CanDrawDark || JujutsuFxBudget.Available((Kind)3, 1) < 1) { return null; } GameObject val = JujutsuPrimitives.Quad(name, position, false); if (!Object.op_Implicit((Object)(object)val)) { return null; } val.AddComponent().spin = spin; MeshRenderer component = val.GetComponent(); JujutsuFxMaterials.PrepareRenderer((Renderer)(object)component); Material val2 = JujutsuFxMaterials.CreateBlendedMaterial(name + "Material", colour, JujutsuFxTextures.Radial); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)val2)) { Object.Destroy((Object)(object)val); return null; } ((Renderer)component).sharedMaterial = val2; JujutsuFxMaterials.Claim(val, val2); if (life > 0f) { Object.Destroy((Object)(object)val, life); } JujutsuFxBudget.Register(val, (Kind)3); return new Piece { Item = val, Material = val2, Tint = colour, Glow = 1f }; } private static Piece Shape(string name, Vector3 position, Quaternion rotation, Color tint, float glow, bool dark, Texture2D texture, float life) { //IL_002a: 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_0057: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) if (dark && !JujutsuFxMaterials.CanDrawDark) { return null; } if (JujutsuFxBudget.Available((Kind)3, 1) < 1) { return null; } Mesh val2 = default(Mesh); MeshRenderer val3 = default(MeshRenderer); GameObject val = JujutsuFxMesh.Object(name, ref val2, ref val3); val.transform.SetPositionAndRotation(position, rotation); Material val4 = (dark ? JujutsuFxMaterials.CreateBlendedMaterial("mat" + name, tint, texture) : JujutsuFxMaterials.CreateLineMaterial("mat" + name, tint, glow, texture)); if (!Object.op_Implicit((Object)(object)val4)) { Object.Destroy((Object)(object)val); Object.Destroy((Object)(object)val2); return null; } ((Renderer)val3).sharedMaterial = val4; JujutsuFxMaterials.Claim(val, val4); val.AddComponent().Own(val2); if (life > 0f) { Object.Destroy((Object)(object)val, life); } JujutsuFxBudget.Register(val, (Kind)3); return new Piece { Item = val, Mesh = val2, Material = val4, Tint = tint, Glow = (dark ? 1f : glow) }; } internal static void Ignite(Vector3 point, Color colour, float radius, float life = 0.3f) { //IL_001c: 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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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) if (Resting()) { return; } try { Piece core = Flare("YujiIgniteCore", point, colour, (JujutsuFxLayer)0, 150f, life); Piece haze = Flare("YujiIgniteHaze", point, colour, (JujutsuFxLayer)2, -60f, life); Action action = delegate(float t) { float num = JujutsuEase.OutBack(JujutsuEase.Window(t, 0f, 0.35f), 0.55f); float num2 = JujutsuEase.Snap(t, 0.18f); if (core != null) { core.Size(radius * 0.55f * num); core.Fade(num2); } if (haze != null) { haze.Size(radius * (0.6f + 0.9f * num)); haze.Fade(num2 * 0.85f); } }; action(0f); JujutsuFxSequence.Run(life).While(action); JujutsuMotes.Burst(point, Vector3.up, colour, radius, (JujutsuMoteKind)2, 7); } catch (Exception exception) { Fail(exception); } } internal static void Gather(Transform anchor, Color colour, float radius, float seconds) { //IL_0042: 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_0064: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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) if (Resting() || !Object.op_Implicit((Object)(object)anchor) || seconds <= 0.01f) { return; } try { JujutsuFxSequenceRunner val = JujutsuFxSequence.Run(seconds, anchor); if (!Object.op_Implicit((Object)(object)val)) { return; } Piece haze = Flare("YujiGatherHaze", anchor.position, colour, (JujutsuFxLayer)2, 45f, 0f); Piece core = Flare("YujiGatherCore", anchor.position, colour, (JujutsuFxLayer)0, -180f, 0f); Piece ring = Shape("YujiGatherRing", anchor.position, Quaternion.identity, LayerTint(colour, (JujutsuFxLayer)1), JujutsuFxMaterials.GlowFor((JujutsuFxLayer)1), dark: false, null, 0f); if (haze != null) { haze.Under(((Component)val).transform); } if (core != null) { core.Under(((Component)val).transform); } if (ring != null) { ring.Under(((Component)val).transform); } int seed = Seed(anchor.position); Action action = delegate(float t) { //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) float num = JujutsuEase.InCubic(t); float num2 = JujutsuEase.InQuad(t); if (haze != null) { haze.Size(radius * Mathf.Lerp(2.3f, 0.7f, num)); haze.Fade(num2 * 0.9f); } if (core != null) { core.Size(radius * Mathf.Lerp(0.05f, 0.5f, num2)); core.Fade(num2); } if (ring != null && Object.op_Implicit((Object)(object)ring.Mesh)) { float num3 = radius * Mathf.Lerp(2.1f, 0.55f, num); float num4 = radius * Mathf.Lerp(0.1f, 0.28f, num); JujutsuFxMesh.Ring(ring.Mesh, Mathf.Max(0.01f, num3 - num4), Mathf.Max(0.02f, num3 + num4 * 0.3f), Clear, Solid, Clear, 28, 0.5f, seed, (Func)null); ring.Fade(num2 * 0.8f); } }; action(0f); val.While(action); } catch (Exception exception) { Fail(exception); } } internal static void Tell(Vector3 point, Color colour, float radius, float seconds) { //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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_0050: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) if (Resting() || seconds <= 0.02f) { return; } try { float life = seconds + 0.25f; Piece knot = Shadow("YujiDivergentKnot", point, FlashVoid, 25f, life); Piece rim = Shape("YujiDivergentRim", point, Quaternion.identity, LayerTint(colour, (JujutsuFxLayer)1), JujutsuFxMaterials.GlowFor((JujutsuFxLayer)1), dark: false, null, life); Piece spark = Flare("YujiDivergentSpark", point, colour, (JujutsuFxLayer)0, 220f, life); int seed = Seed(point); Action action = delegate(float t) { //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) float num = JujutsuEase.InCubic(t); float num2 = JujutsuEase.InQuad(t); if (knot != null) { knot.Size(radius * Mathf.Lerp(0.15f, 0.85f, num2)); knot.Fade(num2); } if (spark != null) { spark.Size(radius * 0.18f * num2); spark.Fade(num2 * 0.8f); } if (rim != null && Object.op_Implicit((Object)(object)rim.Mesh)) { float num3 = radius * Mathf.Lerp(1.7f, 0.4f, num); float num4 = radius * 0.07f; JujutsuFxMesh.Ring(rim.Mesh, Mathf.Max(0.01f, num3 - num4), Mathf.Max(0.02f, num3 + num4), Clear, Solid, Clear, 32, 0.55f, seed, (Func)null); rim.Fade(num2); } }; action(0f); JujutsuFxSequence.Run(seconds).While(action).Then((Action)delegate { Sweep(knot); Sweep(rim); Sweep(spark); }); } catch (Exception exception) { Fail(exception); } } internal static void Divergent(Vector3 point, Vector3 aim, Color colour, float radius, float weight) { //IL_000e: 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_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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_005e: 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_0068: 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_006e: 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_009e: Unknown result type (might be due to invalid IL or missing references) JujutsuImpact.Strike(point, aim, colour, radius, weight, true); if (Resting()) { return; } try { float num = 0.42f; Piece front = Shape("YujiDivergentFront", point, Quaternion.FromToRotation(Vector3.up, Steady(aim)), LayerTint(colour, (JujutsuFxLayer)1), JujutsuFxMaterials.GlowFor((JujutsuFxLayer)1), dark: false, null, num); int seed = Seed(point) + 17; Action action = delegate(float t) { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if (front != null && Object.op_Implicit((Object)(object)front.Mesh)) { float num2 = JujutsuEase.Window(t, 0.2f, 1f); float num3 = radius * Mathf.Lerp(0.3f, 1.25f, JujutsuEase.OutExpo(num2)); float num4 = radius * Mathf.Lerp(0.3f, 0.06f, JujutsuEase.OutCubic(num2)); JujutsuFxMesh.Ring(front.Mesh, Mathf.Max(0.01f, num3 - num4), Mathf.Max(0.02f, num3 + num4 * 0.4f), Clear, Solid, Clear, 44, 0.42f, seed, (Func)null); front.Fade(JujutsuEase.Snap(num2, 0.12f)); } }; action(0f); JujutsuFxSequence.Run(num).While(action).At(0.28f, (Action)delegate { //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_000c: Unknown result type (might be due to invalid IL or missing references) JujutsuMotes.Burst(point, Vector3.up, colour, radius * 0.8f, (JujutsuMoteKind)0, 0); }); } catch (Exception exception) { Fail(exception); } } internal static void Flash(CharacterBody caster, Vector3 point, Vector3 aim, float radius, bool major) { //IL_000e: 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_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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_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_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) if (Resting()) { return; } try { JujutsuFxHitStop.Hold(caster, major ? 0.09f : 0.06f, false); float num = Nearness(point); if (major && num > 0.01f) { Color flashCore = FlashCore; flashCore.a = 0.6f * num; JujutsuFxScreen.Flash(flashCore, 0.2f); } JujutsuFxLights.Borrow(point, Color.Lerp(FlashEdge, Color.white, 0.45f), major ? 17f : 11f, Mathf.Clamp(radius * 3.2f, 4f, 40f), major ? 0.16f : 0.12f); float num2 = (major ? 0.62f : 0.44f); Quaternion rotation = Quaternion.FromToRotation(Vector3.up, Steady(aim)); Piece hollow = Shadow("YujiFlashVoid", point, FlashVoid, 18f, num2); Piece heart = Flare("YujiFlashHeart", point, FlashCore, (JujutsuFxLayer)0, 200f, num2); Piece inner = Shape("YujiFlashInnerEdge", point, rotation, LayerTint(FlashCore, (JujutsuFxLayer)0), JujutsuFxMaterials.GlowFor((JujutsuFxLayer)0), dark: false, null, num2); Piece gap = Shape("YujiFlashGap", point, rotation, FlashVoid, 1f, dark: true, null, num2); Piece outer = Shape("YujiFlashOuterEdge", point, rotation, LayerTint(FlashEdge, (JujutsuFxLayer)1), JujutsuFxMaterials.GlowFor((JujutsuFxLayer)1), dark: false, null, num2); int seed = Seed(point); int segments = Mathf.Clamp(Mathf.RoundToInt(radius * 4f) + 30, 36, 96); Action action = delegate(float t) { float num3 = JujutsuEase.OutExpo(JujutsuEase.Window(t, 0.05f, 1f)); float num4 = radius * Mathf.Lerp(0.22f, 1.5f, num3); float num5 = radius * Mathf.Lerp(0.4f, 0.11f, JujutsuEase.OutCubic(num3)); float num6 = JujutsuEase.Snap(t, 0.16f); float alpha = JujutsuEase.Snap(t, 0.34f); if (hollow != null) { hollow.Size(radius * Mathf.Lerp(0.5f, 1.9f, num3)); hollow.Fade(alpha); } if (heart != null) { heart.Size(radius * Mathf.Lerp(0.75f, 0.3f, JujutsuEase.OutCubic(t))); heart.Fade(JujutsuEase.Snap(t, 0.1f)); } Band(inner, num4 - num5 * 1.5f, num4 - num5 * 0.62f, segments, seed, num6); Band(gap, num4 - num5 * 0.66f, num4 + num5 * 0.66f, segments, seed + 5, alpha); Band(outer, num4 + num5 * 0.58f, num4 + num5 * 1.5f, segments, seed + 11, num6 * 0.95f); }; action(0f); JujutsuFxSequence.Run(num2).While(action).At(0.1f, (Action)delegate { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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) JujutsuMotes.Burst(point, aim, FlashEdge, radius, (JujutsuMoteKind)2, major ? 34 : 22); JujutsuFxDebris.Throw(point, aim, FlashEdge, radius, major ? 22 : 12, 0f, 0.85f); }) .At(0.34f, (Action)delegate { //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_000b: 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_0028: Unknown result type (might be due to invalid IL or missing references) //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_004d: Unknown result type (might be due to invalid IL or missing references) //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) JujutsuMotes.Burst(point, Vector3.up, FlashEdge, radius, (JujutsuMoteKind)0, 0); JujutsuMotes.Burst(point, Vector3.up, FlashVoid, radius, (JujutsuMoteKind)1, 0); if (major) { JujutsuMotes.Burst(point, Vector3.up, FlashVoid, radius, (JujutsuMoteKind)3, 0); JujutsuFxScorch.Mark(point, FlashEdge, radius * 0.9f, 12f, true); } }); } catch (Exception exception) { Fail(exception); } } private static void Band(Piece piece, float inner, float outer, int segments, int seed, float alpha) { //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_0037: Unknown result type (might be due to invalid IL or missing references) if (piece != null && Object.op_Implicit((Object)(object)piece.Mesh)) { JujutsuFxMesh.Ring(piece.Mesh, Mathf.Max(0.01f, inner), Mathf.Max(0.02f, outer), Clear, Solid, Clear, segments, 0.38f, seed, (Func)null); piece.Fade(alpha); } } internal static void Inward(CharacterBody caster, Vector3 point, Color colour, float radius) { //IL_000e: 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_001c: 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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) if (Resting()) { return; } try { Piece well = Shadow("YujiSoulWell", point, FlashVoid, -30f, 0.46f); Piece arrival = Flare("YujiSoulArrival", point, colour, (JujutsuFxLayer)0, 260f, 0.46f); Piece[] rings = new Piece[3] { Shape("YujiSoulRingA", point, Quaternion.identity, LayerTint(colour, (JujutsuFxLayer)0), JujutsuFxMaterials.GlowFor((JujutsuFxLayer)0), dark: false, null, 0.46f), Shape("YujiSoulRingB", point, Quaternion.Euler(62f, 0f, 0f), LayerTint(colour, (JujutsuFxLayer)1), JujutsuFxMaterials.GlowFor((JujutsuFxLayer)1), dark: false, null, 0.46f), Shape("YujiSoulRingC", point, Quaternion.Euler(0f, 0f, 58f), LayerTint(colour, (JujutsuFxLayer)2), JujutsuFxMaterials.GlowFor((JujutsuFxLayer)2), dark: false, null, 0.46f) }; int seed = Seed(point); Action action = delegate(float t) { for (int i = 0; i < rings.Length; i++) { float num = JujutsuEase.Window(t, (float)i * 0.09f, 0.78f + (float)i * 0.06f); float num2 = JujutsuEase.InCubic(num); float num3 = radius * Mathf.Lerp(1.25f + (float)i * 0.35f, 0.08f, num2); float num4 = radius * Mathf.Lerp(0.05f, 0.2f, num2); Band(rings[i], num3 - num4, num3 + num4 * 0.5f, 40, seed + i * 13, JujutsuEase.InOut(Mathf.Min(1f, num * 4f)) * (1f - JujutsuEase.InQuad(num))); } if (well != null) { well.Size(radius * Mathf.Lerp(0.1f, 0.9f, JujutsuEase.OutCubic(JujutsuEase.Window(t, 0f, 0.7f)))); well.Fade(JujutsuEase.Snap(JujutsuEase.Window(t, 0f, 1f), 0.5f)); } if (arrival != null) { float num5 = JujutsuEase.Window(t, 0.68f, 1f); arrival.Size(radius * 0.9f * JujutsuEase.OutExpo(num5)); arrival.Fade(JujutsuEase.Snap(num5, 0.12f)); } }; action(0f); JujutsuFxSequence.Run(0.46f).While(action).At(0.68f, (Action)delegate { //IL_0001: 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_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) //IL_0037: 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_0072: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) JujutsuFxShake.Tier(point, 0.62f); JujutsuFxHitStop.Hold(caster, 0.06f, false); JujutsuFxLights.Borrow(point, Color.Lerp(colour, Color.white, 0.3f), 9f, Mathf.Clamp(radius * 2.4f, 3f, 28f), 0.14f); JujutsuImpact.Strike(point, Vector3.up, colour, radius * 0.3f, 0.34f, true); JujutsuMotes.Burst(point, Vector3.up, colour, radius * 0.8f, (JujutsuMoteKind)0, 0); }); } catch (Exception exception) { Fail(exception); } } internal static void Quake(Vector3 centre, Color colour, float radius, float weight, bool mark) { //IL_000e: 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_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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) JujutsuFxShake.Detonation(centre, radius); JujutsuImpact.Detonate(centre, colour, radius, weight, true); if (Resting()) { return; } try { if (NetworkServer.active) { JujutsuImpact.Surface(centre, Vector3.up, radius, true); } JujutsuGroundField field = JujutsuGroundField.Sample(centre, radius, Mathf.Clamp(Mathf.RoundToInt(radius) + 8, 12, 28), 3); if (!field.HasFloor) { return; } Piece crest = Shape("YujiQuakeCrest", centre, Quaternion.identity, LayerTint(colour, (JujutsuFxLayer)0), JujutsuFxMaterials.GlowFor((JujutsuFxLayer)0), dark: false, null, 0.62f); Piece body = Shape("YujiQuakeBody", centre, Quaternion.identity, LayerTint(colour, (JujutsuFxLayer)1), JujutsuFxMaterials.GlowFor((JujutsuFxLayer)1), dark: false, null, 0.62f); Piece dust = Shape("YujiQuakeShadow", centre, Quaternion.identity, new Color(0.06f, 0.04f, 0.04f, 0.6f), 1f, dark: true, JujutsuFxTextures.Smoke, 0.62f); GroundRing follow = new GroundRing(field, centre); int seed = Seed(centre); Action action = delegate(float t) { float num = JujutsuEase.OutExpo(t); follow.Reach = radius * Mathf.Lerp(0.12f, 1f, num); follow.Lift = 0.14f; float num2 = radius * Mathf.Lerp(0.26f, 0.05f, JujutsuEase.OutCubic(num)); float num3 = JujutsuEase.Snap(t, 0.12f); Sheet(crest, follow.Reach - num2 * 0.5f, follow.Reach + num2 * 0.25f, seed, num3, follow); Sheet(body, follow.Reach - num2 * 1.6f, follow.Reach + num2 * 0.6f, seed + 3, num3 * 0.9f, follow); follow.Lift = 0.22f; Sheet(dust, follow.Reach - num2 * 3.4f, follow.Reach - num2 * 0.4f, seed + 7, JujutsuEase.Snap(t, 0.4f) * 0.75f, follow); }; action(0f); JujutsuFxSequence.Run(0.62f).While(action).At(0.14f, (Action)delegate { //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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_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) //IL_006b: 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_0073: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 3; i++) { float num = (float)i * MathF.PI * 2f / 3f; Vector3 val = field.PointAt(num, radius * 0.55f, 0.1f); Vector3 val2 = val - centre; Vector3 val3 = ((Vector3)(ref val2)).normalized + Vector3.up * 0.7f; JujutsuMotes.Burst(val, val3, colour, radius * 0.4f, (JujutsuMoteKind)1, 0); } }) .At(0.34f, (Action)delegate { //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_000c: 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) JujutsuMotes.Burst(centre, Vector3.up, colour, radius * 0.5f, (JujutsuMoteKind)3, 0); if (mark) { JujutsuFxScorch.Mark(centre, colour, radius * 0.7f, 16f, true); } }); } catch (Exception exception) { Fail(exception); } } internal static void QuakeTell(Vector3 centre, Color colour, float radius, float seconds) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_0049: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00b9: Unknown result type (might be due to invalid IL or missing references) if (Resting() || seconds <= 0.02f) { return; } try { JujutsuGroundField val = JujutsuGroundField.Sample(centre, radius, 16, 2); if (val.HasFloor) { Piece rim = Shape("YujiQuakeTell", centre, Quaternion.identity, LayerTint(colour, (JujutsuFxLayer)1), JujutsuFxMaterials.GlowFor((JujutsuFxLayer)1), dark: false, null, seconds); GroundRing follow = new GroundRing(val, centre); int seed = Seed(centre) + 29; Action action = delegate(float t) { float num = JujutsuEase.InCubic(t); follow.Reach = radius * Mathf.Lerp(1f, 0.18f, num); follow.Lift = 0.12f; Sheet(rim, follow.Reach - radius * 0.05f, follow.Reach + radius * 0.03f, seed, JujutsuEase.InQuad(t) * 0.9f, follow); }; action(0f); JujutsuFxSequence.Run(seconds).While(action).Then((Action)delegate { Sweep(rim); }); JujutsuMotes.Burst(centre, Vector3.up, colour, radius * 0.25f, (JujutsuMoteKind)1, 6); } } catch (Exception exception) { Fail(exception); } } internal static void Guard(CharacterBody body, Color colour) { //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) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_006d: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) if (Resting() || !Object.op_Implicit((Object)(object)body)) { return; } try { Vector3 point = JujutsuFxScale.Core(body); float radius = JujutsuFxScale.Of(body, 1.8f); JujutsuFxShake.Tier(point, 0.42f); JujutsuFxHitStop.Hold(body, 0.06f, false); JujutsuFxLights.Borrow(point, Color.Lerp(colour, Color.white, 0.4f), 8f, Mathf.Clamp(radius * 2.6f, 3f, 24f), 0.12f); Piece shell = Shadow("YujiGuardShell", point, FlashVoid, 12f, 0.4f); Piece rim = Shape("YujiGuardRim", point, Quaternion.identity, LayerTint(colour, (JujutsuFxLayer)0), JujutsuFxMaterials.GlowFor((JujutsuFxLayer)0), dark: false, null, 0.4f); Piece haze = Flare("YujiGuardHaze", point, colour, (JujutsuFxLayer)2, -40f, 0.4f); int seed = Seed(point); Action action = delegate(float t) { float num = JujutsuEase.OutBack(JujutsuEase.Window(t, 0f, 0.45f), 0.5f); float num2 = JujutsuEase.Snap(t, 0.3f); float num3 = radius * Mathf.Lerp(0.35f, 1f, num); Band(rim, num3 - radius * 0.09f, num3 + radius * 0.05f, 48, seed, num2); if (shell != null) { shell.Size(num3 * 1.7f); shell.Fade(num2 * 0.85f); } if (haze != null) { haze.Size(num3 * 2.1f); haze.Fade(num2 * 0.7f); } }; action(0f); JujutsuFxSequence.Run(0.4f).While(action).At(0.12f, (Action)delegate { //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_000c: Unknown result type (might be due to invalid IL or missing references) JujutsuMotes.Burst(point, Vector3.up, colour, radius, (JujutsuMoteKind)2, 16); }); } catch (Exception exception) { Fail(exception); } } internal static Wake Streak(CharacterBody caster, Color colour, float width, float seconds) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (Resting() || !Object.op_Implicit((Object)(object)caster)) { return null; } try { return Wake.Open(caster, colour, width, seconds); } catch (Exception exception) { Fail(exception); return null; } } internal static Knot Hold(Vector3 point, Color colour, float radius) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) if (Resting()) { return null; } try { return Knot.Open(point, colour, radius); } catch (Exception exception) { Fail(exception); return null; } } internal static void Lance(Vector3 point, Vector3 aim, Vector3 normal, Color colour, float radius, bool onSurface) { //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) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) JujutsuImpact.Strike(point, aim, colour, radius, 0.18f, true); if (onSurface && NetworkServer.active) { JujutsuImpact.Surface(point, normal, radius, true); } } private static Color32 Marked(float inside, float rimmed) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) inside = Mathf.Clamp01(inside); rimmed = Mathf.Clamp01(Mathf.Max(inside, rimmed)); byte num = (byte)Mathf.RoundToInt(Mathf.Lerp(1f, 0.03f, inside) * 255f); return new Color32(num, num, num, (byte)Mathf.RoundToInt(rimmed * 255f)); } private static Texture2D BuildDashMark() { Texture2D obj = JujutsuFxTextures.Build("texYujiDashMark", 64, (Func)delegate(float u, float v) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Abs(u - 0.5f); float num2 = Mathf.Abs(v - 0.5f); float inside = Mathf.Clamp01((0.31f - num) * 26f) * Mathf.Clamp01((0.34f - num2) * 13f); float rimmed = Mathf.Clamp01((0.338f - num) * 26f) * Mathf.Clamp01((0.43f - num2) * 13f); return Marked(inside, rimmed); }); ((Texture)obj).wrapMode = (TextureWrapMode)0; return obj; } private static Color32 ScissorPixel(float u, float v) { //IL_00f2: Unknown result type (might be due to invalid IL or missing references) float num = (u - 0.5f) * 2f; float num2 = (v - 0.5f) * 2f; float num3 = Mathf.InverseLerp(0.02f, 0.95f, num); float num4 = Mathf.Lerp(0.185f, 0.026f, JujutsuEase.InQuad(num3)); float num5 = Mathf.Min(Mathf.Min(num - 0.02f, 0.95f - num), Mathf.Min(num2 + 0.014f, num4 - num2)); float num6 = 0.105f - Mathf.Sqrt(num * num + num2 * num2); float num7 = 0.072f - Segment(num, num2, 0f, 0f, -0.48f, -0.33f); float num8 = 0.068f - Mathf.Abs(Distance(num, num2, -0.64f, -0.44f) - 0.215f); float num9 = Mathf.Max(Mathf.Max(num5, num6), Mathf.Max(num7, num8)); return Marked(num9 * 58f, (num9 + 0.016f) * 58f); } private static float Distance(float ax, float ay, float bx, float by) { float num = ax - bx; float num2 = ay - by; return Mathf.Sqrt(num * num + num2 * num2); } private static float Segment(float px, float py, float ax, float ay, float bx, float by) { float num = bx - ax; float num2 = by - ay; float num3 = Mathf.Max(1E-06f, num * num + num2 * num2); float num4 = Mathf.Clamp01(((px - ax) * num + (py - ay) * num2) / num3); return Distance(px, py, ax + num * num4, ay + num2 * num4); } private static Piece Silhouette(string name, Texture2D texture) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) if (JujutsuFxBudget.Available((Kind)3, 1) < 1) { return null; } GameObject val = JujutsuPrimitives.Quad(name, Vector3.zero, false); if (!Object.op_Implicit((Object)(object)val)) { return null; } MeshRenderer component = val.GetComponent(); JujutsuFxMaterials.PrepareRenderer((Renderer)(object)component); Material val2 = JujutsuFxMaterials.CreateBlendedMaterial(name + "Material", SnipPaper, texture); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)val2)) { Object.Destroy((Object)(object)val); return null; } ((Renderer)component).sharedMaterial = val2; JujutsuFxMaterials.Claim(val, val2); JujutsuFxBudget.Register(val, (Kind)3); return new Piece { Item = val, Material = val2, Tint = SnipPaper, Glow = 1f }; } private static Snip Cutline(Vector3 from, Vector3 run, Vector3 face, float lead) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: 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_000e: 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_0027: 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) //IL_0052: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: 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_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) Snip snip = new Snip { From = from, Run = run, Face = face, Lead = lead, Marks = Shape("YujiScissorsMarks", from, Quaternion.identity, SnipPaper, 1f, dark: true, DashMark, 0.62f), Seam = Shape("YujiScissorsSeam", from, Quaternion.identity, SnipPaper, 1f, dark: true, CutMark, 0.62f), Upper = Silhouette("YujiScissorsUpper", ScissorHalf), Lower = Silhouette("YujiScissorsLower", ScissorHalf) }; if (snip.Upper != null || snip.Lower != null) { GameObject val = new GameObject("YujiScissors"); val.transform.SetPositionAndRotation(from, Quaternion.LookRotation(face, Vector3.Cross(face, run))); Object.Destroy((Object)(object)val, 0.62f); snip.Rig = val.transform; if (snip.Upper != null) { snip.Upper.Under(snip.Rig); } if (snip.Lower != null) { snip.Lower.Under(snip.Rig); } } return snip; } private static void Advance(Snip snip, float t, float length, float thickness, float depth, float blades) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0171: 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_00c7: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_018b: 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) if (snip == null) { return; } float lead = snip.Lead; float num = snip.Lead + 0.62f; float num2 = JujutsuEase.InOut(JujutsuEase.Window(t, lead, num)); float num3 = JujutsuEase.Window(t, num, 1f); float alpha = JujutsuEase.Snap(t, num); float num4 = length * num2; float num5 = length - num4; Vector3 val = snip.Face * (Mathf.Lerp(-0.5f, 0.5f, num2) * depth + depth * 0.12f * num3); if (snip.Marks != null) { if (Object.op_Implicit((Object)(object)snip.Marks.Item)) { snip.Marks.Item.transform.position = snip.From + val; } if (num5 > 0.08f) { Line(snip.Marks, snip.Run, snip.Face, num4, length, 2, 0f, SnipMarkWidthOf, SnipMarkShadeOf, SnipMarkShadeOf); snip.Marks.Fade(alpha); JujutsuFxTextures.Tile(snip.Marks.Material, new Vector2(num5 / 1.15f, 1f), new Vector2(num4 / 1.15f, 0f)); } else { snip.Marks.Fade(0f); } } if (snip.Seam != null) { if (Object.op_Implicit((Object)(object)snip.Seam.Item)) { snip.Seam.Item.transform.position = snip.From + val; } if (num4 > 0.08f) { Line(snip.Seam, snip.Run, snip.Face, 0f, num4, 10, thickness * 0.02f, SnipSeamWidthOf, SnipMarkShadeOf, SnipMarkShadeOf); snip.Seam.Fade(alpha); } else { snip.Seam.Fade(0f); } } if (Object.op_Implicit((Object)(object)snip.Rig)) { snip.Rig.position = snip.From + val + snip.Run * (num4 + length * 0.07f * num3); } float num6 = Mathf.Abs(Mathf.Cos(num2 * MathF.PI * 4f)); float num7 = Mathf.Lerp(4f, 22f, num6); float alpha2 = 1f - JujutsuEase.InQuad(num3); Half(snip.Upper, num7, blades, 1f, alpha2); Half(snip.Lower, 0f - num7, blades, -1f, alpha2); } internal static void Scissors(Vector3 centre, Vector3 facing, Vector3 first, Vector3 second, Color colour, float half, float thickness, float depth, float weight) { //IL_001d: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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_006d: 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_0074: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0193: 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_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) if (Resting()) { return; } if (!JujutsuFxMaterials.CanDrawDark) { JujutsuImpact.Cut(centre - first * half, first, colour, half * 2f, weight); return; } try { float length = Mathf.Max(0.6f, half * 2f); thickness = Mathf.Max(0.2f, thickness); Vector3 val = Steady(facing); Vector3 val2 = Steady(first); Vector3 val3 = Steady(second); if (Mathf.Abs(Vector3.Dot(val, Vector3.up)) > 0.995f) { val = Vector3.Cross(val2, Vector3.up); } Snip[] strokes = new Snip[2] { Cutline(centre - val2 * half, val2, val, 0f), Cutline(centre - val3 * half, val3, val, 0.11f) }; float blades = thickness * 0.95f; snipMarkWidth = thickness * 0.17f; snipSeamTail = thickness * 0.12f; snipSeamHead = thickness * 0.19f; float travel = Mathf.Max(0f, depth); Action action = delegate(float t) { for (int i = 0; i < strokes.Length; i++) { Advance(strokes[i], t, length, thickness, travel, blades); } }; action(0f); JujutsuFxSequenceRunner val4 = JujutsuFxSequence.Run(0.62f).While(action); int num = -1; while (Object.op_Implicit((Object)(object)val4) && num <= 1) { Vector3 at = centre + val2 * (half * 0.55f * (float)num) + val * (travel * 0.32f * (float)num); val4.At(0.62f * (0.5f + (float)num * 0.25f), (Action)delegate { //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_000b: Unknown result type (might be due to invalid IL or missing references) JujutsuMotes.Burst(at, Vector3.up, Ink, thickness * 0.45f, (JujutsuMoteKind)3, 4); }); num++; } JujutsuFxShake.Directional(centre, val2, weight); } catch (Exception exception) { Fail(exception); } } private static void Line(Piece piece, Vector3 run, Vector3 face, float near, float far, int points, float waver, Func width, Func edge, Func spine) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) if (piece != null && Object.op_Implicit((Object)(object)piece.Mesh)) { Vector3 val = Vector3.Cross(run, face); Vector3 normalized = ((Vector3)(ref val)).normalized; snipPath.Clear(); for (int i = 0; i <= points; i++) { float num = (float)i / (float)points; float num2 = Mathf.Lerp(near, far, num); snipPath.Add(run * num2 + normalized * (Mathf.Sin(num2 * 2.7f) * waver)); } JujutsuFxMesh.Ribbon(piece.Mesh, (IList)snipPath, face, width, edge, spine); } } private static void Half(Piece piece, float degrees, float size, float mirror, float alpha) { //IL_0028: 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) if (piece != null && Object.op_Implicit((Object)(object)piece.Item)) { Transform transform = piece.Item.transform; transform.localRotation = Quaternion.Euler(0f, 0f, degrees); transform.localScale = new Vector3(size, size * mirror, size); piece.Fade(alpha); } } private static void Sheet(Piece piece, float inner, float outer, int seed, float alpha, GroundRing follow) { //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_0037: Unknown result type (might be due to invalid IL or missing references) if (piece != null && Object.op_Implicit((Object)(object)piece.Mesh)) { JujutsuFxMesh.Ring(piece.Mesh, Mathf.Max(0.01f, inner), Mathf.Max(0.02f, outer), Clear, Solid, Clear, 48, 0.34f, seed, follow.Height); piece.Fade(alpha); } } private static void Sweep(Piece piece) { if (piece != null && Object.op_Implicit((Object)(object)piece.Item)) { Object.Destroy((Object)(object)piece.Item); } } private static float Nearness(Vector3 point) { //IL_001a: 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) Camera main = Camera.main; if (!Object.op_Implicit((Object)(object)main)) { return 0f; } float num = Vector3.Distance(((Component)main).transform.position, point); if (!(num < 55f)) { return 0f; } if (num <= 14f) { return 1f; } return 1f - JujutsuEase.InOut((num - 14f) / 41f); } private static Vector3 Steady(Vector3 aim) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) float sqrMagnitude = ((Vector3)(ref aim)).sqrMagnitude; if (!(sqrMagnitude > 1E-06f) || !(sqrMagnitude < 1E+12f)) { return Vector3.up; } return ((Vector3)(ref aim)).normalized; } private static int Seed(Vector3 point) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) return (Mathf.RoundToInt(point.x * 100f) * 73856093) ^ (Mathf.RoundToInt(point.y * 100f) * 19349663) ^ (Mathf.RoundToInt(point.z * 100f) * 83492791); } private static bool Resting() { return Time.time < restingUntil; } private static void Fail(Exception exception) { restingUntil = Time.time + 20f; if (!failureLogged) { failureLogged = true; ManualLogSource log = Plugin.Log; if (log != null) { log.LogWarning((object)("Yuji's effects failed and are resting for " + $"{20f} seconds at a time; gameplay is unaffected: " + exception)); } } } } } namespace GojoSatoruMod.States { public sealed class YujiDomainState : BaseSkillState, IPosedState { internal const float CastDuration = 2.2f; private Vector3 lockedFacing; private bool activated; private bool gravitySuspended; private GojoFaceCamera faceCamera; bool IPosedState.DrivesPose => true; GojoCpuPose IPosedState.Pose => (GojoCpuPose)17; float IPosedState.PosePhase => AnimationPhase; float IPosedState.PoseBob => 0.08f; float IPosedState.PosePitch => -10f; bool IPosedState.HoldsSlashPose => false; int IPosedState.PosePriority => 30; internal float AnimationPhase => Mathf.Clamp01(((EntityState)this).fixedAge / 2.2f); public override void OnEnter() { //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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_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_0041: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2.7f); Vector3 val; Vector3 normalized; if (!Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { val = Vector3.ProjectOnPlane(((EntityState)this).characterBody.transform.forward, Vector3.up); normalized = ((Vector3)(ref val)).normalized; } else { val = Vector3.ProjectOnPlane(((EntityState)this).characterDirection.forward, Vector3.up); normalized = ((Vector3)(ref val)).normalized; } lockedFacing = normalized; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && ((EntityState)this).characterMotor.useGravity) { gravitySuspended = true; ((EntityState)this).characterMotor.useGravity = false; } LockMovement(); if (((EntityState)this).isAuthority) { faceCamera = GojoFaceCamera.Push(((EntityState)this).characterBody); } RootedArmorController obj = RootedArmorController.Find(((EntityState)this).characterBody); if (obj != null) { obj.Push(); } JujutsuSfxAssets.PlayHeavyWhoosh(((EntityState)this).characterBody.corePosition, 1f); if (YujiAssets.DomainVoice != null) { GojoAssets.PlayAttackSound(YujiAssets.DomainVoice, ((EntityState)this).characterBody.corePosition, 1f, 0f, "Yuji", false, false); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); LockMovement(); if (!activated && ((EntityState)this).fixedAge >= 2.2f) { activated = true; Open(); } if (((EntityState)this).fixedAge >= 2.2f && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Open() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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) Vector3 corePosition = ((EntityState)this).characterBody.corePosition; ((Component)((EntityState)this).characterBody).GetComponent()?.Activate(corePosition); DomainBarrierVisual.SpawnSeal(corePosition, YujiDomainField.Colour, 26f, (GojoTechniqueStyle)4); int rank = DomainDepth.Rank; YujiVessel.Surface(((EntityState)this).characterBody, (rank >= 6) ? 2 : ((rank >= 2) ? 1 : 0)); JujutsuSfxAssets.PlayMeleeHeavy(corePosition); } private void LockMovement() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0031: 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_006d: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterMotor.rootMotion = Vector3.zero; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && ((Vector3)(ref lockedFacing)).sqrMagnitude > 0.01f) { ((EntityState)this).characterDirection.moveVector = lockedFacing; ((EntityState)this).characterDirection.forward = lockedFacing; } } } public override void OnExit() { if (gravitySuspended) { gravitySuspended = false; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.useGravity = true; } } if ((Object)(object)faceCamera != (Object)null) { faceCamera.Release(); faceCamera = null; } RootedArmorController obj = RootedArmorController.Find(((EntityState)this).characterBody); if (obj != null) { obj.Pop(); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public sealed class YujiDivergentFistState : BaseSkillState { internal const float DivergentCoefficient = 0.65f; internal const float FirstCoefficient = 1.15f; internal const float BlackFlashScale = 2f; internal const float HitPhase = 0.32f; private const int KickStep = 2; private float duration; private Vector3 aimDirection; private bool struck; private bool diverged; private Vector3 impactPoint; private bool rightHand; private int comboStep; private bool kicking; private bool lentHands; private Prepared firstFlash; private Prepared divergentFlash; private bool announced; private const float DivergentPhase = 0.62f; private float Lengthening { get { if (!lentHands) { return 1f; } return 1.9f; } } private float Widening { get { if (!lentHands) { return 1f; } return 1.55f; } } private float Weight { get { if (!lentHands) { return 1f; } return 1.3f; } } private Color Tint { get { //IL_000e: 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) if (!lentHands) { return YujiLanguage.Colour; } return YujiSukunaHands.Cursed; } } private float FirstWeight => Mathf.Max(0.16f, JujutsuFxScale.Weight(1.15f * Weight)); private float DivergentWeight => Mathf.Min(0.68f, FirstWeight + 0.38f); public override void OnEnter() { //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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0137: 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_015c: 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) //IL_0180: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); YujiSideSkillController component = ((Component)((EntityState)this).characterBody).GetComponent(); comboStep = (Object.op_Implicit((Object)(object)component) ? component.ConsumeNextPunchStep() : 0); kicking = comboStep == 2; lentHands = YujiSukunaHands.Engaged(((EntityState)this).characterBody); duration = 0.92f / Mathf.Max(0.1f, ((BaseState)this).attackSpeedStat); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; aimDirection = ((Vector3)(ref direction)).normalized; rightHand = comboStep == 0; ((EntityState)this).characterBody.SetAimTimer(duration + 0.2f); GojoModelAnimator val = GojoModelAnimator.Find(((EntityState)this).characterBody); if (Object.op_Implicit((Object)(object)val)) { if (kicking) { val.TriggerSpinKick(duration, 0.32f); } else { val.TriggerPunch(rightHand, duration, comboStep, 0.32f); } } JujutsuSfxAssets.PlayMeleeLight(((EntityState)this).characterBody.corePosition); Gather(); if (((EntityState)this).isAuthority) { firstFlash = BlackFlash.Roll(2f, ((EntityState)this).characterBody); divergentFlash = BlackFlash.Roll(2f, ((EntityState)this).characterBody); if ((((Prepared)(ref firstFlash)).Landed || ((Prepared)(ref divergentFlash)).Landed) && BlackFlash.AnythingToHit(((BaseState)this).GetTeam(), ImpactPoint(), 3.4f * Widening)) { BlackFlash.Announce(((EntityState)this).characterBody.corePosition, "Yuji"); announced = true; } } } public override void FixedUpdate() { //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) //IL_0090: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018f: 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_00c5: 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_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: 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_0122: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); GojoStateUtils.SlowMovementDuringAttack(((EntityState)this).characterMotor, ((EntityState)this).isAuthority, 0.72f); if (!struck && ((EntityState)this).fixedAge >= duration * 0.32f) { struck = true; impactPoint = ImpactPoint(); if (JujutsuConfig.DrawBasicAttackEffects) { JujutsuImpact.Strike(impactPoint, Facing(), Tint, JujutsuFxScale.Of(((EntityState)this).characterBody, 1.2f * Widening), FirstWeight, true); } else { JujutsuFxShake.Directional(impactPoint, Facing(), FirstWeight); } Strike(impactPoint, 2.1f * Widening, 1.15f * Weight, DamageTypeCombo.GenericPrimary, 1500f, firstFlash); if (JujutsuConfig.DrawBasicAttackEffects) { YujiFx.Tell(impactPoint, Tint, JujutsuFxScale.Of(((EntityState)this).characterBody, 0.75f * Widening), duration * 0.3f); } GojoStateUtils.StepIntoBlow(((EntityState)this).characterMotor, ((EntityState)this).isAuthority, aimDirection, 1.4f); } if (struck && !diverged && ((EntityState)this).fixedAge >= duration * 0.62f) { diverged = true; Strike(impactPoint, 3.4f * Widening, 0.65f * Weight, DamageTypeCombo.GenericSecondary, 2600f, divergentFlash); if (JujutsuConfig.DrawBasicAttackEffects) { YujiFx.Divergent(impactPoint, Facing(), Tint, JujutsuFxScale.Of(((EntityState)this).characterBody, 1.5f * Widening), DivergentWeight); } else { JujutsuFxShake.Directional(impactPoint, Facing(), DivergentWeight); } JujutsuSfxAssets.PlayMeleeHeavy(impactPoint); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private Vector3 Facing() { //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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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_0037: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.ProjectOnPlane(aimDirection, Vector3.up); Vector3 result = ((Vector3)(ref val)).normalized; if (((Vector3)(ref result)).sqrMagnitude < 0.01f) { result = ((EntityState)this).characterBody.transform.forward; } return result; } private Vector3 ImpactPoint() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).characterBody.corePosition + Facing() * (kicking ? 2.3f : 1.9f) * Lengthening; } private void Gather() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) Transform anchor = ((EntityState)this).characterBody.transform; Transform val = default(Transform); Transform val2 = default(Transform); if (!kicking && JujutsuBones.TryFindHands(((EntityState)this).characterBody, ref val, ref val2)) { anchor = (rightHand ? val2 : val); } YujiFx.Gather(anchor, Tint, JujutsuFxScale.Of(((EntityState)this).characterBody, 0.34f), duration * 0.32f); } private void Strike(Vector3 point, float radius, float coefficient, DamageTypeCombo damageType, float force, Prepared flash) { //IL_001a: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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) //IL_006b: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_00b6: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).isAuthority) { return; } bool landed = ((Prepared)(ref flash)).Landed; float multiplier = ((Prepared)(ref flash)).Multiplier; Vector3 val = Vector3.ProjectOnPlane(aimDirection, Vector3.up); Vector3 normalized = ((Vector3)(ref val)).normalized; int num = GojoMeleeAttackUtility.Fire(((EntityState)this).gameObject, ((EntityState)this).characterBody, ((BaseState)this).GetTeam(), point, radius, ((BaseState)this).damageStat * coefficient * multiplier, normalized * force + Vector3.up * (force * 0.18f), ((BaseState)this).RollCrit() || landed, damageType); if (num <= 0) { return; } if (landed) { if (announced) { BlackFlash.Land(point, true); } else { BlackFlash.Land(point, "Yuji", true); } announced = true; YujiFx.Flash(((EntityState)this).characterBody, point, Facing(), JujutsuFxScale.Of(((EntityState)this).characterBody, 0.8f * Widening), major: false); } if (!lentHands) { CursedEnergyController component = ((Component)((EntityState)this).characterBody).GetComponent(); if (component != null) { component.RestoreFromMelee(9f); } } if (landed) { YujiVessel.RequestReward(((EntityState)this).characterBody, num); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public sealed class YujiManjiKickState : BaseSkillState { internal const float Coefficient = 7.5f; private const float HitPhase = 0.42f; private float duration; private Vector3 aimDirection; private bool kicked; private bool lentHands; public override void OnEnter() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_004a: 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_00b6: 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) ((BaseState)this).OnEnter(); lentHands = YujiSukunaHands.Engaged(((EntityState)this).characterBody); duration = 0.85f / Mathf.Max(0.1f, ((BaseState)this).attackSpeedStat); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; aimDirection = ((Vector3)(ref direction)).normalized; ((EntityState)this).characterBody.SetAimTimer(duration + 0.2f); GojoModelAnimator val = GojoModelAnimator.Find(((EntityState)this).characterBody); if (Object.op_Implicit((Object)(object)val)) { val.TriggerSpinKick(duration, 0.42f); } JujutsuSfxAssets.PlayMeleeLight(((EntityState)this).characterBody.corePosition); YujiFx.Gather(((EntityState)this).characterBody.transform, lentHands ? YujiSukunaHands.Cursed : YujiLanguage.Colour, JujutsuFxScale.Of(((EntityState)this).characterBody, 0.4f), duration * 0.42f); } public override void FixedUpdate() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_007d: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: 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_0126: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: 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) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018c: 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_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_021f: 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) ((EntityState)this).FixedUpdate(); GojoStateUtils.SlowMovementDuringAttack(((EntityState)this).characterMotor, ((EntityState)this).isAuthority, 0.5f); if (!kicked && ((EntityState)this).fixedAge >= duration * 0.42f) { kicked = true; Vector3 val = Vector3.ProjectOnPlane(aimDirection, Vector3.up); Vector3 val2 = ((Vector3)(ref val)).normalized; if (((Vector3)(ref val2)).sqrMagnitude < 0.01f) { val2 = ((EntityState)this).characterBody.transform.forward; } float num = (lentHands ? 1.9f : 1f); float num2 = (lentHands ? 1.55f : 1f); float num3 = (lentHands ? 1.3f : 1f); Vector3 val3 = ((EntityState)this).characterBody.corePosition + val2 * 2.2f * num; if (JujutsuConfig.DrawBasicAttackEffects) { JujutsuImpact.Strike(val3, val2, lentHands ? YujiSukunaHands.Cursed : YujiLanguage.Colour, JujutsuFxScale.Of(((EntityState)this).characterBody, 1.4f * num2), JujutsuFxScale.Weight(7.5f * num3), true); } else { JujutsuFxShake.Directional(val3, val2, JujutsuFxScale.Weight(7.5f * num3)); } if (((EntityState)this).isAuthority) { Prepared val4 = BlackFlash.Roll(2f, ((EntityState)this).characterBody); int num4 = GojoMeleeAttackUtility.Fire(((EntityState)this).gameObject, ((EntityState)this).characterBody, ((BaseState)this).GetTeam(), val3, 3.6f * num2, ((BaseState)this).damageStat * 7.5f * num3 * ((Prepared)(ref val4)).Multiplier, val2 * 900f + Vector3.up * 3200f, ((BaseState)this).RollCrit() || ((Prepared)(ref val4)).Landed, DamageTypeCombo.GenericSecondary); if (num4 > 0) { if (((Prepared)(ref val4)).Landed) { BlackFlash.Land(val3, "Yuji", true); YujiFx.Flash(((EntityState)this).characterBody, val3, val2, JujutsuFxScale.Of(((EntityState)this).characterBody, 0.9f * num2), major: false); } JujutsuSfxAssets.PlayMeleeHeavy(val3); JujutsuMotes.Burst(val3, Vector3.up, lentHands ? YujiSukunaHands.Cursed : YujiLanguage.Colour, JujutsuFxScale.Of(((EntityState)this).characterBody, 2f * num2), (JujutsuMoteKind)0, 0); if (!lentHands) { CursedEnergyController component = ((Component)((EntityState)this).characterBody).GetComponent(); if (component != null) { component.RestoreFromMelee(12f); } } if (((Prepared)(ref val4)).Landed) { YujiVessel.RequestReward(((EntityState)this).characterBody, num4); } } } GojoStateUtils.StepIntoBlow(((EntityState)this).characterMotor, ((EntityState)this).isAuthority, aimDirection, 2.2f); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public sealed class YujiRushState : BaseSkillState { internal const float Distance = 20f; private const float Speed = 50f; private const float Duration = 0.4f; internal const float Coefficient = 12f; internal const float Reach = 4f; private const float Force = 900f; private const float RecoilFraction = 0.55f; private readonly HashSet struck = new HashSet(); private Vector3 lastPoint; private bool recoiled; private Vector3 direction; private bool gravityHeld; private YujiFx.Wake wake; public override void OnEnter() { //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_0010: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0112: 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_0093: 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_00f1: 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) ((BaseState)this).OnEnter(); Ray aimRay = ((BaseState)this).GetAimRay(); direction = ((Ray)(ref aimRay)).direction; direction = ((((Vector3)(ref direction)).sqrMagnitude > 0.0001f) ? ((Vector3)(ref direction)).normalized : ((EntityState)this).characterBody.transform.forward); ((EntityState)this).characterBody.SetAimTimer(0.6f); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Vector3 val = Vector3.ProjectOnPlane(direction, Vector3.up); if (((Vector3)(ref val)).sqrMagnitude > 0.01f) { ((EntityState)this).characterDirection.forward = ((Vector3)(ref val)).normalized; } } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.useGravity = false; gravityHeld = true; KinematicCharacterMotor motor = ((BaseCharacterController)((EntityState)this).characterMotor).Motor; if (motor != null) { motor.ForceUnground(0.1f); } ((EntityState)this).characterMotor.velocity = direction * 50f; } lastPoint = ((EntityState)this).characterBody.corePosition; JujutsuSfxAssets.PlayMeleeLight(((EntityState)this).characterBody.corePosition); wake = YujiFx.Streak(((EntityState)this).characterBody, YujiLanguage.Colour, JujutsuFxScale.Of(((EntityState)this).characterBody, 0.55f), 0.4f); } public override void FixedUpdate() { //IL_002a: 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_0039: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !recoiled) { ((EntityState)this).characterMotor.velocity = direction * 50f; } if (((EntityState)this).isAuthority || NetworkServer.active) { Sweep(); } if (((EntityState)this).fixedAge >= 0.4f && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (gravityHeld && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.useGravity = true; } gravityHeld = false; if (Object.op_Implicit((Object)(object)wake)) { wake.Close(); wake = null; } ((EntityState)this).OnExit(); } private void Sweep() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_008b: 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_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) Vector3 corePosition = ((EntityState)this).characterBody.corePosition; int count = struck.Count; JujutsuDamageUtility.FireCapsule(((EntityState)this).gameObject, ((BaseState)this).GetTeam(), lastPoint, corePosition, 4f, ((BaseState)this).damageStat * 12f, direction * 900f, ((BaseState)this).RollCrit(), 1f, DamageTypeCombo.GenericUtility, struck, (Color?)null, false); lastPoint = corePosition; int num = struck.Count - count; if (num > 0) { JujutsuSfxAssets.PlayMeleeHeavy(corePosition); JujutsuImpact.Strike(corePosition, direction, YujiLanguage.Colour, JujutsuFxScale.Of(((EntityState)this).characterBody, 3.4f), JujutsuFxScale.Weight(12f), true); JujutsuFxHitStop.Hold(((EntityState)this).characterBody, 0.05f, false); Recoil(num); } } private void Recoil(int landed) { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) if (!recoiled) { recoiled = true; Plugin.Log.LogInfo((object)($"yuji rush: struck {landed} at {((EntityState)this).fixedAge:0.000}s, " + $"{struck.Count} in all; bouncing off.")); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = -direction * 27.5f + Vector3.up * 6f; } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public sealed class YujiBlackFlashState : BaseSkillState { internal const float Coefficient = 14f; private const float WindUp = 0.62f; internal const float HitRadius = 5.4f; private const float HitForward = 2.4f; private float duration; private Vector3 aimDirection; private bool struck; private bool announced; private Vector3 Heading() { //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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_0027: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.ProjectOnPlane(aimDirection, Vector3.up); Vector3 normalized = ((Vector3)(ref val)).normalized; if (!(((Vector3)(ref normalized)).sqrMagnitude < 0.01f)) { return normalized; } return ((EntityState)this).characterBody.transform.forward; } private Vector3 ImpactPoint() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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_001b: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).characterBody.corePosition + Heading() * 2.4f; } public override void OnEnter() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_0028: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = 1.12f; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; aimDirection = ((Vector3)(ref direction)).normalized; ((EntityState)this).characterBody.SetAimTimer(duration + 0.3f); GojoModelAnimator val = GojoModelAnimator.Find(((EntityState)this).characterBody); if (Object.op_Implicit((Object)(object)val)) { val.TriggerPunch(false, duration, 1, 0.62f / duration); } if (BlackFlash.AnythingToHit(((BaseState)this).GetTeam(), ImpactPoint(), 5.4f)) { BlackFlash.Announce(((EntityState)this).characterBody.corePosition, "Yuji"); announced = true; } Transform anchor = default(Transform); Transform val2 = default(Transform); if (JujutsuBones.TryFindHands(((EntityState)this).characterBody, ref anchor, ref val2)) { YujiFx.Gather(anchor, YujiFx.FlashEdge, JujutsuFxScale.Of(((EntityState)this).characterBody, 0.42f), 0.62f); } } public override void FixedUpdate() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); GojoStateUtils.SlowMovementDuringAttack(((EntityState)this).characterMotor, ((EntityState)this).isAuthority, 0.25f); if (!struck && ((EntityState)this).fixedAge >= 0.62f) { struck = true; Vector3 val = Heading(); Vector3 val2 = ImpactPoint(); if (BlackFlash.AnythingToHit(((BaseState)this).GetTeam(), val2, 5.4f)) { if (announced) { BlackFlash.Land(val2, false); } else { BlackFlash.Land(val2, "Yuji", false); } YujiFx.Flash(((EntityState)this).characterBody, val2, val, JujutsuFxScale.Of(((EntityState)this).characterBody, 5f), major: true); } JujutsuImpact.Strike(val2, val, YujiFx.FlashEdge, JujutsuFxScale.Of(((EntityState)this).characterBody, 4.9f), JujutsuFxScale.Weight(14f), true); if (((EntityState)this).isAuthority) { float num = Mathf.Max(1f, JujutsuConfig.BlackFlashMultiplier.Value); int num2 = GojoMeleeAttackUtility.Fire(((EntityState)this).gameObject, ((EntityState)this).characterBody, ((BaseState)this).GetTeam(), val2, 5.4f, ((BaseState)this).damageStat * 14f * num, val * 4200f + Vector3.up * 1200f, true, DamageTypeCombo.GenericSpecial); if (num2 > 0) { CursedEnergyController component = ((Component)((EntityState)this).characterBody).GetComponent(); if (component != null) { component.RestoreFromMelee(12f); } YujiVessel.RequestReward(((EntityState)this).characterBody, num2); } } YujiSoulShake.ApplyInSphere(((BaseState)this).GetTeam(), val2, 5.4f); GojoStateUtils.StepIntoBlow(((EntityState)this).characterMotor, ((EntityState)this).isAuthority, aimDirection, 2.8f); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public sealed class YujiSoulStrikeState : BaseSkillState { internal const float BodyCoefficient = 11f; internal const float SoulCoefficient = 18f; internal const float BodyRadius = 4.2f; internal const float SoulRadius = 4.8f; internal const float ShakeSeconds = 8f; internal const float StunSeconds = 2f; private const float WindUp = 0.26f; internal const float SoulDelay = 0.34f; private const float Recovery = 0.24f; private const float Duration = 0.84000003f; private const float HitForward = 2.1f; private Vector3 aimDirection; private Vector3 impactPoint; private bool struck; private bool reached; private bool restored; public override void OnEnter() { //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_0010: 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_0018: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; aimDirection = ((Vector3)(ref direction)).normalized; ((EntityState)this).characterBody.SetAimTimer(1.0400001f); GojoModelAnimator obj = GojoModelAnimator.Find(((EntityState)this).characterBody); if (obj != null) { obj.TriggerPunch(true, 0.84000003f, 0, 0.3095238f); } JujutsuSfxAssets.PlayMeleeLight(((EntityState)this).characterBody.corePosition); Transform val = default(Transform); Transform anchor = default(Transform); if (JujutsuBones.TryFindHands(((EntityState)this).characterBody, ref val, ref anchor)) { YujiFx.Gather(anchor, YujiLanguage.Colour, JujutsuFxScale.Of(((EntityState)this).characterBody, 0.36f), 0.26f); } } public override void FixedUpdate() { //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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: 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_0101: 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_0116: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: 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_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); GojoStateUtils.SlowMovementDuringAttack(((EntityState)this).characterMotor, ((EntityState)this).isAuthority, 0.4f); if (!struck && ((EntityState)this).fixedAge >= 0.26f) { struck = true; impactPoint = ImpactPoint(); JujutsuImpact.Strike(impactPoint, Facing(), YujiLanguage.Colour, JujutsuFxScale.Of(((EntityState)this).characterBody, 3.8f), JujutsuFxScale.Weight(11f), true); Strike(impactPoint, 4.2f, 11f, DamageTypeCombo.GenericSpecial, 1800f); StunInSphere(((BaseState)this).GetTeam(), impactPoint, 4.2f, 2f); GojoStateUtils.StepIntoBlow(((EntityState)this).characterMotor, ((EntityState)this).isAuthority, aimDirection, 1.6f); } if (struck && !reached && ((EntityState)this).fixedAge >= 0.6f) { reached = true; Strike(impactPoint, 4.8f, 18f, DamageTypeCombo.GenericSpecial | DamageTypeCombo.op_Implicit((DamageType)2) | DamageTypeCombo.op_Implicit((DamageType)64), 0f); YujiFx.Inward(((EntityState)this).characterBody, impactPoint, YujiAssets.Cursed, JujutsuFxScale.Of(((EntityState)this).characterBody, 4.4f)); YujiSoulShake.ApplyInSphere(((BaseState)this).GetTeam(), impactPoint, 4.8f, 8f); JujutsuSfxAssets.PlayMeleeHeavy(impactPoint); } if (((EntityState)this).fixedAge >= 0.84000003f && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private Vector3 Facing() { //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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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_0037: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.ProjectOnPlane(aimDirection, Vector3.up); Vector3 result = ((Vector3)(ref val)).normalized; if (((Vector3)(ref result)).sqrMagnitude < 0.01f) { result = ((EntityState)this).characterBody.transform.forward; } return result; } private Vector3 ImpactPoint() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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_001b: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).characterBody.corePosition + Facing() * 2.1f; } private static void StunInSphere(TeamIndex team, Vector3 centre, float radius, float seconds) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) //IL_004d: 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) if (!NetworkServer.active) { return; } ReadOnlyCollection readOnlyInstancesList = CharacterBody.readOnlyInstancesList; if (readOnlyInstancesList == null) { return; } float num = radius * radius; for (int i = 0; i < readOnlyInstancesList.Count; i++) { CharacterBody val = readOnlyInstancesList[i]; if (Object.op_Implicit((Object)(object)val) && !((Object)(object)val.teamComponent == (Object)null) && val.teamComponent.teamIndex != team) { Vector3 val2 = val.corePosition - centre; if (!(((Vector3)(ref val2)).sqrMagnitude > num)) { SetStateOnHurt.SetStunOnObject(((Component)val).gameObject, seconds); } } } } private void Strike(Vector3 point, float radius, float coefficient, DamageTypeCombo damageType, float force) { //IL_000a: 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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_0063: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).isAuthority) { return; } Vector3 val = Vector3.ProjectOnPlane(aimDirection, Vector3.up); Vector3 normalized = ((Vector3)(ref val)).normalized; if (GojoMeleeAttackUtility.Fire(((EntityState)this).gameObject, ((EntityState)this).characterBody, ((BaseState)this).GetTeam(), point, radius, ((BaseState)this).damageStat * coefficient, normalized * force + Vector3.up * (force * 0.2f), ((BaseState)this).RollCrit(), damageType) > 0 && !restored) { restored = true; CursedEnergyController component = ((Component)((EntityState)this).characterBody).GetComponent(); if (component != null) { component.RestoreFromMelee(12f); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public sealed class YujiScissorsState : BaseSkillState { internal const float Coefficient = 14f; internal const float HalfWidth = 6f; internal const float Thickness = 2.1f; internal const float Tilt = 0.38f; internal const float Lift = 0.55f; internal const float Reach = 4.2f; internal const float Depth = 5f; internal const int SliceCount = 3; internal const float MinReach = 2.5f; internal const float MaxReach = 18f; internal const float MaxLift = 8f; private const float AssistAngle = 20f; private const float WindUp = 0.2f; private const float Duration = 0.52f; private const float Force = 700f; private CharacterBody target; private bool cut; public override void OnEnter() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); target = FindAimedTarget(((BaseState)this).GetAimRay()); FaceTarget(); ((EntityState)this).characterBody.SetAimTimer(0.71999997f); GojoModelAnimator obj = GojoModelAnimator.Find(((EntityState)this).characterBody); if (obj != null) { obj.TriggerPunch(true, 0.52f, 0, 0.3846154f); } JujutsuSfxAssets.PlayHeavyWhoosh(((EntityState)this).characterBody.corePosition, 0.6f); Transform val = default(Transform); Transform anchor = default(Transform); if (JujutsuBones.TryFindHands(((EntityState)this).characterBody, ref val, ref anchor)) { YujiFx.Gather(anchor, YujiLanguage.Colour, JujutsuFxScale.Of(((EntityState)this).characterBody, 0.34f), 0.2f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); GojoStateUtils.SlowMovementDuringAttack(((EntityState)this).characterMotor, ((EntityState)this).isAuthority, 0.5f); if (!cut && ((EntityState)this).fixedAge >= 0.2f) { cut = true; Cut(); } if (((EntityState)this).fixedAge >= 0.52f && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Cut() { //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_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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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) //IL_003b: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: 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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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_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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: 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_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: 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_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: 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_0192: 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_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: 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_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = Vector3.ProjectOnPlane(((Ray)(ref aimRay)).direction, Vector3.up); Vector3 val2 = ((Vector3)(ref val)).normalized; if (((Vector3)(ref val2)).sqrMagnitude < 0.01f) { val2 = ((EntityState)this).characterBody.transform.forward; } Vector3 corePosition = ((EntityState)this).characterBody.corePosition; int num; Vector3 val3; if (Object.op_Implicit((Object)(object)target) && Object.op_Implicit((Object)(object)target.healthComponent)) { num = (target.healthComponent.alive ? 1 : 0); if (num != 0) { val3 = target.corePosition; goto IL_009a; } } else { num = 0; } val3 = GojoStateUtils.FindAimPoint(aimRay, 18f); goto IL_009a; IL_009a: Vector3 val4 = val3; float num2 = 4.2f; Vector3 val5 = val4 - corePosition; Vector3 val6 = Vector3.ProjectOnPlane(val5, Vector3.up); if (((Vector3)(ref val6)).sqrMagnitude > 0.04f) { val2 = ((Vector3)(ref val6)).normalized; num2 = Mathf.Clamp(((Vector3)(ref val6)).magnitude, 2.5f, 18f); } float num3 = Mathf.Clamp((num != 0) ? val5.y : (val4.y - ((EntityState)this).characterBody.footPosition.y + 0.55f), -8f, 8f); val = Vector3.Cross(Vector3.up, val2); Vector3 normalized = ((Vector3)(ref val)).normalized; Vector3 val7 = corePosition + val2 * num2 + Vector3.up * num3; val = normalized + Vector3.up * 0.38f; Vector3 normalized2 = ((Vector3)(ref val)).normalized; val = normalized - Vector3.up * 0.38f; Vector3 normalized3 = ((Vector3)(ref val)).normalized; float num4 = 6f * Mathf.Sqrt(1.1444f); YujiFx.Scissors(val7, val2, normalized2, normalized3, YujiLanguage.Colour, num4, 2.1f, 5f, JujutsuFxScale.Weight(14f)); JujutsuSfxAssets.PlaySlashVariant(0, ((EntityState)this).characterBody.corePosition, 0.55f); if (!((EntityState)this).isAuthority && !NetworkServer.active) { return; } HashSet hashSet = new HashSet(); for (int i = 0; i < 3; i++) { Vector3 centre = val7 + val2 * Mathf.Lerp(-2.5f, 2.5f, (float)i / 2f); Sweep(centre, normalized2, num4, val2, hashSet); Sweep(centre, normalized3, num4, val2, hashSet); } if (hashSet.Count > 0) { JujutsuSfxAssets.PlayMeleeHeavy(val7); CursedEnergyController component = ((Component)((EntityState)this).characterBody).GetComponent(); if (component != null) { component.RestoreFromMelee(9f); } } } private void Sweep(Vector3 centre, Vector3 axis, float arm, Vector3 forward, HashSet struck) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0062: Unknown result type (might be due to invalid IL or missing references) JujutsuDamageUtility.FireCapsule(((EntityState)this).gameObject, ((BaseState)this).GetTeam(), centre - axis * arm, centre + axis * arm, 2.1f, ((BaseState)this).damageStat * 14f, forward * 700f + Vector3.up * 105.00001f, ((BaseState)this).RollCrit(), 1f, DamageTypeCombo.GenericUtility, struck, (Color?)null, false); } private CharacterBody FindAimedTarget(Ray aimRay) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: 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) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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) TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(((BaseState)this).GetTeam()); BullseyeSearch val = new BullseyeSearch { searchOrigin = ((Ray)(ref aimRay)).origin, searchDirection = ((Ray)(ref aimRay)).direction, maxDistanceFilter = 22.6f, maxAngleFilter = 20f, teamMaskFilter = allButNeutral, filterByLoS = false, sortMode = (SortMode)3 }; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); foreach (HurtBox result in val.GetResults()) { CharacterBody val2 = ((Object.op_Implicit((Object)(object)result) && Object.op_Implicit((Object)(object)result.healthComponent)) ? result.healthComponent.body : null); if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)val2.healthComponent) && val2.healthComponent.alive) { return val2; } } return null; } private void FaceTarget() { //IL_0021: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0057: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)target) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Vector3 val = Vector3.ProjectOnPlane(target.corePosition - ((EntityState)this).characterBody.corePosition, Vector3.up); if (((Vector3)(ref val)).sqrMagnitude > 0.04f) { ((EntityState)this).characterDirection.forward = ((Vector3)(ref val)).normalized; } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public sealed class YujiPiercingBloodState : BaseSkillState, IPosedState { private const float WindUp = 0.34f; private const float Recovery = 0.22f; internal const float TickInterval = 0.1f; internal const float TickDamage = 0.38f; internal const float TickHealthShare = 0.012f; internal const float BeamLength = 60f; internal const float BeamRadius = 1.1f; private const float JetCore = 0.055f; private const float JetBody = 0.13f; private const float JetHaze = 0.3f; internal const float EnergyPerSecond = 30f; private const float RemoteHoldBackstop = 30f; private const float MuzzleHeight = 0.55f; private const float MuzzleForward = 1.15f; private const float GatherStartRadius = 0.55f; private const float GatherEndRadius = 0.1f; private Vector3 aimDirection; private YujiFx.Knot gatherVisual; private const float SoundInterval = 0.33f; private const float TerminusInterval = 0.22f; private readonly JujutsuHeldBeam beam = new JujutsuHeldBeam(); private PlaybackHandle lanceSound; private float nextSoundAt; private float nextTickAt; private float nextTerminusAt; private float stoppedAt; private bool firing; private bool stopped; private const float BleedInterval = 0.5f; private const float BleedSeconds = 4f; private float nextBleedAt; bool IPosedState.DrivesPose => true; GojoCpuPose IPosedState.Pose => (GojoCpuPose)18; float IPosedState.PosePhase => AnimationPhase; float IPosedState.PoseBob => 0f; float IPosedState.PosePitch => -6f; bool IPosedState.HoldsSlashPose => false; int IPosedState.PosePriority => 10; internal float AnimationPhase => Mathf.Clamp01(((EntityState)this).fixedAge / 0.34f); public override void OnEnter() { //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_003d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); UpdateAim(); ((EntityState)this).characterBody.SetAimTimer(1.34f); gatherVisual = YujiFx.Hold(Muzzle(), YujiAssets.Blood, 0.55f); JujutsuSfxAssets.PlayMeleeLight(((EntityState)this).characterBody.corePosition); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); GojoStateUtils.SlowMovementDuringAttack(((EntityState)this).characterMotor, ((EntityState)this).isAuthority, 0.15f); GojoStateUtils.NoSprintDuring(((EntityState)this).characterBody, ((EntityState)this).isAuthority); if (!firing && !stopped) { UpdateGather(); if (((EntityState)this).fixedAge >= 0.34f) { StartFiring(); } } else if (firing) { UpdateFiring(); } else if (((EntityState)this).fixedAge >= stoppedAt + 0.22f && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void UpdateAim() { //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_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_0011: 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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; Vector3 normalized = ((Vector3)(ref direction)).normalized; aimDirection = ((((Vector3)(ref normalized)).sqrMagnitude > 0.01f) ? normalized : ((EntityState)this).characterBody.transform.forward); ((EntityState)this).characterBody.SetAimTimer(0.5f); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Vector3 val = Vector3.ProjectOnPlane(aimDirection, Vector3.up); if (((Vector3)(ref val)).sqrMagnitude > 0.01f) { ((EntityState)this).characterDirection.forward = ((Vector3)(ref val)).normalized; } } } private Vector3 Muzzle() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)this).characterBody.corePosition + Vector3.up * 0.55f + aimDirection * 1.15f; } private void UpdateGather() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) UpdateAim(); if (Object.op_Implicit((Object)(object)gatherVisual)) { float num = Mathf.Clamp01(((EntityState)this).fixedAge / 0.34f); gatherVisual.Move(Muzzle()); gatherVisual.SetRadius(Mathf.Lerp(0.55f, 0.1f, JujutsuEase.InCubic(num))); } } private void StartFiring() { firing = true; nextTickAt = ((EntityState)this).fixedAge; nextTerminusAt = ((EntityState)this).fixedAge; if (Object.op_Implicit((Object)(object)gatherVisual)) { gatherVisual.Snap(); } } private void UpdateFiring() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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) //IL_0051: 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_0054: 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_0062: 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_001a: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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_0114: Unknown result type (might be due to invalid IL or missing references) UpdateAim(); if (Object.op_Implicit((Object)(object)gatherVisual)) { gatherVisual.Move(Muzzle()); gatherVisual.SetRadius(0.1f); } Vector3 val = Muzzle(); Vector3 val2 = val + aimDirection * 60f; AimBeam(val, val2); ShowTerminus(val); Bleed(val, val2); if (((EntityState)this).fixedAge >= nextTickAt) { nextTickAt = ((EntityState)this).fixedAge + 0.1f; JujutsuDamageUtility.FireCapsule(((EntityState)this).gameObject, ((BaseState)this).GetTeam(), val, val2, 1.1f, ((BaseState)this).damageStat * 0.38f + HealthDamage(), aimDirection * 160f, ((BaseState)this).RollCrit(), 0.1f, DamageTypeCombo.GenericSecondary, (HashSet)null, (Color?)null, true); if (((EntityState)this).fixedAge >= nextSoundAt) { nextSoundAt = ((EntityState)this).fixedAge + 0.33f; PlaybackHandle obj = lanceSound; if (obj != null) { obj.RequestStop(); } lanceSound = JujutsuSfxAssets.PlayMeleeLight(val); } } if ((((EntityState)this).isAuthority && (!JujutsuInput.GetKey(JujutsuConfig.SideSkill1Key.Value) || JujutsuInput.IsBlocked)) || !SpendEnergy() || (!((EntityState)this).isAuthority && ((EntityState)this).fixedAge - 0.34f >= 30f)) { StopFiring(); } } private void Bleed(Vector3 start, Vector3 end) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_008d: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || ((EntityState)this).fixedAge < nextBleedAt) { return; } nextBleedAt = ((EntityState)this).fixedAge + 0.5f; ReadOnlyCollection readOnlyInstancesList = CharacterBody.readOnlyInstancesList; if (readOnlyInstancesList == null) { return; } TeamIndex team = ((BaseState)this).GetTeam(); for (int i = 0; i < readOnlyInstancesList.Count; i++) { CharacterBody val = readOnlyInstancesList[i]; if (Object.op_Implicit((Object)(object)val) && !((Object)(object)val.teamComponent == (Object)null) && val.teamComponent.teamIndex != team && Object.op_Implicit((Object)(object)val.healthComponent) && val.healthComponent.alive) { Vector3 val2 = ClosestPointOnSegment(start, end, val.corePosition); float num = 1.1f + val.radius; Vector3 val3 = val.corePosition - val2; if (!(((Vector3)(ref val3)).sqrMagnitude > num * num)) { DotController.InflictDot(((Component)val).gameObject, ((EntityState)this).gameObject, (HurtBox)null, (DotIndex)0, 4f, 1f, (uint?)null); } } } } private static Vector3 ClosestPointOnSegment(Vector3 start, Vector3 end, Vector3 point) { //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) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0030: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) Vector3 val = end - start; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < 0.0001f) { return start; } float num = Mathf.Clamp01(Vector3.Dot(point - start, val) / sqrMagnitude); return start + val * num; } private float HealthDamage() { if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return 0f; } float num = Mathf.Max(((EntityState)this).characterBody.level - 1f, 0f); return (((EntityState)this).characterBody.baseMaxHealth + ((EntityState)this).characterBody.levelMaxHealth * num) * 0.012f; } private bool SpendEnergy() { if (!((EntityState)this).isAuthority) { return true; } CursedEnergyController component = ((Component)((EntityState)this).characterBody).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { return component.DrainPriced(30f * Time.fixedDeltaTime); } return true; } private void StopFiring() { //IL_0038: 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_0066: Unknown result type (might be due to invalid IL or missing references) firing = false; stopped = true; stoppedAt = ((EntityState)this).fixedAge; PlaybackHandle obj = lanceSound; if (obj != null) { obj.RequestStop(); } lanceSound = null; JujutsuSfxAssets.PlayMeleeHeavy(((EntityState)this).characterBody.corePosition); beam.Close(); if (Object.op_Implicit((Object)(object)gatherVisual)) { gatherVisual.CloseAndBurst(aimDirection, YujiAssets.Blood); gatherVisual = null; } } private void AimBeam(Vector3 start, Vector3 end) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (!beam.IsOpen) { beam.Open(start, end, 0.055f, YujiAssets.BloodJetCore, 0.13f, YujiAssets.BloodJet, 0.3f, YujiAssets.BloodJetHaze); } beam.Aim(start, end, 1f + Mathf.Sin(Time.time * 97f) * 0.05f + Mathf.Sin(Time.time * 41f) * 0.03f); } private void ShowTerminus(Vector3 start) { //IL_0021: 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_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_0037: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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) if (!(((EntityState)this).fixedAge < nextTerminusAt)) { nextTerminusAt = ((EntityState)this).fixedAge + 0.22f; Vector3 point = start + aimDirection * 60f; Vector3 normal = -aimDirection; RaycastHit val = default(RaycastHit); bool flag = Physics.Raycast(start, aimDirection, ref val, 60f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1); if (flag) { point = ((RaycastHit)(ref val)).point; normal = ((RaycastHit)(ref val)).normal; } YujiFx.Lance(point, aimDirection, normal, YujiAssets.Blood, JujutsuFxScale.Of(((EntityState)this).characterBody, 0.75f), flag); } } public override void OnExit() { beam.Close(); if (Object.op_Implicit((Object)(object)gatherVisual)) { EntityState.Destroy((Object)(object)((Component)gatherVisual).gameObject); gatherVisual = null; } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public sealed class YujiDivergentImpactState : BaseSkillState, IPosedState { internal const float FirstCoefficient = 7.5f; internal const float SecondCoefficient = 10.5f; internal const float FirstRadius = 12f; internal const float SecondRadius = 16f; internal const float StunSeconds = 2.5f; private const float WindUp = 0.34f; internal const float DivergentDelay = 0.4f; private const float Recovery = 0.3f; private const float Force = 1400f; private const float Lift = 500f; private bool first; private bool second; bool IPosedState.DrivesPose => true; GojoCpuPose IPosedState.Pose => (GojoCpuPose)19; float IPosedState.PosePhase => AnimationPhase; float IPosedState.PoseBob => 0f; float IPosedState.PosePitch => 0f; bool IPosedState.HoldsSlashPose => false; int IPosedState.PosePriority => 10; internal float AnimationPhase => Mathf.Clamp01(((EntityState)this).fixedAge / 1.04f); public override void OnEnter() { //IL_005b: 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) ((BaseState)this).OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { if (((EntityState)this).isAuthority) { GenericSkill activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; if (activatorSkillSlot != null) { activatorSkillSlot.AddOneStock(); } ((EntityState)this).outer.SetNextStateToMain(); } } else { ((EntityState)this).characterBody.SetAimTimer(1.24f); JujutsuSfxAssets.PlayHeavyWhoosh(((EntityState)this).characterBody.corePosition, 0.7f); YujiFx.QuakeTell(((EntityState)this).characterBody.footPosition, YujiLanguage.Colour, JujutsuFxScale.Of(((EntityState)this).characterBody, 3.4f), 0.34f); } } public override void FixedUpdate() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.moveDirection = Vector3.zero; Vector3 velocity = ((EntityState)this).characterMotor.velocity; velocity.x = 0f; velocity.z = 0f; ((EntityState)this).characterMotor.velocity = velocity; } if (!first && ((EntityState)this).fixedAge >= 0.34f) { first = true; Pulse(12f, 7.5f, mark: false); } if (!second && ((EntityState)this).fixedAge >= 0.74f) { second = true; Pulse(16f, 10.5f, mark: true); } if (((EntityState)this).fixedAge >= 1.04f && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Pulse(float radius, float coefficient, bool mark) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_0087: 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_00b6: 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_00bc: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) Vector3 footPosition = ((EntityState)this).characterBody.footPosition; YujiFx.Quake(footPosition, YujiLanguage.Colour, radius, JujutsuFxScale.Weight(coefficient), mark); JujutsuSfxAssets.PlayMeleeHeavy(footPosition); bool isAuthority = ((EntityState)this).isAuthority; if (!isAuthority && !NetworkServer.active) { return; } ReadOnlyCollection readOnlyInstancesList = CharacterBody.readOnlyInstancesList; if (readOnlyInstancesList == null) { return; } TeamIndex team = ((BaseState)this).GetTeam(); float num = radius * radius; int num2 = 0; for (int i = 0; i < readOnlyInstancesList.Count; i++) { CharacterBody val = readOnlyInstancesList[i]; if (!Object.op_Implicit((Object)(object)val) || (Object)(object)val.teamComponent == (Object)null || val.teamComponent.teamIndex == team || !Object.op_Implicit((Object)(object)val.healthComponent) || !val.healthComponent.alive) { continue; } Vector3 val2 = val.corePosition - footPosition; if (!(((Vector3)(ref val2)).sqrMagnitude > num)) { num2++; Vector3 val3 = val.corePosition - footPosition; val3.y = 0f; val3 = ((((Vector3)(ref val3)).sqrMagnitude > 0.01f) ? ((Vector3)(ref val3)).normalized : ((EntityState)this).characterBody.transform.forward); if (isAuthority) { GojoMeleeAttackUtility.Fire(((EntityState)this).gameObject, ((EntityState)this).characterBody, team, val.corePosition, 2.2f, ((BaseState)this).damageStat * coefficient, val3 * 1400f + Vector3.up * 500f, ((BaseState)this).RollCrit(), DamageTypeCombo.GenericSpecial); } if (NetworkServer.active) { SetStateOnHurt.SetStunOnObject(((Component)val).gameObject, 2.5f); } } } if (num2 > 0) { YujiVessel.Surface(((EntityState)this).characterBody); CursedEnergyController component = ((Component)((EntityState)this).characterBody).GetComponent(); if (component != null) { component.RestoreFromMelee(12f); } } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace GojoSatoruMod.Content { internal static class YujiAssets { private enum Shape { TwoRings, ArrowUp, ArrowAcross, Split, Vessel, Lance, Inner, Cut, Scissors } private const int Size = 128; private static readonly Color Backing = new Color(0.1f, 0.03f, 0.03f, 1f); internal static readonly Color Ink = new Color(0.95f, 0.42f, 0.32f, 1f); private static readonly Color Flash = new Color(0.9f, 0.08f, 0.14f, 1f); internal static readonly Color Cursed = new Color(0.34f, 0.7f, 0.97f, 1f); internal static readonly Color BloodCore = new Color(1f, 0.72f, 0.7f, 1f); internal static readonly Color Blood = new Color(0.7f, 0.05f, 0.09f, 1f); internal static readonly Color BloodEdge = new Color(0.24f, 0.01f, 0.03f, 0.92f); internal static readonly Color BloodJetCore = new Color(1f, 0.42f, 0.38f, 1f); internal static readonly Color BloodJet = new Color(0.52f, 0.02f, 0.05f, 1f); internal static readonly Color BloodJetHaze = new Color(0.16f, 0f, 0.02f, 0.34f); private static DecodedAttackSound[] flashVoices; private const float VoiceInterval = 9f; private static float nextVoiceAllowedTime; private const float VoiceVolume = 1f; internal static Sprite DivergentIcon { get; private set; } internal static Sprite KickIcon { get; private set; } internal static Sprite RushIcon { get; private set; } internal static Sprite FlashIcon { get; private set; } internal static Sprite PassiveIcon { get; private set; } internal static Sprite BloodIcon { get; private set; } internal static Sprite SoulIcon { get; private set; } internal static Sprite ScissorsIcon { get; private set; } internal static Sprite StanceSukunaIcon { get; private set; } internal static Sprite StanceYujiIcon { get; private set; } internal static Sprite LeapIcon { get; private set; } internal static Sprite FlowIcon { get; private set; } internal static Sprite ImpactIcon { get; private set; } internal static DecodedAttackSound DomainVoice { get; private set; } internal static DecodedAttackSound DomainTheme { get; private set; } internal static Sprite DomainIcon { get; private set; } internal static Texture2D Portrait { get; private set; } internal static DecodedAttackSound SpawnVoice { get; private set; } internal static DecodedAttackSound LowHealthVoice { get; private set; } internal static DecodedAttackSound[] VoiceLines { get; private set; } internal static void Initialize() { DivergentIcon = GojoAssets.LoadIcon("yuji-divergent", (Func)(() => Draw("texYujiDivergent", Shape.TwoRings, Ink))); KickIcon = GojoAssets.LoadIcon("yuji-kick", (Func)(() => Draw("texYujiKick", Shape.ArrowUp, Ink))); RushIcon = GojoAssets.LoadIcon("yuji-rush", (Func)(() => Draw("texYujiRush", Shape.ArrowAcross, Ink))); FlashIcon = GojoAssets.LoadIcon("yuji-flash", (Func)(() => Draw("texYujiFlash", Shape.Split, Flash))); PassiveIcon = GojoAssets.LoadIcon("yuji-passive", (Func)(() => Draw("texYujiPassive", Shape.Vessel, Flash))); BloodIcon = GojoAssets.LoadIcon("yuji-blood", (Func)(() => Draw("texYujiBlood", Shape.Lance, Blood))); SoulIcon = GojoAssets.LoadIcon("yuji-soul", (Func)(() => Draw("texYujiSoul", Shape.Inner, Ink))); ScissorsIcon = GojoAssets.LoadIcon("yuji-scissors", (Func)(() => Draw("texYujiScissors", Shape.Scissors, Ink))); LeapIcon = GojoAssets.LoadIcon("yuji-leap", (Func)(() => Draw("texYujiLeap", Shape.ArrowUp, Ink))); FlowIcon = GojoAssets.LoadIcon("yuji-flow", (Func)(() => Draw("texYujiFlow", Shape.ArrowUp, Cursed))); ImpactIcon = GojoAssets.LoadIcon("yuji-impact", (Func)(() => Draw("texYujiImpact", Shape.TwoRings, Ink))); DomainIcon = GojoAssets.LoadIcon("yuji-domain", (Func)(() => Draw("texYujiDomain", Shape.Vessel, Ink))); StanceSukunaIcon = GojoAssets.LoadIcon("yuji-stance-sukuna", (Func)(() => Draw("texYujiStanceSukuna", Shape.Lance, Blood))); StanceYujiIcon = GojoAssets.LoadIcon("yuji-stance-yuji", (Func)(() => Draw("texYujiStanceYuji", Shape.TwoRings, Ink))); Portrait = GojoAssets.LoadPersistentTexture("ui/yuji-portrait.png", "texYujiPortrait"); if (Object.op_Implicit((Object)(object)Portrait)) { GojoAssets.PreparePersistentTexture(Portrait); } } internal static IEnumerator LoadVoices() { string[] files = new string[3] { "yuji-flash1.mp3", "yuji-flash2.mp3", "yuji-flash3.mp3" }; DecodedAttackSound[] loaded = (DecodedAttackSound[])(object)new DecodedAttackSound[files.Length]; for (int index = 0; index < files.Length; index++) { loaded[index] = GojoAssets.LoadSound(files[index], 1f, "Yuji", 0f); yield return null; } flashVoices = loaded; SpawnVoice = GojoAssets.LoadSound("yuji-spawn.mp3", 1f, "Yuji", 0f); yield return null; DomainVoice = GojoAssets.LoadSound("yuji-domain.mp3", 1f, "Yuji", 0f); yield return null; DomainTheme = GojoAssets.LoadSound("yuji-domain-theme.mp3", 1f, "Yuji", 90f); yield return null; LowHealthVoice = GojoAssets.LoadSound("yuji-low-health.mp3", 1f, "Yuji", 0f); yield return null; string[] chatter = new string[8] { "yuji-voice2.mp3", "spirits-spirits.mp3", "i-will-kill-you.mp3", "yuji-voice3.mp3", "yuji-voice4.mp3", "yuji-voice5.mp3", "yuji-voice6.mp3", "yuji-voice7.mp3" }; DecodedAttackSound[] lines = (DecodedAttackSound[])(object)new DecodedAttackSound[chatter.Length]; for (int index = 0; index < chatter.Length; index++) { lines[index] = GojoAssets.LoadSound(chatter[index], 1f, "Yuji", 0f); yield return null; } VoiceLines = lines; } internal static void TryPlayVoice(Vector3 position, float chance) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) if (VoiceLines != null && VoiceLines.Length != 0 && !(Time.realtimeSinceStartup < nextVoiceAllowedTime) && !(Random.value > Mathf.Clamp01(chance))) { DecodedAttackSound val = GojoAssets.PickVoice(VoiceLines); if (val != null) { GojoAssets.PlayAttackSound(val, position, 1f, 0f, "Yuji", true, false); nextVoiceAllowedTime = Time.realtimeSinceStartup + 9f; } } } internal static void PlayLowHealthVoice(Vector3 position) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) if (LowHealthVoice != null) { GojoAssets.PlayAttackSound(LowHealthVoice, position, 1f, 0f, "Yuji", true, false); } } internal static void PlayFlashVoice(Vector3 position) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) if (flashVoices != null && flashVoices.Length != 0 && !(Time.realtimeSinceStartup < nextVoiceAllowedTime)) { DecodedAttackSound val = flashVoices[Random.Range(0, flashVoices.Length)]; if (val != null) { GojoAssets.PlayAttackSound(val, position, 1f, 0f, "Yuji", true, false); nextVoiceAllowedTime = Time.realtimeSinceStartup + 9f; } } } private static Sprite Draw(string name, Shape shape, Color ink) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(128, 128, (TextureFormat)4, false); ((Object)val).name = name; ((Texture)val).wrapMode = (TextureWrapMode)1; Color[] array = (Color[])(object)new Color[16384]; for (int i = 0; i < 128; i++) { for (int j = 0; j < 128; j++) { float u = ((float)j + 0.5f) / 128f * 2f - 1f; float v = ((float)i + 0.5f) / 128f * 2f - 1f; array[i * 128 + j] = Sample(shape, u, v, ink); } } val.SetPixels(array); val.Apply(); Sprite obj = Sprite.Create(val, new Rect(0f, 0f, 128f, 128f), new Vector2(0.5f, 0.5f), 100f); ((Object)obj).name = "sprite" + name; GojoAssets.PreparePersistentSprite(obj); return obj; } private static Color Sample(Shape shape, float u, float v, Color ink) { //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_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_043a: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) if (Mathf.Max(Mathf.Abs(u), Mathf.Abs(v)) > 0.94f) { return Color.clear; } Color result = Backing; switch (shape) { case Shape.TwoRings: { float radius = Mathf.Sqrt(u * u + v * v); if (Ring(radius, 0.38f, 0.09f)) { result = ink; } else if (Ring(radius, 0.72f, 0.05f)) { ((Color)(ref result))..ctor(ink.r, ink.g, ink.b, 0.85f); } break; } case Shape.ArrowUp: if (Chevron(u, v, 0.3f) || Bar(u, v, 0.13f, 0.55f)) { result = ink; } break; case Shape.ArrowAcross: if (Chevron(v, 0f - u, 0.3f) || Bar(v, 0f - u, 0.13f, 0.55f)) { result = ink; } break; case Shape.Split: { float num10 = 0.1f + 0.22f * Mathf.Abs(v); if (Mathf.Abs(v) < 0.62f && Mathf.Abs(u) > num10 && Mathf.Abs(u) < num10 + 0.3f) { result = ink; } break; } case Shape.Vessel: { float num3 = Mathf.Sqrt(u * u + v * v); if (Ring(num3, 0.66f, 0.08f)) { result = ink; } else if (num3 < 0.34f) { ((Color)(ref result))..ctor(0.02f, 0f, 0.03f, 1f); } break; } case Shape.Inner: { float num4 = Mathf.Sqrt(u * u + v * v); if (Ring(num4, 0.74f, 0.045f)) { ((Color)(ref result))..ctor(ink.r, ink.g, ink.b, 0.7f); } else if (num4 < 0.4f) { float num5 = 0.1f + 0.3f * Mathf.Abs(v); result = (Color)((Mathf.Abs(u) < num5) ? new Color(0.02f, 0f, 0.03f, 1f) : ink); } break; } case Shape.Cut: { float num6 = 0.075f * (1f - Mathf.Abs(u) * 0.85f); if (Mathf.Abs(v) < num6) { result = ink; } else if (Mathf.Abs(u) < 0.55f && Mathf.Abs(Mathf.Abs(v) - 0.44f) < 0.035f) { ((Color)(ref result))..ctor(ink.r, ink.g, ink.b, 0.6f); } break; } case Shape.Scissors: { float num7 = (u + 0.86f) / 0.19f; bool num8 = u > -0.86f && u < -0.1f && Mathf.Abs(v) < 0.055f && num7 - (float)Mathf.FloorToInt(num7) < 0.62f; bool flag = Stroke(u, v, 0.54f, -0.09f, -0.28f, 0.21f, 0.045f) || Stroke(u, v, 0.54f, 0.09f, -0.28f, -0.21f, 0.045f) || Stroke(u, v, 0.5f, -0.06f, 0.62f, -0.34f, 0.042f) || Stroke(u, v, 0.5f, 0.06f, 0.62f, 0.34f, 0.042f); float num9 = (u - 0.3f) * (u - 0.3f) + v * v; bool flag2 = Ring(Reach(u, v, 0.68f, 0.42f), 0.18f, 0.05f) || Ring(Reach(u, v, 0.68f, -0.42f), 0.18f, 0.05f); if (num8 || flag || flag2 || num9 < 0.0049f) { result = ink; } break; } case Shape.Lance: { float num = Mathf.Clamp01((u + v + 1.2f) / 2.4f); float num2 = (u - v) * 0.7071f; if (num > 0f && num < 1f && Mathf.Abs(num2) < 0.16f * (1f - num) + 0.018f) { result = ink; } break; } } return result; } private static bool Ring(float radius, float at, float width) { return Mathf.Abs(radius - at) < width; } private static bool Bar(float u, float v, float halfWidth, float top) { if (Mathf.Abs(u) < halfWidth && v < top) { return v > -0.62f; } return false; } private static float Reach(float u, float v, float cx, float cy) { return Mathf.Sqrt((u - cx) * (u - cx) + (v - cy) * (v - cy)); } private static bool Stroke(float u, float v, float ax, float ay, float bx, float by, float half) { float num = bx - ax; float num2 = by - ay; float num3 = Mathf.Max(1E-05f, num * num + num2 * num2); float num4 = Mathf.Clamp01(((u - ax) * num + (v - ay) * num2) / num3); float num5 = u - (ax + num * num4); float num6 = v - (ay + num2 * num4); return num5 * num5 + num6 * num6 < half * half; } private static bool Chevron(float u, float v, float thickness) { float num = Mathf.Abs(Mathf.Abs(u) - (0.62f - v)); if (v > 0.02f && v < 0.72f) { return num < thickness * 0.5f; } return false; } } internal static class YujiBuffs { internal static readonly Color Colour = new Color(0.34f, 0.7f, 0.97f, 1f); internal static BuffDef Flow { get; private set; } internal static BuffDef Held { get; private set; } internal static void Register() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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_0078: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)Flow)) { BuffDef val = ScriptableObject.CreateInstance(); ((Object)val).name = "bdYujiFlow"; val.buffColor = Colour; val.iconSprite = YujiAssets.FlowIcon; val.canStack = false; val.isDebuff = false; val.isCooldown = false; val.isHidden = false; JujutsuContentPack.Buffs.Add(val); Flow = val; BuffDef val2 = ScriptableObject.CreateInstance(); ((Object)val2).name = "bdYujiDomainHeld"; val2.buffColor = YujiDomainField.Colour; val2.iconSprite = YujiAssets.FlowIcon; val2.canStack = false; val2.isDebuff = true; val2.isCooldown = false; val2.isHidden = false; JujutsuContentPack.Buffs.Add(val2); Held = val2; Plugin.Log.LogInfo((object)"Yuji flow buff registered; the war cry is no longer borrowed. The domain's hold marker is registered alongside it."); } } } internal static class YujiLanguage { internal const string Prefix = "CODEX_YUJI_"; internal static readonly Color Colour = new Color(0.91f, 0.36f, 0.31f, 1f); internal static void Register() { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) LanguageAPI.Add("CODEX_YUJI_NAME", "Yuji Itadori"); LanguageAPI.Add("CODEX_YUJI_SUBTITLE", "Sukuna's Vessel"); LanguageAPI.Add("CODEX_YUJI_SKIN_DEFAULT_NAME", "Jujutsu High"); LanguageAPI.Add("CODEX_YUJI_SKIN_SECOND_NAME", "Second"); LanguageAPI.Add("CODEX_YUJI_SKIN_THIRD_NAME", "Third"); LanguageAPI.Add("CODEX_YUJI_SKIN_FOURTH_NAME", "Fourth"); LanguageAPI.Add("CODEX_YUJI_SKIN_FIFTH_NAME", "Fifth"); LanguageAPI.Add("CODEX_YUJI_SKIN_SIXTH_NAME", "Sixth"); LanguageAPI.Add("CODEX_YUJI_SKIN_SEVENTH_NAME", "Shinjuku Showdown"); LanguageAPI.Add("CODEX_YUJI_DESCRIPTION", "Yuji has no technique of his own, so he throws himself at things and hits them until they stop. Every punch can Black Flash, and his chance of it is far above anyone else's."); LanguageAPI.Add("CODEX_YUJI_STANCE_NAME", "Sukuna's Hands / His Own"); LanguageAPI.Add("CODEX_YUJI_STANCE_DESCRIPTION", StatText.Utility(JujutsuInput.Describe(JujutsuConfig.StanceKey.Value)) + " lends his fists to the thing inside him. They land " + StatText.Damage("nearly twice as far out") + ", cut half again as wide and hit " + StatText.Damage("thirty per cent harder") + ", drawn in Sukuna's crimson rather than his own. It reaches the Divergent Fist and the Manji Kick and stops there — the lance, the cut, the quake and the rush are techniques with their own shape and their own price. Press it again to take his hands back."); LanguageAPI.Add("CODEX_YUJI_PRIMARY_NAME", "Divergent Fist"); LanguageAPI.Add("CODEX_YUJI_PRIMARY_DESCRIPTION", "Punch for " + StatText.Damage(StatText.Percent(1.15f) + " damage") + ", then land a second cursed-energy impact for " + StatText.Damage(StatText.Percent(0.65f) + " damage") + " in a wider radius a moment later. Both halves can trigger " + StatText.Damage("Black Flash") + ", and Yuji's chance of that is " + StatText.Number(2f) + " times anyone else's."); float num = ((JujutsuConfig.BlackFlashChance != null) ? JujutsuConfig.BlackFlashChance.Value : 1f); float num2 = ((JujutsuConfig.BlackFlashMultiplier != null) ? JujutsuConfig.BlackFlashMultiplier.Value : 2.5f); LanguageAPI.Add("CODEX_YUJI_PASSIVE_NAME", "Black Flash — Sukuna's Vessel"); LanguageAPI.Add("CODEX_YUJI_PASSIVE_DESCRIPTION", "Every melee hit Yuji lands can " + StatText.Damage("Black Flash") + ", and he is the one who does it on purpose: " + StatText.Damage(StatText.Number(num * 2f) + "% a hit") + " against everyone else's " + StatText.Number(num) + "% — " + StatText.Damage(StatText.Number(2f) + " times the chance") + ", for " + StatText.Damage(StatText.Number(num2) + "x damage") + " when one lands.\n\nLanding one puts him " + StatText.Utility("in the flow for " + StatText.Number(6f) + " seconds") + ": " + StatText.Utility("+" + StatText.Fraction(1f) + " attack speed") + ", " + StatText.Utility("+" + StatText.Fraction(0.5f) + " movement speed") + ", cursed energy in both hands, and " + StatText.Healing("heals " + StatText.Fraction(YujiVessel.HealShares[0]) + " of his health per enemy struck") + " — the thing inside him repairs the body it lives in.\n\nLand another before that runs out and he is in the zone: " + StatText.Healing(StatText.Fraction(YujiVessel.HealShares[1]) + " healing") + " and " + StatText.Healing("+" + StatText.Number(YujiVessel.StreakArmour[1]) + " armor") + ", then " + StatText.Healing(StatText.Fraction(YujiVessel.HealShares[2]) + " healing") + " and " + StatText.Healing("+" + StatText.Number(YujiVessel.StreakArmour[2]) + " armor") + " at the third, where he also " + StatText.Healing("refuses one heavy hit every " + StatText.Number(3f) + " seconds") + " outright. Stop landing them and it all lapses.\n\n" + StatText.Utility("Any kill puts him in the flow") + " and keeps him there, but never climbs it: killing is the way in, flashes are the way up.\n\n" + StatText.EnergyRule()); LanguageAPI.Add("CODEX_YUJI_SECONDARY_NAME", "Manji Kick"); LanguageAPI.Add("CODEX_YUJI_SECONDARY_DESCRIPTION", "A turning kick for " + StatText.Damage(StatText.Percent(7.5f) + " damage") + " that throws enemies " + StatText.Utility("upward") + " rather than away. It can " + StatText.Damage("Black Flash") + " like everything else he throws. " + StatText.Seconds(3f) + " second cooldown."); LanguageAPI.Add("CODEX_YUJI_UTILITY_NAME", "Rush"); LanguageAPI.Add("CODEX_YUJI_UTILITY_DESCRIPTION", "Dash " + StatText.Utility(StatText.Metres(20f)) + " " + StatText.Utility("wherever you are aiming") + ", upward included, hitting everything you pass through for " + StatText.Damage(StatText.Percent(12f) + " damage") + " once each, and " + StatText.Utility("bouncing off whatever you hit") + ". Nothing is targeted: aim at an enemy and you fly into them, aim at nothing and it is a jump. " + StatText.Utility("One charge") + ", back every " + StatText.Seconds(7f) + " seconds."); LanguageAPI.Add("CODEX_YUJI_QUAKE_NAME", "Divergent Quake"); LanguageAPI.Add("CODEX_YUJI_QUAKE_DESCRIPTION", "Stamp the ground hard enough to break it. Everything within " + StatText.Utility(StatText.Metres(12f)) + " takes " + StatText.Damage(StatText.Percent(7.5f) + " damage") + ", and " + StatText.Number(0.4f) + " seconds later the divergent wave arrives across " + StatText.Utility(StatText.Metres(16f)) + " for " + StatText.Damage(StatText.Percent(10.5f) + " damage") + ". Nothing is aimed at: it is everything around you. Both waves " + StatText.Utility("stun for " + StatText.Number(2.5f) + " seconds") + ", so what the first catches is still there for the second, and landing it puts you " + StatText.Healing("straight into the flow at its top tier") + ". " + StatText.Health(StatText.Number(35f) + " cursed energy") + ". " + StatText.Seconds(16f) + " second cooldown."); LanguageAPI.Add("CODEX_YUJI_FLASH_NAME", "Black Flash"); LanguageAPI.Add("CODEX_YUJI_FLASH_DESCRIPTION", "Wind up and land a " + StatText.Damage("guaranteed Black Flash") + " for " + StatText.Damage(StatText.Percent(14f) + " damage") + ", multiplied again by the black flash itself. The blow lands on the soul as well: everything it catches " + StatText.Health("cannot be healed for " + StatText.Number(5f) + " seconds") + " and " + StatText.Utility("loses whatever it had going for it") + ". The wind-up is the cost. " + StatText.Health(StatText.Number(35f) + " cursed energy") + ". " + StatText.Seconds(14f) + " second cooldown."); LanguageAPI.Add("CODEX_YUJI_SOUL_NAME", "Soul Strike"); LanguageAPI.Add("CODEX_YUJI_SOUL_DESCRIPTION", "Throw one punch that arrives twice. The body takes " + StatText.Damage(StatText.Percent(11f) + " damage") + ", and " + StatText.Number(0.34f) + " seconds later the same blow lands on the soul for " + StatText.Damage(StatText.Percent(18f) + " damage") + " — " + StatText.Utility("through armour and through any block") + ", because neither is a property of the thing it hit. What it catches " + StatText.Health("cannot be healed for " + StatText.Number(8f) + " seconds") + " and " + StatText.Utility("loses whatever it had going for it") + ". The first blow also " + StatText.Utility("stuns for " + StatText.Number(2f) + " seconds") + ", which holds it still for the second. " + StatText.Health(StatText.Number(26f) + " cursed energy") + ". " + StatText.Seconds(10f) + " second cooldown."); LanguageAPI.Add("CODEX_YUJI_DOMAIN_NAME", "Domain Expansion"); LanguageAPI.Add("CODEX_YUJI_DOMAIN_DESCRIPTION", "Force a room into existence. Everything within " + StatText.Utility(StatText.Metres(26f)) + " " + StatText.Utility("forgets what it was doing and stops where it stands") + " for " + StatText.Utility(StatText.Number(8f) + " seconds") + ".\n\nIt deals " + StatText.Damage("no damage at all") + " — his domain exists to hold a conversation, not to win a fight. Nothing resists it: this is not a stun, so what it holds it holds completely, " + StatText.Utility("bosses") + " included. But the room has a size. It holds " + StatText.Utility(StatText.Number(8f)) + " at first and " + StatText.Utility("+" + StatText.Number(3f) + " for every stage cleared") + ", against " + StatText.Number(10f) + " for a boss, " + StatText.Number(6f) + " for a champion, " + StatText.Number(3f) + " for an elite and 1 for anything else. What it takes, it keeps until that thing leaves. Opening it " + StatText.Healing("surfaces Sukuna") + ", and how far into the run you are decides how much of the flow that is worth. " + StatText.Health("Costs " + StatText.Fraction(JujutsuConfig.DomainEnergyFraction.Value) + " of maximum Cursed Energy") + ". " + StatText.Seconds(70f) + " second cooldown."); LanguageAPI.Add("CODEX_YUJI_BLOOD_NAME", "Piercing Blood"); LanguageAPI.Add("CODEX_YUJI_BLOOD_DESCRIPTION", "Choso's technique, inherited. " + StatText.Utility("Hold") + " to open a lance of blood " + StatText.Utility(StatText.Metres(60f)) + " down the crosshair. It " + StatText.Utility("pierces everything in the line") + " for " + StatText.Damage(StatText.Percent(3.8f) + " damage a second") + " each, plus " + StatText.Damage(StatText.Fraction(0.12f) + " of his own base health a second") + " — it is his blood, so it is worth what his body is — and " + StatText.Healing("leaves them bleeding") + ". Paid for from " + StatText.Utility("Cursed Energy, never health") + ": " + StatText.Utility(StatText.Number(12f) + " to open it and " + StatText.Number(30f) + " a second to hold it") + ", so the pool is what decides how much of it he gets — it " + StatText.Utility("stays open until the bar runs dry") + ". Cooldown " + StatText.Utility(StatText.Seconds(7f) + " seconds, falling to " + StatText.Seconds(2f) + " at " + StatText.Number(3f) + "x his natural health") + "."); LanguageAPI.Add("CODEX_YUJI_SCISSORS_NAME", "Scissors"); LanguageAPI.Add("CODEX_YUJI_SCISSORS_DESCRIPTION", "Two crossing cuts of cursed energy, thrown up in front of you as an X. Everything standing in either arm — a span " + StatText.Utility(StatText.Metres(12f) + " across") + " — takes " + StatText.Damage(StatText.Percent(14f) + " damage") + ", and only once, so nothing is worth cutting twice however it is standing. The cross " + StatText.Utility("carries forward as it cuts") + ", clearing a slab about " + StatText.Utility(StatText.Metres(9.2f) + " deep") + ", and it " + StatText.Utility("puts itself on whatever you are looking at") + " — out to " + StatText.Utility(StatText.Metres(18f)) + ", and at that thing's own height — or, with nothing there, on the ground under your crosshair. Between them, a rank of things at different distances is taken together and nothing has to be standing on one particular spot to be cut. The quake it shares the key with is a " + StatText.Utility("reaction") + " that asks for no aim and holds a crowd down; this is a " + StatText.Utility("swing") + " that forgives none and takes a rank of things in one instant. " + StatText.Health(StatText.Number(18f) + " cursed energy") + ". " + StatText.Seconds(6f) + " second cooldown."); LanguageAPI.Add("CODEX_YUJI_OUTRO_FLAVOR", "..and so he left, still deciding what kind of death was a proper one."); LanguageAPI.Add("CODEX_YUJI_OUTRO_FAILURE", "..and so he vanished, out of time to save anybody at all."); LogResolvedNumbers(); } private static void LogResolvedNumbers() { Plugin.Log.LogInfo((object)"Yuji skill text assembled from live values:"); Plugin.Log.LogInfo((object)(" passive : flash x" + StatText.Number(2f) + " (" + StatText.Number(((JujutsuConfig.BlackFlashChance != null) ? JujutsuConfig.BlackFlashChance.Value : 1f) * 2f) + "% a hit at x" + StatText.Number((JujutsuConfig.BlackFlashMultiplier != null) ? JujutsuConfig.BlackFlashMultiplier.Value : 2.5f) + " damage), streak " + StatText.Number(6f) + "s, heals " + StatText.Fraction(YujiVessel.HealShares[0]) + "/" + StatText.Fraction(YujiVessel.HealShares[1]) + "/" + StatText.Fraction(YujiVessel.HealShares[2]) + ", armour +" + StatText.Number(YujiVessel.StreakArmour[1]) + "/+" + StatText.Number(YujiVessel.StreakArmour[2]) + ", block every " + StatText.Number(3f) + "s")); Plugin.Log.LogInfo((object)(" fist : " + StatText.Percent(1.15f) + " + " + StatText.Percent(0.65f))); Plugin.Log.LogInfo((object)(" kick : " + StatText.Percent(7.5f) + ", cooldown " + StatText.Seconds(3f) + "s")); Plugin.Log.LogInfo((object)(" rush : " + StatText.Number(1f) + " charges, " + StatText.Seconds(7f) + "s each, " + StatText.Percent(12f) + " through " + StatText.Metres(3f))); Plugin.Log.LogInfo((object)(" impact : " + StatText.Percent(7.5f) + " across " + StatText.Metres(12f) + " then " + StatText.Percent(10.5f) + " across " + StatText.Metres(16f) + ", cost " + StatText.Number(35f) + ", cooldown " + StatText.Seconds(16f) + "s")); Plugin.Log.LogInfo((object)(" flash : " + StatText.Percent(14f) + ", no healing " + StatText.Number(5f) + "s, cost " + StatText.Number(35f) + ", cooldown " + StatText.Seconds(14f) + "s")); Plugin.Log.LogInfo((object)(" soul : " + StatText.Percent(11f) + " then " + StatText.Percent(18f) + " through armour, no healing " + StatText.Number(8f) + "s, cost " + StatText.Number(26f) + ", cooldown " + StatText.Seconds(10f) + "s")); Plugin.Log.LogInfo((object)(" cross : " + StatText.Percent(14f) + " once, two arms across " + StatText.Metres(12f) + ", tilt " + StatText.Number(0.38f) + ", placed " + StatText.Metres(2.5f) + "-" + StatText.Metres(18f) + " on target, swept " + StatText.Metres(5f) + " deep" + $" at {3} stations" + ", cost " + StatText.Number(18f) + ", cooldown " + StatText.Seconds(6f) + "s")); Plugin.Log.LogInfo((object)(" domain : no damage, " + StatText.Metres(26f) + " for " + StatText.Number(8f) + "s" + $", capacity {8}" + $"+{3}/rank" + $" (boss {10}" + $", champion {6}" + $", elite {3})" + ", cost " + StatText.Fraction(JujutsuConfig.DomainEnergyFraction.Value) + " of pool, cooldown " + StatText.Seconds(70f) + "s")); Plugin.Log.LogInfo((object)(" blood : " + StatText.Percent(3.8f) + "/s down " + StatText.Metres(60f) + ", open " + StatText.Number(12f) + " then " + StatText.Number(30f) + "/s, cooldown " + StatText.Seconds(7f) + "s-" + StatText.Seconds(2f) + "s by health")); } } public sealed class YujiPiercingBloodSkillDef : CursedEnergySkillDef { internal const float FloorSeconds = 2f; internal const float FloorAtHealthMultiple = 3f; public override float GetRechargeInterval(GenericSkill skillSlot) { float rechargeInterval = ((SkillDef)this).GetRechargeInterval(skillSlot); CharacterBody val = (Object.op_Implicit((Object)(object)skillSlot) ? skillSlot.characterBody : null); if (!Object.op_Implicit((Object)(object)val) || rechargeInterval <= 0f) { return rechargeInterval; } float num = Mathf.Max(val.level - 1f, 0f); float num2 = val.baseMaxHealth + val.levelMaxHealth * num; if (num2 <= 0f) { return rechargeInterval; } float num3 = rechargeInterval / Mathf.Max(((SkillDef)this).baseRechargeInterval, 0.0001f); float num4 = Mathf.InverseLerp(1f, 3f, val.maxHealth / num2); return Mathf.Lerp(rechargeInterval, 2f * num3, num4); } } internal static class YujiSurvivor { internal static class Costs { internal const float DivergentFistCooldown = 0f; internal const float ManjiKickCooldown = 3f; internal const float RushCooldown = 7f; internal const int RushCharges = 1; internal const float BlackFlashCooldown = 14f; internal const float BlackFlashEnergy = 35f; internal const float SoulStrikeCooldown = 10f; internal const float SoulStrikeEnergy = 26f; internal const float ScissorsCooldown = 6f; internal const float ScissorsEnergy = 18f; internal const float DivergentImpactCooldown = 16f; internal const float DivergentImpactEnergy = 35f; internal const float LeapCooldown = 7f; internal const float DomainCooldown = 70f; internal const float PiercingBloodCooldown = 7f; internal const float PiercingBloodEnergy = 12f; } internal static SurvivorDef SurvivorDef { get; private set; } internal static void Initialize() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_0084: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: 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_00bc: 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_00c8: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: 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_0135: 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) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Expected O, but got Unknown //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01da: 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_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0216: 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_021e: Expected O, but got Unknown //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Expected O, but got Unknown //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Expected O, but got Unknown //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Expected O, but got Unknown //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Expected O, but got Unknown //IL_0400: Expected O, but got Unknown //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Expected O, but got Unknown Color colour = YujiLanguage.Colour; MixamoCharacterModel val = new MixamoCharacterModel("Yuji", "yuji.model", "yuji", (JujutsuConfig.YujiModelScale != null) ? JujutsuConfig.YujiModelScale.Value : 1.2f, "yuji.anim"); Dictionary dictionary = new Dictionary { ["Primary"] = new SkillSlot { Name = "YujiDivergentFist", TokenSuffix = "PRIMARY", State = typeof(YujiDivergentFistState), Icon = YujiAssets.DivergentIcon, Cooldown = 0f, MustKeyPress = false, Priority = (InterruptPriority)0 }, ["Secondary"] = new SkillSlot { Name = "YujiManjiKick", TokenSuffix = "SECONDARY", State = typeof(YujiManjiKickState), Icon = YujiAssets.KickIcon, Cooldown = 3f }, ["Utility"] = new SkillSlot { Name = "YujiRush", TokenSuffix = "UTILITY", State = typeof(YujiRushState), Icon = YujiAssets.RushIcon, Cooldown = 7f, MaxStock = 1 } }; Dictionary dictionary2 = dictionary; SkillSlot val2 = new SkillSlot(); val2.Name = "YujiBlackFlash"; val2.TokenSuffix = "FLASH"; val2.State = typeof(YujiBlackFlashState); val2.Icon = YujiAssets.FlashIcon; val2.Cooldown = 14f; val2.EnergyCost = 35f; val2.Priority = (InterruptPriority)2; val2.Alternatives = (SkillSlot[])(object)new SkillSlot[1] { new SkillSlot { Name = "YujiSoulStrike", TokenSuffix = "SOUL", State = typeof(YujiSoulStrikeState), Icon = YujiAssets.SoulIcon, Cooldown = 10f, EnergyCost = 26f, Priority = (InterruptPriority)2 } }; dictionary2["Special"] = val2; Dictionary dictionary3 = dictionary; dictionary = new Dictionary { ["SideDomain"] = new SkillSlot { Name = "YujiDomain", TokenSuffix = "DOMAIN", State = typeof(YujiDomainState), Icon = YujiAssets.DomainIcon, Cooldown = 70f, EnergyCostFraction = JujutsuConfig.DomainEnergyFraction.Value, Priority = (InterruptPriority)2 } }; Dictionary dictionary4 = dictionary; val2 = new SkillSlot(); val2.Name = "YujiDivergentQuake"; val2.TokenSuffix = "QUAKE"; val2.State = typeof(YujiDivergentImpactState); val2.Icon = YujiAssets.ImpactIcon; val2.Cooldown = 16f; val2.EnergyCost = 35f; val2.Priority = (InterruptPriority)2; val2.Alternatives = (SkillSlot[])(object)new SkillSlot[1] { new SkillSlot { Name = "YujiScissors", TokenSuffix = "SCISSORS", State = typeof(YujiScissorsState), Icon = YujiAssets.ScissorsIcon, Cooldown = 6f, EnergyCost = 18f, Priority = (InterruptPriority)2 } }; dictionary4["SideKick"] = val2; dictionary["SideReach"] = new SkillSlot { Name = "YujiPiercingBlood", TokenSuffix = "BLOOD", State = typeof(YujiPiercingBloodState), Icon = YujiAssets.BloodIcon, Cooldown = 7f, MakeSkillDef = () => (SkillDef)(object)ScriptableObject.CreateInstance(), EnergyCost = 12f, Priority = (InterruptPriority)2 }; SurvivorDef = JujutsuNewcomers.Build("YujiItadoriBody", "YujiItadoriMonsterMaster", "YujiItadoriDisplay", "YujiItadori", "CODEX_YUJI_", colour, 92f, val, 180f, 13f, 8f, 7.6f, dictionary3, dictionary, YujiAssets.Portrait, YujiAssets.PassiveIcon, (Action)ConfigureBody, (Action)ConfigureDisplay); JujutsuCharacter val3 = new JujutsuCharacter(); val3.Key = "Yuji"; val3.BodyPrefix = "YujiItadori"; val3.MenuOrder = 0; val3.Hints = new string[5] { "A punch into a kick on the beat guarantees a Black Flash", "A run of Black Flashes stacks healing and armour", "T opens his domain", "X lends his fists to Sukuna - they land much further out and cut wider", "Lent hands drain the bar and stop melee refilling it, so it is a window" }; val3.Survivor = SurvivorDef; val3.SpawnLine = () => YujiAssets.SpawnVoice; val3.FlashVoice = YujiAssets.PlayFlashVoice; val3.EffortVoice = YujiAssets.TryPlayVoice; val3.RewardFlash = YujiVessel.RequestReward; JujutsuCharacters.Register(val3); } private static void ConfigureBody(GameObject bodyPrefab, SideSlots slots) { //IL_00a1: 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_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011f: 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_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Expected O, but got Unknown if (((SideSlots)(ref slots)).Made.ContainsKey("SideReach") && ((SideSlots)(ref slots)).Made.ContainsKey("SideKick")) { bodyPrefab.AddComponent().Configure(((SideSlots)(ref slots)).Made["SideReach"], ((SideSlots)(ref slots)).Made["SideKick"], ((SideSlots)(ref slots)).Made["SideDomain"]); bodyPrefab.AddComponent(); bodyPrefab.AddComponent(); bodyPrefab.AddComponent().UseVoice("Yuji"); bodyPrefab.AddComponent(); bodyPrefab.AddComponent(); JujutsuStance.Attach(bodyPrefab, "SUKUNA", "YUJI", YujiSukunaHands.Cursed, "Yuji", YujiAssets.StanceSukunaIcon, YujiAssets.StanceYujiIcon); JujutsuNewcomers.AddStanceStrip(bodyPrefab, "Yuji", "CODEX_YUJI_STANCE_NAME", "CODEX_YUJI_STANCE_DESCRIPTION", YujiAssets.StanceSukunaIcon); bodyPrefab.AddComponent(); bodyPrefab.AddComponent(); YujiExtraSkins.RegisterOnPrefab(bodyPrefab); YujiExtraSkins.Apply(bodyPrefab.GetComponentInChildren(true)); GojoExtraSkillHud obj = bodyPrefab.AddComponent(); Slot[] obj2 = new Slot[3] { new Slot { Skill = ((SideSlots)(ref slots)).Made["SideReach"], Icon = YujiAssets.BloodIcon, Bind = JujutsuInput.Describe(JujutsuConfig.SideSkill1Key.Value), ShortName = "BLOOD", Accent = ((SideSlots)(ref slots)).Accent }, default(Slot), default(Slot) }; Slot val = new Slot(); val.Skill = ((SideSlots)(ref slots)).Made["SideKick"]; val.Icon = YujiAssets.ImpactIcon; val.Bind = JujutsuInput.Describe(JujutsuConfig.SideSkill2Key.Value); val.ShortName = "QUAKE"; val.Variants = JujutsuNewcomers.BuildHudVariants(((SideSlots)(ref slots)).Defs.TryGetValue("SideKick", out var value) ? value : null, new(Sprite, string)[2] { (YujiAssets.ImpactIcon, "QUAKE"), (YujiAssets.ScissorsIcon, "CUT") }); val.Accent = ((SideSlots)(ref slots)).Accent; obj2[1] = val; obj2[2] = new Slot { Skill = ((SideSlots)(ref slots)).Made["SideDomain"], Icon = YujiAssets.DomainIcon, Bind = JujutsuInput.Describe(JujutsuConfig.DomainKey.Value), ShortName = "DOMAIN", Accent = ((SideSlots)(ref slots)).Accent }; obj.Configure((Slot[])(object)obj2); } } private static void ConfigureDisplay(GameObject displayPrefab) { YujiExtraSkins.RegisterOnPrefab(displayPrefab); YujiExtraSkins.Apply(displayPrefab.GetComponentInChildren(true)); } } } namespace GojoSatoruMod.Components { internal sealed class YujiDomainField : MonoBehaviour { internal static readonly Color Colour = new Color(0.35f, 0.71f, 1f, 1f); internal static readonly Color ShellColour = new Color(0.14f, 0.44f, 0.7f, 1f); internal const float Radius = 26f; internal const float Duration = 8f; internal const int BaseCapacity = 8; internal const int CapacityPerRank = 3; private const float SelectionInterval = 0.2f; private const float HeldMarkerSeconds = 0.5f; private CharacterBody body; private RuntimeDomainVisual visual; private Vector3 centre; private float remaining; private float themeDelay; private bool themePending; private float selectionStopwatch; private int capacity = 8; private int spent; private readonly HashSet silenced = new HashSet(); private readonly Dictionary held = new Dictionary(); private readonly HashSet present = new HashSet(); private readonly List asking = new List(); private readonly List leaving = new List(); internal const int BossWeight = 10; internal const int ChampionWeight = 6; internal const int EliteWeight = 3; private Comparison byPriority; internal bool IsActive => remaining > 0f; private void Awake() { body = ((Component)this).GetComponent(); byPriority = CompareApplicants; } internal void Activate(Vector3 worldCentre) { //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) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) centre = worldCentre; remaining = 8f; capacity = 8 + 3 * DomainDepth.Rank; spent = 0; selectionStopwatch = 0.2f; Plugin.Log.LogInfo((object)("Yuji domain opened at stage " + (Object.op_Implicit((Object)(object)Run.instance) ? Run.instance.stageClearCount : 0) + $": capacity {capacity} (a boss costs {10}, a champion " + $"{6}, an elite {3}, anything else 1).")); DomainMusic.Open((object)this); themeDelay = 0f; themePending = true; if (Object.op_Implicit((Object)(object)visual)) { Object.Destroy((Object)(object)((Component)visual).gameObject); } visual = RuntimeVisuals.CreateDomain(centre, 26f, 8f, (Color?)Colour, (Color?)ShellColour, 0); JujutsuFxShake.Domain(centre, 26f); } private void FixedUpdate() { if (remaining <= 0f) { return; } remaining -= Time.fixedDeltaTime; if (remaining <= 0f) { Close(); return; } if (themePending) { themeDelay -= Time.fixedDeltaTime; if (themeDelay <= 0f) { themePending = false; DomainMusic.PlayTheme(YujiAssets.DomainTheme, DomainMusic.ThemeVolume); Plugin.Log.LogInfo((object)("Yuji domain: theme " + $"{((YujiAssets.DomainTheme != null) ? YujiAssets.DomainTheme.Duration : 0f):0.00}s " + $"started against {remaining:0.00}s of domain left.")); } } if (!NetworkServer.active) { return; } foreach (KeyValuePair item in held) { if (Object.op_Implicit((Object)(object)item.Key)) { Halt(item.Key); } } selectionStopwatch += Time.fixedDeltaTime; if (selectionStopwatch >= 0.2f) { selectionStopwatch -= 0.2f; Select(); } } private void Close() { remaining = 0f; themePending = false; DomainMusic.Stop((object)this); Wake(); if (Object.op_Implicit((Object)(object)visual)) { Object.Destroy((Object)(object)((Component)visual).gameObject); visual = null; } } private void OnDisable() { Close(); } private void OnDestroy() { themePending = false; DomainMusic.Stop((object)this); Wake(); if (Object.op_Implicit((Object)(object)visual)) { Object.Destroy((Object)(object)((Component)visual).gameObject); } } private static int WeightOf(CharacterBody other) { if (other.isBoss) { return 10; } if (other.isChampion) { return 6; } if (!other.isElite) { return 1; } return 3; } private void Select() { //IL_003c: 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) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) ReadOnlyCollection readOnlyInstancesList = CharacterBody.readOnlyInstancesList; if (readOnlyInstancesList == null) { return; } TeamIndex val = (TeamIndex)((!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.teamComponent)) ? (-1) : ((int)body.teamComponent.teamIndex)); float num = 676f; present.Clear(); asking.Clear(); leaving.Clear(); for (int i = 0; i < readOnlyInstancesList.Count; i++) { CharacterBody val2 = readOnlyInstancesList[i]; if (!Object.op_Implicit((Object)(object)val2) || (Object)(object)val2.teamComponent == (Object)null || val2.teamComponent.teamIndex == val || !Object.op_Implicit((Object)(object)val2.healthComponent) || !val2.healthComponent.alive) { continue; } Vector3 val3 = val2.corePosition - centre; if (!(((Vector3)(ref val3)).sqrMagnitude > num)) { present.Add(val2); if (!held.ContainsKey(val2)) { asking.Add(val2); } } } foreach (KeyValuePair item in held) { if (!Object.op_Implicit((Object)(object)item.Key) || !present.Contains(item.Key)) { leaving.Add(item.Key); } } for (int j = 0; j < leaving.Count; j++) { Release(leaving[j]); } asking.Sort(byPriority); for (int k = 0; k < asking.Count; k++) { CharacterBody val4 = asking[k]; int num2 = WeightOf(val4); if (spent + num2 <= capacity) { spent += num2; held[val4] = num2; Silence(val4); Halt(val4); } } if (!Object.op_Implicit((Object)(object)YujiBuffs.Held)) { return; } foreach (KeyValuePair item2 in held) { if (Object.op_Implicit((Object)(object)item2.Key)) { item2.Key.AddTimedBuff(YujiBuffs.Held, 0.5f, 1); } } } private int CompareApplicants(CharacterBody left, CharacterBody right) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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) int num = WeightOf(right).CompareTo(WeightOf(left)); if (num != 0) { return num; } Vector3 val = left.corePosition - centre; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; val = right.corePosition - centre; return sqrMagnitude.CompareTo(((Vector3)(ref val)).sqrMagnitude); } private void Release(CharacterBody other) { if (held.TryGetValue(other, out var value)) { spent -= value; held.Remove(other); } if (!Object.op_Implicit((Object)(object)other)) { return; } CharacterMaster master = other.master; BaseAI[] array = (Object.op_Implicit((Object)(object)master) ? master.aiComponents : null); if (array == null) { return; } foreach (BaseAI val in array) { if (Object.op_Implicit((Object)(object)val)) { ((Behaviour)val).enabled = true; silenced.Remove(val); } } } private void Silence(CharacterBody other) { CharacterMaster master = other.master; BaseAI[] array = (Object.op_Implicit((Object)(object)master) ? master.aiComponents : null); if (array == null) { return; } foreach (BaseAI val in array) { if (Object.op_Implicit((Object)(object)val)) { if (((Behaviour)val).enabled) { ((Behaviour)val).enabled = false; } silenced.Add(val); Target currentEnemy = val.currentEnemy; if (currentEnemy != null) { currentEnemy.Reset(); } Target customTarget = val.customTarget; if (customTarget != null) { customTarget.Reset(); } val.bufferedTarget = null; val.enemyAttention = 0f; } } } private void Wake() { foreach (BaseAI item in silenced) { if (Object.op_Implicit((Object)(object)item)) { ((Behaviour)item).enabled = true; } } silenced.Clear(); held.Clear(); present.Clear(); asking.Clear(); leaving.Clear(); spent = 0; } private static void Halt(CharacterBody other) { //IL_0010: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) InputBankTest inputBank = other.inputBank; if (Object.op_Implicit((Object)(object)inputBank)) { inputBank.moveVector = Vector3.zero; ((ButtonState)(ref inputBank.skill1)).PushState(false); ((ButtonState)(ref inputBank.skill2)).PushState(false); ((ButtonState)(ref inputBank.skill3)).PushState(false); ((ButtonState)(ref inputBank.skill4)).PushState(false); ((ButtonState)(ref inputBank.jump)).PushState(false); } CharacterMotor characterMotor = other.characterMotor; if (Object.op_Implicit((Object)(object)characterMotor)) { characterMotor.moveDirection = Vector3.zero; Vector3 velocity = characterMotor.velocity; velocity.x = 0f; velocity.z = 0f; characterMotor.velocity = velocity; } } } internal sealed class YujiLowHealthVoice : MonoBehaviour { private const float Speaks = 0.3f; private const float Rearms = 0.55f; private const float Quiet = 30f; private CharacterBody body; private bool armed = true; private float nextAllowed; private void Awake() { body = ((Component)this).GetComponent(); } private void OnEnable() { armed = true; nextAllowed = Time.realtimeSinceStartup + 3f; } private void FixedUpdate() { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.healthComponent) && body.healthComponent.alive && body.isPlayerControlled && body.hasEffectiveAuthority) { float combinedHealthFraction = body.healthComponent.combinedHealthFraction; if (combinedHealthFraction >= 0.55f) { armed = true; } else if (armed && !(combinedHealthFraction >= 0.3f) && !(Time.realtimeSinceStartup < nextAllowed)) { armed = false; nextAllowed = Time.realtimeSinceStartup + 30f; YujiAssets.PlayLowHealthVoice(body.corePosition); } } } } internal sealed class YujiSideSkillController : MonoBehaviour { [SerializeField] private GenericSkill reachSkill; [SerializeField] private GenericSkill kickSkill; [SerializeField] private GenericSkill domainSkill; private const int PunchSteps = 3; private const float ComboWindow = 2.2f; private bool wasHeld; private bool wasKickHeld; private bool wasDomainHeld; private int nextPunchStep; private float lastPunchStepAt = -100f; internal void Configure(GenericSkill reach, GenericSkill kick, GenericSkill domain) { reachSkill = reach; kickSkill = kick; domainSkill = domain; } internal int ConsumeNextPunchStep() { if (Time.time - lastPunchStepAt > 2.2f) { nextPunchStep = 0; } int result = nextPunchStep; nextPunchStep = (nextPunchStep + 1) % 3; lastPunchStepAt = Time.time; return result; } private void Update() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = ((Component)this).GetComponent(); if (!Object.op_Implicit((Object)(object)component) || !component.isPlayerControlled || !component.hasEffectiveAuthority) { return; } bool key = JujutsuInput.GetKey(JujutsuConfig.SideSkill1Key.Value); if (key && !wasHeld) { GenericSkill obj = reachSkill; if (obj != null) { obj.ExecuteIfReady(); } } wasHeld = key; bool key2 = JujutsuInput.GetKey(JujutsuConfig.SideSkill2Key.Value); if (key2 && !wasKickHeld) { GenericSkill obj2 = kickSkill; if (obj2 != null) { obj2.ExecuteIfReady(); } } wasKickHeld = key2; bool key3 = JujutsuInput.GetKey(JujutsuConfig.DomainKey.Value); if (key3 && !wasDomainHeld) { GenericSkill obj3 = domainSkill; if (obj3 != null) { obj3.ExecuteIfReady(); } } wasDomainHeld = key3; } } internal sealed class YujiSoulShake : MonoBehaviour { internal const float Seconds = 5f; private HealthComponent health; private float expiresAt; private float ceiling; internal static void ApplyInSphere(TeamIndex team, Vector3 centre, float radius, float seconds = 5f) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) //IL_004d: 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) if (!NetworkServer.active) { return; } ReadOnlyCollection readOnlyInstancesList = CharacterBody.readOnlyInstancesList; if (readOnlyInstancesList == null) { return; } float num = radius * radius; for (int i = 0; i < readOnlyInstancesList.Count; i++) { CharacterBody val = readOnlyInstancesList[i]; if (Object.op_Implicit((Object)(object)val) && !((Object)(object)val.teamComponent == (Object)null) && val.teamComponent.teamIndex != team) { Vector3 val2 = val.corePosition - centre; if (!(((Vector3)(ref val2)).sqrMagnitude > num)) { Apply(val, seconds); } } } } internal static void Apply(CharacterBody body, float seconds = 5f) { //IL_0084: 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_009e: 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) if (!Object.op_Implicit((Object)(object)body) || !NetworkServer.active || !Object.op_Implicit((Object)(object)body.healthComponent) || !body.healthComponent.alive) { return; } YujiSoulShake yujiSoulShake = ((Component)body).gameObject.GetComponent(); if (!Object.op_Implicit((Object)(object)yujiSoulShake)) { yujiSoulShake = ((Component)body).gameObject.AddComponent(); yujiSoulShake.health = body.healthComponent; yujiSoulShake.ceiling = body.healthComponent.health; } yujiSoulShake.expiresAt = Mathf.Max(yujiSoulShake.expiresAt, Time.time + seconds); for (int i = 0; i < BuffCatalog.buffCount; i++) { BuffIndex val = (BuffIndex)i; BuffDef buffDef = BuffCatalog.GetBuffDef(val); if ((Object)(object)buffDef != (Object)null && !buffDef.isDebuff && body.GetBuffCount(val) > 0) { body.ClearTimedBuffs(val); } } } private void FixedUpdate() { if (NetworkServer.active) { if (!Object.op_Implicit((Object)(object)health) || !health.alive || Time.time >= expiresAt) { Object.Destroy((Object)(object)this); } else if (health.health < ceiling) { ceiling = health.health; } else if (health.health > ceiling) { health.health = ceiling; } } } } internal sealed class YujiSukunaHands : MonoBehaviour { internal const float ReachScale = 1.9f; internal const float RadiusScale = 1.55f; internal const float DamageScale = 1.3f; internal const float DrainPerSecond = 8f; internal static readonly Color Cursed = new Color(0.62f, 0.05f, 0.1f, 1f); private CharacterBody body; private JujutsuStance stance; private CursedEnergyController energy; private Transform leftFollow; private Transform rightFollow; private ParticleSystem leftEmber; private ParticleSystem rightEmber; private Transform leftHand; private Transform rightHand; private bool lit; internal static bool Engaged(CharacterBody body) { YujiSukunaHands yujiSukunaHands = (Object.op_Implicit((Object)(object)body) ? ((Component)body).GetComponent() : null); if (Object.op_Implicit((Object)(object)yujiSukunaHands) && Object.op_Implicit((Object)(object)yujiSukunaHands.stance)) { return yujiSukunaHands.stance.Engaged; } return false; } private void Awake() { body = ((Component)this).GetComponent(); stance = ((Component)this).GetComponent(); energy = ((Component)this).GetComponent(); } private void OnDisable() { Douse(); } private void OnDestroy() { Douse(); } private void Update() { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)stance) || !stance.Engaged || !Object.op_Implicit((Object)(object)body)) { Douse(); return; } if (!Object.op_Implicit((Object)(object)leftHand) || !Object.op_Implicit((Object)(object)rightHand) || !Object.op_Implicit((Object)(object)leftFollow) || !Object.op_Implicit((Object)(object)rightFollow)) { Douse(); if (!JujutsuBones.TryFindHands(body, ref leftHand, ref rightHand)) { return; } Light(); } if (Object.op_Implicit((Object)(object)leftFollow) && Object.op_Implicit((Object)(object)leftHand)) { leftFollow.position = leftHand.position; } if (Object.op_Implicit((Object)(object)rightFollow) && Object.op_Implicit((Object)(object)rightHand)) { rightFollow.position = rightHand.position; } } private void Light() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (!lit) { lit = true; leftFollow = MakeFollower(leftHand, out leftEmber); rightFollow = MakeFollower(rightHand, out rightEmber); YujiFx.Ignite(leftHand.position, Cursed, JujutsuFxScale.Of(body, 0.45f)); YujiFx.Ignite(rightHand.position, Cursed, JujutsuFxScale.Of(body, 0.45f)); } } private Transform MakeFollower(Transform hand, out ParticleSystem embers) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) embers = null; if (!Object.op_Implicit((Object)(object)hand)) { return null; } GameObject val = new GameObject("YujiSukunaHandEmber"); val.transform.position = hand.position; embers = JujutsuMotes.Attach(val.transform, Cursed, JujutsuFxScale.Of(body, 0.4f), (JujutsuMoteKind)0); return val.transform; } private void Douse() { if (!lit) { Discard(ref leftFollow); Discard(ref rightFollow); return; } lit = false; JujutsuMotes.Stop(leftEmber); JujutsuMotes.Stop(rightEmber); leftEmber = null; rightEmber = null; Discard(ref leftFollow); Discard(ref rightFollow); leftHand = null; rightHand = null; } private static void Discard(ref Transform follower) { if (Object.op_Implicit((Object)(object)follower)) { Object.Destroy((Object)(object)((Component)follower).gameObject); } follower = null; } private void FixedUpdate() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)stance) && stance.Engaged && Object.op_Implicit((Object)(object)body) && Util.HasEffectiveAuthority(((Component)this).gameObject) && Object.op_Implicit((Object)(object)energy) && !energy.TrySpendPriced(8f * Time.fixedDeltaTime)) { stance.Set(false); JujutsuCharacters.ForBody(body)?.EffortVoice?.Invoke(body.corePosition, 0.9f); } } } internal sealed class YujiVessel : MonoBehaviour { internal const float Seconds = 6f; internal static readonly float[] HealShares = new float[3] { 0.08f, 0.16f, 0.32f }; internal static readonly float[] StreakArmour = new float[3] { 0f, 100f, 200f }; internal const float BlockCooldown = 3f; private const float BlockThreshold = 0.15f; internal const float FlowAttackSpeed = 1f; internal const float FlowMoveSpeed = 0.5f; private static int active; private CharacterBody body; private int tier; private float expiresAt = -1000f; private float lastBlockAt = -1000f; private const int MostRewardedHits = 6; internal const string FlowHit = "yuji-flow-claim"; internal const float ClaimReach = 12f; private bool InStreak => Time.time < expiresAt; internal bool Running => InStreak; internal int Tier { get { if (!InStreak) { return 0; } return tier; } } internal static void Initialize() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown CharacterBody.RecalculateStats += new hook_RecalculateStats(AddStreakArmour); HealthComponent.TakeDamage += new hook_TakeDamage(BlockOne); } private void Awake() { body = ((Component)this).GetComponent(); } private void OnEnable() { active++; GlobalEventManager.onCharacterDeathGlobal += OnCharacterDeath; } private void OnDisable() { active--; GlobalEventManager.onCharacterDeathGlobal -= OnCharacterDeath; tier = 0; expiresAt = -1000f; } private void FixedUpdate() { if (tier > 0 && !InStreak) { tier = 0; if (Object.op_Implicit((Object)(object)body)) { body.MarkAllStatsDirty(); } } } internal static void Reward(CharacterBody body, int hits = 1) { //IL_0086: 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) if (Object.op_Implicit((Object)(object)body) && NetworkServer.active) { YujiVessel component = ((Component)body).GetComponent(); int num = (Object.op_Implicit((Object)(object)component) ? component.Advance() : 0); if (Object.op_Implicit((Object)(object)YujiBuffs.Flow)) { body.AddTimedBuff(YujiBuffs.Flow, 6f); } if (Object.op_Implicit((Object)(object)body.healthComponent) && body.healthComponent.alive) { int num2 = Mathf.Clamp(hits, 1, 6); body.healthComponent.Heal(body.healthComponent.fullHealth * HealShares[num] * (float)num2, default(ProcChainMask), true); } } } internal static void RequestReward(CharacterBody body, int hits) { //IL_0010: 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) if (Object.op_Implicit((Object)(object)body)) { JujutsuHitSync.Request(body, "yuji-flow-claim", body.corePosition, body.corePosition, (float)hits, true); } } internal static void LandFlow(CharacterBody body, Vector3 unusedFrom, Vector3 unusedTo, float hits, bool unusedFlash) { Reward(body, Mathf.RoundToInt(hits)); } internal static void Surface(CharacterBody body) { Surface(body, HealShares.Length - 1); } internal static void Surface(CharacterBody body, int tier) { if (Object.op_Implicit((Object)(object)body) && NetworkServer.active) { YujiVessel component = ((Component)body).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.tier = Mathf.Clamp(tier, 0, HealShares.Length - 1); component.expiresAt = Time.time + 6f; body.MarkAllStatsDirty(); } if (Object.op_Implicit((Object)(object)YujiBuffs.Flow)) { body.AddTimedBuff(YujiBuffs.Flow, 6f); } } } private void OnCharacterDeath(DamageReport report) { if (!NetworkServer.active || !Object.op_Implicit((Object)(object)body) || report == null || (Object)(object)report.attackerBody != (Object)(object)body || (Object)(object)report.victimBody == (Object)(object)body) { return; } if (!InStreak) { tier = 0; if (Object.op_Implicit((Object)(object)body)) { body.MarkAllStatsDirty(); } } expiresAt = Time.time + 6f; if (Object.op_Implicit((Object)(object)YujiBuffs.Flow)) { body.AddTimedBuff(YujiBuffs.Flow, 6f); } } private int Advance() { tier = (InStreak ? Mathf.Min(tier + 1, HealShares.Length - 1) : 0); expiresAt = Time.time + 6f; if (Object.op_Implicit((Object)(object)body)) { body.MarkAllStatsDirty(); } return tier; } private bool TryBlock(HealthComponent health, float damage) { if (Tier < HealShares.Length - 1 || Time.time - lastBlockAt < 3f || !Object.op_Implicit((Object)(object)health) || damage < health.fullCombinedHealth * 0.15f) { return false; } lastBlockAt = Time.time; return true; } private static void AddStreakArmour(orig_RecalculateStats original, CharacterBody self) { original.Invoke(self); if (active <= 0 || !Object.op_Implicit((Object)(object)self)) { return; } YujiVessel component = ((Component)self).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { self.armor += StreakArmour[component.Tier]; if (Object.op_Implicit((Object)(object)YujiBuffs.Flow) ? self.HasBuff(YujiBuffs.Flow) : component.Running) { float num = Mathf.Max(self.level - 1f, 0f); self.attackSpeed += (self.baseAttackSpeed + self.levelAttackSpeed * num) * 1f; self.moveSpeed += (self.baseMoveSpeed + self.levelMoveSpeed * num) * 0.5f; } } } private static void BlockOne(orig_TakeDamage original, HealthComponent self, DamageInfo damageInfo) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) if (active > 0 && NetworkServer.active && Object.op_Implicit((Object)(object)self) && damageInfo != null && !damageInfo.rejected && Object.op_Implicit((Object)(object)self.body)) { YujiVessel component = ((Component)self.body).GetComponent(); if (Object.op_Implicit((Object)(object)component) && component.TryBlock(self, damageInfo.damage)) { damageInfo.rejected = true; YujiFx.Guard(self.body, YujiLanguage.Colour); JujutsuSfxAssets.PlayMeleeHeavy(self.body.corePosition); } } original.Invoke(self, damageInfo); } } }