Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Jiraiya v1.4.4
plugins/Jiraiya/Jiraiya.dll
Decompiled 5 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization.Json; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using ExtraSkillSlots; using HG; using KinematicCharacterController; using Microsoft.CodeAnalysis; using On.RoR2; using On.RoR2.SurvivorMannequins; using On.RoR2.UI; using R2API; using R2API.Utils; using Rewired; using RoR2; using RoR2.CameraModes; using RoR2.CharacterAI; using RoR2.ConVar; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using RoR2.SurvivorMannequins; using RoR2.UI; using TMPro; using Unity.Profiling; using UnityEngine; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("Jiraiya")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+fb3d12d417a136f60e5f3cdf3bb582973de95dc0")] [assembly: AssemblyProduct("Jiraiya")] [assembly: AssemblyTitle("Jiraiya")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace JiraiyaMod { public static class Arrival19 { private static Material cloud; private static Material wisp; private static Material clodMat; private static Material Cloud { get { if (!Object.op_Implicit((Object)(object)cloud)) { return cloud = Vfx.Source("1efc_smk12_0.png"); } return cloud; } } private static Material Wisp { get { if (!Object.op_Implicit((Object)(object)wisp)) { return wisp = Vfx.Source("1efc_smk09_0.png"); } return wisp; } } public static ParticleSystem System(Transform parent, Material m, int max, float drag, float peak, float grow = 1.3f) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_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_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) //IL_0068: 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_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) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_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_00e3: 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_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_0136: 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_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_015d: Expected O, but got Unknown //IL_0158: 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_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown //IL_0183: 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_01a8: 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_01b7: 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_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: 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_01ff: 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_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("bunta smoke layer"); val.transform.SetParent(parent, false); ParticleSystem val2 = val.AddComponent<ParticleSystem>(); val2.Stop(true, (ParticleSystemStopBehavior)0); MainModule main = val2.main; ((MainModule)(ref main)).loop = false; ((MainModule)(ref main)).playOnAwake = false; ((MainModule)(ref main)).maxParticles = max; ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; ((MainModule)(ref main)).startRotation = new MinMaxCurve(0f, MathF.PI * 2f); EmissionModule emission = val2.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(0f); ShapeModule shape = val2.shape; ((ShapeModule)(ref shape)).enabled = false; LimitVelocityOverLifetimeModule limitVelocityOverLifetime = val2.limitVelocityOverLifetime; ((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).enabled = true; ((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).limit = new MinMaxCurve(400f); ((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).drag = new MinMaxCurve(drag); ((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).multiplyDragByParticleSize = false; ((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).multiplyDragByParticleVelocity = true; RotationOverLifetimeModule rotationOverLifetime = val2.rotationOverLifetime; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).enabled = true; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).z = new MinMaxCurve(-0.8f, 0.8f); SizeOverLifetimeModule sizeOverLifetime = val2.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = new MinMaxCurve(1f, new AnimationCurve((Keyframe[])(object)new Keyframe[3] { new Keyframe(0f, 0.5f, 3f, 3f), new Keyframe(0.3f, 1f), new Keyframe(1f, grow) })); ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val3 = new Gradient(); val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(Color.white, 0f), new GradientColorKey(new Color(0.82f, 0.82f, 0.84f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[4] { new GradientAlphaKey(0f, 0f), new GradientAlphaKey(peak, 0.07f), new GradientAlphaKey(peak * 0.6f, 0.45f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val3); ParticleSystemRenderer component = ((Component)val2).GetComponent<ParticleSystemRenderer>(); ((Renderer)component).sharedMaterial = m; component.renderMode = (ParticleSystemRenderMode)0; component.sortMode = (ParticleSystemSortMode)1; component.minParticleSize = 0f; component.maxParticleSize = 3f; val2.Play(); return val2; } private static Color Shade(float heightK) { //IL_0027: 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_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) heightK = Mathf.Clamp01(heightK + Random.Range(-0.18f, 0.18f)); Color result = Color.Lerp(new Color(0.5f, 0.52f, 0.56f), new Color(0.97f, 0.97f, 0.98f), heightK); result.a = 1f; return result; } private static float Away(Vector3 center, Vector3 dir) { //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_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_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) //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_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_005e: Unknown result type (might be due to invalid IL or missing references) Camera val = Cel08.View(); if (!Object.op_Implicit((Object)(object)val)) { return 1f; } Vector3 val2 = Vector3.ProjectOnPlane(((Component)val).transform.position - center, Vector3.up); if (((Vector3)(ref val2)).sqrMagnitude < 1f) { return 1f; } Vector3 normalized = ((Vector3)(ref val2)).normalized; Vector3 val3 = Vector3.ProjectOnPlane(dir, Vector3.up); return Mathf.Clamp01((1f - Vector3.Dot(normalized, ((Vector3)(ref val3)).normalized)) * 0.75f); } private static void Puff(ParticleSystem a, ParticleSystem b, Vector3 p, Vector3 v, float size, float life, float heightK) { //IL_0002: 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_0012: 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) //IL_0033: 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_0065: Unknown result type (might be due to invalid IL or missing references) EmitParams val = default(EmitParams); ((EmitParams)(ref val)).position = p; ((EmitParams)(ref val)).velocity = v; ((EmitParams)(ref val)).startSize = size; ((EmitParams)(ref val)).startLifetime = life; ((EmitParams)(ref val)).startColor = Color32.op_Implicit(Shade(heightK)); ((EmitParams)(ref val)).rotation = Random.Range(0f, 360f); EmitParams val2 = val; ((Random.value < 0.55f) ? a : b).Emit(val2, 1); } public static void Appear(Vector3 origin, float scale) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0021: Expected O, but got Unknown //IL_0021: 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_0065: 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_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_007f: 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_0090: 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_00b0: 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_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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_00f4: 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_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_0150: 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_017f: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Gamabunta summoning smoke"); val.transform.position = origin; Object.Destroy((Object)val, 2.5f); ParticleSystem a = System(val.transform, Cloud, 40, 2.6f, 0.85f); ParticleSystem b = System(val.transform, Wisp, 40, 2.6f, 0.75f); Vector3 val2 = origin + Vector3.up * 13f * scale; for (int i = 0; i < 22; i++) { Vector3 onUnitSphere = Random.onUnitSphere; onUnitSphere.y = onUnitSphere.y * 0.6f + 0.2f; ((Vector3)(ref onUnitSphere)).Normalize(); float num = Away(val2, onUnitSphere); Puff(a, b, val2 + onUnitSphere * Random.Range(2f, 6f) * scale, onUnitSphere * Random.Range(10f, 18f) * scale + Vector3.up * Random.Range(0f, 3f), Random.Range(3.5f, 7f) * scale * (0.6f + 0.4f * num), Random.Range(0.4f, 0.7f), 0.5f + 0.5f * onUnitSphere.y); } Light obj = new GameObject("summon flash").AddComponent<Light>(); ((Component)obj).transform.position = val2; obj.type = (LightType)2; obj.color = new Color(1f, 0.97f, 0.9f); obj.range = 36f * scale; obj.intensity = 2.5f; ((Component)obj).gameObject.AddComponent<LightFade>().Duration = 0.3f; } public static void Land(Vector3 origin, float scale) { //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_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_00a7: 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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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_0119: 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_0136: 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_0144: 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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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_018e: 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_01f6: 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_020e: 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_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: 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) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: 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_0257: 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) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0275: 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_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: 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_0206: 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_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: 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_037e: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: 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_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Gamabunta landing eruption"); val.transform.position = origin; Object.Destroy((Object)(object)val, 4.5f); Vector3 val2 = Ground19.On(origin, 0f); ParticleSystem a = System(val.transform, Cloud, 90, 2f, 0.85f, 1.5f); ParticleSystem b = System(val.transform, Wisp, 90, 2f, 0.8f, 1.6f); Vector3 val3 = default(Vector3); for (int i = 0; i < 46; i++) { float num = Random.value * MathF.PI * 2f; ((Vector3)(ref val3))..ctor(Mathf.Cos(num), 0f, Mathf.Sin(num)); float num2 = Away(val2, val3); if (!(num2 < 0.35f) || !(Random.value < 0.6f)) { float num3 = Random.Range(4f, 8f) * scale * (0.55f + 0.45f * num2); float num4 = Random.Range(0f, 1f); Vector3 p = val2 + val3 * Random.Range(9f, 14f) * scale + Vector3.up * (num3 * 0.4f + num4 * 4f * scale); Puff(a, b, p, val3 * Random.Range(14f, 28f) * scale + Vector3.up * Random.Range(4f, 11f) * scale * (0.6f + num4), num3, Random.Range(0.7f, 1.15f), num4 * 0.8f); } } Vector3 val4 = default(Vector3); for (int j = 0; j < 10; j++) { float num5 = Random.value * MathF.PI * 2f; ((Vector3)(ref val4))..ctor(Mathf.Cos(num5), 0f, Mathf.Sin(num5)); if (Away(val2, val4) < 0.6f) { val4 = -val4; } Vector3 p2 = val2 + val4 * Random.Range(11f, 15f) * scale + Vector3.up * Random.Range(3f, 7f) * scale; Puff(a, b, p2, val4 * Random.Range(5f, 9f) * scale + Vector3.up * Random.Range(9f, 14f) * scale, Random.Range(5f, 8f) * scale, Random.Range(0.9f, 1.3f), 0.7f); } ParticleSystem val5 = System(val.transform, Wisp, 24, 0.5f, 0.22f, 1.8f); Vector3 val6 = default(Vector3); for (int k = 0; k < 12; k++) { float num6 = Random.value * MathF.PI * 2f; ((Vector3)(ref val6))..ctor(Mathf.Cos(num6), 0f, Mathf.Sin(num6)); if (Away(val2, val6) < 0.45f) { val6 = Quaternion.AngleAxis((float)((Random.value < 0.5f) ? 100 : (-100)), Vector3.up) * val6; } float num7 = Random.Range(5f, 8f) * scale; EmitParams val7 = default(EmitParams); ((EmitParams)(ref val7)).position = Ground19.On(val2 + val6 * Random.Range(13f, 24f) * scale, num7 * 0.25f); ((EmitParams)(ref val7)).velocity = val6 * Random.Range(1.5f, 3.5f) * scale + Vector3.up * Random.Range(0.2f, 0.8f); ((EmitParams)(ref val7)).startSize = num7; ((EmitParams)(ref val7)).startLifetime = Random.Range(1.6f, 2.4f); ((EmitParams)(ref val7)).startColor = Color32.op_Implicit(Shade(0.8f)); ((EmitParams)(ref val7)).rotation = Random.Range(0f, 360f); val5.Emit(val7, 1); } DustShock19.Create(val2, 18f * scale, scale); Clods(val.transform, val2, scale); Light obj = new GameObject("landing flash").AddComponent<Light>(); ((Component)obj).transform.position = val2 + Vector3.up * 3f * scale; obj.type = (LightType)2; obj.color = new Color(1f, 0.9f, 0.75f); obj.range = 30f * scale; obj.intensity = 4f; ((Component)obj).gameObject.AddComponent<LightFade>().Duration = 0.18f; Arrival20.Land(val2, scale); Sfx04.Native("Play_parent_attack1_impact", val2, 1f); } private static void Clods(Transform parent, Vector3 g, float scale) { //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_0055: 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_0083: 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) //IL_0093: 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_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_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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_00f1: Expected O, but got Unknown //IL_00fb: 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) //IL_010a: 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_011b: 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_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_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_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: 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_0181: 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_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: 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_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0272: 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_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)clodMat)) { clodMat = Vfx.Transparent(); clodMat.mainTexture = Vfx.Source("1efc_smk12_0.png").mainTexture; } GameObject val = new GameObject("Gamabunta earth clods"); val.transform.SetParent(parent, false); ParticleSystem val2 = val.AddComponent<ParticleSystem>(); val2.Stop(true, (ParticleSystemStopBehavior)0); MainModule main = val2.main; ((MainModule)(ref main)).loop = false; ((MainModule)(ref main)).playOnAwake = false; ((MainModule)(ref main)).maxParticles = 60; ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(2.4f); EmissionModule emission = val2.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(0f); ShapeModule shape = val2.shape; ((ShapeModule)(ref shape)).enabled = false; RotationOverLifetimeModule rotationOverLifetime = val2.rotationOverLifetime; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).enabled = true; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).z = new MinMaxCurve(-9f, 9f); ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val3 = new Gradient(); val3.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(1f, 0.75f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val3); CollisionModule collision = val2.collision; ((CollisionModule)(ref collision)).enabled = true; ((CollisionModule)(ref collision)).type = (ParticleSystemCollisionType)1; ((CollisionModule)(ref collision)).collidesWith = ((LayerIndex)(ref LayerIndex.world)).mask; ((CollisionModule)(ref collision)).bounce = MinMaxCurve.op_Implicit(0.2f); ((CollisionModule)(ref collision)).dampen = MinMaxCurve.op_Implicit(0.6f); ((CollisionModule)(ref collision)).lifetimeLoss = MinMaxCurve.op_Implicit(0f); ParticleSystemRenderer component = ((Component)val2).GetComponent<ParticleSystemRenderer>(); ((Renderer)component).sharedMaterial = clodMat; component.maxParticleSize = 1f; val2.Play(); Vector3 val4 = default(Vector3); for (int i = 0; i < 34; i++) { float num = Random.value * MathF.PI * 2f; ((Vector3)(ref val4))..ctor(Mathf.Cos(num), 0f, Mathf.Sin(num)); Color val5 = Color.Lerp(new Color(0.26f, 0.2f, 0.14f), new Color(0.45f, 0.36f, 0.26f), Random.value); EmitParams val6 = default(EmitParams); ((EmitParams)(ref val6)).position = g + val4 * Random.Range(4f, 9f) * scale + Vector3.up * 0.6f; ((EmitParams)(ref val6)).velocity = val4 * Random.Range(5f, 14f) * scale + Vector3.up * Random.Range(7f, 15f) * scale; ((EmitParams)(ref val6)).startSize = Random.Range(0.25f, 0.7f) * scale; ((EmitParams)(ref val6)).startLifetime = Random.Range(0.7f, 1.1f); ((EmitParams)(ref val6)).startColor = Color32.op_Implicit(val5); ((EmitParams)(ref val6)).rotation = Random.Range(0f, 360f); val2.Emit(val6, 1); } } public static void Leave(Vector3 origin, float scale) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0021: Expected O, but got Unknown //IL_0021: 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_0073: 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_0091: 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_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_00b4: 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_00c5: 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_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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_0105: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Gamabunta departure smoke"); val.transform.position = origin; Object.Destroy((Object)val, 2.5f); ParticleSystem a = System(val.transform, Cloud, 50, 2.4f, 0.85f); ParticleSystem b = System(val.transform, Wisp, 50, 2.4f, 0.8f); for (int i = 0; i < 34; i++) { Vector3 onUnitSphere = Random.onUnitSphere; onUnitSphere.y = Mathf.Abs(onUnitSphere.y) * 0.8f; float value = Random.value; Vector3 p = origin + Vector3.up * (2f + value * 10f) * scale + new Vector3(onUnitSphere.x, 0f, onUnitSphere.z) * Random.Range(2f, 8f) * scale; Puff(a, b, p, ((Vector3)(ref onUnitSphere)).normalized * Random.Range(7f, 14f) * scale + Vector3.up * Random.Range(1f, 5f), Random.Range(4f, 8f) * scale, Random.Range(0.6f, 1f), value); } } } public sealed class DustShock19 : MonoBehaviour { private Vector3 center; private float radius; private float scale; private float started; private ParticleSystem dust; private float nextDust; private float[] wob; private const int N = 36; public static void Create(Vector3 c, float r, float s) { //IL_0005: 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_0011: Unknown result type (might be due to invalid IL or missing references) DustShock19 dustShock = new GameObject("Gamabunta landing dust shock").AddComponent<DustShock19>(); dustShock.center = c; dustShock.radius = r; dustShock.scale = s; dustShock.started = Time.time; dustShock.Build(); } private void Build() { wob = new float[36]; for (int i = 0; i < 36; i++) { wob[i] = Random.Range(0.82f, 1.08f); } dust = Ground19.Dust(((Component)this).transform, 260, scale); Object.Destroy((Object)(object)((Component)this).gameObject, 1.6f); } private void Update() { //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_00c2: 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_00e4: 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_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_0102: 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_0116: 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_0132: 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_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) float num = (Time.time - started) / 0.36f; if (num > 1.05f) { return; } float num2 = 1f - Mathf.Pow(1f - Mathf.Clamp01(num), 2.2f); float num3 = Mathf.Lerp(4f * scale, radius, num2); if (!(Time.time < nextDust)) { nextDust = Time.time + 0.022f; Vector3 val = default(Vector3); for (int i = 0; i < 8; i++) { int num4 = Random.Range(0, 36); float num5 = ((float)num4 + Random.value) / 36f * MathF.PI * 2f; ((Vector3)(ref val))..ctor(Mathf.Cos(num5), 0f, Mathf.Sin(num5)); Vector3 val2 = Ground19.On(center + val * num3 * wob[num4] * Random.Range(0.92f, 1.04f), 0f); ParticleSystem obj = dust; EmitParams val3 = default(EmitParams); ((EmitParams)(ref val3)).position = val2 + Vector3.up * 0.9f * scale; ((EmitParams)(ref val3)).velocity = val * Random.Range(7f, 14f) + Vector3.up * Random.Range(1f, 3f); ((EmitParams)(ref val3)).startLifetime = Random.Range(0.22f, 0.42f); ((EmitParams)(ref val3)).startSize = Random.Range(1.6f, 3.2f) * scale; ((EmitParams)(ref val3)).rotation = Random.Range(0f, 360f); obj.Emit(val3, 1); } } } } public static class Arrival20 { public static float ShowAt = 0.06f; public static float Rise = 5.5f; public static float CloudH = 15.5f; public static float Contact = 0.45f; public static float CloudR = 8.5f; public static float ShakeAmp = 0.32f; public static float ShakeRadius = 32f; private static Material cloud; private static Material wisp; private static Material Cloud { get { if (!Object.op_Implicit((Object)(object)cloud)) { return cloud = Vfx.Source("1efc_smk12_0.png"); } return cloud; } } private static Material Wisp { get { if (!Object.op_Implicit((Object)(object)wisp)) { return wisp = Vfx.Source("1efc_smk09_0.png"); } return wisp; } } public static float Fall(float age) { if (age >= Contact || age < 0f) { return 0f; } float num = age / Contact; return Rise * (1f - num * num); } private static Color Shade(float k) { //IL_0027: 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_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) k = Mathf.Clamp01(k + Random.Range(-0.15f, 0.15f)); Color result = Color.Lerp(new Color(0.55f, 0.57f, 0.61f), new Color(0.98f, 0.98f, 0.99f), k); result.a = 1f; return result; } private static ParticleSystem Layer(Transform parent, Material m, int max, float drag, float peak, float fadeIn, float grow) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_005a: 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_006a: 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_008a: 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_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_00cd: 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_00dd: 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_010f: 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_0133: 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_0147: Expected O, but got Unknown //IL_0142: 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_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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_019c: 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_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: 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_01e0: 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_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: 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) GameObject val = new GameObject("bunta cloud layer"); val.transform.SetParent(parent, false); ParticleSystem val2 = val.AddComponent<ParticleSystem>(); val2.Stop(true, (ParticleSystemStopBehavior)0); MainModule main = val2.main; ((MainModule)(ref main)).loop = false; ((MainModule)(ref main)).playOnAwake = false; ((MainModule)(ref main)).maxParticles = max; ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; EmissionModule emission = val2.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(0f); ShapeModule shape = val2.shape; ((ShapeModule)(ref shape)).enabled = false; LimitVelocityOverLifetimeModule limitVelocityOverLifetime = val2.limitVelocityOverLifetime; ((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).enabled = true; ((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).limit = new MinMaxCurve(400f); ((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).drag = new MinMaxCurve(drag); ((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).multiplyDragByParticleSize = false; ((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).multiplyDragByParticleVelocity = true; RotationOverLifetimeModule rotationOverLifetime = val2.rotationOverLifetime; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).enabled = true; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).z = new MinMaxCurve(-0.7f, 0.7f); SizeOverLifetimeModule sizeOverLifetime = val2.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = new MinMaxCurve(1f, new AnimationCurve((Keyframe[])(object)new Keyframe[3] { new Keyframe(0f, 0.75f, 2f, 2f), new Keyframe(0.35f, 1f), new Keyframe(1f, grow) })); ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val3 = new Gradient(); val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(Color.white, 0f), new GradientColorKey(new Color(0.85f, 0.85f, 0.87f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[4] { new GradientAlphaKey((fadeIn < 0.04f) ? (peak * 0.7f) : 0f, 0f), new GradientAlphaKey(peak, fadeIn), new GradientAlphaKey(peak * 0.75f, 0.5f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val3); ParticleSystemRenderer component = ((Component)val2).GetComponent<ParticleSystemRenderer>(); ((Renderer)component).sharedMaterial = m; component.renderMode = (ParticleSystemRenderMode)0; component.sortMode = (ParticleSystemSortMode)1; component.minParticleSize = 0f; component.maxParticleSize = 4f; val2.Play(); return val2; } private static void Emit(ParticleSystem a, ParticleSystem b, Vector3 p, Vector3 v, float size, float life, float shade) { //IL_0012: 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_0022: 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_0063: Unknown result type (might be due to invalid IL or missing references) ParticleSystem obj = ((Random.value < 0.55f) ? a : b); EmitParams val = default(EmitParams); ((EmitParams)(ref val)).position = p; ((EmitParams)(ref val)).velocity = v; ((EmitParams)(ref val)).startSize = size; ((EmitParams)(ref val)).startLifetime = life; ((EmitParams)(ref val)).startColor = Color32.op_Implicit(Shade(shade)); ((EmitParams)(ref val)).rotation = Random.Range(0f, 360f); obj.Emit(val, 1); } public static void Appear(Vector3 origin, float scale) { //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_0022: 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_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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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) //IL_00ce: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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_0102: 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_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0195: 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_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_01af: 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_01c6: 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_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: 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_01e8: 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) //IL_01f3: 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_0212: 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_025d: 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_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Gamabunta summoning cloud"); val.transform.position = origin; Object.Destroy((Object)(object)val, 3f); Vector3 val2 = origin + Vector3.up * CloudH * scale; float num = CloudR * scale; ParticleSystem a = Layer(val.transform, Cloud, 80, 1.8f, 1f, 0.02f, 1.35f); ParticleSystem b = Layer(val.transform, Wisp, 80, 1.8f, 0.95f, 0.02f, 1.4f); for (int i = 0; i < 42; i++) { Vector3 insideUnitSphere = Random.insideUnitSphere; insideUnitSphere.y *= 0.85f; Vector3 val3 = val2 + insideUnitSphere * num * 0.75f; float num2 = Mathf.InverseLerp(val2.y - num, val2.y + num, val3.y); Emit(a, b, val3, insideUnitSphere * Random.Range(2f, 5f) * scale, Random.Range(5.5f, 8.5f) * scale, Random.Range(0.55f, 0.75f), 0.35f + 0.65f * num2); } Vector3 val4 = default(Vector3); for (int j = 0; j < 12; j++) { float num3 = (float)j / 12f * MathF.PI * 2f + Random.value * 0.4f; ((Vector3)(ref val4))..ctor(Mathf.Cos(num3), 0f, Mathf.Sin(num3)); Vector3 p = val2 + Vector3.down * num * 0.75f + val4 * num * Random.Range(0.35f, 0.7f); Emit(a, b, p, val4 * Random.Range(6f, 10f) * scale + Vector3.down * Random.Range(1.5f, 3.5f) * scale, Random.Range(4f, 6.5f) * scale, Random.Range(0.45f, 0.65f), 0.3f); } for (int k = 0; k < 26; k++) { Vector3 onUnitSphere = Random.onUnitSphere; onUnitSphere.y = onUnitSphere.y * 0.7f + 0.15f; ((Vector3)(ref onUnitSphere)).Normalize(); Vector3 p2 = val2 + onUnitSphere * num * Random.Range(0.7f, 1f); Emit(a, b, p2, onUnitSphere * Random.Range(14f, 24f) * scale, Random.Range(4f, 7f) * scale, Random.Range(0.5f, 0.75f), 0.5f + 0.5f * onUnitSphere.y); } ParticleSystem val5 = Layer(val.transform, Wisp, 20, 3.2f, 0.55f, 0.05f, 1.6f); for (int l = 0; l < 6; l++) { Vector3 position = val2 + Vector3.down * num * 0.6f + new Vector3(Random.Range(-1f, 1f), 0f, Random.Range(-1f, 1f)) * num * 0.5f; EmitParams val6 = default(EmitParams); ((EmitParams)(ref val6)).position = position; ((EmitParams)(ref val6)).velocity = Vector3.down * Random.Range(14f, 22f) * scale; ((EmitParams)(ref val6)).startSize = Random.Range(2f, 3.5f) * scale; ((EmitParams)(ref val6)).startLifetime = Random.Range(0.3f, 0.42f); ((EmitParams)(ref val6)).startColor = Color32.op_Implicit(Shade(0.55f)); ((EmitParams)(ref val6)).rotation = Random.Range(0f, 360f); val5.Emit(val6, 1); } Light obj = new GameObject("summon flash").AddComponent<Light>(); ((Component)obj).transform.position = val2; obj.type = (LightType)2; obj.color = new Color(1f, 0.97f, 0.9f); obj.range = 40f * scale; obj.intensity = 2.5f; ((Component)obj).gameObject.AddComponent<LightFade>().Duration = 0.3f; } public static void Land(Vector3 g, float scale) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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_0079: 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_0093: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) Cracks20.Create(g, scale); ShakeEmitter obj = new GameObject("Gamabunta landing nudge").AddComponent<ShakeEmitter>(); ((Component)obj).transform.position = g; obj.duration = 0.3f; obj.radius = ShakeRadius * Mathf.Max(1f, scale); obj.amplitudeTimeDecay = true; obj.wave = new Wave { amplitude = ShakeAmp, frequency = 9f, cycleOffset = 0f }; Object.Destroy((Object)(object)((Component)obj).gameObject, 1f); Sfx20.Play("Boom", g + Vector3.up * 2f); } } public sealed class Cracks20 : MonoBehaviour { private static Material mat; private static Texture2D tex; private static int seed; private Mesh mesh; private Color[] colors; private float[] along; private float[] baseA; private float started; private float maxLen; private bool settled; public static float Life = 5.5f; public static float Open = 0.16f; private static Material Mat { get { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_0065: 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) if (!Object.op_Implicit((Object)(object)mat)) { tex = new Texture2D(8, 64, (TextureFormat)4, false); Color[] array = (Color[])(object)new Color[512]; for (int i = 0; i < 64; i++) { float num = Mathf.Pow(Mathf.Sin((float)i / 63f * MathF.PI), 1.6f); for (int j = 0; j < 8; j++) { array[i * 8 + j] = new Color(1f, 1f, 1f, num); } } tex.SetPixels(array); tex.Apply(); ((Texture)tex).wrapMode = (TextureWrapMode)1; mat = Vfx.Transparent(); mat.mainTexture = (Texture)(object)tex; mat.renderQueue = 2990; } return mat; } } public static Cracks20 Create(Vector3 g, float scale) { //IL_0005: 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) Cracks20 cracks = new GameObject("Gamabunta landing fissures").AddComponent<Cracks20>(); cracks.Build(g, scale); return cracks; } private void Build(Vector3 g, float scale) { //IL_0092: 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_0103: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown started = Time.time; List<Vector3> list = new List<Vector3>(); List<Vector2> list2 = new List<Vector2>(); List<Color> list3 = new List<Color>(); List<float> list4 = new List<float>(); List<int> list5 = new List<int>(); int num = Random.Range(9, 13); float num2 = Random.value * 360f; for (int i = 0; i < num; i++) { float ang = num2 + (float)i * 360f / (float)num + Random.Range(-14f, 14f); float len = Random.Range(11f, 20f) * scale; float r = Random.Range(2.5f, 4.5f) * scale; Strand(g, ang, r, len, Random.Range(1.9f, 2.6f) * scale, list, list2, list3, list4, list5, branch: true, new Color(0.025f, 0.02f, 0.018f, 1f)); Strand(g, ang, r, len, Random.Range(4.8f, 6.2f) * scale, list, list2, list3, list4, list5, branch: false, new Color(0.1f, 0.08f, 0.06f, 0.6f), halo: true); } mesh = new Mesh { name = "fissures" }; mesh.SetVertices(list); mesh.SetUVs(0, list2); colors = list3.ToArray(); mesh.colors = colors; mesh.SetTriangles(list5, 0); mesh.RecalculateBounds(); along = list4.ToArray(); float[] array = along; foreach (float num3 in array) { maxLen = Mathf.Max(maxLen, num3); } ((Component)this).gameObject.AddComponent<MeshFilter>().sharedMesh = mesh; ((Renderer)((Component)this).gameObject.AddComponent<MeshRenderer>()).sharedMaterial = Mat; Object.Destroy((Object)(object)((Component)this).gameObject, Life + 0.2f); Update(); } private static void Strand(Vector3 g, float ang, float r0, float len, float width, List<Vector3> v, List<Vector2> uv, List<Color> c, List<float> al, List<int> t, bool branch, Color tint, bool halo = false) { //IL_0038: 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) //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_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_012c: 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_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_0141: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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_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_00f3: 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_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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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_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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_0224: 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_01fe: 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_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: 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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_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_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: 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_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: 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_0290: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) if (halo) { Random.InitState(seed); } else { seed = Random.Range(1, 1073741824); Random.InitState(seed); } int num = 9; Vector3 val = Quaternion.Euler(0f, ang, 0f) * Vector3.forward; Vector3 val2 = g + val * r0; float num2 = ang; float num3 = r0; Vector3[] array = (Vector3[])(object)new Vector3[num + 1]; Vector3[] array2 = (Vector3[])(object)new Vector3[num + 1]; bool[] array3 = new bool[num + 1]; float[] array4 = new float[num + 1]; Vector3 val5; RaycastHit val6 = default(RaycastHit); for (int i = 0; i <= num; i++) { if (i > 0) { num2 += Random.Range(-28f, 28f); float num4 = len / (float)num * Random.Range(0.8f, 1.2f); Vector3 val3 = Quaternion.Euler(0f, num2, 0f) * Vector3.forward; Vector3 val4 = val2 - g; val4.y = 0f; ((Vector3)(ref val4)).Normalize(); val5 = val3 + val4 * 0.9f; val3 = ((Vector3)(ref val5)).normalized; val2 += val3 * num4; num3 += num4; } array3[i] = Physics.Raycast(val2 + Vector3.up * 6f, Vector3.down, ref val6, 14f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1) && ((RaycastHit)(ref val6)).normal.y > 0.35f; if (array3[i]) { array[i] = ((RaycastHit)(ref val6)).point; array2[i] = ((RaycastHit)(ref val6)).normal; val2.y = ((RaycastHit)(ref val6)).point.y; } else { array[i] = val2; array2[i] = Vector3.up; } array4[i] = num3; } int count = v.Count; Color item = default(Color); for (int j = 0; j <= num; j++) { Vector3 val7 = ((j < num) ? (array[j + 1] - array[j]) : (array[j] - array[j - 1])); val5 = Vector3.Cross(array2[j], val7); Vector3 normalized = ((Vector3)(ref val5)).normalized; float num5 = (float)j / (float)num; float num6 = width * Mathf.Lerp(1f, 0.12f, Mathf.Pow(num5, 0.8f)) * Random.Range(0.75f, 1.25f); Vector3 val8 = array[j] + array2[j] * 0.06f; v.Add(val8 - normalized * num6 * 0.5f); v.Add(val8 + normalized * num6 * 0.5f); uv.Add(new Vector2(0f, 0f)); uv.Add(new Vector2(1f, 1f)); float num7 = (array3[j] ? tint.a : 0f); ((Color)(ref item))..ctor(tint.r, tint.g, tint.b, num7); c.Add(item); c.Add(item); al.Add(array4[j]); al.Add(array4[j]); } for (int k = 0; k < num; k++) { int num8 = count + k * 2; t.Add(num8); t.Add(num8 + 2); t.Add(num8 + 1); t.Add(num8 + 1); t.Add(num8 + 2); t.Add(num8 + 3); } for (int l = count; l < v.Count; l += 2) { uv[l] = new Vector2(0.5f, 0f); uv[l + 1] = new Vector2(0.5f, 1f); } if (!branch) { return; } for (int m = 0; m < 2; m++) { if (!(Random.value < 0.45f)) { int num9 = Random.Range(3, 6); Random.Range(25f, 45f); Vector3 val9 = array[num9] - g; val9.y = 0f; float ang2 = Mathf.Atan2(val9.x, val9.z) * 57.29578f + (float)((m == 0) ? 1 : (-1)) * Random.Range(18f, 35f); int num10 = seed; Strand(g, ang2, ((Vector3)(ref val9)).magnitude, len * Random.Range(0.3f, 0.45f), width * 0.45f, v, uv, c, al, t, branch: false, tint, halo); seed = num10; } } } private void Update() { //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_0101: 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) if (!Object.op_Implicit((Object)(object)mesh)) { return; } float num = Time.time - started; float num2 = maxLen * Mathf.Clamp01(num / Open); float num3 = Mathf.Clamp01((Life - num) / 1.5f); if (baseA == null) { baseA = new float[colors.Length]; for (int i = 0; i < colors.Length; i++) { baseA[i] = colors[i].a; } } if (!(num > Open + 0.2f) || !(num3 >= 1f) || !settled) { settled = num > Open + 0.2f; for (int j = 0; j < colors.Length; j++) { Color val = colors[j]; val.a = baseA[j] * num3 * Mathf.Clamp01((num2 - along[j]) / 1.5f); colors[j] = val; } mesh.colors = colors; } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)mesh)) { Object.Destroy((Object)(object)mesh); } } } [DefaultExecutionOrder(1100)] public sealed class BladeCut19 : MonoBehaviour { private struct S { public float t; public Vector3 bas; public Vector3 dir; public float len; } private struct R { public float t; public Vector3 a; public Vector3 b; public Vector3 c; } public SummonActor Actor; public Visual Model; private Transform blade; private Vector3 tipLocal; private Vector3 baseLocal; public const float Start = 7.9f; public const float End = 8.16f; public const float Fade = 0.15f; public const float Strike = 8f; private readonly List<S> samples = new List<S>(); private Mesh sheet; private Mesh edge; private MeshRenderer sheetR; private MeshRenderer edgeR; private Material sheetM; private Material edgeM; private LineRenderer[] streaks; private bool struck; public static bool LogEvents; private readonly List<Vector3> sv = new List<Vector3>(); private readonly List<Vector3> ev = new List<Vector3>(); private readonly List<Color> sc = new List<Color>(); private readonly List<Color> ec = new List<Color>(); private readonly List<int> st = new List<int>(); private readonly List<int> et = new List<int>(); private readonly List<R> rib = new List<R>(); private ParticleSystem arcDust; private float nextArc; public static BladeCut19 Attach(SummonActor actor, Visual model) { //IL_001b: 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_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_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_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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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_0128: 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_010f: 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_0141: 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_014a: 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_0151: 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_0157: 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_0184: 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_018e: 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_0173: Unknown result type (might be due to invalid IL or missing references) Transform val = model.Bone("2gbt00t0 blade"); if (!Object.op_Implicit((Object)(object)val)) { return null; } BladeCut19 bladeCut = new GameObject("Toad Blade Cut 19").AddComponent<BladeCut19>(); bladeCut.Actor = actor; bladeCut.Model = model; bladeCut.blade = val; SkinnedMeshRenderer val2 = ((IEnumerable<SkinnedMeshRenderer>)((Component)model).GetComponentsInChildren<SkinnedMeshRenderer>(true)).FirstOrDefault((Func<SkinnedMeshRenderer, bool>)((SkinnedMeshRenderer x) => ((Object)x).name.ToLower().Contains("blade"))); bladeCut.tipLocal = Vector3.up * 3f; bladeCut.baseLocal = Vector3.zero; if (Object.op_Implicit((Object)(object)val2)) { int num = Array.IndexOf(val2.bones, val); Mesh sharedMesh = val2.sharedMesh; if (num >= 0 && Object.op_Implicit((Object)(object)sharedMesh)) { Matrix4x4 val3 = sharedMesh.bindposes[num]; float num2 = -1f; Vector3 val4 = Vector3.zero; Vector3[] vertices = sharedMesh.vertices; foreach (Vector3 val5 in vertices) { Vector3 val6 = ((Matrix4x4)(ref val3)).MultiplyPoint3x4(val5); if (((Vector3)(ref val6)).sqrMagnitude > num2) { num2 = ((Vector3)(ref val6)).sqrMagnitude; val4 = val6; } } float num4 = -1f; Vector3 val7 = Vector3.zero; vertices = sharedMesh.vertices; foreach (Vector3 val8 in vertices) { Vector3 val9 = ((Matrix4x4)(ref val3)).MultiplyPoint3x4(val8); Vector3 val10 = val9 - val4; float sqrMagnitude = ((Vector3)(ref val10)).sqrMagnitude; if (sqrMagnitude > num4) { num4 = sqrMagnitude; val7 = val9; } } bladeCut.tipLocal = val4; bladeCut.baseLocal = val7; } } bladeCut.Build(); return bladeCut; } private static Material Mat(bool additive, Color tint) { //IL_0026: 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) Material val = Vfx.Transparent(); if (additive) { val.SetInt("_DstBlend", 1); } val.mainTexture = (Texture)(object)Texture2D.whiteTexture; val.SetColor("_TintColor", tint); val.color = tint; return val; } private void Build() { //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_0016: Expected O, but got Unknown //IL_0022: 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_0037: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_007e: 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_00a9: Expected O, but got Unknown //IL_00da: 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) sheet = new Mesh { name = "Blade cut sheet" }; sheet.MarkDynamic(); edge = new Mesh { name = "Blade cut edge" }; edge.MarkDynamic(); GameObject val = new GameObject("cut sheet"); val.transform.SetParent(((Component)this).transform, false); val.AddComponent<MeshFilter>().sharedMesh = sheet; sheetR = val.AddComponent<MeshRenderer>(); sheetM = Mat(additive: false, Color.white); ((Renderer)sheetR).sharedMaterial = sheetM; GameObject val2 = new GameObject("cut edge"); val2.transform.SetParent(((Component)this).transform, false); val2.AddComponent<MeshFilter>().sharedMesh = edge; edgeR = val2.AddComponent<MeshRenderer>(); edgeM = Mat(additive: true, Color.white); ((Renderer)edgeR).sharedMaterial = edgeM; streaks = (LineRenderer[])(object)new LineRenderer[7]; for (int i = 0; i < streaks.Length; i++) { streaks[i] = Vfx.Strand(new Color(1f, 1f, 1f, 0f), 0.12f, 14); ((Component)streaks[i]).transform.SetParent(((Component)this).transform, false); ((Renderer)streaks[i]).enabled = false; } } private void LateUpdate() { //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_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_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_00ad: 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_00b4: 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_00d4: 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_00db: 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_00e0: 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_010b: 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_0114: 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_0173: 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) //IL_0180: 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_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_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_0199: 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_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_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: 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_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0222: 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_0226: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)Actor) || !Object.op_Implicit((Object)(object)Model) || !Object.op_Implicit((Object)(object)blade)) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num = SageController.Now - Actor.started; if (num > 8.41f) { Object.Destroy((Object)(object)((Component)this).gameObject, 0.05f); ((Behaviour)this).enabled = false; return; } if (SummonActor.QaNoFx) { MeshRenderer obj = sheetR; bool enabled = (((Renderer)edgeR).enabled = false); ((Renderer)obj).enabled = enabled; return; } Vector3 val = blade.TransformPoint(tipLocal); Vector3 val2 = blade.TransformPoint(baseLocal); Vector3 val3 = val - val2; float magnitude = ((Vector3)(ref val3)).magnitude; Vector3 dir = ((magnitude > 0.01f) ? ((val - val2) / magnitude) : blade.up); if (num >= 7.9f && num <= 8.16f) { samples.Add(new S { t = num, bas = val2, dir = dir, len = magnitude }); ArcDust(val); if (samples.Count > 160) { samples.RemoveAt(0); } } if (LogEvents && num >= 7.85f && num <= 8.25f) { Vector3 origin = Actor.origin; Vector3 val4 = Vector3.ProjectOnPlane(Actor.target - origin, Vector3.up); Vector3 val5 = Vector3.ProjectOnPlane(val - origin, Vector3.up); Vector3 val6 = Vector3.ProjectOnPlane(((Component)Actor).transform.forward, Vector3.up); Plugin.Instance.Log.LogInfo((object)("BUNTA19_BLADE age=" + num.ToString("0.000") + " tipLeftOfTarget=" + (0f - Vector3.SignedAngle(val4, val5, Vector3.up)).ToString("0") + " tipLeftOfFwd=" + (0f - Vector3.SignedAngle(val6, val5, Vector3.up)).ToString("0") + " fwdLeftOfTarget=" + (0f - Vector3.SignedAngle(val4, val6, Vector3.up)).ToString("0") + " tipR=" + ((Vector3)(ref val5)).magnitude.ToString("0.0") + " tipH=" + (val.y - origin.y).ToString("0.0"))); } while (samples.Count > 0 && num - samples[0].t > 0.15f) { samples.RemoveAt(0); } BuildMeshes(num); if (!struck && num >= 8f) { struck = true; Strike19(num); } } private static Vector3 CR(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, float u) { //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_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_0022: 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_002e: 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_0039: 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_0049: 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_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_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_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_0070: 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) //IL_008a: 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_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_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) float num = u * u; float num2 = num * u; return 0.5f * (2f * p1 + (-p0 + p2) * u + (2f * p0 - 5f * p1 + 4f * p2 - p3) * num + (-p0 + 3f * p1 - 3f * p2 + p3) * num2); } private void Resample() { //IL_003f: 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_0185: 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_0198: 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_01a7: 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_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: 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_01e2: 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) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: 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_00b6: 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_00bb: 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_00c4: 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_0105: 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_010f: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: 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_012c: 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_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) rib.Clear(); int count = samples.Count; for (int i = 0; i < count; i++) { S s = samples[i]; int num = 1; if (i > 0) { num = Mathf.Clamp(Mathf.CeilToInt(Vector3.Angle(samples[i - 1].dir, s.dir) / 4f), 1, 16); } for (int j = ((i != 0) ? 1 : num); j <= num; j++) { float num2 = (float)j / (float)num; S s2 = s; if (i > 0 && j < num) { S s3 = samples[i - 1]; Vector3 p = ((i > 1) ? samples[i - 2].bas : s3.bas); Vector3 p2 = ((i < count - 1) ? samples[i + 1].bas : s.bas); S s4 = new S { t = Mathf.Lerp(s3.t, s.t, num2), bas = CR(p, s3.bas, s.bas, p2, num2) }; Vector3 val = Vector3.Slerp(s3.dir, s.dir, num2); s4.dir = ((Vector3)(ref val)).normalized; s4.len = Mathf.Lerp(s3.len, s.len, num2); s2 = s4; } rib.Add(new R { t = s2.t, a = s2.bas + s2.dir * s2.len * 0.4f, b = s2.bas + s2.dir * s2.len, c = s2.bas + s2.dir * s2.len * 1.22f }); } } } private void BuildMeshes(float age) { //IL_0104: Unknown result type