using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using HarmonyLib; using InControl; using ModdingUtils.Utils; using UnboundLib.Cards; using UnboundLib.GameModes; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("ABSOLUTELY BROKEN CARDS")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ABSOLUTELY BROKEN CARDS")] [assembly: AssemblyTitle("ABSOLUTELY BROKEN CARDS")] [assembly: AssemblyVersion("1.0.0.0")] namespace ABSOLUTELY_BROKEN_CARDS { internal class Class9 { } } namespace AbsolutelyBrokenCards { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.yourname.rounds.absolutelybrokencards", "ABSOLUTELY BROKEN CARDS", "1.0.0")] [BepInProcess("Rounds.exe")] public class BrokenCardsPlugin : BaseUnityPlugin { private const string ModId = "com.yourname.rounds.absolutelybrokencards"; private const string ModName = "ABSOLUTELY BROKEN CARDS"; private const string Version = "1.0.0"; private void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown Harmony val = new Harmony("com.yourname.rounds.absolutelybrokencards"); val.PatchAll(); } private void Start() { CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); CustomCard.BuildCard(); } } public class RealitysEndCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "Reality's End"; } protected override string GetDescription() { return "stand still for 10 seconds to rip your enemies atoms apart!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Still Time Required", amount = "7 Seconds", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Targeting System", amount = "Enemies Only", simepleAmount = (SimpleAmount)3 } }; } } public class RealitysEndEffect : MonoBehaviour { private Player player; private float stillTimer = 0f; private const float TimeRequired = 7f; private Vector3 lastPosition; private LineRenderer ringRenderer; private const int RingSegments = 50; private const float MaxRingRadius = 3.5f; private void Start() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); lastPosition = ((Component)this).transform.position; SetupIndicatorRing(); } private void SetupIndicatorRing() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_006b: 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) GameObject val = new GameObject("RealitysEnd_IndicatorRing"); val.transform.SetParent(((Component)this).transform); val.transform.localPosition = new Vector3(0f, 0f, -1f); ringRenderer = val.AddComponent(); ((Renderer)ringRenderer).material = new Material(Shader.Find("Hidden/Internal-Colored")); ringRenderer.startColor = Color.red; ringRenderer.endColor = Color.red; ringRenderer.startWidth = 0.12f; ringRenderer.endWidth = 0.12f; ringRenderer.useWorldSpace = false; ringRenderer.loop = true; ringRenderer.positionCount = 50; ((Renderer)ringRenderer).sortingOrder = 999; DrawCircle(0f); } private void Update() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null) { return; } Vector3 position = ((Component)this).transform.position; float num = Vector3.Distance(position, lastPosition); lastPosition = position; if (num < 0.06f) { stillTimer += Time.deltaTime; if (stillTimer > 7f) { stillTimer = 7f; } if (stillTimer >= 7f) { DetonateArmageddon(); stillTimer = 0f; } } else { stillTimer -= Time.deltaTime; if (stillTimer < 0f) { stillTimer = 0f; } } float num2 = stillTimer / 7f; float radius = num2 * 3.5f; DrawCircle(radius); } private void DrawCircle(float radius) { //IL_0080: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ringRenderer == (Object)null) { return; } if (radius <= 0.05f) { ((Renderer)ringRenderer).enabled = false; return; } ((Renderer)ringRenderer).enabled = true; for (int i = 0; i < 50; i++) { float num = (float)i * MathF.PI * 2f / 50f; float num2 = Mathf.Cos(num) * radius; float num3 = Mathf.Sin(num) * radius; ringRenderer.SetPosition(i, new Vector3(num2, num3, 0f)); } } private void DetonateArmageddon() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)this).transform.position; GameObject val = GameObject.CreatePrimitive((PrimitiveType)0); val.transform.position = position; val.transform.localScale = Vector3.one * 1f; Component component = val.GetComponent("SphereCollider"); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } Renderer component2 = val.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.material.color = new Color(0.2f, 0f, 0.4f, 0.5f); } val.AddComponent(); Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(position), 150f); Collider2D[] array2 = array; foreach (Collider2D val2 in array2) { Player componentInParent = ((Component)val2).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)player) { HealthHandler healthHandler = componentInParent.data.healthHandler; if ((Object)(object)healthHandler != (Object)null) { ((Damagable)healthHandler).TakeDamage(Vector2.up * 999999f, Vector2.op_Implicit(position), (GameObject)null, (Player)null, true, false); } } } } } public class RealityVisualAnimate : MonoBehaviour { private float runningTime = 0f; private const float Duration = 0.35f; private const float TargetDiameter = 300f; private void Update() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) runningTime += Time.deltaTime; float num = runningTime / 0.35f; ((Component)this).transform.localScale = Vector3.Lerp(Vector3.one, Vector3.one * 300f, num); if (runningTime >= 0.35f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class UltimateShotgunCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.ammo = 97; gun.numberOfProjectiles = 100; gun.spread = 0.4f; gun.reflects = 0; gun.gravity = 0f; gun.projectileSize = 0.8f; gun.projectileSpeed = 0.8f; gun.destroyBulletAfter = 5f; gun.damage = 0.2f; gun.reloadTime = 2f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "ULTIMATE SHOT GUN"; } protected override string GetDescription() { return "Fires 100 straight, weightless bullets in a massive slow-motion wave!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0083: 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_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Projectiles", amount = "100", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Bounces", amount = "0", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = false, stat = "Bullet Speed", amount = "Slow-Mo", simepleAmount = (SimpleAmount)5 } }; } } public class UltimateShotgunEffect : MonoBehaviour { [CompilerGenerated] private sealed class d__8 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public UltimateShotgunEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__8(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this.gunAmmo != (Object)null && <>4__this.ammoField != null) { <>4__this.ammoField.SetValue(<>4__this.gunAmmo, 0); } <>4__this.isDraining = false; 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 player; private Gun gun; private GunAmmo gunAmmo; private FieldInfo ammoField; private bool isDraining = false; private void Start() { player = ((Component)this).GetComponent(); gun = player.data.weaponHandler.gun; gunAmmo = ((Component)gun).GetComponent(); ammoField = typeof(GunAmmo).GetField("ammo", BindingFlags.Instance | BindingFlags.NonPublic); Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } private void Update() { if ((Object)(object)gun != (Object)null && (Object)(object)gunAmmo != (Object)null && ammoField != null) { int num = (int)ammoField.GetValue(gunAmmo); if (num > 0) { gun.numberOfProjectiles = num; } } } private void OnShootProjectile(GameObject proj) { if (!isDraining) { isDraining = true; ((MonoBehaviour)this).StartCoroutine(DelayAmmoDrainRoutine()); } } [IteratorStateMachine(typeof(d__8))] private IEnumerator DelayAmmoDrainRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__8(0) { <>4__this = this }; } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } } } public class Class14 : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; block.cdAdd = 10f; gun.ammo = -2; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "rip my granny she got hit by a bazooka"; } protected override string GetDescription() { return "blocking turns your next shot into an rpg (5s warmup)"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0083: 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_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b9: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[5] { new CardInfoStat { positive = true, stat = "Empowered Shot", amount = "1000 DMG", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Explosion", amount = "MASSIVE", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = false, stat = "Max Ammo", amount = "3", simepleAmount = (SimpleAmount)7 }, new CardInfoStat { positive = false, stat = "Warmup Time", amount = "5s", simepleAmount = (SimpleAmount)5 }, new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+10s", simepleAmount = (SimpleAmount)7 } }; } } public class Class15 : MonoBehaviour { [CompilerGenerated] private sealed class d__13 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Class15 <>4__this; private List 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.isEmpowered = false; <>4__this.isConsuming = false; if (<>4__this.explosiveEffect != null) { 5__1 = new List(<>4__this.gun.objectsToSpawn); 5__1.Remove(<>4__this.explosiveEffect); <>4__this.gun.objectsToSpawn = 5__1.ToArray(); 5__1 = null; } 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 player; private Block block; private Gun gun; private bool isEmpowered = false; private bool isConsuming = false; private float roundTimer = 0f; private bool wasDead = false; private ObjectsToSpawn explosiveEffect; private void Start() { player = ((Component)this).GetComponent(); block = player.data.block; gun = player.data.weaponHandler.gun; if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Combine(obj.BlockAction, new Action(OnBlock)); } if ((Object)(object)gun != (Object)null) { Gun obj2 = gun; obj2.ShootPojectileAction = (Action)Delegate.Combine(obj2.ShootPojectileAction, new Action(OnShootProjectile)); } CardInfo[] cards = CardChoice.instance.cards; foreach (CardInfo val in cards) { if (val.cardName.ToLower().Contains("explosive")) { Gun component = ((Component)val).gameObject.GetComponent(); if ((Object)(object)component != (Object)null && component.objectsToSpawn != null && component.objectsToSpawn.Length != 0) { explosiveEffect = component.objectsToSpawn[0]; } break; } } } private void Update() { if (player.data.dead) { roundTimer = 0f; wasDead = true; isEmpowered = false; return; } if (wasDead) { wasDead = false; roundTimer = 0f; } roundTimer += Time.deltaTime; } private void OnBlock(BlockTriggerType trigger) { if (roundTimer >= 5f) { isEmpowered = true; if (explosiveEffect != null && !HasExplosion(gun)) { List list = new List(gun.objectsToSpawn); list.Add(explosiveEffect); gun.objectsToSpawn = list.ToArray(); } } } private bool HasExplosion(Gun g) { ObjectsToSpawn[] objectsToSpawn = g.objectsToSpawn; foreach (ObjectsToSpawn val in objectsToSpawn) { if (val == explosiveEffect) { return true; } } return false; } private void OnShootProjectile(GameObject projectile) { if (isEmpowered) { ProjectileHit component = projectile.GetComponent(); if ((Object)(object)component != (Object)null) { component.damage = 3000f; } if (!isConsuming) { isConsuming = true; ((MonoBehaviour)this).StartCoroutine(ConsumeCharge()); } } } [IteratorStateMachine(typeof(d__13))] private IEnumerator ConsumeCharge() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { <>4__this = this }; } private void OnDestroy() { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Remove(obj.BlockAction, new Action(OnBlock)); } if ((Object)(object)gun != (Object)null) { Gun obj2 = gun; obj2.ShootPojectileAction = (Action)Delegate.Remove(obj2.ShootPojectileAction, new Action(OnShootProjectile)); } } } public class Class16 : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.respawns = 1; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "FINAL COUNTDOWN"; } protected override string GetDescription() { return "when you die you get 5 seconds to kill your killer with increased power!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0083: 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_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Last Stand DMG", amount = "x2", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Size & Speed", amount = "MASSIVE", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "The Hunt", amount = "4s", simepleAmount = (SimpleAmount)3 } }; } } public class Class17 : MonoBehaviour { private GameObject watcherObj; private void Start() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown Player component = ((Component)this).GetComponent(); Gun gun = component.data.weaponHandler.gun; if ((Object)(object)watcherObj == (Object)null) { watcherObj = new GameObject("LastStandWatcher_" + component.playerID); LastStandWatcher lastStandWatcher = watcherObj.AddComponent(); lastStandWatcher.Initialize(component, gun); } } } public class LastStandWatcher : MonoBehaviour { [CompilerGenerated] private sealed class d__6 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LastStandWatcher <>4__this; private float 5__1; private float 5__2; private float 5__3; private Vector3 5__4; private GameObject 5__5; private Light 5__6; private float 5__7; private int 5__8; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__5 = null; 5__6 = null; <>1__state = -2; } private bool MoveNext() { //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_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_01f2: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.isRampaging = true; <>4__this.trapUsedThisRound = true; goto IL_0070; case 1: <>1__state = -1; goto IL_0070; case 2: { <>1__state = -1; 5__1 = <>4__this.player.data.maxHealth; 5__2 = <>4__this.gun.damage; 5__3 = <>4__this.player.data.stats.movementSpeed; 5__4 = ((Component)<>4__this.player).transform.localScale; <>4__this.player.data.maxHealth = 9999999f; <>4__this.player.data.health = 9999999f; Gun gun = <>4__this.gun; gun.damage *= 2f; CharacterStatModifiers stats = <>4__this.player.data.stats; stats.movementSpeed *= 1.5f; ((Component)<>4__this.player).transform.localScale = 5__4 * 1.5f; 5__5 = new GameObject("RampageGlow"); 5__5.transform.SetParent(((Component)<>4__this.player).transform); 5__5.transform.localPosition = Vector3.zero; 5__6 = 5__5.AddComponent(); 5__6.type = (LightType)2; 5__6.color = Color.red; 5__6.range = 15f; 5__6.intensity = 8f; 5__7 = 0f; goto IL_02a0; } case 3: <>1__state = -1; goto IL_02a0; case 4: { <>1__state = -1; <>4__this.isRampaging = false; return false; } IL_02a0: if (5__7 < 5f) { 5__7 += Time.deltaTime; <>4__this.player.data.health = 9999999f; <>2__current = null; <>1__state = 3; return true; } <>4__this.gun.damage = 5__2; <>4__this.player.data.maxHealth = 5__1; <>4__this.player.data.stats.movementSpeed = 5__3; ((Component)<>4__this.player).transform.localScale = 5__4; if ((Object)(object)5__5 != (Object)null) { Object.Destroy((Object)(object)5__5); } <>4__this.player.data.stats.remainingRespawns = 0; <>4__this.player.data.health = -9999f; 5__8 = 0; while (5__8 < 10) { ((Damagable)<>4__this.player.data.healthHandler).TakeDamage(Vector2.up * 9999999f, Vector2.op_Implicit(((Component)<>4__this.player).transform.position), (GameObject)null, (Player)null, true, false); 5__8++; } <>2__current = (object)new WaitForSeconds(3f); <>1__state = 4; return true; IL_0070: if (<>4__this.player.data.healthHandler.isRespawning) { <>2__current = null; <>1__state = 1; return true; } <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 2; return true; } } 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 player; private Gun gun; private bool isRampaging = false; private bool trapUsedThisRound = false; public void Initialize(Player p, Gun g) { player = p; gun = g; } private void Update() { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { if (player.data.stats.remainingRespawns == player.data.stats.respawns && trapUsedThisRound && !isRampaging) { trapUsedThisRound = false; } if (!player.data.dead && player.data.stats.remainingRespawns < player.data.stats.respawns && !trapUsedThisRound && !isRampaging) { ((MonoBehaviour)this).StartCoroutine(LastStandRoutine()); } } } [IteratorStateMachine(typeof(d__6))] private IEnumerator LastStandRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__6(0) { <>4__this = this }; } } public class Object531Card : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.projectileSpeed = 50f; gun.damage = 0.05f; gun.reloadTime = 1.5f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "OBJECT 531"; } protected override string GetDescription() { return "WARNING Experimental rail gun charge to do an infinite amount of damage!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0083: 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_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Drill Feature", amount = "Walls & Blocks", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Projectile Speed", amount = "Instant", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = false, stat = "Magazine Size", amount = "1 Shot Per Reload", simepleAmount = (SimpleAmount)7 } }; } } public class Object531Effect : MonoBehaviour { private Player player; private Gun gun; private GunAmmo gunAmmo; private FieldInfo ammoField; private bool isCharging = false; private float chargeTimer = 0f; private float pendingChargeDamage = 0f; private float originalAttackSpeed = 0.3f; public bool isUnleashing = false; private PlayerAction resolvedFireAction; private GameObject chargeSphere; private void Start() { //IL_012f: Unknown result type (might be due to invalid IL or missing references) player = ((Component)this).GetComponent(); if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !((Object)(object)player.data.weaponHandler == (Object)null)) { gun = player.data.weaponHandler.gun; gunAmmo = ((Component)gun).GetComponent(); ammoField = typeof(GunAmmo).GetField("ammo", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); resolvedFireAction = FindFireAction(); originalAttackSpeed = gun.attackSpeed; gun.attackSpeed = 9999f; chargeSphere = GameObject.CreatePrimitive((PrimitiveType)0); Component component = chargeSphere.GetComponent("SphereCollider"); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } Renderer component2 = chargeSphere.GetComponent(); component2.material.color = Color.yellow; Shader val = Shader.Find("Particles/Standard Unlit"); if ((Object)(object)val != (Object)null) { component2.material.shader = val; } chargeSphere.SetActive(false); } } private void Update() { //IL_01da: 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_0211: 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_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0250: 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_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || (Object)(object)player.data == (Object)null || (Object)(object)gun == (Object)null) { return; } int num = ((!((Object)(object)gunAmmo != (Object)null) || !(ammoField != null)) ? 1 : ((int)ammoField.GetValue(gunAmmo))); if (player.data.dead || gun.isReloading || num <= 0) { isCharging = false; chargeTimer = 0f; if ((Object)(object)chargeSphere != (Object)null) { chargeSphere.SetActive(false); } gun.attackSpeed = originalAttackSpeed; return; } if (gun.attackSpeed < 5000f && !isCharging) { originalAttackSpeed = gun.attackSpeed; gun.attackSpeed = 9999f; } if (resolvedFireAction == null) { return; } if (((OneAxisInputControl)resolvedFireAction).IsPressed) { if (!isCharging) { chargeTimer = 0f; pendingChargeDamage = 0f; } isCharging = true; chargeTimer += Time.deltaTime; if ((Object)(object)chargeSphere != (Object)null) { chargeSphere.SetActive(true); float num2 = 0.3f + chargeTimer * 1.5f; chargeSphere.transform.localScale = new Vector3(num2, num2, num2); Transform val = ((Component)gun).transform.Find("Barrel"); Vector3 val2 = (((Object)(object)val != (Object)null) ? val.position : (((Component)player).transform.position + ((Vector3)(ref player.data.aimDirection)).normalized * 1.5f)); chargeSphere.transform.position = val2 + ((Vector3)(ref player.data.aimDirection)).normalized * (num2 * 0.6f); } } else if (isCharging) { isCharging = false; if ((Object)(object)chargeSphere != (Object)null) { chargeSphere.SetActive(false); } pendingChargeDamage = chargeTimer * 15f; ForceShoot(); } } private void ForceShoot() { int numberOfProjectiles = gun.numberOfProjectiles; int bursts = gun.bursts; gun.numberOfProjectiles = 1; gun.bursts = 0; gun.attackSpeed = 0f; MethodInfo methodInfo = null; MethodInfo[] methods = typeof(Gun).GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (MethodInfo methodInfo2 in methods) { if (methodInfo2.Name == "Attack") { methodInfo = methodInfo2; break; } } if (methodInfo != null) { ParameterInfo[] parameters = methodInfo.GetParameters(); object[] array = new object[parameters.Length]; for (int j = 0; j < parameters.Length; j++) { Type parameterType = parameters[j].ParameterType; if (parameterType == typeof(float)) { array[j] = 1f; } else if (parameterType == typeof(bool)) { array[j] = true; } else if (parameterType == typeof(int)) { array[j] = 1; } else { array[j] = null; } } methodInfo.Invoke(gun, array); } if ((Object)(object)gunAmmo != (Object)null && ammoField != null) { ammoField.SetValue(gunAmmo, 0); } gun.numberOfProjectiles = numberOfProjectiles; gun.bursts = bursts; gun.attackSpeed = 9999f; } private void OnShootProjectile(GameObject projectile) { DrillBullet drillBullet = projectile.AddComponent(); drillBullet.attacker = player; drillBullet.damage = gun.damage * 55f + pendingChargeDamage; pendingChargeDamage = 0f; } private PlayerAction FindFireAction() { if (player.data.playerActions == null) { return null; } FieldInfo[] fields = ((object)player.data.playerActions).GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo[] array = fields; foreach (FieldInfo fieldInfo in array) { string text = fieldInfo.Name.ToLower(); if (text == "fire" || text == "shoot" || text == "attack") { object? value = fieldInfo.GetValue(player.data.playerActions); return (PlayerAction)((value is PlayerAction) ? value : null); } } PropertyInfo[] properties = ((object)player.data.playerActions).GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); PropertyInfo[] array2 = properties; foreach (PropertyInfo propertyInfo in array2) { string text2 = propertyInfo.Name.ToLower(); if (text2 == "fire" || text2 == "shoot" || text2 == "attack") { object? value2 = propertyInfo.GetValue(player.data.playerActions, null); return (PlayerAction)((value2 is PlayerAction) ? value2 : null); } } return null; } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); gun.attackSpeed = originalAttackSpeed; } if ((Object)(object)chargeSphere != (Object)null) { Object.Destroy((Object)(object)chargeSphere); } } } public class DrillBullet : MonoBehaviour { public Player attacker; public float damage = 0f; public float speed = 150f; public float beamThickness = 1.5f; private Vector3 direction; private Vector2 lastPosition; private List hitPlayers = new List(); private void Start() { //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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Expected O, but got Unknown //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) lastPosition = Vector2.op_Implicit(((Component)this).transform.position); Object.Destroy((Object)(object)((Component)this).gameObject, 3f); Vector3 normalized = ((Vector3)(ref attacker.data.aimDirection)).normalized; Vector3 val = new Vector3(normalized.x, normalized.y, 0f); direction = ((Vector3)(ref val)).normalized; ProjectileHit componentInChildren = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { ((Behaviour)componentInChildren).enabled = false; } RayCastTrail componentInChildren2 = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren2 != (Object)null) { ((Behaviour)componentInChildren2).enabled = false; } MoveTransform componentInChildren3 = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren3 != (Object)null) { ((Behaviour)componentInChildren3).enabled = false; } Collider2D componentInChildren4 = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren4 != (Object)null) { ((Behaviour)componentInChildren4).enabled = false; } Rigidbody2D componentInChildren5 = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren5 != (Object)null) { componentInChildren5.isKinematic = true; } SpriteRenderer componentInChildren6 = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren6 != (Object)null) { componentInChildren6.color = Color.yellow; ((Component)componentInChildren6).transform.localScale = new Vector3(4f, 4f, 4f); } TrailRenderer val2 = ((Component)this).gameObject.AddComponent(); val2.time = 0.4f; val2.startWidth = beamThickness; val2.endWidth = 0f; ((Renderer)val2).material = new Material(Shader.Find("Sprites/Default")); val2.startColor = Color.yellow; val2.endColor = new Color(1f, 1f, 0f, 0f); } private void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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) Transform transform = ((Component)this).transform; transform.position += direction * speed * Time.deltaTime; Vector2 p = Vector2.op_Implicit(((Component)this).transform.position); if ((Object)(object)PlayerManager.instance != (Object)null && PlayerManager.instance.players != null) { foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && player.teamID != attacker.teamID && !player.data.dead) { float num = FindDistanceToSegment(((Component)player).transform.position, lastPosition, p); if (num <= beamThickness && !hitPlayers.Contains(player)) { hitPlayers.Add(player); ((Damagable)player.data.healthHandler).CallTakeDamage(Vector2.op_Implicit(direction * damage), Vector2.op_Implicit(((Component)player).transform.position), ((Component)this).gameObject, attacker, true); } } } } lastPosition = p; } private float FindDistanceToSegment(Vector3 pt, Vector2 p1, Vector2 p2) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Vector2.op_Implicit(pt); Vector2 val2 = p2 - p1; float sqrMagnitude = ((Vector2)(ref val2)).sqrMagnitude; if (sqrMagnitude == 0f) { return Vector2.Distance(val, p1); } float num = Vector2.Dot(val - p1, val2) / sqrMagnitude; num = Mathf.Clamp01(num); Vector2 val3 = p1 + num * val2; return Vector2.Distance(val, val3); } } public class HammerHeadCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; statModifiers.health = 1.5f; statModifiers.movementSpeed = 0.85f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "Hammer Head"; } protected override string GetDescription() { return "Block to teleport forward. Deals damage to enemies who are in front of you!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+50%", simepleAmount = (SimpleAmount)1 }, new CardInfoStat { positive = false, stat = "Movement Speed", amount = "-15%", simepleAmount = (SimpleAmount)5 } }; } } public class ParticleAcceleratorCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.destroyBulletAfter = 999f; gun.reflects = 9999; gun.projectileSpeed = 0.35f; gun.damage = 0.5f; gun.ammo = 6; gun.attackSpeed = 0.2f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "PARTICLE ACCELERATOR"; } protected override string GetDescription() { return "WARNING THIS WILL RUIN YOUR GAME! BLOCK TO TURN OFF!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0083: 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_008b: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b9: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[5] { new CardInfoStat { positive = true, stat = "DONT", amount = "Rapid", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "PICK", amount = "+6", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "THIS", amount = "Infinite", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = false, stat = "CARD", amount = "-65%", simepleAmount = (SimpleAmount)7 }, new CardInfoStat { positive = false, stat = "UP", amount = "-50%", simepleAmount = (SimpleAmount)6 } }; } } public class ParticleAcceleratorEffect : MonoBehaviour { public class ParticleBullet : MonoBehaviour { private RayHitReflect rayHitReflect; private ProjectileHit projectileHit; private MoveTransform moveTransform; private int lastReflects; private Camera mainCam; private float voidBounceCooldown = 0f; private void Start() { rayHitReflect = ((Component)this).GetComponentInChildren(); projectileHit = ((Component)this).GetComponentInChildren(); moveTransform = ((Component)this).GetComponentInChildren(); mainCam = Camera.main; if ((Object)(object)rayHitReflect != (Object)null) { lastReflects = rayHitReflect.reflects; } } private void Update() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: 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_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)moveTransform == (Object)null) { return; } float num = ((Vector3)(ref moveTransform.velocity)).magnitude * Time.deltaTime; Vector3 normalized = ((Vector3)(ref moveTransform.velocity)).normalized; int num2 = 2049; RaycastHit2D val = Physics2D.Raycast(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(normalized), num, num2); if ((Object)(object)((RaycastHit2D)(ref val)).collider != (Object)null) { ((Component)this).transform.position = Vector2.op_Implicit(((RaycastHit2D)(ref val)).point) + Vector2.op_Implicit(((RaycastHit2D)(ref val)).normal) * 0.2f; moveTransform.velocity = Vector2.op_Implicit(Vector2.Reflect(Vector2.op_Implicit(moveTransform.velocity), ((RaycastHit2D)(ref val)).normal)); ((Component)this).transform.up = ((Vector3)(ref moveTransform.velocity)).normalized; ApplyBounceMultipliers(); if ((Object)(object)rayHitReflect != (Object)null) { RayHitReflect obj = rayHitReflect; obj.reflects--; } lastReflects = (((Object)(object)rayHitReflect != (Object)null) ? rayHitReflect.reflects : 0); } else if ((Object)(object)rayHitReflect != (Object)null && (Object)(object)projectileHit != (Object)null && rayHitReflect.reflects < lastReflects) { int num3 = lastReflects - rayHitReflect.reflects; lastReflects = rayHitReflect.reflects; for (int i = 0; i < num3; i++) { ApplyBounceMultipliers(); } } if ((Object)(object)mainCam != (Object)null) { if (voidBounceCooldown > 0f) { voidBounceCooldown -= Time.deltaTime; } float orthographicSize = mainCam.orthographicSize; float num4 = orthographicSize * mainCam.aspect; Vector3 position = ((Component)mainCam).transform.position; Vector3 position2 = ((Component)this).transform.position; bool flag = false; if ((position2.x > position.x + num4 && moveTransform.velocity.x > 0f) || (position2.x < position.x - num4 && moveTransform.velocity.x < 0f)) { moveTransform.velocity = new Vector3(0f - moveTransform.velocity.x, moveTransform.velocity.y, 0f); flag = true; } if ((position2.y > position.y + orthographicSize && moveTransform.velocity.y > 0f) || (position2.y < position.y - orthographicSize && moveTransform.velocity.y < 0f)) { moveTransform.velocity = new Vector3(moveTransform.velocity.x, 0f - moveTransform.velocity.y, 0f); flag = true; } if (flag && voidBounceCooldown <= 0f) { ApplyBounceMultipliers(); ((Component)this).transform.up = ((Vector3)(ref moveTransform.velocity)).normalized; voidBounceCooldown = 0.1f; } } } private void ApplyBounceMultipliers() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)projectileHit != (Object)null) { ProjectileHit obj = projectileHit; obj.damage *= 1f; } if (((Vector3)(ref moveTransform.velocity)).magnitude < 2000f) { MoveTransform obj2 = moveTransform; obj2.velocity *= 1.15f; } } } private Player player; private Gun gun; private Block block; private List activeBullets = new List(); private void Start() { player = ((Component)this).GetComponent(); if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !((Object)(object)player.data.weaponHandler == (Object)null)) { gun = player.data.weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); block = player.data.block; if (!((Object)(object)block != (Object)null)) { } } } private void OnShootProjectile(GameObject projectile) { projectile.AddComponent(); activeBullets.Add(projectile); } } public class TeslaCoilCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.reloadTime = 5f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "TESLA COIL"; } protected override string GetDescription() { return "Fires an electric orb thats zaps your enemies!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Sticky Trap", amount = "On Hit", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Reload Time", amount = "-40%", simepleAmount = (SimpleAmount)3 } }; } } public class TeslaCoilEffect : MonoBehaviour { private Player player; private Gun gun; private void Start() { player = ((Component)this).GetComponent(); if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !((Object)(object)player.data.weaponHandler == (Object)null)) { gun = player.data.weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } } private void OnShootProjectile(GameObject projectile) { TeslaBullet teslaBullet = projectile.AddComponent(); teslaBullet.attacker = player; teslaBullet.baseDamage = gun.damage * 20f; } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } } } public class TeslaBullet : MonoBehaviour { public Player attacker; public float baseDamage; public float speed = 10f; public float zapRadius = 8f; public float zapTickRate = 0.1f; public float currentScale = 2.5f; public float maxScale = 6f; public float growthSpeed = 1.5f; private Vector3 direction; private float zapTimer = 0f; private bool isStuck = false; private float armingTimer = 0.3f; private LineRenderer lightningBeam; private GameObject core; private void Start() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0155: 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_019c: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) Object.Destroy((Object)(object)((Component)this).gameObject, 10f); Vector3 normalized = ((Vector3)(ref attacker.data.aimDirection)).normalized; Vector3 val = new Vector3(normalized.x, normalized.y, 0f); direction = ((Vector3)(ref val)).normalized; ProjectileHit componentInChildren = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { ((Behaviour)componentInChildren).enabled = false; } RayCastTrail componentInChildren2 = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren2 != (Object)null) { ((Behaviour)componentInChildren2).enabled = false; } MoveTransform componentInChildren3 = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren3 != (Object)null) { ((Behaviour)componentInChildren3).enabled = false; } Collider2D componentInChildren4 = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren4 != (Object)null) { ((Behaviour)componentInChildren4).enabled = false; } Rigidbody2D componentInChildren5 = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren5 != (Object)null) { componentInChildren5.isKinematic = true; } SpriteRenderer componentInChildren6 = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren6 != (Object)null) { ((Renderer)componentInChildren6).enabled = false; } core = GameObject.CreatePrimitive((PrimitiveType)0); Component component = core.GetComponent("SphereCollider"); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } core.transform.SetParent(((Component)this).transform, false); core.transform.localPosition = Vector3.zero; core.transform.localScale = new Vector3(currentScale, currentScale, currentScale); Renderer component2 = core.GetComponent(); component2.material.color = Color.cyan; Shader val2 = Shader.Find("Particles/Standard Unlit"); if ((Object)(object)val2 != (Object)null) { component2.material.shader = val2; } lightningBeam = ((Component)this).gameObject.AddComponent(); lightningBeam.startWidth = 0.3f; lightningBeam.endWidth = 0.1f; ((Renderer)lightningBeam).material = new Material(Shader.Find("Sprites/Default")); lightningBeam.startColor = Color.cyan; lightningBeam.endColor = Color.white; lightningBeam.positionCount = 2; ((Renderer)lightningBeam).enabled = false; } private void Update() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)attacker == (Object)null || attacker.data.dead) { return; } if (!isStuck) { armingTimer -= Time.deltaTime; bool flag = false; if (armingTimer <= 0f) { int num = 33; RaycastHit2D val = Physics2D.CircleCast(Vector2.op_Implicit(((Component)this).transform.position), currentScale * 0.4f, Vector2.op_Implicit(direction), speed * Time.deltaTime, num); if ((Object)(object)((RaycastHit2D)(ref val)).collider != (Object)null) { flag = true; } } if (flag) { isStuck = true; } else { Transform transform = ((Component)this).transform; transform.position += direction * speed * Time.deltaTime; } } else if (currentScale < maxScale) { float num2 = growthSpeed * Time.deltaTime; currentScale += num2; if ((Object)(object)core != (Object)null) { core.transform.localScale = new Vector3(currentScale, currentScale, currentScale); } zapRadius += num2 * 0.8f; } zapTimer -= Time.deltaTime; Player val2 = null; float num3 = zapRadius; if ((Object)(object)PlayerManager.instance != (Object)null && PlayerManager.instance.players != null) { foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && player.teamID != attacker.teamID && !player.data.dead) { float num4 = Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(((Component)player).transform.position)); if (num4 <= num3) { num3 = num4; val2 = player; } } } } if ((Object)(object)val2 != (Object)null) { ((Renderer)lightningBeam).enabled = true; lightningBeam.SetPosition(0, ((Component)this).transform.position); lightningBeam.SetPosition(1, ((Component)val2).transform.position); if (zapTimer <= 0f) { Vector3 val3 = ((Component)val2).transform.position - ((Component)this).transform.position; Vector2 val4 = Vector2.op_Implicit(((Vector3)(ref val3)).normalized); ((Damagable)val2.data.healthHandler).TakeDamage(val4 * (baseDamage * 0.5f), Vector2.op_Implicit(((Component)val2).transform.position), Color.cyan, ((Component)this).gameObject, attacker, true, false); zapTimer = zapTickRate; } } else { ((Renderer)lightningBeam).enabled = false; } } } public class EventHorizonCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; if ((Object)(object)block != (Object)null) { block.cooldown += 20f; } } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "EVENT HORIZON"; } protected override string GetDescription() { return "BLOCK shoots a map-eating black hole. Eats up to 3 of your cards to grow permanently massive!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0083: 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_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Black Hole", amount = "On Block", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Sacrifice", amount = "Up to 3 Cards", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+15s", simepleAmount = (SimpleAmount)7 } }; } } public class EventHorizonEffect : MonoBehaviour { [CompilerGenerated] private sealed class d__5 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public EventHorizonEffect <>4__this; private List 5__1; private List 5__2; private int 5__3; private int 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__5(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; if ((Object)(object)<>4__this.player == (Object)null || <>4__this.player.data.dead) { return false; } if (<>4__this.globalCardsEaten >= 3) { return false; } 5__1 = <>4__this.player.data.currentCards; if (5__1 != null && 5__1.Count > 0) { 5__2 = new List(); 5__3 = 0; while (5__3 < 5__1.Count) { if (((Object)5__1[5__3]).name != "EventHorizonCard" && 5__1[5__3].cardName != "EVENT HORIZON") { 5__2.Add(5__3); } 5__3++; } if (5__2.Count > 0) { 5__4 = 5__2[Random.Range(0, 5__2.Count)]; Cards.instance.RemoveCardFromPlayer(<>4__this.player, 5__4); <>4__this.globalCardsEaten++; } 5__2 = null; } 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 player; private Block block; private bool firstBlockUsed = false; public int globalCardsEaten = 0; private void Start() { player = ((Component)this).GetComponent(); if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { block = player.data.block; if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Combine(obj.BlockAction, new Action(OnBlock)); } GameModeManager.AddHook("PointStart", (Func)OnPointStart); } } [IteratorStateMachine(typeof(d__5))] private IEnumerator OnPointStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__5(0) { <>4__this = this, gm = gm }; } private void OnBlock(BlockTriggerType type) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) if (!firstBlockUsed) { firstBlockUsed = true; return; } GameObject val = new GameObject("BlackHoleAnomaly"); val.transform.position = ((Component)player).transform.position + ((Vector3)(ref player.data.aimDirection)).normalized * 2.5f; BlackHoleEntity blackHoleEntity = val.AddComponent(); blackHoleEntity.attacker = player; blackHoleEntity.direction = ((Vector3)(ref player.data.aimDirection)).normalized; blackHoleEntity.startingBonusScale = (float)globalCardsEaten * 6f; } private void OnDestroy() { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Remove(obj.BlockAction, new Action(OnBlock)); } GameModeManager.RemoveHook("PointStart", (Func)OnPointStart); } } public class BlackHoleEntity : MonoBehaviour { public Player attacker; public Vector3 direction; public float startingBonusScale = 0f; public float speed = 2.5f; public float currentScale = 12f; public float pullRadius = 25f; public float eatRadius = 6f; public float positionDragSpeed = 14f; private GameObject core; private void Start() { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) Object.Destroy((Object)(object)((Component)this).gameObject, 15f); currentScale += startingBonusScale; eatRadius = currentScale * 0.5f; pullRadius = 25f + currentScale * 1.5f; core = GameObject.CreatePrimitive((PrimitiveType)0); Component component = core.GetComponent("SphereCollider"); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } core.transform.SetParent(((Component)this).transform, false); core.transform.localPosition = Vector3.zero; core.transform.localScale = new Vector3(currentScale, currentScale, currentScale); Renderer component2 = core.GetComponent(); component2.material.color = Color.black; Shader val = Shader.Find("Particles/Standard Unlit"); if ((Object)(object)val != (Object)null) { component2.material.shader = val; } } private void FixedUpdate() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: 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_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)attacker == (Object)null || attacker.data.dead) { return; } Transform transform = ((Component)this).transform; transform.position += direction * speed * Time.fixedDeltaTime; if ((Object)(object)PlayerManager.instance != (Object)null && PlayerManager.instance.players != null) { foreach (Player player in PlayerManager.instance.players) { if (!((Object)(object)player != (Object)null) || player.teamID == attacker.teamID || player.data.dead) { continue; } float num = Vector2.Distance(Vector2.op_Implicit(((Component)this).transform.position), Vector2.op_Implicit(((Component)player).transform.position)); if (num <= pullRadius) { Vector3 val = ((Component)this).transform.position - ((Component)player).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num2 = 1f - num / pullRadius; Transform transform2 = ((Component)player).transform; transform2.position += normalized * (positionDragSpeed * num2 * Time.fixedDeltaTime); if (num <= eatRadius) { ((Damagable)player.data.healthHandler).TakeDamage(Vector2.op_Implicit(normalized * 500f), Vector2.op_Implicit(((Component)player).transform.position), Color.black, ((Component)this).gameObject, attacker, true, true); GrowBlackHole(1f); } } } } Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)this).transform.position), eatRadius); Collider2D[] array2 = array; foreach (Collider2D val2 in array2) { if (((Component)val2).gameObject.layer == 11) { Object.Destroy((Object)(object)((Component)val2).gameObject); GrowBlackHole(0.3f); } } } private void GrowBlackHole(float growthAmount) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) currentScale += growthAmount; currentScale = Mathf.Clamp(currentScale, 12f, 60f); if ((Object)(object)core != (Object)null) { core.transform.localScale = new Vector3(currentScale, currentScale, currentScale); } eatRadius = currentScale * 0.5f; pullRadius = 25f + currentScale * 1.5f; } } public class IonCannonCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; if ((Object)(object)block != (Object)null) { block.cooldown += 6f; } } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "ION CANNON"; } protected override string GetDescription() { return "block targets all enemies and sends a fiery beam of death at them!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+6s", simepleAmount = (SimpleAmount)7 } }; } } public class IonCannonEffect : MonoBehaviour { private Player player; private Block block; private void Start() { player = ((Component)this).GetComponent(); if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null)) { block = player.data.block; if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Combine(obj.BlockAction, new Action(OnBlock)); } } } private void OnBlock(BlockTriggerType type) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)PlayerManager.instance != (Object)null) || PlayerManager.instance.players == null) { return; } foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && player.teamID != this.player.teamID && !player.data.dead) { GameObject val = new GameObject("OrbitalStrike"); val.transform.position = ((Component)player).transform.position; OrbitalLaser orbitalLaser = val.AddComponent(); orbitalLaser.attacker = this.player; } } } private void OnDestroy() { if ((Object)(object)block != (Object)null) { Block obj = block; obj.BlockAction = (Action)Delegate.Remove(obj.BlockAction, new Action(OnBlock)); } } } public class OrbitalLaser : MonoBehaviour { public Player attacker; private LineRenderer beam; private float countdown = 1f; private bool hasFired = false; private float blastRadius = 4.5f; private AudioSource audioSource; private AudioClip chargeSound; private AudioClip blastSound; private void Start() { //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: 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_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) Object.Destroy((Object)(object)((Component)this).gameObject, 3f); audioSource = ((Component)this).gameObject.AddComponent(); audioSource.playOnAwake = false; audioSource.spatialBlend = 0f; audioSource.volume = 1f; GenerateSounds(); audioSource.clip = chargeSound; audioSource.Play(); audioSource.PlayOneShot(chargeSound, 1f); beam = ((Component)this).gameObject.AddComponent(); ((Renderer)beam).material = new Material(Shader.Find("Sprites/Default")); beam.positionCount = 2; beam.startWidth = 0.1f; beam.endWidth = 0.1f; beam.startColor = Color.red; beam.endColor = new Color(1f, 0f, 0f, 0.2f); beam.SetPosition(0, ((Component)this).transform.position + new Vector3(0f, -50f, 0f)); beam.SetPosition(1, ((Component)this).transform.position + new Vector3(0f, 100f, 0f)); } private void Update() { if (!hasFired) { countdown -= Time.deltaTime; float num = Mathf.PingPong(Time.time * 10f, 0.2f); beam.startWidth = 0.1f + num; if (countdown <= 0f) { FireLaser(); } } else { beam.startWidth = Mathf.Lerp(beam.startWidth, 0f, Time.deltaTime * 5f); beam.endWidth = beam.startWidth; } } private void FireLaser() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_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_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ba: Unknown result type (might be due to invalid IL or missing references) hasFired = true; audioSource.Stop(); audioSource.PlayOneShot(blastSound, 1f); audioSource.PlayOneShot(blastSound, 1f); audioSource.PlayOneShot(blastSound, 1f); beam.startWidth = blastRadius * 2f; beam.endWidth = blastRadius * 2f; beam.startColor = Color.cyan; beam.endColor = Color.white; if (!((Object)(object)PlayerManager.instance != (Object)null) || PlayerManager.instance.players == null) { return; } foreach (Player player in PlayerManager.instance.players) { if ((Object)(object)player != (Object)null && !player.data.dead) { float num = Mathf.Abs(((Component)player).transform.position.x - ((Component)this).transform.position.x); if (num <= blastRadius) { Vector2 val = new Vector2((((Component)player).transform.position.x > ((Component)this).transform.position.x) ? 1f : (-1f), -1f); Vector2 normalized = ((Vector2)(ref val)).normalized; ((Damagable)player.data.healthHandler).TakeDamage(normalized * 750f, Vector2.op_Implicit(((Component)player).transform.position), Color.cyan, ((Component)this).gameObject, attacker, true, true); } } } } private void GenerateSounds() { int num = 44100; float[] array = new float[num]; for (int i = 0; i < array.Length; i++) { float num2 = (float)i / (float)num; float num3 = Mathf.Sin(num2 * 55f * 2f * MathF.PI); float num4 = Mathf.Lerp(2f, 15f, num2); float num5 = Mathf.Sin(num2 * num4 * 2f * MathF.PI); float num6 = num2; float num7 = num3 * (num5 * 0.5f + 0.5f) * num6; array[i] = Mathf.Clamp(num7 * 3f, -1f, 1f); } chargeSound = AudioClip.Create("LaserCharge", array.Length, 1, num, false); chargeSound.SetData(array, 0); float[] array2 = new float[num * 2]; float num8 = 0f; for (int j = 0; j < array2.Length; j++) { float num9 = (float)j / (float)num; float num10 = Mathf.Exp((0f - num9) * 25f); float num11 = Random.value * 2f - 1f; float num12 = (num11 + num8) * 0.5f; num8 = num12; float num13 = Mathf.Exp((0f - num9) * 3.5f); float num14 = Mathf.Lerp(120f, 30f, Mathf.Pow(num9, 0.5f)); float num15 = Mathf.Sin(num9 * num14 * 2f * MathF.PI); float num16 = num12 * num10 * 3f + num15 * num13 * 4f; array2[j] = Mathf.Clamp(num16 * 4f, -1f, 1f); } blastSound = AudioClip.Create("LaserBlast", array2.Length, 1, num, false); blastSound.SetData(array2, 0); } } public class PlasmaMelterCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; block.cooldown = 0.25f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "PLASMA MELTER"; } protected override string GetDescription() { return "Blocking primes your weapon. Your next shot turns into a white-hot plasma beam that completely disintegrates walls!(may be a little hard to aim. does not work on life forms)"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Laser Charge", amount = "On Block", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+0.25s", simepleAmount = (SimpleAmount)0 } }; } } public class PlasmaMelterEffect : MonoBehaviour { private Player player; private Gun gun; private bool isLaserPrimed = false; private float lastBlockCounter = 0f; private void Start() { player = ((Component)this).GetComponent(); if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !((Object)(object)player.data.weaponHandler == (Object)null)) { gun = player.data.weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } } private void Update() { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !((Object)(object)player.data.block == (Object)null)) { if (player.data.block.counter > lastBlockCounter && lastBlockCounter == 0f) { isLaserPrimed = true; } lastBlockCounter = player.data.block.counter; } } private void OnShootProjectile(GameObject projectile) { //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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (isLaserPrimed) { Vector2 origin = Vector2.op_Implicit(projectile.transform.position); Vector2 direction = Vector2.op_Implicit(((Vector3)(ref player.data.aimDirection)).normalized); MoveTransform componentInChildren = projectile.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null && componentInChildren.velocity != Vector3.zero) { direction = Vector2.op_Implicit(((Vector3)(ref componentInChildren.velocity)).normalized); } Object.Destroy((Object)(object)projectile); FireInstantLaserBeam(origin, direction); isLaserPrimed = false; } } private void FireInstantLaserBeam(Vector2 origin, Vector2 direction) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_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_01a3: 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_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0213: 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_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0232: 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) Vector2 val = origin + direction * 150f; GameObject val2 = null; RaycastHit2D[] array = Physics2D.RaycastAll(origin, direction, 150f); RaycastHit2D[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit2D val3 = array2[i]; if ((Object)(object)((RaycastHit2D)(ref val3)).collider != (Object)null && !((Object)(object)((Component)((RaycastHit2D)(ref val3)).collider).transform.root == (Object)(object)((Component)player).transform.root) && !((Object)(object)((Component)((RaycastHit2D)(ref val3)).collider).GetComponentInParent() == (Object)(object)player) && !((RaycastHit2D)(ref val3)).collider.isTrigger) { val = ((RaycastHit2D)(ref val3)).point; GameObject gameObject = ((Component)((RaycastHit2D)(ref val3)).collider).gameObject; if ((Object)(object)gameObject.GetComponentInParent() == (Object)null && !((Object)gameObject).name.Contains("Boundary") && !((Object)gameObject).name.Contains("Kill")) { val2 = gameObject; } break; } } GameObject val4 = new GameObject("LavaBeamVisual"); LineRenderer val5 = val4.AddComponent(); ((Renderer)val5).material = new Material(Shader.Find("Sprites/Default")); ((Renderer)val5).sortingOrder = 999; Gradient val6 = new Gradient(); val6.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(Color.yellow, 0f), new GradientColorKey(Color.red, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[2] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(1f, 1f) }); val5.colorGradient = val6; val5.startWidth = 0.25f; val5.endWidth = 0.25f; val5.positionCount = 2; val5.useWorldSpace = true; val5.SetPosition(0, new Vector3(origin.x, origin.y, 0f)); val5.SetPosition(1, new Vector3(val.x, val.y, 0f)); val4.AddComponent().Initialize(val5, val2); if ((Object)(object)val2 != (Object)null && (Object)(object)val2.GetComponent() == (Object)null) { val2.AddComponent().BeginMeltSequence(); } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } } } public class LaserBeamFade : MonoBehaviour { private LineRenderer line; private GameObject targetWall; private bool isTrackingWall = false; private float decayTimer = 0f; private float fadeSpeed = 0.12f; public void Initialize(LineRenderer lr, GameObject wall) { line = lr; targetWall = wall; if ((Object)(object)targetWall != (Object)null) { isTrackingWall = true; } } private void Update() { if ((Object)(object)line == (Object)null) { return; } if (isTrackingWall) { if ((Object)(object)targetWall == (Object)null) { isTrackingWall = false; return; } float num = 0.2f + Mathf.Sin(Time.time * 65f) * 0.08f; line.startWidth = num; line.endWidth = num; return; } decayTimer += Time.deltaTime; if (decayTimer >= fadeSpeed) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } float num2 = 1f - decayTimer / fadeSpeed; line.startWidth = 0.2f * num2; line.endWidth = 0.2f * num2; } } public class ThermalMeltTracker : MonoBehaviour { [CompilerGenerated] private sealed class d__4 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public ThermalMeltTracker <>4__this; private float 5__1; private float 5__2; private float 5__3; private Vector3 5__4; private Vector3 5__5; private Color 5__6; private float 5__7; private Color 5__8; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_0237: 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_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_027d: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0f; 5__2 = 0.5f; goto IL_00d5; case 1: <>1__state = -1; goto IL_00d5; case 2: { <>1__state = -1; break; } IL_00d5: if (5__1 < 5__2) { 5__1 += Time.deltaTime; if ((Object)(object)<>4__this.wallRenderer != (Object)null) { <>4__this.wallRenderer.color = Color.Lerp(<>4__this.originalColor, new Color(1f, 0.35f, 0f, 1f), 5__1 / 5__2); } <>2__current = null; <>1__state = 1; return true; } 5__1 = 0f; 5__3 = 0.35f; 5__4 = ((Component)<>4__this).transform.localScale; 5__5 = ((Component)<>4__this).transform.position; 5__6 = (((Object)(object)<>4__this.wallRenderer != (Object)null) ? <>4__this.wallRenderer.color : Color.red); break; } if (5__1 < 5__3) { 5__1 += Time.deltaTime; 5__7 = 5__1 / 5__3; ((Component)<>4__this).transform.localScale = new Vector3(5__4.x * (1f + 5__7 * 0.15f), Mathf.Lerp(5__4.y, 0f, 5__7), 5__4.z); ((Component)<>4__this).transform.position = 5__5 + Vector3.down * (5__4.y * 0.5f * 5__7); if ((Object)(object)<>4__this.wallRenderer != (Object)null) { 5__8 = Color.Lerp(5__6, Color.black, 5__7); 5__8.a = Mathf.Lerp(1f, 0f, 5__7); <>4__this.wallRenderer.color = 5__8; } <>2__current = null; <>1__state = 2; return true; } Object.Destroy((Object)(object)((Component)<>4__this).gameObject); 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 SpriteRenderer wallRenderer; private Color originalColor; private bool processing = false; public void BeginMeltSequence() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) if (!processing) { processing = true; Rigidbody2D component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null) { component.simulated = false; } wallRenderer = ((Component)this).GetComponent(); if ((Object)(object)wallRenderer != (Object)null) { originalColor = wallRenderer.color; } ((MonoBehaviour)this).StartCoroutine(BurnRoutine()); } } [IteratorStateMachine(typeof(d__4))] private IEnumerator BurnRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__4(0) { <>4__this = this }; } } public class HammerHeadEffect : MonoBehaviour { private Player player; private Rigidbody2D rb; private float teleportDistance = 8f; private void Start() { player = ((Component)this).GetComponent(); rb = ((Component)this).GetComponent(); Block block = player.data.block; block.BlockAction = (Action)Delegate.Combine(block.BlockAction, new Action(OnBlock)); } private void OnBlock(BlockTriggerType trigger) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) Vector2 val = ((TwoAxisInputControl)player.data.playerActions.Move).Value; if (((Vector2)(ref val)).magnitude < 0.1f) { val = Vector2.op_Implicit(player.data.aimDirection); } val = ((Vector2)(ref val)).normalized; Vector3 position = ((Component)player).transform.position; Transform transform = ((Component)player).transform; transform.position += Vector2.op_Implicit(val) * teleportDistance; rb.velocity = Vector2.zero; try { RaycastHit2D[] array = Physics2D.BoxCastAll(Vector2.op_Implicit(position), new Vector2(2f, 2f), 0f, val, teleportDistance); RaycastHit2D[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit2D val2 = array2[i]; if ((Object)(object)((RaycastHit2D)(ref val2)).collider == (Object)null) { continue; } Player componentInParent = ((Component)((RaycastHit2D)(ref val2)).collider).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && componentInParent.playerID != player.playerID) { bool flag = false; try { flag = componentInParent.data.block.IsBlocking(); } catch { } if (flag) { ((Damagable)componentInParent.data.healthHandler).TakeDamage(val * 40f, ((RaycastHit2D)(ref val2)).point, Color.red, (GameObject)null, player, true, false); } } } } catch (Exception) { } } private void OnDestroy() { if ((Object)(object)player != (Object)null && (Object)(object)player.data != (Object)null && (Object)(object)player.data.block != (Object)null) { Block block = player.data.block; block.BlockAction = (Action)Delegate.Remove(block.BlockAction, new Action(OnBlock)); } } } public class StasisWallCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = true; block.cooldown = 0.3f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() == (Object)null) { ((Component)player).gameObject.AddComponent(); } } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "STASIS WALL"; } protected override string GetDescription() { return "Activating your block constructs a temporary hard-light barrier that completely stops all ballistic fire!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)1; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)2; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Hard-Light Cover", amount = "On Block", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Block Cooldown", amount = "+0.3s", simepleAmount = (SimpleAmount)0 } }; } } public class StasisWallEffect : MonoBehaviour { private Player player; private float lastBlockCounter = 0f; private void Start() { player = ((Component)this).GetComponent(); } private void Update() { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.data == (Object)null) && !((Object)(object)player.data.block == (Object)null)) { if (player.data.block.counter > lastBlockCounter && lastBlockCounter == 0f) { BuildStasisBarrier(); } lastBlockCounter = player.data.block.counter; } } private void BuildStasisBarrier() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_00d3: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Vector2.op_Implicit(((Vector3)(ref player.data.aimDirection)).normalized); Vector3 position = ((Component)this).transform.position + Vector2.op_Implicit(val * 2.5f); GameObject val2 = new GameObject("DeployedStasisWall"); val2.transform.position = position; float num = Mathf.Atan2(val.y, val.x) * 57.29578f; val2.transform.rotation = Quaternion.Euler(0f, 0f, num); val2.layer = 0; LineRenderer val3 = val2.AddComponent(); ((Renderer)val3).material = new Material(Shader.Find("Sprites/Default")); ((Renderer)val3).sortingOrder = 998; val3.startColor = new Color(0f, 0.6f, 1f, 1f); val3.endColor = new Color(0f, 1f, 1f, 0.8f); float num2 = 4.5f; val3.startWidth = 0.25f; val3.endWidth = 0.25f; val3.positionCount = 2; val3.useWorldSpace = false; val3.SetPosition(0, new Vector3(0f, (0f - num2) * 0.5f, 0f)); val3.SetPosition(1, new Vector3(0f, num2 * 0.5f, 0f)); BoxCollider2D val4 = val2.AddComponent(); val4.size = new Vector2(0.5f, num2); ((Collider2D)val4).isTrigger = true; val2.AddComponent().Initialize(num2); val2.AddComponent().StartDecaySequence(val3, val4); } } public class StasisBulletVaporizer : MonoBehaviour { private Vector2 scanDimensions; public void Initialize(float length) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) scanDimensions = new Vector2(3f, length + 0.5f); } private void FixedUpdate() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) Collider2D[] array = Physics2D.OverlapBoxAll(Vector2.op_Implicit(((Component)this).transform.position), scanDimensions, ((Component)this).transform.eulerAngles.z); Collider2D[] array2 = array; foreach (Collider2D val in array2) { if ((Object)(object)val != (Object)null && (Object)(object)((Component)val).gameObject != (Object)null && !((Object)(object)((Component)((Component)val).transform.root).GetComponent() != (Object)null) && !((Object)(object)((Component)val).GetComponentInParent() != (Object)null) && !((Object)((Component)val).gameObject).name.Contains("Player") && (((Component)val).gameObject.layer == 9 || ((Component)val).gameObject.layer == 10 || ((Object)((Component)val).gameObject).name.ToLower().Contains("bullet") || ((Object)((Component)val).gameObject).name.ToLower().Contains("projectile"))) { Object.Destroy((Object)(object)((Component)val).gameObject); } } } } public class StasisWallLifespan : MonoBehaviour { [CompilerGenerated] private sealed class d__3 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public StasisWallLifespan <>4__this; private float 5__1; private float 5__2; private float 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__3(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(3f); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this.box != (Object)null) { Object.Destroy((Object)(object)<>4__this.box); } 5__1 = 0f; 5__2 = 0.25f; break; case 2: <>1__state = -1; break; } if (5__1 < 5__2) { 5__1 += Time.deltaTime; 5__3 = 5__1 / 5__2; if ((Object)(object)<>4__this.line != (Object)null) { <>4__this.line.startWidth = Mathf.Lerp(0.25f, 0f, 5__3); <>4__this.line.endWidth = Mathf.Lerp(0.25f, 0f, 5__3); } <>2__current = null; <>1__state = 2; return true; } Object.Destroy((Object)(object)((Component)<>4__this).gameObject); 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 LineRenderer line; private BoxCollider2D box; public void StartDecaySequence(LineRenderer lr, BoxCollider2D col) { line = lr; box = col; ((MonoBehaviour)this).StartCoroutine(LifespanRoutine()); } [IteratorStateMachine(typeof(d__3))] private IEnumerator LifespanRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__3(0) { <>4__this = this }; } } public class LaserCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.ammo = 97; gun.attackSpeed = 0.05f; gun.damage = 0.001f; gun.gravity = 0f; gun.projectileSpeed = 50f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "AAAAAH"; } protected override string GetDescription() { return "Hold the trigger to fire a continuous, instant beam of bullets!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)3; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0083: 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_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Ammo", amount = "100", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Fire Rate", amount = "Insane", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = false, stat = "Damage", amount = "-99.99999999999999%", simepleAmount = (SimpleAmount)3 } }; } } public class LaserEffect : MonoBehaviour { private Player player; private Gun gun; private void Start() { player = ((Component)this).GetComponent(); gun = player.data.weaponHandler.gun; Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } private void OnShootProjectile(GameObject proj) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) proj.transform.localScale = new Vector3(5f, 0.2f, 1f); SpriteRenderer componentInChildren = proj.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.color = Color.cyan; } } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } } } public class RailgunCard : CustomCard { public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.allowMultiple = false; gun.ammo = 147; gun.numberOfProjectiles = 150; gun.spread = 0.05f; gun.projectileSpeed = 3f; gun.reloadTime = 1.3f; gun.damage = 0.2f; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_00fd: Unknown result type (might be due to invalid IL or missing references) CardInfo[] cards = CardChoice.instance.cards; foreach (CardInfo val in cards) { if (!val.cardName.ToLower().Contains("explosive")) { continue; } Gun component = ((Component)val).gameObject.GetComponent(); if (!((Object)(object)component != (Object)null) || component.objectsToSpawn == null || component.objectsToSpawn.Length == 0) { break; } List list = new List(gun.objectsToSpawn); list.AddRange(component.objectsToSpawn); gun.objectsToSpawn = list.ToArray(); ObjectsToSpawn[] objectsToSpawn = component.objectsToSpawn; foreach (ObjectsToSpawn val2 in objectsToSpawn) { if ((Object)(object)val2.effect != (Object)null) { val2.effect.SetActive(true); val2.scaleFromDamage = 0f; val2.effect.transform.localScale = new Vector3(1.8f, 1.8f, 1.8f); Explosion val3 = val2.effect.GetComponent(); if ((Object)(object)val3 == (Object)null) { val3 = val2.effect.GetComponentInChildren(); } if ((Object)(object)val3 != (Object)null) { val3.range = 5f; val3.damage = 30f; val3.force = 15f; } } } break; } ((Component)player).gameObject.AddComponent(); ((Component)player).gameObject.AddComponent(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } if ((Object)(object)((Component)player).gameObject.GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)player).gameObject.GetComponent()); } } protected override string GetTitle() { return "THE DELETINATOR"; } protected override string GetDescription() { return "IT DELETES THINGS WHY WOULDN'T YOU WANT THAT!"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { return (Rarity)2; } protected override CardThemeColorType GetTheme() { return (CardThemeColorType)4; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Max Ammo", amount = "150 Pellets", simepleAmount = (SimpleAmount)3 }, new CardInfoStat { positive = true, stat = "Explosive Type", amount = "Refined", simepleAmount = (SimpleAmount)3 } }; } } public class ShotgunBurstEffect : MonoBehaviour { [CompilerGenerated] private sealed class d__8 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public ShotgunBurstEffect <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__8(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>4__this.gunAmmo != (Object)null && <>4__this.ammoField != null) { <>4__this.ammoField.SetValue(<>4__this.gunAmmo, 0); } <>4__this.isDraining = false; 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 player; private Gun gun; private GunAmmo gunAmmo; private FieldInfo ammoField; private bool isDraining = false; private void Start() { player = ((Component)this).GetComponent(); gun = player.data.weaponHandler.gun; gunAmmo = ((Component)gun).GetComponent(); ammoField = typeof(GunAmmo).GetField("ammo", BindingFlags.Instance | BindingFlags.NonPublic); Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Combine(obj.ShootPojectileAction, new Action(OnShootProjectile)); } private void Update() { if ((Object)(object)gun != (Object)null && (Object)(object)gunAmmo != (Object)null && ammoField != null) { int num = (int)ammoField.GetValue(gunAmmo); if (num > 0) { gun.numberOfProjectiles = num; } } } private void OnShootProjectile(GameObject proj) { if (!isDraining) { isDraining = true; ((MonoBehaviour)this).StartCoroutine(DelayAmmoDrainRoutine()); } } [IteratorStateMachine(typeof(d__8))] private IEnumerator DelayAmmoDrainRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__8(0) { <>4__this = this }; } private void OnDestroy() { if ((Object)(object)gun != (Object)null) { Gun obj = gun; obj.ShootPojectileAction = (Action)Delegate.Remove(obj.ShootPojectileAction, new Action(OnShootProjectile)); } } } public class NoFriendlyFireTrait : MonoBehaviour { } [HarmonyPatch(typeof(HealthHandler), "CallTakeDamage")] public class FriendlyFirePatch_CallTakeDamage { [HarmonyPrefix] public static bool Prefix(HealthHandler __instance, Vector2 damage, Vector2 position, GameObject damagingWeapon, Player damagingPlayer, bool lethal) { return FriendlyFireCommon.ProcessDamage(__instance, damagingWeapon, damagingPlayer); } } [HarmonyPatch(typeof(HealthHandler), "TakeDamage", new Type[] { typeof(Vector2), typeof(Vector2), typeof(Color), typeof(GameObject), typeof(Player), typeof(bool), typeof(bool) })] public class FriendlyFirePatch_TakeDamage { [HarmonyPrefix] public static bool Prefix(HealthHandler __instance, Vector2 damage, Vector2 position, Color dmgColor, GameObject damagingWeapon, Player damagingPlayer, bool lethal, bool ignoreBlock) { return FriendlyFireCommon.ProcessDamage(__instance, damagingWeapon, damagingPlayer); } } public static class FriendlyFireCommon { public static bool ProcessDamage(HealthHandler instance, GameObject damagingWeapon, Player damagingPlayer) { if ((Object)(object)instance == (Object)null) { return true; } Player component = ((Component)instance).GetComponent(); if ((Object)(object)component == (Object)null) { return true; } Player val = damagingPlayer; if ((Object)(object)val == (Object)null && (Object)(object)damagingWeapon != (Object)null) { SpawnedAttack componentInChildren = ((Component)damagingWeapon.transform.root).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { val = componentInChildren.spawner; } if ((Object)(object)val == (Object)null) { ProjectileHit componentInChildren2 = ((Component)damagingWeapon.transform.root).GetComponentInChildren(); if ((Object)(object)componentInChildren2 != (Object)null) { val = componentInChildren2.ownPlayer; } } } if ((Object)(object)val != (Object)null && component.teamID == val.teamID) { if ((Object)(object)((Component)val).gameObject.GetComponent() != (Object)null) { return false; } } else if ((Object)(object)damagingWeapon != (Object)null && (Object)(object)((Component)component).gameObject.GetComponent() != (Object)null) { return false; } return true; } } }