Decompiled source of Animebirds Boomboom Cards v7.0.1
AnimebirdsBoomBoomCards/Animebirds Boomboom cards.dll
Decompiled 3 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.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text; using AB_BoomCards.Cards; using AnimebirdsBoomboomCards.Cards; using BepInEx; using HarmonyLib; using Photon.Pun; using TMPro; using UnboundLib; using UnboundLib.Cards; using UnboundLib.GameModes; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("Animebirds Boomboom cards")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Animebirds Boomboom cards")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("9029e8c3-f22f-4414-a6ce-1fa377c2e99a")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace AnimebirdsBoomboomCards.Cards { public class PuppetMaster : CustomCard { protected override string GetTitle() { return "Puppet Master"; } protected override string GetDescription() { return "Shoot an enemy to make them your puppet, if all on same team - Win"; } public override string GetModName() { return "Animebirds Boomboom Cards"; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Conversion", amount = "+5s", simepleAmount = (SimpleAmount)3 } }; } protected override GameObject GetCardArt() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0068: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Animebirds_Boomboom_cards.Resources.PuppetMasterart.png"); if (stream == null) { return new GameObject("PuppetMasterart_missing"); } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); Texture2D val = new Texture2D(2, 2, (TextureFormat)4, false); ImageConversion.LoadImage(val, array); Sprite sprite = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), 1f); GameObject val2 = new GameObject("PuppetMasterart"); Image obj = val2.AddComponent<Image>(); obj.sprite = sprite; obj.preserveAspect = true; val2.GetComponent<RectTransform>().sizeDelta = new Vector2((float)((Texture)val).width * 2.1f, (float)((Texture)val).height * 2.1f); ((Object)val2).hideFlags = (HideFlags)61; return val2; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers stats, Block block) { } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers stats) { PuppetMasterPatches.EnsurePatched(); PuppetMasterEffect orAddComponent = ExtensionMethods.GetOrAddComponent<PuppetMasterEffect>(((Component)player).gameObject, false); orAddComponent.ownerPlayer = player; orAddComponent.stacks++; if (orAddComponent.stacks == 1) { orAddComponent.gun = gun; gun.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(gun.ShootPojectileAction, new Action<GameObject>(orAddComponent.OnShootProjectile)); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers stats) { PuppetMasterEffect puppetMasterEffect = ((player != null) ? ((Component)player).gameObject.GetComponent<PuppetMasterEffect>() : null); if (!((Object)(object)puppetMasterEffect != (Object)null)) { return; } puppetMasterEffect.stacks--; if (puppetMasterEffect.stacks <= 0) { if ((Object)(object)puppetMasterEffect.gun != (Object)null) { Gun gun2 = puppetMasterEffect.gun; gun2.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(gun2.ShootPojectileAction, new Action<GameObject>(puppetMasterEffect.OnShootProjectile)); } Object.Destroy((Object)(object)puppetMasterEffect); } } } public class PuppetMasterEffect : MonoBehaviour { [CompilerGenerated] private sealed class <CleanupPuppets>d__10 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CleanupPuppets>d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: { <>1__state = -1; PuppetState[] array = Object.FindObjectsOfType<PuppetState>(); foreach (PuppetState puppetState in array) { if ((Object)(object)puppetState != (Object)null) { puppetState.ForceRestore(); } } <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; } case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <EndRoundForInfection>d__8 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Player master; private int <originalMasterTeam>5__2; private List<Player> <allPlayers>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <EndRoundForInfection>d__8(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <allPlayers>5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_0148: 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_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)master == (Object)null) { return false; } <originalMasterTeam>5__2 = master.teamID; <allPlayers>5__3 = PlayerManager.instance.players; foreach (Player item in <allPlayers>5__3) { if (!((Object)(object)item == (Object)null) && !((Object)(object)item.data == (Object)null)) { PuppetState component = ((Component)item).GetComponent<PuppetState>(); if ((Object)(object)component != (Object)null) { component.ForceRestore(); } } } <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 2; return true; case 2: <>1__state = -1; foreach (Player item2 in <allPlayers>5__3) { if (!((Object)(object)item2 == (Object)null) && !((Object)(object)item2.data == (Object)null) && !item2.data.dead && item2.teamID != <originalMasterTeam>5__2) { ((Damagable)item2.data.healthHandler).CallTakeDamage(Vector2.up * 999f, Vector2.op_Implicit(((Component)item2).transform.position), (GameObject)null, master, true); } } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public Player ownerPlayer; public Gun gun; public int stacks; private const float BaseConversionTime = 5f; private static bool isCheckingInfection; public float GetConversionTime() { return 5f * (float)stacks; } public void OnShootProjectile(GameObject projectile) { ProjectileHit component = projectile.GetComponent<ProjectileHit>(); if ((Object)(object)component != (Object)null) { component.bulletCanDealDeamage = false; } } public static void CheckInfectionComplete(Player master) { if (isCheckingInfection || (Object)(object)master == (Object)null) { return; } isCheckingInfection = true; List<Player> players = PlayerManager.instance.players; if (players == null || players.Count <= 1) { isCheckingInfection = false; return; } int teamID = master.teamID; bool flag = true; int num = 0; bool flag2 = false; foreach (Player item in players) { if (!((Object)(object)item == (Object)null) && !((Object)(object)item.data == (Object)null) && !item.data.dead) { num++; if (item.teamID != teamID) { flag = false; break; } if ((Object)(object)((Component)item).GetComponent<PuppetState>() != (Object)null) { flag2 = true; } } } if (flag && num > 1 && flag2) { PuppetMasterEffect component = ((Component)master).GetComponent<PuppetMasterEffect>(); if ((Object)(object)component != (Object)null) { ((MonoBehaviour)component).StartCoroutine(component.EndRoundForInfection(master)); } } isCheckingInfection = false; } [IteratorStateMachine(typeof(<EndRoundForInfection>d__8))] private IEnumerator EndRoundForInfection(Player master) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <EndRoundForInfection>d__8(0) { master = master }; } private void Start() { GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)CleanupPuppets); } [IteratorStateMachine(typeof(<CleanupPuppets>d__10))] private IEnumerator CleanupPuppets(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <CleanupPuppets>d__10(0); } private void OnDestroy() { GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)CleanupPuppets); if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(OnShootProjectile)); } } } public class PuppetState : MonoBehaviour { [CompilerGenerated] private sealed class <AutoShootRoutine>d__14 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PuppetState <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <AutoShootRoutine>d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown int num = <>1__state; PuppetState puppetState = <>4__this; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; if ((Object)(object)puppetState.puppet == (Object)null || (Object)(object)puppetState.puppet.data == (Object)null || puppetState.puppet.data.dead) { goto IL_00fa; } WeaponHandler component = ((Component)puppetState.puppet).GetComponent<WeaponHandler>(); if ((Object)(object)component != (Object)null && (Object)(object)component.gun != (Object)null) { ((Weapon)component.gun).Attack(0f, true, 1f, 1f, false); } } else { <>1__state = -1; } if (puppetState.isActive && (Object)(object)puppetState.puppet != (Object)null && (Object)(object)puppetState.puppet.data != (Object)null && !puppetState.puppet.data.dead) { <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 1; return true; } goto IL_00fa; IL_00fa: return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <OnPointEnd>d__12 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PuppetState <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnPointEnd>d__12(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { int num = <>1__state; PuppetState puppetState = <>4__this; if (num != 0) { return false; } <>1__state = -1; puppetState.ForceRestore(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <RestoreAfterDelay>d__23 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PuppetState <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <RestoreAfterDelay>d__23(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown int num = <>1__state; PuppetState puppetState = <>4__this; switch (num) { default: return false; case 0: { <>1__state = -1; float conversionDuration = puppetState.GetConversionDuration(); <>2__current = (object)new WaitForSeconds(conversionDuration); <>1__state = 1; return true; } case 1: <>1__state = -1; puppetState.RestoreOriginal(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private Player puppet; private Player masterPlayer; private int originalTeamID; private int originalPlayerID; private Coroutine restoreCoroutine; private Coroutine autoShootCoroutine; private GameObject visualEffect; private bool isActive; private bool hasCleanedUp; private bool reviveHookRegistered; private Dictionary<Renderer, Color> savedColors = new Dictionary<Renderer, Color>(); private void Start() { GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)OnPointEnd); } [IteratorStateMachine(typeof(<OnPointEnd>d__12))] private IEnumerator OnPointEnd(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnPointEnd>d__12(0) { <>4__this = this }; } public void Initialize(Player targetPlayer, Player master) { if ((Object)(object)targetPlayer == (Object)null || (Object)(object)master == (Object)null || (Object)(object)targetPlayer == (Object)(object)master || (Object)(object)targetPlayer.data == (Object)null || targetPlayer.data.dead) { return; } puppet = targetPlayer; masterPlayer = master; if (!isActive) { originalTeamID = puppet.teamID; originalPlayerID = puppet.playerID; if (!reviveHookRegistered && (Object)(object)puppet.data.healthHandler != (Object)null) { HealthHandler healthHandler = puppet.data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(OnPuppetRevive)); reviveHookRegistered = true; } SaveOriginalColors(); } if (restoreCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(restoreCoroutine); } ChangeToPuppet(master.teamID, master.playerID); CreateVisualEffect(); isActive = true; if (autoShootCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(autoShootCoroutine); } autoShootCoroutine = ((MonoBehaviour)this).StartCoroutine(AutoShootRoutine()); restoreCoroutine = ((MonoBehaviour)this).StartCoroutine(RestoreAfterDelay()); } [IteratorStateMachine(typeof(<AutoShootRoutine>d__14))] private IEnumerator AutoShootRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <AutoShootRoutine>d__14(0) { <>4__this = this }; } private void SaveOriginalColors() { //IL_0073: 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) if ((Object)(object)puppet == (Object)null) { return; } savedColors.Clear(); Renderer[] componentsInChildren = ((Component)((Component)puppet).transform.root).GetComponentsInChildren<Renderer>(true); foreach (Renderer val in componentsInChildren) { if (!((Object)(object)val == (Object)null) && !((Object)((Component)val).gameObject).name.ToLower().Contains("heat")) { SpriteRenderer val2 = (SpriteRenderer)(object)((val is SpriteRenderer) ? val : null); if (val2 != null) { savedColors[val] = val2.color; } else if ((Object)(object)val.material != (Object)null && val.material.HasProperty("_Color")) { savedColors[val] = val.material.color; } } } } private void OnPuppetRevive() { if (!((Object)(object)puppet == (Object)null) && !hasCleanedUp) { if (autoShootCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(autoShootCoroutine); autoShootCoroutine = null; } if ((Object)(object)visualEffect != (Object)null) { Object.Destroy((Object)(object)visualEffect); visualEffect = null; } puppet.teamID = originalTeamID; RestoreOriginalColors(); } } public Player GetMaster() { return masterPlayer; } private float GetConversionDuration() { if ((Object)(object)masterPlayer == (Object)null) { return 5f; } PuppetMasterEffect component = ((Component)masterPlayer).GetComponent<PuppetMasterEffect>(); if ((Object)(object)component != (Object)null) { return component.GetConversionTime(); } return 5f; } private void ChangeToPuppet(int newTeamID, int masterPlayerID) { if (!((Object)(object)puppet == (Object)null)) { puppet.teamID = newTeamID; ChangeToPuppetColor(masterPlayerID); } } private void ChangeToPuppetColor(int masterPlayerID) { //IL_0017: 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_0073: 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) if ((Object)(object)puppet == (Object)null) { return; } PlayerSkin playerSkinColors = PlayerSkinBank.GetPlayerSkinColors(masterPlayerID); Color color = playerSkinColors.color; Renderer[] componentsInChildren = ((Component)((Component)puppet).transform.root).GetComponentsInChildren<Renderer>(true); foreach (Renderer val in componentsInChildren) { if (!((Object)(object)val == (Object)null) && !((Object)((Component)val).gameObject).name.ToLower().Contains("heat")) { SpriteRenderer val2 = (SpriteRenderer)(object)((val is SpriteRenderer) ? val : null); if (val2 != null) { val2.color = color; } else if ((Object)(object)val.material != (Object)null && val.material.HasProperty("_Color")) { val.material.color = color; } } } SetTeamColor[] componentsInChildren2 = ((Component)((Component)puppet).transform.root).GetComponentsInChildren<SetTeamColor>(true); foreach (SetTeamColor val3 in componentsInChildren2) { if ((Object)(object)val3 != (Object)null) { val3.Set(playerSkinColors); } } } private void RestoreOriginalColors() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)puppet == (Object)null) { return; } foreach (KeyValuePair<Renderer, Color> savedColor in savedColors) { if (!((Object)(object)savedColor.Key == (Object)null)) { Renderer key = savedColor.Key; SpriteRenderer val = (SpriteRenderer)(object)((key is SpriteRenderer) ? key : null); if (val != null) { val.color = savedColor.Value; } else if ((Object)(object)savedColor.Key.material != (Object)null && savedColor.Key.material.HasProperty("_Color")) { savedColor.Key.material.color = savedColor.Value; } } } PlayerSkin playerSkinColors = PlayerSkinBank.GetPlayerSkinColors(originalPlayerID); SetTeamColor[] componentsInChildren = ((Component)((Component)puppet).transform.root).GetComponentsInChildren<SetTeamColor>(true); foreach (SetTeamColor val2 in componentsInChildren) { if ((Object)(object)val2 != (Object)null) { val2.Set(playerSkinColors); } } savedColors.Clear(); } private void CreateVisualEffect() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_004f: 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_0072: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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_00fb: 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_010b: 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_0142: Expected O, but got Unknown if ((Object)(object)visualEffect != (Object)null) { Object.Destroy((Object)(object)visualEffect); } visualEffect = new GameObject("PuppetVisual"); visualEffect.transform.SetParent(((Component)puppet).transform); visualEffect.transform.localPosition = Vector3.zero; ParticleSystem obj = visualEffect.AddComponent<ParticleSystem>(); MainModule main = obj.main; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(1f); ((MainModule)(ref main)).startSpeed = MinMaxCurve.op_Implicit(0.5f); ((MainModule)(ref main)).startSize = MinMaxCurve.op_Implicit(0.15f); ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(new Color(0.6f, 0f, 0.8f, 0.8f)); ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(-0.2f); ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; ((MainModule)(ref main)).maxParticles = 30; ((MainModule)(ref main)).loop = true; EmissionModule emission = obj.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(15f); ShapeModule shape = obj.shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)0; ((ShapeModule)(ref shape)).radius = 1.2f; ParticleSystemRenderer component = ((Component)obj).GetComponent<ParticleSystemRenderer>(); ((Renderer)component).sortingOrder = 100; ((Renderer)component).material = new Material(Shader.Find("Sprites/Default")); visualEffect.AddComponent<PuppetStringEffect>(); obj.Play(); } [IteratorStateMachine(typeof(<RestoreAfterDelay>d__23))] private IEnumerator RestoreAfterDelay() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <RestoreAfterDelay>d__23(0) { <>4__this = this }; } public void ForceRestore() { if (!hasCleanedUp) { if (restoreCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(restoreCoroutine); } if (autoShootCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(autoShootCoroutine); autoShootCoroutine = null; } RestoreOriginal(); } } private void RestoreOriginal() { if (!hasCleanedUp) { if (autoShootCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(autoShootCoroutine); autoShootCoroutine = null; } if ((Object)(object)puppet == (Object)null || (Object)(object)puppet.data == (Object)null) { CleanupAndDestroy(); return; } puppet.teamID = originalTeamID; RestoreOriginalColors(); CleanupAndDestroy(); } } private void CleanupAndDestroy() { if (!hasCleanedUp) { hasCleanedUp = true; if ((Object)(object)visualEffect != (Object)null) { Object.Destroy((Object)(object)visualEffect); } savedColors.Clear(); isActive = false; GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)OnPointEnd); if (reviveHookRegistered && (Object)(object)puppet != (Object)null && (Object)(object)puppet.data != (Object)null && (Object)(object)puppet.data.healthHandler != (Object)null) { HealthHandler healthHandler = puppet.data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnPuppetRevive)); reviveHookRegistered = false; } Object.Destroy((Object)(object)this); } } private void OnDestroy() { if (!hasCleanedUp) { if ((Object)(object)visualEffect != (Object)null) { Object.Destroy((Object)(object)visualEffect); } savedColors.Clear(); GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)OnPointEnd); if (reviveHookRegistered && (Object)(object)puppet != (Object)null && (Object)(object)puppet.data != (Object)null && (Object)(object)puppet.data.healthHandler != (Object)null) { HealthHandler healthHandler = puppet.data.healthHandler; healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(OnPuppetRevive)); reviveHookRegistered = false; } } } private void Update() { if ((Object)(object)puppet != (Object)null && (Object)(object)puppet.data != (Object)null && puppet.data.dead && !hasCleanedUp) { if (autoShootCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(autoShootCoroutine); autoShootCoroutine = null; } if ((Object)(object)visualEffect != (Object)null) { Object.Destroy((Object)(object)visualEffect); visualEffect = null; } RestoreOriginalColors(); CleanupAndDestroy(); } } } public class PuppetStringEffect : MonoBehaviour { private LineRenderer[] strings; private Transform puppet; private int stringCount = 5; private float stringHeight = 3f; private float waveSpeed = 2f; private float waveAmount = 0.3f; private void Start() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_009d: 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) puppet = ((Component)this).transform.parent; strings = (LineRenderer[])(object)new LineRenderer[stringCount]; for (int i = 0; i < stringCount; i++) { GameObject val = new GameObject($"String_{i}"); val.transform.SetParent(((Component)this).transform); LineRenderer val2 = val.AddComponent<LineRenderer>(); val2.startWidth = 0.02f; val2.endWidth = 0.01f; val2.positionCount = 10; ((Renderer)val2).material = new Material(Shader.Find("Sprites/Default")); val2.startColor = new Color(0.6f, 0f, 0.8f, 0.6f); val2.endColor = new Color(0.4f, 0f, 0.6f, 0.2f); ((Renderer)val2).sortingOrder = 99; val2.useWorldSpace = true; strings[i] = val2; } } private void Update() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_007c: 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_0091: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)puppet == (Object)null) { return; } Vector3 position = puppet.position; for (int i = 0; i < stringCount; i++) { if (!((Object)(object)strings[i] == (Object)null)) { float num = 360f / (float)stringCount * (float)i * ((float)Math.PI / 180f); float num2 = 0.5f; Vector3 val = position + new Vector3(Mathf.Cos(num) * num2, Mathf.Sin(num) * num2 * 0.5f, 0f); Vector3 val2 = val + Vector3.up * stringHeight; for (int j = 0; j < strings[i].positionCount; j++) { float num3 = (float)j / (float)(strings[i].positionCount - 1); Vector3 val3 = Vector3.Lerp(val, val2, num3); float num4 = Mathf.Sin(Time.time * waveSpeed + (float)i * 0.5f + num3 * 3f) * waveAmount; val3.x += num4; strings[i].SetPosition(j, val3); } } } } private void OnDestroy() { if (strings == null) { return; } LineRenderer[] array = strings; foreach (LineRenderer val in array) { if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)((Component)val).gameObject); } } } } [HarmonyPatch] internal static class PuppetMasterPatches { private static bool _patched; private static Harmony _harmony; public static void EnsurePatched() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown if (_patched) { return; } try { _harmony = new Harmony("animebirds.puppetmaster"); _harmony.PatchAll(typeof(PuppetMasterPatches)); _patched = true; } catch { } } [HarmonyPrefix] [HarmonyPatch(typeof(HealthHandler), "TakeDamage", new Type[] { typeof(Vector2), typeof(Vector2), typeof(Color), typeof(GameObject), typeof(Player), typeof(bool), typeof(bool) })] private static bool TakeDamage_Prefix(HealthHandler __instance, Player damagingPlayer) { try { if ((Object)(object)damagingPlayer == (Object)null) { return true; } Player component = ((Component)__instance).GetComponent<Player>(); if ((Object)(object)component == (Object)null) { return true; } if (damagingPlayer.teamID == component.teamID && damagingPlayer.playerID != component.playerID) { return false; } return true; } catch { return true; } } [HarmonyPostfix] [HarmonyPatch(typeof(HealthHandler), "TakeDamage", new Type[] { typeof(Vector2), typeof(Vector2), typeof(Color), typeof(GameObject), typeof(Player), typeof(bool), typeof(bool) })] private static void TakeDamage_Postfix(HealthHandler __instance, Player damagingPlayer) { try { if ((Object)(object)damagingPlayer == (Object)null) { return; } Player component = ((Component)__instance).GetComponent<Player>(); if (!((Object)(object)component == (Object)null) && !((Object)(object)component == (Object)(object)damagingPlayer) && !component.data.dead) { Player val = null; PuppetState component2 = ((Component)damagingPlayer).GetComponent<PuppetState>(); if ((Object)(object)component2 != (Object)null) { val = component2.GetMaster(); } else if ((Object)(object)((Component)damagingPlayer).GetComponent<PuppetMasterEffect>() != (Object)null) { val = damagingPlayer; } if (!((Object)(object)val == (Object)null) && component.teamID != val.teamID) { ExtensionMethods.GetOrAddComponent<PuppetState>(((Component)component).gameObject, false).Initialize(component, val); PuppetMasterEffect.CheckInfectionComplete(val); } } } catch { } } } } namespace AB_BoomCards.Cards { public class CosmicRift : CustomCard { private static GameObject _rayHitPrefab; private static GameObject _trailPrefab; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo ammo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers stats) { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown CosmicRiftStacks cosmicRiftStacks = ((Component)player).gameObject.GetComponent<CosmicRiftStacks>(); if (!Object.op_Implicit((Object)(object)cosmicRiftStacks)) { cosmicRiftStacks = ((Component)player).gameObject.AddComponent<CosmicRiftStacks>(); } cosmicRiftStacks.stacks++; gun.attackSpeed *= 2f; ammo.reloadTimeAdd += 1f; EnsureRayHitPrefab(); EnsureTrailPrefab(); List<ObjectsToSpawn> list = gun.objectsToSpawn?.ToList() ?? new List<ObjectsToSpawn>(); if (!list.Any((ObjectsToSpawn o) => Object.op_Implicit((Object)(object)o.AddToProjectile) && Object.op_Implicit((Object)(object)o.AddToProjectile.GetComponent<CosmicRiftRayHit>()))) { list.Add(new ObjectsToSpawn { AddToProjectile = _rayHitPrefab }); } if (!list.Any((ObjectsToSpawn o) => Object.op_Implicit((Object)(object)o.AddToProjectile) && Object.op_Implicit((Object)(object)o.AddToProjectile.GetComponent<CosmicRiftTrail>()))) { list.Add(new ObjectsToSpawn { AddToProjectile = _trailPrefab }); } gun.objectsToSpawn = list.ToArray(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo ammo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers stats) { CosmicRiftStacks component = ((Component)player).gameObject.GetComponent<CosmicRiftStacks>(); if (Object.op_Implicit((Object)(object)component)) { component.stacks--; if (component.stacks <= 0) { Object.Destroy((Object)(object)component); } } } private static void EnsureRayHitPrefab() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (!((Object)(object)_rayHitPrefab != (Object)null)) { _rayHitPrefab = new GameObject("CR_RayHit"); ((Object)_rayHitPrefab).hideFlags = (HideFlags)61; _rayHitPrefab.AddComponent<CosmicRiftRayHit>(); } } private static void EnsureTrailPrefab() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (!((Object)(object)_trailPrefab != (Object)null)) { _trailPrefab = new GameObject("CR_Trail"); ((Object)_trailPrefab).hideFlags = (HideFlags)61; _trailPrefab.AddComponent<CosmicRiftTrail>(); } } protected override GameObject GetCardArt() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0068: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Animebirds_Boomboom_cards.Resources.CosmicRiftart.png"); if (stream == null) { return new GameObject("CosmicRiftart_missing"); } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); Texture2D val = new Texture2D(2, 2, (TextureFormat)4, false); ImageConversion.LoadImage(val, array); Sprite sprite = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), 1f); GameObject val2 = new GameObject("CosmicRiftart"); Image obj = val2.AddComponent<Image>(); obj.sprite = sprite; obj.preserveAspect = true; val2.GetComponent<RectTransform>().sizeDelta = new Vector2((float)((Texture)val).width * 2f, (float)((Texture)val).height * 2f); ((Object)val2).hideFlags = (HideFlags)61; return val2; } protected override string GetTitle() { return "Cosmic Rift"; } protected override string GetDescription() { return "Your Bullets causes a rift in space"; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)8; } protected override CardInfoStat[] GetStats() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //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_0040: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Rift Force", amount = "+50% per stack", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = false, stat = "Attack Speed", amount = "-100%", simepleAmount = (SimpleAmount)7 }, new CardInfoStat { positive = false, stat = "Reload time", amount = "+1s", simepleAmount = (SimpleAmount)2 } }; } public override string GetModName() { return "Animebirds Boomboom Cards"; } } public class CosmicRiftStacks : MonoBehaviour { public int stacks; } public class CosmicRiftRayHit : RayHitEffect { private Player _owner; private Gun _ownerGun; private bool _cached; private void CacheFromProjectile() { if (!_cached) { _owner = ((Component)this).GetComponentInParent<SpawnedAttack>()?.spawner; _ownerGun = _owner?.data?.weaponHandler?.gun; _cached = true; } } public override HasToReturn DoHitEffect(HitInfo hit) { //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_00b3: 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_00be: 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) bool flag = false; try { flag = (Object)(object)GameManager.instance != (Object)null && GameManager.instance.battleOngoing; } catch { } if (flag) { CacheFromProjectile(); float damage = 70f; ProjectileHit component = ((Component)this).GetComponent<ProjectileHit>(); if ((Object)(object)component != (Object)null) { damage = component.damage; } else if ((Object)(object)_ownerGun != (Object)null) { damage = _ownerGun.damage * _ownerGun.bulletDamageMultiplier; } int stacks = 1; if ((Object)(object)_owner != (Object)null) { CosmicRiftStacks component2 = ((Component)_owner).GetComponent<CosmicRiftStacks>(); if ((Object)(object)component2 != (Object)null) { stacks = component2.stacks; } } Vector3 position = ((Component)this).transform.position; GameObject val = new GameObject("CosmicRift_Instance"); val.transform.position = position; val.AddComponent<CosmicRiftInstance>().Initialize(_owner, _ownerGun, damage, position, stacks); return (HasToReturn)1; } return (HasToReturn)1; } } public class CosmicRiftTrail : MonoBehaviour { [CompilerGenerated] private sealed class <InitializeTrail>d__4 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public CosmicRiftTrail <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <InitializeTrail>d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_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) int num = <>1__state; CosmicRiftTrail cosmicRiftTrail = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)((Component)cosmicRiftTrail).transform.parent == (Object)null) { return false; } <>2__current = null; <>1__state = 2; return true; case 2: <>1__state = -1; if (!cosmicRiftTrail.initialized) { cosmicRiftTrail.initialized = true; cosmicRiftTrail.CreateTrailEffect(); cosmicRiftTrail.CreateSparkEffect(); if ((Object)(object)cosmicRiftTrail.trailPS != (Object)null) { EmissionModule emission = cosmicRiftTrail.trailPS.emission; ((EmissionModule)(ref emission)).enabled = true; cosmicRiftTrail.trailPS.Play(); } if ((Object)(object)cosmicRiftTrail.sparkPS != (Object)null) { EmissionModule emission2 = cosmicRiftTrail.sparkPS.emission; ((EmissionModule)(ref emission2)).enabled = true; cosmicRiftTrail.sparkPS.Play(); } } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private ParticleSystem trailPS; private ParticleSystem sparkPS; private bool initialized; private void Start() { ((MonoBehaviour)this).StartCoroutine(InitializeTrail()); } [IteratorStateMachine(typeof(<InitializeTrail>d__4))] private IEnumerator InitializeTrail() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <InitializeTrail>d__4(0) { <>4__this = this }; } private void CreateTrailEffect() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_017d: 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_01a2: 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_01b1: 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_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: 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_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_023f: 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_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: 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_0269: Expected O, but got Unknown //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown GameObject val = new GameObject("CosmicTrail"); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; trailPS = val.AddComponent<ParticleSystem>(); MainModule main = trailPS.main; ((MainModule)(ref main)).loop = true; ((MainModule)(ref main)).playOnAwake = false; ((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(0.4f); ((MainModule)(ref main)).startSpeed = MinMaxCurve.op_Implicit(0f); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.15f, 0.3f); ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(0.6f, 0.7f, 1f, 0.9f), new Color(0.8f, 0.6f, 1f, 0.9f)); ((MainModule)(ref main)).maxParticles = 150; ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; EmissionModule emission = trailPS.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(200f); ((EmissionModule)(ref emission)).enabled = false; ShapeModule shape = trailPS.shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)0; ((ShapeModule)(ref shape)).radius = 0.05f; ColorOverLifetimeModule colorOverLifetime = trailPS.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val2 = new Gradient(); val2.SetKeys((GradientColorKey[])(object)new GradientColorKey[3] { new GradientColorKey(new Color(0.8f, 0.9f, 1f), 0f), new GradientColorKey(new Color(0.7f, 0.7f, 1f), 0.5f), new GradientColorKey(new Color(0.6f, 0.5f, 1f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.6f, 0.6f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val2); SizeOverLifetimeModule sizeOverLifetime = trailPS.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = new MinMaxCurve(1f, new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 1f), new Keyframe(1f, 0.2f) })); ParticleSystemRenderer component = ((Component)trailPS).GetComponent<ParticleSystemRenderer>(); ((Renderer)component).material = new Material(Shader.Find("Particles/Additive") ?? Shader.Find("Sprites/Default")); ((Renderer)component).sortingOrder = 5; } private void CreateSparkEffect() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0184: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Expected O, but got Unknown GameObject val = new GameObject("TrailSparks"); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = Vector3.zero; sparkPS = val.AddComponent<ParticleSystem>(); MainModule main = sparkPS.main; ((MainModule)(ref main)).loop = true; ((MainModule)(ref main)).playOnAwake = false; ((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.7f, 0.9f); ((MainModule)(ref main)).startSpeed = new MinMaxCurve(0.5f, 2f); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.04f, 0.1f); ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(0.95f, 0.9f, 1f, 1f), new Color(1f, 1f, 1f, 1f)); ((MainModule)(ref main)).maxParticles = 120; ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)1; EmissionModule emission = sparkPS.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(100f); ((EmissionModule)(ref emission)).enabled = false; ShapeModule shape = sparkPS.shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)0; ((ShapeModule)(ref shape)).radius = 0.1f; ColorOverLifetimeModule colorOverLifetime = sparkPS.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val2 = new Gradient(); val2.SetKeys((GradientColorKey[])(object)new GradientColorKey[3] { new GradientColorKey(new Color(1f, 1f, 1f), 0f), new GradientColorKey(new Color(0.9f, 0.85f, 1f), 0.5f), new GradientColorKey(new Color(0.8f, 0.7f, 1f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.8f, 0.5f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val2); ParticleSystemRenderer component = ((Component)sparkPS).GetComponent<ParticleSystemRenderer>(); ((Renderer)component).material = new Material(Shader.Find("Particles/Additive") ?? Shader.Find("Sprites/Default")); ((Renderer)component).sortingOrder = 6; } private void OnDestroy() { if ((Object)(object)trailPS != (Object)null) { Object.Destroy((Object)(object)((Component)trailPS).gameObject); } if ((Object)(object)sparkPS != (Object)null) { Object.Destroy((Object)(object)((Component)sparkPS).gameObject); } } } public class CosmicRiftInstance : MonoBehaviour { [CompilerGenerated] private sealed class <AnimateLightningBolt>d__31 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public List<Vector3> basePositions; public LineRenderer lr; public GameObject boltGO; private float <duration>5__2; private float <elapsed>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <AnimateLightningBolt>d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <duration>5__2 = 0.25f; <elapsed>5__3 = 0f; break; case 1: <>1__state = -1; break; } if (<elapsed>5__3 < <duration>5__2 && Object.op_Implicit((Object)(object)lr) && Object.op_Implicit((Object)(object)boltGO)) { for (int i = 1; i < basePositions.Count - 1; i++) { Vector3 val = basePositions[i]; val.x += Random.Range(-0.2f, 0.2f); val.y += Random.Range(-0.2f, 0.2f); lr.SetPosition(i, val); } float num = 1f + Mathf.Sin(<elapsed>5__3 * 30f) * 0.3f; lr.startWidth = 0.15f * num; lr.endWidth = 0.08f * num; <elapsed>5__3 += Time.deltaTime; <>2__current = null; <>1__state = 1; return true; } if (Object.op_Implicit((Object)(object)boltGO)) { Object.Destroy((Object)(object)boltGO); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <ClosingAnimation>d__26 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public CosmicRiftInstance <>4__this; private float <duration>5__2; private float <elapsed>5__3; private float <initialRiftWidth>5__4; private float <initialStarsWidth>5__5; private float <initialNebulaWidth>5__6; private float <initialEdgeWidth>5__7; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ClosingAnimation>d__26(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_0147: 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_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0190: 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_01a0: 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_01b5: 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_01e9: 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_01f9: 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_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0336: 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_0342: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_036c: 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_0399: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; CosmicRiftInstance cosmicRiftInstance = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <duration>5__2 = 0.6f; <elapsed>5__3 = 0f; <initialRiftWidth>5__4 = 0.8f; <initialStarsWidth>5__5 = 0.7f; <initialNebulaWidth>5__6 = 0.6f; <initialEdgeWidth>5__7 = 0.9f; break; case 1: <>1__state = -1; break; } if (<elapsed>5__3 < <duration>5__2) { <elapsed>5__3 += Time.deltaTime; float num2 = <elapsed>5__3 / <duration>5__2; float num3 = 1f - num2; cosmicRiftInstance.ApplyGravitationalPull(); cosmicRiftInstance.ManipulateParticlesClosing(cosmicRiftInstance.riftCrackPS, num3); cosmicRiftInstance.ManipulateParticlesClosing(cosmicRiftInstance.spaceStarsPS, num3); cosmicRiftInstance.ManipulateParticlesClosing(cosmicRiftInstance.spaceNebulaPS, num3); cosmicRiftInstance.ManipulateParticlesClosing(cosmicRiftInstance.riftEdgePS, num3); if ((Object)(object)cosmicRiftInstance.riftCrackPS != (Object)null) { EmissionModule emission = cosmicRiftInstance.riftCrackPS.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(120f * num3); ShapeModule shape = cosmicRiftInstance.riftCrackPS.shape; ((ShapeModule)(ref shape)).scale = new Vector3(<initialRiftWidth>5__4 * num3, 4.5f, 0.1f); } if ((Object)(object)cosmicRiftInstance.spaceStarsPS != (Object)null) { EmissionModule emission2 = cosmicRiftInstance.spaceStarsPS.emission; ((EmissionModule)(ref emission2)).rateOverTime = MinMaxCurve.op_Implicit(80f * num3); ShapeModule shape2 = cosmicRiftInstance.spaceStarsPS.shape; ((ShapeModule)(ref shape2)).scale = new Vector3(<initialStarsWidth>5__5 * num3, 4.2f, 0.1f); } if ((Object)(object)cosmicRiftInstance.spaceNebulaPS != (Object)null) { EmissionModule emission3 = cosmicRiftInstance.spaceNebulaPS.emission; ((EmissionModule)(ref emission3)).rateOverTime = MinMaxCurve.op_Implicit(30f * num3); ShapeModule shape3 = cosmicRiftInstance.spaceNebulaPS.shape; ((ShapeModule)(ref shape3)).scale = new Vector3(<initialNebulaWidth>5__6 * num3, 4f, 0.1f); } if ((Object)(object)cosmicRiftInstance.riftEdgePS != (Object)null) { EmissionModule emission4 = cosmicRiftInstance.riftEdgePS.emission; ((EmissionModule)(ref emission4)).rateOverTime = MinMaxCurve.op_Implicit(60f * num3); ShapeModule shape4 = cosmicRiftInstance.riftEdgePS.shape; ((ShapeModule)(ref shape4)).scale = new Vector3(<initialEdgeWidth>5__7 * num3, 4.3f, 0.1f); } if ((Object)(object)cosmicRiftInstance.spiralPS != (Object)null) { EmissionModule emission5 = cosmicRiftInstance.spiralPS.emission; ((EmissionModule)(ref emission5)).rateOverTime = MinMaxCurve.op_Implicit(Mathf.Lerp(200f, 0f, num2)); cosmicRiftInstance.ManipulateParticlesClosing(cosmicRiftInstance.spiralPS, num3); } if ((Object)(object)cosmicRiftInstance.voidLight != (Object)null) { cosmicRiftInstance.voidLight.intensity = Mathf.Lerp(11f, 30f, num2); } Vector3 position = ((Component)cosmicRiftInstance).transform.position; for (int num4 = cosmicRiftInstance.lightningBolts.Count - 1; num4 >= 0; num4--) { if ((Object)(object)cosmicRiftInstance.lightningBolts[num4] != (Object)null) { LineRenderer component = cosmicRiftInstance.lightningBolts[num4].GetComponent<LineRenderer>(); if ((Object)(object)component != (Object)null) { component.widthMultiplier *= 0.97f; int positionCount = component.positionCount; Vector3[] array = (Vector3[])(object)new Vector3[positionCount]; component.GetPositions(array); for (int i = 0; i < positionCount; i++) { array[i] = Vector3.Lerp(array[i], position, 0.03f); } component.SetPositions(array); Color startColor = component.startColor; Color endColor = component.endColor; startColor.a *= 0.97f; endColor.a *= 0.97f; component.startColor = startColor; component.endColor = endColor; if (startColor.a < 0.1f) { Object.Destroy((Object)(object)cosmicRiftInstance.lightningBolts[num4]); cosmicRiftInstance.lightningBolts.RemoveAt(num4); } } } } <>2__current = null; <>1__state = 1; return true; } if ((Object)(object)cosmicRiftInstance.riftCrackPS != (Object)null) { cosmicRiftInstance.riftCrackPS.Stop(true, (ParticleSystemStopBehavior)0); } if ((Object)(object)cosmicRiftInstance.spaceStarsPS != (Object)null) { cosmicRiftInstance.spaceStarsPS.Stop(true, (ParticleSystemStopBehavior)0); } if ((Object)(object)cosmicRiftInstance.spaceNebulaPS != (Object)null) { cosmicRiftInstance.spaceNebulaPS.Stop(true, (ParticleSystemStopBehavior)0); } if ((Object)(object)cosmicRiftInstance.riftEdgePS != (Object)null) { cosmicRiftInstance.riftEdgePS.Stop(true, (ParticleSystemStopBehavior)0); } if ((Object)(object)cosmicRiftInstance.energySparksPS != (Object)null) { cosmicRiftInstance.energySparksPS.Stop(true, (ParticleSystemStopBehavior)0); } if ((Object)(object)cosmicRiftInstance.voidCorePS != (Object)null) { cosmicRiftInstance.voidCorePS.Stop(true, (ParticleSystemStopBehavior)0); } if ((Object)(object)cosmicRiftInstance.spiralPS != (Object)null) { cosmicRiftInstance.spiralPS.Stop(true, (ParticleSystemStopBehavior)0); } if ((Object)(object)cosmicRiftInstance.voidLight != (Object)null) { ((Behaviour)cosmicRiftInstance.voidLight).enabled = false; } foreach (GameObject lightningBolt in cosmicRiftInstance.lightningBolts) { if ((Object)(object)lightningBolt != (Object)null) { Object.Destroy((Object)(object)lightningBolt); } } cosmicRiftInstance.lightningBolts.Clear(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <CreateExplosionLightningBolts>d__40 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public CosmicRiftInstance <>4__this; private int <boltCount>5__2; private int <i>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CreateExplosionLightningBolts>d__40(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0069: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_0098: Expected O, but got Unknown //IL_00a0: 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: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_0113: 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_0122: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0182: 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_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: 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_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_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Expected O, but got Unknown int num = <>1__state; CosmicRiftInstance cosmicRiftInstance = <>4__this; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; goto IL_02a0; } <>1__state = -1; <boltCount>5__2 = 16; <i>5__3 = 0; goto IL_02b2; IL_02a0: <i>5__3++; goto IL_02b2; IL_02b2: if (<i>5__3 < <boltCount>5__2) { float num2 = (float)<i>5__3 * (360f / (float)<boltCount>5__2) * ((float)Math.PI / 180f); float num3 = cosmicRiftInstance.explosionRadius * Random.Range(0.7f, 1.1f); Vector3 val = cosmicRiftInstance.centerPos + new Vector3(Mathf.Cos(num2), Mathf.Sin(num2)) * num3; GameObject val2 = new GameObject("ExplosionBolt"); val2.transform.position = cosmicRiftInstance.centerPos; LineRenderer val3 = val2.AddComponent<LineRenderer>(); int num5 = (val3.positionCount = Random.Range(4, 7)); val3.startWidth = 0.3f; val3.endWidth = 0.08f; ((Renderer)val3).material = new Material(Shader.Find("Sprites/Default")); Gradient val4 = new Gradient(); val4.SetKeys((GradientColorKey[])(object)new GradientColorKey[4] { new GradientColorKey(new Color(1f, 1f, 1f), 0f), new GradientColorKey(new Color(0.95f, 0.9f, 1f), 0.4f), new GradientColorKey(new Color(0.85f, 0.75f, 1f), 0.7f), new GradientColorKey(new Color(0.7f, 0.6f, 1f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[3] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.9f, 0.5f), new GradientAlphaKey(0.6f, 1f) }); val3.colorGradient = val4; for (int i = 0; i < num5; i++) { float num6 = (float)i / (float)(num5 - 1); Vector3 val5 = Vector3.Lerp(cosmicRiftInstance.centerPos, val, num6); if (i > 0 && i < num5 - 1) { val5.x += Random.Range(-0.5f, 0.5f); val5.y += Random.Range(-0.5f, 0.5f); } val3.SetPosition(i, val5); } ((MonoBehaviour)cosmicRiftInstance).StartCoroutine(cosmicRiftInstance.FadeExplosionBolt(val2, val3)); if (<i>5__3 % 2 == 0) { <>2__current = (object)new WaitForSeconds(0.02f); <>1__state = 1; return true; } goto IL_02a0; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <CreateExplosionSparks>d__43 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public CosmicRiftInstance <>4__this; private int <burst>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CreateExplosionSparks>d__43(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_003f: 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_0078: 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_00a4: 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_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_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_0102: 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_0122: 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_0132: 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_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0182: 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_019d: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: 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_0212: 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) //IL_0228: 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_023e: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_026d: 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_0295: 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_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: 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_02d5: Expected O, but got Unknown //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Expected O, but got Unknown //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Expected O, but got Unknown int num = <>1__state; CosmicRiftInstance cosmicRiftInstance = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <burst>5__2 = 0; break; case 1: <>1__state = -1; <burst>5__2++; break; } if (<burst>5__2 < 4) { GameObject val = new GameObject("ExplosionSparks"); val.transform.position = cosmicRiftInstance.centerPos; ParticleSystem val2 = val.AddComponent<ParticleSystem>(); MainModule main = val2.main; ((MainModule)(ref main)).loop = false; ((MainModule)(ref main)).duration = 0.6f; ((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.3f, 0.6f); ((MainModule)(ref main)).startSpeed = new MinMaxCurve(21f, 39f); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.02f, 0.05f); ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(1f, 1f, 1f), new Color(0.95f, 0.95f, 1f)); ((MainModule)(ref main)).maxParticles = 120; ((MainModule)(ref main)).stopAction = (ParticleSystemStopAction)2; EmissionModule emission = val2.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(0f); ((EmissionModule)(ref emission)).SetBursts((Burst[])(object)new Burst[1] { new Burst(0f, (short)120) }); ShapeModule shape = val2.shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)0; ((ShapeModule)(ref shape)).radius = 0.2f; ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val3 = new Gradient(); val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[4] { new GradientColorKey(new Color(1f, 1f, 1f), 0f), new GradientColorKey(new Color(0.95f, 0.95f, 1f), 0.3f), new GradientColorKey(new Color(0.85f, 0.8f, 1f), 0.6f), new GradientColorKey(new Color(0.7f, 0.6f, 1f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[4] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.9f, 0.4f), new GradientAlphaKey(0.6f, 0.7f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val3); 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, 1.8f), new Keyframe(0.5f, 1.2f), new Keyframe(1f, 0f) })); ParticleSystemRenderer component = ((Component)val2).GetComponent<ParticleSystemRenderer>(); ((Renderer)component).material = new Material(Shader.Find("Particles/Additive") ?? Shader.Find("Sprites/Default")); ((Renderer)component).sortingOrder = 21; Object.Destroy((Object)(object)val, 0.7f); <>2__current = (object)new WaitForSeconds(0.06f); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <CreateExplosionWaves>d__42 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public CosmicRiftInstance <>4__this; private int <wave>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CreateExplosionWaves>d__42(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_003f: 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_0078: 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_00c0: 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_00ef: 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_0113: 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_0121: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Expected O, but got Unknown //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_01cd: 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_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0221: 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_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_027f: 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_0292: 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_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_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Expected O, but got Unknown //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Expected O, but got Unknown //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Expected O, but got Unknown int num = <>1__state; CosmicRiftInstance cosmicRiftInstance = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <wave>5__2 = 0; break; case 1: <>1__state = -1; <wave>5__2++; break; } if (<wave>5__2 < 3) { GameObject val = new GameObject("ExplosionWave"); val.transform.position = cosmicRiftInstance.centerPos; ParticleSystem val2 = val.AddComponent<ParticleSystem>(); MainModule main = val2.main; ((MainModule)(ref main)).loop = false; ((MainModule)(ref main)).duration = 0.6f; ((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.4f, 0.7f); ((MainModule)(ref main)).startSpeed = new MinMaxCurve(14f + (float)<wave>5__2 * 4f, 25f + (float)<wave>5__2 * 6f); ((MainModule)(ref main)).startSize = new MinMaxCurve(0.04f, 0.09f); ((MainModule)(ref main)).startColor = new MinMaxGradient(new Color(1f, 0.95f, 1f), new Color(0.95f, 0.9f, 1f)); ((MainModule)(ref main)).maxParticles = 200; ((MainModule)(ref main)).stopAction = (ParticleSystemStopAction)2; EmissionModule emission = val2.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(0f); ((EmissionModule)(ref emission)).SetBursts((Burst[])(object)new Burst[1] { new Burst(0f, (short)200) }); ShapeModule shape = val2.shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)0; ((ShapeModule)(ref shape)).radius = 0.3f + (float)<wave>5__2 * 0.1f; ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; Gradient val3 = new Gradient(); val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[4] { new GradientColorKey(new Color(1f, 1f, 1f), 0f), new GradientColorKey(new Color(0.95f, 0.9f, 1f), 0.4f), new GradientColorKey(new Color(0.8f, 0.7f, 1f), 0.7f), new GradientColorKey(new Color(0.6f, 0.5f, 1f), 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[4] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0.8f, 0.5f), new GradientAlphaKey(0.4f, 0.8f), new GradientAlphaKey(0f, 1f) }); ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(val3); 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, 1.5f), new Keyframe(0.5f, 1.2f), new Keyframe(1f, 0f) })); ParticleSystemRenderer component = ((Component)val2).GetComponent<ParticleSystemRenderer>(); ((Renderer)component).material = new Material(Shader.Find("Particles/Additive") ?? Shader.Find("Sprites/Default")); ((Renderer)component).sortingOrder = 19; Object.Destroy((Object)(object)val, 0.8f); <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <CreateShockwaveRing>d__47 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public float delay; public CosmicRiftInstance <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CreateShockwaveRing>d__47(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0051: 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_0085: 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_00a7: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL